From 026fde318630493fedcc51eddeb080cb704883cf Mon Sep 17 00:00:00 2001 From: Andres Martin Aiello <50411235+andresaiello@users.noreply.github.com> Date: Thu, 16 Jun 2022 09:02:14 -0300 Subject: [PATCH 001/115] aaiello/zeta-306-fix-smart-contracts-sast-results (#7) * aaiello/zeta-306-fix-smart-contracts-sast-results * Update packages/protocol-contracts/contracts/ZetaNonEth.sol * Update packages/protocol-contracts/contracts/ZetaInteractor.sol Co-authored-by: Lucas --- .solhint.json | 2 +- .../cross-chain-counter/CrossChainCounter.sol | 2 +- .../test/CounterZetaConnectorMock.sol | 2 +- .../cross-chain-message/CrossChainMessage.sol | 2 +- .../CrossChainWarriors.sol | 2 +- .../test/CrossChainWarriorsMock.sol | 2 +- .../CrossChainWarriorsZetaConnectorMock.sol | 2 +- .../multi-chain-swap/MultiChainSwap.base.sol | 2 +- .../multi-chain-swap/MultiChainSwap.bsc.sol | 2 +- .../multi-chain-swap/MultiChainSwap.eth.sol | 2 +- .../multi-chain-swap/MultiChainSwapErrors.sol | 2 +- .../test/MultiChainSwapZetaConnector.sol | 2 +- .../multi-chain-value/MultiChainValue.sol | 2 +- .../test/MultiChainValueMock.sol | 2 +- .../test/ZetaConnectorMock.sol | 2 +- .../contracts/shared/ZetaEthMock.sol | 2 +- packages/example-contracts/hardhat.config.ts | 2 +- .../contracts/ZetaConnector.base.sol | 28 +++++++++++-------- .../contracts/ZetaConnector.eth.sol | 18 ++++++------ .../contracts/ZetaConnector.non-eth.sol | 12 ++++---- .../contracts/ZetaConnectorErrors.sol | 6 ++++ .../protocol-contracts/contracts/ZetaEth.sol | 2 +- .../contracts/ZetaInteractor.sol | 3 +- .../contracts/ZetaInteractorErrors.sol | 2 +- .../contracts/ZetaInterfaces.sol | 2 +- .../contracts/ZetaNonEth.sol | 28 ++++++++++--------- .../contracts/ZetaNonEthErrors.sol | 8 ++++++ .../contracts/ZetaReceiver.sol | 2 +- .../contracts/testing/ZetaInteractorMock.sol | 6 ++-- .../contracts/testing/ZetaReceiverMock.sol | 2 +- packages/protocol-contracts/hardhat.config.ts | 2 +- .../test/ZetaConnector.spec.ts | 2 +- 32 files changed, 90 insertions(+), 67 deletions(-) create mode 100644 packages/protocol-contracts/contracts/ZetaConnectorErrors.sol create mode 100644 packages/protocol-contracts/contracts/ZetaNonEthErrors.sol diff --git a/.solhint.json b/.solhint.json index a513c7a4..5dc69539 100644 --- a/.solhint.json +++ b/.solhint.json @@ -1,7 +1,7 @@ { "extends": "solhint:recommended", "rules": { - "compiler-version": ["error", "0.8.9"], + "compiler-version": ["error", "0.8.7"], "func-visibility": ["warn", { "ignoreConstructors": true }], "reason-string": ["warn", { "maxLength": 80 }], "no-empty-blocks": "off", diff --git a/packages/example-contracts/contracts/cross-chain-counter/CrossChainCounter.sol b/packages/example-contracts/contracts/cross-chain-counter/CrossChainCounter.sol index 5f5f0f81..0d56b44b 100644 --- a/packages/example-contracts/contracts/cross-chain-counter/CrossChainCounter.sol +++ b/packages/example-contracts/contracts/cross-chain-counter/CrossChainCounter.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -pragma solidity 0.8.9; +pragma solidity 0.8.7; import "@openzeppelin/contracts/access/Ownable.sol"; import "@zetachain/protocol-contracts/contracts/ZetaInterfaces.sol"; diff --git a/packages/example-contracts/contracts/cross-chain-counter/test/CounterZetaConnectorMock.sol b/packages/example-contracts/contracts/cross-chain-counter/test/CounterZetaConnectorMock.sol index 7a2ffd66..57862942 100644 --- a/packages/example-contracts/contracts/cross-chain-counter/test/CounterZetaConnectorMock.sol +++ b/packages/example-contracts/contracts/cross-chain-counter/test/CounterZetaConnectorMock.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -pragma solidity 0.8.9; +pragma solidity 0.8.7; import "@zetachain/protocol-contracts/contracts/ZetaInterfaces.sol"; diff --git a/packages/example-contracts/contracts/cross-chain-message/CrossChainMessage.sol b/packages/example-contracts/contracts/cross-chain-message/CrossChainMessage.sol index a0a19ad7..6851c8e6 100644 --- a/packages/example-contracts/contracts/cross-chain-message/CrossChainMessage.sol +++ b/packages/example-contracts/contracts/cross-chain-message/CrossChainMessage.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -pragma solidity 0.8.9; +pragma solidity 0.8.7; import "@openzeppelin/contracts/access/Ownable.sol"; import "@zetachain/protocol-contracts/contracts/ZetaInterfaces.sol"; diff --git a/packages/example-contracts/contracts/cross-chain-warriors/CrossChainWarriors.sol b/packages/example-contracts/contracts/cross-chain-warriors/CrossChainWarriors.sol index 36b884cf..235bd2f1 100644 --- a/packages/example-contracts/contracts/cross-chain-warriors/CrossChainWarriors.sol +++ b/packages/example-contracts/contracts/cross-chain-warriors/CrossChainWarriors.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -pragma solidity 0.8.9; +pragma solidity 0.8.7; import "@openzeppelin/contracts/interfaces/IERC20.sol"; import "@openzeppelin/contracts/token/ERC721/ERC721.sol"; diff --git a/packages/example-contracts/contracts/cross-chain-warriors/test/CrossChainWarriorsMock.sol b/packages/example-contracts/contracts/cross-chain-warriors/test/CrossChainWarriorsMock.sol index e11cc925..48155868 100644 --- a/packages/example-contracts/contracts/cross-chain-warriors/test/CrossChainWarriorsMock.sol +++ b/packages/example-contracts/contracts/cross-chain-warriors/test/CrossChainWarriorsMock.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -pragma solidity 0.8.9; +pragma solidity 0.8.7; import "../CrossChainWarriors.sol"; diff --git a/packages/example-contracts/contracts/cross-chain-warriors/test/CrossChainWarriorsZetaConnectorMock.sol b/packages/example-contracts/contracts/cross-chain-warriors/test/CrossChainWarriorsZetaConnectorMock.sol index 03ac5746..dbf48099 100644 --- a/packages/example-contracts/contracts/cross-chain-warriors/test/CrossChainWarriorsZetaConnectorMock.sol +++ b/packages/example-contracts/contracts/cross-chain-warriors/test/CrossChainWarriorsZetaConnectorMock.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -pragma solidity 0.8.9; +pragma solidity 0.8.7; import "@zetachain/protocol-contracts/contracts/ZetaInterfaces.sol"; diff --git a/packages/example-contracts/contracts/multi-chain-swap/MultiChainSwap.base.sol b/packages/example-contracts/contracts/multi-chain-swap/MultiChainSwap.base.sol index d1cc0b16..5f757a63 100644 --- a/packages/example-contracts/contracts/multi-chain-swap/MultiChainSwap.base.sol +++ b/packages/example-contracts/contracts/multi-chain-swap/MultiChainSwap.base.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -pragma solidity 0.8.9; +pragma solidity 0.8.7; import "@openzeppelin/contracts/interfaces/IERC20.sol"; import "@uniswap/v2-periphery/contracts/interfaces/IUniswapV2Router02.sol"; diff --git a/packages/example-contracts/contracts/multi-chain-swap/MultiChainSwap.bsc.sol b/packages/example-contracts/contracts/multi-chain-swap/MultiChainSwap.bsc.sol index 6443b286..cca4006e 100644 --- a/packages/example-contracts/contracts/multi-chain-swap/MultiChainSwap.bsc.sol +++ b/packages/example-contracts/contracts/multi-chain-swap/MultiChainSwap.bsc.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -pragma solidity 0.8.9; +pragma solidity 0.8.7; import "@zetachain/protocol-contracts/contracts/ZetaInterfaces.sol"; import "@zetachain/protocol-contracts/contracts/ZetaReceiver.sol"; diff --git a/packages/example-contracts/contracts/multi-chain-swap/MultiChainSwap.eth.sol b/packages/example-contracts/contracts/multi-chain-swap/MultiChainSwap.eth.sol index b60fde2b..e39c405e 100644 --- a/packages/example-contracts/contracts/multi-chain-swap/MultiChainSwap.eth.sol +++ b/packages/example-contracts/contracts/multi-chain-swap/MultiChainSwap.eth.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -pragma solidity 0.8.9; +pragma solidity 0.8.7; import "@zetachain/protocol-contracts/contracts/ZetaInterfaces.sol"; diff --git a/packages/example-contracts/contracts/multi-chain-swap/MultiChainSwapErrors.sol b/packages/example-contracts/contracts/multi-chain-swap/MultiChainSwapErrors.sol index 4f4279d8..92042c40 100644 --- a/packages/example-contracts/contracts/multi-chain-swap/MultiChainSwapErrors.sol +++ b/packages/example-contracts/contracts/multi-chain-swap/MultiChainSwapErrors.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -pragma solidity 0.8.9; +pragma solidity 0.8.7; interface MultiChainSwapErrors { error ErrorTransferringTokens(address token); diff --git a/packages/example-contracts/contracts/multi-chain-swap/test/MultiChainSwapZetaConnector.sol b/packages/example-contracts/contracts/multi-chain-swap/test/MultiChainSwapZetaConnector.sol index 7d0ab6d3..7b7c9333 100644 --- a/packages/example-contracts/contracts/multi-chain-swap/test/MultiChainSwapZetaConnector.sol +++ b/packages/example-contracts/contracts/multi-chain-swap/test/MultiChainSwapZetaConnector.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -pragma solidity 0.8.9; +pragma solidity 0.8.7; import "@zetachain/protocol-contracts/contracts/ZetaInterfaces.sol"; diff --git a/packages/example-contracts/contracts/multi-chain-value/MultiChainValue.sol b/packages/example-contracts/contracts/multi-chain-value/MultiChainValue.sol index 96ec0799..81bf78da 100644 --- a/packages/example-contracts/contracts/multi-chain-value/MultiChainValue.sol +++ b/packages/example-contracts/contracts/multi-chain-value/MultiChainValue.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -pragma solidity 0.8.9; +pragma solidity 0.8.7; import "@openzeppelin/contracts/access/Ownable.sol"; import "@zetachain/protocol-contracts/contracts/ZetaEth.sol"; diff --git a/packages/example-contracts/contracts/multi-chain-value/test/MultiChainValueMock.sol b/packages/example-contracts/contracts/multi-chain-value/test/MultiChainValueMock.sol index 3f629163..1e7d216a 100644 --- a/packages/example-contracts/contracts/multi-chain-value/test/MultiChainValueMock.sol +++ b/packages/example-contracts/contracts/multi-chain-value/test/MultiChainValueMock.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -pragma solidity 0.8.9; +pragma solidity 0.8.7; import "../MultiChainValue.sol"; diff --git a/packages/example-contracts/contracts/multi-chain-value/test/ZetaConnectorMock.sol b/packages/example-contracts/contracts/multi-chain-value/test/ZetaConnectorMock.sol index 7c0bac4d..83546848 100644 --- a/packages/example-contracts/contracts/multi-chain-value/test/ZetaConnectorMock.sol +++ b/packages/example-contracts/contracts/multi-chain-value/test/ZetaConnectorMock.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -pragma solidity 0.8.9; +pragma solidity 0.8.7; import "@zetachain/protocol-contracts/contracts/ZetaInterfaces.sol"; diff --git a/packages/example-contracts/contracts/shared/ZetaEthMock.sol b/packages/example-contracts/contracts/shared/ZetaEthMock.sol index ecc64113..17d9e2eb 100644 --- a/packages/example-contracts/contracts/shared/ZetaEthMock.sol +++ b/packages/example-contracts/contracts/shared/ZetaEthMock.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -pragma solidity 0.8.9; +pragma solidity 0.8.7; import "@openzeppelin/contracts/token/ERC20/ERC20.sol"; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; diff --git a/packages/example-contracts/hardhat.config.ts b/packages/example-contracts/hardhat.config.ts index c39adfd8..8008bae8 100644 --- a/packages/example-contracts/hardhat.config.ts +++ b/packages/example-contracts/hardhat.config.ts @@ -15,7 +15,7 @@ const PRIVATE_KEYS = process.env.PRIVATE_KEY !== undefined ? [`0x${process.env.P const config: HardhatUserConfig = { solidity: { - compilers: [{ version: "0.6.6" /** For uniswap v2 */ }, { version: "0.8.9" }], + compilers: [{ version: "0.6.6" /** For uniswap v2 */ }, { version: "0.8.7" }], settings: { /** * @see {@link https://smock.readthedocs.io/en/latest/getting-started.html} diff --git a/packages/protocol-contracts/contracts/ZetaConnector.base.sol b/packages/protocol-contracts/contracts/ZetaConnector.base.sol index 17e1d607..6c1d8161 100644 --- a/packages/protocol-contracts/contracts/ZetaConnector.base.sol +++ b/packages/protocol-contracts/contracts/ZetaConnector.base.sol @@ -1,13 +1,14 @@ // SPDX-License-Identifier: MIT -pragma solidity 0.8.9; +pragma solidity 0.8.7; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import "@openzeppelin/contracts/security/Pausable.sol"; import "./ZetaReceiver.sol"; import "./ZetaInterfaces.sol"; +import "./ZetaConnectorErrors.sol"; -contract ZetaConnectorBase is Pausable { +contract ZetaConnectorBase is Pausable, ZetaConnectorErrors { address public zetaToken; /** @@ -43,14 +44,18 @@ contract ZetaConnectorBase is Pausable { bytes32 indexed internalSendHash ); + event TSSAddressUpdated(address originSenderAddress, address newTSSAddress); + constructor( - address _zetaTokenAddress, - address _tssAddress, - address _tssAddressUpdater + address zetaTokenAddress_, + address tssAddress_, + address tssAddressUpdater_ ) { - zetaToken = _zetaTokenAddress; - tssAddress = _tssAddress; - tssAddressUpdater = _tssAddressUpdater; + if (zetaTokenAddress_ == address(0) || tssAddress_ == address(0) || tssAddressUpdater_ == address(0)) + revert AddressCantBeZero(); + zetaToken = zetaTokenAddress_; + tssAddress = tssAddress_; + tssAddressUpdater = tssAddressUpdater_; } modifier onlyTssAddress() { @@ -64,10 +69,11 @@ contract ZetaConnectorBase is Pausable { } // update the TSS Address in case of Zeta blockchain validator nodes churn - function updateTssAddress(address _tssAddress) external onlyTssUpdater { - require(_tssAddress != address(0), "ZetaConnector: invalid tssAddress"); + function updateTssAddress(address tssAddress_) external onlyTssUpdater { + require(tssAddress_ != address(0), "ZetaConnector: invalid tssAddress"); - tssAddress = _tssAddress; + tssAddress = tssAddress_; + emit TSSAddressUpdated(msg.sender, tssAddress_); } // Change the ownership of tssAddressUpdater to the Zeta blockchain TSS nodes. diff --git a/packages/protocol-contracts/contracts/ZetaConnector.eth.sol b/packages/protocol-contracts/contracts/ZetaConnector.eth.sol index 49c756e5..08dae157 100644 --- a/packages/protocol-contracts/contracts/ZetaConnector.eth.sol +++ b/packages/protocol-contracts/contracts/ZetaConnector.eth.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -pragma solidity 0.8.9; +pragma solidity 0.8.7; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; @@ -8,18 +8,18 @@ import "./ZetaInterfaces.sol"; contract ZetaConnectorEth is ZetaConnectorBase { constructor( - address _zetaTokenAddress, - address _tssAddress, - address _tssAddressUpdater - ) ZetaConnectorBase(_zetaTokenAddress, _tssAddress, _tssAddressUpdater) {} + address zetaTokenAddress_, + address tssAddress_, + address tssAddressUpdater_ + ) ZetaConnectorBase(zetaTokenAddress_, tssAddress_, tssAddressUpdater_) {} - function getLockedAmount() public view returns (uint256) { + function getLockedAmount() external view returns (uint256) { return IERC20(zetaToken).balanceOf(address(this)); } function send(ZetaInterfaces.SendInput calldata input) external override whenNotPaused { bool success = IERC20(zetaToken).transferFrom(msg.sender, address(this), input.zetaAmount); - require(success == true, "ZetaConnector: error transferring Zeta"); + require(success, "ZetaConnector: error transferring Zeta"); emit ZetaSent( msg.sender, @@ -41,7 +41,7 @@ contract ZetaConnectorEth is ZetaConnectorBase { bytes32 internalSendHash ) external override whenNotPaused onlyTssAddress { bool success = IERC20(zetaToken).transfer(destinationAddress, zetaAmount); - require(success == true, "ZetaConnector: error transferring Zeta"); + require(success, "ZetaConnector: error transferring Zeta"); if (message.length > 0) { ZetaReceiver(destinationAddress).onZetaMessage( @@ -69,7 +69,7 @@ contract ZetaConnectorEth is ZetaConnectorBase { bytes32 internalSendHash ) external override whenNotPaused onlyTssAddress { bool success = IERC20(zetaToken).transfer(originSenderAddress, zetaAmount); - require(success == true, "ZetaConnector: error transferring Zeta"); + require(success, "ZetaConnector: error transferring Zeta"); if (message.length > 0) { ZetaReceiver(originSenderAddress).onZetaRevert( diff --git a/packages/protocol-contracts/contracts/ZetaConnector.non-eth.sol b/packages/protocol-contracts/contracts/ZetaConnector.non-eth.sol index 8ac5eb4f..554a5a4f 100644 --- a/packages/protocol-contracts/contracts/ZetaConnector.non-eth.sol +++ b/packages/protocol-contracts/contracts/ZetaConnector.non-eth.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -pragma solidity 0.8.9; +pragma solidity 0.8.7; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; @@ -18,12 +18,12 @@ interface ZetaToken is IERC20 { contract ZetaConnectorNonEth is ZetaConnectorBase { constructor( - address _zetaTokenAddress, - address _tssAddress, - address _tssAddressUpdater - ) ZetaConnectorBase(_zetaTokenAddress, _tssAddress, _tssAddressUpdater) {} + address zetaTokenAddress_, + address tssAddress_, + address tssAddressUpdater_ + ) ZetaConnectorBase(zetaTokenAddress_, tssAddress_, tssAddressUpdater_) {} - function getLockedAmount() public view returns (uint256) { + function getLockedAmount() external view returns (uint256) { return ZetaToken(zetaToken).balanceOf(address(this)); } diff --git a/packages/protocol-contracts/contracts/ZetaConnectorErrors.sol b/packages/protocol-contracts/contracts/ZetaConnectorErrors.sol new file mode 100644 index 00000000..978c978d --- /dev/null +++ b/packages/protocol-contracts/contracts/ZetaConnectorErrors.sol @@ -0,0 +1,6 @@ +// SPDX-License-Identifier: MIT +pragma solidity 0.8.7; + +interface ZetaConnectorErrors { + error AddressCantBeZero(); +} diff --git a/packages/protocol-contracts/contracts/ZetaEth.sol b/packages/protocol-contracts/contracts/ZetaEth.sol index fcd52c13..cf85c03e 100644 --- a/packages/protocol-contracts/contracts/ZetaEth.sol +++ b/packages/protocol-contracts/contracts/ZetaEth.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -pragma solidity 0.8.9; +pragma solidity 0.8.7; import "@openzeppelin/contracts/token/ERC20/ERC20.sol"; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; diff --git a/packages/protocol-contracts/contracts/ZetaInteractor.sol b/packages/protocol-contracts/contracts/ZetaInteractor.sol index 85e53af0..a95b152e 100644 --- a/packages/protocol-contracts/contracts/ZetaInteractor.sol +++ b/packages/protocol-contracts/contracts/ZetaInteractor.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -pragma solidity 0.8.9; +pragma solidity 0.8.7; import "@openzeppelin/contracts/access/Ownable.sol"; @@ -42,6 +42,7 @@ abstract contract ZetaInteractor is Ownable, ZetaInteractorErrors { if (msg.sender != address(connector)) revert InvalidCaller(msg.sender); } + /// @dev: useful for contracts that inherit from this one function isValidChainId(uint256 chainId) internal view returns (bool) { return (keccak256(interactorsByChainId[chainId]) != keccak256(new bytes(0))); } diff --git a/packages/protocol-contracts/contracts/ZetaInteractorErrors.sol b/packages/protocol-contracts/contracts/ZetaInteractorErrors.sol index c8f92f4f..ee14ef8b 100644 --- a/packages/protocol-contracts/contracts/ZetaInteractorErrors.sol +++ b/packages/protocol-contracts/contracts/ZetaInteractorErrors.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -pragma solidity 0.8.9; +pragma solidity 0.8.7; interface ZetaInteractorErrors { error InvalidDestinationChainId(); diff --git a/packages/protocol-contracts/contracts/ZetaInterfaces.sol b/packages/protocol-contracts/contracts/ZetaInterfaces.sol index 8dfa35b9..d6cca097 100644 --- a/packages/protocol-contracts/contracts/ZetaInterfaces.sol +++ b/packages/protocol-contracts/contracts/ZetaInterfaces.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -pragma solidity 0.8.9; +pragma solidity 0.8.7; interface ZetaInterfaces { /** diff --git a/packages/protocol-contracts/contracts/ZetaNonEth.sol b/packages/protocol-contracts/contracts/ZetaNonEth.sol index b9116db2..53eae8c3 100644 --- a/packages/protocol-contracts/contracts/ZetaNonEth.sol +++ b/packages/protocol-contracts/contracts/ZetaNonEth.sol @@ -1,10 +1,13 @@ /* solhint-disable var-name-mixedcase */ // SPDX-License-Identifier: MIT -pragma solidity 0.8.9; +pragma solidity 0.8.7; import "@openzeppelin/contracts/token/ERC20/extensions/ERC20Burnable.sol"; -contract ZetaNonEth is ERC20Burnable { +import "./ZetaNonEthErrors.sol"; + + +contract ZetaNonEth is ERC20Burnable, ZetaNonEthErrors { /** * @dev Collectively hold by Zeta blockchain validators */ @@ -22,17 +25,19 @@ contract ZetaNonEth is ERC20Burnable { constructor( uint256 initialSupply, - address _TSSAddress, - address _TSSAddressUpdater + address TSSAddress_, + address TSSAddressUpdater_ ) ERC20("Zeta", "ZETA") { + if (TSSAddress_ == address(0) || TSSAddressUpdater_ == address(0)) revert AddressCantBeZero(); _mint(msg.sender, initialSupply * (10**uint256(decimals()))); - TSSAddress = _TSSAddress; - TSSAddressUpdater = _TSSAddressUpdater; + TSSAddress = TSSAddress_; + TSSAddressUpdater = TSSAddressUpdater_; } function updateTSSAndConnectorAddresses(address _tss, address _connectorAddress) external { - require(msg.sender == TSSAddressUpdater, "ZetaNonEth: sender is not TSSAddressUpdater"); + if (msg.sender != TSSAddressUpdater) revert InvalidCaller(TSSAddressUpdater, msg.sender); + if (_tss == address(0) || _connectorAddress == address(0)) revert AddressCantBeZero(); TSSAddress = _tss; connectorAddress = _connectorAddress; @@ -42,8 +47,8 @@ contract ZetaNonEth is ERC20Burnable { * @dev Sets TSSAddressUpdater to be TSSAddress */ function renounceTSSAddressUpdater() external { - require(msg.sender == TSSAddressUpdater, "ZetaNonEth: sender is not TSSAddressUpdater"); - require(TSSAddress != address(0), "ZetaNonEth: Invalid TSSAddress"); + if (msg.sender != TSSAddressUpdater) revert InvalidCaller(TSSAddressUpdater, msg.sender); + if (TSSAddress == address(0)) revert AddressCantBeZero(); TSSAddressUpdater = TSSAddress; } @@ -56,10 +61,7 @@ contract ZetaNonEth is ERC20Burnable { /** * @dev Only Connector or TSS can mint since minting requires burning the equivalent in another chain */ - require( - msg.sender == TSSAddress || msg.sender == connectorAddress, - "ZetaNonEth: only TSSAddress or connectorAddress can mint" - ); + if (msg.sender != TSSAddress && msg.sender != connectorAddress) revert InvalidMinter(msg.sender); _mint(mintee, value); diff --git a/packages/protocol-contracts/contracts/ZetaNonEthErrors.sol b/packages/protocol-contracts/contracts/ZetaNonEthErrors.sol new file mode 100644 index 00000000..5585acba --- /dev/null +++ b/packages/protocol-contracts/contracts/ZetaNonEthErrors.sol @@ -0,0 +1,8 @@ +// SPDX-License-Identifier: MIT +pragma solidity 0.8.7; + +interface ZetaNonEthErrors { + error AddressCantBeZero(); + error InvalidCaller(address tss, address caller); + error InvalidMinter(address caller); +} diff --git a/packages/protocol-contracts/contracts/ZetaReceiver.sol b/packages/protocol-contracts/contracts/ZetaReceiver.sol index c3d75e4b..f034ee2e 100644 --- a/packages/protocol-contracts/contracts/ZetaReceiver.sol +++ b/packages/protocol-contracts/contracts/ZetaReceiver.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -pragma solidity 0.8.9; +pragma solidity 0.8.7; import "./ZetaInterfaces.sol"; diff --git a/packages/protocol-contracts/contracts/testing/ZetaInteractorMock.sol b/packages/protocol-contracts/contracts/testing/ZetaInteractorMock.sol index 1dd1cd1c..ee870a2f 100644 --- a/packages/protocol-contracts/contracts/testing/ZetaInteractorMock.sol +++ b/packages/protocol-contracts/contracts/testing/ZetaInteractorMock.sol @@ -1,12 +1,12 @@ // SPDX-License-Identifier: MIT -pragma solidity 0.8.9; +pragma solidity 0.8.7; import "../ZetaInteractor.sol"; contract ZetaInteractorMock is ZetaInteractor { constructor(address zetaConnectorAddress) ZetaInteractor(zetaConnectorAddress) {} - function onZetaMessage(ZetaInterfaces.ZetaMessage calldata zetaMessage) public isValidMessageCall(zetaMessage) {} + function onZetaMessage(ZetaInterfaces.ZetaMessage calldata zetaMessage) external isValidMessageCall(zetaMessage) {} - function onZetaRevert(ZetaInterfaces.ZetaRevert calldata zetaRevert) public isValidRevertCall(zetaRevert) {} + function onZetaRevert(ZetaInterfaces.ZetaRevert calldata zetaRevert) external isValidRevertCall(zetaRevert) {} } diff --git a/packages/protocol-contracts/contracts/testing/ZetaReceiverMock.sol b/packages/protocol-contracts/contracts/testing/ZetaReceiverMock.sol index 849eeb06..2cb1ffcb 100644 --- a/packages/protocol-contracts/contracts/testing/ZetaReceiverMock.sol +++ b/packages/protocol-contracts/contracts/testing/ZetaReceiverMock.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -pragma solidity 0.8.9; +pragma solidity 0.8.7; import "../ZetaReceiver.sol"; diff --git a/packages/protocol-contracts/hardhat.config.ts b/packages/protocol-contracts/hardhat.config.ts index db56ea4f..e508073d 100644 --- a/packages/protocol-contracts/hardhat.config.ts +++ b/packages/protocol-contracts/hardhat.config.ts @@ -13,7 +13,7 @@ const PRIVATE_KEYS = process.env.PRIVATE_KEY !== undefined ? [`0x${process.env.PRIVATE_KEY}`, `0x${process.env.TSS_PRIVATE_KEY}`] : []; const config: HardhatUserConfig = { - solidity: "0.8.9", + solidity: "0.8.7", etherscan: { ...getHardhatConfigScanners(), }, diff --git a/packages/protocol-contracts/test/ZetaConnector.spec.ts b/packages/protocol-contracts/test/ZetaConnector.spec.ts index ff42ec88..61057868 100644 --- a/packages/protocol-contracts/test/ZetaConnector.spec.ts +++ b/packages/protocol-contracts/test/ZetaConnector.spec.ts @@ -538,7 +538,7 @@ describe("ZetaConnector tests", () => { new ethers.utils.AbiCoder().encode(["string"], ["hello"]), "0x0000000000000000000000000000000000000000000000000000000000000000" ) - ).to.revertedWith("ZetaNonEth: only TSSAddress or connectorAddress can mint"); + ).to.revertedWith(`InvalidMinter("0xF6a8aD553b265405526030c2102fda2bDcdDC177")`); }); it("Should mint on the receiver address", async () => { From 912f7dd429625884ab75090e9c29e3831ae37b3e Mon Sep 17 00:00:00 2001 From: Lucas Date: Thu, 16 Jun 2022 10:44:27 -0300 Subject: [PATCH 002/115] Update README.md (#8) --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 9b2aac04..c0067ec4 100644 --- a/README.md +++ b/README.md @@ -64,4 +64,4 @@ yarn lint:fix ## Contributing -We welcome (and appreciate) everyone's contributions, if you wanna contribute, read [CONTRIBUTING.md](CONTRIBUTING.md) for next steps. +We welcome (and appreciate) everyone's contributions. If you wanna contribute, read [CONTRIBUTING.md](CONTRIBUTING.md) for next steps. From d4b9db999a76bb9eb447d10c8f89d35152d68224 Mon Sep 17 00:00:00 2001 From: Lucas Date: Thu, 16 Jun 2022 11:29:05 -0300 Subject: [PATCH 003/115] Update protocol contracts (#9) * Missing tests * Protocol contracts improvements * All tests passing * Cleanup * Cleanup * Make it more consistent * Comply with Slither conventions --- .../cross-chain-counter/CrossChainCounter.sol | 7 +-- .../test/CounterZetaConnectorMock.sol | 4 +- .../cross-chain-message/CrossChainMessage.sol | 3 +- .../CrossChainWarriors.sol | 7 +-- .../CrossChainWarriorsZetaConnectorMock.sol | 4 +- .../multi-chain-swap/MultiChainSwap.base.sol | 15 +++-- .../multi-chain-swap/MultiChainSwap.bsc.sol | 3 +- .../multi-chain-swap/MultiChainSwap.eth.sol | 2 +- .../test/MultiChainSwapZetaConnector.sol | 4 +- .../multi-chain-value/MultiChainValue.sol | 2 +- .../test/ZetaConnectorMock.sol | 4 +- .../contracts/ZetaConnector.base.sol | 35 ++++++------ .../contracts/ZetaConnector.eth.sol | 11 ++-- .../contracts/ZetaConnector.non-eth.sol | 2 +- .../contracts/ZetaConnectorErrors.sol | 6 -- .../contracts/ZetaInteractor.sol | 8 ++- .../contracts/ZetaNonEth.sol | 55 +++++++++---------- .../contracts/ZetaNonEthErrors.sol | 8 --- .../contracts/ZetaReceiver.sol | 17 ------ .../contracts/interfaces/ConnectorErrors.sol | 12 ++++ .../contracts/interfaces/ZetaErrors.sol | 14 +++++ .../{ => interfaces}/ZetaInteractorErrors.sol | 0 .../{ => interfaces}/ZetaInterfaces.sol | 19 ++++++- .../contracts/testing/ZetaReceiverMock.sol | 10 ++-- .../scripts/set-zeta-token-addresses.ts | 2 +- .../test/ZetaConnector.spec.ts | 25 +++++---- 26 files changed, 149 insertions(+), 130 deletions(-) delete mode 100644 packages/protocol-contracts/contracts/ZetaConnectorErrors.sol delete mode 100644 packages/protocol-contracts/contracts/ZetaNonEthErrors.sol delete mode 100644 packages/protocol-contracts/contracts/ZetaReceiver.sol create mode 100644 packages/protocol-contracts/contracts/interfaces/ConnectorErrors.sol create mode 100644 packages/protocol-contracts/contracts/interfaces/ZetaErrors.sol rename packages/protocol-contracts/contracts/{ => interfaces}/ZetaInteractorErrors.sol (100%) rename packages/protocol-contracts/contracts/{ => interfaces}/ZetaInterfaces.sol (70%) diff --git a/packages/example-contracts/contracts/cross-chain-counter/CrossChainCounter.sol b/packages/example-contracts/contracts/cross-chain-counter/CrossChainCounter.sol index 0d56b44b..d11582a1 100644 --- a/packages/example-contracts/contracts/cross-chain-counter/CrossChainCounter.sol +++ b/packages/example-contracts/contracts/cross-chain-counter/CrossChainCounter.sol @@ -2,8 +2,7 @@ pragma solidity 0.8.7; import "@openzeppelin/contracts/access/Ownable.sol"; -import "@zetachain/protocol-contracts/contracts/ZetaInterfaces.sol"; -import "@zetachain/protocol-contracts/contracts/ZetaReceiver.sol"; +import "@zetachain/protocol-contracts/contracts/interfaces/ZetaInterfaces.sol"; contract CrossChainCounter is Ownable, ZetaReceiver { bytes32 public constant CROSS_CHAIN_INCREMENT_MESSAGE = keccak256("CROSS_CHAIN_INCREMENT"); @@ -48,7 +47,7 @@ contract CrossChainCounter is Ownable, ZetaReceiver { ); } - function onZetaMessage(ZetaInterfaces.ZetaMessage calldata zetaMessage) external { + function onZetaMessage(ZetaInterfaces.ZetaMessage calldata zetaMessage) external override { require(msg.sender == connectorAddress, "This function can only be called by the Connector contract"); require( keccak256(zetaMessage.originSenderAddress) == keccak256(_crossChainAddress), @@ -63,7 +62,7 @@ contract CrossChainCounter is Ownable, ZetaReceiver { counter[messageFrom]++; } - function onZetaRevert(ZetaInterfaces.ZetaRevert calldata zetaRevert) external { + function onZetaRevert(ZetaInterfaces.ZetaRevert calldata zetaRevert) external override { require(msg.sender == connectorAddress, "This function can only be called by the Connector contract"); require(zetaRevert.originSenderAddress == address(this), "Invalid originSenderAddress"); require(zetaRevert.originChainId == currentChainId, "Invalid originChainId"); diff --git a/packages/example-contracts/contracts/cross-chain-counter/test/CounterZetaConnectorMock.sol b/packages/example-contracts/contracts/cross-chain-counter/test/CounterZetaConnectorMock.sol index 57862942..224ff443 100644 --- a/packages/example-contracts/contracts/cross-chain-counter/test/CounterZetaConnectorMock.sol +++ b/packages/example-contracts/contracts/cross-chain-counter/test/CounterZetaConnectorMock.sol @@ -1,7 +1,7 @@ // SPDX-License-Identifier: MIT pragma solidity 0.8.7; -import "@zetachain/protocol-contracts/contracts/ZetaInterfaces.sol"; +import "@zetachain/protocol-contracts/contracts/interfaces/ZetaInterfaces.sol"; import "../CrossChainCounter.sol"; @@ -47,7 +47,7 @@ contract CounterZetaConnectorMock is ZetaConnector { ); } - function send(ZetaInterfaces.SendInput calldata sendInput) external { + function send(ZetaInterfaces.SendInput calldata sendInput) external override { uint256 originChainId = sendInput.destinationChainId == 2 ? 1 : 2; address dest = address(uint160(bytes20(sendInput.destinationAddress))); diff --git a/packages/example-contracts/contracts/cross-chain-message/CrossChainMessage.sol b/packages/example-contracts/contracts/cross-chain-message/CrossChainMessage.sol index 6851c8e6..2e9f2b84 100644 --- a/packages/example-contracts/contracts/cross-chain-message/CrossChainMessage.sol +++ b/packages/example-contracts/contracts/cross-chain-message/CrossChainMessage.sol @@ -2,8 +2,7 @@ pragma solidity 0.8.7; import "@openzeppelin/contracts/access/Ownable.sol"; -import "@zetachain/protocol-contracts/contracts/ZetaInterfaces.sol"; -import "@zetachain/protocol-contracts/contracts/ZetaReceiver.sol"; +import "@zetachain/protocol-contracts/contracts/interfaces/ZetaInterfaces.sol"; /** * @dev A simple contract able to send and receive Hello World messages from other chains. diff --git a/packages/example-contracts/contracts/cross-chain-warriors/CrossChainWarriors.sol b/packages/example-contracts/contracts/cross-chain-warriors/CrossChainWarriors.sol index 235bd2f1..121a1a15 100644 --- a/packages/example-contracts/contracts/cross-chain-warriors/CrossChainWarriors.sol +++ b/packages/example-contracts/contracts/cross-chain-warriors/CrossChainWarriors.sol @@ -5,8 +5,7 @@ import "@openzeppelin/contracts/interfaces/IERC20.sol"; import "@openzeppelin/contracts/token/ERC721/ERC721.sol"; import "@openzeppelin/contracts/utils/Counters.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; -import "@zetachain/protocol-contracts/contracts/ZetaInterfaces.sol"; -import "@zetachain/protocol-contracts/contracts/ZetaReceiver.sol"; +import "@zetachain/protocol-contracts/contracts/interfaces/ZetaInterfaces.sol"; contract CrossChainWarriors is ERC721("CrossChainWarriors", "CCWAR"), Ownable, ZetaReceiver { using Counters for Counters.Counter; @@ -118,7 +117,7 @@ contract CrossChainWarriors is ERC721("CrossChainWarriors", "CCWAR"), Ownable, Z ); } - function onZetaMessage(ZetaInterfaces.ZetaMessage calldata zetaMessage) external { + function onZetaMessage(ZetaInterfaces.ZetaMessage calldata zetaMessage) external override { require(msg.sender == connectorAddress, "This function can only be called by the Connector contract"); require( keccak256(zetaMessage.originSenderAddress) == keccak256(_crossChainAddress), @@ -141,7 +140,7 @@ contract CrossChainWarriors is ERC721("CrossChainWarriors", "CCWAR"), Ownable, Z _mintId(to, tokenId); } - function onZetaRevert(ZetaInterfaces.ZetaRevert calldata zetaRevert) external { + function onZetaRevert(ZetaInterfaces.ZetaRevert calldata zetaRevert) external override { require(msg.sender == connectorAddress, "This function can only be called by the Connector contract"); require(zetaRevert.originSenderAddress == address(this), "Invalid originSenderAddress"); require(zetaRevert.originChainId == _currentChainId, "Invalid originChainId"); diff --git a/packages/example-contracts/contracts/cross-chain-warriors/test/CrossChainWarriorsZetaConnectorMock.sol b/packages/example-contracts/contracts/cross-chain-warriors/test/CrossChainWarriorsZetaConnectorMock.sol index dbf48099..e163ebfd 100644 --- a/packages/example-contracts/contracts/cross-chain-warriors/test/CrossChainWarriorsZetaConnectorMock.sol +++ b/packages/example-contracts/contracts/cross-chain-warriors/test/CrossChainWarriorsZetaConnectorMock.sol @@ -1,7 +1,7 @@ // SPDX-License-Identifier: MIT pragma solidity 0.8.7; -import "@zetachain/protocol-contracts/contracts/ZetaInterfaces.sol"; +import "@zetachain/protocol-contracts/contracts/interfaces/ZetaInterfaces.sol"; import "../CrossChainWarriors.sol"; @@ -47,7 +47,7 @@ contract CrossChainWarriorsZetaConnectorMock is ZetaConnector { ); } - function send(ZetaInterfaces.SendInput calldata sendInput) external { + function send(ZetaInterfaces.SendInput calldata sendInput) external override { uint256 originChainId = sendInput.destinationChainId == 2 ? 1 : 2; address dest = address(uint160(bytes20(sendInput.destinationAddress))); diff --git a/packages/example-contracts/contracts/multi-chain-swap/MultiChainSwap.base.sol b/packages/example-contracts/contracts/multi-chain-swap/MultiChainSwap.base.sol index 5f757a63..f13a6a3b 100644 --- a/packages/example-contracts/contracts/multi-chain-swap/MultiChainSwap.base.sol +++ b/packages/example-contracts/contracts/multi-chain-swap/MultiChainSwap.base.sol @@ -4,8 +4,7 @@ pragma solidity 0.8.7; import "@openzeppelin/contracts/interfaces/IERC20.sol"; import "@uniswap/v2-periphery/contracts/interfaces/IUniswapV2Router02.sol"; import "@zetachain/protocol-contracts/contracts/ZetaInteractor.sol"; -import "@zetachain/protocol-contracts/contracts/ZetaInterfaces.sol"; -import "@zetachain/protocol-contracts/contracts/ZetaReceiver.sol"; +import "@zetachain/protocol-contracts/contracts/interfaces/ZetaInterfaces.sol"; import "./MultiChainSwapErrors.sol"; @@ -219,7 +218,11 @@ contract MultiChainSwapBase is ZetaInteractor, ZetaReceiver, MultiChainSwapError ); } - function onZetaMessage(ZetaInterfaces.ZetaMessage calldata zetaMessage) external isValidMessageCall(zetaMessage) { + function onZetaMessage(ZetaInterfaces.ZetaMessage calldata zetaMessage) + external + override + isValidMessageCall(zetaMessage) + { ( bytes32 messageType, address originSender, @@ -299,7 +302,11 @@ contract MultiChainSwapBase is ZetaInteractor, ZetaReceiver, MultiChainSwapError ); } - function onZetaRevert(ZetaInterfaces.ZetaRevert calldata zetaRevert) external isValidRevertCall(zetaRevert) { + function onZetaRevert(ZetaInterfaces.ZetaRevert calldata zetaRevert) + external + override + isValidRevertCall(zetaRevert) + { /** * @dev: If something goes wrong we must swap to the original token */ diff --git a/packages/example-contracts/contracts/multi-chain-swap/MultiChainSwap.bsc.sol b/packages/example-contracts/contracts/multi-chain-swap/MultiChainSwap.bsc.sol index cca4006e..43729a0b 100644 --- a/packages/example-contracts/contracts/multi-chain-swap/MultiChainSwap.bsc.sol +++ b/packages/example-contracts/contracts/multi-chain-swap/MultiChainSwap.bsc.sol @@ -1,8 +1,7 @@ // SPDX-License-Identifier: MIT pragma solidity 0.8.7; -import "@zetachain/protocol-contracts/contracts/ZetaInterfaces.sol"; -import "@zetachain/protocol-contracts/contracts/ZetaReceiver.sol"; +import "@zetachain/protocol-contracts/contracts/interfaces/ZetaInterfaces.sol"; abstract contract MultiChainSwapBsc is ZetaReceiver { address public connectorAddress; diff --git a/packages/example-contracts/contracts/multi-chain-swap/MultiChainSwap.eth.sol b/packages/example-contracts/contracts/multi-chain-swap/MultiChainSwap.eth.sol index e39c405e..64e8e95a 100644 --- a/packages/example-contracts/contracts/multi-chain-swap/MultiChainSwap.eth.sol +++ b/packages/example-contracts/contracts/multi-chain-swap/MultiChainSwap.eth.sol @@ -1,7 +1,7 @@ // SPDX-License-Identifier: MIT pragma solidity 0.8.7; -import "@zetachain/protocol-contracts/contracts/ZetaInterfaces.sol"; +import "@zetachain/protocol-contracts/contracts/interfaces/ZetaInterfaces.sol"; import "./MultiChainSwap.base.sol"; diff --git a/packages/example-contracts/contracts/multi-chain-swap/test/MultiChainSwapZetaConnector.sol b/packages/example-contracts/contracts/multi-chain-swap/test/MultiChainSwapZetaConnector.sol index 7b7c9333..bcc6a97f 100644 --- a/packages/example-contracts/contracts/multi-chain-swap/test/MultiChainSwapZetaConnector.sol +++ b/packages/example-contracts/contracts/multi-chain-swap/test/MultiChainSwapZetaConnector.sol @@ -1,7 +1,7 @@ // SPDX-License-Identifier: MIT pragma solidity 0.8.7; -import "@zetachain/protocol-contracts/contracts/ZetaInterfaces.sol"; +import "@zetachain/protocol-contracts/contracts/interfaces/ZetaInterfaces.sol"; import "../MultiChainSwap.base.sol"; @@ -53,7 +53,7 @@ contract MultiChainSwapZetaConnector is ZetaConnector { ); } - function send(ZetaInterfaces.SendInput calldata sendInput) external { + function send(ZetaInterfaces.SendInput calldata sendInput) external override { uint256 originChainId = sendInput.destinationChainId == 2 ? 1 : 2; address dest = address(uint160(bytes20(sendInput.destinationAddress))); diff --git a/packages/example-contracts/contracts/multi-chain-value/MultiChainValue.sol b/packages/example-contracts/contracts/multi-chain-value/MultiChainValue.sol index 81bf78da..5509d9c0 100644 --- a/packages/example-contracts/contracts/multi-chain-value/MultiChainValue.sol +++ b/packages/example-contracts/contracts/multi-chain-value/MultiChainValue.sol @@ -3,7 +3,7 @@ pragma solidity 0.8.7; import "@openzeppelin/contracts/access/Ownable.sol"; import "@zetachain/protocol-contracts/contracts/ZetaEth.sol"; -import "@zetachain/protocol-contracts/contracts/ZetaInterfaces.sol"; +import "@zetachain/protocol-contracts/contracts/interfaces/ZetaInterfaces.sol"; contract MultiChainValue is Ownable { address public zetaConnector; diff --git a/packages/example-contracts/contracts/multi-chain-value/test/ZetaConnectorMock.sol b/packages/example-contracts/contracts/multi-chain-value/test/ZetaConnectorMock.sol index 83546848..5debe3a7 100644 --- a/packages/example-contracts/contracts/multi-chain-value/test/ZetaConnectorMock.sol +++ b/packages/example-contracts/contracts/multi-chain-value/test/ZetaConnectorMock.sol @@ -1,8 +1,8 @@ // SPDX-License-Identifier: MIT pragma solidity 0.8.7; -import "@zetachain/protocol-contracts/contracts/ZetaInterfaces.sol"; +import "@zetachain/protocol-contracts/contracts/interfaces/ZetaInterfaces.sol"; contract ZetaConnectorMockValue is ZetaConnector { - function send(ZetaInterfaces.SendInput calldata input) external {} + function send(ZetaInterfaces.SendInput calldata input) external override {} } diff --git a/packages/protocol-contracts/contracts/ZetaConnector.base.sol b/packages/protocol-contracts/contracts/ZetaConnector.base.sol index 6c1d8161..14cd43da 100644 --- a/packages/protocol-contracts/contracts/ZetaConnector.base.sol +++ b/packages/protocol-contracts/contracts/ZetaConnector.base.sol @@ -4,17 +4,17 @@ pragma solidity 0.8.7; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import "@openzeppelin/contracts/security/Pausable.sol"; -import "./ZetaReceiver.sol"; -import "./ZetaInterfaces.sol"; -import "./ZetaConnectorErrors.sol"; +import "./interfaces/ConnectorErrors.sol"; +import "./interfaces/ZetaInterfaces.sol"; -contract ZetaConnectorBase is Pausable, ZetaConnectorErrors { +contract ZetaConnectorBase is ConnectorErrors, Pausable { address public zetaToken; /** - * @dev Collectively hold by Zeta blockchain validators. + * @dev Collectively held by Zeta blockchain validators. */ address public tssAddress; + address public tssAddressUpdater; event ZetaSent( @@ -47,39 +47,42 @@ contract ZetaConnectorBase is Pausable, ZetaConnectorErrors { event TSSAddressUpdated(address originSenderAddress, address newTSSAddress); constructor( - address zetaTokenAddress_, + address zetaToken_, address tssAddress_, address tssAddressUpdater_ ) { - if (zetaTokenAddress_ == address(0) || tssAddress_ == address(0) || tssAddressUpdater_ == address(0)) - revert AddressCantBeZero(); - zetaToken = zetaTokenAddress_; + if (zetaToken_ == address(0) || tssAddress_ == address(0) || tssAddressUpdater_ == address(0)) { + revert InvalidAddress(); + } + + zetaToken = zetaToken_; tssAddress = tssAddress_; tssAddressUpdater = tssAddressUpdater_; } modifier onlyTssAddress() { - require(msg.sender == tssAddress, "ZetaConnector: only TSS address can call this function"); + if (msg.sender != tssAddress) revert CallerIsNotTss(msg.sender); _; } modifier onlyTssUpdater() { - require(msg.sender == tssAddressUpdater, "ZetaConnector: only TSS updater can call this function"); + if (msg.sender != tssAddressUpdater) revert CallerIsNotTssUpdater(msg.sender); _; } - // update the TSS Address in case of Zeta blockchain validator nodes churn function updateTssAddress(address tssAddress_) external onlyTssUpdater { - require(tssAddress_ != address(0), "ZetaConnector: invalid tssAddress"); + if (tssAddress_ == address(0)) revert InvalidAddress(); tssAddress = tssAddress_; + emit TSSAddressUpdated(msg.sender, tssAddress_); } - // Change the ownership of tssAddressUpdater to the Zeta blockchain TSS nodes. - // Effectively, only Zeta blockchain validators collectively can update TSS Address afterwards. + /** + * @dev Changes the ownership of tssAddressUpdater to be the one held by the Zeta blockchain TSS nodes. + */ function renounceTssAddressUpdater() external onlyTssUpdater { - require(tssAddress != address(0), "ZetaConnector: invalid tssAddress"); + if (tssAddress == address(0)) revert InvalidAddress(); tssAddressUpdater = tssAddress; } diff --git a/packages/protocol-contracts/contracts/ZetaConnector.eth.sol b/packages/protocol-contracts/contracts/ZetaConnector.eth.sol index 08dae157..389da589 100644 --- a/packages/protocol-contracts/contracts/ZetaConnector.eth.sol +++ b/packages/protocol-contracts/contracts/ZetaConnector.eth.sol @@ -3,15 +3,16 @@ pragma solidity 0.8.7; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; +import "./interfaces/ConnectorErrors.sol"; import "./ZetaConnector.base.sol"; -import "./ZetaInterfaces.sol"; +import "./interfaces/ZetaInterfaces.sol"; contract ZetaConnectorEth is ZetaConnectorBase { constructor( - address zetaTokenAddress_, + address zetaToken_, address tssAddress_, address tssAddressUpdater_ - ) ZetaConnectorBase(zetaTokenAddress_, tssAddress_, tssAddressUpdater_) {} + ) ZetaConnectorBase(zetaToken_, tssAddress_, tssAddressUpdater_) {} function getLockedAmount() external view returns (uint256) { return IERC20(zetaToken).balanceOf(address(this)); @@ -19,7 +20,7 @@ contract ZetaConnectorEth is ZetaConnectorBase { function send(ZetaInterfaces.SendInput calldata input) external override whenNotPaused { bool success = IERC20(zetaToken).transferFrom(msg.sender, address(this), input.zetaAmount); - require(success, "ZetaConnector: error transferring Zeta"); + if (!success) revert ZetaTransferError(); emit ZetaSent( msg.sender, @@ -41,7 +42,7 @@ contract ZetaConnectorEth is ZetaConnectorBase { bytes32 internalSendHash ) external override whenNotPaused onlyTssAddress { bool success = IERC20(zetaToken).transfer(destinationAddress, zetaAmount); - require(success, "ZetaConnector: error transferring Zeta"); + if (!success) revert ZetaTransferError(); if (message.length > 0) { ZetaReceiver(destinationAddress).onZetaMessage( diff --git a/packages/protocol-contracts/contracts/ZetaConnector.non-eth.sol b/packages/protocol-contracts/contracts/ZetaConnector.non-eth.sol index 554a5a4f..f7d45651 100644 --- a/packages/protocol-contracts/contracts/ZetaConnector.non-eth.sol +++ b/packages/protocol-contracts/contracts/ZetaConnector.non-eth.sol @@ -4,7 +4,7 @@ pragma solidity 0.8.7; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import "./ZetaConnector.base.sol"; -import "./ZetaInterfaces.sol"; +import "./interfaces/ZetaInterfaces.sol"; interface ZetaToken is IERC20 { function burnFrom(address account, uint256 amount) external; diff --git a/packages/protocol-contracts/contracts/ZetaConnectorErrors.sol b/packages/protocol-contracts/contracts/ZetaConnectorErrors.sol deleted file mode 100644 index 978c978d..00000000 --- a/packages/protocol-contracts/contracts/ZetaConnectorErrors.sol +++ /dev/null @@ -1,6 +0,0 @@ -// SPDX-License-Identifier: MIT -pragma solidity 0.8.7; - -interface ZetaConnectorErrors { - error AddressCantBeZero(); -} diff --git a/packages/protocol-contracts/contracts/ZetaInteractor.sol b/packages/protocol-contracts/contracts/ZetaInteractor.sol index a95b152e..bcd743f6 100644 --- a/packages/protocol-contracts/contracts/ZetaInteractor.sol +++ b/packages/protocol-contracts/contracts/ZetaInteractor.sol @@ -3,8 +3,8 @@ pragma solidity 0.8.7; import "@openzeppelin/contracts/access/Ownable.sol"; -import "./ZetaInterfaces.sol"; -import "./ZetaInteractorErrors.sol"; +import "./interfaces/ZetaInterfaces.sol"; +import "./interfaces/ZetaInteractorErrors.sol"; abstract contract ZetaInteractor is Ownable, ZetaInteractorErrors { uint256 internal immutable currentChainId; @@ -42,7 +42,9 @@ abstract contract ZetaInteractor is Ownable, ZetaInteractorErrors { if (msg.sender != address(connector)) revert InvalidCaller(msg.sender); } - /// @dev: useful for contracts that inherit from this one + /** + * @dev Useful for contracts that inherit from this one + */ function isValidChainId(uint256 chainId) internal view returns (bool) { return (keccak256(interactorsByChainId[chainId]) != keccak256(new bytes(0))); } diff --git a/packages/protocol-contracts/contracts/ZetaNonEth.sol b/packages/protocol-contracts/contracts/ZetaNonEth.sol index 53eae8c3..29966adc 100644 --- a/packages/protocol-contracts/contracts/ZetaNonEth.sol +++ b/packages/protocol-contracts/contracts/ZetaNonEth.sol @@ -1,56 +1,54 @@ -/* solhint-disable var-name-mixedcase */ // SPDX-License-Identifier: MIT pragma solidity 0.8.7; import "@openzeppelin/contracts/token/ERC20/extensions/ERC20Burnable.sol"; -import "./ZetaNonEthErrors.sol"; +import "./interfaces/ZetaErrors.sol"; - -contract ZetaNonEth is ERC20Burnable, ZetaNonEthErrors { +contract ZetaNonEth is ERC20Burnable, ZetaErrors { /** * @dev Collectively hold by Zeta blockchain validators */ - address public TSSAddress; + address public tssAddress; /** - * @dev Initially a multi-sig, eventually hold by Zeta blockchain validators (via renounceTSSAddressUpdater) + * @dev Initially a multi-sig, eventually hold by Zeta blockchain validators (via renounceTssAddressUpdater) */ - address public TSSAddressUpdater; + address public tssAddressUpdater; address public connectorAddress; - event MMinted(address indexed mintee, uint256 amount, bytes32 indexed internalSendHash); - event MBurnt(address indexed burnee, uint256 amount); + event Minted(address indexed mintee, uint256 amount, bytes32 indexed internalSendHash); + event Burnt(address indexed burnee, uint256 amount); constructor( uint256 initialSupply, - address TSSAddress_, - address TSSAddressUpdater_ + address tssAddress_, + address tssAddressUpdater_ ) ERC20("Zeta", "ZETA") { - if (TSSAddress_ == address(0) || TSSAddressUpdater_ == address(0)) revert AddressCantBeZero(); + if (tssAddress_ == address(0) || tssAddressUpdater_ == address(0)) revert InvalidAddress(); _mint(msg.sender, initialSupply * (10**uint256(decimals()))); - TSSAddress = TSSAddress_; - TSSAddressUpdater = TSSAddressUpdater_; + tssAddress = tssAddress_; + tssAddressUpdater = tssAddressUpdater_; } - function updateTSSAndConnectorAddresses(address _tss, address _connectorAddress) external { - if (msg.sender != TSSAddressUpdater) revert InvalidCaller(TSSAddressUpdater, msg.sender); - if (_tss == address(0) || _connectorAddress == address(0)) revert AddressCantBeZero(); + function updateTssAndConnectorAddresses(address newTssAddress, address newConnectorAddress) external { + if (msg.sender != tssAddressUpdater) revert CallerIsNotTssUpdater(msg.sender); + if (newTssAddress == address(0)) revert InvalidAddress(); - TSSAddress = _tss; - connectorAddress = _connectorAddress; + tssAddress = newTssAddress; + connectorAddress = newConnectorAddress; } /** - * @dev Sets TSSAddressUpdater to be TSSAddress + * @dev Sets tssAddressUpdater to be tssAddress */ - function renounceTSSAddressUpdater() external { - if (msg.sender != TSSAddressUpdater) revert InvalidCaller(TSSAddressUpdater, msg.sender); - if (TSSAddress == address(0)) revert AddressCantBeZero(); + function renounceTssAddressUpdater() external { + if (msg.sender != tssAddressUpdater) revert CallerIsNotTssUpdater(msg.sender); + if (tssAddress == address(0)) revert InvalidAddress(); - TSSAddressUpdater = TSSAddress; + tssAddressUpdater = tssAddress; } function mint( @@ -59,13 +57,14 @@ contract ZetaNonEth is ERC20Burnable, ZetaNonEthErrors { bytes32 internalSendHash ) external { /** - * @dev Only Connector or TSS can mint since minting requires burning the equivalent in another chain + * @dev Only Connector or TSS can mint. Minting requires burning the equivalent amount on another chain */ - if (msg.sender != TSSAddress && msg.sender != connectorAddress) revert InvalidMinter(msg.sender); + if (msg.sender != tssAddress && msg.sender != connectorAddress) { + revert CallerIsNotTssOrConnector(msg.sender); + } _mint(mintee, value); - emit MMinted(mintee, value, internalSendHash); + emit Minted(mintee, value, internalSendHash); } } -/* solhint-enable var-name-mixedcase */ diff --git a/packages/protocol-contracts/contracts/ZetaNonEthErrors.sol b/packages/protocol-contracts/contracts/ZetaNonEthErrors.sol deleted file mode 100644 index 5585acba..00000000 --- a/packages/protocol-contracts/contracts/ZetaNonEthErrors.sol +++ /dev/null @@ -1,8 +0,0 @@ -// SPDX-License-Identifier: MIT -pragma solidity 0.8.7; - -interface ZetaNonEthErrors { - error AddressCantBeZero(); - error InvalidCaller(address tss, address caller); - error InvalidMinter(address caller); -} diff --git a/packages/protocol-contracts/contracts/ZetaReceiver.sol b/packages/protocol-contracts/contracts/ZetaReceiver.sol deleted file mode 100644 index f034ee2e..00000000 --- a/packages/protocol-contracts/contracts/ZetaReceiver.sol +++ /dev/null @@ -1,17 +0,0 @@ -// SPDX-License-Identifier: MIT -pragma solidity 0.8.7; - -import "./ZetaInterfaces.sol"; - -interface ZetaReceiver { - /** - * @dev onZetaMessage will be called when a cross-chain message is delivered to your contract - */ - function onZetaMessage(ZetaInterfaces.ZetaMessage calldata zetaMessage) external; - - /** - * @dev onZetaRevert will be called when a cross-chain message reverts - * It's useful to rollback your contract's state - */ - function onZetaRevert(ZetaInterfaces.ZetaRevert calldata zetaRevert) external; -} diff --git a/packages/protocol-contracts/contracts/interfaces/ConnectorErrors.sol b/packages/protocol-contracts/contracts/interfaces/ConnectorErrors.sol new file mode 100644 index 00000000..5d5866a9 --- /dev/null +++ b/packages/protocol-contracts/contracts/interfaces/ConnectorErrors.sol @@ -0,0 +1,12 @@ +// SPDX-License-Identifier: MIT +pragma solidity 0.8.7; + +interface ConnectorErrors { + error CallerIsNotTss(address caller); + + error CallerIsNotTssUpdater(address caller); + + error InvalidAddress(); + + error ZetaTransferError(); +} diff --git a/packages/protocol-contracts/contracts/interfaces/ZetaErrors.sol b/packages/protocol-contracts/contracts/interfaces/ZetaErrors.sol new file mode 100644 index 00000000..c084d189 --- /dev/null +++ b/packages/protocol-contracts/contracts/interfaces/ZetaErrors.sol @@ -0,0 +1,14 @@ +// SPDX-License-Identifier: MIT +pragma solidity 0.8.7; + +interface ZetaErrors { + error CallerIsNotTss(address caller); + + error CallerIsNotTssOrConnector(address caller); + + error CallerIsNotTssUpdater(address caller); + + error InvalidAddress(); + + error ZetaTransferError(); +} diff --git a/packages/protocol-contracts/contracts/ZetaInteractorErrors.sol b/packages/protocol-contracts/contracts/interfaces/ZetaInteractorErrors.sol similarity index 100% rename from packages/protocol-contracts/contracts/ZetaInteractorErrors.sol rename to packages/protocol-contracts/contracts/interfaces/ZetaInteractorErrors.sol diff --git a/packages/protocol-contracts/contracts/ZetaInterfaces.sol b/packages/protocol-contracts/contracts/interfaces/ZetaInterfaces.sol similarity index 70% rename from packages/protocol-contracts/contracts/ZetaInterfaces.sol rename to packages/protocol-contracts/contracts/interfaces/ZetaInterfaces.sol index d6cca097..eab35bb3 100644 --- a/packages/protocol-contracts/contracts/ZetaInterfaces.sol +++ b/packages/protocol-contracts/contracts/interfaces/ZetaInterfaces.sol @@ -3,7 +3,7 @@ pragma solidity 0.8.7; interface ZetaInterfaces { /** - * @dev Use SendInput to interact with our Connector: connector.send(SendInput) + * @dev Use SendInput to interact with the Connector: connector.send(SendInput) */ struct SendInput { /// @dev Chain id of the destination chain. More about chain ids https://docs.zetachain.com/learn/glossary#chain-id @@ -21,7 +21,7 @@ interface ZetaInterfaces { } /** - * @dev Our Connector will call your contract's onZetaMessage using this interface + * @dev Our Connector calls onZetaMessage with this struct as argument */ struct ZetaMessage { bytes originSenderAddress; @@ -32,7 +32,7 @@ interface ZetaInterfaces { } /** - * @dev Our Connector will call your contract's onZetaRevert using this interface + * @dev Our Connector calls onZetaRevert with this struct as argument */ struct ZetaRevert { address originSenderAddress; @@ -50,3 +50,16 @@ interface ZetaConnector { */ function send(ZetaInterfaces.SendInput calldata input) external; } + +interface ZetaReceiver { + /** + * @dev onZetaMessage is called when a cross-chain message reaches a contract + */ + function onZetaMessage(ZetaInterfaces.ZetaMessage calldata zetaMessage) external; + + /** + * @dev onZetaRevert is called when a cross-chain message reverts. + * It's useful to rollback to the original state + */ + function onZetaRevert(ZetaInterfaces.ZetaRevert calldata zetaRevert) external; +} diff --git a/packages/protocol-contracts/contracts/testing/ZetaReceiverMock.sol b/packages/protocol-contracts/contracts/testing/ZetaReceiverMock.sol index 2cb1ffcb..a90829fa 100644 --- a/packages/protocol-contracts/contracts/testing/ZetaReceiverMock.sol +++ b/packages/protocol-contracts/contracts/testing/ZetaReceiverMock.sol @@ -1,18 +1,18 @@ // SPDX-License-Identifier: MIT pragma solidity 0.8.7; -import "../ZetaReceiver.sol"; +import "../interfaces/ZetaInterfaces.sol"; contract ZetaReceiverMock is ZetaReceiver { event MockOnZetaMessage(address destinationAddress); event MockOnZetaRevert(address originSenderAddress); - function onZetaMessage(ZetaInterfaces.ZetaMessage calldata _zetaMessage) external override { - emit MockOnZetaMessage(_zetaMessage.destinationAddress); + function onZetaMessage(ZetaInterfaces.ZetaMessage calldata zetaMessage) external override { + emit MockOnZetaMessage(zetaMessage.destinationAddress); } - function onZetaRevert(ZetaInterfaces.ZetaRevert calldata _zetaRevert) external override { - emit MockOnZetaRevert(_zetaRevert.originSenderAddress); + function onZetaRevert(ZetaInterfaces.ZetaRevert calldata zetaRevert) external override { + emit MockOnZetaRevert(zetaRevert.originSenderAddress); } } diff --git a/packages/protocol-contracts/scripts/set-zeta-token-addresses.ts b/packages/protocol-contracts/scripts/set-zeta-token-addresses.ts index 531b2bb9..fb543c10 100644 --- a/packages/protocol-contracts/scripts/set-zeta-token-addresses.ts +++ b/packages/protocol-contracts/scripts/set-zeta-token-addresses.ts @@ -15,7 +15,7 @@ export async function setZetaAddresses() { const contract = factory.attach(getAddress("zetaToken")).connect(tssSigner); console.log("Updating"); - await (await contract.updateTSSAndConnectorAddresses(getAddress("tss"), getAddress("connector"))).wait(); + await (await contract.updateTssAndConnectorAddresses(getAddress("tss"), getAddress("connector"))).wait(); console.log("Updated"); } diff --git a/packages/protocol-contracts/test/ZetaConnector.spec.ts b/packages/protocol-contracts/test/ZetaConnector.spec.ts index 61057868..60c8c17d 100644 --- a/packages/protocol-contracts/test/ZetaConnector.spec.ts +++ b/packages/protocol-contracts/test/ZetaConnector.spec.ts @@ -69,7 +69,7 @@ describe("ZetaConnector tests", () => { args: [zetaTokenNonEthContract.address, tssSigner.address, tssUpdater.address], }); - await zetaTokenNonEthContract.updateTSSAndConnectorAddresses( + await zetaTokenNonEthContract.updateTssAndConnectorAddresses( tssSigner.address, zetaConnectorNonEthContract.address ); @@ -80,13 +80,13 @@ describe("ZetaConnector tests", () => { it("Should revert if the caller is not the TSS updater", async () => { await expect( zetaConnectorBaseContract.connect(randomSigner).updateTssAddress(randomSigner.address) - ).to.revertedWith("ZetaConnector: only TSS updater can call this function"); + ).to.revertedWith(`CallerIsNotTssUpdater("${randomSigner.address}")`); }); it("Should revert if the new TSS address is invalid", async () => { await expect( zetaConnectorBaseContract.updateTssAddress("0x0000000000000000000000000000000000000000") - ).to.revertedWith("ZetaConnector: invalid tssAddress"); + ).to.revertedWith(`InvalidAddress()`); }); it("Should change the TSS address if called by TSS updater", async () => { @@ -101,11 +101,11 @@ describe("ZetaConnector tests", () => { describe("pause, unpause", () => { it("Should revert if not called by the TSS updater", async () => { await expect(zetaConnectorBaseContract.connect(randomSigner).pause()).to.revertedWith( - "ZetaConnector: only TSS updater can call this function" + `CallerIsNotTssUpdater("${randomSigner.address}")` ); await expect(zetaConnectorBaseContract.connect(randomSigner).unpause()).to.revertedWith( - "ZetaConnector: only TSS updater can call this function" + `CallerIsNotTssUpdater("${randomSigner.address}")` ); }); @@ -244,7 +244,7 @@ describe("ZetaConnector tests", () => { new ethers.utils.AbiCoder().encode(["string"], ["hello"]), "0x0000000000000000000000000000000000000000000000000000000000000000" ) - ).to.revertedWith("ZetaConnector: only TSS address can call this function"); + ).to.revertedWith(`CallerIsNotTss("${tssUpdater.address}")'`); }); it("Should revert if Zeta transfer fails", async () => { @@ -345,7 +345,7 @@ describe("ZetaConnector tests", () => { new ethers.utils.AbiCoder().encode(["string"], ["hello"]), "0x0000000000000000000000000000000000000000000000000000000000000000" ) - ).to.revertedWith("ZetaConnector: only TSS address can call this function"); + ).to.revertedWith(`CallerIsNotTss("${tssUpdater.address}")`); }); it("Should transfer to the origin address", async () => { @@ -521,11 +521,14 @@ describe("ZetaConnector tests", () => { new ethers.utils.AbiCoder().encode(["string"], ["hello"]), "0x0000000000000000000000000000000000000000000000000000000000000000" ) - ).to.revertedWith("ZetaConnector: only TSS address can call this function"); + ).to.revertedWith(`CallerIsNotTss("${tssUpdater.address}")'`); }); it("Should revert if mint fails", async () => { - await zetaTokenNonEthContract.updateTSSAndConnectorAddresses(tssSigner.address, randomSigner.address); + /** + * Update TSS and Connector addresses so minting fails + */ + await zetaTokenNonEthContract.updateTssAndConnectorAddresses(tssSigner.address, randomSigner.address); await expect( zetaConnectorNonEthContract @@ -538,7 +541,7 @@ describe("ZetaConnector tests", () => { new ethers.utils.AbiCoder().encode(["string"], ["hello"]), "0x0000000000000000000000000000000000000000000000000000000000000000" ) - ).to.revertedWith(`InvalidMinter("0xF6a8aD553b265405526030c2102fda2bDcdDC177")`); + ).to.revertedWith(`CallerIsNotTssOrConnector("${zetaConnectorNonEthContract.address}")`); }); it("Should mint on the receiver address", async () => { @@ -618,7 +621,7 @@ describe("ZetaConnector tests", () => { new ethers.utils.AbiCoder().encode(["string"], ["hello"]), "0x0000000000000000000000000000000000000000000000000000000000000000" ) - ).to.revertedWith("ZetaConnector: only TSS address can call this function"); + ).to.revertedWith(`CallerIsNotTss("${tssUpdater.address}")`); }); it("Should mint on the origin address", async () => { From ea11bc6cb83b6e326575da7204076a3b1cc7e4e6 Mon Sep 17 00:00:00 2001 From: Pavel <51318041+pavel-bc@users.noreply.github.com> Date: Fri, 17 Jun 2022 19:27:13 +0100 Subject: [PATCH 004/115] Set initial package version to be able to import via git (#10) --- package.json | 1 + 1 file changed, 1 insertion(+) diff --git a/package.json b/package.json index 90178c9a..2c8402a8 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,7 @@ { "name": "zetachain", "license": "MIT", + "version": "0.1.0", "private": true, "workspaces": { "packages": [ From d651c4464eb286beb7f75090b65807538d31fed8 Mon Sep 17 00:00:00 2001 From: Charlie Date: Wed, 22 Jun 2022 08:05:50 -0600 Subject: [PATCH 005/115] Scaffold repo scripts, add Slither (#3) * WIP: scripts * Added inquirer and multiple output types * Update .gitignore Co-authored-by: Lucas * added option for CI and other PR feedback * Update scripts/slither.ts * Update scripts/slither.ts * Add ts-node, add slither script * Remove await * Blankline Co-authored-by: Lucas Janon --- .gitignore | 5 + package.json | 8 +- scripts/slither-results/.gitkeep | 0 scripts/slither.ts | 75 +++++++ yarn.lock | 359 ++++++++++++++++++++++++++++++- 5 files changed, 438 insertions(+), 9 deletions(-) create mode 100644 scripts/slither-results/.gitkeep create mode 100644 scripts/slither.ts diff --git a/.gitignore b/.gitignore index fa259158..7e3f87cd 100644 --- a/.gitignore +++ b/.gitignore @@ -20,3 +20,8 @@ tsconfig.tsbuildinfo # Misc .env .DS_Store + +# Slither +scripts/slither-results/* +!scripts/slither-results/.gitkeep + diff --git a/package.json b/package.json index 2c8402a8..96778948 100644 --- a/package.json +++ b/package.json @@ -16,10 +16,11 @@ "crosschain" ], "scripts": { - "compile": "yarn workspaces foreach -pv run compile", "clean": "yarn workspaces foreach -pv run clean", - "lint": "npx eslint . --ext .js,.ts", + "compile": "yarn workspaces foreach -pv run compile", "lint:fix": "npx eslint . --ext .js,.ts --fix", + "lint": "npx eslint . --ext .js,.ts", + "slither": "npx ts-node ./scripts/slither.ts", "test": "yarn workspaces foreach -ptv run test" }, "devDependencies": { @@ -29,6 +30,7 @@ "@typechain/ethers-v5": "^10.0.0", "@typechain/hardhat": "^6.0.0", "@types/chai": "^4.3.1", + "@types/inquirer": "^8.2.1", "@types/mocha": "^9.1.1", "@types/node": "^17.0.25", "@typescript-eslint/eslint-plugin": "^5.20.0", @@ -49,8 +51,10 @@ "ethereumjs-utils": "^5.2.5", "ethers": "5.6.8", "hardhat": "2.9.7", + "inquirer": "^8.2.4", "mocha": "^9.2.2", "ts-mocha": "^9.0.2", + "ts-node": "10.8.1", "typechain": "^8.0.0", "typescript": "^4.6.3" }, diff --git a/scripts/slither-results/.gitkeep b/scripts/slither-results/.gitkeep new file mode 100644 index 00000000..e69de29b diff --git a/scripts/slither.ts b/scripts/slither.ts new file mode 100644 index 00000000..cce46da0 --- /dev/null +++ b/scripts/slither.ts @@ -0,0 +1,75 @@ +import fs from "fs"; +import inquirer from "inquirer"; +import { execSync } from "node:child_process"; +import path from "node:path"; + +const projectRoot = path.join(__dirname, "../"); +const solcVersion = "0.8.9"; +const timestamp = Date.now(); +const packageNames = ["protocol-contracts", "example-contracts"]; + +async function getPackageName() { + let packageName; + + if (process.env.CI) { + packageName = process.argv[2]; + + if (!packageNames.includes(packageName)) { + console.error(`${packageName} is not a valid package name.`); + console.error(`Valid package names are: ${packageNames.join(", ")}`); + process.exit(1); + } + + return packageName; + } else { + packageName = await inquirer.prompt([ + { + type: "list", + message: "Which set of contracts would you like to test?", + name: "contracts", + choices: packageNames, + }, + ]); + + return packageName.contracts; + } +} + +const run = async (command: string) => { + try { + console.log("Starting -- This may take a few minutes..."); + + execSync(command, { + encoding: "utf-8", + stdio: "inherit", + }); + + console.log("Results output to the console and saved to slither-output/ in Markdown, JSON, and SARIF formats."); + } catch (error: any) { + console.error("Error: Docker Failed To Run"); + console.error(`${error}`); + } +}; + +function runSlither(packageName: string) { + const dockerCommand = `cd /home/trufflecon/packages/${packageName} && \ + solc-select use ${solcVersion} && \ + slither --json ../../scripts/slither-results/${packageName}-${timestamp}.json \ + --sarif ../../scripts/slither-results/${packageName}-${timestamp}.sarif \ + --checklist ./ | tee ../../scripts/slither-results/${packageName}-${timestamp}.md`; + + run(`docker run -v "${projectRoot}":/home/trufflecon trailofbits/eth-security-toolbox -c "${dockerCommand}"`); +} + +async function main() { + const packageName = await getPackageName(); + + runSlither(packageName); +} + +main() + .then(() => process.exit(0)) + .catch((error) => { + console.error(error); + process.exit(1); + }); diff --git a/yarn.lock b/yarn.lock index 0774358b..5d01736e 100644 --- a/yarn.lock +++ b/yarn.lock @@ -5,6 +5,15 @@ __metadata: version: 6 cacheKey: 8 +"@cspotcode/source-map-support@npm:^0.8.0": + version: 0.8.1 + resolution: "@cspotcode/source-map-support@npm:0.8.1" + dependencies: + "@jridgewell/trace-mapping": 0.3.9 + checksum: 5718f267085ed8edb3e7ef210137241775e607ee18b77d95aa5bd7514f47f5019aa2d82d96b3bf342ef7aa890a346fa1044532ff7cc3009e7d24fce3ce6200fa + languageName: node + linkType: hard + "@defi-wonderland/smock@npm:^2.0.7": version: 2.0.7 resolution: "@defi-wonderland/smock@npm:2.0.7" @@ -1062,6 +1071,30 @@ __metadata: languageName: node linkType: hard +"@jridgewell/resolve-uri@npm:^3.0.3": + version: 3.0.7 + resolution: "@jridgewell/resolve-uri@npm:3.0.7" + checksum: 94f454f4cef8f0acaad85745fd3ca6cd0d62ef731cf9f952ecb89b8b2ce5e20998cd52be31311cedc5fa5b28b1708a15f3ad9df0fe1447ee4f42959b036c4b5b + languageName: node + linkType: hard + +"@jridgewell/sourcemap-codec@npm:^1.4.10": + version: 1.4.13 + resolution: "@jridgewell/sourcemap-codec@npm:1.4.13" + checksum: f14449096f60a5f921262322fef65ce0bbbfb778080b3b20212080bcefdeba621c43a58c27065bd536ecb4cc767b18eb9c45f15b6b98a4970139572b60603a1c + languageName: node + linkType: hard + +"@jridgewell/trace-mapping@npm:0.3.9": + version: 0.3.9 + resolution: "@jridgewell/trace-mapping@npm:0.3.9" + dependencies: + "@jridgewell/resolve-uri": ^3.0.3 + "@jridgewell/sourcemap-codec": ^1.4.10 + checksum: d89597752fd88d3f3480845691a05a44bd21faac18e2185b6f436c3b0fd0c5a859fbbd9aaa92050c4052caf325ad3e10e2e1d1b64327517471b7d51babc0ddef + languageName: node + linkType: hard + "@metamask/eth-sig-util@npm:^4.0.0": version: 4.0.0 resolution: "@metamask/eth-sig-util@npm:4.0.0" @@ -1424,6 +1457,34 @@ __metadata: languageName: node linkType: hard +"@tsconfig/node10@npm:^1.0.7": + version: 1.0.9 + resolution: "@tsconfig/node10@npm:1.0.9" + checksum: a33ae4dc2a621c0678ac8ac4bceb8e512ae75dac65417a2ad9b022d9b5411e863c4c198b6ba9ef659e14b9fb609bbec680841a2e84c1172df7a5ffcf076539df + languageName: node + linkType: hard + +"@tsconfig/node12@npm:^1.0.7": + version: 1.0.11 + resolution: "@tsconfig/node12@npm:1.0.11" + checksum: 5ce29a41b13e7897a58b8e2df11269c5395999e588b9a467386f99d1d26f6c77d1af2719e407621412520ea30517d718d5192a32403b8dfcc163bf33e40a338a + languageName: node + linkType: hard + +"@tsconfig/node14@npm:^1.0.0": + version: 1.0.3 + resolution: "@tsconfig/node14@npm:1.0.3" + checksum: 19275fe80c4c8d0ad0abed6a96dbf00642e88b220b090418609c4376e1cef81bf16237bf170ad1b341452feddb8115d8dd2e5acdfdea1b27422071163dc9ba9d + languageName: node + linkType: hard + +"@tsconfig/node16@npm:^1.0.2": + version: 1.0.3 + resolution: "@tsconfig/node16@npm:1.0.3" + checksum: 3a8b657dd047495b7ad23437d6afd20297ce90380ff0bdee93fc7d39a900dbd8d9e26e53ff6b465e7967ce2adf0b218782590ce9013285121e6a5928fbd6819f + languageName: node + linkType: hard + "@typechain/ethers-v5@npm:^10.0.0": version: 10.0.0 resolution: "@typechain/ethers-v5@npm:10.0.0" @@ -1537,6 +1598,16 @@ __metadata: languageName: node linkType: hard +"@types/inquirer@npm:^8.2.1": + version: 8.2.1 + resolution: "@types/inquirer@npm:8.2.1" + dependencies: + "@types/through": "*" + rxjs: ^7.2.0 + checksum: 5362d0b1cbec3887c9d5a671a0b19c58cf54066456c8967dd7ee799dfcc242cc8cd8959440c0f2fe7768becaf721b45fd30c222e6b9bcca378f45c68af43bab5 + languageName: node + linkType: hard + "@types/json-schema@npm:^7.0.9": version: 7.0.11 resolution: "@types/json-schema@npm:7.0.11" @@ -1729,6 +1800,15 @@ __metadata: languageName: node linkType: hard +"@types/through@npm:*": + version: 0.0.30 + resolution: "@types/through@npm:0.0.30" + dependencies: + "@types/node": "*" + checksum: 9578470db0b527c26e246a1220ae9bffc6bf47f20f89c54aac467c083ab1f7e16c00d9a7b4bb6cb4e2dfae465027270827e5908a6236063f6214625e50585d78 + languageName: node + linkType: hard + "@types/underscore@npm:*": version: 1.11.4 resolution: "@types/underscore@npm:1.11.4" @@ -2037,6 +2117,22 @@ __metadata: languageName: node linkType: hard +"acorn-walk@npm:^8.1.1": + version: 8.2.0 + resolution: "acorn-walk@npm:8.2.0" + checksum: 1715e76c01dd7b2d4ca472f9c58968516a4899378a63ad5b6c2d668bba8da21a71976c14ec5f5b75f887b6317c4ae0b897ab141c831d741dc76024d8745f1ad1 + languageName: node + linkType: hard + +"acorn@npm:^8.4.1": + version: 8.7.1 + resolution: "acorn@npm:8.7.1" + bin: + acorn: bin/acorn + checksum: aca0aabf98826717920ac2583fdcad0a6fbe4e583fdb6e843af2594e907455aeafe30b1e14f1757cd83ce1776773cf8296ffc3a4acf13f0bd3dfebcf1db6ae80 + languageName: node + linkType: hard + "acorn@npm:^8.7.0": version: 8.7.0 resolution: "acorn@npm:8.7.0" @@ -2137,7 +2233,7 @@ __metadata: languageName: node linkType: hard -"ansi-escapes@npm:^4.3.0": +"ansi-escapes@npm:^4.2.1, ansi-escapes@npm:^4.3.0": version: 4.3.2 resolution: "ansi-escapes@npm:4.3.2" dependencies: @@ -2233,6 +2329,13 @@ __metadata: languageName: node linkType: hard +"arg@npm:^4.1.0": + version: 4.1.3 + resolution: "arg@npm:4.1.3" + checksum: 544af8dd3f60546d3e4aff084d451b96961d2267d668670199692f8d054f0415d86fc5497d0e641e91546f0aa920e7c29e5250e99fc89f5552a34b5d93b77f43 + languageName: node + linkType: hard + "argparse@npm:^1.0.7": version: 1.0.10 resolution: "argparse@npm:1.0.10" @@ -3232,6 +3335,17 @@ __metadata: languageName: node linkType: hard +"bl@npm:^4.1.0": + version: 4.1.0 + resolution: "bl@npm:4.1.0" + dependencies: + buffer: ^5.5.0 + inherits: ^2.0.4 + readable-stream: ^3.4.0 + checksum: 9e8521fa7e83aa9427c6f8ccdcba6e8167ef30cc9a22df26effcc5ab682ef91d2cbc23a239f945d099289e4bbcfae7a192e9c28c84c6202e710a0dfec3722662 + languageName: node + linkType: hard + "blakejs@npm:^1.1.0": version: 1.2.1 resolution: "blakejs@npm:1.2.1" @@ -3711,7 +3825,7 @@ __metadata: languageName: node linkType: hard -"chalk@npm:^4.0.0, chalk@npm:^4.1.0": +"chalk@npm:^4.0.0, chalk@npm:^4.1.0, chalk@npm:^4.1.1": version: 4.1.2 resolution: "chalk@npm:4.1.2" dependencies: @@ -3721,6 +3835,13 @@ __metadata: languageName: node linkType: hard +"chardet@npm:^0.7.0": + version: 0.7.0 + resolution: "chardet@npm:0.7.0" + checksum: 6fd5da1f5d18ff5712c1e0aed41da200d7c51c28f11b36ee3c7b483f3696dabc08927fc6b227735eb8f0e1215c9a8abd8154637f3eff8cada5959df7f58b024d + languageName: node + linkType: hard + "charenc@npm:>= 0.0.1": version: 0.0.2 resolution: "charenc@npm:0.0.2" @@ -3852,6 +3973,22 @@ __metadata: languageName: node linkType: hard +"cli-cursor@npm:^3.1.0": + version: 3.1.0 + resolution: "cli-cursor@npm:3.1.0" + dependencies: + restore-cursor: ^3.1.0 + checksum: 2692784c6cd2fd85cfdbd11f53aea73a463a6d64a77c3e098b2b4697a20443f430c220629e1ca3b195ea5ac4a97a74c2ee411f3807abf6df2b66211fec0c0a29 + languageName: node + linkType: hard + +"cli-spinners@npm:^2.5.0": + version: 2.6.1 + resolution: "cli-spinners@npm:2.6.1" + checksum: 423409baaa7a58e5104b46ca1745fbfc5888bbd0b0c5a626e052ae1387060839c8efd512fb127e25769b3dc9562db1dc1b5add6e0b93b7ef64f477feb6416a45 + languageName: node + linkType: hard + "cli-table3@npm:^0.5.0": version: 0.5.1 resolution: "cli-table3@npm:0.5.1" @@ -3866,6 +4003,13 @@ __metadata: languageName: node linkType: hard +"cli-width@npm:^3.0.0": + version: 3.0.0 + resolution: "cli-width@npm:3.0.0" + checksum: 4c94af3769367a70e11ed69aa6095f1c600c0ff510f3921ab4045af961820d57c0233acfa8b6396037391f31b4c397e1f614d234294f979ff61430a6c166c3f6 + languageName: node + linkType: hard + "cliui@npm:^3.2.0": version: 3.2.0 resolution: "cliui@npm:3.2.0" @@ -3915,6 +4059,13 @@ __metadata: languageName: node linkType: hard +"clone@npm:^1.0.2": + version: 1.0.4 + resolution: "clone@npm:1.0.4" + checksum: d06418b7335897209e77bdd430d04f882189582e67bd1f75a04565f3f07f5b3f119a9d670c943b6697d0afb100f03b866b3b8a1f91d4d02d72c4ecf2bb64b5dd + languageName: node + linkType: hard + "code-point-at@npm:^1.0.0": version: 1.1.0 resolution: "code-point-at@npm:1.1.0" @@ -4221,6 +4372,13 @@ __metadata: languageName: node linkType: hard +"create-require@npm:^1.1.0": + version: 1.1.1 + resolution: "create-require@npm:1.1.1" + checksum: a9a1503d4390d8b59ad86f4607de7870b39cad43d929813599a23714831e81c520bddf61bcdd1f8e30f05fd3a2b71ae8538e946eb2786dc65c2bbc520f692eff + languageName: node + linkType: hard + "cross-fetch@npm:^2.1.0, cross-fetch@npm:^2.1.1": version: 2.2.6 resolution: "cross-fetch@npm:2.2.6" @@ -4425,6 +4583,15 @@ __metadata: languageName: node linkType: hard +"defaults@npm:^1.0.3": + version: 1.0.3 + resolution: "defaults@npm:1.0.3" + dependencies: + clone: ^1.0.2 + checksum: 96e2112da6553d376afd5265ea7cbdb2a3b45535965d71ab8bb1da10c8126d168fdd5268799625324b368356d21ba2a7b3d4ec50961f11a47b7feb9de3d4413e + languageName: node + linkType: hard + "defer-to-connect@npm:^1.0.1": version: 1.1.3 resolution: "defer-to-connect@npm:1.1.3" @@ -4593,6 +4760,13 @@ __metadata: languageName: node linkType: hard +"diff@npm:^4.0.1": + version: 4.0.2 + resolution: "diff@npm:4.0.2" + checksum: f2c09b0ce4e6b301c221addd83bf3f454c0bc00caa3dd837cf6c127d6edf7223aa2bbe3b688feea110b7f262adbfc845b757c44c8a9f8c0c5b15d8fa9ce9d20d + languageName: node + linkType: hard + "diffie-hellman@npm:^5.0.0": version: 5.0.3 resolution: "diffie-hellman@npm:5.0.3" @@ -6025,6 +6199,17 @@ __metadata: languageName: node linkType: hard +"external-editor@npm:^3.0.3": + version: 3.1.0 + resolution: "external-editor@npm:3.1.0" + dependencies: + chardet: ^0.7.0 + iconv-lite: ^0.4.24 + tmp: ^0.0.33 + checksum: 1c2a616a73f1b3435ce04030261bed0e22d4737e14b090bb48e58865da92529c9f2b05b893de650738d55e692d071819b45e1669259b2b354bc3154d27a698c7 + languageName: node + linkType: hard + "extglob@npm:^2.0.4": version: 2.0.4 resolution: "extglob@npm:2.0.4" @@ -6123,6 +6308,15 @@ __metadata: languageName: node linkType: hard +"figures@npm:^3.0.0": + version: 3.2.0 + resolution: "figures@npm:3.2.0" + dependencies: + escape-string-regexp: ^1.0.5 + checksum: 85a6ad29e9aca80b49b817e7c89ecc4716ff14e3779d9835af554db91bac41c0f289c418923519392a1e582b4d10482ad282021330cd045bb7b80c84152f2a2b + languageName: node + linkType: hard + "file-entry-cache@npm:^6.0.1": version: 6.0.1 resolution: "file-entry-cache@npm:6.0.1" @@ -7321,7 +7515,7 @@ __metadata: languageName: node linkType: hard -"iconv-lite@npm:0.4.24": +"iconv-lite@npm:0.4.24, iconv-lite@npm:^0.4.24": version: 0.4.24 resolution: "iconv-lite@npm:0.4.24" dependencies: @@ -7438,6 +7632,29 @@ __metadata: languageName: node linkType: hard +"inquirer@npm:^8.2.4": + version: 8.2.4 + resolution: "inquirer@npm:8.2.4" + dependencies: + ansi-escapes: ^4.2.1 + chalk: ^4.1.1 + cli-cursor: ^3.1.0 + cli-width: ^3.0.0 + external-editor: ^3.0.3 + figures: ^3.0.0 + lodash: ^4.17.21 + mute-stream: 0.0.8 + ora: ^5.4.1 + run-async: ^2.4.0 + rxjs: ^7.5.5 + string-width: ^4.1.0 + strip-ansi: ^6.0.0 + through: ^2.3.6 + wrap-ansi: ^7.0.0 + checksum: dfcb6529d3af443dfea2241cb471508091b51f5121a088fdb8728b23ec9b349ef0a5e13a0ef2c8e19457b0bed22f7cbbcd561f7a4529d084c562a58c605e2655 + languageName: node + linkType: hard + "internal-slot@npm:^1.0.3": version: 1.0.3 resolution: "internal-slot@npm:1.0.3" @@ -7749,6 +7966,13 @@ __metadata: languageName: node linkType: hard +"is-interactive@npm:^1.0.0": + version: 1.0.0 + resolution: "is-interactive@npm:1.0.0" + checksum: 824808776e2d468b2916cdd6c16acacebce060d844c35ca6d82267da692e92c3a16fdba624c50b54a63f38bdc4016055b6f443ce57d7147240de4f8cdabaf6f9 + languageName: node + linkType: hard + "is-lambda@npm:^1.0.1": version: 1.0.1 resolution: "is-lambda@npm:1.0.1" @@ -8704,7 +8928,7 @@ __metadata: languageName: node linkType: hard -"log-symbols@npm:4.1.0": +"log-symbols@npm:4.1.0, log-symbols@npm:^4.1.0": version: 4.1.0 resolution: "log-symbols@npm:4.1.0" dependencies: @@ -9070,6 +9294,13 @@ __metadata: languageName: node linkType: hard +"mimic-fn@npm:^2.1.0": + version: 2.1.0 + resolution: "mimic-fn@npm:2.1.0" + checksum: d2421a3444848ce7f84bd49115ddacff29c15745db73f54041edc906c14b131a38d05298dae3081667627a59b2eb1ca4b436ff2e1b80f69679522410418b478a + languageName: node + linkType: hard + "mimic-response@npm:^1.0.0, mimic-response@npm:^1.0.1": version: 1.0.1 resolution: "mimic-response@npm:1.0.1" @@ -9437,6 +9668,13 @@ __metadata: languageName: node linkType: hard +"mute-stream@npm:0.0.8": + version: 0.0.8 + resolution: "mute-stream@npm:0.0.8" + checksum: ff48d251fc3f827e5b1206cda0ffdaec885e56057ee86a3155e1951bc940fd5f33531774b1cc8414d7668c10a8907f863f6561875ee6e8768931a62121a531a1 + languageName: node + linkType: hard + "nan@npm:^2.14.0, nan@npm:^2.2.1": version: 2.15.0 resolution: "nan@npm:2.15.0" @@ -9855,6 +10093,15 @@ __metadata: languageName: node linkType: hard +"onetime@npm:^5.1.0": + version: 5.1.2 + resolution: "onetime@npm:5.1.2" + dependencies: + mimic-fn: ^2.1.0 + checksum: 2478859ef817fc5d4e9c2f9e5728512ddd1dbc9fb7829ad263765bb6d3b91ce699d6e2332eef6b7dff183c2f490bd3349f1666427eaba4469fba0ac38dfd0d34 + languageName: node + linkType: hard + "open@npm:^7.4.2": version: 7.4.2 resolution: "open@npm:7.4.2" @@ -9893,6 +10140,23 @@ __metadata: languageName: node linkType: hard +"ora@npm:^5.4.1": + version: 5.4.1 + resolution: "ora@npm:5.4.1" + dependencies: + bl: ^4.1.0 + chalk: ^4.1.0 + cli-cursor: ^3.1.0 + cli-spinners: ^2.5.0 + is-interactive: ^1.0.0 + is-unicode-supported: ^0.1.0 + log-symbols: ^4.1.0 + strip-ansi: ^6.0.0 + wcwidth: ^1.0.1 + checksum: 28d476ee6c1049d68368c0dc922e7225e3b5600c3ede88fade8052837f9ed342625fdaa84a6209302587c8ddd9b664f71f0759833cbdb3a4cf81344057e63c63 + languageName: node + linkType: hard + "os-homedir@npm:^1.0.0": version: 1.0.2 resolution: "os-homedir@npm:1.0.2" @@ -11045,6 +11309,16 @@ __metadata: languageName: node linkType: hard +"restore-cursor@npm:^3.1.0": + version: 3.1.0 + resolution: "restore-cursor@npm:3.1.0" + dependencies: + onetime: ^5.1.0 + signal-exit: ^3.0.2 + checksum: f877dd8741796b909f2a82454ec111afb84eb45890eb49ac947d87991379406b3b83ff9673a46012fca0d7844bb989f45cc5b788254cf1a39b6b5a9659de0630 + languageName: node + linkType: hard + "resumer@npm:~0.0.0": version: 0.0.0 resolution: "resumer@npm:0.0.0" @@ -11118,6 +11392,13 @@ __metadata: languageName: node linkType: hard +"run-async@npm:^2.4.0": + version: 2.4.1 + resolution: "run-async@npm:2.4.1" + checksum: a2c88aa15df176f091a2878eb840e68d0bdee319d8d97bbb89112223259cebecb94bc0defd735662b83c2f7a30bed8cddb7d1674eb48ae7322dc602b22d03797 + languageName: node + linkType: hard + "run-parallel@npm:^1.1.9": version: 1.2.0 resolution: "run-parallel@npm:1.2.0" @@ -11134,7 +11415,7 @@ __metadata: languageName: node linkType: hard -"rxjs@npm:^7.2.0": +"rxjs@npm:^7.2.0, rxjs@npm:^7.5.5": version: 7.5.5 resolution: "rxjs@npm:7.5.5" dependencies: @@ -11497,7 +11778,7 @@ __metadata: languageName: node linkType: hard -"signal-exit@npm:^3.0.7": +"signal-exit@npm:^3.0.2, signal-exit@npm:^3.0.7": version: 3.0.7 resolution: "signal-exit@npm:3.0.7" checksum: a2f098f247adc367dffc27845853e9959b9e88b01cb301658cfe4194352d8d2bb32e18467c786a7fe15f1d44b233ea35633d076d5e737870b7139949d1ab6318 @@ -12294,7 +12575,7 @@ __metadata: languageName: node linkType: hard -"through@npm:~2.3.4, through@npm:~2.3.8": +"through@npm:^2.3.6, through@npm:~2.3.4, through@npm:~2.3.8": version: 2.3.8 resolution: "through@npm:2.3.8" checksum: a38c3e059853c494af95d50c072b83f8b676a9ba2818dcc5b108ef252230735c54e0185437618596c790bbba8fcdaef5b290405981ffa09dce67b1f1bf190cbd @@ -12493,6 +12774,44 @@ __metadata: languageName: node linkType: hard +"ts-node@npm:10.8.1": + version: 10.8.1 + resolution: "ts-node@npm:10.8.1" + dependencies: + "@cspotcode/source-map-support": ^0.8.0 + "@tsconfig/node10": ^1.0.7 + "@tsconfig/node12": ^1.0.7 + "@tsconfig/node14": ^1.0.0 + "@tsconfig/node16": ^1.0.2 + acorn: ^8.4.1 + acorn-walk: ^8.1.1 + arg: ^4.1.0 + create-require: ^1.1.0 + diff: ^4.0.1 + make-error: ^1.1.1 + v8-compile-cache-lib: ^3.0.1 + yn: 3.1.1 + peerDependencies: + "@swc/core": ">=1.2.50" + "@swc/wasm": ">=1.2.50" + "@types/node": "*" + typescript: ">=2.7" + peerDependenciesMeta: + "@swc/core": + optional: true + "@swc/wasm": + optional: true + bin: + ts-node: dist/bin.js + ts-node-cwd: dist/bin-cwd.js + ts-node-esm: dist/bin-esm.js + ts-node-script: dist/bin-script.js + ts-node-transpile-only: dist/bin-transpile.js + ts-script: dist/bin-script-deprecated.js + checksum: 7d1aa7aa3ae1c0459c4922ed0dbfbade442cfe0c25aebaf620cdf1774f112c8d7a9b14934cb6719274917f35b2c503ba87bcaf5e16a0d39ba0f68ce3e7728363 + languageName: node + linkType: hard + "ts-node@npm:7.0.1": version: 7.0.1 resolution: "ts-node@npm:7.0.1" @@ -13041,6 +13360,13 @@ __metadata: languageName: node linkType: hard +"v8-compile-cache-lib@npm:^3.0.1": + version: 3.0.1 + resolution: "v8-compile-cache-lib@npm:3.0.1" + checksum: 78089ad549e21bcdbfca10c08850022b22024cdcc2da9b168bcf5a73a6ed7bf01a9cebb9eac28e03cd23a684d81e0502797e88f3ccd27a32aeab1cfc44c39da0 + languageName: node + linkType: hard + "v8-compile-cache@npm:^2.0.3": version: 2.3.0 resolution: "v8-compile-cache@npm:2.3.0" @@ -13083,6 +13409,15 @@ __metadata: languageName: node linkType: hard +"wcwidth@npm:^1.0.1": + version: 1.0.1 + resolution: "wcwidth@npm:1.0.1" + dependencies: + defaults: ^1.0.3 + checksum: 814e9d1ddcc9798f7377ffa448a5a3892232b9275ebb30a41b529607691c0491de47cba426e917a4d08ded3ee7e9ba2f3fe32e62ee3cd9c7d3bafb7754bd553c + languageName: node + linkType: hard + "web3-bzz@npm:1.2.11": version: 1.2.11 resolution: "web3-bzz@npm:1.2.11" @@ -14162,6 +14497,13 @@ __metadata: languageName: node linkType: hard +"yn@npm:3.1.1": + version: 3.1.1 + resolution: "yn@npm:3.1.1" + checksum: 2c487b0e149e746ef48cda9f8bad10fc83693cd69d7f9dcd8be4214e985de33a29c9e24f3c0d6bcf2288427040a8947406ab27f7af67ee9456e6b84854f02dd6 + languageName: node + linkType: hard + "yn@npm:^2.0.0": version: 2.0.0 resolution: "yn@npm:2.0.0" @@ -14186,6 +14528,7 @@ __metadata: "@typechain/ethers-v5": ^10.0.0 "@typechain/hardhat": ^6.0.0 "@types/chai": ^4.3.1 + "@types/inquirer": ^8.2.1 "@types/mocha": ^9.1.1 "@types/node": ^17.0.25 "@typescript-eslint/eslint-plugin": ^5.20.0 @@ -14206,8 +14549,10 @@ __metadata: ethereumjs-utils: ^5.2.5 ethers: 5.6.8 hardhat: 2.9.7 + inquirer: ^8.2.4 mocha: ^9.2.2 ts-mocha: ^9.0.2 + ts-node: 10.8.1 typechain: ^8.0.0 typescript: ^4.6.3 languageName: unknown From 50aefdcd3bb272a0f25d656fd7a45f76f2348f4c Mon Sep 17 00:00:00 2001 From: Andres Martin Aiello <50411235+andresaiello@users.noreply.github.com> Date: Thu, 23 Jun 2022 08:07:04 -0300 Subject: [PATCH 006/115] aaiello/zeta-335-add-supply-cap-to-smart-contracts (#13) * aaiello/zeta-335-add-supply-cap-to-smart-contracts * comments addressed * renames * default value to maxSupply * update test * Add describe, enforce max supply on revert * Improve test message * Move setMaxSupply function Co-authored-by: Lucas Janon --- .../contracts/ZetaConnector.non-eth.sol | 8 ++ .../contracts/interfaces/ConnectorErrors.sol | 2 + .../test/ZetaConnector.spec.ts | 79 +++++++++++++++++++ 3 files changed, 89 insertions(+) diff --git a/packages/protocol-contracts/contracts/ZetaConnector.non-eth.sol b/packages/protocol-contracts/contracts/ZetaConnector.non-eth.sol index f7d45651..e309d3ba 100644 --- a/packages/protocol-contracts/contracts/ZetaConnector.non-eth.sol +++ b/packages/protocol-contracts/contracts/ZetaConnector.non-eth.sol @@ -17,6 +17,8 @@ interface ZetaToken is IERC20 { } contract ZetaConnectorNonEth is ZetaConnectorBase { + uint256 public maxSupply = 2**256 - 1; + constructor( address zetaTokenAddress_, address tssAddress_, @@ -27,6 +29,10 @@ contract ZetaConnectorNonEth is ZetaConnectorBase { return ZetaToken(zetaToken).balanceOf(address(this)); } + function setMaxSupply(uint256 maxSupply_) external onlyTssAddress { + maxSupply = maxSupply_; + } + function send(ZetaInterfaces.SendInput calldata input) external override whenNotPaused { ZetaToken(zetaToken).burnFrom(msg.sender, input.zetaAmount); @@ -49,6 +55,7 @@ contract ZetaConnectorNonEth is ZetaConnectorBase { bytes calldata message, bytes32 internalSendHash ) external override whenNotPaused onlyTssAddress { + if (zetaAmount + ZetaToken(zetaToken).totalSupply() > maxSupply) revert ExceedsMaxSupply(maxSupply); ZetaToken(zetaToken).mint(destinationAddress, zetaAmount, internalSendHash); if (message.length > 0) { @@ -76,6 +83,7 @@ contract ZetaConnectorNonEth is ZetaConnectorBase { bytes calldata message, bytes32 internalSendHash ) external override whenNotPaused onlyTssAddress { + if (zetaAmount + ZetaToken(zetaToken).totalSupply() > maxSupply) revert ExceedsMaxSupply(maxSupply); ZetaToken(zetaToken).mint(originSenderAddress, zetaAmount, internalSendHash); if (message.length > 0) { diff --git a/packages/protocol-contracts/contracts/interfaces/ConnectorErrors.sol b/packages/protocol-contracts/contracts/interfaces/ConnectorErrors.sol index 5d5866a9..657b4485 100644 --- a/packages/protocol-contracts/contracts/interfaces/ConnectorErrors.sol +++ b/packages/protocol-contracts/contracts/interfaces/ConnectorErrors.sol @@ -9,4 +9,6 @@ interface ConnectorErrors { error InvalidAddress(); error ZetaTransferError(); + + error ExceedsMaxSupply(uint256 maxSupply); } diff --git a/packages/protocol-contracts/test/ZetaConnector.spec.ts b/packages/protocol-contracts/test/ZetaConnector.spec.ts index 60c8c17d..a768a67c 100644 --- a/packages/protocol-contracts/test/ZetaConnector.spec.ts +++ b/packages/protocol-contracts/test/ZetaConnector.spec.ts @@ -671,5 +671,84 @@ describe("ZetaConnector tests", () => { expect(e2.length).to.equal(1); }); }); + + describe("MaxSupply", () => { + describe("setMaxSupply", () => { + it("Should revert if the caller is not the TSS address", async () => { + await expect(zetaConnectorNonEthContract.connect(randomSigner).setMaxSupply(0)).to.revertedWith( + `CallerIsNotTss("${randomSigner.address}")` + ); + }); + + it("Should revert if want to mint more than MaxSupply", async () => { + await zetaConnectorNonEthContract.connect(tssSigner).setMaxSupply(999); + await expect( + zetaConnectorNonEthContract + .connect(tssSigner) + .onReceive( + randomSigner.address, + 1, + zetaReceiverMockContract.address, + 1000, + new ethers.utils.AbiCoder().encode(["string"], ["hello"]), + "0x0000000000000000000000000000000000000000000000000000000000000000" + ) + ).to.revertedWith(`ExceedsMaxSupply(999)`); + }); + }); + + describe("onReceive, onRevert (mint)", () => { + it("Should mint if total supply + supply to add < max supply", async () => { + const supplyToAdd = 1000; + const initialSupply = await zetaTokenNonEthContract.totalSupply(); + + await zetaConnectorNonEthContract.connect(tssSigner).setMaxSupply(initialSupply.add(supplyToAdd)); + + await expect( + zetaConnectorNonEthContract + .connect(tssSigner) + .onReceive( + randomSigner.address, + 1, + zetaReceiverMockContract.address, + supplyToAdd, + new ethers.utils.AbiCoder().encode(["string"], ["hello"]), + "0x0000000000000000000000000000000000000000000000000000000000000000" + ) + ).to.be.not.reverted; + + const finalSupply = await zetaTokenNonEthContract.totalSupply(); + + expect(finalSupply).to.eq(initialSupply.add(supplyToAdd)); + + await expect( + zetaConnectorNonEthContract + .connect(tssSigner) + .onReceive( + randomSigner.address, + 1, + zetaReceiverMockContract.address, + 1, + new ethers.utils.AbiCoder().encode(["string"], ["hello"]), + "0x0000000000000000000000000000000000000000000000000000000000000000" + ) + ).to.revertedWith(`ExceedsMaxSupply(${initialSupply.add(supplyToAdd)})`); + + await expect( + zetaConnectorNonEthContract + .connect(tssSigner) + .onRevert( + randomSigner.address, + 1, + randomSigner.address, + 2, + 1000, + new ethers.utils.AbiCoder().encode(["string"], ["hello"]), + "0x0000000000000000000000000000000000000000000000000000000000000000" + ) + ).to.revertedWith(`ExceedsMaxSupply(${initialSupply.add(supplyToAdd)})`); + }); + }); + }); }); }); From 6981173e3fcaca85afd14baf2a3f3ba5842ae528 Mon Sep 17 00:00:00 2001 From: Charlie Date: Thu, 23 Jun 2022 05:16:57 -0600 Subject: [PATCH 007/115] Exclude libraries from Slither (#12) * Added ability to include or exclude uniswap/OZ libraries from scan * Fixed import * Script improvements Co-authored-by: Lucas Janon --- scripts/slither.ts | 24 +++++++++++++++++------- 1 file changed, 17 insertions(+), 7 deletions(-) diff --git a/scripts/slither.ts b/scripts/slither.ts index cce46da0..ae6dc2d2 100644 --- a/scripts/slither.ts +++ b/scripts/slither.ts @@ -35,6 +35,20 @@ async function getPackageName() { } } +async function getFilterPaths() { + if (process.env.CI) return ""; + + const { confirm: includeLibraries } = await inquirer.prompt([ + { + type: "confirm", + message: "Do you want to include OpenZeppelin & Uniswap libraries in this scan?", + name: "confirm", + }, + ]); + + return includeLibraries ? "" : `--filter-paths "node_modules/@openzeppelin/","node_modules/@uniswap/"`; +} + const run = async (command: string) => { try { console.log("Starting -- This may take a few minutes..."); @@ -50,21 +64,17 @@ const run = async (command: string) => { console.error(`${error}`); } }; - -function runSlither(packageName: string) { +function runSlither(packageName: string, filterPaths: string) { const dockerCommand = `cd /home/trufflecon/packages/${packageName} && \ solc-select use ${solcVersion} && \ slither --json ../../scripts/slither-results/${packageName}-${timestamp}.json \ --sarif ../../scripts/slither-results/${packageName}-${timestamp}.sarif \ - --checklist ./ | tee ../../scripts/slither-results/${packageName}-${timestamp}.md`; - + --checklist ./ ${filterPaths} | tee ../../scripts/slither-results/${packageName}-${timestamp}.md`; run(`docker run -v "${projectRoot}":/home/trufflecon trailofbits/eth-security-toolbox -c "${dockerCommand}"`); } async function main() { - const packageName = await getPackageName(); - - runSlither(packageName); + runSlither(await getPackageName(), await getFilterPaths()); } main() From 7a032057f4411fc22423fafc8c02a122c1361a78 Mon Sep 17 00:00:00 2001 From: Lucas Date: Fri, 24 Jun 2022 11:23:35 -0300 Subject: [PATCH 008/115] Remove initial mint from ZetaNonEth, add tests (#15) * Add ZetaNonEth tests, remove mint parameter from ZetaNonEth, prevent TSS from minting * Use HashZero and AddressZero --- .../contracts/ZetaConnector.base.sol | 4 +- .../contracts/ZetaNonEth.sol | 33 ++-- .../contracts/interfaces/ZetaErrors.sol | 2 +- .../scripts/deploy-zeta-token.ts | 2 +- .../test/ZetaConnector.spec.ts | 81 ++++++---- .../test/ZetaNonEth.spec.ts | 147 ++++++++++++++++++ 6 files changed, 218 insertions(+), 51 deletions(-) create mode 100644 packages/protocol-contracts/test/ZetaNonEth.spec.ts diff --git a/packages/protocol-contracts/contracts/ZetaConnector.base.sol b/packages/protocol-contracts/contracts/ZetaConnector.base.sol index 14cd43da..795a40e1 100644 --- a/packages/protocol-contracts/contracts/ZetaConnector.base.sol +++ b/packages/protocol-contracts/contracts/ZetaConnector.base.sol @@ -26,6 +26,7 @@ contract ZetaConnectorBase is ConnectorErrors, Pausable { bytes message, bytes zetaParams ); + event ZetaReceived( bytes originSenderAddress, uint256 indexed originChainId, @@ -34,6 +35,7 @@ contract ZetaConnectorBase is ConnectorErrors, Pausable { bytes message, bytes32 indexed internalSendHash ); + event ZetaReverted( address originSenderAddress, uint256 originChainId, @@ -44,7 +46,7 @@ contract ZetaConnectorBase is ConnectorErrors, Pausable { bytes32 indexed internalSendHash ); - event TSSAddressUpdated(address originSenderAddress, address newTSSAddress); + event TSSAddressUpdated(address originSenderAddress, address newTssAddress); constructor( address zetaToken_, diff --git a/packages/protocol-contracts/contracts/ZetaNonEth.sol b/packages/protocol-contracts/contracts/ZetaNonEth.sol index 29966adc..d7eb3363 100644 --- a/packages/protocol-contracts/contracts/ZetaNonEth.sol +++ b/packages/protocol-contracts/contracts/ZetaNonEth.sol @@ -6,28 +6,24 @@ import "@openzeppelin/contracts/token/ERC20/extensions/ERC20Burnable.sol"; import "./interfaces/ZetaErrors.sol"; contract ZetaNonEth is ERC20Burnable, ZetaErrors { + address public connectorAddress; + /** - * @dev Collectively hold by Zeta blockchain validators + * @dev Collectively held by Zeta blockchain validators */ address public tssAddress; /** - * @dev Initially a multi-sig, eventually hold by Zeta blockchain validators (via renounceTssAddressUpdater) + * @dev Initially a multi-sig, eventually held by Zeta blockchain validators (via renounceTssAddressUpdater) */ address public tssAddressUpdater; - address public connectorAddress; - event Minted(address indexed mintee, uint256 amount, bytes32 indexed internalSendHash); + event Burnt(address indexed burnee, uint256 amount); - constructor( - uint256 initialSupply, - address tssAddress_, - address tssAddressUpdater_ - ) ERC20("Zeta", "ZETA") { + constructor(address tssAddress_, address tssAddressUpdater_) ERC20("Zeta", "ZETA") { if (tssAddress_ == address(0) || tssAddressUpdater_ == address(0)) revert InvalidAddress(); - _mint(msg.sender, initialSupply * (10**uint256(decimals()))); tssAddress = tssAddress_; tssAddressUpdater = tssAddressUpdater_; @@ -57,14 +53,23 @@ contract ZetaNonEth is ERC20Burnable, ZetaErrors { bytes32 internalSendHash ) external { /** - * @dev Only Connector or TSS can mint. Minting requires burning the equivalent amount on another chain + * @dev Only Connector can mint. Minting requires burning the equivalent amount on another chain */ - if (msg.sender != tssAddress && msg.sender != connectorAddress) { - revert CallerIsNotTssOrConnector(msg.sender); - } + if (msg.sender != connectorAddress) revert CallerIsNotConnector(msg.sender); _mint(mintee, value); emit Minted(mintee, value, internalSendHash); } + + function burnFrom(address account, uint256 amount) public override { + /** + * @dev Only Connector can burn. + */ + if (msg.sender != connectorAddress) revert CallerIsNotConnector(msg.sender); + + ERC20Burnable.burnFrom(account, amount); + + emit Burnt(account, amount); + } } diff --git a/packages/protocol-contracts/contracts/interfaces/ZetaErrors.sol b/packages/protocol-contracts/contracts/interfaces/ZetaErrors.sol index c084d189..5de4fd97 100644 --- a/packages/protocol-contracts/contracts/interfaces/ZetaErrors.sol +++ b/packages/protocol-contracts/contracts/interfaces/ZetaErrors.sol @@ -4,7 +4,7 @@ pragma solidity 0.8.7; interface ZetaErrors { error CallerIsNotTss(address caller); - error CallerIsNotTssOrConnector(address caller); + error CallerIsNotConnector(address caller); error CallerIsNotTssUpdater(address caller); diff --git a/packages/protocol-contracts/scripts/deploy-zeta-token.ts b/packages/protocol-contracts/scripts/deploy-zeta-token.ts index 9ffed123..f13fe653 100644 --- a/packages/protocol-contracts/scripts/deploy-zeta-token.ts +++ b/packages/protocol-contracts/scripts/deploy-zeta-token.ts @@ -18,7 +18,7 @@ export async function deployZetaToken() { }); } else { contract = await deployZetaNonEth({ - args: [0, getAddress("tss"), getAddress("tssUpdater")], + args: [getAddress("tss"), getAddress("tssUpdater")], }); } diff --git a/packages/protocol-contracts/test/ZetaConnector.spec.ts b/packages/protocol-contracts/test/ZetaConnector.spec.ts index a768a67c..dad69dc4 100644 --- a/packages/protocol-contracts/test/ZetaConnector.spec.ts +++ b/packages/protocol-contracts/test/ZetaConnector.spec.ts @@ -1,5 +1,6 @@ import { SignerWithAddress } from "@nomiclabs/hardhat-ethers/signers"; import { expect } from "chai"; +import { parseEther } from "ethers/lib/utils"; import { ethers } from "hardhat"; import { @@ -31,19 +32,31 @@ describe("ZetaConnector tests", () => { let randomSigner: SignerWithAddress; const tssUpdaterApproveConnectorEth = async () => { - await (await zetaTokenEthContract.approve(zetaConnectorEthContract.address, 100_000)).wait(); + await (await zetaTokenEthContract.approve(zetaConnectorEthContract.address, parseEther("100000"))).wait(); }; const tssUpdaterApproveConnectorNonEth = async () => { - await (await zetaTokenNonEthContract.approve(zetaConnectorNonEthContract.address, 100_000)).wait(); + await (await zetaTokenNonEthContract.approve(zetaConnectorNonEthContract.address, parseEther("100000"))).wait(); }; const transfer100kZetaEth = async (transferTo: string) => { await (await zetaTokenEthContract.transfer(transferTo, 100_000)).wait(); }; + const mint100kZetaNonEth = async (transferTo: string) => { + const zeta100k = parseEther("100000"); + + await ( + await zetaConnectorNonEthContract + .connect(tssSigner) + .onReceive(randomSigner.address, 1, transferTo, zeta100k, [], ethers.constants.HashZero) + ).wait(); + }; + const transfer100kZetaNonEth = async (transferTo: string) => { - await (await zetaTokenNonEthContract.transfer(transferTo, 100_000)).wait(); + await mint100kZetaNonEth(tssUpdater.address); + + await (await zetaTokenNonEthContract.connect(tssUpdater).transfer(transferTo, 100_000)).wait(); }; beforeEach(async () => { @@ -55,7 +68,7 @@ describe("ZetaConnector tests", () => { }); zetaTokenNonEthContract = await deployZetaNonEth({ - args: [100_000, tssSigner.address, tssUpdater.address], + args: [tssSigner.address, tssUpdater.address], }); zetaReceiverMockContract = await deployZetaReceiverMock(); @@ -73,6 +86,8 @@ describe("ZetaConnector tests", () => { tssSigner.address, zetaConnectorNonEthContract.address ); + + await mint100kZetaNonEth(tssUpdater.address); }); describe("ZetaConnector.base", () => { @@ -229,7 +244,7 @@ describe("ZetaConnector tests", () => { randomSigner.address, 1000, new ethers.utils.AbiCoder().encode(["string"], ["hello"]), - "0x0000000000000000000000000000000000000000000000000000000000000000" + ethers.constants.HashZero ) ).to.revertedWith("Pausable: paused"); }); @@ -242,7 +257,7 @@ describe("ZetaConnector tests", () => { randomSigner.address, 1000, new ethers.utils.AbiCoder().encode(["string"], ["hello"]), - "0x0000000000000000000000000000000000000000000000000000000000000000" + ethers.constants.HashZero ) ).to.revertedWith(`CallerIsNotTss("${tssUpdater.address}")'`); }); @@ -257,7 +272,7 @@ describe("ZetaConnector tests", () => { randomSigner.address, 1000, new ethers.utils.AbiCoder().encode(["string"], ["hello"]), - "0x0000000000000000000000000000000000000000000000000000000000000000" + ethers.constants.HashZero ) ).to.revertedWith("ERC20: transfer amount exceeds balance"); }); @@ -279,7 +294,7 @@ describe("ZetaConnector tests", () => { zetaReceiverMockContract.address, 1000, new ethers.utils.AbiCoder().encode(["string"], ["hello"]), - "0x0000000000000000000000000000000000000000000000000000000000000000" + ethers.constants.HashZero ) ).wait(); @@ -306,7 +321,7 @@ describe("ZetaConnector tests", () => { zetaReceiverMockContract.address, 1000, new ethers.utils.AbiCoder().encode(["string"], ["hello"]), - "0x0000000000000000000000000000000000000000000000000000000000000000" + ethers.constants.HashZero ) ).wait(); @@ -329,7 +344,7 @@ describe("ZetaConnector tests", () => { 2, 1000, new ethers.utils.AbiCoder().encode(["string"], ["hello"]), - "0x0000000000000000000000000000000000000000000000000000000000000000" + ethers.constants.HashZero ) ).to.revertedWith("Pausable: paused"); }); @@ -343,7 +358,7 @@ describe("ZetaConnector tests", () => { 1, 1000, new ethers.utils.AbiCoder().encode(["string"], ["hello"]), - "0x0000000000000000000000000000000000000000000000000000000000000000" + ethers.constants.HashZero ) ).to.revertedWith(`CallerIsNotTss("${tssUpdater.address}")`); }); @@ -366,7 +381,7 @@ describe("ZetaConnector tests", () => { 1, 1000, new ethers.utils.AbiCoder().encode(["string"], ["hello"]), - "0x0000000000000000000000000000000000000000000000000000000000000000" + ethers.constants.HashZero ) ).wait(); @@ -394,7 +409,7 @@ describe("ZetaConnector tests", () => { 1, 1000, new ethers.utils.AbiCoder().encode(["string"], ["hello"]), - "0x0000000000000000000000000000000000000000000000000000000000000000" + ethers.constants.HashZero ) ).wait(); @@ -455,7 +470,7 @@ describe("ZetaConnector tests", () => { it("Should burn Zeta token from the sender account", async () => { const initialBalanceDeployer = await zetaTokenNonEthContract.balanceOf(tssUpdater.address); - expect(initialBalanceDeployer.toString()).to.equal("100000000000000000000000"); + expect(initialBalanceDeployer.toString()).to.equal(parseEther("100000")); await tssUpdaterApproveConnectorNonEth(); @@ -465,13 +480,13 @@ describe("ZetaConnector tests", () => { destinationChainId: 1, gasLimit: 2500000, message: new ethers.utils.AbiCoder().encode(["string"], ["hello"]), - zetaAmount: 1000, + zetaAmount: parseEther("1"), zetaParams: new ethers.utils.AbiCoder().encode(["string"], ["hello"]), }) ).wait(); const finalBalanceDeployer = await zetaTokenNonEthContract.balanceOf(tssUpdater.address); - expect(finalBalanceDeployer.toString()).to.equal("99999999999999999999000"); + expect(finalBalanceDeployer.toString()).to.equal(parseEther("99999")); }); it("Should emit `ZetaSent` on success", async () => { @@ -506,7 +521,7 @@ describe("ZetaConnector tests", () => { randomSigner.address, 1000, new ethers.utils.AbiCoder().encode(["string"], ["hello"]), - "0x0000000000000000000000000000000000000000000000000000000000000000" + ethers.constants.HashZero ) ).to.revertedWith("Pausable: paused"); }); @@ -519,7 +534,7 @@ describe("ZetaConnector tests", () => { randomSigner.address, 1000, new ethers.utils.AbiCoder().encode(["string"], ["hello"]), - "0x0000000000000000000000000000000000000000000000000000000000000000" + ethers.constants.HashZero ) ).to.revertedWith(`CallerIsNotTss("${tssUpdater.address}")'`); }); @@ -539,9 +554,9 @@ describe("ZetaConnector tests", () => { zetaReceiverMockContract.address, 1000, new ethers.utils.AbiCoder().encode(["string"], ["hello"]), - "0x0000000000000000000000000000000000000000000000000000000000000000" + ethers.constants.HashZero ) - ).to.revertedWith(`CallerIsNotTssOrConnector("${zetaConnectorNonEthContract.address}")`); + ).to.revertedWith(`CallerIsNotConnector("${zetaConnectorNonEthContract.address}")`); }); it("Should mint on the receiver address", async () => { @@ -557,7 +572,7 @@ describe("ZetaConnector tests", () => { zetaReceiverMockContract.address, 1000, new ethers.utils.AbiCoder().encode(["string"], ["hello"]), - "0x0000000000000000000000000000000000000000000000000000000000000000" + ethers.constants.HashZero ) ).wait(); @@ -567,11 +582,9 @@ describe("ZetaConnector tests", () => { }); it("Should emit `ZetaReceived` on success", async () => { - await transfer100kZetaNonEth(zetaConnectorNonEthContract.address); - const zetaReceivedFilter = zetaConnectorNonEthContract.filters.ZetaReceived(); const e1 = await zetaConnectorNonEthContract.queryFilter(zetaReceivedFilter); - expect(e1.length).to.equal(0); + expect(e1.length).to.equal(1); await ( await zetaConnectorNonEthContract @@ -582,12 +595,12 @@ describe("ZetaConnector tests", () => { zetaReceiverMockContract.address, 1000, new ethers.utils.AbiCoder().encode(["string"], ["hello"]), - "0x0000000000000000000000000000000000000000000000000000000000000000" + ethers.constants.HashZero ) ).wait(); const e2 = await zetaConnectorNonEthContract.queryFilter(zetaReceivedFilter); - expect(e2.length).to.equal(1); + expect(e2.length).to.equal(2); }); }); @@ -605,7 +618,7 @@ describe("ZetaConnector tests", () => { 2, 1000, new ethers.utils.AbiCoder().encode(["string"], ["hello"]), - "0x0000000000000000000000000000000000000000000000000000000000000000" + ethers.constants.HashZero ) ).to.revertedWith("Pausable: paused"); }); @@ -619,7 +632,7 @@ describe("ZetaConnector tests", () => { 1, 1000, new ethers.utils.AbiCoder().encode(["string"], ["hello"]), - "0x0000000000000000000000000000000000000000000000000000000000000000" + ethers.constants.HashZero ) ).to.revertedWith(`CallerIsNotTss("${tssUpdater.address}")`); }); @@ -638,7 +651,7 @@ describe("ZetaConnector tests", () => { 1, 1000, new ethers.utils.AbiCoder().encode(["string"], ["hello"]), - "0x0000000000000000000000000000000000000000000000000000000000000000" + ethers.constants.HashZero ) ).wait(); @@ -663,7 +676,7 @@ describe("ZetaConnector tests", () => { 1, 1000, new ethers.utils.AbiCoder().encode(["string"], ["hello"]), - "0x0000000000000000000000000000000000000000000000000000000000000000" + ethers.constants.HashZero ) ).wait(); @@ -691,7 +704,7 @@ describe("ZetaConnector tests", () => { zetaReceiverMockContract.address, 1000, new ethers.utils.AbiCoder().encode(["string"], ["hello"]), - "0x0000000000000000000000000000000000000000000000000000000000000000" + ethers.constants.HashZero ) ).to.revertedWith(`ExceedsMaxSupply(999)`); }); @@ -713,7 +726,7 @@ describe("ZetaConnector tests", () => { zetaReceiverMockContract.address, supplyToAdd, new ethers.utils.AbiCoder().encode(["string"], ["hello"]), - "0x0000000000000000000000000000000000000000000000000000000000000000" + ethers.constants.HashZero ) ).to.be.not.reverted; @@ -730,7 +743,7 @@ describe("ZetaConnector tests", () => { zetaReceiverMockContract.address, 1, new ethers.utils.AbiCoder().encode(["string"], ["hello"]), - "0x0000000000000000000000000000000000000000000000000000000000000000" + ethers.constants.HashZero ) ).to.revertedWith(`ExceedsMaxSupply(${initialSupply.add(supplyToAdd)})`); @@ -744,7 +757,7 @@ describe("ZetaConnector tests", () => { 2, 1000, new ethers.utils.AbiCoder().encode(["string"], ["hello"]), - "0x0000000000000000000000000000000000000000000000000000000000000000" + ethers.constants.HashZero ) ).to.revertedWith(`ExceedsMaxSupply(${initialSupply.add(supplyToAdd)})`); }); diff --git a/packages/protocol-contracts/test/ZetaNonEth.spec.ts b/packages/protocol-contracts/test/ZetaNonEth.spec.ts new file mode 100644 index 00000000..826c4cd2 --- /dev/null +++ b/packages/protocol-contracts/test/ZetaNonEth.spec.ts @@ -0,0 +1,147 @@ +import { SignerWithAddress } from "@nomiclabs/hardhat-ethers/signers"; +import { expect } from "chai"; +import { parseEther } from "ethers/lib/utils"; +import { ethers } from "hardhat"; + +import { deployZetaConnectorNonEth, deployZetaNonEth, deployZetaReceiverMock } from "../lib/contracts.helpers"; +import { ZetaConnectorNonEth, ZetaNonEth, ZetaReceiverMock } from "../typechain-types"; + +describe("ZetaNonEth tests", () => { + let zetaTokenNonEthContract: ZetaNonEth; + let zetaReceiverMockContract: ZetaReceiverMock; + let zetaConnectorNonEthContract: ZetaConnectorNonEth; + let tssUpdater: SignerWithAddress; + let tssSigner: SignerWithAddress; + let randomSigner: SignerWithAddress; + + const tssUpdaterApproveConnectorNonEth = async () => { + await (await zetaTokenNonEthContract.approve(zetaConnectorNonEthContract.address, parseEther("100000"))).wait(); + }; + + const mint100kZetaNonEth = async (transferTo: string) => { + const zeta100k = parseEther("100000"); + + await ( + await zetaConnectorNonEthContract + .connect(tssSigner) + .onReceive(randomSigner.address, 1, transferTo, zeta100k, [], ethers.constants.HashZero) + ).wait(); + }; + + const transfer100kZetaNonEth = async (transferTo: string) => { + await mint100kZetaNonEth(tssUpdater.address); + + await (await zetaTokenNonEthContract.connect(tssUpdater).transfer(transferTo, 100_000)).wait(); + }; + + beforeEach(async () => { + const accounts = await ethers.getSigners(); + [tssUpdater, tssSigner, randomSigner] = accounts; + + zetaTokenNonEthContract = await deployZetaNonEth({ + args: [tssSigner.address, tssUpdater.address], + }); + + zetaReceiverMockContract = await deployZetaReceiverMock(); + zetaConnectorNonEthContract = await deployZetaConnectorNonEth({ + args: [zetaTokenNonEthContract.address, tssSigner.address, tssUpdater.address], + }); + + await zetaTokenNonEthContract.updateTssAndConnectorAddresses( + tssSigner.address, + zetaConnectorNonEthContract.address + ); + + await mint100kZetaNonEth(tssUpdater.address); + }); + + describe("updateTssAndConnectorAddresses", () => { + it("Should revert if the caller is not tssAddressUpdater", async () => { + expect( + zetaTokenNonEthContract + .connect(randomSigner) + .updateTssAndConnectorAddresses(tssSigner.address, zetaConnectorNonEthContract.address) + ).to.be.revertedWith(`CallerIsNotTssUpdater("${randomSigner.address}")`); + }); + + it("Should change the addresses if the caller is tssAddressUpdater", async () => { + await ( + await zetaTokenNonEthContract.updateTssAndConnectorAddresses(randomSigner.address, randomSigner.address) + ).wait(); + + expect(await zetaTokenNonEthContract.tssAddress()).to.equal(randomSigner.address); + expect(await zetaTokenNonEthContract.connectorAddress()).to.equal(randomSigner.address); + }); + }); + + describe("renounceTssAddressUpdater", () => { + it("Should revert if the caller is not tssAddressUpdater", async () => { + expect(zetaTokenNonEthContract.connect(randomSigner).renounceTssAddressUpdater()).to.be.revertedWith( + `CallerIsNotTssUpdater("${randomSigner.address}")` + ); + }); + + it("Should change tssAddressUpdater to tssAddress if the caller is tssAddressUpdater", async () => { + await (await zetaTokenNonEthContract.renounceTssAddressUpdater()).wait(); + + expect(await zetaTokenNonEthContract.tssAddressUpdater()).to.equal(tssSigner.address); + }); + }); + + describe("mint", () => { + it("Should revert if the caller is not the Connector contract", async () => { + expect( + zetaTokenNonEthContract.connect(randomSigner).mint(tssUpdater.address, 100_000, ethers.constants.AddressZero) + ).to.be.revertedWith(`CallerIsNotConnector("${randomSigner.address}")`); + }); + + it("Should emit `Minted` on success", async () => { + const zetaMintedFilter = zetaTokenNonEthContract.filters.Minted(); + const e1 = await zetaTokenNonEthContract.queryFilter(zetaMintedFilter); + expect(e1.length).to.equal(1); + + await ( + await zetaConnectorNonEthContract + .connect(tssSigner) + .onReceive( + randomSigner.address, + 1, + zetaReceiverMockContract.address, + 1000, + new ethers.utils.AbiCoder().encode(["string"], ["hello"]), + ethers.constants.HashZero + ) + ).wait(); + + const e2 = await zetaTokenNonEthContract.queryFilter(zetaMintedFilter); + expect(e2.length).to.equal(2); + }); + }); + + describe("burnFrom", () => { + it("Should revert if the caller is not the Connector contract", async () => { + expect(zetaTokenNonEthContract.connect(randomSigner).burnFrom(tssUpdater.address, 100_000)).to.be.revertedWith( + `CallerIsNotConnector("${randomSigner.address}")` + ); + }); + + it("Should emit `Burnt` on success", async () => { + await tssUpdaterApproveConnectorNonEth(); + const zetaBurntFilter = zetaTokenNonEthContract.filters.Burnt(); + const e1 = await zetaTokenNonEthContract.queryFilter(zetaBurntFilter); + expect(e1.length).to.equal(0); + + await zetaConnectorNonEthContract.send({ + destinationAddress: randomSigner.address, + destinationChainId: 1, + gasLimit: 2500000, + message: new ethers.utils.AbiCoder().encode(["string"], ["hello"]), + zetaAmount: 1000, + zetaParams: new ethers.utils.AbiCoder().encode(["string"], ["hello"]), + }); + + const e2 = await zetaTokenNonEthContract.queryFilter(zetaBurntFilter); + expect(e2.length).to.equal(1); + }); + }); +}); From 3ee58608bd1414410a11f3d05f6a2b2688d8fcea Mon Sep 17 00:00:00 2001 From: Lucas Date: Fri, 24 Jun 2022 15:08:34 -0300 Subject: [PATCH 009/115] Update contracts naming (#14) * Update gasLimit naming * originSenderAddress -> zetaTxSenderAddress * originChainId -> sourceChainId * origin -> sourceTxOriginAddress/zetaTxSender * zetaAmount -> zetaValueAndFees * zetaValueAndFees -> zetaValueAndGas * Improve comments --- .../cross-chain-counter/CrossChainCounter.sol | 12 +- .../test/CounterZetaConnectorMock.sol | 34 ++--- .../cross-chain-message/CrossChainMessage.sol | 12 +- .../CrossChainWarriors.sol | 16 +-- .../CrossChainWarriorsZetaConnectorMock.sol | 34 ++--- .../multi-chain-swap/MultiChainSwap.base.sol | 123 ++++++++++-------- .../multi-chain-swap/MultiChainSwapErrors.sol | 2 +- .../test/MultiChainSwapZetaConnector.sol | 38 +++--- .../multi-chain-value/MultiChainValue.sol | 12 +- .../test/CrossChainCounter.spec.ts | 6 +- .../test/CrossChainWarriors.spec.ts | 10 +- .../test/MultiChainSwap.spec.ts | 54 ++++---- .../test/MultiChainValue.spec.ts | 2 +- .../contracts/ZetaConnector.base.sol | 32 ++--- .../contracts/ZetaConnector.eth.sol | 50 +++---- .../contracts/ZetaConnector.non-eth.sol | 54 ++++---- .../contracts/ZetaInteractor.sol | 6 +- .../contracts/interfaces/ZetaInterfaces.sol | 22 ++-- .../contracts/testing/ZetaReceiverMock.sol | 4 +- .../scripts/test-zeta-send.ts | 4 +- .../test/ZetaConnector.spec.ts | 72 +++++----- .../test/ZetaInteractor.spec.ts | 20 +-- .../test/ZetaNonEth.spec.ts | 4 +- 23 files changed, 323 insertions(+), 300 deletions(-) diff --git a/packages/example-contracts/contracts/cross-chain-counter/CrossChainCounter.sol b/packages/example-contracts/contracts/cross-chain-counter/CrossChainCounter.sol index d11582a1..858bd2c8 100644 --- a/packages/example-contracts/contracts/cross-chain-counter/CrossChainCounter.sol +++ b/packages/example-contracts/contracts/cross-chain-counter/CrossChainCounter.sol @@ -39,9 +39,9 @@ contract CrossChainCounter is Ownable, ZetaReceiver { ZetaInterfaces.SendInput({ destinationChainId: _crossChainId, destinationAddress: _crossChainAddress, - gasLimit: 2500000, + destinationGasLimit: 2500000, message: abi.encode(CROSS_CHAIN_INCREMENT_MESSAGE, msg.sender), - zetaAmount: 0, + zetaValueAndGas: 0, zetaParams: abi.encode("") }) ); @@ -50,10 +50,10 @@ contract CrossChainCounter is Ownable, ZetaReceiver { function onZetaMessage(ZetaInterfaces.ZetaMessage calldata zetaMessage) external override { require(msg.sender == connectorAddress, "This function can only be called by the Connector contract"); require( - keccak256(zetaMessage.originSenderAddress) == keccak256(_crossChainAddress), + keccak256(zetaMessage.zetaTxSenderAddress) == keccak256(_crossChainAddress), "Cross-chain address doesn't match" ); - require(zetaMessage.originChainId == _crossChainId, "Cross-chain id doesn't match"); + require(zetaMessage.sourceChainId == _crossChainId, "Cross-chain id doesn't match"); (bytes32 messageType, address messageFrom) = abi.decode(zetaMessage.message, (bytes32, address)); @@ -64,8 +64,8 @@ contract CrossChainCounter is Ownable, ZetaReceiver { function onZetaRevert(ZetaInterfaces.ZetaRevert calldata zetaRevert) external override { require(msg.sender == connectorAddress, "This function can only be called by the Connector contract"); - require(zetaRevert.originSenderAddress == address(this), "Invalid originSenderAddress"); - require(zetaRevert.originChainId == currentChainId, "Invalid originChainId"); + require(zetaRevert.zetaTxSenderAddress == address(this), "Invalid zetaTxSenderAddress"); + require(zetaRevert.sourceChainId == currentChainId, "Invalid sourceChainId"); (bytes32 messageType, address messageFrom) = abi.decode(zetaRevert.message, (bytes32, address)); diff --git a/packages/example-contracts/contracts/cross-chain-counter/test/CounterZetaConnectorMock.sol b/packages/example-contracts/contracts/cross-chain-counter/test/CounterZetaConnectorMock.sol index 224ff443..22b2507e 100644 --- a/packages/example-contracts/contracts/cross-chain-counter/test/CounterZetaConnectorMock.sol +++ b/packages/example-contracts/contracts/cross-chain-counter/test/CounterZetaConnectorMock.sol @@ -7,56 +7,56 @@ import "../CrossChainCounter.sol"; contract CounterZetaConnectorMock is ZetaConnector { function callOnZetaMessage( - bytes memory originSenderAddress, - uint256 originChainId, + bytes memory zetaTxSenderAddress, + uint256 sourceChainId, address destinationAddress, - uint256 zetaAmount, + uint256 zetaValueAndGas, bytes calldata message ) public { return CrossChainCounter(destinationAddress).onZetaMessage( ZetaInterfaces.ZetaMessage({ - originSenderAddress: originSenderAddress, - originChainId: originChainId, + zetaTxSenderAddress: zetaTxSenderAddress, + sourceChainId: sourceChainId, destinationAddress: destinationAddress, - zetaAmount: zetaAmount, + zetaValueAndGas: zetaValueAndGas, message: message }) ); } function callOnZetaRevert( - address originSenderAddress, - uint256 originChainId, + address zetaTxSenderAddress, + uint256 sourceChainId, uint256 destinationChainId, bytes calldata destinationAddress, - uint256 zetaAmount, - uint256, // gasLimit + uint256 zetaValueAndGas, + uint256, // destinationGasLimit bytes calldata message ) public { return - CrossChainCounter(originSenderAddress).onZetaRevert( + CrossChainCounter(zetaTxSenderAddress).onZetaRevert( ZetaInterfaces.ZetaRevert({ - originSenderAddress: originSenderAddress, - originChainId: originChainId, + zetaTxSenderAddress: zetaTxSenderAddress, + sourceChainId: sourceChainId, destinationAddress: destinationAddress, destinationChainId: destinationChainId, - zetaAmount: zetaAmount, + zetaValueAndGas: zetaValueAndGas, message: message }) ); } function send(ZetaInterfaces.SendInput calldata sendInput) external override { - uint256 originChainId = sendInput.destinationChainId == 2 ? 1 : 2; + uint256 sourceChainId = sendInput.destinationChainId == 2 ? 1 : 2; address dest = address(uint160(bytes20(sendInput.destinationAddress))); return callOnZetaMessage( abi.encodePacked(msg.sender), - originChainId, + sourceChainId, dest, - sendInput.zetaAmount, + sendInput.zetaValueAndGas, sendInput.message ); } diff --git a/packages/example-contracts/contracts/cross-chain-message/CrossChainMessage.sol b/packages/example-contracts/contracts/cross-chain-message/CrossChainMessage.sol index 2e9f2b84..1c547d64 100644 --- a/packages/example-contracts/contracts/cross-chain-message/CrossChainMessage.sol +++ b/packages/example-contracts/contracts/cross-chain-message/CrossChainMessage.sol @@ -51,9 +51,9 @@ contract CrossChainMessage is Ownable { ZetaInterfaces.SendInput({ destinationChainId: _crossChainId, destinationAddress: _crossChainAddress, - gasLimit: 2500000, + destinationGasLimit: 2500000, message: abi.encode(HELLO_WORLD_MESSAGE_TYPE, "Hello, Cross-Chain World!"), - zetaAmount: 0, + zetaValueAndGas: 0, zetaParams: abi.encode("") }) ); @@ -62,10 +62,10 @@ contract CrossChainMessage is Ownable { function onZetaMessage(ZetaInterfaces.ZetaMessage calldata _zetaMessage) external { require(msg.sender == _zetaConnectorAddress, "This function can only be called by the Zeta Connector contract"); require( - keccak256(_zetaMessage.originSenderAddress) == keccak256(_crossChainAddress), + keccak256(_zetaMessage.zetaTxSenderAddress) == keccak256(_crossChainAddress), "Cross-chain address doesn't match" ); - require(_zetaMessage.originChainId == _crossChainId, "Cross-chain id doesn't match"); + require(_zetaMessage.sourceChainId == _crossChainId, "Cross-chain id doesn't match"); /** * @dev Decode should follow the signature of the message provided to zeta.send. @@ -87,8 +87,8 @@ contract CrossChainMessage is Ownable { */ function onZetaRevert(ZetaInterfaces.ZetaRevert calldata _zetaRevert) external { require(msg.sender == _zetaConnectorAddress, "This function can only be called by the Zeta Connector contract"); - require(_zetaRevert.originSenderAddress == address(this), "Invalid originSenderAddress"); - require(_zetaRevert.originChainId == _currentChainId, "Invalid originChainId"); + require(_zetaRevert.zetaTxSenderAddress == address(this), "Invalid zetaTxSenderAddress"); + require(_zetaRevert.sourceChainId == _currentChainId, "Invalid sourceChainId"); (bytes32 messageType, string memory helloWorldMessage) = abi.decode(_zetaRevert.message, (bytes32, string)); diff --git a/packages/example-contracts/contracts/cross-chain-warriors/CrossChainWarriors.sol b/packages/example-contracts/contracts/cross-chain-warriors/CrossChainWarriors.sol index 121a1a15..d7914510 100644 --- a/packages/example-contracts/contracts/cross-chain-warriors/CrossChainWarriors.sol +++ b/packages/example-contracts/contracts/cross-chain-warriors/CrossChainWarriors.sol @@ -96,10 +96,10 @@ contract CrossChainWarriors is ERC721("CrossChainWarriors", "CCWAR"), Ownable, Z function crossChainTransfer(address to, uint256 tokenId) external { require(_isApprovedOrOwner(_msgSender(), tokenId), "Transfer caller is not owner nor approved"); - uint256 zetaGasAmount = 18000000000000000000; + uint256 crossChainGas = 18000000000000000000; { - bool success = _zetaToken.transferFrom(msg.sender, connectorAddress, zetaGasAmount); + bool success = _zetaToken.transferFrom(msg.sender, connectorAddress, crossChainGas); require(success == true, "CrossChainWarriors: error approving zeta"); } @@ -109,9 +109,9 @@ contract CrossChainWarriors is ERC721("CrossChainWarriors", "CCWAR"), Ownable, Z ZetaInterfaces.SendInput({ destinationChainId: _crossChainId, destinationAddress: _crossChainAddress, - gasLimit: zetaGasAmount, + destinationGasLimit: 500000, message: abi.encode(CROSS_CHAIN_TRANSFER_MESSAGE, tokenId, msg.sender, to), - zetaAmount: zetaGasAmount, + zetaValueAndGas: crossChainGas, zetaParams: abi.encode("") }) ); @@ -120,10 +120,10 @@ contract CrossChainWarriors is ERC721("CrossChainWarriors", "CCWAR"), Ownable, Z function onZetaMessage(ZetaInterfaces.ZetaMessage calldata zetaMessage) external override { require(msg.sender == connectorAddress, "This function can only be called by the Connector contract"); require( - keccak256(zetaMessage.originSenderAddress) == keccak256(_crossChainAddress), + keccak256(zetaMessage.zetaTxSenderAddress) == keccak256(_crossChainAddress), "Cross-chain address doesn't match" ); - require(zetaMessage.originChainId == _crossChainId, "Cross-chain id doesn't match"); + require(zetaMessage.sourceChainId == _crossChainId, "Cross-chain id doesn't match"); ( bytes32 messageType, @@ -142,8 +142,8 @@ contract CrossChainWarriors is ERC721("CrossChainWarriors", "CCWAR"), Ownable, Z function onZetaRevert(ZetaInterfaces.ZetaRevert calldata zetaRevert) external override { require(msg.sender == connectorAddress, "This function can only be called by the Connector contract"); - require(zetaRevert.originSenderAddress == address(this), "Invalid originSenderAddress"); - require(zetaRevert.originChainId == _currentChainId, "Invalid originChainId"); + require(zetaRevert.zetaTxSenderAddress == address(this), "Invalid zetaTxSenderAddress"); + require(zetaRevert.sourceChainId == _currentChainId, "Invalid sourceChainId"); (bytes32 messageType, uint256 tokenId, address from) = abi.decode( zetaRevert.message, diff --git a/packages/example-contracts/contracts/cross-chain-warriors/test/CrossChainWarriorsZetaConnectorMock.sol b/packages/example-contracts/contracts/cross-chain-warriors/test/CrossChainWarriorsZetaConnectorMock.sol index e163ebfd..6acdad3f 100644 --- a/packages/example-contracts/contracts/cross-chain-warriors/test/CrossChainWarriorsZetaConnectorMock.sol +++ b/packages/example-contracts/contracts/cross-chain-warriors/test/CrossChainWarriorsZetaConnectorMock.sol @@ -7,56 +7,56 @@ import "../CrossChainWarriors.sol"; contract CrossChainWarriorsZetaConnectorMock is ZetaConnector { function callOnZetaMessage( - bytes memory originSenderAddress, - uint256 originChainId, + bytes memory zetaTxSenderAddress, + uint256 sourceChainId, address destinationAddress, - uint256 zetaAmount, + uint256 zetaValueAndGas, bytes calldata message ) public { return CrossChainWarriors(destinationAddress).onZetaMessage( ZetaInterfaces.ZetaMessage({ - originSenderAddress: originSenderAddress, - originChainId: originChainId, + zetaTxSenderAddress: zetaTxSenderAddress, + sourceChainId: sourceChainId, destinationAddress: destinationAddress, - zetaAmount: zetaAmount, + zetaValueAndGas: zetaValueAndGas, message: message }) ); } function callOnZetaRevert( - address originSenderAddress, - uint256 originChainId, + address zetaTxSenderAddress, + uint256 sourceChainId, uint256 destinationChainId, bytes calldata destinationAddress, - uint256 zetaAmount, - uint256, // gasLimit + uint256 zetaValueAndGas, + uint256, // destinationGasLimit bytes calldata message ) public { return - CrossChainWarriors(originSenderAddress).onZetaRevert( + CrossChainWarriors(zetaTxSenderAddress).onZetaRevert( ZetaInterfaces.ZetaRevert({ - originSenderAddress: originSenderAddress, - originChainId: originChainId, + zetaTxSenderAddress: zetaTxSenderAddress, + sourceChainId: sourceChainId, destinationAddress: destinationAddress, destinationChainId: destinationChainId, - zetaAmount: zetaAmount, + zetaValueAndGas: zetaValueAndGas, message: message }) ); } function send(ZetaInterfaces.SendInput calldata sendInput) external override { - uint256 originChainId = sendInput.destinationChainId == 2 ? 1 : 2; + uint256 sourceChainId = sendInput.destinationChainId == 2 ? 1 : 2; address dest = address(uint160(bytes20(sendInput.destinationAddress))); return callOnZetaMessage( abi.encodePacked(msg.sender), - originChainId, + sourceChainId, dest, - sendInput.zetaAmount, + sendInput.zetaValueAndGas, sendInput.message ); } diff --git a/packages/example-contracts/contracts/multi-chain-swap/MultiChainSwap.base.sol b/packages/example-contracts/contracts/multi-chain-swap/MultiChainSwap.base.sol index f13a6a3b..da56062f 100644 --- a/packages/example-contracts/contracts/multi-chain-swap/MultiChainSwap.base.sol +++ b/packages/example-contracts/contracts/multi-chain-swap/MultiChainSwap.base.sol @@ -19,8 +19,8 @@ contract MultiChainSwapBase is ZetaInteractor, ZetaReceiver, MultiChainSwapError IUniswapV2Router02 internal uniswapV2Router; event SentTokenSwap( - address originSender, - address originInputToken, + address sourceTxOrigin, + address sourceInputToken, uint256 inputTokenAmount, address destinationOutToken, uint256 outTokenMinAmount, @@ -28,7 +28,7 @@ contract MultiChainSwapBase is ZetaInteractor, ZetaReceiver, MultiChainSwapError ); event SentEthSwap( - address originSender, + address sourceTxOrigin, uint256 inputEthAmount, address destinationOutToken, uint256 outTokenMinAmount, @@ -36,8 +36,8 @@ contract MultiChainSwapBase is ZetaInteractor, ZetaReceiver, MultiChainSwapError ); event Swapped( - address originSender, - address originInputToken, + address sourceTxOrigin, + address sourceInputToken, uint256 inputTokenAmount, address destinationOutToken, uint256 outTokenFinalAmount, @@ -45,8 +45,8 @@ contract MultiChainSwapBase is ZetaInteractor, ZetaReceiver, MultiChainSwapError ); event RevertedSwap( - address originSender, - address originInputToken, + address sourceTxOrigin, + address sourceInputToken, uint256 inputTokenAmount, uint256 inputTokenReturnedAmount ); @@ -72,7 +72,7 @@ contract MultiChainSwapBase is ZetaInteractor, ZetaReceiver, MultiChainSwapError */ uint256 outTokenMinAmount, uint256 destinationChainId, - uint256 crossChainGasLimit + uint256 crossChaindestinationGasLimit ) external payable { if (!isValidChainId(destinationChainId)) revert InvalidDestinationChainId(); @@ -82,7 +82,7 @@ contract MultiChainSwapBase is ZetaInteractor, ZetaReceiver, MultiChainSwapError (destinationOutToken == address(0) && !isDestinationOutETH) ) revert OutTokenInvariant(); - uint256 zetaAmount; + uint256 zetaValueAndGas; { address[] memory path = new address[](2); path[0] = wETH; @@ -95,12 +95,12 @@ contract MultiChainSwapBase is ZetaInteractor, ZetaReceiver, MultiChainSwapError block.timestamp + MAX_DEADLINE ); - zetaAmount = amounts[path.length - 1]; + zetaValueAndGas = amounts[path.length - 1]; } - if (zetaAmount == 0) revert ErrorSwappingTokens(); + if (zetaValueAndGas == 0) revert ErrorSwappingTokens(); { - bool success = IERC20(zetaToken).approve(address(connector), zetaAmount); + bool success = IERC20(zetaToken).approve(address(connector), zetaValueAndGas); if (!success) revert ErrorApprovingTokens(zetaToken); } @@ -108,7 +108,7 @@ contract MultiChainSwapBase is ZetaInteractor, ZetaReceiver, MultiChainSwapError ZetaInterfaces.SendInput({ destinationChainId: destinationChainId, destinationAddress: interactorsByChainId[destinationChainId], - gasLimit: crossChainGasLimit, + destinationGasLimit: crossChaindestinationGasLimit, message: abi.encode( CROSS_CHAIN_SWAP_MESSAGE, msg.sender, @@ -120,14 +120,14 @@ contract MultiChainSwapBase is ZetaInteractor, ZetaReceiver, MultiChainSwapError outTokenMinAmount, true // inputTokenIsETH ), - zetaAmount: zetaAmount, + zetaValueAndGas: zetaValueAndGas, zetaParams: abi.encode("") }) ); } function swapTokensForTokensCrossChain( - address originInputToken, + address sourceInputToken, uint256 inputTokenAmount, bytes calldata receiverAddress, address destinationOutToken, @@ -138,43 +138,43 @@ contract MultiChainSwapBase is ZetaInteractor, ZetaReceiver, MultiChainSwapError */ uint256 outTokenMinAmount, uint256 destinationChainId, - uint256 crossChainGasLimit + uint256 crossChaindestinationGasLimit ) external { if (keccak256(interactorsByChainId[destinationChainId]) == keccak256(new bytes(0))) revert InvalidDestinationChainId(); - if (originInputToken == address(0)) revert MissingOriginInputTokenAddress(); + if (sourceInputToken == address(0)) revert MissingSourceInputTokenAddress(); if ( (destinationOutToken != address(0) && isDestinationOutETH) || (destinationOutToken == address(0) && !isDestinationOutETH) ) revert OutTokenInvariant(); - uint256 zetaAmount; + uint256 zetaValueAndGas; - if (originInputToken == zetaToken) { + if (sourceInputToken == zetaToken) { bool success1 = IERC20(zetaToken).transferFrom(msg.sender, address(this), inputTokenAmount); bool success2 = IERC20(zetaToken).approve(address(connector), inputTokenAmount); if (!success1 || !success2) revert ErrorTransferringTokens(zetaToken); - zetaAmount = inputTokenAmount; + zetaValueAndGas = inputTokenAmount; } else { /** * @dev If the input token is not Zeta, trade it using Uniswap */ { - bool success1 = IERC20(originInputToken).transferFrom(msg.sender, address(this), inputTokenAmount); - bool success2 = IERC20(originInputToken).approve(uniswapV2RouterAddress, inputTokenAmount); - if (!success1 || !success2) revert ErrorTransferringTokens(originInputToken); + bool success1 = IERC20(sourceInputToken).transferFrom(msg.sender, address(this), inputTokenAmount); + bool success2 = IERC20(sourceInputToken).approve(uniswapV2RouterAddress, inputTokenAmount); + if (!success1 || !success2) revert ErrorTransferringTokens(sourceInputToken); } address[] memory path; - if (originInputToken == wETH) { + if (sourceInputToken == wETH) { path = new address[](2); path[0] = wETH; path[1] = zetaToken; } else { path = new address[](3); - path[0] = originInputToken; + path[0] = sourceInputToken; path[1] = wETH; path[2] = zetaToken; } @@ -187,12 +187,12 @@ contract MultiChainSwapBase is ZetaInteractor, ZetaReceiver, MultiChainSwapError block.timestamp + MAX_DEADLINE ); - zetaAmount = amounts[path.length - 1]; - if (zetaAmount == 0) revert ErrorSwappingTokens(); + zetaValueAndGas = amounts[path.length - 1]; + if (zetaValueAndGas == 0) revert ErrorSwappingTokens(); } { - bool success = IERC20(zetaToken).approve(address(connector), zetaAmount); + bool success = IERC20(zetaToken).approve(address(connector), zetaValueAndGas); if (!success) revert ErrorApprovingTokens(zetaToken); } @@ -200,11 +200,11 @@ contract MultiChainSwapBase is ZetaInteractor, ZetaReceiver, MultiChainSwapError ZetaInterfaces.SendInput({ destinationChainId: destinationChainId, destinationAddress: interactorsByChainId[destinationChainId], - gasLimit: crossChainGasLimit, + destinationGasLimit: crossChaindestinationGasLimit, message: abi.encode( CROSS_CHAIN_SWAP_MESSAGE, msg.sender, - originInputToken, + sourceInputToken, inputTokenAmount, receiverAddress, destinationOutToken, @@ -212,7 +212,7 @@ contract MultiChainSwapBase is ZetaInteractor, ZetaReceiver, MultiChainSwapError outTokenMinAmount, false // inputTokenIsETH ), - zetaAmount: zetaAmount, + zetaValueAndGas: zetaValueAndGas, zetaParams: abi.encode("") }) ); @@ -225,8 +225,8 @@ contract MultiChainSwapBase is ZetaInteractor, ZetaReceiver, MultiChainSwapError { ( bytes32 messageType, - address originSender, - address originInputToken, + address sourceTxOrigin, + address sourceInputToken, uint256 inputTokenAmount, bytes memory receiverAddressEncoded, address destinationOutToken, @@ -241,18 +241,18 @@ contract MultiChainSwapBase is ZetaInteractor, ZetaReceiver, MultiChainSwapError uint256 outTokenFinalAmount; if (destinationOutToken == zetaToken) { - if (zetaMessage.zetaAmount < outTokenMinAmount) revert InsufficientOutToken(); + if (zetaMessage.zetaValueAndGas < outTokenMinAmount) revert InsufficientOutToken(); - bool success = IERC20(zetaToken).transfer(receiverAddress, zetaMessage.zetaAmount); + bool success = IERC20(zetaToken).transfer(receiverAddress, zetaMessage.zetaValueAndGas); if (!success) revert ErrorTransferringTokens(zetaToken); - outTokenFinalAmount = zetaMessage.zetaAmount; + outTokenFinalAmount = zetaMessage.zetaValueAndGas; } else { /** * @dev If the out token is not Zeta, get it using Uniswap */ { - bool success = IERC20(zetaToken).approve(uniswapV2RouterAddress, zetaMessage.zetaAmount); + bool success = IERC20(zetaToken).approve(uniswapV2RouterAddress, zetaMessage.zetaValueAndGas); if (!success) revert ErrorApprovingTokens(zetaToken); } @@ -271,7 +271,7 @@ contract MultiChainSwapBase is ZetaInteractor, ZetaReceiver, MultiChainSwapError uint256[] memory amounts; if (isDestinationOutETH) { amounts = uniswapV2Router.swapExactTokensForETH( - zetaMessage.zetaAmount, + zetaMessage.zetaValueAndGas, outTokenMinAmount, path, receiverAddress, @@ -279,7 +279,7 @@ contract MultiChainSwapBase is ZetaInteractor, ZetaReceiver, MultiChainSwapError ); } else { amounts = uniswapV2Router.swapExactTokensForTokens( - zetaMessage.zetaAmount, + zetaMessage.zetaValueAndGas, outTokenMinAmount, path, receiverAddress, @@ -293,8 +293,8 @@ contract MultiChainSwapBase is ZetaInteractor, ZetaReceiver, MultiChainSwapError } emit Swapped( - originSender, - originInputToken, + sourceTxOrigin, + sourceInputToken, inputTokenAmount, destinationOutToken, outTokenFinalAmount, @@ -308,28 +308,37 @@ contract MultiChainSwapBase is ZetaInteractor, ZetaReceiver, MultiChainSwapError isValidRevertCall(zetaRevert) { /** - * @dev: If something goes wrong we must swap to the original token + * @dev: If something goes wrong we must swap to the source input token */ - (, address originSender, address originInputToken, uint256 inputTokenAmount, , , , , bool inputTokenIsETH) = abi - .decode(zetaRevert.message, (bytes32, address, address, uint256, bytes, address, bool, uint256, bool)); + ( + , + address sourceTxOrigin, + address sourceInputToken, + uint256 inputTokenAmount, + , + , + , + , + bool inputTokenIsETH + ) = abi.decode(zetaRevert.message, (bytes32, address, address, uint256, bytes, address, bool, uint256, bool)); uint256 inputTokenReturnedAmount; - if (originInputToken == zetaToken) { - bool success1 = IERC20(zetaToken).approve(address(this), zetaRevert.zetaAmount); - bool success2 = IERC20(zetaToken).transferFrom(address(this), originSender, zetaRevert.zetaAmount); + if (sourceInputToken == zetaToken) { + bool success1 = IERC20(zetaToken).approve(address(this), zetaRevert.zetaValueAndGas); + bool success2 = IERC20(zetaToken).transferFrom(address(this), sourceTxOrigin, zetaRevert.zetaValueAndGas); if (!success1 || !success2) revert ErrorTransferringTokens(zetaToken); - inputTokenReturnedAmount = zetaRevert.zetaAmount; + inputTokenReturnedAmount = zetaRevert.zetaValueAndGas; } else { /** - * @dev If the original input token is not Zeta, trade it using Uniswap + * @dev If the source input token is not Zeta, trade it using Uniswap */ { - bool success = IERC20(zetaToken).approve(uniswapV2RouterAddress, zetaRevert.zetaAmount); + bool success = IERC20(zetaToken).approve(uniswapV2RouterAddress, zetaRevert.zetaValueAndGas); if (!success) revert ErrorTransferringTokens(zetaToken); } address[] memory path; - if (originInputToken == wETH) { + if (sourceInputToken == wETH) { path = new address[](2); path[0] = zetaToken; path[1] = wETH; @@ -337,25 +346,25 @@ contract MultiChainSwapBase is ZetaInteractor, ZetaReceiver, MultiChainSwapError path = new address[](3); path[0] = zetaToken; path[1] = wETH; - path[2] = originInputToken; + path[2] = sourceInputToken; } { uint256[] memory amounts; if (inputTokenIsETH) { amounts = uniswapV2Router.swapExactTokensForETH( - zetaRevert.zetaAmount, + zetaRevert.zetaValueAndGas, 0, /// @dev Any output is fine, otherwise the value will be stuck in the contract path, - originSender, + sourceTxOrigin, block.timestamp + MAX_DEADLINE ); } else { amounts = uniswapV2Router.swapExactTokensForTokens( - zetaRevert.zetaAmount, + zetaRevert.zetaValueAndGas, 0, /// @dev Any output is fine, otherwise the value will be stuck in the contract path, - originSender, + sourceTxOrigin, block.timestamp + MAX_DEADLINE ); } @@ -363,6 +372,6 @@ contract MultiChainSwapBase is ZetaInteractor, ZetaReceiver, MultiChainSwapError } } - emit RevertedSwap(originSender, originInputToken, inputTokenAmount, inputTokenReturnedAmount); + emit RevertedSwap(sourceTxOrigin, sourceInputToken, inputTokenAmount, inputTokenReturnedAmount); } } diff --git a/packages/example-contracts/contracts/multi-chain-swap/MultiChainSwapErrors.sol b/packages/example-contracts/contracts/multi-chain-swap/MultiChainSwapErrors.sol index 92042c40..d980f9ea 100644 --- a/packages/example-contracts/contracts/multi-chain-swap/MultiChainSwapErrors.sol +++ b/packages/example-contracts/contracts/multi-chain-swap/MultiChainSwapErrors.sol @@ -14,7 +14,7 @@ interface MultiChainSwapErrors { error InsufficientOutToken(); - error MissingOriginInputTokenAddress(); + error MissingSourceInputTokenAddress(); error InvalidMessageType(); } diff --git a/packages/example-contracts/contracts/multi-chain-swap/test/MultiChainSwapZetaConnector.sol b/packages/example-contracts/contracts/multi-chain-swap/test/MultiChainSwapZetaConnector.sol index bcc6a97f..e37cd10d 100644 --- a/packages/example-contracts/contracts/multi-chain-swap/test/MultiChainSwapZetaConnector.sol +++ b/packages/example-contracts/contracts/multi-chain-swap/test/MultiChainSwapZetaConnector.sol @@ -13,61 +13,61 @@ contract MultiChainSwapZetaConnector is ZetaConnector { } function callOnZetaMessage( - bytes memory originSenderAddress, - uint256 originChainId, + bytes memory zetaTxSenderAddress, + uint256 sourceChainId, address destinationAddress, - uint256 zetaAmount, + uint256 zetaValueAndGas, bytes calldata message ) public { return MultiChainSwapBase(payable(destinationAddress)).onZetaMessage( ZetaInterfaces.ZetaMessage({ - originSenderAddress: originSenderAddress, - originChainId: originChainId, + zetaTxSenderAddress: zetaTxSenderAddress, + sourceChainId: sourceChainId, destinationAddress: destinationAddress, - zetaAmount: zetaAmount, + zetaValueAndGas: zetaValueAndGas, message: message }) ); } function callOnZetaRevert( - address originSenderAddress, - uint256 originChainId, + address zetaTxSenderAddress, + uint256 sourceChainId, uint256 destinationChainId, bytes calldata destinationAddress, - uint256 zetaAmount, - uint256, // gasLimit + uint256 zetaValueAndGas, + uint256, // destinationGasLimit bytes calldata message ) public { return - MultiChainSwapBase(payable(originSenderAddress)).onZetaRevert( + MultiChainSwapBase(payable(zetaTxSenderAddress)).onZetaRevert( ZetaInterfaces.ZetaRevert({ - originSenderAddress: originSenderAddress, - originChainId: originChainId, + zetaTxSenderAddress: zetaTxSenderAddress, + sourceChainId: sourceChainId, destinationAddress: destinationAddress, destinationChainId: destinationChainId, - zetaAmount: zetaAmount, + zetaValueAndGas: zetaValueAndGas, message: message }) ); } function send(ZetaInterfaces.SendInput calldata sendInput) external override { - uint256 originChainId = sendInput.destinationChainId == 2 ? 1 : 2; + uint256 sourceChainId = sendInput.destinationChainId == 2 ? 1 : 2; address dest = address(uint160(bytes20(sendInput.destinationAddress))); - if (sendInput.zetaAmount > 0) { - bool success = IERC20(zetaToken).transferFrom(msg.sender, dest, sendInput.zetaAmount); + if (sendInput.zetaValueAndGas > 0) { + bool success = IERC20(zetaToken).transferFrom(msg.sender, dest, sendInput.zetaValueAndGas); require(success == true, "MultiChainSwap: error transferring token"); } return callOnZetaMessage( abi.encodePacked(msg.sender), - originChainId, + sourceChainId, dest, - sendInput.zetaAmount, + sendInput.zetaValueAndGas, sendInput.message ); } diff --git a/packages/example-contracts/contracts/multi-chain-value/MultiChainValue.sol b/packages/example-contracts/contracts/multi-chain-value/MultiChainValue.sol index 5509d9c0..a9b4e9da 100644 --- a/packages/example-contracts/contracts/multi-chain-value/MultiChainValue.sol +++ b/packages/example-contracts/contracts/multi-chain-value/MultiChainValue.sol @@ -33,22 +33,22 @@ contract MultiChainValue is Ownable { function send( uint256 destinationChainId, bytes calldata destinationAddress, - uint256 zetaAmount + uint256 zetaValueAndGas ) external { require(availableChainIds[destinationChainId], "MultiChainValue: destinationChainId not available"); - require(zetaAmount != 0, "MultiChainValue: zetaAmount should be greater than 0"); + require(zetaValueAndGas != 0, "MultiChainValue: zetaValueAndGas should be greater than 0"); - bool success1 = ZetaEth(zetaToken).approve(zetaConnector, zetaAmount); - bool success2 = ZetaEth(zetaToken).transferFrom(msg.sender, address(this), zetaAmount); + bool success1 = ZetaEth(zetaToken).approve(zetaConnector, zetaValueAndGas); + bool success2 = ZetaEth(zetaToken).transferFrom(msg.sender, address(this), zetaValueAndGas); require((success1 && success2) == true, "MultiChainValue: error transferring Zeta"); connector.send( ZetaInterfaces.SendInput({ destinationChainId: destinationChainId, destinationAddress: destinationAddress, - gasLimit: 300000, + destinationGasLimit: 300000, message: abi.encode(), - zetaAmount: zetaAmount, + zetaValueAndGas: zetaValueAndGas, zetaParams: abi.encode("") }) ); diff --git a/packages/example-contracts/test/CrossChainCounter.spec.ts b/packages/example-contracts/test/CrossChainCounter.spec.ts index d5c60124..33bcaf36 100644 --- a/packages/example-contracts/test/CrossChainCounter.spec.ts +++ b/packages/example-contracts/test/CrossChainCounter.spec.ts @@ -72,10 +72,10 @@ describe("CrossChainCounter tests", () => { it("Should revert if the caller is not the Connector contract", async () => { await expect( crossChainCounterContractA.onZetaMessage({ - originSenderAddress: ethers.utils.solidityPack(["address"], [crossChainCounterContractA.address]), - originChainId: 1, + zetaTxSenderAddress: ethers.utils.solidityPack(["address"], [crossChainCounterContractA.address]), + sourceChainId: 1, destinationAddress: crossChainCounterContractB.address, - zetaAmount: 0, + zetaValueAndGas: 0, message: encoder.encode(["address"], [deployerAddress]), }) ).to.be.revertedWith("This function can only be called by the Connector contract"); diff --git a/packages/example-contracts/test/CrossChainWarriors.spec.ts b/packages/example-contracts/test/CrossChainWarriors.spec.ts index 3eb8f663..9c29c3eb 100644 --- a/packages/example-contracts/test/CrossChainWarriors.spec.ts +++ b/packages/example-contracts/test/CrossChainWarriors.spec.ts @@ -145,10 +145,10 @@ describe("CrossChainWarriors tests", () => { it("Should revert if the caller is not the Connector contract", async () => { await expect( crossChainWarriorsContractChainA.onZetaMessage({ - originSenderAddress: ethers.utils.solidityPack(["address"], [crossChainWarriorsContractChainA.address]), - originChainId: 1, + zetaTxSenderAddress: ethers.utils.solidityPack(["address"], [crossChainWarriorsContractChainA.address]), + sourceChainId: 1, destinationAddress: crossChainWarriorsContractChainB.address, - zetaAmount: 0, + zetaValueAndGas: 0, message: encoder.encode(["address"], [deployerAddress]), }) ).to.be.revertedWith("This function can only be called by the Connector contract"); @@ -246,14 +246,14 @@ describe("CrossChainWarriors tests", () => { * @description note that given how this test was implemented, the NFT will exist in the two chains * that's not the real-world behavior but it's ok for this unit test */ - it("Should give the NFT back to the sender", async () => { + it("Should give the NFT back to the sourceTxOriginAddress", async () => { const nftId = 1; await (await crossChainWarriorsContractChainA.mintId(deployerAddress, nftId)).wait(); await (await crossChainWarriorsContractChainA.crossChainTransfer(deployerAddress, nftId)).wait(); - // Make sure that the NFT was removed from the origin chain + // Make sure that the NFT was removed from the source chain await expect(crossChainWarriorsContractChainA.ownerOf(nftId)).to.be.revertedWith( "ERC721: owner query for nonexistent token" ); diff --git a/packages/example-contracts/test/MultiChainSwap.spec.ts b/packages/example-contracts/test/MultiChainSwap.spec.ts index b4ae326f..ab1204cb 100644 --- a/packages/example-contracts/test/MultiChainSwap.spec.ts +++ b/packages/example-contracts/test/MultiChainSwap.spec.ts @@ -73,11 +73,11 @@ describe("MultiChainSwap tests", () => { await tx.wait(); }; - const swapZetaToUSDC = async (signer: SignerWithAddress, zetaAmount: BigNumber) => { + const swapZetaToUSDC = async (signer: SignerWithAddress, zetaValueAndGas: BigNumber) => { const path = [zetaTokenMock.address, WETH, USDC_ADDR]; const tx = await uniswapRouterFork .connect(signer) - .swapExactTokensForTokens(zetaAmount, 0, path, signer.address, (await getNow()) + 360); + .swapExactTokensForTokens(zetaValueAndGas, 0, path, signer.address, (await getNow()) + 360); await tx.wait(); }; @@ -142,7 +142,7 @@ describe("MultiChainSwap tests", () => { ).to.be.revertedWith(getCustomErrorMessage("InvalidDestinationChainId")); }); - it("Should revert if the originInputToken isn't provided", async () => { + it("Should revert if the sourceInputToken isn't provided", async () => { await expect( multiChainSwapContractA.swapTokensForTokensCrossChain( AddressZero, @@ -154,7 +154,7 @@ describe("MultiChainSwap tests", () => { chainBId, MaxUint256 ) - ).to.be.revertedWith(getCustomErrorMessage("MissingOriginInputTokenAddress")); + ).to.be.revertedWith(getCustomErrorMessage("MissingSourceInputTokenAddress")); }); it("Should revert if the destinationOutToken isn't provided", async () => { @@ -324,7 +324,7 @@ describe("MultiChainSwap tests", () => { await addZetaEthLiquidity(); await swapZetaToUSDC(deployer, parseUnits("10")); - const senderInitialZetaBalance = await zetaTokenMock.balanceOf(deployer.address); + const originAddressInitialZetaBalance = await zetaTokenMock.balanceOf(deployer.address); expect(await zetaTokenMock.balanceOf(account1.address)).to.be.eq(0); const ZETA_TO_TRANSFER = parseUnits("1"); @@ -367,7 +367,7 @@ describe("MultiChainSwap tests", () => { await expect(call).to.be.revertedWith(getCustomErrorMessage("InvalidDestinationChainId")); }); - it("Should revert if the originInputToken isn't provided", async () => { + it("Should revert if the sourceInputToken isn't provided", async () => { const call = multiChainSwapContractA.swapTokensForTokensCrossChain( AddressZero, ZETA_USDC_PRICE, @@ -379,7 +379,7 @@ describe("MultiChainSwap tests", () => { MaxUint256 ); - await expect(call).to.be.revertedWith(getCustomErrorMessage("MissingOriginInputTokenAddress")); + await expect(call).to.be.revertedWith(getCustomErrorMessage("MissingSourceInputTokenAddress")); }); it("Should revert if the destinationOutToken isn't provided", async () => { @@ -402,16 +402,16 @@ describe("MultiChainSwap tests", () => { it("Should revert if the caller is not ZetaConnector", async () => { await expect( multiChainSwapContractA.onZetaMessage({ - originSenderAddress: ethers.utils.solidityPack(["address"], [multiChainSwapContractA.address]), - originChainId: chainBId, + zetaTxSenderAddress: ethers.utils.solidityPack(["address"], [multiChainSwapContractA.address]), + sourceChainId: chainBId, destinationAddress: multiChainSwapContractB.address, - zetaAmount: 0, + zetaValueAndGas: 0, message: encoder.encode(["address"], [multiChainSwapContractA.address]), }) ).to.be.revertedWith(getCustomErrorMessage("InvalidCaller", [deployer.address])); }); - it("Should revert if the originSenderAddress it not in interactorsByChainId", async () => { + it("Should revert if the zetaTxSenderAddress it not in interactorsByChainId", async () => { await expect( zetaConnectorMock.callOnZetaMessage( ethers.utils.solidityPack(["address"], [multiChainSwapContractB.address]), @@ -428,11 +428,11 @@ describe("MultiChainSwap tests", () => { it("Should revert if the caller is not ZetaConnector", async () => { await expect( multiChainSwapContractA.onZetaRevert({ - originSenderAddress: deployer.address, - originChainId: chainAId, + zetaTxSenderAddress: deployer.address, + sourceChainId: chainAId, destinationAddress: ethers.utils.solidityPack(["address"], [multiChainSwapContractB.address]), destinationChainId: chainBId, - zetaAmount: 0, + zetaValueAndGas: 0, message: encoder.encode(["address"], [multiChainSwapContractA.address]), }) ).to.be.revertedWith(getCustomErrorMessage("InvalidCaller", [deployer.address])); @@ -445,7 +445,7 @@ describe("MultiChainSwap tests", () => { const tx1 = await zetaTokenMock.transfer(multiChainSwapContractA.address, parseUnits("100")); await tx1.wait(); - const senderInitialZetaBalance = await zetaTokenMock.balanceOf(deployer.address); + const originAddressInitialZetaBalance = await zetaTokenMock.balanceOf(deployer.address); const message = encoder.encode( ["bytes32", "address", "address", "uint256", "bytes", "address", "bool", "uint256", "bool"], @@ -474,8 +474,8 @@ describe("MultiChainSwap tests", () => { await tx2.wait(); - const senderFinalZetaBalance = await zetaTokenMock.balanceOf(deployer.address); - expect(senderFinalZetaBalance).to.be.eq(senderInitialZetaBalance.add(10)); + const originAddressFinalZetaBalance = await zetaTokenMock.balanceOf(deployer.address); + expect(originAddressFinalZetaBalance).to.be.eq(originAddressInitialZetaBalance.add(10)); }); it("Should trade the returned Zeta back for the input token", async () => { @@ -485,7 +485,7 @@ describe("MultiChainSwap tests", () => { const tx1 = await zetaTokenMock.transfer(multiChainSwapContractA.address, parseUnits("100")); await tx1.wait(); - const senderInitialUSDCBalance = await USDCTokenContract.balanceOf(deployer.address); + const originAddressInitialUSDCBalance = await USDCTokenContract.balanceOf(deployer.address); const message = encoder.encode( ["bytes32", "address", "address", "uint256", "bytes", "address", "bool", "uint256", "bool"], @@ -514,9 +514,11 @@ describe("MultiChainSwap tests", () => { await tx2.wait(); - const senderFinalUSDCBalance = await USDCTokenContract.balanceOf(deployer.address); - expect(senderFinalUSDCBalance).to.be.lt(senderInitialUSDCBalance.add(ZETA_USDC_PRICE)); - expect(senderFinalUSDCBalance).to.be.gt(senderInitialUSDCBalance.add(ZETA_USDC_PRICE).mul(995).div(1000)); + const originAddressFinalUSDCBalance = await USDCTokenContract.balanceOf(deployer.address); + expect(originAddressFinalUSDCBalance).to.be.lt(originAddressInitialUSDCBalance.add(ZETA_USDC_PRICE)); + expect(originAddressFinalUSDCBalance).to.be.gt( + originAddressInitialUSDCBalance.add(ZETA_USDC_PRICE).mul(995).div(1000) + ); }); it("Should trade the returned ETH back to the caller", async () => { @@ -526,7 +528,7 @@ describe("MultiChainSwap tests", () => { const tx1 = await zetaTokenMock.transfer(multiChainSwapContractA.address, parseUnits("100")); await tx1.wait(); - const senderInitialETHBalance = await ethers.provider.getBalance(deployer.address); + const originAddressInitialETHBalance = await ethers.provider.getBalance(deployer.address); const message = encoder.encode( ["bytes32", "address", "address", "uint256", "bytes", "address", "bool", "uint256", "bool"], @@ -555,9 +557,9 @@ describe("MultiChainSwap tests", () => { await tx2.wait(); - const senderFinalETHBalance = await ethers.provider.getBalance(deployer.address); - expect(senderFinalETHBalance).to.be.gt(senderInitialETHBalance.add("1")); - expect(senderFinalETHBalance).to.be.lt(senderInitialETHBalance.add("1").mul(1005).div(1000)); + const originAddressFinalETHBalance = await ethers.provider.getBalance(deployer.address); + expect(originAddressFinalETHBalance).to.be.gt(originAddressInitialETHBalance.add("1")); + expect(originAddressFinalETHBalance).to.be.lt(originAddressInitialETHBalance.add("1").mul(1005).div(1000)); }); it("Should emit a RevertedSwap event", async () => { @@ -567,7 +569,7 @@ describe("MultiChainSwap tests", () => { const tx1 = await zetaTokenMock.transfer(multiChainSwapContractA.address, parseUnits("100")); await tx1.wait(); - const senderInitialETHBalance = await ethers.provider.getBalance(deployer.address); + const originAddressInitialETHBalance = await ethers.provider.getBalance(deployer.address); const message = encoder.encode( ["bytes32", "address", "address", "uint256", "bytes", "address", "bool", "uint256", "bool"], diff --git a/packages/example-contracts/test/MultiChainValue.spec.ts b/packages/example-contracts/test/MultiChainValue.spec.ts index e47f2a80..06363278 100644 --- a/packages/example-contracts/test/MultiChainValue.spec.ts +++ b/packages/example-contracts/test/MultiChainValue.spec.ts @@ -82,7 +82,7 @@ describe("MultiChainValue tests", () => { await (await multiChainValueContractA.addAvailableChainId(1)).wait(); await expect(multiChainValueContractA.send(1, account1Address, 0)).to.be.revertedWith( - "MultiChainValue: zetaAmount should be greater than 0" + "MultiChainValue: zetaValueAndGas should be greater than 0" ); }); diff --git a/packages/protocol-contracts/contracts/ZetaConnector.base.sol b/packages/protocol-contracts/contracts/ZetaConnector.base.sol index 795a40e1..461a5abc 100644 --- a/packages/protocol-contracts/contracts/ZetaConnector.base.sol +++ b/packages/protocol-contracts/contracts/ZetaConnector.base.sol @@ -18,35 +18,35 @@ contract ZetaConnectorBase is ConnectorErrors, Pausable { address public tssAddressUpdater; event ZetaSent( - address indexed originSenderAddress, + address indexed zetaTxSenderAddress, uint256 destinationChainId, bytes destinationAddress, - uint256 zetaAmount, - uint256 gasLimit, + uint256 zetaValueAndGas, + uint256 destinationGasLimit, bytes message, bytes zetaParams ); event ZetaReceived( - bytes originSenderAddress, - uint256 indexed originChainId, + bytes zetaTxSenderAddress, + uint256 indexed sourceChainId, address indexed destinationAddress, - uint256 zetaAmount, + uint256 zetaValueAndGas, bytes message, bytes32 indexed internalSendHash ); event ZetaReverted( - address originSenderAddress, - uint256 originChainId, + address zetaTxSenderAddress, + uint256 sourceChainId, uint256 indexed destinationChainId, bytes indexed destinationAddress, - uint256 zetaAmount, + uint256 zetaValueAndGas, bytes message, bytes32 indexed internalSendHash ); - event TSSAddressUpdated(address originSenderAddress, address newTssAddress); + event TSSAddressUpdated(address zetaTxSenderAddress, address newTssAddress); constructor( address zetaToken_, @@ -100,20 +100,20 @@ contract ZetaConnectorBase is ConnectorErrors, Pausable { function send(ZetaInterfaces.SendInput calldata input) external virtual {} function onReceive( - bytes calldata originSenderAddress, - uint256 originChainId, + bytes calldata zetaTxSenderAddress, + uint256 sourceChainId, address destinationAddress, - uint256 zetaAmount, + uint256 zetaValueAndGas, bytes calldata message, bytes32 internalSendHash ) external virtual {} function onRevert( - address originSenderAddress, - uint256 originChainId, + address zetaTxSenderAddress, + uint256 sourceChainId, bytes calldata destinationAddress, uint256 destinationChainId, - uint256 zetaAmount, + uint256 zetaValueAndGas, bytes calldata message, bytes32 internalSendHash ) external virtual {} diff --git a/packages/protocol-contracts/contracts/ZetaConnector.eth.sol b/packages/protocol-contracts/contracts/ZetaConnector.eth.sol index 389da589..014d7de4 100644 --- a/packages/protocol-contracts/contracts/ZetaConnector.eth.sol +++ b/packages/protocol-contracts/contracts/ZetaConnector.eth.sol @@ -19,78 +19,84 @@ contract ZetaConnectorEth is ZetaConnectorBase { } function send(ZetaInterfaces.SendInput calldata input) external override whenNotPaused { - bool success = IERC20(zetaToken).transferFrom(msg.sender, address(this), input.zetaAmount); + bool success = IERC20(zetaToken).transferFrom(msg.sender, address(this), input.zetaValueAndGas); if (!success) revert ZetaTransferError(); emit ZetaSent( msg.sender, input.destinationChainId, input.destinationAddress, - input.zetaAmount, - input.gasLimit, + input.zetaValueAndGas, + input.destinationGasLimit, input.message, input.zetaParams ); } function onReceive( - bytes calldata originSenderAddress, - uint256 originChainId, + bytes calldata zetaTxSenderAddress, + uint256 sourceChainId, address destinationAddress, - uint256 zetaAmount, + uint256 zetaValueAndGas, bytes calldata message, bytes32 internalSendHash ) external override whenNotPaused onlyTssAddress { - bool success = IERC20(zetaToken).transfer(destinationAddress, zetaAmount); + bool success = IERC20(zetaToken).transfer(destinationAddress, zetaValueAndGas); if (!success) revert ZetaTransferError(); if (message.length > 0) { ZetaReceiver(destinationAddress).onZetaMessage( - ZetaInterfaces.ZetaMessage(originSenderAddress, originChainId, destinationAddress, zetaAmount, message) + ZetaInterfaces.ZetaMessage( + zetaTxSenderAddress, + sourceChainId, + destinationAddress, + zetaValueAndGas, + message + ) ); } emit ZetaReceived( - originSenderAddress, - originChainId, + zetaTxSenderAddress, + sourceChainId, destinationAddress, - zetaAmount, + zetaValueAndGas, message, internalSendHash ); } function onRevert( - address originSenderAddress, - uint256 originChainId, + address zetaTxSenderAddress, + uint256 sourceChainId, bytes calldata destinationAddress, uint256 destinationChainId, - uint256 zetaAmount, + uint256 zetaValueAndGas, bytes calldata message, bytes32 internalSendHash ) external override whenNotPaused onlyTssAddress { - bool success = IERC20(zetaToken).transfer(originSenderAddress, zetaAmount); + bool success = IERC20(zetaToken).transfer(zetaTxSenderAddress, zetaValueAndGas); require(success, "ZetaConnector: error transferring Zeta"); if (message.length > 0) { - ZetaReceiver(originSenderAddress).onZetaRevert( + ZetaReceiver(zetaTxSenderAddress).onZetaRevert( ZetaInterfaces.ZetaRevert( - originSenderAddress, - originChainId, + zetaTxSenderAddress, + sourceChainId, destinationAddress, destinationChainId, - zetaAmount, + zetaValueAndGas, message ) ); } emit ZetaReverted( - originSenderAddress, - originChainId, + zetaTxSenderAddress, + sourceChainId, destinationChainId, destinationAddress, - zetaAmount, + zetaValueAndGas, message, internalSendHash ); diff --git a/packages/protocol-contracts/contracts/ZetaConnector.non-eth.sol b/packages/protocol-contracts/contracts/ZetaConnector.non-eth.sol index e309d3ba..09de308e 100644 --- a/packages/protocol-contracts/contracts/ZetaConnector.non-eth.sol +++ b/packages/protocol-contracts/contracts/ZetaConnector.non-eth.sol @@ -34,77 +34,83 @@ contract ZetaConnectorNonEth is ZetaConnectorBase { } function send(ZetaInterfaces.SendInput calldata input) external override whenNotPaused { - ZetaToken(zetaToken).burnFrom(msg.sender, input.zetaAmount); + ZetaToken(zetaToken).burnFrom(msg.sender, input.zetaValueAndGas); emit ZetaSent( msg.sender, input.destinationChainId, input.destinationAddress, - input.zetaAmount, - input.gasLimit, + input.zetaValueAndGas, + input.destinationGasLimit, input.message, input.zetaParams ); } function onReceive( - bytes calldata originSenderAddress, - uint256 originChainId, + bytes calldata zetaTxSenderAddress, + uint256 sourceChainId, address destinationAddress, - uint256 zetaAmount, + uint256 zetaValueAndGas, bytes calldata message, bytes32 internalSendHash ) external override whenNotPaused onlyTssAddress { - if (zetaAmount + ZetaToken(zetaToken).totalSupply() > maxSupply) revert ExceedsMaxSupply(maxSupply); - ZetaToken(zetaToken).mint(destinationAddress, zetaAmount, internalSendHash); + if (zetaValueAndGas + ZetaToken(zetaToken).totalSupply() > maxSupply) revert ExceedsMaxSupply(maxSupply); + ZetaToken(zetaToken).mint(destinationAddress, zetaValueAndGas, internalSendHash); if (message.length > 0) { ZetaReceiver(destinationAddress).onZetaMessage( - ZetaInterfaces.ZetaMessage(originSenderAddress, originChainId, destinationAddress, zetaAmount, message) + ZetaInterfaces.ZetaMessage( + zetaTxSenderAddress, + sourceChainId, + destinationAddress, + zetaValueAndGas, + message + ) ); } emit ZetaReceived( - originSenderAddress, - originChainId, + zetaTxSenderAddress, + sourceChainId, destinationAddress, - zetaAmount, + zetaValueAndGas, message, internalSendHash ); } function onRevert( - address originSenderAddress, - uint256 originChainId, + address zetaTxSenderAddress, + uint256 sourceChainId, bytes calldata destinationAddress, uint256 destinationChainId, - uint256 zetaAmount, + uint256 zetaValueAndGas, bytes calldata message, bytes32 internalSendHash ) external override whenNotPaused onlyTssAddress { - if (zetaAmount + ZetaToken(zetaToken).totalSupply() > maxSupply) revert ExceedsMaxSupply(maxSupply); - ZetaToken(zetaToken).mint(originSenderAddress, zetaAmount, internalSendHash); + if (zetaValueAndGas + ZetaToken(zetaToken).totalSupply() > maxSupply) revert ExceedsMaxSupply(maxSupply); + ZetaToken(zetaToken).mint(zetaTxSenderAddress, zetaValueAndGas, internalSendHash); if (message.length > 0) { - ZetaReceiver(originSenderAddress).onZetaRevert( + ZetaReceiver(zetaTxSenderAddress).onZetaRevert( ZetaInterfaces.ZetaRevert( - originSenderAddress, - originChainId, + zetaTxSenderAddress, + sourceChainId, destinationAddress, destinationChainId, - zetaAmount, + zetaValueAndGas, message ) ); } emit ZetaReverted( - originSenderAddress, - originChainId, + zetaTxSenderAddress, + sourceChainId, destinationChainId, destinationAddress, - zetaAmount, + zetaValueAndGas, message, internalSendHash ); diff --git a/packages/protocol-contracts/contracts/ZetaInteractor.sol b/packages/protocol-contracts/contracts/ZetaInteractor.sol index bcd743f6..69d7742c 100644 --- a/packages/protocol-contracts/contracts/ZetaInteractor.sol +++ b/packages/protocol-contracts/contracts/ZetaInteractor.sol @@ -21,15 +21,15 @@ abstract contract ZetaInteractor is Ownable, ZetaInteractorErrors { modifier isValidMessageCall(ZetaInterfaces.ZetaMessage calldata zetaMessage) { _isValidCaller(); - if (keccak256(zetaMessage.originSenderAddress) != keccak256(interactorsByChainId[zetaMessage.originChainId])) + if (keccak256(zetaMessage.zetaTxSenderAddress) != keccak256(interactorsByChainId[zetaMessage.sourceChainId])) revert InvalidZetaMessageCall(); _; } modifier isValidRevertCall(ZetaInterfaces.ZetaRevert calldata zetaRevert) { _isValidCaller(); - if (zetaRevert.originSenderAddress != address(this)) revert InvalidZetaRevertCall(); - if (zetaRevert.originChainId != currentChainId) revert InvalidZetaRevertCall(); + if (zetaRevert.zetaTxSenderAddress != address(this)) revert InvalidZetaRevertCall(); + if (zetaRevert.sourceChainId != currentChainId) revert InvalidZetaRevertCall(); _; } diff --git a/packages/protocol-contracts/contracts/interfaces/ZetaInterfaces.sol b/packages/protocol-contracts/contracts/interfaces/ZetaInterfaces.sol index eab35bb3..05250aae 100644 --- a/packages/protocol-contracts/contracts/interfaces/ZetaInterfaces.sol +++ b/packages/protocol-contracts/contracts/interfaces/ZetaInterfaces.sol @@ -8,14 +8,14 @@ interface ZetaInterfaces { struct SendInput { /// @dev Chain id of the destination chain. More about chain ids https://docs.zetachain.com/learn/glossary#chain-id uint256 destinationChainId; - /// @dev Address to send to on the destination chain (expressed in bytes since it can be non-EVM) + /// @dev Address receiving the message on the destination chain (expressed in bytes since it can be non-EVM) bytes destinationAddress; - /// @dev Gas amount limit for the destination chain's transaction - uint256 gasLimit; + /// @dev Gas limit for the destination chain's transaction + uint256 destinationGasLimit; /// @dev An encoded, arbitrary message to be parsed by the destination contract bytes message; - /// @dev The amount of ZETA that you want to send cross-chain + the gas fees to be paid for the transaction - uint256 zetaAmount; + /// @dev ZETA to be sent cross-chain + ZetaChain gas fees + destination chain gas fees (expressed in ZETA) + uint256 zetaValueAndGas; /// @dev Optional parameters for the ZetaChain protocol bytes zetaParams; } @@ -24,10 +24,10 @@ interface ZetaInterfaces { * @dev Our Connector calls onZetaMessage with this struct as argument */ struct ZetaMessage { - bytes originSenderAddress; - uint256 originChainId; + bytes zetaTxSenderAddress; + uint256 sourceChainId; address destinationAddress; - uint256 zetaAmount; + uint256 zetaValueAndGas; bytes message; } @@ -35,11 +35,11 @@ interface ZetaInterfaces { * @dev Our Connector calls onZetaRevert with this struct as argument */ struct ZetaRevert { - address originSenderAddress; - uint256 originChainId; + address zetaTxSenderAddress; + uint256 sourceChainId; bytes destinationAddress; uint256 destinationChainId; - uint256 zetaAmount; + uint256 zetaValueAndGas; bytes message; } } diff --git a/packages/protocol-contracts/contracts/testing/ZetaReceiverMock.sol b/packages/protocol-contracts/contracts/testing/ZetaReceiverMock.sol index a90829fa..808d07b7 100644 --- a/packages/protocol-contracts/contracts/testing/ZetaReceiverMock.sol +++ b/packages/protocol-contracts/contracts/testing/ZetaReceiverMock.sol @@ -6,13 +6,13 @@ import "../interfaces/ZetaInterfaces.sol"; contract ZetaReceiverMock is ZetaReceiver { event MockOnZetaMessage(address destinationAddress); - event MockOnZetaRevert(address originSenderAddress); + event MockOnZetaRevert(address zetaTxSenderAddress); function onZetaMessage(ZetaInterfaces.ZetaMessage calldata zetaMessage) external override { emit MockOnZetaMessage(zetaMessage.destinationAddress); } function onZetaRevert(ZetaInterfaces.ZetaRevert calldata zetaRevert) external override { - emit MockOnZetaRevert(zetaRevert.originSenderAddress); + emit MockOnZetaRevert(zetaRevert.zetaTxSenderAddress); } } diff --git a/packages/protocol-contracts/scripts/test-zeta-send.ts b/packages/protocol-contracts/scripts/test-zeta-send.ts index f3b2d00c..8395ae8e 100644 --- a/packages/protocol-contracts/scripts/test-zeta-send.ts +++ b/packages/protocol-contracts/scripts/test-zeta-send.ts @@ -16,9 +16,9 @@ async function main() { await contract.send({ destinationChainId: getChainId("bsc-testnet"), destinationAddress: encoder.encode(["address"], ["0x09b80BEcBe709Dd354b1363727514309d1Ac3C7b"]), - gasLimit: 1_000_000, + destinationGasLimit: 1_000_000, message: encoder.encode(["address"], ["0x09b80BEcBe709Dd354b1363727514309d1Ac3C7b"]), - zetaAmount: 0, + zetaValueAndGas: 0, zetaParams: [], }) ).wait(); diff --git a/packages/protocol-contracts/test/ZetaConnector.spec.ts b/packages/protocol-contracts/test/ZetaConnector.spec.ts index dad69dc4..3b923b3d 100644 --- a/packages/protocol-contracts/test/ZetaConnector.spec.ts +++ b/packages/protocol-contracts/test/ZetaConnector.spec.ts @@ -147,15 +147,15 @@ describe("ZetaConnector tests", () => { zetaConnectorEthContract.send({ destinationAddress: randomSigner.address, destinationChainId: 1, - gasLimit: 2500000, + destinationGasLimit: 2500000, message: new ethers.utils.AbiCoder().encode(["string"], ["hello"]), - zetaAmount: 1000, + zetaValueAndGas: 1000, zetaParams: new ethers.utils.AbiCoder().encode(["string"], ["hello"]), }) ).to.revertedWith("Pausable: paused"); }); - it("Should revert if the sender has no enough zeta", async () => { + it("Should revert if the zetaTxSender has no enough zeta", async () => { await ( await zetaTokenEthContract.connect(randomSigner).approve(zetaConnectorEthContract.address, 100_000) ).wait(); @@ -164,28 +164,28 @@ describe("ZetaConnector tests", () => { zetaConnectorEthContract.connect(randomSigner).send({ destinationAddress: randomSigner.address, destinationChainId: 1, - gasLimit: 2500000, + destinationGasLimit: 2500000, message: new ethers.utils.AbiCoder().encode(["string"], ["hello"]), - zetaAmount: 1000, + zetaValueAndGas: 1000, zetaParams: new ethers.utils.AbiCoder().encode(["string"], ["hello"]), }) ).to.revertedWith("ERC20: transfer amount exceeds balance"); }); - it("Should revert if the sender didn't allow ZetaConnector to spend Zeta token", async () => { + it("Should revert if the zetaTxSender didn't allow ZetaConnector to spend Zeta token", async () => { await expect( zetaConnectorEthContract.send({ destinationAddress: randomSigner.address, destinationChainId: 1, - gasLimit: 2500000, + destinationGasLimit: 2500000, message: new ethers.utils.AbiCoder().encode(["string"], ["hello"]), - zetaAmount: 1000, + zetaValueAndGas: 1000, zetaParams: new ethers.utils.AbiCoder().encode(["string"], ["hello"]), }) ).to.revertedWith("ERC20: insufficient allowance"); }); - it("Should transfer Zeta token from the sender account to the Connector contract", async () => { + it("Should transfer Zeta token from the zetaTxSender account to the Connector contract", async () => { const initialBalanceDeployer = await zetaTokenEthContract.balanceOf(tssUpdater.address); const initialBalanceConnector = await zetaTokenEthContract.balanceOf(zetaConnectorEthContract.address); @@ -198,9 +198,9 @@ describe("ZetaConnector tests", () => { await zetaConnectorEthContract.send({ destinationAddress: randomSigner.address, destinationChainId: 1, - gasLimit: 2500000, + destinationGasLimit: 2500000, message: new ethers.utils.AbiCoder().encode(["string"], ["hello"]), - zetaAmount: 1000, + zetaValueAndGas: 1000, zetaParams: new ethers.utils.AbiCoder().encode(["string"], ["hello"]), }) ).wait(); @@ -220,9 +220,9 @@ describe("ZetaConnector tests", () => { await zetaConnectorEthContract.send({ destinationAddress: randomSigner.address, destinationChainId: 1, - gasLimit: 2500000, + destinationGasLimit: 2500000, message: new ethers.utils.AbiCoder().encode(["string"], ["hello"]), - zetaAmount: 0, + zetaValueAndGas: 0, zetaParams: new ethers.utils.AbiCoder().encode(["string"], ["hello"]), }); @@ -363,13 +363,13 @@ describe("ZetaConnector tests", () => { ).to.revertedWith(`CallerIsNotTss("${tssUpdater.address}")`); }); - it("Should transfer to the origin address", async () => { + it("Should transfer to the zetaTxSender address", async () => { await transfer100kZetaEth(zetaConnectorEthContract.address); const initialBalanceConnector = await zetaTokenEthContract.balanceOf(zetaConnectorEthContract.address); - const initialBalanceSender = await zetaTokenEthContract.balanceOf(zetaReceiverMockContract.address); + const initialBalanceZetaTxSender = await zetaTokenEthContract.balanceOf(zetaReceiverMockContract.address); expect(initialBalanceConnector.toString()).to.equal("100000"); - expect(initialBalanceSender.toString()).to.equal("0"); + expect(initialBalanceZetaTxSender.toString()).to.equal("0"); await ( await zetaConnectorEthContract @@ -386,10 +386,10 @@ describe("ZetaConnector tests", () => { ).wait(); const finalBalanceConnector = await zetaTokenEthContract.balanceOf(zetaConnectorEthContract.address); - const finalBalanceSender = await zetaTokenEthContract.balanceOf(zetaReceiverMockContract.address); + const finalBalanceZetaTxSender = await zetaTokenEthContract.balanceOf(zetaReceiverMockContract.address); expect(finalBalanceConnector.toString()).to.equal("99000"); - expect(finalBalanceSender.toString()).to.equal("1000"); + expect(finalBalanceZetaTxSender.toString()).to.equal("1000"); }); it("Should emit `ZetaReverted` on success", async () => { @@ -430,15 +430,15 @@ describe("ZetaConnector tests", () => { zetaConnectorNonEthContract.send({ destinationAddress: randomSigner.address, destinationChainId: 1, - gasLimit: 2500000, + destinationGasLimit: 2500000, message: new ethers.utils.AbiCoder().encode(["string"], ["hello"]), - zetaAmount: 1000, + zetaValueAndGas: 1000, zetaParams: new ethers.utils.AbiCoder().encode(["string"], ["hello"]), }) ).to.revertedWith("Pausable: paused"); }); - it("Should revert if the sender has no enough zeta", async () => { + it("Should revert if the zetaTxSender has no enough zeta", async () => { await ( await zetaTokenEthContract.connect(randomSigner).approve(zetaConnectorEthContract.address, 100_000) ).wait(); @@ -447,28 +447,28 @@ describe("ZetaConnector tests", () => { zetaConnectorNonEthContract.connect(randomSigner).send({ destinationAddress: randomSigner.address, destinationChainId: 1, - gasLimit: 2500000, + destinationGasLimit: 2500000, message: new ethers.utils.AbiCoder().encode(["string"], ["hello"]), - zetaAmount: 1000, + zetaValueAndGas: 1000, zetaParams: new ethers.utils.AbiCoder().encode(["string"], ["hello"]), }) ).to.revertedWith("ERC20: insufficient allowance"); }); - it("Should revert if the sender didn't allow ZetaConnector to spend Zeta token", async () => { + it("Should revert if the zetaTxSender didn't allow ZetaConnector to spend Zeta token", async () => { await expect( zetaConnectorNonEthContract.send({ destinationAddress: randomSigner.address, destinationChainId: 1, - gasLimit: 2500000, + destinationGasLimit: 2500000, message: new ethers.utils.AbiCoder().encode(["string"], ["hello"]), - zetaAmount: 1000, + zetaValueAndGas: 1000, zetaParams: new ethers.utils.AbiCoder().encode(["string"], ["hello"]), }) ).to.revertedWith("ERC20: insufficient allowance"); }); - it("Should burn Zeta token from the sender account", async () => { + it("Should burn Zeta token from the zetaTxSender account", async () => { const initialBalanceDeployer = await zetaTokenNonEthContract.balanceOf(tssUpdater.address); expect(initialBalanceDeployer.toString()).to.equal(parseEther("100000")); @@ -478,9 +478,9 @@ describe("ZetaConnector tests", () => { await zetaConnectorNonEthContract.send({ destinationAddress: randomSigner.address, destinationChainId: 1, - gasLimit: 2500000, + destinationGasLimit: 2500000, message: new ethers.utils.AbiCoder().encode(["string"], ["hello"]), - zetaAmount: parseEther("1"), + zetaValueAndGas: parseEther("1"), zetaParams: new ethers.utils.AbiCoder().encode(["string"], ["hello"]), }) ).wait(); @@ -497,9 +497,9 @@ describe("ZetaConnector tests", () => { await zetaConnectorNonEthContract.send({ destinationAddress: randomSigner.address, destinationChainId: 1, - gasLimit: 2500000, + destinationGasLimit: 2500000, message: new ethers.utils.AbiCoder().encode(["string"], ["hello"]), - zetaAmount: 0, + zetaValueAndGas: 0, zetaParams: new ethers.utils.AbiCoder().encode(["string"], ["hello"]), }); @@ -637,9 +637,9 @@ describe("ZetaConnector tests", () => { ).to.revertedWith(`CallerIsNotTss("${tssUpdater.address}")`); }); - it("Should mint on the origin address", async () => { - const initialBalanceSender = await zetaTokenNonEthContract.balanceOf(zetaReceiverMockContract.address); - expect(initialBalanceSender.toString()).to.equal("0"); + it("Should mint on the zetaTxSender address", async () => { + const initialBalanceZetaTxSender = await zetaTokenNonEthContract.balanceOf(zetaReceiverMockContract.address); + expect(initialBalanceZetaTxSender.toString()).to.equal("0"); await ( await zetaConnectorNonEthContract @@ -655,8 +655,8 @@ describe("ZetaConnector tests", () => { ) ).wait(); - const finalBalanceSender = await zetaTokenNonEthContract.balanceOf(zetaReceiverMockContract.address); - expect(finalBalanceSender.toString()).to.equal("1000"); + const finalBalanceZetaTxSender = await zetaTokenNonEthContract.balanceOf(zetaReceiverMockContract.address); + expect(finalBalanceZetaTxSender.toString()).to.equal("1000"); }); it("Should emit `ZetaReverted` on success", async () => { diff --git a/packages/protocol-contracts/test/ZetaInteractor.spec.ts b/packages/protocol-contracts/test/ZetaInteractor.spec.ts index fcdbccb9..67c9de81 100644 --- a/packages/protocol-contracts/test/ZetaInteractor.spec.ts +++ b/packages/protocol-contracts/test/ZetaInteractor.spec.ts @@ -34,22 +34,22 @@ describe("ZetaInteractor tests", () => { it("Should revert if the caller is not ZetaConnector", async () => { await expect( zetaInteractorMock.onZetaMessage({ - originSenderAddress: ethers.utils.solidityPack(["address"], [zetaInteractorMock.address]), - originChainId: chainBId, + zetaTxSenderAddress: ethers.utils.solidityPack(["address"], [zetaInteractorMock.address]), + sourceChainId: chainBId, destinationAddress: crossChainContractB.address, - zetaAmount: 0, + zetaValueAndGas: 0, message: encoder.encode(["address"], [zetaInteractorMock.address]), }) ).to.be.revertedWith(getCustomErrorMessage("InvalidCaller", [deployer.address])); }); - it("Should revert if the originSenderAddress it not in interactorsByChainId", async () => { + it("Should revert if the zetaTxSenderAddress it not in interactorsByChainId", async () => { await expect( zetaInteractorMock.connect(zetaConnector).onZetaMessage({ - originSenderAddress: ethers.utils.solidityPack(["address"], [zetaInteractorMock.address]), - originChainId: chainBId, + zetaTxSenderAddress: ethers.utils.solidityPack(["address"], [zetaInteractorMock.address]), + sourceChainId: chainBId, destinationAddress: crossChainContractB.address, - zetaAmount: 0, + zetaValueAndGas: 0, message: encoder.encode(["address"], [crossChainContractB.address]), }) ).to.be.revertedWith(getCustomErrorMessage("InvalidZetaMessageCall")); @@ -60,11 +60,11 @@ describe("ZetaInteractor tests", () => { it("Should revert if the caller is not ZetaConnector", async () => { await expect( zetaInteractorMock.onZetaRevert({ - originSenderAddress: deployer.address, - originChainId: chainAId, + zetaTxSenderAddress: deployer.address, + sourceChainId: chainAId, destinationAddress: ethers.utils.solidityPack(["address"], [crossChainContractB.address]), destinationChainId: chainBId, - zetaAmount: 0, + zetaValueAndGas: 0, message: encoder.encode(["address"], [zetaInteractorMock.address]), }) ).to.be.revertedWith(getCustomErrorMessage("InvalidCaller", [deployer.address])); diff --git a/packages/protocol-contracts/test/ZetaNonEth.spec.ts b/packages/protocol-contracts/test/ZetaNonEth.spec.ts index 826c4cd2..28545b76 100644 --- a/packages/protocol-contracts/test/ZetaNonEth.spec.ts +++ b/packages/protocol-contracts/test/ZetaNonEth.spec.ts @@ -134,9 +134,9 @@ describe("ZetaNonEth tests", () => { await zetaConnectorNonEthContract.send({ destinationAddress: randomSigner.address, destinationChainId: 1, - gasLimit: 2500000, + destinationGasLimit: 2500000, message: new ethers.utils.AbiCoder().encode(["string"], ["hello"]), - zetaAmount: 1000, + zetaValueAndGas: 1000, zetaParams: new ethers.utils.AbiCoder().encode(["string"], ["hello"]), }); From 529775673bc3ca93a5991d7a40419173f7ab744c Mon Sep 17 00:00:00 2001 From: Lucas Date: Mon, 27 Jun 2022 10:08:43 -0300 Subject: [PATCH 010/115] Rename ZetaEth/ZetaNonEth to zeta.eth/zeta.non-eth (#18) --- .../contracts/multi-chain-value/MultiChainValue.sol | 2 +- .../contracts/{ZetaEth.sol => Zeta.eth.sol} | 0 .../contracts/{ZetaNonEth.sol => Zeta.non-eth.sol} | 0 packages/protocol-contracts/scripts/verify-contracts.ts | 4 ++-- .../test/{ZetaNonEth.spec.ts => Zeta.non-eth.spec.ts} | 0 5 files changed, 3 insertions(+), 3 deletions(-) rename packages/protocol-contracts/contracts/{ZetaEth.sol => Zeta.eth.sol} (100%) rename packages/protocol-contracts/contracts/{ZetaNonEth.sol => Zeta.non-eth.sol} (100%) rename packages/protocol-contracts/test/{ZetaNonEth.spec.ts => Zeta.non-eth.spec.ts} (100%) diff --git a/packages/example-contracts/contracts/multi-chain-value/MultiChainValue.sol b/packages/example-contracts/contracts/multi-chain-value/MultiChainValue.sol index a9b4e9da..2abf32ee 100644 --- a/packages/example-contracts/contracts/multi-chain-value/MultiChainValue.sol +++ b/packages/example-contracts/contracts/multi-chain-value/MultiChainValue.sol @@ -2,7 +2,7 @@ pragma solidity 0.8.7; import "@openzeppelin/contracts/access/Ownable.sol"; -import "@zetachain/protocol-contracts/contracts/ZetaEth.sol"; +import "@zetachain/protocol-contracts/contracts/Zeta.eth.sol"; import "@zetachain/protocol-contracts/contracts/interfaces/ZetaInterfaces.sol"; contract MultiChainValue is Ownable { diff --git a/packages/protocol-contracts/contracts/ZetaEth.sol b/packages/protocol-contracts/contracts/Zeta.eth.sol similarity index 100% rename from packages/protocol-contracts/contracts/ZetaEth.sol rename to packages/protocol-contracts/contracts/Zeta.eth.sol diff --git a/packages/protocol-contracts/contracts/ZetaNonEth.sol b/packages/protocol-contracts/contracts/Zeta.non-eth.sol similarity index 100% rename from packages/protocol-contracts/contracts/ZetaNonEth.sol rename to packages/protocol-contracts/contracts/Zeta.non-eth.sol diff --git a/packages/protocol-contracts/scripts/verify-contracts.ts b/packages/protocol-contracts/scripts/verify-contracts.ts index f056a73f..6b71a866 100644 --- a/packages/protocol-contracts/scripts/verify-contracts.ts +++ b/packages/protocol-contracts/scripts/verify-contracts.ts @@ -15,7 +15,7 @@ async function main() { await hardhat .run("verify:verify", { address: getAddress("zetaToken"), - contract: "contracts/evm/ZetaEth.sol:ZetaEth", + contract: "contracts/evm/Zeta.eth.sol:ZetaEth", constructorArguments: [ZETA_INITIAL_SUPPLY], }) .catch(handleCatch); @@ -31,7 +31,7 @@ async function main() { await hardhat .run("verify:verify", { address: getAddress("zetaToken"), - constructorArguments: [0, getAddress("tss"), getAddress("tssUpdater")], + constructorArguments: [getAddress("tss"), getAddress("tssUpdater")], }) .catch(handleCatch); diff --git a/packages/protocol-contracts/test/ZetaNonEth.spec.ts b/packages/protocol-contracts/test/Zeta.non-eth.spec.ts similarity index 100% rename from packages/protocol-contracts/test/ZetaNonEth.spec.ts rename to packages/protocol-contracts/test/Zeta.non-eth.spec.ts From fd2a200c03f3393a5d20c69a0defae4251d2ffbb Mon Sep 17 00:00:00 2001 From: Lucas Date: Mon, 27 Jun 2022 12:29:17 -0300 Subject: [PATCH 011/115] Allow TSS to call updateTssAddress (#21) --- .../contracts/ZetaConnector.base.sol | 3 ++- .../contracts/interfaces/ConnectorErrors.sol | 2 ++ .../protocol-contracts/test/ZetaConnector.spec.ts | 12 ++++++++++-- 3 files changed, 14 insertions(+), 3 deletions(-) diff --git a/packages/protocol-contracts/contracts/ZetaConnector.base.sol b/packages/protocol-contracts/contracts/ZetaConnector.base.sol index 461a5abc..f6704676 100644 --- a/packages/protocol-contracts/contracts/ZetaConnector.base.sol +++ b/packages/protocol-contracts/contracts/ZetaConnector.base.sol @@ -72,7 +72,8 @@ contract ZetaConnectorBase is ConnectorErrors, Pausable { _; } - function updateTssAddress(address tssAddress_) external onlyTssUpdater { + function updateTssAddress(address tssAddress_) external { + if (msg.sender != tssAddress && msg.sender != tssAddressUpdater) revert CallerIsNotTssOrUpdater(msg.sender); if (tssAddress_ == address(0)) revert InvalidAddress(); tssAddress = tssAddress_; diff --git a/packages/protocol-contracts/contracts/interfaces/ConnectorErrors.sol b/packages/protocol-contracts/contracts/interfaces/ConnectorErrors.sol index 657b4485..fb2a7a39 100644 --- a/packages/protocol-contracts/contracts/interfaces/ConnectorErrors.sol +++ b/packages/protocol-contracts/contracts/interfaces/ConnectorErrors.sol @@ -6,6 +6,8 @@ interface ConnectorErrors { error CallerIsNotTssUpdater(address caller); + error CallerIsNotTssOrUpdater(address caller); + error InvalidAddress(); error ZetaTransferError(); diff --git a/packages/protocol-contracts/test/ZetaConnector.spec.ts b/packages/protocol-contracts/test/ZetaConnector.spec.ts index 3b923b3d..4766b175 100644 --- a/packages/protocol-contracts/test/ZetaConnector.spec.ts +++ b/packages/protocol-contracts/test/ZetaConnector.spec.ts @@ -92,10 +92,10 @@ describe("ZetaConnector tests", () => { describe("ZetaConnector.base", () => { describe("updateTssAddress", () => { - it("Should revert if the caller is not the TSS updater", async () => { + it("Should revert if the caller is not TSS or TSS updater", async () => { await expect( zetaConnectorBaseContract.connect(randomSigner).updateTssAddress(randomSigner.address) - ).to.revertedWith(`CallerIsNotTssUpdater("${randomSigner.address}")`); + ).to.revertedWith(`CallerIsNotTssOrUpdater("${randomSigner.address}")`); }); it("Should revert if the new TSS address is invalid", async () => { @@ -104,6 +104,14 @@ describe("ZetaConnector tests", () => { ).to.revertedWith(`InvalidAddress()`); }); + it("Should change the TSS address if called by TSS", async () => { + await (await zetaConnectorBaseContract.connect(tssSigner).updateTssAddress(randomSigner.address)).wait(); + + const address = await zetaConnectorBaseContract.tssAddress(); + + expect(address).to.equal(randomSigner.address); + }); + it("Should change the TSS address if called by TSS updater", async () => { await (await zetaConnectorBaseContract.updateTssAddress(randomSigner.address)).wait(); From ac8c0f5fb05ab8d2538b4cd9685d308f8ea98bc3 Mon Sep 17 00:00:00 2001 From: Lucas Date: Mon, 27 Jun 2022 12:47:24 -0300 Subject: [PATCH 012/115] Improve Slither results (#20) * Improve Slither results * Use 0.8.7 * Use a single condition --- .../protocol-contracts/contracts/Zeta.non-eth.sol | 8 ++++---- .../contracts/ZetaConnector.eth.sol | 2 +- .../contracts/testing/ZetaInteractorMock.sol | 14 +++++++++++--- scripts/slither.ts | 2 +- 4 files changed, 17 insertions(+), 9 deletions(-) diff --git a/packages/protocol-contracts/contracts/Zeta.non-eth.sol b/packages/protocol-contracts/contracts/Zeta.non-eth.sol index d7eb3363..c636f896 100644 --- a/packages/protocol-contracts/contracts/Zeta.non-eth.sol +++ b/packages/protocol-contracts/contracts/Zeta.non-eth.sol @@ -29,12 +29,12 @@ contract ZetaNonEth is ERC20Burnable, ZetaErrors { tssAddressUpdater = tssAddressUpdater_; } - function updateTssAndConnectorAddresses(address newTssAddress, address newConnectorAddress) external { + function updateTssAndConnectorAddresses(address tssAddress_, address connectorAddress_) external { if (msg.sender != tssAddressUpdater) revert CallerIsNotTssUpdater(msg.sender); - if (newTssAddress == address(0)) revert InvalidAddress(); + if (tssAddress_ == address(0) || connectorAddress_ == address(0)) revert InvalidAddress(); - tssAddress = newTssAddress; - connectorAddress = newConnectorAddress; + tssAddress = tssAddress_; + connectorAddress = connectorAddress_; } /** diff --git a/packages/protocol-contracts/contracts/ZetaConnector.eth.sol b/packages/protocol-contracts/contracts/ZetaConnector.eth.sol index 014d7de4..46fb5936 100644 --- a/packages/protocol-contracts/contracts/ZetaConnector.eth.sol +++ b/packages/protocol-contracts/contracts/ZetaConnector.eth.sol @@ -76,7 +76,7 @@ contract ZetaConnectorEth is ZetaConnectorBase { bytes32 internalSendHash ) external override whenNotPaused onlyTssAddress { bool success = IERC20(zetaToken).transfer(zetaTxSenderAddress, zetaValueAndGas); - require(success, "ZetaConnector: error transferring Zeta"); + if (!success) revert ZetaTransferError(); if (message.length > 0) { ZetaReceiver(zetaTxSenderAddress).onZetaRevert( diff --git a/packages/protocol-contracts/contracts/testing/ZetaInteractorMock.sol b/packages/protocol-contracts/contracts/testing/ZetaInteractorMock.sol index ee870a2f..6b21baab 100644 --- a/packages/protocol-contracts/contracts/testing/ZetaInteractorMock.sol +++ b/packages/protocol-contracts/contracts/testing/ZetaInteractorMock.sol @@ -3,10 +3,18 @@ pragma solidity 0.8.7; import "../ZetaInteractor.sol"; -contract ZetaInteractorMock is ZetaInteractor { +contract ZetaInteractorMock is ZetaInteractor, ZetaReceiver { constructor(address zetaConnectorAddress) ZetaInteractor(zetaConnectorAddress) {} - function onZetaMessage(ZetaInterfaces.ZetaMessage calldata zetaMessage) external isValidMessageCall(zetaMessage) {} + function onZetaMessage(ZetaInterfaces.ZetaMessage calldata zetaMessage) + external + override + isValidMessageCall(zetaMessage) + {} - function onZetaRevert(ZetaInterfaces.ZetaRevert calldata zetaRevert) external isValidRevertCall(zetaRevert) {} + function onZetaRevert(ZetaInterfaces.ZetaRevert calldata zetaRevert) + external + override + isValidRevertCall(zetaRevert) + {} } diff --git a/scripts/slither.ts b/scripts/slither.ts index ae6dc2d2..5f5287bd 100644 --- a/scripts/slither.ts +++ b/scripts/slither.ts @@ -4,7 +4,7 @@ import { execSync } from "node:child_process"; import path from "node:path"; const projectRoot = path.join(__dirname, "../"); -const solcVersion = "0.8.9"; +const solcVersion = "0.8.7"; const timestamp = Date.now(); const packageNames = ["protocol-contracts", "example-contracts"]; From 04ab7c2bff2f334abe57652cd8f6eeab79f39fe8 Mon Sep 17 00:00:00 2001 From: Lucas Date: Mon, 27 Jun 2022 12:47:42 -0300 Subject: [PATCH 013/115] Add tx.origin to ZetaSent (#19) --- .../contracts/ZetaConnector.base.sol | 1 + .../contracts/ZetaConnector.eth.sol | 1 + .../contracts/ZetaConnector.non-eth.sol | 1 + .../test/ZetaConnector.spec.ts | 36 +++++++++++++++++++ 4 files changed, 39 insertions(+) diff --git a/packages/protocol-contracts/contracts/ZetaConnector.base.sol b/packages/protocol-contracts/contracts/ZetaConnector.base.sol index f6704676..242c5db3 100644 --- a/packages/protocol-contracts/contracts/ZetaConnector.base.sol +++ b/packages/protocol-contracts/contracts/ZetaConnector.base.sol @@ -18,6 +18,7 @@ contract ZetaConnectorBase is ConnectorErrors, Pausable { address public tssAddressUpdater; event ZetaSent( + address sourceTxOriginAddress, address indexed zetaTxSenderAddress, uint256 destinationChainId, bytes destinationAddress, diff --git a/packages/protocol-contracts/contracts/ZetaConnector.eth.sol b/packages/protocol-contracts/contracts/ZetaConnector.eth.sol index 46fb5936..3a17d221 100644 --- a/packages/protocol-contracts/contracts/ZetaConnector.eth.sol +++ b/packages/protocol-contracts/contracts/ZetaConnector.eth.sol @@ -23,6 +23,7 @@ contract ZetaConnectorEth is ZetaConnectorBase { if (!success) revert ZetaTransferError(); emit ZetaSent( + tx.origin, msg.sender, input.destinationChainId, input.destinationAddress, diff --git a/packages/protocol-contracts/contracts/ZetaConnector.non-eth.sol b/packages/protocol-contracts/contracts/ZetaConnector.non-eth.sol index 09de308e..428c3917 100644 --- a/packages/protocol-contracts/contracts/ZetaConnector.non-eth.sol +++ b/packages/protocol-contracts/contracts/ZetaConnector.non-eth.sol @@ -37,6 +37,7 @@ contract ZetaConnectorNonEth is ZetaConnectorBase { ZetaToken(zetaToken).burnFrom(msg.sender, input.zetaValueAndGas); emit ZetaSent( + tx.origin, msg.sender, input.destinationChainId, input.destinationAddress, diff --git a/packages/protocol-contracts/test/ZetaConnector.spec.ts b/packages/protocol-contracts/test/ZetaConnector.spec.ts index 4766b175..46dfb845 100644 --- a/packages/protocol-contracts/test/ZetaConnector.spec.ts +++ b/packages/protocol-contracts/test/ZetaConnector.spec.ts @@ -237,6 +237,24 @@ describe("ZetaConnector tests", () => { const e2 = await zetaConnectorEthContract.queryFilter(zetaSentFilter); expect(e2.length).to.equal(1); }); + + it("Should emit `ZetaSent` with tx.origin as the first parameter", async () => { + const zetaSentFilter = zetaConnectorEthContract.filters.ZetaSent(); + const e1 = await zetaConnectorEthContract.queryFilter(zetaSentFilter); + expect(e1.length).to.equal(0); + + await zetaConnectorEthContract.connect(randomSigner).send({ + destinationAddress: randomSigner.address, + destinationChainId: 1, + destinationGasLimit: 2500000, + message: new ethers.utils.AbiCoder().encode(["string"], ["hello"]), + zetaValueAndGas: 0, + zetaParams: new ethers.utils.AbiCoder().encode(["string"], ["hello"]), + }); + + const e2 = await zetaConnectorEthContract.queryFilter(zetaSentFilter); + expect(e2[0].args[0].toString()).to.equal(randomSigner.address); + }); }); describe("onReceive", () => { @@ -514,6 +532,24 @@ describe("ZetaConnector tests", () => { const e2 = await zetaConnectorNonEthContract.queryFilter(zetaSentFilter); expect(e2.length).to.equal(1); }); + + it("Should emit `ZetaSent` with tx.origin as the first parameter", async () => { + const zetaSentFilter = zetaConnectorNonEthContract.filters.ZetaSent(); + const e1 = await zetaConnectorNonEthContract.queryFilter(zetaSentFilter); + expect(e1.length).to.equal(0); + + await zetaConnectorNonEthContract.connect(randomSigner).send({ + destinationAddress: randomSigner.address, + destinationChainId: 1, + destinationGasLimit: 2500000, + message: new ethers.utils.AbiCoder().encode(["string"], ["hello"]), + zetaValueAndGas: 0, + zetaParams: new ethers.utils.AbiCoder().encode(["string"], ["hello"]), + }); + + const e2 = await zetaConnectorNonEthContract.queryFilter(zetaSentFilter); + expect(e2[0].args[0].toString()).to.equal(randomSigner.address); + }); }); describe("onReceive", () => { From 9e4ae67d647d092c5c830b9938ce6bb12c48f9e6 Mon Sep 17 00:00:00 2001 From: Lucas Date: Mon, 27 Jun 2022 12:48:11 -0300 Subject: [PATCH 014/115] Add Pauser role (#17) * Add Pauser role * Add tests * Guard for pauserAddress == 0 --- .../contracts/ZetaConnector.base.sol | 36 ++++++++-- .../contracts/ZetaConnector.eth.sol | 5 +- .../contracts/ZetaConnector.non-eth.sol | 5 +- .../contracts/interfaces/ConnectorErrors.sol | 2 + .../test/Zeta.non-eth.spec.ts | 5 +- .../test/ZetaConnector.spec.ts | 72 ++++++++++++++----- 6 files changed, 97 insertions(+), 28 deletions(-) diff --git a/packages/protocol-contracts/contracts/ZetaConnector.base.sol b/packages/protocol-contracts/contracts/ZetaConnector.base.sol index 242c5db3..5a574ad2 100644 --- a/packages/protocol-contracts/contracts/ZetaConnector.base.sol +++ b/packages/protocol-contracts/contracts/ZetaConnector.base.sol @@ -10,6 +10,8 @@ import "./interfaces/ZetaInterfaces.sol"; contract ZetaConnectorBase is ConnectorErrors, Pausable { address public zetaToken; + address public pauserAddress; + /** * @dev Collectively held by Zeta blockchain validators. */ @@ -20,8 +22,8 @@ contract ZetaConnectorBase is ConnectorErrors, Pausable { event ZetaSent( address sourceTxOriginAddress, address indexed zetaTxSenderAddress, - uint256 destinationChainId, - bytes destinationAddress, + uint256 indexed destinationChainId, + bytes indexed destinationAddress, uint256 zetaValueAndGas, uint256 destinationGasLimit, bytes message, @@ -49,18 +51,32 @@ contract ZetaConnectorBase is ConnectorErrors, Pausable { event TSSAddressUpdated(address zetaTxSenderAddress, address newTssAddress); + event PauserAddressUpdated(address updaterAddress, address newTssAddress); + constructor( address zetaToken_, address tssAddress_, - address tssAddressUpdater_ + address tssAddressUpdater_, + address pauserAddress_ ) { - if (zetaToken_ == address(0) || tssAddress_ == address(0) || tssAddressUpdater_ == address(0)) { + if ( + zetaToken_ == address(0) || + tssAddress_ == address(0) || + tssAddressUpdater_ == address(0) || + pauserAddress_ == address(0) + ) { revert InvalidAddress(); } zetaToken = zetaToken_; tssAddress = tssAddress_; tssAddressUpdater = tssAddressUpdater_; + pauserAddress = pauserAddress_; + } + + modifier onlyPauser() { + if (msg.sender != pauserAddress) revert CallerIsNotPauser(msg.sender); + _; } modifier onlyTssAddress() { @@ -73,6 +89,14 @@ contract ZetaConnectorBase is ConnectorErrors, Pausable { _; } + function updatePauserAddress(address pauserAddress_) external onlyPauser { + if (pauserAddress_ == address(0)) revert InvalidAddress(); + + pauserAddress = pauserAddress_; + + emit PauserAddressUpdated(msg.sender, pauserAddress_); + } + function updateTssAddress(address tssAddress_) external { if (msg.sender != tssAddress && msg.sender != tssAddressUpdater) revert CallerIsNotTssOrUpdater(msg.sender); if (tssAddress_ == address(0)) revert InvalidAddress(); @@ -91,11 +115,11 @@ contract ZetaConnectorBase is ConnectorErrors, Pausable { tssAddressUpdater = tssAddress; } - function pause() external onlyTssUpdater { + function pause() external onlyPauser { _pause(); } - function unpause() external onlyTssUpdater { + function unpause() external onlyPauser { _unpause(); } diff --git a/packages/protocol-contracts/contracts/ZetaConnector.eth.sol b/packages/protocol-contracts/contracts/ZetaConnector.eth.sol index 3a17d221..09a32d6d 100644 --- a/packages/protocol-contracts/contracts/ZetaConnector.eth.sol +++ b/packages/protocol-contracts/contracts/ZetaConnector.eth.sol @@ -11,8 +11,9 @@ contract ZetaConnectorEth is ZetaConnectorBase { constructor( address zetaToken_, address tssAddress_, - address tssAddressUpdater_ - ) ZetaConnectorBase(zetaToken_, tssAddress_, tssAddressUpdater_) {} + address tssAddressUpdater_, + address pauserAddress_ + ) ZetaConnectorBase(zetaToken_, tssAddress_, tssAddressUpdater_, pauserAddress_) {} function getLockedAmount() external view returns (uint256) { return IERC20(zetaToken).balanceOf(address(this)); diff --git a/packages/protocol-contracts/contracts/ZetaConnector.non-eth.sol b/packages/protocol-contracts/contracts/ZetaConnector.non-eth.sol index 428c3917..6eeb6efa 100644 --- a/packages/protocol-contracts/contracts/ZetaConnector.non-eth.sol +++ b/packages/protocol-contracts/contracts/ZetaConnector.non-eth.sol @@ -22,8 +22,9 @@ contract ZetaConnectorNonEth is ZetaConnectorBase { constructor( address zetaTokenAddress_, address tssAddress_, - address tssAddressUpdater_ - ) ZetaConnectorBase(zetaTokenAddress_, tssAddress_, tssAddressUpdater_) {} + address tssAddressUpdater_, + address pauserAddress_ + ) ZetaConnectorBase(zetaTokenAddress_, tssAddress_, tssAddressUpdater_, pauserAddress_) {} function getLockedAmount() external view returns (uint256) { return ZetaToken(zetaToken).balanceOf(address(this)); diff --git a/packages/protocol-contracts/contracts/interfaces/ConnectorErrors.sol b/packages/protocol-contracts/contracts/interfaces/ConnectorErrors.sol index fb2a7a39..370b50af 100644 --- a/packages/protocol-contracts/contracts/interfaces/ConnectorErrors.sol +++ b/packages/protocol-contracts/contracts/interfaces/ConnectorErrors.sol @@ -2,6 +2,8 @@ pragma solidity 0.8.7; interface ConnectorErrors { + error CallerIsNotPauser(address caller); + error CallerIsNotTss(address caller); error CallerIsNotTssUpdater(address caller); diff --git a/packages/protocol-contracts/test/Zeta.non-eth.spec.ts b/packages/protocol-contracts/test/Zeta.non-eth.spec.ts index 28545b76..18e0a6e2 100644 --- a/packages/protocol-contracts/test/Zeta.non-eth.spec.ts +++ b/packages/protocol-contracts/test/Zeta.non-eth.spec.ts @@ -13,6 +13,7 @@ describe("ZetaNonEth tests", () => { let tssUpdater: SignerWithAddress; let tssSigner: SignerWithAddress; let randomSigner: SignerWithAddress; + let pauserSigner: SignerWithAddress; const tssUpdaterApproveConnectorNonEth = async () => { await (await zetaTokenNonEthContract.approve(zetaConnectorNonEthContract.address, parseEther("100000"))).wait(); @@ -36,7 +37,7 @@ describe("ZetaNonEth tests", () => { beforeEach(async () => { const accounts = await ethers.getSigners(); - [tssUpdater, tssSigner, randomSigner] = accounts; + [tssUpdater, tssSigner, randomSigner, pauserSigner] = accounts; zetaTokenNonEthContract = await deployZetaNonEth({ args: [tssSigner.address, tssUpdater.address], @@ -44,7 +45,7 @@ describe("ZetaNonEth tests", () => { zetaReceiverMockContract = await deployZetaReceiverMock(); zetaConnectorNonEthContract = await deployZetaConnectorNonEth({ - args: [zetaTokenNonEthContract.address, tssSigner.address, tssUpdater.address], + args: [zetaTokenNonEthContract.address, tssSigner.address, tssUpdater.address, pauserSigner.address], }); await zetaTokenNonEthContract.updateTssAndConnectorAddresses( diff --git a/packages/protocol-contracts/test/ZetaConnector.spec.ts b/packages/protocol-contracts/test/ZetaConnector.spec.ts index 46dfb845..2a061324 100644 --- a/packages/protocol-contracts/test/ZetaConnector.spec.ts +++ b/packages/protocol-contracts/test/ZetaConnector.spec.ts @@ -30,6 +30,7 @@ describe("ZetaConnector tests", () => { let tssUpdater: SignerWithAddress; let tssSigner: SignerWithAddress; let randomSigner: SignerWithAddress; + let pauserSigner: SignerWithAddress; const tssUpdaterApproveConnectorEth = async () => { await (await zetaTokenEthContract.approve(zetaConnectorEthContract.address, parseEther("100000"))).wait(); @@ -61,7 +62,7 @@ describe("ZetaConnector tests", () => { beforeEach(async () => { const accounts = await ethers.getSigners(); - [tssUpdater, tssSigner, randomSigner] = accounts; + [tssUpdater, tssSigner, randomSigner, pauserSigner] = accounts; zetaTokenEthContract = await deployZetaEth({ args: [100_000], @@ -73,13 +74,13 @@ describe("ZetaConnector tests", () => { zetaReceiverMockContract = await deployZetaReceiverMock(); zetaConnectorBaseContract = await deployZetaConnectorBase({ - args: [zetaTokenEthContract.address, tssSigner.address, tssUpdater.address], + args: [zetaTokenEthContract.address, tssSigner.address, tssUpdater.address, pauserSigner.address], }); zetaConnectorEthContract = await deployZetaConnectorEth({ - args: [zetaTokenEthContract.address, tssSigner.address, tssUpdater.address], + args: [zetaTokenEthContract.address, tssSigner.address, tssUpdater.address, pauserSigner.address], }); zetaConnectorNonEthContract = await deployZetaConnectorNonEth({ - args: [zetaTokenNonEthContract.address, tssSigner.address, tssUpdater.address], + args: [zetaTokenNonEthContract.address, tssSigner.address, tssUpdater.address, pauserSigner.address], }); await zetaTokenNonEthContract.updateTssAndConnectorAddresses( @@ -121,23 +122,62 @@ describe("ZetaConnector tests", () => { }); }); + describe("updatePauserAddress", () => { + it("Should revert if the caller is not the Pauser", async () => { + await expect( + zetaConnectorBaseContract.connect(randomSigner).updatePauserAddress(randomSigner.address) + ).to.revertedWith(`CallerIsNotPauser("${randomSigner.address}")`); + }); + + it("Should revert if the new Pauser address is invalid", async () => { + await expect( + zetaConnectorBaseContract + .connect(pauserSigner) + .updatePauserAddress("0x0000000000000000000000000000000000000000") + ).to.revertedWith(`InvalidAddress()`); + }); + + it("Should change the Pauser address if called by Pauser", async () => { + await (await zetaConnectorBaseContract.connect(pauserSigner).updatePauserAddress(randomSigner.address)).wait(); + + const address = await zetaConnectorBaseContract.pauserAddress(); + + expect(address).to.equal(randomSigner.address); + }); + + it("Should emit `PauserAddressUpdated` on success", async () => { + const pauserAddressUpdatedFilter = zetaConnectorBaseContract.filters.PauserAddressUpdated(); + const e1 = await zetaConnectorBaseContract.queryFilter(pauserAddressUpdatedFilter); + expect(e1.length).to.equal(0); + + await (await zetaConnectorBaseContract.connect(pauserSigner).updatePauserAddress(randomSigner.address)).wait(); + + const address = await zetaConnectorBaseContract.pauserAddress(); + + expect(address).to.equal(randomSigner.address); + + const e2 = await zetaConnectorBaseContract.queryFilter(pauserAddressUpdatedFilter); + expect(e2.length).to.equal(1); + }); + }); + describe("pause, unpause", () => { - it("Should revert if not called by the TSS updater", async () => { + it("Should revert if not called by the Pauser", async () => { await expect(zetaConnectorBaseContract.connect(randomSigner).pause()).to.revertedWith( - `CallerIsNotTssUpdater("${randomSigner.address}")` + `CallerIsNotPauser("${randomSigner.address}")` ); await expect(zetaConnectorBaseContract.connect(randomSigner).unpause()).to.revertedWith( - `CallerIsNotTssUpdater("${randomSigner.address}")` + `CallerIsNotPauser("${randomSigner.address}")` ); }); - it("Should pause if called by the TSS updater", async () => { - await (await zetaConnectorBaseContract.pause()).wait(); + it("Should pause if called by the Pauser", async () => { + await (await zetaConnectorBaseContract.connect(pauserSigner).pause()).wait(); const paused1 = await zetaConnectorBaseContract.paused(); expect(paused1).to.equal(true); - await (await zetaConnectorBaseContract.unpause()).wait(); + await (await zetaConnectorBaseContract.connect(pauserSigner).unpause()).wait(); const paused2 = await zetaConnectorBaseContract.paused(); expect(paused2).to.equal(false); }); @@ -147,7 +187,7 @@ describe("ZetaConnector tests", () => { describe("ZetaConnector.eth", () => { describe("send", () => { it("Should revert if the contract is paused", async () => { - await (await zetaConnectorEthContract.pause()).wait(); + await (await zetaConnectorEthContract.connect(pauserSigner).pause()).wait(); const paused1 = await zetaConnectorEthContract.paused(); expect(paused1).to.equal(true); @@ -259,7 +299,7 @@ describe("ZetaConnector tests", () => { describe("onReceive", () => { it("Should revert if the contract is paused", async () => { - await (await zetaConnectorEthContract.pause()).wait(); + await (await zetaConnectorEthContract.connect(pauserSigner).pause()).wait(); const paused1 = await zetaConnectorEthContract.paused(); expect(paused1).to.equal(true); @@ -358,7 +398,7 @@ describe("ZetaConnector tests", () => { describe("onRevert", () => { it("Should revert if the contract is paused", async () => { - await (await zetaConnectorEthContract.pause()).wait(); + await (await zetaConnectorEthContract.connect(pauserSigner).pause()).wait(); const paused1 = await zetaConnectorEthContract.paused(); expect(paused1).to.equal(true); @@ -448,7 +488,7 @@ describe("ZetaConnector tests", () => { describe("ZetaConnector.non-eth", () => { describe("send", () => { it("Should revert if the contract is paused", async () => { - await (await zetaConnectorNonEthContract.pause()).wait(); + await (await zetaConnectorNonEthContract.connect(pauserSigner).pause()).wait(); const paused1 = await zetaConnectorNonEthContract.paused(); expect(paused1).to.equal(true); @@ -554,7 +594,7 @@ describe("ZetaConnector tests", () => { describe("onReceive", () => { it("Should revert if the contract is paused", async () => { - await (await zetaConnectorNonEthContract.pause()).wait(); + await (await zetaConnectorNonEthContract.connect(pauserSigner).pause()).wait(); const paused1 = await zetaConnectorNonEthContract.paused(); expect(paused1).to.equal(true); @@ -650,7 +690,7 @@ describe("ZetaConnector tests", () => { describe("onRevert", () => { it("Should revert if the contract is paused", async () => { - await (await zetaConnectorNonEthContract.pause()).wait(); + await (await zetaConnectorNonEthContract.connect(pauserSigner).pause()).wait(); const paused1 = await zetaConnectorNonEthContract.paused(); expect(paused1).to.equal(true); From 88224552c6f849ee5e9e65a5729f4decddf23c4f Mon Sep 17 00:00:00 2001 From: Andres Martin Aiello <50411235+andresaiello@users.noreply.github.com> Date: Tue, 28 Jun 2022 09:22:56 -0300 Subject: [PATCH 015/115] Add readme to protocol module (#23) * Add readme to protocol module * Update packages/protocol-contracts/README.md * Update packages/protocol-contracts/README.md * Update packages/protocol-contracts/README.md * Update packages/protocol-contracts/README.md Co-authored-by: Lucas --- packages/protocol-contracts/README.md | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 packages/protocol-contracts/README.md diff --git a/packages/protocol-contracts/README.md b/packages/protocol-contracts/README.md new file mode 100644 index 00000000..e8cda3cd --- /dev/null +++ b/packages/protocol-contracts/README.md @@ -0,0 +1,10 @@ +# ZetaChain Protocol Contracts + +This package includes: +* Contracts that interact directly with the protocol (Connector, Zeta token). +* Utilities and interfaces to make it easy to develop multichain dApps on ZetaChain (ZetaInteractor, ZetaInterfaces, ZetaTokenConsumer). + +## Addresses + +* TSS address: collectively held by Zeta blockchain validators. +* TSS Updater address: a Gnosis multi-sig that's under an OpenZeppelin TimeLock for security and transparency. Eventually, the ownership of this role will be delegated to the TSS address. From c3aa49bc42345210cf8b9a71413fdacd24c434a7 Mon Sep 17 00:00:00 2001 From: Andres Martin Aiello <50411235+andresaiello@users.noreply.github.com> Date: Tue, 28 Jun 2022 20:44:05 -0300 Subject: [PATCH 016/115] Create ZetaTokenConsumer (#22) * Standardize underscore * Add ZetaGasPayer base * Add uniswap contracts * Small tweaks * ZetaGasPayer -> ZetaTokenConsumer * Tests and improvements * WIP: UniV3 * add UniV3 strategy * update contracts and test * secure updateStrategy and add events * add zero validations * update comments * import uniswap v3 contracts * remove fallback * Naming, syntax * Remove fallback & payable * Update packages/protocol-contracts/contracts/ZetaTokenConsumerRecommended.strategy.sol * Details * zetaTokenInput_ -> zetaToken_ * Add receive function * Copy * add test for events * move addresses to json file * update ZetaTokenConsumerUniV3 * remove old comment * Install order keys plugins * Rename * Delete recommended strategy * tokenPoolFee * Blankline Co-authored-by: Lucas Janon --- .eslintrc.js | 18 +- package.json | 2 + packages/addresses/src/addresses.helpers.ts | 46 +-- .../src/addresses/addresses.athens.json | 34 ++- .../src/addresses/addresses.mainnet.json | 8 +- .../src/addresses/addresses.troy.json | 30 +- packages/addresses/src/networks.ts | 56 ++-- packages/example-contracts/.eslintrc.js | 8 +- .../multi-chain-swap/MultiChainSwap.base.sol | 19 +- .../multi-chain-value/MultiChainValue.sol | 4 +- packages/example-contracts/hardhat.config.ts | 20 +- .../CrossChainCounter.helpers.ts | 2 +- .../lib/shared/network.constants.ts | 48 +-- .../scripts/add-liquidity-uniswap-v2.ts | 2 +- .../multi-chain-value/verify-contract.ts | 2 +- .../test/CrossChainCounter.spec.ts | 6 +- .../test/CrossChainWarriors.spec.ts | 6 +- .../test/MultiChainSwap.spec.ts | 12 +- .../example-contracts/test/test.helpers.ts | 2 +- packages/protocol-contracts/.eslintrc.js | 8 +- .../contracts/ZetaInteractor.sol | 2 +- .../ZetaTokenConsumerUniV2.strategy.sol | 166 ++++++++++ .../ZetaTokenConsumerUniV3.strategy.sol | 171 +++++++++++ .../contracts/interfaces/ZetaInterfaces.sol | 37 +++ .../contracts/testing/TestContracts.sol | 10 + .../testing/TestUniswapV3Contracts.sol | 181 +++++++++++ packages/protocol-contracts/hardhat.config.ts | 8 +- .../lib/contracts.helpers.ts | 25 +- .../zeta-interactor/ZetaInteractor.helpers.ts | 2 +- packages/protocol-contracts/package.json | 2 + .../scripts/test-zeta-send.ts | 4 +- .../scripts/verify-contracts.ts | 6 +- .../test/Zeta.non-eth.spec.ts | 2 +- .../test/ZetaConnector.spec.ts | 25 +- .../test/ZetaInteractor.spec.ts | 22 +- .../test/ZetaTokenConsumer.spec.ts | 286 ++++++++++++++++++ .../protocol-contracts/test/test.helpers.ts | 20 +- scripts/slither.ts | 7 +- yarn.lock | 225 +++++++++++++- 39 files changed, 1361 insertions(+), 173 deletions(-) create mode 100644 packages/protocol-contracts/contracts/ZetaTokenConsumerUniV2.strategy.sol create mode 100644 packages/protocol-contracts/contracts/ZetaTokenConsumerUniV3.strategy.sol create mode 100644 packages/protocol-contracts/contracts/testing/TestContracts.sol create mode 100644 packages/protocol-contracts/contracts/testing/TestUniswapV3Contracts.sol create mode 100644 packages/protocol-contracts/test/ZetaTokenConsumer.spec.ts diff --git a/.eslintrc.js b/.eslintrc.js index 94babbf4..611893d8 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -10,12 +10,21 @@ module.exports = { mocha: true, node: true, }, - parser: "@typescript-eslint/parser", - plugins: ["@typescript-eslint", "simple-import-sort", "prettier"], extends: ["plugin:prettier/recommended"], + parser: "@typescript-eslint/parser", parserOptions: { ecmaVersion: 12, }, + plugins: ["@typescript-eslint", "prettier", "simple-import-sort", "sort-keys-fix", "typescript-sort-keys"], + rules: { + "@typescript-eslint/sort-type-union-intersection-members": "error", + camelcase: "off", + "simple-import-sort/exports": "error", + "simple-import-sort/imports": "error", + "sort-keys-fix/sort-keys-fix": "error", + "typescript-sort-keys/interface": "error", + "typescript-sort-keys/string-enum": "error", + }, settings: { "import/parsers": { "@typescript-eslint/parser": [".js", ".jsx", ".ts", ".tsx", ".d.ts"], @@ -29,9 +38,4 @@ module.exports = { }, }, }, - rules: { - camelcase: "off", - "simple-import-sort/imports": "error", - "simple-import-sort/exports": "error", - }, }; diff --git a/package.json b/package.json index 96778948..aacf17d8 100644 --- a/package.json +++ b/package.json @@ -47,6 +47,8 @@ "eslint-plugin-prettier": "^4.0.0", "eslint-plugin-promise": "^6.0.0", "eslint-plugin-simple-import-sort": "7.0.0", + "eslint-plugin-sort-keys-fix": "1.1.2", + "eslint-plugin-typescript-sort-keys": "2.1.0", "ethereum-waffle": "^3.4.4", "ethereumjs-utils": "^5.2.5", "ethers": "5.6.8", diff --git a/packages/addresses/src/addresses.helpers.ts b/packages/addresses/src/addresses.helpers.ts index bb305fce..76e5a023 100644 --- a/packages/addresses/src/addresses.helpers.ts +++ b/packages/addresses/src/addresses.helpers.ts @@ -9,12 +9,18 @@ export type ZetaAddress = | "connector" | "crossChainCounter" | "crossChainNft" + | "dai" | "multiChainSwap" | "multiChainSwapZetaConnector" | "multiChainValue" | "tss" | "tssUpdater" | "uniswapV2Router02" + | "uniswapV3NftManager" + | "uniswapV3Quoter" + | "uniswapV3Router" + | "usdc" + | "weth9" | "zetaToken"; type NetworkAddresses = Record; @@ -22,12 +28,18 @@ const zetaAddresses: Record = { connector: true, crossChainCounter: true, crossChainNft: true, + dai: true, multiChainSwap: true, multiChainSwapZetaConnector: true, multiChainValue: true, tss: true, tssUpdater: true, uniswapV2Router02: true, + uniswapV3NftManager: true, + uniswapV3Quoter: true, + uniswapV3Router: true, + usdc: true, + weth9: true, zetaToken: true, }; @@ -37,7 +49,7 @@ export const isZetaAddress = (a: string | undefined): a is ZetaAddress => Boolea * @description Localnet */ -export type LocalNetworkName = "hardhat" | "eth-localnet" | "bsc-localnet" | "polygon-localnet"; +export type LocalNetworkName = "bsc-localnet" | "eth-localnet" | "hardhat" | "polygon-localnet"; export type ZetaLocalNetworkName = "troy"; type LocalnetAddressGroup = Record; export const isLocalNetworkName = (networkName: string): networkName is LocalNetworkName => @@ -92,20 +104,20 @@ const getMainnetList: () => Record * @description Shared */ -export type NetworkName = LocalNetworkName | TestnetNetworkName | MainnetNetworkName; -export type ZetaNetworkName = ZetaLocalNetworkName | ZetaTestnetNetworkName | ZetaMainnetNetworkName; +export type NetworkName = LocalNetworkName | MainnetNetworkName | TestnetNetworkName; +export type ZetaNetworkName = ZetaLocalNetworkName | ZetaMainnetNetworkName | ZetaTestnetNetworkName; export const getChainId = (networkName: NetworkName) => { const chainIds: Record = { + "bsc-localnet": 97, "bsc-testnet": 97, + "eth-localnet": 5, "eth-mainnet": 1, - "polygon-mumbai": 80001, goerli: 5, - ropsten: 3, hardhat: 1337, - "eth-localnet": 5, - "bsc-localnet": 97, "polygon-localnet": 80001, + "polygon-mumbai": 80001, + ropsten: 3, }; return chainIds[networkName]; @@ -123,15 +135,15 @@ export const getScanVariable = ({ customNetworkName }: { customNetworkName?: str dotenv.config(); const v = { + "bsc-localnet": "", "bsc-testnet": process.env.BSCSCAN_API_KEY || "", + "eth-localnet": "", "eth-mainnet": process.env.ETHERSCAN_API_KEY || "", - "polygon-mumbai": process.env.POLYGONSCAN_API_KEY || "", goerli: process.env.ETHERSCAN_API_KEY || "", - ropsten: process.env.ETHERSCAN_API_KEY || "", hardhat: "", - "eth-localnet": "", - "bsc-localnet": "", "polygon-localnet": "", + "polygon-mumbai": process.env.POLYGONSCAN_API_KEY || "", + ropsten: process.env.ETHERSCAN_API_KEY || "", }; return v[networkName]; @@ -143,15 +155,15 @@ export const getExplorerUrl = ({ customNetworkName }: { customNetworkName?: stri dotenv.config(); const v = { + "bsc-localnet": "", "bsc-testnet": "https://testnet.bscscan.com/", + "eth-localnet": "", "eth-mainnet": "https://etherscan.io/", - "polygon-mumbai": "https://mumbai.polygonscan.com/", goerli: "https://goerli.etherscan.io/", - ropsten: "https://ropsten.etherscan.io/", hardhat: "", - "eth-localnet": "", - "bsc-localnet": "", "polygon-localnet": "", + "polygon-mumbai": "https://mumbai.polygonscan.com/", + ropsten: "https://ropsten.etherscan.io/", }; return v[networkName]; @@ -317,9 +329,9 @@ export const addNewNetwork = (newNetworkName: string, addTo: ZetaNetworkName[]) const orderedFileNetworks = Object.keys(fileNetworks) .sort() .reduce((obj, key) => { - obj[key as MainnetNetworkName | TestnetNetworkName | LocalNetworkName] = fileNetworks[key]; + obj[key as LocalNetworkName | MainnetNetworkName | TestnetNetworkName] = fileNetworks[key]; return obj; - }, {} as MainnetAddressGroup & TestnetAddressGroup & LocalnetAddressGroup); + }, {} as LocalnetAddressGroup & MainnetAddressGroup & TestnetAddressGroup); writeFileSync(addressesFilePath, JSON.stringify(orderedFileNetworks, null, 2)); }); diff --git a/packages/addresses/src/addresses/addresses.athens.json b/packages/addresses/src/addresses/addresses.athens.json index 60a19291..d5e14b85 100644 --- a/packages/addresses/src/addresses/addresses.athens.json +++ b/packages/addresses/src/addresses/addresses.athens.json @@ -3,42 +3,66 @@ "connector": "0x202aed942eb71203741eced2913a29C695a7c7F6", "crossChainCounter": "", "crossChainNft": "0xa9016FB99846314E0f96f657E5271cFD7919a244", + "dai": "", + "multiChainSwap": "0xD4fAa6BAbBb97E0BDF755D396af48CB66eBa736c", "multiChainValue": "0x8f56b3e5b0D4bC33E7E52eC55271e73ece6024c6", "tss": "0x61141bce5352fc9b5ff648468676e356518d86ab", "tssUpdater": "0x7274d1d5dddef36aac53dd45b93487ce01ef0a55", "uniswapV2Router02": "0x9Ac64Cc6e4415144C455BD8E4837Fea55603e5c3", - "zetaToken": "0xad7d0795ffdf21f20c89240D540487B1445c7D03", - "multiChainSwap": "0xD4fAa6BAbBb97E0BDF755D396af48CB66eBa736c" + "uniswapV3NftManager": "", + "uniswapV3Quoter": "", + "uniswapV3Router": "", + "usdc": "", + "weth9": "", + "zetaToken": "0xad7d0795ffdf21f20c89240D540487B1445c7D03" }, "goerli": { "connector": "0x0B16Fc7e2D627d82255ba21e53Cf6c11B5186046", "crossChainCounter": "", "crossChainNft": "0xe08f1d23a68231543a595391D82c39BbaFc22470", + "dai": "", + "multiChainSwap": "0xDB6D960642ea523549Ad108F495c89cfE5E51668", "multiChainValue": "0x0EaA929a2874183e2324Bb2745F812c942b00F60", "tss": "0x61141bce5352fc9b5ff648468676e356518d86ab", "tssUpdater": "0x7274d1d5dddef36aac53dd45b93487ce01ef0a55", "uniswapV2Router02": "0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D", - "zetaToken": "0x011a76081989aDA18d0a16bf3fee2C6c3BD07B07", - "multiChainSwap": "0xDB6D960642ea523549Ad108F495c89cfE5E51668" + "uniswapV3NftManager": "", + "uniswapV3Quoter": "", + "uniswapV3Router": "", + "usdc": "", + "weth9": "", + "zetaToken": "0x011a76081989aDA18d0a16bf3fee2C6c3BD07B07" }, "polygon-mumbai": { "connector": "0xa5467B39Ad9f51DEb6b30Abfa9828531dCBA99A9", "crossChainCounter": "", "crossChainNft": "", + "dai": "", "multiChainValue": "0xb3021F5603291895b0Df5fC6276cda33a0B90fa6", "tss": "0x61141bce5352fc9b5ff648468676e356518d86ab", "tssUpdater": "0x7274d1d5dddef36aac53dd45b93487ce01ef0a55", "uniswapV2Router02": "", + "uniswapV3NftManager": "", + "uniswapV3Quoter": "", + "uniswapV3Router": "", + "usdc": "", + "weth9": "", "zetaToken": "0x84383be9B3Eda50ABD5899936D4963505d449de2" }, "ropsten": { "connector": "0x91Ea4f79D39DA890B03E965111953d0494936072", "crossChainCounter": "", "crossChainNft": "", + "dai": "", "multiChainValue": "0x4740f4051eA6D896C694303228D86Ba3141065ca", "tss": "0x61141Bce5352fC9b5Ff648468676e356518D86AB", "tssUpdater": "0x7274d1d5dddef36aac53dd45b93487ce01ef0a55", "uniswapV2Router02": "0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D", + "uniswapV3NftManager": "", + "uniswapV3Quoter": "", + "uniswapV3Router": "", + "usdc": "", + "weth9": "", "zetaToken": "0x3357A3bd90A001282bA2152D6c0a2372c8E0e28E" } -} \ No newline at end of file +} diff --git a/packages/addresses/src/addresses/addresses.mainnet.json b/packages/addresses/src/addresses/addresses.mainnet.json index 685644da..74a87cbd 100644 --- a/packages/addresses/src/addresses/addresses.mainnet.json +++ b/packages/addresses/src/addresses/addresses.mainnet.json @@ -3,10 +3,16 @@ "connector": "", "crossChainCounter": "", "crossChainNft": "", + "dai": "0x6b175474e89094c44da98b954eedeac495271d0f", "multiChainValue": "", "tss": "", "tssUpdater": "", "uniswapV2Router02": "0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D", + "uniswapV3NftManager": "0xC36442b4a4522E871399CD717aBDD847Ab11FE88", + "uniswapV3Quoter": "0xb27308f9F90D607463bb33eA1BeBb41C27CE5AB6", + "uniswapV3Router": "0xE592427A0AEce92De3Edee1F18E0157C05861564", + "usdc": "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48", + "weth9": "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2", "zetaToken": "" } -} \ No newline at end of file +} diff --git a/packages/addresses/src/addresses/addresses.troy.json b/packages/addresses/src/addresses/addresses.troy.json index 483347af..626a9f4c 100644 --- a/packages/addresses/src/addresses/addresses.troy.json +++ b/packages/addresses/src/addresses/addresses.troy.json @@ -3,41 +3,65 @@ "connector": "0xB06c856C8eaBd1d8321b687E188204C1018BC4E5", "crossChainCounter": "", "crossChainNft": "", + "dai": "", + "multiChainSwap": "0xddE78e6202518FF4936b5302cC2891ec180E8bFf", "multiChainValue": "", "tss": "0x70997970c51812dc3a010c7d01b50e0d17dc79c8", "tssUpdater": "0x70997970c51812dc3a010c7d01b50e0d17dc79c8", "uniswapV2Router02": "0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D", - "zetaToken": "0xddE78e6202518FF4936b5302cC2891ec180E8bFf", - "multiChainSwap": "0xddE78e6202518FF4936b5302cC2891ec180E8bFf" + "uniswapV3NftManager": "", + "uniswapV3Quoter": "", + "uniswapV3Router": "", + "usdc": "", + "weth9": "", + "zetaToken": "0xddE78e6202518FF4936b5302cC2891ec180E8bFf" }, "eth-localnet": { "connector": "0xD7db1F9D0279876a9dcDb92e06057E0818b9B34b", "crossChainCounter": "", "crossChainNft": "", + "dai": "", "multiChainValue": "", "tss": "0x8C001e2204000D8ED10cAcf0F68106b68e036A26", "tssUpdater": "0xfBec4048e09749515110c89D881EcDcA4460D377", "uniswapV2Router02": "", + "uniswapV3NftManager": "", + "uniswapV3Quoter": "", + "uniswapV3Router": "", + "usdc": "", + "weth9": "", "zetaToken": "0xaEF27C0E302005dB3b442edF762EB070Dc2DB9b5" }, "bsc-localnet": { "connector": "0x960bd6A9d8424455953a68c17Be7f56e0cf83A9E", "crossChainCounter": "", "crossChainNft": "", + "dai": "", "multiChainValue": "", "tss": "0x8C001e2204000D8ED10cAcf0F68106b68e036A26", "tssUpdater": "0x12Dc2227AA4b98b00Ff8148fDA9Ef750929B0F68", "uniswapV2Router02": "", + "uniswapV3NftManager": "", + "uniswapV3Quoter": "", + "uniswapV3Router": "", + "usdc": "", + "weth9": "", "zetaToken": "0x0CF6e5aA211A4b7da5d04e93dC40Ee18202a5f84" }, "polygon-localnet": { "connector": "0xa16BD8468d10d28E6c16F03798EEb710fc84F616", "crossChainCounter": "", "crossChainNft": "", + "dai": "", "multiChainValue": "", "tss": "0x8C001e2204000D8ED10cAcf0F68106b68e036A26", "tssUpdater": "0x78C18E214174A08Fc32e174fb203Aba05B016789", "uniswapV2Router02": "", + "uniswapV3NftManager": "", + "uniswapV3Quoter": "", + "uniswapV3Router": "", + "usdc": "", + "weth9": "", "zetaToken": "0xD443E93f689a7E1d517Fef799b1d2Fd2FA536d3A" } -} \ No newline at end of file +} diff --git a/packages/addresses/src/networks.ts b/packages/addresses/src/networks.ts index 2d231153..1810f8ae 100644 --- a/packages/addresses/src/networks.ts +++ b/packages/addresses/src/networks.ts @@ -1,55 +1,55 @@ import type { NetworksUserConfig } from "hardhat/types"; export const getHardhatConfigNetworks = (PRIVATE_KEYS: string[]): NetworksUserConfig => ({ - hardhat: { - chainId: 1337, - forking: { - url: `https://eth-mainnet.alchemyapi.io/v2/${process.env.ALCHEMY_API_KEY}`, - blockNumber: 14672712, - }, + "bsc-localnet": { + gas: 5000000, + gasPrice: 80000000000, + url: "http://localhost:8120", + }, + "bsc-testnet": { + accounts: PRIVATE_KEYS, + gas: 5000000, + gasPrice: 80000000000, + url: `https://data-seed-prebsc-2-s3.binance.org:8545`, + }, + "eth-localnet": { + gas: 2100000, + gasPrice: 80000000000, + url: "http://localhost:8100", }, "eth-mainnet": { - url: "https://api.mycryptoapi.com/eth", accounts: PRIVATE_KEYS, + url: "https://api.mycryptoapi.com/eth", }, goerli: { - url: "https://rpc.goerli.mudit.blog", accounts: PRIVATE_KEYS, gas: 2100000, gasPrice: 8000000000, + url: "https://rpc.goerli.mudit.blog", }, - "bsc-testnet": { - url: `https://data-seed-prebsc-2-s3.binance.org:8545`, - accounts: PRIVATE_KEYS, + hardhat: { + chainId: 1337, + forking: { + blockNumber: 14672712, + url: `https://eth-mainnet.alchemyapi.io/v2/${process.env.ALCHEMY_API_KEY}`, + }, + }, + "polygon-localnet": { gas: 5000000, gasPrice: 80000000000, + url: "http://localhost:8140", }, "polygon-mumbai": { - url: "https://polygon-mumbai.chainstacklabs.com", accounts: PRIVATE_KEYS, gas: 5000000, gasPrice: 80000000000, + url: "https://polygon-mumbai.chainstacklabs.com", }, ropsten: { - url: "https://ropsten.infura.io/v3/9aa3d95b3bc440fa88ea12eaa4456161", accounts: PRIVATE_KEYS, gas: 9000000, gasPrice: 80000000000, - }, - "eth-localnet": { - url: "http://localhost:8100", - gas: 2100000, - gasPrice: 80000000000, - }, - "bsc-localnet": { - url: "http://localhost:8120", - gas: 5000000, - gasPrice: 80000000000, - }, - "polygon-localnet": { - url: "http://localhost:8140", - gas: 5000000, - gasPrice: 80000000000, + url: "https://ropsten.infura.io/v3/9aa3d95b3bc440fa88ea12eaa4456161", }, }); diff --git a/packages/example-contracts/.eslintrc.js b/packages/example-contracts/.eslintrc.js index 4f9ad61e..77b8f69a 100644 --- a/packages/example-contracts/.eslintrc.js +++ b/packages/example-contracts/.eslintrc.js @@ -3,13 +3,16 @@ const path = require("path"); const OFF = 0; module.exports = { - extends: ["../../.eslintrc.js"], env: { browser: false, es2021: true, mocha: true, node: true, }, + extends: ["../../.eslintrc.js"], + rules: { + "no-console": OFF, + }, settings: { "import/resolver": { typescript: { @@ -17,7 +20,4 @@ module.exports = { }, }, }, - rules: { - "no-console": OFF, - }, }; diff --git a/packages/example-contracts/contracts/multi-chain-swap/MultiChainSwap.base.sol b/packages/example-contracts/contracts/multi-chain-swap/MultiChainSwap.base.sol index da56062f..bbd6a9b3 100644 --- a/packages/example-contracts/contracts/multi-chain-swap/MultiChainSwap.base.sol +++ b/packages/example-contracts/contracts/multi-chain-swap/MultiChainSwap.base.sol @@ -52,13 +52,13 @@ contract MultiChainSwapBase is ZetaInteractor, ZetaReceiver, MultiChainSwapError ); constructor( - address _zetaConnector, - address _zetaTokenInput, - address _uniswapV2Router - ) ZetaInteractor(_zetaConnector) { - zetaToken = _zetaTokenInput; - uniswapV2RouterAddress = _uniswapV2Router; - uniswapV2Router = IUniswapV2Router02(_uniswapV2Router); + address zetaConnector_, + address zetaToken_, + address uniswapV2Router_ + ) ZetaInteractor(zetaConnector_) { + zetaToken = zetaToken_; + uniswapV2RouterAddress = uniswapV2Router_; + uniswapV2Router = IUniswapV2Router02(uniswapV2Router_); wETH = uniswapV2Router.WETH(); } @@ -74,7 +74,7 @@ contract MultiChainSwapBase is ZetaInteractor, ZetaReceiver, MultiChainSwapError uint256 destinationChainId, uint256 crossChaindestinationGasLimit ) external payable { - if (!isValidChainId(destinationChainId)) revert InvalidDestinationChainId(); + if (!_isValidChainId(destinationChainId)) revert InvalidDestinationChainId(); if (msg.value == 0) revert ValueShouldBeGreaterThanZero(); if ( @@ -140,8 +140,7 @@ contract MultiChainSwapBase is ZetaInteractor, ZetaReceiver, MultiChainSwapError uint256 destinationChainId, uint256 crossChaindestinationGasLimit ) external { - if (keccak256(interactorsByChainId[destinationChainId]) == keccak256(new bytes(0))) - revert InvalidDestinationChainId(); + if (!_isValidChainId(destinationChainId)) revert InvalidDestinationChainId(); if (sourceInputToken == address(0)) revert MissingSourceInputTokenAddress(); if ( diff --git a/packages/example-contracts/contracts/multi-chain-value/MultiChainValue.sol b/packages/example-contracts/contracts/multi-chain-value/MultiChainValue.sol index 2abf32ee..e7ee6c7d 100644 --- a/packages/example-contracts/contracts/multi-chain-value/MultiChainValue.sol +++ b/packages/example-contracts/contracts/multi-chain-value/MultiChainValue.sol @@ -12,9 +12,9 @@ contract MultiChainValue is Ownable { mapping(uint256 => bool) public availableChainIds; - constructor(address zetaConnector_, address zetaTokenInput_) { + constructor(address zetaConnector_, address zetaToken_) { zetaConnector = zetaConnector_; - zetaToken = zetaTokenInput_; + zetaToken = zetaToken_; connector = ZetaConnector(zetaConnector_); } diff --git a/packages/example-contracts/hardhat.config.ts b/packages/example-contracts/hardhat.config.ts index 8008bae8..c45fbd42 100644 --- a/packages/example-contracts/hardhat.config.ts +++ b/packages/example-contracts/hardhat.config.ts @@ -14,6 +14,16 @@ dotenv.config(); const PRIVATE_KEYS = process.env.PRIVATE_KEY !== undefined ? [`0x${process.env.PRIVATE_KEY}`] : []; const config: HardhatUserConfig = { + etherscan: { + ...getHardhatConfigScanners(), + }, + gasReporter: { + currency: "USD", + enabled: process.env.REPORT_GAS !== undefined, + }, + networks: { + ...getHardhatConfigNetworks(PRIVATE_KEYS), + }, solidity: { compilers: [{ version: "0.6.6" /** For uniswap v2 */ }, { version: "0.8.7" }], settings: { @@ -27,16 +37,6 @@ const config: HardhatUserConfig = { }, }, }, - etherscan: { - ...getHardhatConfigScanners(), - }, - networks: { - ...getHardhatConfigNetworks(PRIVATE_KEYS), - }, - gasReporter: { - enabled: process.env.REPORT_GAS !== undefined, - currency: "USD", - }, }; export default config; diff --git a/packages/example-contracts/lib/cross-chain-counter/CrossChainCounter.helpers.ts b/packages/example-contracts/lib/cross-chain-counter/CrossChainCounter.helpers.ts index 87b66381..804867ed 100644 --- a/packages/example-contracts/lib/cross-chain-counter/CrossChainCounter.helpers.ts +++ b/packages/example-contracts/lib/cross-chain-counter/CrossChainCounter.helpers.ts @@ -44,7 +44,7 @@ export const getCrossChainCounter = async (existingContractAddress?: string) => } console.log("Deploying CrossChainCounter"); - const crossChainCounterContract = (await Factory.deploy(_networkVariables.CONNECTOR_ADDRESS)) as CrossChainCounter; + const crossChainCounterContract = (await Factory.deploy(_networkVariables.connectorAddress)) as CrossChainCounter; await crossChainCounterContract.deployed(); diff --git a/packages/example-contracts/lib/shared/network.constants.ts b/packages/example-contracts/lib/shared/network.constants.ts index 1e94ddd5..f452ff62 100644 --- a/packages/example-contracts/lib/shared/network.constants.ts +++ b/packages/example-contracts/lib/shared/network.constants.ts @@ -3,64 +3,64 @@ import { NetworkName } from "@zetachain/addresses"; type ChainId = 0 | 5 | 97 | 1337; export type NetworkVariables = { - CONNECTOR_ADDRESS: string; chainId: ChainId; + connectorAddress: string; crossChainId: ChainId; crossChainName: NetworkName | ""; }; export const networkVariables: Record = { + "bsc-localnet": { + chainId: 0, + connectorAddress: "", + crossChainId: 0, + crossChainName: "", + }, "bsc-testnet": { - CONNECTOR_ADDRESS: "0xE626402550fB921E4a47c11568F89dF3496fbEF0", chainId: 97, + connectorAddress: "0xE626402550fB921E4a47c11568F89dF3496fbEF0", crossChainId: 5, crossChainName: "goerli", }, - goerli: { - CONNECTOR_ADDRESS: "0x68Bc806414e743D88436AEB771Be387A55B4df70", - chainId: 5, - crossChainId: 97, - crossChainName: "bsc-testnet", - }, - "polygon-mumbai": { - CONNECTOR_ADDRESS: "", + "eth-localnet": { chainId: 0, + connectorAddress: "", crossChainId: 0, crossChainName: "", }, "eth-mainnet": { - CONNECTOR_ADDRESS: "", chainId: 0, + connectorAddress: "", crossChainId: 0, crossChainName: "", }, - hardhat: { - CONNECTOR_ADDRESS: "", - chainId: 0, - crossChainId: 0, - crossChainName: "", + goerli: { + chainId: 5, + connectorAddress: "0x68Bc806414e743D88436AEB771Be387A55B4df70", + crossChainId: 97, + crossChainName: "bsc-testnet", }, - ropsten: { - CONNECTOR_ADDRESS: "", + hardhat: { chainId: 0, + connectorAddress: "", crossChainId: 0, crossChainName: "", }, - "eth-localnet": { - CONNECTOR_ADDRESS: "", + "polygon-localnet": { chainId: 0, + connectorAddress: "", crossChainId: 0, crossChainName: "", }, - "bsc-localnet": { - CONNECTOR_ADDRESS: "", + "polygon-mumbai": { chainId: 0, + connectorAddress: "", crossChainId: 0, crossChainName: "", }, - "polygon-localnet": { - CONNECTOR_ADDRESS: "", + ropsten: { chainId: 0, + connectorAddress: "", crossChainId: 0, crossChainName: "", }, diff --git a/packages/example-contracts/scripts/add-liquidity-uniswap-v2.ts b/packages/example-contracts/scripts/add-liquidity-uniswap-v2.ts index 0a7c6802..136fabc8 100644 --- a/packages/example-contracts/scripts/add-liquidity-uniswap-v2.ts +++ b/packages/example-contracts/scripts/add-liquidity-uniswap-v2.ts @@ -56,7 +56,7 @@ const addZetaEthLiquidity = async ( 0, deployer.address, (await getNow()) + 360, - { value: ETHToAdd, gasLimit: 10_000_000 } + { gasLimit: 10_000_000, value: ETHToAdd } ); await tx2.wait(); }; diff --git a/packages/example-contracts/scripts/multi-chain-value/verify-contract.ts b/packages/example-contracts/scripts/multi-chain-value/verify-contract.ts index 0accdf56..4d3b0da1 100644 --- a/packages/example-contracts/scripts/multi-chain-value/verify-contract.ts +++ b/packages/example-contracts/scripts/multi-chain-value/verify-contract.ts @@ -4,8 +4,8 @@ import hardhat from "hardhat"; async function main() { await hardhat.run("verify:verify", { address: getAddress("multiChainValue"), - contract: "contracts/multi-chain-value/MultiChainValue.sol:MultiChainValue", constructorArguments: [getAddress("connector"), getAddress("zetaToken")], + contract: "contracts/multi-chain-value/MultiChainValue.sol:MultiChainValue", }); } diff --git a/packages/example-contracts/test/CrossChainCounter.spec.ts b/packages/example-contracts/test/CrossChainCounter.spec.ts index 33bcaf36..4f787842 100644 --- a/packages/example-contracts/test/CrossChainCounter.spec.ts +++ b/packages/example-contracts/test/CrossChainCounter.spec.ts @@ -72,11 +72,11 @@ describe("CrossChainCounter tests", () => { it("Should revert if the caller is not the Connector contract", async () => { await expect( crossChainCounterContractA.onZetaMessage({ - zetaTxSenderAddress: ethers.utils.solidityPack(["address"], [crossChainCounterContractA.address]), - sourceChainId: 1, destinationAddress: crossChainCounterContractB.address, - zetaValueAndGas: 0, message: encoder.encode(["address"], [deployerAddress]), + sourceChainId: 1, + zetaTxSenderAddress: ethers.utils.solidityPack(["address"], [crossChainCounterContractA.address]), + zetaValueAndGas: 0, }) ).to.be.revertedWith("This function can only be called by the Connector contract"); }); diff --git a/packages/example-contracts/test/CrossChainWarriors.spec.ts b/packages/example-contracts/test/CrossChainWarriors.spec.ts index 9c29c3eb..e00d60c6 100644 --- a/packages/example-contracts/test/CrossChainWarriors.spec.ts +++ b/packages/example-contracts/test/CrossChainWarriors.spec.ts @@ -145,11 +145,11 @@ describe("CrossChainWarriors tests", () => { it("Should revert if the caller is not the Connector contract", async () => { await expect( crossChainWarriorsContractChainA.onZetaMessage({ - zetaTxSenderAddress: ethers.utils.solidityPack(["address"], [crossChainWarriorsContractChainA.address]), - sourceChainId: 1, destinationAddress: crossChainWarriorsContractChainB.address, - zetaValueAndGas: 0, message: encoder.encode(["address"], [deployerAddress]), + sourceChainId: 1, + zetaTxSenderAddress: ethers.utils.solidityPack(["address"], [crossChainWarriorsContractChainA.address]), + zetaValueAndGas: 0, }) ).to.be.revertedWith("This function can only be called by the Connector contract"); }); diff --git a/packages/example-contracts/test/MultiChainSwap.spec.ts b/packages/example-contracts/test/MultiChainSwap.spec.ts index ab1204cb..777fabd4 100644 --- a/packages/example-contracts/test/MultiChainSwap.spec.ts +++ b/packages/example-contracts/test/MultiChainSwap.spec.ts @@ -402,11 +402,11 @@ describe("MultiChainSwap tests", () => { it("Should revert if the caller is not ZetaConnector", async () => { await expect( multiChainSwapContractA.onZetaMessage({ - zetaTxSenderAddress: ethers.utils.solidityPack(["address"], [multiChainSwapContractA.address]), - sourceChainId: chainBId, destinationAddress: multiChainSwapContractB.address, - zetaValueAndGas: 0, message: encoder.encode(["address"], [multiChainSwapContractA.address]), + sourceChainId: chainBId, + zetaTxSenderAddress: ethers.utils.solidityPack(["address"], [multiChainSwapContractA.address]), + zetaValueAndGas: 0, }) ).to.be.revertedWith(getCustomErrorMessage("InvalidCaller", [deployer.address])); }); @@ -428,12 +428,12 @@ describe("MultiChainSwap tests", () => { it("Should revert if the caller is not ZetaConnector", async () => { await expect( multiChainSwapContractA.onZetaRevert({ - zetaTxSenderAddress: deployer.address, - sourceChainId: chainAId, destinationAddress: ethers.utils.solidityPack(["address"], [multiChainSwapContractB.address]), destinationChainId: chainBId, - zetaValueAndGas: 0, message: encoder.encode(["address"], [multiChainSwapContractA.address]), + sourceChainId: chainAId, + zetaTxSenderAddress: deployer.address, + zetaValueAndGas: 0, }) ).to.be.revertedWith(getCustomErrorMessage("InvalidCaller", [deployer.address])); }); diff --git a/packages/example-contracts/test/test.helpers.ts b/packages/example-contracts/test/test.helpers.ts index ae376c3f..19824bb5 100644 --- a/packages/example-contracts/test/test.helpers.ts +++ b/packages/example-contracts/test/test.helpers.ts @@ -36,7 +36,7 @@ export const parseZetaLog = (logs: ContractReceipt["logs"]) => { return eventNames; }; -type CustomErrorParamType = string | BigNumber | number; +type CustomErrorParamType = BigNumber | number | string; export const getCustomErrorMessage = (errorMethod: string, params?: [CustomErrorParamType]) => { const stringParams = params ? params diff --git a/packages/protocol-contracts/.eslintrc.js b/packages/protocol-contracts/.eslintrc.js index 4f9ad61e..77b8f69a 100644 --- a/packages/protocol-contracts/.eslintrc.js +++ b/packages/protocol-contracts/.eslintrc.js @@ -3,13 +3,16 @@ const path = require("path"); const OFF = 0; module.exports = { - extends: ["../../.eslintrc.js"], env: { browser: false, es2021: true, mocha: true, node: true, }, + extends: ["../../.eslintrc.js"], + rules: { + "no-console": OFF, + }, settings: { "import/resolver": { typescript: { @@ -17,7 +20,4 @@ module.exports = { }, }, }, - rules: { - "no-console": OFF, - }, }; diff --git a/packages/protocol-contracts/contracts/ZetaInteractor.sol b/packages/protocol-contracts/contracts/ZetaInteractor.sol index 69d7742c..ff6a7daf 100644 --- a/packages/protocol-contracts/contracts/ZetaInteractor.sol +++ b/packages/protocol-contracts/contracts/ZetaInteractor.sol @@ -45,7 +45,7 @@ abstract contract ZetaInteractor is Ownable, ZetaInteractorErrors { /** * @dev Useful for contracts that inherit from this one */ - function isValidChainId(uint256 chainId) internal view returns (bool) { + function _isValidChainId(uint256 chainId) internal view returns (bool) { return (keccak256(interactorsByChainId[chainId]) != keccak256(new bytes(0))); } diff --git a/packages/protocol-contracts/contracts/ZetaTokenConsumerUniV2.strategy.sol b/packages/protocol-contracts/contracts/ZetaTokenConsumerUniV2.strategy.sol new file mode 100644 index 00000000..44ff7a58 --- /dev/null +++ b/packages/protocol-contracts/contracts/ZetaTokenConsumerUniV2.strategy.sol @@ -0,0 +1,166 @@ +// SPDX-License-Identifier: MIT +pragma solidity 0.8.7; + +import "@openzeppelin/contracts/interfaces/IERC20.sol"; +import "@uniswap/v2-periphery/contracts/interfaces/IUniswapV2Router02.sol"; + +import "./interfaces/ZetaInterfaces.sol"; + +interface ZetaTokenConsumerUniV2Errors { + error InvalidAddress(); + + error InputCantBeZero(); + + error ErrorGettingZeta(); + + error ErrorExchangingZeta(); +} + +/** + * @dev Uniswap V2 strategy for ZetaTokenConsumer + */ +contract ZetaTokenConsumerUniV2 is ZetaTokenConsumer, ZetaTokenConsumerUniV2Errors { + uint256 internal constant MAX_DEADLINE = 100; + + address public uniswapV2RouterAddress; + address internal immutable wETH; + address public zetaToken; + + IUniswapV2Router02 internal uniswapV2Router; + + constructor(address zetaToken_, address uniswapV2Router_) { + if (zetaToken_ == address(0) || uniswapV2Router_ == address(0)) revert InvalidAddress(); + + zetaToken = zetaToken_; + uniswapV2RouterAddress = uniswapV2Router_; + uniswapV2Router = IUniswapV2Router02(uniswapV2Router_); + wETH = uniswapV2Router.WETH(); + } + + function getZetaFromEth(address destinationAddress, uint256 minAmountOut) external payable override { + if (destinationAddress == address(0)) revert InvalidAddress(); + if (msg.value == 0) revert InputCantBeZero(); + + address[] memory path = new address[](2); + path[0] = wETH; + path[1] = zetaToken; + + uint256[] memory amounts = uniswapV2Router.swapExactETHForTokens{value: msg.value}( + minAmountOut, + path, + destinationAddress, + block.timestamp + MAX_DEADLINE + ); + + uint256 amountOut = amounts[path.length - 1]; + + emit EthExchangedForZeta(msg.value, amountOut); + } + + function getZetaFromToken( + address destinationAddress, + uint256 minAmountOut, + address inputToken, + uint256 inputTokenAmount + ) external override { + if (destinationAddress == address(0) || inputToken == address(0)) revert InvalidAddress(); + if (inputTokenAmount == 0) revert InputCantBeZero(); + + bool success = IERC20(inputToken).transferFrom(msg.sender, address(this), inputTokenAmount); + if (!success) revert ErrorGettingZeta(); + success = IERC20(inputToken).approve(uniswapV2RouterAddress, inputTokenAmount); + if (!success) revert ErrorGettingZeta(); + + address[] memory path; + if (inputToken == wETH) { + path = new address[](2); + path[0] = wETH; + path[1] = zetaToken; + } else { + path = new address[](3); + path[0] = inputToken; + path[1] = wETH; + path[2] = zetaToken; + } + + uint256[] memory amounts = uniswapV2Router.swapExactTokensForTokens( + inputTokenAmount, + minAmountOut, + path, + destinationAddress, + block.timestamp + MAX_DEADLINE + ); + uint256 amountOut = amounts[path.length - 1]; + + emit TokenExchangedForZeta(inputToken, inputTokenAmount, amountOut); + } + + function getEthFromZeta( + address destinationAddress, + uint256 minAmountOut, + uint256 zetaTokenAmount + ) external override { + if (destinationAddress == address(0)) revert InvalidAddress(); + if (zetaTokenAmount == 0) revert InputCantBeZero(); + + bool success = IERC20(zetaToken).transferFrom(msg.sender, address(this), zetaTokenAmount); + if (!success) revert ErrorExchangingZeta(); + success = IERC20(zetaToken).approve(uniswapV2RouterAddress, zetaTokenAmount); + if (!success) revert ErrorExchangingZeta(); + + address[] memory path = new address[](2); + path[0] = zetaToken; + path[1] = wETH; + + uint256[] memory amounts = uniswapV2Router.swapExactTokensForETH( + zetaTokenAmount, + minAmountOut, + path, + destinationAddress, + block.timestamp + MAX_DEADLINE + ); + + uint256 amountOut = amounts[path.length - 1]; + + emit ZetaExchangedForEth(zetaTokenAmount, amountOut); + } + + function getTokenFromZeta( + address destinationAddress, + uint256 minAmountOut, + address outputToken, + uint256 zetaTokenAmount + ) external override { + if (destinationAddress == address(0) || outputToken == address(0)) revert InvalidAddress(); + if (zetaTokenAmount == 0) revert InputCantBeZero(); + + bool success = IERC20(zetaToken).transferFrom(msg.sender, address(this), zetaTokenAmount); + if (!success) revert ErrorExchangingZeta(); + success = IERC20(zetaToken).approve(uniswapV2RouterAddress, zetaTokenAmount); + if (!success) revert ErrorExchangingZeta(); + + address[] memory path; + if (outputToken == wETH) { + path = new address[](2); + path[0] = zetaToken; + path[1] = wETH; + } else { + path = new address[](3); + path[0] = zetaToken; + path[1] = wETH; + path[2] = outputToken; + } + + uint256[] memory amounts = uniswapV2Router.swapExactTokensForTokens( + zetaTokenAmount, + minAmountOut, + path, + destinationAddress, + block.timestamp + MAX_DEADLINE + ); + + uint256 amountOut = amounts[path.length - 1]; + + emit ZetaExchangedForToken(outputToken, zetaTokenAmount, amountOut); + } +} diff --git a/packages/protocol-contracts/contracts/ZetaTokenConsumerUniV3.strategy.sol b/packages/protocol-contracts/contracts/ZetaTokenConsumerUniV3.strategy.sol new file mode 100644 index 00000000..9ae1013f --- /dev/null +++ b/packages/protocol-contracts/contracts/ZetaTokenConsumerUniV3.strategy.sol @@ -0,0 +1,171 @@ +// SPDX-License-Identifier: MIT +pragma solidity 0.8.7; + +import "@openzeppelin/contracts/interfaces/IERC20.sol"; +import "@uniswap/v3-periphery/contracts/interfaces/ISwapRouter.sol"; +import "@uniswap/v3-periphery/contracts/interfaces/IQuoter.sol"; + +import "./interfaces/ZetaInterfaces.sol"; + +interface ZetaTokenConsumerUniV3Errors { + error InvalidAddress(); + + error InputCantBeZero(); + + error ErrorGettingToken(); + + error ErrorSendingETH(); +} + +interface WETH9 { + function withdraw(uint256 wad) external; +} + +/** + * @dev Uniswap V3 strategy for ZetaTokenConsumer + */ +contract ZetaTokenConsumerUniV3 is ZetaTokenConsumer, ZetaTokenConsumerUniV3Errors { + uint256 internal constant MAX_DEADLINE = 100; + + uint24 public immutable zetaPoolFee; + uint24 public immutable tokenPoolFee; + + address internal immutable WETH9Address; + address public immutable zetaToken; + + ISwapRouter public immutable uniswapV3Router; + IQuoter public immutable quoter; + + constructor( + address zetaToken_, + address uniswapV3Router_, + address quoter_, + address WETH9Address_, + uint24 zetaPoolFee_, + uint24 tokenPoolFee_ + ) { + if ( + zetaToken_ == address(0) || + uniswapV3Router_ == address(0) || + quoter_ == address(0) || + WETH9Address_ == address(0) + ) revert InvalidAddress(); + + zetaToken = zetaToken_; + uniswapV3Router = ISwapRouter(uniswapV3Router_); + quoter = IQuoter(quoter_); + WETH9Address = WETH9Address_; + zetaPoolFee = zetaPoolFee_; + tokenPoolFee = tokenPoolFee_; + } + + receive() external payable {} + + function getZetaFromEth(address destinationAddress, uint256 minAmountOut) external payable override { + if (destinationAddress == address(0)) revert InvalidAddress(); + if (msg.value == 0) revert InputCantBeZero(); + + ISwapRouter.ExactInputSingleParams memory params = ISwapRouter.ExactInputSingleParams({ + deadline: block.timestamp + MAX_DEADLINE, + tokenIn: WETH9Address, + tokenOut: zetaToken, + fee: zetaPoolFee, + recipient: destinationAddress, + amountIn: msg.value, + amountOutMinimum: minAmountOut, + sqrtPriceLimitX96: 0 + }); + + uint256 amountOut = uniswapV3Router.exactInputSingle{value: msg.value}(params); + + emit EthExchangedForZeta(msg.value, amountOut); + } + + function getZetaFromToken( + address destinationAddress, + uint256 minAmountOut, + address inputToken, + uint256 inputTokenAmount + ) external override { + if (destinationAddress == address(0) || inputToken == address(0)) revert InvalidAddress(); + if (inputTokenAmount == 0) revert InputCantBeZero(); + + bool success = IERC20(inputToken).transferFrom(msg.sender, address(this), inputTokenAmount); + if (!success) revert ErrorGettingToken(); + success = IERC20(inputToken).approve(address(uniswapV3Router), inputTokenAmount); + if (!success) revert ErrorGettingToken(); + + ISwapRouter.ExactInputParams memory params = ISwapRouter.ExactInputParams({ + deadline: block.timestamp + MAX_DEADLINE, + path: abi.encodePacked(inputToken, tokenPoolFee, WETH9Address, zetaPoolFee, zetaToken), + recipient: destinationAddress, + amountIn: inputTokenAmount, + amountOutMinimum: minAmountOut + }); + + uint256 amountOut = uniswapV3Router.exactInput(params); + + emit TokenExchangedForZeta(inputToken, inputTokenAmount, amountOut); + } + + function getEthFromZeta( + address destinationAddress, + uint256 minAmountOut, + uint256 zetaTokenAmount + ) external override { + if (destinationAddress == address(0)) revert InvalidAddress(); + if (zetaTokenAmount == 0) revert InputCantBeZero(); + + bool success = IERC20(zetaToken).transferFrom(msg.sender, address(this), zetaTokenAmount); + if (!success) revert ErrorGettingToken(); + success = IERC20(zetaToken).approve(address(uniswapV3Router), zetaTokenAmount); + if (!success) revert ErrorGettingToken(); + + ISwapRouter.ExactInputSingleParams memory params = ISwapRouter.ExactInputSingleParams({ + deadline: block.timestamp + MAX_DEADLINE, + tokenIn: zetaToken, + tokenOut: WETH9Address, + fee: zetaPoolFee, + recipient: address(this), + amountIn: zetaTokenAmount, + amountOutMinimum: minAmountOut, + sqrtPriceLimitX96: 0 + }); + + uint256 amountOut = uniswapV3Router.exactInputSingle(params); + + WETH9(WETH9Address).withdraw(amountOut); + + (bool sent, ) = destinationAddress.call{value: amountOut}(""); + if (!sent) revert ErrorSendingETH(); + + emit ZetaExchangedForEth(zetaTokenAmount, amountOut); + } + + function getTokenFromZeta( + address destinationAddress, + uint256 minAmountOut, + address outputToken, + uint256 zetaTokenAmount + ) external override { + if (destinationAddress == address(0) || outputToken == address(0)) revert InvalidAddress(); + if (zetaTokenAmount == 0) revert InputCantBeZero(); + + bool success = IERC20(zetaToken).transferFrom(msg.sender, address(this), zetaTokenAmount); + if (!success) revert ErrorGettingToken(); + success = IERC20(zetaToken).approve(address(uniswapV3Router), zetaTokenAmount); + if (!success) revert ErrorGettingToken(); + + ISwapRouter.ExactInputParams memory params = ISwapRouter.ExactInputParams({ + deadline: block.timestamp + MAX_DEADLINE, + path: abi.encodePacked(zetaToken, zetaPoolFee, WETH9Address, tokenPoolFee, outputToken), + recipient: destinationAddress, + amountIn: zetaTokenAmount, + amountOutMinimum: minAmountOut + }); + + uint256 amountOut = uniswapV3Router.exactInput(params); + + emit ZetaExchangedForToken(outputToken, zetaTokenAmount, amountOut); + } +} diff --git a/packages/protocol-contracts/contracts/interfaces/ZetaInterfaces.sol b/packages/protocol-contracts/contracts/interfaces/ZetaInterfaces.sol index 05250aae..2f103fcf 100644 --- a/packages/protocol-contracts/contracts/interfaces/ZetaInterfaces.sol +++ b/packages/protocol-contracts/contracts/interfaces/ZetaInterfaces.sol @@ -63,3 +63,40 @@ interface ZetaReceiver { */ function onZetaRevert(ZetaInterfaces.ZetaRevert calldata zetaRevert) external; } + +/** + * @dev ZetaTokenConsumer makes it easier to handle the following situations: + * - Getting Zeta using native coin (to pay for destination gas while using `connector.send`) + * - Getting Zeta using a token (to pay for destination gas while using `connector.send`) + * - Getting native coin using Zeta (to return unused destination gas when `onZetaRevert` is executed) + * - Getting a token using Zeta (to return unused destination gas when `onZetaRevert` is executed) + * @dev The interface can be implemented using different strategies, like UniswapV2, UniswapV3, etc + */ +interface ZetaTokenConsumer { + event EthExchangedForZeta(uint256 amountIn, uint256 amountOut); + event TokenExchangedForZeta(address token, uint256 amountIn, uint256 amountOut); + event ZetaExchangedForEth(uint256 amountIn, uint256 amountOut); + event ZetaExchangedForToken(address token, uint256 amountIn, uint256 amountOut); + + function getZetaFromEth(address destinationAddress, uint256 minAmountOut) external payable; + + function getZetaFromToken( + address destinationAddress, + uint256 minAmountOut, + address inputToken, + uint256 inputTokenAmount + ) external; + + function getEthFromZeta( + address destinationAddress, + uint256 minAmountOut, + uint256 zetaTokenAmount + ) external; + + function getTokenFromZeta( + address destinationAddress, + uint256 minAmountOut, + address outputToken, + uint256 zetaTokenAmount + ) external; +} diff --git a/packages/protocol-contracts/contracts/testing/TestContracts.sol b/packages/protocol-contracts/contracts/testing/TestContracts.sol new file mode 100644 index 00000000..53520a08 --- /dev/null +++ b/packages/protocol-contracts/contracts/testing/TestContracts.sol @@ -0,0 +1,10 @@ +// SPDX-License-Identifier: MIT +pragma solidity 0.6.6; + +/** + * @dev Contracts that need to be compiled for testing purposes + */ + +import "@uniswap/v2-core/contracts/interfaces/IUniswapV2Factory.sol"; +import "@uniswap/v2-core/contracts/interfaces/IUniswapV2Pair.sol"; +import "@uniswap/v2-periphery/contracts/UniswapV2Router02.sol"; diff --git a/packages/protocol-contracts/contracts/testing/TestUniswapV3Contracts.sol b/packages/protocol-contracts/contracts/testing/TestUniswapV3Contracts.sol new file mode 100644 index 00000000..b6564cdc --- /dev/null +++ b/packages/protocol-contracts/contracts/testing/TestUniswapV3Contracts.sol @@ -0,0 +1,181 @@ +// SPDX-License-Identifier: GPL-2.0-or-later +pragma solidity >=0.7.5; +pragma abicoder v2; + +/// @title Non-fungible token for positions +/// @notice Wraps Uniswap V3 positions in a non-fungible token interface which allows for them to be transferred +/// and authorized. +interface INonfungiblePositionManager { + /// @notice Emitted when liquidity is increased for a position NFT + /// @dev Also emitted when a token is minted + /// @param tokenId The ID of the token for which liquidity was increased + /// @param liquidity The amount by which liquidity for the NFT position was increased + /// @param amount0 The amount of token0 that was paid for the increase in liquidity + /// @param amount1 The amount of token1 that was paid for the increase in liquidity + event IncreaseLiquidity(uint256 indexed tokenId, uint128 liquidity, uint256 amount0, uint256 amount1); + /// @notice Emitted when liquidity is decreased for a position NFT + /// @param tokenId The ID of the token for which liquidity was decreased + /// @param liquidity The amount by which liquidity for the NFT position was decreased + /// @param amount0 The amount of token0 that was accounted for the decrease in liquidity + /// @param amount1 The amount of token1 that was accounted for the decrease in liquidity + event DecreaseLiquidity(uint256 indexed tokenId, uint128 liquidity, uint256 amount0, uint256 amount1); + /// @notice Emitted when tokens are collected for a position NFT + /// @dev The amounts reported may not be exactly equivalent to the amounts transferred, due to rounding behavior + /// @param tokenId The ID of the token for which underlying tokens were collected + /// @param recipient The address of the account that received the collected tokens + /// @param amount0 The amount of token0 owed to the position that was collected + /// @param amount1 The amount of token1 owed to the position that was collected + event Collect(uint256 indexed tokenId, address recipient, uint256 amount0, uint256 amount1); + + /// @notice Returns the position information associated with a given token ID. + /// @dev Throws if the token ID is not valid. + /// @param tokenId The ID of the token that represents the position + /// @return nonce The nonce for permits + /// @return operator The address that is approved for spending + /// @return token0 The address of the token0 for a specific pool + /// @return token1 The address of the token1 for a specific pool + /// @return fee The fee associated with the pool + /// @return tickLower The lower end of the tick range for the position + /// @return tickUpper The higher end of the tick range for the position + /// @return liquidity The liquidity of the position + /// @return feeGrowthInside0LastX128 The fee growth of token0 as of the last action on the individual position + /// @return feeGrowthInside1LastX128 The fee growth of token1 as of the last action on the individual position + /// @return tokensOwed0 The uncollected amount of token0 owed to the position as of the last computation + /// @return tokensOwed1 The uncollected amount of token1 owed to the position as of the last computation + function positions(uint256 tokenId) + external + view + returns ( + uint96 nonce, + address operator, + address token0, + address token1, + uint24 fee, + int24 tickLower, + int24 tickUpper, + uint128 liquidity, + uint256 feeGrowthInside0LastX128, + uint256 feeGrowthInside1LastX128, + uint128 tokensOwed0, + uint128 tokensOwed1 + ); + + struct MintParams { + address token0; + address token1; + uint24 fee; + int24 tickLower; + int24 tickUpper; + uint256 amount0Desired; + uint256 amount1Desired; + uint256 amount0Min; + uint256 amount1Min; + address recipient; + uint256 deadline; + } + + /// @notice Creates a new position wrapped in a NFT + /// @dev Call this when the pool does exist and is initialized. Note that if the pool is created but not initialized + /// a method does not exist, i.e. the pool is assumed to be initialized. + /// @param params The params necessary to mint a position, encoded as `MintParams` in calldata + /// @return tokenId The ID of the token that represents the minted position + /// @return liquidity The amount of liquidity for this position + /// @return amount0 The amount of token0 + /// @return amount1 The amount of token1 + function mint(MintParams calldata params) + external + payable + returns ( + uint256 tokenId, + uint128 liquidity, + uint256 amount0, + uint256 amount1 + ); + + struct IncreaseLiquidityParams { + uint256 tokenId; + uint256 amount0Desired; + uint256 amount1Desired; + uint256 amount0Min; + uint256 amount1Min; + uint256 deadline; + } + + /// @notice Increases the amount of liquidity in a position, with tokens paid by the `msg.sender` + /// @param params tokenId The ID of the token for which liquidity is being increased, + /// amount0Desired The desired amount of token0 to be spent, + /// amount1Desired The desired amount of token1 to be spent, + /// amount0Min The minimum amount of token0 to spend, which serves as a slippage check, + /// amount1Min The minimum amount of token1 to spend, which serves as a slippage check, + /// deadline The time by which the transaction must be included to effect the change + /// @return liquidity The new liquidity amount as a result of the increase + /// @return amount0 The amount of token0 to acheive resulting liquidity + /// @return amount1 The amount of token1 to acheive resulting liquidity + function increaseLiquidity(IncreaseLiquidityParams calldata params) + external + payable + returns ( + uint128 liquidity, + uint256 amount0, + uint256 amount1 + ); + + struct DecreaseLiquidityParams { + uint256 tokenId; + uint128 liquidity; + uint256 amount0Min; + uint256 amount1Min; + uint256 deadline; + } + + /// @notice Decreases the amount of liquidity in a position and accounts it to the position + /// @param params tokenId The ID of the token for which liquidity is being decreased, + /// amount The amount by which liquidity will be decreased, + /// amount0Min The minimum amount of token0 that should be accounted for the burned liquidity, + /// amount1Min The minimum amount of token1 that should be accounted for the burned liquidity, + /// deadline The time by which the transaction must be included to effect the change + /// @return amount0 The amount of token0 accounted to the position's tokens owed + /// @return amount1 The amount of token1 accounted to the position's tokens owed + function decreaseLiquidity(DecreaseLiquidityParams calldata params) + external + payable + returns (uint256 amount0, uint256 amount1); + + struct CollectParams { + uint256 tokenId; + address recipient; + uint128 amount0Max; + uint128 amount1Max; + } + + /// @notice Collects up to a maximum amount of fees owed to a specific position to the recipient + /// @param params tokenId The ID of the NFT for which tokens are being collected, + /// recipient The account that should receive the tokens, + /// amount0Max The maximum amount of token0 to collect, + /// amount1Max The maximum amount of token1 to collect + /// @return amount0 The amount of fees collected in token0 + /// @return amount1 The amount of fees collected in token1 + function collect(CollectParams calldata params) external payable returns (uint256 amount0, uint256 amount1); + + /// @notice Burns a token ID, which deletes it from the NFT contract. The token must have 0 liquidity and all tokens + /// must be collected first. + /// @param tokenId The ID of the token that is being burned + function burn(uint256 tokenId) external payable; +} + +// import "@uniswap/v3-periphery/contracts/interfaces/IPoolInitializer.sol"; +interface IPoolInitializer { + /// @notice Creates a new pool if it does not exist, then initializes if not initialized + /// @dev This method can be bundled with others via IMulticall for the first action (e.g. mint) performed against a pool + /// @param token0 The contract address of token0 of the pool + /// @param token1 The contract address of token1 of the pool + /// @param fee The fee amount of the v3 pool for the specified token pair + /// @param sqrtPriceX96 The initial square root price of the pool as a Q64.96 value + /// @return pool Returns the pool address based on the pair of tokens and fee, will return the newly created pool address if necessary + function createAndInitializePoolIfNecessary( + address token0, + address token1, + uint24 fee, + uint160 sqrtPriceX96 + ) external payable returns (address pool); +} diff --git a/packages/protocol-contracts/hardhat.config.ts b/packages/protocol-contracts/hardhat.config.ts index e508073d..5d95e45e 100644 --- a/packages/protocol-contracts/hardhat.config.ts +++ b/packages/protocol-contracts/hardhat.config.ts @@ -13,13 +13,19 @@ const PRIVATE_KEYS = process.env.PRIVATE_KEY !== undefined ? [`0x${process.env.PRIVATE_KEY}`, `0x${process.env.TSS_PRIVATE_KEY}`] : []; const config: HardhatUserConfig = { - solidity: "0.8.7", etherscan: { ...getHardhatConfigScanners(), }, networks: { ...getHardhatConfigNetworks(PRIVATE_KEYS), }, + solidity: { + compilers: [ + { version: "0.6.6" /** For uniswap v2 */ }, + { version: "0.7.6" /** For uniswap v3 */ }, + { version: "0.8.7" }, + ], + }, }; export default config; diff --git a/packages/protocol-contracts/lib/contracts.helpers.ts b/packages/protocol-contracts/lib/contracts.helpers.ts index 968dd049..2fe64fbd 100644 --- a/packages/protocol-contracts/lib/contracts.helpers.ts +++ b/packages/protocol-contracts/lib/contracts.helpers.ts @@ -2,7 +2,6 @@ import { BaseContract, ContractFactory } from "ethers"; import { ethers } from "hardhat"; import { - ZetaConnector__factory as ZetaConnectorFactory, ZetaConnectorBase, ZetaConnectorBase__factory as ZetaConnectorBaseFactory, ZetaConnectorEth, @@ -11,10 +10,16 @@ import { ZetaConnectorNonEth__factory as ZetaConnectorNonEthFactory, ZetaEth, ZetaEth__factory as ZetaEthFactory, + ZetaInteractorMock, + ZetaInteractorMock__factory as ZetaInteractorMockFactory, ZetaNonEth, ZetaNonEth__factory as ZetaNonEthFactory, ZetaReceiverMock, ZetaReceiverMock__factory as ZetaReceiverMockFactory, + ZetaTokenConsumerUniV2, + ZetaTokenConsumerUniV2__factory as ZetaTokenConsumerUniV2Factory, + ZetaTokenConsumerUniV3, + ZetaTokenConsumerUniV3__factory as ZetaTokenConsumerUniV3Factory, } from "../typechain-types"; export const isEthNetworkName = (networkName: string) => @@ -96,6 +101,24 @@ export const getZetaConnectorNonEth = async (params: GetContractParams + getContract({ + contractName: "ZetaInteractorMock", + deployParams: [zetaToken], + }); + +export const getZetaTokenConsumerUniV2Strategy = async (params: GetContractParams) => + getContract({ + contractName: "ZetaTokenConsumerUniV2", + ...params, + }); + +export const getZetaTokenConsumerUniV3Strategy = async (params: GetContractParams) => + getContract({ + contractName: "ZetaTokenConsumerUniV3", + ...params, + }); + export type GetContractParams = | { deployParams: Parameters; diff --git a/packages/protocol-contracts/lib/zeta-interactor/ZetaInteractor.helpers.ts b/packages/protocol-contracts/lib/zeta-interactor/ZetaInteractor.helpers.ts index fe327384..d93bf01d 100644 --- a/packages/protocol-contracts/lib/zeta-interactor/ZetaInteractor.helpers.ts +++ b/packages/protocol-contracts/lib/zeta-interactor/ZetaInteractor.helpers.ts @@ -1,7 +1,7 @@ import { ZetaInteractorMock, ZetaInteractorMock__factory } from "../../typechain-types"; import { getContract } from "../contracts.helpers"; -export const getZetaConnectorMock = async (zetaToken: string) => +export const getZetaInteractorMock = async (zetaToken: string) => getContract({ contractName: "ZetaInteractorMock", deployParams: [zetaToken], diff --git a/packages/protocol-contracts/package.json b/packages/protocol-contracts/package.json index 267fb05c..c370bf69 100644 --- a/packages/protocol-contracts/package.json +++ b/packages/protocol-contracts/package.json @@ -23,6 +23,8 @@ }, "dependencies": { "@openzeppelin/contracts": "^4.5.0", + "@uniswap/v2-periphery": "1.1.0-beta.0", + "@uniswap/v3-periphery": "1.1.0", "ethers": "5.6.8" } } diff --git a/packages/protocol-contracts/scripts/test-zeta-send.ts b/packages/protocol-contracts/scripts/test-zeta-send.ts index 8395ae8e..74fc2305 100644 --- a/packages/protocol-contracts/scripts/test-zeta-send.ts +++ b/packages/protocol-contracts/scripts/test-zeta-send.ts @@ -14,12 +14,12 @@ async function main() { console.log("Sending"); await ( await contract.send({ - destinationChainId: getChainId("bsc-testnet"), destinationAddress: encoder.encode(["address"], ["0x09b80BEcBe709Dd354b1363727514309d1Ac3C7b"]), + destinationChainId: getChainId("bsc-testnet"), destinationGasLimit: 1_000_000, message: encoder.encode(["address"], ["0x09b80BEcBe709Dd354b1363727514309d1Ac3C7b"]), - zetaValueAndGas: 0, zetaParams: [], + zetaValueAndGas: 0, }) ).wait(); console.log("Sent"); diff --git a/packages/protocol-contracts/scripts/verify-contracts.ts b/packages/protocol-contracts/scripts/verify-contracts.ts index 6b71a866..f3939404 100644 --- a/packages/protocol-contracts/scripts/verify-contracts.ts +++ b/packages/protocol-contracts/scripts/verify-contracts.ts @@ -15,16 +15,16 @@ async function main() { await hardhat .run("verify:verify", { address: getAddress("zetaToken"), - contract: "contracts/evm/Zeta.eth.sol:ZetaEth", constructorArguments: [ZETA_INITIAL_SUPPLY], + contract: "contracts/evm/Zeta.eth.sol:ZetaEth", }) .catch(handleCatch); await hardhat .run("verify:verify", { address: getAddress("connector"), - contract: "contracts/evm/ZetaConnector.eth.sol:ZetaConnectorEth", constructorArguments: [getAddress("zetaToken"), getAddress("tss"), getAddress("tssUpdater")], + contract: "contracts/evm/ZetaConnector.eth.sol:ZetaConnectorEth", }) .catch(handleCatch); } else { @@ -38,8 +38,8 @@ async function main() { await hardhat .run("verify:verify", { address: getAddress("connector"), - contract: "contracts/evm/ZetaConnector.non-eth.sol:ZetaConnectorNonEth", constructorArguments: [getAddress("zetaToken"), getAddress("tss"), getAddress("tssUpdater")], + contract: "contracts/evm/ZetaConnector.non-eth.sol:ZetaConnectorNonEth", }) .catch(handleCatch); } diff --git a/packages/protocol-contracts/test/Zeta.non-eth.spec.ts b/packages/protocol-contracts/test/Zeta.non-eth.spec.ts index 18e0a6e2..facb429e 100644 --- a/packages/protocol-contracts/test/Zeta.non-eth.spec.ts +++ b/packages/protocol-contracts/test/Zeta.non-eth.spec.ts @@ -137,8 +137,8 @@ describe("ZetaNonEth tests", () => { destinationChainId: 1, destinationGasLimit: 2500000, message: new ethers.utils.AbiCoder().encode(["string"], ["hello"]), - zetaValueAndGas: 1000, zetaParams: new ethers.utils.AbiCoder().encode(["string"], ["hello"]), + zetaValueAndGas: 1000, }); const e2 = await zetaTokenNonEthContract.queryFilter(zetaBurntFilter); diff --git a/packages/protocol-contracts/test/ZetaConnector.spec.ts b/packages/protocol-contracts/test/ZetaConnector.spec.ts index 2a061324..b79ecf0b 100644 --- a/packages/protocol-contracts/test/ZetaConnector.spec.ts +++ b/packages/protocol-contracts/test/ZetaConnector.spec.ts @@ -27,6 +27,7 @@ describe("ZetaConnector tests", () => { let zetaConnectorEthContract: ZetaConnectorEth; let zetaReceiverMockContract: ZetaReceiverMock; let zetaConnectorNonEthContract: ZetaConnectorNonEth; + let tssUpdater: SignerWithAddress; let tssSigner: SignerWithAddress; let randomSigner: SignerWithAddress; @@ -197,8 +198,8 @@ describe("ZetaConnector tests", () => { destinationChainId: 1, destinationGasLimit: 2500000, message: new ethers.utils.AbiCoder().encode(["string"], ["hello"]), - zetaValueAndGas: 1000, zetaParams: new ethers.utils.AbiCoder().encode(["string"], ["hello"]), + zetaValueAndGas: 1000, }) ).to.revertedWith("Pausable: paused"); }); @@ -214,8 +215,8 @@ describe("ZetaConnector tests", () => { destinationChainId: 1, destinationGasLimit: 2500000, message: new ethers.utils.AbiCoder().encode(["string"], ["hello"]), - zetaValueAndGas: 1000, zetaParams: new ethers.utils.AbiCoder().encode(["string"], ["hello"]), + zetaValueAndGas: 1000, }) ).to.revertedWith("ERC20: transfer amount exceeds balance"); }); @@ -227,8 +228,8 @@ describe("ZetaConnector tests", () => { destinationChainId: 1, destinationGasLimit: 2500000, message: new ethers.utils.AbiCoder().encode(["string"], ["hello"]), - zetaValueAndGas: 1000, zetaParams: new ethers.utils.AbiCoder().encode(["string"], ["hello"]), + zetaValueAndGas: 1000, }) ).to.revertedWith("ERC20: insufficient allowance"); }); @@ -248,8 +249,8 @@ describe("ZetaConnector tests", () => { destinationChainId: 1, destinationGasLimit: 2500000, message: new ethers.utils.AbiCoder().encode(["string"], ["hello"]), - zetaValueAndGas: 1000, zetaParams: new ethers.utils.AbiCoder().encode(["string"], ["hello"]), + zetaValueAndGas: 1000, }) ).wait(); @@ -270,8 +271,8 @@ describe("ZetaConnector tests", () => { destinationChainId: 1, destinationGasLimit: 2500000, message: new ethers.utils.AbiCoder().encode(["string"], ["hello"]), - zetaValueAndGas: 0, zetaParams: new ethers.utils.AbiCoder().encode(["string"], ["hello"]), + zetaValueAndGas: 0, }); const e2 = await zetaConnectorEthContract.queryFilter(zetaSentFilter); @@ -288,8 +289,8 @@ describe("ZetaConnector tests", () => { destinationChainId: 1, destinationGasLimit: 2500000, message: new ethers.utils.AbiCoder().encode(["string"], ["hello"]), - zetaValueAndGas: 0, zetaParams: new ethers.utils.AbiCoder().encode(["string"], ["hello"]), + zetaValueAndGas: 0, }); const e2 = await zetaConnectorEthContract.queryFilter(zetaSentFilter); @@ -498,8 +499,8 @@ describe("ZetaConnector tests", () => { destinationChainId: 1, destinationGasLimit: 2500000, message: new ethers.utils.AbiCoder().encode(["string"], ["hello"]), - zetaValueAndGas: 1000, zetaParams: new ethers.utils.AbiCoder().encode(["string"], ["hello"]), + zetaValueAndGas: 1000, }) ).to.revertedWith("Pausable: paused"); }); @@ -515,8 +516,8 @@ describe("ZetaConnector tests", () => { destinationChainId: 1, destinationGasLimit: 2500000, message: new ethers.utils.AbiCoder().encode(["string"], ["hello"]), - zetaValueAndGas: 1000, zetaParams: new ethers.utils.AbiCoder().encode(["string"], ["hello"]), + zetaValueAndGas: 1000, }) ).to.revertedWith("ERC20: insufficient allowance"); }); @@ -528,8 +529,8 @@ describe("ZetaConnector tests", () => { destinationChainId: 1, destinationGasLimit: 2500000, message: new ethers.utils.AbiCoder().encode(["string"], ["hello"]), - zetaValueAndGas: 1000, zetaParams: new ethers.utils.AbiCoder().encode(["string"], ["hello"]), + zetaValueAndGas: 1000, }) ).to.revertedWith("ERC20: insufficient allowance"); }); @@ -546,8 +547,8 @@ describe("ZetaConnector tests", () => { destinationChainId: 1, destinationGasLimit: 2500000, message: new ethers.utils.AbiCoder().encode(["string"], ["hello"]), - zetaValueAndGas: parseEther("1"), zetaParams: new ethers.utils.AbiCoder().encode(["string"], ["hello"]), + zetaValueAndGas: parseEther("1"), }) ).wait(); @@ -565,8 +566,8 @@ describe("ZetaConnector tests", () => { destinationChainId: 1, destinationGasLimit: 2500000, message: new ethers.utils.AbiCoder().encode(["string"], ["hello"]), - zetaValueAndGas: 0, zetaParams: new ethers.utils.AbiCoder().encode(["string"], ["hello"]), + zetaValueAndGas: 0, }); const e2 = await zetaConnectorNonEthContract.queryFilter(zetaSentFilter); @@ -583,8 +584,8 @@ describe("ZetaConnector tests", () => { destinationChainId: 1, destinationGasLimit: 2500000, message: new ethers.utils.AbiCoder().encode(["string"], ["hello"]), - zetaValueAndGas: 0, zetaParams: new ethers.utils.AbiCoder().encode(["string"], ["hello"]), + zetaValueAndGas: 0, }); const e2 = await zetaConnectorNonEthContract.queryFilter(zetaSentFilter); diff --git a/packages/protocol-contracts/test/ZetaInteractor.spec.ts b/packages/protocol-contracts/test/ZetaInteractor.spec.ts index 67c9de81..4fe8fcc1 100644 --- a/packages/protocol-contracts/test/ZetaInteractor.spec.ts +++ b/packages/protocol-contracts/test/ZetaInteractor.spec.ts @@ -2,7 +2,7 @@ import { SignerWithAddress } from "@nomiclabs/hardhat-ethers/signers"; import chai, { expect } from "chai"; import { ethers } from "hardhat"; -import { getZetaConnectorMock } from "../lib/zeta-interactor/ZetaInteractor.helpers"; +import { getZetaInteractorMock } from "../lib/contracts.helpers"; import { ZetaInteractorMock } from "../typechain-types"; import { getCustomErrorMessage } from "./test.helpers"; @@ -24,7 +24,7 @@ describe("ZetaInteractor tests", () => { accounts = await ethers.getSigners(); [deployer, crossChainContractB, zetaConnector] = accounts; - zetaInteractorMock = await getZetaConnectorMock(zetaConnector.address); + zetaInteractorMock = await getZetaInteractorMock(zetaConnector.address); const encodedCrossChainAddressB = ethers.utils.solidityPack(["address"], [crossChainContractB.address]); await (await zetaInteractorMock.setInteractorByChainId(chainBId, encodedCrossChainAddressB)).wait(); @@ -34,11 +34,11 @@ describe("ZetaInteractor tests", () => { it("Should revert if the caller is not ZetaConnector", async () => { await expect( zetaInteractorMock.onZetaMessage({ - zetaTxSenderAddress: ethers.utils.solidityPack(["address"], [zetaInteractorMock.address]), - sourceChainId: chainBId, destinationAddress: crossChainContractB.address, - zetaValueAndGas: 0, message: encoder.encode(["address"], [zetaInteractorMock.address]), + sourceChainId: chainBId, + zetaTxSenderAddress: ethers.utils.solidityPack(["address"], [zetaInteractorMock.address]), + zetaValueAndGas: 0, }) ).to.be.revertedWith(getCustomErrorMessage("InvalidCaller", [deployer.address])); }); @@ -46,11 +46,11 @@ describe("ZetaInteractor tests", () => { it("Should revert if the zetaTxSenderAddress it not in interactorsByChainId", async () => { await expect( zetaInteractorMock.connect(zetaConnector).onZetaMessage({ - zetaTxSenderAddress: ethers.utils.solidityPack(["address"], [zetaInteractorMock.address]), - sourceChainId: chainBId, destinationAddress: crossChainContractB.address, - zetaValueAndGas: 0, message: encoder.encode(["address"], [crossChainContractB.address]), + sourceChainId: chainBId, + zetaTxSenderAddress: ethers.utils.solidityPack(["address"], [zetaInteractorMock.address]), + zetaValueAndGas: 0, }) ).to.be.revertedWith(getCustomErrorMessage("InvalidZetaMessageCall")); }); @@ -60,12 +60,12 @@ describe("ZetaInteractor tests", () => { it("Should revert if the caller is not ZetaConnector", async () => { await expect( zetaInteractorMock.onZetaRevert({ - zetaTxSenderAddress: deployer.address, - sourceChainId: chainAId, destinationAddress: ethers.utils.solidityPack(["address"], [crossChainContractB.address]), destinationChainId: chainBId, - zetaValueAndGas: 0, message: encoder.encode(["address"], [zetaInteractorMock.address]), + sourceChainId: chainAId, + zetaTxSenderAddress: deployer.address, + zetaValueAndGas: 0, }) ).to.be.revertedWith(getCustomErrorMessage("InvalidCaller", [deployer.address])); }); diff --git a/packages/protocol-contracts/test/ZetaTokenConsumer.spec.ts b/packages/protocol-contracts/test/ZetaTokenConsumer.spec.ts new file mode 100644 index 00000000..f7539487 --- /dev/null +++ b/packages/protocol-contracts/test/ZetaTokenConsumer.spec.ts @@ -0,0 +1,286 @@ +import { MaxUint256 } from "@ethersproject/constants"; +import { parseEther, parseUnits } from "@ethersproject/units"; +import { SignerWithAddress } from "@nomiclabs/hardhat-ethers/signers"; +import { getAddress } from "@zetachain/addresses"; +import chai, { expect } from "chai"; +import { BigNumber } from "ethers"; +import { ethers } from "hardhat"; + +import { + deployZetaNonEth, + getZetaTokenConsumerUniV2Strategy, + getZetaTokenConsumerUniV3Strategy, +} from "../lib/contracts.helpers"; +import { + IERC20, + IERC20__factory, + INonfungiblePositionManager, + INonfungiblePositionManager__factory, + IPoolInitializer__factory, + UniswapV2Router02__factory, + ZetaTokenConsumer, + ZetaTokenConsumerUniV2, + ZetaTokenConsumerUniV3, +} from "../typechain-types"; +import { parseZetaConsumerLog } from "./test.helpers"; + +chai.should(); + +describe("ZetaTokenConsumer tests", () => { + let uniswapV2RouterAddr: string; + let uniswapV3RouterAddr: string; + let USDCAddr: string; + + let zetaTokenConsumerUniV2: ZetaTokenConsumerUniV2; + let zetaTokenConsumerUniV3: ZetaTokenConsumerUniV3; + let zetaTokenNonEthAddress: string; + let zetaTokenNonEth: IERC20; + + let accounts: SignerWithAddress[]; + let tssUpdater: SignerWithAddress; + let tssSigner: SignerWithAddress; + let randomSigner: SignerWithAddress; + + const getNow = async () => { + const block = await ethers.provider.getBlock("latest"); + return block.timestamp; + }; + + const swapToken = async (signer: SignerWithAddress, tokenAddress: string, expectedAmount: BigNumber) => { + const uniswapRouter = UniswapV2Router02__factory.connect(uniswapV2RouterAddr, signer); + + const WETH = await uniswapRouter.WETH(); + const path = [WETH, tokenAddress]; + const tx = await uniswapRouter + .connect(signer) + .swapETHForExactTokens(expectedAmount, path, signer.address, (await getNow()) + 360, { value: parseEther("10") }); + + await tx.wait(); + }; + + /** + * @todo (andy): WIP, not in use yet + */ + const createPoolV3 = async (signer: SignerWithAddress, tokenAddress: string) => { + const DAI = getAddress("dai", { + customNetworkName: "eth-mainnet", + customZetaNetwork: "mainnet", + }); + + const UNI_NFT_MANAGER_V3 = getAddress("uniswapV3NftManager", { + customNetworkName: "eth-mainnet", + customZetaNetwork: "mainnet", + }); + + const USDC = getAddress("usdc", { + customNetworkName: "eth-mainnet", + customZetaNetwork: "mainnet", + }); + + await swapToken(signer, DAI, parseUnits("10000", 18)); + + const token = IERC20__factory.connect(USDC, signer); + const tx1 = await token.approve(UNI_NFT_MANAGER_V3, MaxUint256); + await tx1.wait(); + + const token2 = IERC20__factory.connect(DAI, signer); + const tx2 = await token2.approve(UNI_NFT_MANAGER_V3, MaxUint256); + await tx2.wait(); + + const uniswapRouter = INonfungiblePositionManager__factory.connect(UNI_NFT_MANAGER_V3, signer); + + const uniswapNFTManager = IPoolInitializer__factory.connect(UNI_NFT_MANAGER_V3, signer); + const tx3 = await uniswapNFTManager.createAndInitializePoolIfNecessary( + USDC, + DAI, + 3000, + "80000000000000000000000000000" + ); + await tx3.wait(); + + const params: INonfungiblePositionManager.MintParamsStruct = { + amount0Desired: parseEther("10"), + amount0Min: 0, + amount1Desired: parseEther("10"), + amount1Min: 0, + deadline: (await getNow()) + 360, + fee: 3000, + recipient: signer.address, + tickLower: 193, + tickUpper: 194, + token0: USDC, + token1: DAI, + }; + + const tx4 = await uniswapRouter.mint(params); + await tx4.wait(); + }; + + beforeEach(async () => { + accounts = await ethers.getSigners(); + [tssUpdater, tssSigner, randomSigner] = accounts; + + zetaTokenNonEth = await deployZetaNonEth({ + args: [tssSigner.address, tssUpdater.address], + }); + + uniswapV2RouterAddr = getAddress("uniswapV2Router02", { + customNetworkName: "eth-mainnet", + customZetaNetwork: "mainnet", + }); + + const DAI = getAddress("dai", { + customNetworkName: "eth-mainnet", + customZetaNetwork: "mainnet", + }); + + const UNI_QUOTER_V3 = getAddress("uniswapV3Quoter", { + customNetworkName: "eth-mainnet", + customZetaNetwork: "mainnet", + }); + + const UNI_ROUTER_V3 = getAddress("uniswapV3Router", { + customNetworkName: "eth-mainnet", + customZetaNetwork: "mainnet", + }); + + const WETH9 = getAddress("weth9", { + customNetworkName: "eth-mainnet", + customZetaNetwork: "mainnet", + }); + + USDCAddr = getAddress("usdc", { + customNetworkName: "eth-mainnet", + customZetaNetwork: "mainnet", + }); + + // For testing purposes we use an existing uni v3 pool + await swapToken(tssUpdater, DAI, parseEther("10000")); + await swapToken(randomSigner, DAI, parseEther("10000")); + await swapToken(randomSigner, DAI, parseEther("10000")); + await swapToken(randomSigner, DAI, parseEther("10000")); + await swapToken(randomSigner, DAI, parseEther("10000")); + zetaTokenNonEthAddress = DAI; + zetaTokenNonEth = IERC20__factory.connect(zetaTokenNonEthAddress, tssSigner); + + zetaTokenConsumerUniV2 = await getZetaTokenConsumerUniV2Strategy({ + deployParams: [zetaTokenNonEthAddress, uniswapV2RouterAddr], + }); + + uniswapV3RouterAddr = UNI_ROUTER_V3; + zetaTokenConsumerUniV3 = await getZetaTokenConsumerUniV3Strategy({ + deployParams: [zetaTokenNonEthAddress, uniswapV3RouterAddr, UNI_QUOTER_V3, WETH9, 3000, 3000], + }); + }); + + describe("getZetaFromEth", () => { + const shouldGetZetaFromETH = async (zetaTokenConsumer: ZetaTokenConsumer) => { + const initialZetaBalance = await zetaTokenNonEth.balanceOf(randomSigner.address); + const tx = await zetaTokenConsumer.getZetaFromEth(randomSigner.address, 1, { value: parseEther("1") }); + + const result = await tx.wait(); + const eventNames = parseZetaConsumerLog(result.logs); + expect(eventNames.filter((e) => e === "EthExchangedForZeta")).to.have.lengthOf(1); + + const finalZetaBalance = await zetaTokenNonEth.balanceOf(randomSigner.address); + expect(finalZetaBalance).to.be.gt(initialZetaBalance); + }; + + it("Should get zeta from eth using UniV2", async () => { + const zetaTokenConsumer = zetaTokenConsumerUniV2.connect(randomSigner); + await shouldGetZetaFromETH(zetaTokenConsumer); + }); + + it("Should get zeta from eth using UniV3", async () => { + const zetaTokenConsumer = zetaTokenConsumerUniV3.connect(randomSigner); + await shouldGetZetaFromETH(zetaTokenConsumer); + }); + }); + + describe("getZetaFromToken", () => { + const shouldGetZetaFromToken = async (zetaTokenConsumer: ZetaTokenConsumer) => { + const USDCContract = IERC20__factory.connect(USDCAddr, randomSigner); + await swapToken(randomSigner, USDCAddr, parseUnits("10000", 6)); + + const initialZetaBalance = await zetaTokenNonEth.balanceOf(randomSigner.address); + const tx1 = await USDCContract.approve(zetaTokenConsumer.address, MaxUint256); + await tx1.wait(); + + const tx2 = await zetaTokenConsumer.getZetaFromToken(randomSigner.address, 1, USDCAddr, parseUnits("100", 6)); + const result = await tx2.wait(); + + const eventNames = parseZetaConsumerLog(result.logs); + expect(eventNames.filter((e) => e === "TokenExchangedForZeta")).to.have.lengthOf(1); + + const finalZetaBalance = await zetaTokenNonEth.balanceOf(randomSigner.address); + expect(finalZetaBalance).to.be.gt(initialZetaBalance); + }; + + it("Should get zeta from token using UniV2", async () => { + const zetaTokenConsumer = zetaTokenConsumerUniV2.connect(randomSigner); + await shouldGetZetaFromToken(zetaTokenConsumer); + }); + + it("Should get zeta from token using UniV3", async () => { + const zetaTokenConsumer = zetaTokenConsumerUniV3.connect(randomSigner); + await shouldGetZetaFromToken(zetaTokenConsumer); + }); + }); + + describe("getEthFromZeta", () => { + const shouldGetETHFromZeta = async (zetaTokenConsumer: ZetaTokenConsumer) => { + const initialEthBalance = await ethers.provider.getBalance(randomSigner.address); + const tx1 = await zetaTokenNonEth.connect(randomSigner).approve(zetaTokenConsumer.address, MaxUint256); + await tx1.wait(); + + const tx2 = await zetaTokenConsumer.getEthFromZeta(randomSigner.address, 1, parseUnits("5000", 18)); + const result = await tx2.wait(); + + const eventNames = parseZetaConsumerLog(result.logs); + expect(eventNames.filter((e) => e === "ZetaExchangedForEth")).to.have.lengthOf(1); + + const finalEthBalance = await ethers.provider.getBalance(randomSigner.address); + expect(finalEthBalance).to.be.gt(initialEthBalance); + }; + + it("Should get eth from zeta using UniV2", async () => { + const zetaTokenConsumer = zetaTokenConsumerUniV2.connect(randomSigner); + await shouldGetETHFromZeta(zetaTokenConsumer); + }); + + it("Should get eth from zeta using UniV3", async () => { + const zetaTokenConsumer = zetaTokenConsumerUniV3.connect(randomSigner); + + await shouldGetETHFromZeta(zetaTokenConsumer); + }); + }); + + describe("getTokenFromZeta", () => { + const shouldGetTokenFromZeta = async (zetaTokenConsumer: ZetaTokenConsumer) => { + const USDCContract = IERC20__factory.connect(USDCAddr, randomSigner); + + const initialTokenBalance = await USDCContract.balanceOf(randomSigner.address); + const tx1 = await zetaTokenNonEth.connect(randomSigner).approve(zetaTokenConsumer.address, MaxUint256); + await tx1.wait(); + + const tx2 = await zetaTokenConsumer.getTokenFromZeta(randomSigner.address, 1, USDCAddr, parseUnits("5000", 18)); + const result = await tx2.wait(); + + const eventNames = parseZetaConsumerLog(result.logs); + expect(eventNames.filter((e) => e === "ZetaExchangedForToken")).to.have.lengthOf(1); + + const finalTokenBalance = await USDCContract.balanceOf(randomSigner.address); + expect(finalTokenBalance).to.be.gt(initialTokenBalance); + }; + + it("Should get token from zeta using UniV2", async () => { + const zetaTokenConsumer = zetaTokenConsumerUniV2.connect(randomSigner); + await shouldGetTokenFromZeta(zetaTokenConsumer); + }); + + it("Should get token from zeta using UniV3", async () => { + const zetaTokenConsumer = zetaTokenConsumerUniV3.connect(randomSigner); + await shouldGetTokenFromZeta(zetaTokenConsumer); + }); + }); +}); diff --git a/packages/protocol-contracts/test/test.helpers.ts b/packages/protocol-contracts/test/test.helpers.ts index 44cd25cf..95e59d97 100644 --- a/packages/protocol-contracts/test/test.helpers.ts +++ b/packages/protocol-contracts/test/test.helpers.ts @@ -1,6 +1,8 @@ import { BigNumber, ContractReceipt } from "ethers"; -type CustomErrorParamType = string | BigNumber | number; +import { ZetaTokenConsumer__factory } from "../typechain-types"; + +type CustomErrorParamType = BigNumber | number | string; export const getCustomErrorMessage = (errorMethod: string, params?: [CustomErrorParamType]) => { const stringParams = params ? params @@ -15,3 +17,19 @@ export const getCustomErrorMessage = (errorMethod: string, params?: [CustomError : ""; return `VM Exception while processing transaction: reverted with custom error '${errorMethod}(${stringParams})'`; }; + +export const parseZetaConsumerLog = (logs: ContractReceipt["logs"]) => { + const iface = ZetaTokenConsumer__factory.createInterface(); + + const eventNames = logs.map((log) => { + try { + const parsedLog = iface.parseLog(log); + + return parsedLog.name; + } catch (e: any) { + return "NO_ZETA_LOG"; + } + }); + + return eventNames; +}; diff --git a/scripts/slither.ts b/scripts/slither.ts index 5f5287bd..6f925593 100644 --- a/scripts/slither.ts +++ b/scripts/slither.ts @@ -1,4 +1,3 @@ -import fs from "fs"; import inquirer from "inquirer"; import { execSync } from "node:child_process"; import path from "node:path"; @@ -24,10 +23,10 @@ async function getPackageName() { } else { packageName = await inquirer.prompt([ { - type: "list", + choices: packageNames, message: "Which set of contracts would you like to test?", name: "contracts", - choices: packageNames, + type: "list", }, ]); @@ -40,9 +39,9 @@ async function getFilterPaths() { const { confirm: includeLibraries } = await inquirer.prompt([ { - type: "confirm", message: "Do you want to include OpenZeppelin & Uniswap libraries in this scan?", name: "confirm", + type: "confirm", }, ]); diff --git a/yarn.lock b/yarn.lock index 5d01736e..427fe50a 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1234,6 +1234,13 @@ __metadata: languageName: node linkType: hard +"@openzeppelin/contracts@npm:3.4.1-solc-0.7-2": + version: 3.4.1-solc-0.7-2 + resolution: "@openzeppelin/contracts@npm:3.4.1-solc-0.7-2" + checksum: 3608a4065f65946117caa543ef72477ce637bd5cc4f4853303b5f5b6c26516f8b50898ea3a8486e2877689cae81453ce22c72c8624c77c363c63f019b4086ffa + languageName: node + linkType: hard + "@openzeppelin/contracts@npm:^4.5.0": version: 4.5.0 resolution: "@openzeppelin/contracts@npm:4.5.0" @@ -1849,6 +1856,17 @@ __metadata: languageName: node linkType: hard +"@typescript-eslint/experimental-utils@npm:^5.0.0": + version: 5.30.0 + resolution: "@typescript-eslint/experimental-utils@npm:5.30.0" + dependencies: + "@typescript-eslint/utils": 5.30.0 + peerDependencies: + eslint: ^6.0.0 || ^7.0.0 || ^8.0.0 + checksum: 66a140b04b57e50a4abd6912616b6af0a9a71f989bd2a77574f4117bf7ba923ae7541780f7d2627cf9bc815eea253181cd09ea9f599b2b8e0895c97258c1e1af + languageName: node + linkType: hard + "@typescript-eslint/parser@npm:^5.20.0": version: 5.20.0 resolution: "@typescript-eslint/parser@npm:5.20.0" @@ -1876,6 +1894,16 @@ __metadata: languageName: node linkType: hard +"@typescript-eslint/scope-manager@npm:5.30.0": + version: 5.30.0 + resolution: "@typescript-eslint/scope-manager@npm:5.30.0" + dependencies: + "@typescript-eslint/types": 5.30.0 + "@typescript-eslint/visitor-keys": 5.30.0 + checksum: 51246d0f6c497ad98fcfb02a9da92e855cd5916cf6ea117b1f8a511e4f62d1eae28f2c7278dfe29cc823c36f3b1fe87ff56681654b68faac5dfd1b897c3c58da + languageName: node + linkType: hard + "@typescript-eslint/type-utils@npm:5.20.0": version: 5.20.0 resolution: "@typescript-eslint/type-utils@npm:5.20.0" @@ -1899,6 +1927,13 @@ __metadata: languageName: node linkType: hard +"@typescript-eslint/types@npm:5.30.0": + version: 5.30.0 + resolution: "@typescript-eslint/types@npm:5.30.0" + checksum: f83a506880d78419283a86e8aeb6c744b1d1a7fc3a366625125805daf0f9a7640a778537113b8865a4cdd985dcde53066820ea044a750126bc8b478eb93d4d12 + languageName: node + linkType: hard + "@typescript-eslint/typescript-estree@npm:5.20.0": version: 5.20.0 resolution: "@typescript-eslint/typescript-estree@npm:5.20.0" @@ -1917,6 +1952,24 @@ __metadata: languageName: node linkType: hard +"@typescript-eslint/typescript-estree@npm:5.30.0": + version: 5.30.0 + resolution: "@typescript-eslint/typescript-estree@npm:5.30.0" + dependencies: + "@typescript-eslint/types": 5.30.0 + "@typescript-eslint/visitor-keys": 5.30.0 + debug: ^4.3.4 + globby: ^11.1.0 + is-glob: ^4.0.3 + semver: ^7.3.7 + tsutils: ^3.21.0 + peerDependenciesMeta: + typescript: + optional: true + checksum: cf8caea435c4346fae9c81635864efa17ea106e3dea5cd226c096145958ff6e7918e40cdb2af06526ca43d44717eb088869f1c1db51a52aa9f72b6bf65e11db2 + languageName: node + linkType: hard + "@typescript-eslint/utils@npm:5.20.0": version: 5.20.0 resolution: "@typescript-eslint/utils@npm:5.20.0" @@ -1933,6 +1986,22 @@ __metadata: languageName: node linkType: hard +"@typescript-eslint/utils@npm:5.30.0": + version: 5.30.0 + resolution: "@typescript-eslint/utils@npm:5.30.0" + dependencies: + "@types/json-schema": ^7.0.9 + "@typescript-eslint/scope-manager": 5.30.0 + "@typescript-eslint/types": 5.30.0 + "@typescript-eslint/typescript-estree": 5.30.0 + eslint-scope: ^5.1.1 + eslint-utils: ^3.0.0 + peerDependencies: + eslint: ^6.0.0 || ^7.0.0 || ^8.0.0 + checksum: 176eda46292398c0fe069d96f51d0083a9b978d4c6e2ca92f10e9ebad83910d67754bcb2c1667cf4c40e06c112558ff1ad973d6f82719cfe4de7c72f89a3df29 + languageName: node + linkType: hard + "@typescript-eslint/visitor-keys@npm:5.20.0": version: 5.20.0 resolution: "@typescript-eslint/visitor-keys@npm:5.20.0" @@ -1943,6 +2012,16 @@ __metadata: languageName: node linkType: hard +"@typescript-eslint/visitor-keys@npm:5.30.0": + version: 5.30.0 + resolution: "@typescript-eslint/visitor-keys@npm:5.30.0" + dependencies: + "@typescript-eslint/types": 5.30.0 + eslint-visitor-keys: ^3.3.0 + checksum: bf2219cbb910d284e2f224aaa701932287b25fe99312f9abf6406a8f52a3a0b852c96276cd740ae3071b2561b253a6cfa30b0b8ab1d199e08f9550402f8fbf1f + languageName: node + linkType: hard + "@ungap/promise-all-settled@npm:1.1.2": version: 1.1.2 resolution: "@ungap/promise-all-settled@npm:1.1.2" @@ -1957,6 +2036,13 @@ __metadata: languageName: node linkType: hard +"@uniswap/lib@npm:^4.0.1-alpha": + version: 4.0.1-alpha + resolution: "@uniswap/lib@npm:4.0.1-alpha" + checksum: d7bbacccef40966af16c7e215ab085f575686d316b2802c9e1cfd03f7ad351970e547535670a28b2279c3cfcc4fb02888614c46f94efe2987af2309f3ec86127 + languageName: node + linkType: hard + "@uniswap/v2-core@npm:1.0.0": version: 1.0.0 resolution: "@uniswap/v2-core@npm:1.0.0" @@ -1964,6 +2050,13 @@ __metadata: languageName: node linkType: hard +"@uniswap/v2-core@npm:1.0.1": + version: 1.0.1 + resolution: "@uniswap/v2-core@npm:1.0.1" + checksum: eaa118fe45eac2e80b7468547ce2cde12bd3c8157555d2e40e0462a788c9506c6295247b511382da85e44a89ad92aff7bb3433b23bfbd2eeea23942ecd46e979 + languageName: node + linkType: hard + "@uniswap/v2-periphery@npm:1.1.0-beta.0": version: 1.1.0-beta.0 resolution: "@uniswap/v2-periphery@npm:1.1.0-beta.0" @@ -1974,6 +2067,27 @@ __metadata: languageName: node linkType: hard +"@uniswap/v3-core@npm:1.0.0": + version: 1.0.0 + resolution: "@uniswap/v3-core@npm:1.0.0" + checksum: 0e7654cfbf9885f1ca94446c3b220aeddb039af7892bc4ae94669512570ceefdf1ce6c2b0703396927d5a203d7c6c5ccaf8bd61426e52372aafb6ada64141055 + languageName: node + linkType: hard + +"@uniswap/v3-periphery@npm:1.1.0": + version: 1.1.0 + resolution: "@uniswap/v3-periphery@npm:1.1.0" + dependencies: + "@openzeppelin/contracts": 3.4.1-solc-0.7-2 + "@uniswap/lib": ^4.0.1-alpha + "@uniswap/v2-core": 1.0.1 + "@uniswap/v3-core": 1.0.0 + base64-sol: 1.0.1 + hardhat-watcher: ^2.1.1 + checksum: 8716e168ea04f56400a9affe579b06422778eb6c096e8d4117f6ff43aec232d224be9799f3ad3adb421894f330b17548956cf25fb5a8f95ae291e5b311ec427f + languageName: node + linkType: hard + "@yarnpkg/lockfile@npm:^1.1.0": version: 1.1.0 resolution: "@yarnpkg/lockfile@npm:1.1.0" @@ -2008,6 +2122,8 @@ __metadata: resolution: "@zetachain/protocol-contracts@workspace:packages/protocol-contracts" dependencies: "@openzeppelin/contracts": ^4.5.0 + "@uniswap/v2-periphery": 1.1.0-beta.0 + "@uniswap/v3-periphery": 1.1.0 ethers: 5.6.8 tsconfig-paths: ^3.14.1 languageName: unknown @@ -2108,7 +2224,7 @@ __metadata: languageName: node linkType: hard -"acorn-jsx@npm:^5.3.1": +"acorn-jsx@npm:^5.2.0, acorn-jsx@npm:^5.3.1": version: 5.3.2 resolution: "acorn-jsx@npm:5.3.2" peerDependencies: @@ -2124,6 +2240,15 @@ __metadata: languageName: node linkType: hard +"acorn@npm:^7.1.1": + version: 7.4.1 + resolution: "acorn@npm:7.4.1" + bin: + acorn: bin/acorn + checksum: 1860f23c2107c910c6177b7b7be71be350db9e1080d814493fae143ae37605189504152d1ba8743ba3178d0b37269ce1ffc42b101547fdc1827078f82671e407 + languageName: node + linkType: hard + "acorn@npm:^8.4.1": version: 8.7.1 resolution: "acorn@npm:8.7.1" @@ -3259,6 +3384,13 @@ __metadata: languageName: node linkType: hard +"base64-sol@npm:1.0.1": + version: 1.0.1 + resolution: "base64-sol@npm:1.0.1" + checksum: be0f9e8cf3c744256913223fbae8187773f530cc096e98a77f49ef0bd6cedeb294d15a784e439419f7cb99f07bf85b08999169feafafa1a9e29c3affc0bc6d0a + languageName: node + linkType: hard + "base@npm:^0.11.1": version: 0.11.2 resolution: "base@npm:0.11.2" @@ -3884,7 +4016,7 @@ __metadata: languageName: node linkType: hard -"chokidar@npm:3.5.3, chokidar@npm:^3.4.0": +"chokidar@npm:3.5.3, chokidar@npm:^3.4.0, chokidar@npm:^3.5.3": version: 3.5.3 resolution: "chokidar@npm:3.5.3" dependencies: @@ -5255,6 +5387,33 @@ __metadata: languageName: node linkType: hard +"eslint-plugin-sort-keys-fix@npm:1.1.2": + version: 1.1.2 + resolution: "eslint-plugin-sort-keys-fix@npm:1.1.2" + dependencies: + espree: ^6.1.2 + esutils: ^2.0.2 + natural-compare: ^1.4.0 + requireindex: ~1.2.0 + checksum: d089e4ec4f8cea4ec239132f85c807ce71e500370e3ef778d684697da5011b413e625d6f5b9bf3b5b1cf7c4eafffc39d386bffca271b7c3e7983409fb0d7d2c6 + languageName: node + linkType: hard + +"eslint-plugin-typescript-sort-keys@npm:2.1.0": + version: 2.1.0 + resolution: "eslint-plugin-typescript-sort-keys@npm:2.1.0" + dependencies: + "@typescript-eslint/experimental-utils": ^5.0.0 + json-schema: ^0.4.0 + natural-compare-lite: ^1.4.0 + peerDependencies: + "@typescript-eslint/parser": ^1 || ^2 || ^3 || ^4 || ^5 + eslint: ^5 || ^6 || ^7 || ^8 + typescript: ^3 || ^4 + checksum: 98ea442519ca9cdd36aa4d7d4e4f3d96d16a9287e32ea69209865ff3cd10ce33d9c4acb86ddc2cc0406a072aea319841496e66b512f79c58aaf3924d85f73683 + languageName: node + linkType: hard + "eslint-scope@npm:^5.1.1": version: 5.1.1 resolution: "eslint-scope@npm:5.1.1" @@ -5361,6 +5520,17 @@ __metadata: languageName: node linkType: hard +"espree@npm:^6.1.2": + version: 6.2.1 + resolution: "espree@npm:6.2.1" + dependencies: + acorn: ^7.1.1 + acorn-jsx: ^5.2.0 + eslint-visitor-keys: ^1.1.0 + checksum: 99c508950b5b9f53d008d781d2abb7a4ef3496ea699306fb6eb737c7e513aa594644314364c50ec27abb220124c6851fff64a6b62c358479534369904849360b + languageName: node + linkType: hard + "espree@npm:^9.3.1": version: 9.3.1 resolution: "espree@npm:9.3.1" @@ -7037,7 +7207,7 @@ __metadata: languageName: node linkType: hard -"globby@npm:^11.0.4": +"globby@npm:^11.0.4, globby@npm:^11.1.0": version: 11.1.0 resolution: "globby@npm:11.1.0" dependencies: @@ -7154,6 +7324,17 @@ __metadata: languageName: node linkType: hard +"hardhat-watcher@npm:^2.1.1": + version: 2.3.0 + resolution: "hardhat-watcher@npm:2.3.0" + dependencies: + chokidar: ^3.5.3 + peerDependencies: + hardhat: ^2.0.0 + checksum: 9c99c8f3f476990b4b8f452d5257d2060bc0bbe21e24cd4472c0f2eb63fd71c28ca054353ccdf27947198303be768b12185ffd902d470d7a8e750945a4249eb1 + languageName: node + linkType: hard + "hardhat@npm:2.9.7": version: 2.9.7 resolution: "hardhat@npm:2.9.7" @@ -8345,7 +8526,7 @@ __metadata: languageName: node linkType: hard -"json-schema@npm:0.4.0": +"json-schema@npm:0.4.0, json-schema@npm:^0.4.0": version: 0.4.0 resolution: "json-schema@npm:0.4.0" checksum: 66389434c3469e698da0df2e7ac5a3281bcff75e797a5c127db7c5b56270e01ae13d9afa3c03344f76e32e81678337a8c912bdbb75101c62e487dc3778461d72 @@ -9004,6 +9185,15 @@ __metadata: languageName: node linkType: hard +"lru-cache@npm:^6.0.0": + version: 6.0.0 + resolution: "lru-cache@npm:6.0.0" + dependencies: + yallist: ^4.0.0 + checksum: f97f499f898f23e4585742138a22f22526254fdba6d75d41a1c2526b3b6cc5747ef59c5612ba7375f42aca4f8461950e925ba08c991ead0651b4918b7c978297 + languageName: node + linkType: hard + "lru-cache@npm:^7.4.0, lru-cache@npm:^7.7.1": version: 7.8.1 resolution: "lru-cache@npm:7.8.1" @@ -9719,6 +9909,13 @@ __metadata: languageName: node linkType: hard +"natural-compare-lite@npm:^1.4.0": + version: 1.4.0 + resolution: "natural-compare-lite@npm:1.4.0" + checksum: 5222ac3986a2b78dd6069ac62cbb52a7bf8ffc90d972ab76dfe7b01892485d229530ed20d0c62e79a6b363a663b273db3bde195a1358ce9e5f779d4453887225 + languageName: node + linkType: hard + "natural-compare@npm:^1.4.0": version: 1.4.0 resolution: "natural-compare@npm:1.4.0" @@ -11221,6 +11418,13 @@ __metadata: languageName: node linkType: hard +"requireindex@npm:~1.2.0": + version: 1.2.0 + resolution: "requireindex@npm:1.2.0" + checksum: 50d8b10a1ff1fdf6aea7a1870bc7bd238b0fb1917d8d7ca17fd03afc38a65dcd7a8a4eddd031f89128b5f0065833d5c92c4fef67f2c04e8624057fe626c9cf94 + languageName: node + linkType: hard + "resolve-from@npm:^3.0.0": version: 3.0.0 resolution: "resolve-from@npm:3.0.0" @@ -11589,6 +11793,17 @@ __metadata: languageName: node linkType: hard +"semver@npm:^7.3.7": + version: 7.3.7 + resolution: "semver@npm:7.3.7" + dependencies: + lru-cache: ^6.0.0 + bin: + semver: bin/semver.js + checksum: 2fa3e877568cd6ce769c75c211beaed1f9fce80b28338cadd9d0b6c40f2e2862bafd62c19a6cff42f3d54292b7c623277bcab8816a2b5521cf15210d43e75232 + languageName: node + linkType: hard + "semver@npm:~5.4.1": version: 5.4.1 resolution: "semver@npm:5.4.1" @@ -14545,6 +14760,8 @@ __metadata: eslint-plugin-prettier: ^4.0.0 eslint-plugin-promise: ^6.0.0 eslint-plugin-simple-import-sort: 7.0.0 + eslint-plugin-sort-keys-fix: 1.1.2 + eslint-plugin-typescript-sort-keys: 2.1.0 ethereum-waffle: ^3.4.4 ethereumjs-utils: ^5.2.5 ethers: 5.6.8 From 4bfb3e3e61a87ff063090b0885f8f8b1ee93b4e2 Mon Sep 17 00:00:00 2001 From: Lucas Janon Date: Tue, 28 Jun 2022 20:49:37 -0300 Subject: [PATCH 017/115] Update OpenZeppelin version --- packages/example-contracts/package.json | 2 +- packages/protocol-contracts/package.json | 2 +- yarn.lock | 12 ++++++------ 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/packages/example-contracts/package.json b/packages/example-contracts/package.json index 7d12cee0..04ec3744 100644 --- a/packages/example-contracts/package.json +++ b/packages/example-contracts/package.json @@ -24,7 +24,7 @@ "tsconfig-paths": "^3.14.1" }, "dependencies": { - "@openzeppelin/contracts": "^4.5.0", + "@openzeppelin/contracts": "4.6.0", "@uniswap/v2-periphery": "1.1.0-beta.0", "@zetachain/addresses": "workspace:^", "@zetachain/protocol-contracts": "workspace:^", diff --git a/packages/protocol-contracts/package.json b/packages/protocol-contracts/package.json index c370bf69..8cb110b9 100644 --- a/packages/protocol-contracts/package.json +++ b/packages/protocol-contracts/package.json @@ -22,7 +22,7 @@ "tsconfig-paths": "^3.14.1" }, "dependencies": { - "@openzeppelin/contracts": "^4.5.0", + "@openzeppelin/contracts": "4.6.0", "@uniswap/v2-periphery": "1.1.0-beta.0", "@uniswap/v3-periphery": "1.1.0", "ethers": "5.6.8" diff --git a/yarn.lock b/yarn.lock index 427fe50a..0ecdfe78 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1241,10 +1241,10 @@ __metadata: languageName: node linkType: hard -"@openzeppelin/contracts@npm:^4.5.0": - version: 4.5.0 - resolution: "@openzeppelin/contracts@npm:4.5.0" - checksum: 1c9c5dff041905771d2a83ac29c64dbf0b48603de43f74a34fb1358813d7c7bf259efe2f64e2112b410c5cca7a0b41aaedd882368be5f01a6d50a3ee0740f962 +"@openzeppelin/contracts@npm:4.6.0": + version: 4.6.0 + resolution: "@openzeppelin/contracts@npm:4.6.0" + checksum: 1de06211b279d7aef2bb9abbdd58eb80c71256f7e888a10855ea23bb06ef8723b22fb550d06af60247dfbd7f0f23de9821732012d7541a823339070a8442d1db languageName: node linkType: hard @@ -2106,7 +2106,7 @@ __metadata: resolution: "@zetachain/example-contracts@workspace:packages/example-contracts" dependencies: "@defi-wonderland/smock": ^2.0.7 - "@openzeppelin/contracts": ^4.5.0 + "@openzeppelin/contracts": 4.6.0 "@uniswap/v2-periphery": 1.1.0-beta.0 "@zetachain/addresses": "workspace:^" "@zetachain/protocol-contracts": "workspace:^" @@ -2121,7 +2121,7 @@ __metadata: version: 0.0.0-use.local resolution: "@zetachain/protocol-contracts@workspace:packages/protocol-contracts" dependencies: - "@openzeppelin/contracts": ^4.5.0 + "@openzeppelin/contracts": 4.6.0 "@uniswap/v2-periphery": 1.1.0-beta.0 "@uniswap/v3-periphery": 1.1.0 ethers: 5.6.8 From db87337c3efa45de067bc20ef5d9a0039b64fe71 Mon Sep 17 00:00:00 2001 From: Lucas Janon Date: Wed, 29 Jun 2022 11:13:56 -0300 Subject: [PATCH 018/115] Delete useless imports from ZetaEth --- packages/protocol-contracts/contracts/Zeta.eth.sol | 2 -- 1 file changed, 2 deletions(-) diff --git a/packages/protocol-contracts/contracts/Zeta.eth.sol b/packages/protocol-contracts/contracts/Zeta.eth.sol index cf85c03e..66b6cd0f 100644 --- a/packages/protocol-contracts/contracts/Zeta.eth.sol +++ b/packages/protocol-contracts/contracts/Zeta.eth.sol @@ -2,8 +2,6 @@ pragma solidity 0.8.7; import "@openzeppelin/contracts/token/ERC20/ERC20.sol"; -import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; -import "@openzeppelin/contracts/utils/Context.sol"; contract ZetaEth is ERC20("Zeta", "ZETA") { constructor(uint256 initialSupply) { From 00350460ebcd8b0fea6c7f9652e2d140622704de Mon Sep 17 00:00:00 2001 From: Lucas Janon Date: Wed, 29 Jun 2022 11:29:58 -0300 Subject: [PATCH 019/115] Allow TSS to call updateTssAndConnectorAddresses --- .../contracts/Zeta.non-eth.sol | 2 +- .../contracts/interfaces/ZetaErrors.sol | 2 ++ .../test/Zeta.non-eth.spec.ts | 17 ++++++++++++++--- 3 files changed, 17 insertions(+), 4 deletions(-) diff --git a/packages/protocol-contracts/contracts/Zeta.non-eth.sol b/packages/protocol-contracts/contracts/Zeta.non-eth.sol index c636f896..3e25a000 100644 --- a/packages/protocol-contracts/contracts/Zeta.non-eth.sol +++ b/packages/protocol-contracts/contracts/Zeta.non-eth.sol @@ -30,7 +30,7 @@ contract ZetaNonEth is ERC20Burnable, ZetaErrors { } function updateTssAndConnectorAddresses(address tssAddress_, address connectorAddress_) external { - if (msg.sender != tssAddressUpdater) revert CallerIsNotTssUpdater(msg.sender); + if (msg.sender != tssAddressUpdater && msg.sender != tssAddress) revert CallerIsNotTssOrUpdater(msg.sender); if (tssAddress_ == address(0) || connectorAddress_ == address(0)) revert InvalidAddress(); tssAddress = tssAddress_; diff --git a/packages/protocol-contracts/contracts/interfaces/ZetaErrors.sol b/packages/protocol-contracts/contracts/interfaces/ZetaErrors.sol index 5de4fd97..b4fc37b3 100644 --- a/packages/protocol-contracts/contracts/interfaces/ZetaErrors.sol +++ b/packages/protocol-contracts/contracts/interfaces/ZetaErrors.sol @@ -8,6 +8,8 @@ interface ZetaErrors { error CallerIsNotTssUpdater(address caller); + error CallerIsNotTssOrUpdater(address caller); + error InvalidAddress(); error ZetaTransferError(); diff --git a/packages/protocol-contracts/test/Zeta.non-eth.spec.ts b/packages/protocol-contracts/test/Zeta.non-eth.spec.ts index facb429e..36e962e9 100644 --- a/packages/protocol-contracts/test/Zeta.non-eth.spec.ts +++ b/packages/protocol-contracts/test/Zeta.non-eth.spec.ts @@ -57,12 +57,12 @@ describe("ZetaNonEth tests", () => { }); describe("updateTssAndConnectorAddresses", () => { - it("Should revert if the caller is not tssAddressUpdater", async () => { + it("Should revert if the caller is not tssAddressUpdater or TSS", async () => { expect( zetaTokenNonEthContract .connect(randomSigner) - .updateTssAndConnectorAddresses(tssSigner.address, zetaConnectorNonEthContract.address) - ).to.be.revertedWith(`CallerIsNotTssUpdater("${randomSigner.address}")`); + .updateTssAndConnectorAddresses(randomSigner.address, zetaConnectorNonEthContract.address) + ).to.be.revertedWith(`CallerIsNotTssOrUpdater("${randomSigner.address}")`); }); it("Should change the addresses if the caller is tssAddressUpdater", async () => { @@ -73,6 +73,17 @@ describe("ZetaNonEth tests", () => { expect(await zetaTokenNonEthContract.tssAddress()).to.equal(randomSigner.address); expect(await zetaTokenNonEthContract.connectorAddress()).to.equal(randomSigner.address); }); + + it("Should change the addresses if the caller is TSS", async () => { + await ( + await zetaTokenNonEthContract + .connect(tssSigner) + .updateTssAndConnectorAddresses(randomSigner.address, randomSigner.address) + ).wait(); + + expect(await zetaTokenNonEthContract.tssAddress()).to.equal(randomSigner.address); + expect(await zetaTokenNonEthContract.connectorAddress()).to.equal(randomSigner.address); + }); }); describe("renounceTssAddressUpdater", () => { From 58c7f41f48c6a0845ed4df85251d90661dc8998d Mon Sep 17 00:00:00 2001 From: Andres Martin Aiello <50411235+andresaiello@users.noreply.github.com> Date: Fri, 1 Jul 2022 10:28:20 -0300 Subject: [PATCH 020/115] Add zetainteractor and errors to examples (#24) * Add zetainteractor and errors to examples * remove unused error * remove _crossChainId from examples * rename --- .../cross-chain-counter/CrossChainCounter.sol | 67 ++++++-------- .../cross-chain-message/CrossChainMessage.sol | 79 ++++++----------- .../CrossChainWarriors.sol | 88 +++++++++---------- .../multi-chain-value/MultiChainValue.sol | 32 ++++--- .../test/CrossChainCounter.spec.ts | 18 ++-- .../test/CrossChainWarriors.spec.ts | 21 +++-- .../test/MultiChainValue.spec.ts | 8 +- 7 files changed, 132 insertions(+), 181 deletions(-) diff --git a/packages/example-contracts/contracts/cross-chain-counter/CrossChainCounter.sol b/packages/example-contracts/contracts/cross-chain-counter/CrossChainCounter.sol index 858bd2c8..a5f29d01 100644 --- a/packages/example-contracts/contracts/cross-chain-counter/CrossChainCounter.sol +++ b/packages/example-contracts/contracts/cross-chain-counter/CrossChainCounter.sol @@ -2,43 +2,29 @@ pragma solidity 0.8.7; import "@openzeppelin/contracts/access/Ownable.sol"; +import "@zetachain/protocol-contracts/contracts/ZetaInteractor.sol"; import "@zetachain/protocol-contracts/contracts/interfaces/ZetaInterfaces.sol"; -contract CrossChainCounter is Ownable, ZetaReceiver { - bytes32 public constant CROSS_CHAIN_INCREMENT_MESSAGE = keccak256("CROSS_CHAIN_INCREMENT"); +interface CrossChainCounterErrors { + error InvalidMessageType(); - address public connectorAddress; - ZetaConnector internal connector; + error DecrementOverflow(); +} - uint256 internal immutable currentChainId; - uint256 internal _crossChainId; - bytes internal _crossChainAddress; +contract CrossChainCounter is ZetaInteractor, ZetaReceiver, CrossChainCounterErrors { + bytes32 public constant CROSS_CHAIN_INCREMENT_MESSAGE = keccak256("CROSS_CHAIN_INCREMENT"); mapping(address => uint256) public counter; - constructor(address connectorAddress_) { - currentChainId = block.chainid; - - connectorAddress = connectorAddress_; - connector = ZetaConnector(connectorAddress_); - } - - function setCrossChainAddress(bytes calldata ccAddress) public onlyOwner { - _crossChainAddress = ccAddress; - } - - function setCrossChainId(uint256 ccId) public onlyOwner { - _crossChainId = ccId; - } + constructor(address connectorAddress_) ZetaInteractor(connectorAddress_) {} - function crossChainCount() external { - require(_crossChainAddress.length != 0, "Cross-chain address is not set"); - require(_crossChainId != 0, "Cross-chain id is not set"); + function crossChainCount(uint256 destinationChainId) external { + if (!_isValidChainId(destinationChainId)) revert InvalidDestinationChainId(); connector.send( ZetaInterfaces.SendInput({ - destinationChainId: _crossChainId, - destinationAddress: _crossChainAddress, + destinationChainId: destinationChainId, + destinationAddress: interactorsByChainId[destinationChainId], destinationGasLimit: 2500000, message: abi.encode(CROSS_CHAIN_INCREMENT_MESSAGE, msg.sender), zetaValueAndGas: 0, @@ -47,30 +33,27 @@ contract CrossChainCounter is Ownable, ZetaReceiver { ); } - function onZetaMessage(ZetaInterfaces.ZetaMessage calldata zetaMessage) external override { - require(msg.sender == connectorAddress, "This function can only be called by the Connector contract"); - require( - keccak256(zetaMessage.zetaTxSenderAddress) == keccak256(_crossChainAddress), - "Cross-chain address doesn't match" - ); - require(zetaMessage.sourceChainId == _crossChainId, "Cross-chain id doesn't match"); - + function onZetaMessage(ZetaInterfaces.ZetaMessage calldata zetaMessage) + external + override + isValidMessageCall(zetaMessage) + { (bytes32 messageType, address messageFrom) = abi.decode(zetaMessage.message, (bytes32, address)); - require(messageType == CROSS_CHAIN_INCREMENT_MESSAGE, "Invalid message type"); + if (messageType != CROSS_CHAIN_INCREMENT_MESSAGE) revert InvalidMessageType(); counter[messageFrom]++; } - function onZetaRevert(ZetaInterfaces.ZetaRevert calldata zetaRevert) external override { - require(msg.sender == connectorAddress, "This function can only be called by the Connector contract"); - require(zetaRevert.zetaTxSenderAddress == address(this), "Invalid zetaTxSenderAddress"); - require(zetaRevert.sourceChainId == currentChainId, "Invalid sourceChainId"); - + function onZetaRevert(ZetaInterfaces.ZetaRevert calldata zetaRevert) + external + override + isValidRevertCall(zetaRevert) + { (bytes32 messageType, address messageFrom) = abi.decode(zetaRevert.message, (bytes32, address)); - require(messageType == CROSS_CHAIN_INCREMENT_MESSAGE, "Invalid message type"); - require(counter[messageFrom] > 0, "Decrement overflow"); + if (messageType != CROSS_CHAIN_INCREMENT_MESSAGE) revert InvalidMessageType(); + if (counter[messageFrom] <= 0) revert DecrementOverflow(); counter[messageFrom]--; } diff --git a/packages/example-contracts/contracts/cross-chain-message/CrossChainMessage.sol b/packages/example-contracts/contracts/cross-chain-message/CrossChainMessage.sol index 1c547d64..dc862d6e 100644 --- a/packages/example-contracts/contracts/cross-chain-message/CrossChainMessage.sol +++ b/packages/example-contracts/contracts/cross-chain-message/CrossChainMessage.sol @@ -2,55 +2,33 @@ pragma solidity 0.8.7; import "@openzeppelin/contracts/access/Ownable.sol"; +import "@zetachain/protocol-contracts/contracts/ZetaInteractor.sol"; import "@zetachain/protocol-contracts/contracts/interfaces/ZetaInterfaces.sol"; +interface CrossChainMessageErrors { + error InvalidMessageType(); +} + /** * @dev A simple contract able to send and receive Hello World messages from other chains. * Emits a HelloWorldEvent on successful messages * Emits a RevertedHelloWorldEvent on failed messages */ -contract CrossChainMessage is Ownable { +contract CrossChainMessage is ZetaInteractor, ZetaReceiver, CrossChainMessageErrors { bytes32 public constant HELLO_WORLD_MESSAGE_TYPE = keccak256("CROSS_CHAIN_HELLO_WORLD"); event HelloWorldEvent(string messageData); event RevertedHelloWorldEvent(string messageData); - address internal _zetaConnectorAddress; - ZetaConnector internal _zeta; - - uint256 internal immutable _currentChainId; - bytes internal _crossChainAddress; - uint256 internal _crossChainId; - - constructor(address _zetaConnectorInputAddress) { - _currentChainId = block.chainid; - - _zetaConnectorAddress = _zetaConnectorInputAddress; - _zeta = ZetaConnector(_zetaConnectorInputAddress); - } - - /** - * @dev The cross-chain address cannot be set on the constructor since it depends on the deployment of the contract on the other chain. - */ - function setCrossChainAddress(bytes calldata _ccAddress) public onlyOwner { - _crossChainAddress = _ccAddress; - } - - /** - * @dev Can be set on the constructor, but we favor this pattern for more flexibility. - */ - function setCrossChainId(uint256 _ccId) public onlyOwner { - _crossChainId = _ccId; - } + constructor(address connectorAddress_) ZetaInteractor(connectorAddress_) {} - function sendHelloWorld() external { - require(_crossChainAddress.length != 0, "Cross-chain address is not set"); - require(_crossChainId != 0, "Cross-chain id is not set"); + function sendHelloWorld(uint256 destinationChainId) external { + if (!_isValidChainId(destinationChainId)) revert InvalidDestinationChainId(); - _zeta.send( + connector.send( ZetaInterfaces.SendInput({ - destinationChainId: _crossChainId, - destinationAddress: _crossChainAddress, + destinationChainId: destinationChainId, + destinationAddress: interactorsByChainId[destinationChainId], destinationGasLimit: 2500000, message: abi.encode(HELLO_WORLD_MESSAGE_TYPE, "Hello, Cross-Chain World!"), zetaValueAndGas: 0, @@ -59,23 +37,20 @@ contract CrossChainMessage is Ownable { ); } - function onZetaMessage(ZetaInterfaces.ZetaMessage calldata _zetaMessage) external { - require(msg.sender == _zetaConnectorAddress, "This function can only be called by the Zeta Connector contract"); - require( - keccak256(_zetaMessage.zetaTxSenderAddress) == keccak256(_crossChainAddress), - "Cross-chain address doesn't match" - ); - require(_zetaMessage.sourceChainId == _crossChainId, "Cross-chain id doesn't match"); - + function onZetaMessage(ZetaInterfaces.ZetaMessage calldata zetaMessage) + external + override + isValidMessageCall(zetaMessage) + { /** * @dev Decode should follow the signature of the message provided to zeta.send. */ - (bytes32 messageType, string memory helloWorldMessage) = abi.decode(_zetaMessage.message, (bytes32, string)); + (bytes32 messageType, string memory helloWorldMessage) = abi.decode(zetaMessage.message, (bytes32, string)); /** * @dev Setting a message type is a useful pattern to distinguish between different messages. */ - require(messageType == HELLO_WORLD_MESSAGE_TYPE, "Invalid message type"); + if (messageType != HELLO_WORLD_MESSAGE_TYPE) revert InvalidMessageType(); emit HelloWorldEvent(helloWorldMessage); } @@ -85,14 +60,14 @@ contract CrossChainMessage is Ownable { * Useful to cleanup and leave the application on its initial state. * Note that the require statements and the functionality are similar to onZetaMessage. */ - function onZetaRevert(ZetaInterfaces.ZetaRevert calldata _zetaRevert) external { - require(msg.sender == _zetaConnectorAddress, "This function can only be called by the Zeta Connector contract"); - require(_zetaRevert.zetaTxSenderAddress == address(this), "Invalid zetaTxSenderAddress"); - require(_zetaRevert.sourceChainId == _currentChainId, "Invalid sourceChainId"); - - (bytes32 messageType, string memory helloWorldMessage) = abi.decode(_zetaRevert.message, (bytes32, string)); - - require(messageType == HELLO_WORLD_MESSAGE_TYPE, "Invalid message type"); + function onZetaRevert(ZetaInterfaces.ZetaRevert calldata zetaRevert) + external + override + isValidRevertCall(zetaRevert) + { + (bytes32 messageType, string memory helloWorldMessage) = abi.decode(zetaRevert.message, (bytes32, string)); + + if (messageType != HELLO_WORLD_MESSAGE_TYPE) revert InvalidMessageType(); emit RevertedHelloWorldEvent(helloWorldMessage); } diff --git a/packages/example-contracts/contracts/cross-chain-warriors/CrossChainWarriors.sol b/packages/example-contracts/contracts/cross-chain-warriors/CrossChainWarriors.sol index d7914510..34e95dc9 100644 --- a/packages/example-contracts/contracts/cross-chain-warriors/CrossChainWarriors.sol +++ b/packages/example-contracts/contracts/cross-chain-warriors/CrossChainWarriors.sol @@ -6,21 +6,27 @@ import "@openzeppelin/contracts/token/ERC721/ERC721.sol"; import "@openzeppelin/contracts/utils/Counters.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@zetachain/protocol-contracts/contracts/interfaces/ZetaInterfaces.sol"; +import "@zetachain/protocol-contracts/contracts/ZetaInteractor.sol"; -contract CrossChainWarriors is ERC721("CrossChainWarriors", "CCWAR"), Ownable, ZetaReceiver { +interface CrossChainWarriorsErrors { + error InvalidMessageType(); + + error InvalidTransferCaller(); + + error ErrorApprovingZeta(); +} + +contract CrossChainWarriors is + ERC721("CrossChainWarriors", "CCWAR"), + ZetaInteractor, + ZetaReceiver, + CrossChainWarriorsErrors +{ using Counters for Counters.Counter; using Strings for uint256; bytes32 public constant CROSS_CHAIN_TRANSFER_MESSAGE = keccak256("CROSS_CHAIN_TRANSFER"); - uint256 internal immutable _currentChainId; - uint256 internal _crossChainId; - bytes internal _crossChainAddress; - - address public connectorAddress; - ZetaConnector internal connector; - - address public zetaTokenAddress; IERC20 internal _zetaToken; string public baseURI; @@ -29,16 +35,10 @@ contract CrossChainWarriors is ERC721("CrossChainWarriors", "CCWAR"), Ownable, Z constructor( address connectorAddress_, - address zetaTokenAddress_, + address zetaTokenAddress, bool useEven - ) { - _currentChainId = block.chainid; - - connectorAddress = connectorAddress_; - connector = ZetaConnector(connectorAddress_); - - zetaTokenAddress = zetaTokenAddress_; - _zetaToken = IERC20(zetaTokenAddress_); + ) ZetaInteractor(connectorAddress_) { + _zetaToken = IERC20(zetaTokenAddress); /** * @dev A simple way to prevent collisions between cross-chain token ids @@ -48,14 +48,6 @@ contract CrossChainWarriors is ERC721("CrossChainWarriors", "CCWAR"), Ownable, Z if (useEven) tokenIds.increment(); } - function setCrossChainAddress(bytes calldata ccAddress) public onlyOwner { - _crossChainAddress = ccAddress; - } - - function setCrossChainId(uint256 ccId) public onlyOwner { - _crossChainId = ccId; - } - function setBaseURI(string memory baseURIParam) public onlyOwner { baseURI = baseURIParam; } @@ -93,22 +85,27 @@ contract CrossChainWarriors is ERC721("CrossChainWarriors", "CCWAR"), Ownable, Z * @dev Cross-chain functions */ - function crossChainTransfer(address to, uint256 tokenId) external { - require(_isApprovedOrOwner(_msgSender(), tokenId), "Transfer caller is not owner nor approved"); + function crossChainTransfer( + uint256 crossChainId, + address to, + uint256 tokenId + ) external { + if (!_isValidChainId(crossChainId)) revert InvalidDestinationChainId(); + if (!_isApprovedOrOwner(_msgSender(), tokenId)) revert InvalidTransferCaller(); uint256 crossChainGas = 18000000000000000000; { - bool success = _zetaToken.transferFrom(msg.sender, connectorAddress, crossChainGas); - require(success == true, "CrossChainWarriors: error approving zeta"); + bool success = _zetaToken.transferFrom(msg.sender, address(connector), crossChainGas); + if (!success) revert ErrorApprovingZeta(); } _burnWarrior(tokenId); connector.send( ZetaInterfaces.SendInput({ - destinationChainId: _crossChainId, - destinationAddress: _crossChainAddress, + destinationChainId: crossChainId, + destinationAddress: interactorsByChainId[crossChainId], destinationGasLimit: 500000, message: abi.encode(CROSS_CHAIN_TRANSFER_MESSAGE, tokenId, msg.sender, to), zetaValueAndGas: crossChainGas, @@ -117,14 +114,11 @@ contract CrossChainWarriors is ERC721("CrossChainWarriors", "CCWAR"), Ownable, Z ); } - function onZetaMessage(ZetaInterfaces.ZetaMessage calldata zetaMessage) external override { - require(msg.sender == connectorAddress, "This function can only be called by the Connector contract"); - require( - keccak256(zetaMessage.zetaTxSenderAddress) == keccak256(_crossChainAddress), - "Cross-chain address doesn't match" - ); - require(zetaMessage.sourceChainId == _crossChainId, "Cross-chain id doesn't match"); - + function onZetaMessage(ZetaInterfaces.ZetaMessage calldata zetaMessage) + external + override + isValidMessageCall(zetaMessage) + { ( bytes32 messageType, uint256 tokenId, @@ -135,22 +129,22 @@ contract CrossChainWarriors is ERC721("CrossChainWarriors", "CCWAR"), Ownable, Z address to ) = abi.decode(zetaMessage.message, (bytes32, uint256, address, address)); - require(messageType == CROSS_CHAIN_TRANSFER_MESSAGE, "Invalid message type"); + if (messageType != CROSS_CHAIN_TRANSFER_MESSAGE) revert InvalidMessageType(); _mintId(to, tokenId); } - function onZetaRevert(ZetaInterfaces.ZetaRevert calldata zetaRevert) external override { - require(msg.sender == connectorAddress, "This function can only be called by the Connector contract"); - require(zetaRevert.zetaTxSenderAddress == address(this), "Invalid zetaTxSenderAddress"); - require(zetaRevert.sourceChainId == _currentChainId, "Invalid sourceChainId"); - + function onZetaRevert(ZetaInterfaces.ZetaRevert calldata zetaRevert) + external + override + isValidRevertCall(zetaRevert) + { (bytes32 messageType, uint256 tokenId, address from) = abi.decode( zetaRevert.message, (bytes32, uint256, address) ); - require(messageType == CROSS_CHAIN_TRANSFER_MESSAGE, "Invalid message type"); + if (messageType != CROSS_CHAIN_TRANSFER_MESSAGE) revert InvalidMessageType(); _mintId(from, tokenId); } diff --git a/packages/example-contracts/contracts/multi-chain-value/MultiChainValue.sol b/packages/example-contracts/contracts/multi-chain-value/MultiChainValue.sol index e7ee6c7d..0bde0c38 100644 --- a/packages/example-contracts/contracts/multi-chain-value/MultiChainValue.sol +++ b/packages/example-contracts/contracts/multi-chain-value/MultiChainValue.sol @@ -3,29 +3,35 @@ pragma solidity 0.8.7; import "@openzeppelin/contracts/access/Ownable.sol"; import "@zetachain/protocol-contracts/contracts/Zeta.eth.sol"; +import "@zetachain/protocol-contracts/contracts/ZetaInteractor.sol"; import "@zetachain/protocol-contracts/contracts/interfaces/ZetaInterfaces.sol"; -contract MultiChainValue is Ownable { - address public zetaConnector; - address public zetaToken; - ZetaConnector internal connector; +interface MultiChainValueErrors { + error ErrorTransferringZeta(); + + error ChainIdAlreadyEnabled(); + + error ChainIdNotAvailable(); + error InvalidZetaValueAndGas(); +} + +contract MultiChainValue is ZetaInteractor, MultiChainValueErrors { + address public zetaToken; mapping(uint256 => bool) public availableChainIds; - constructor(address zetaConnector_, address zetaToken_) { - zetaConnector = zetaConnector_; + constructor(address connectorAddress_, address zetaToken_) ZetaInteractor(connectorAddress_) { zetaToken = zetaToken_; - connector = ZetaConnector(zetaConnector_); } function addAvailableChainId(uint256 destinationChainId) external onlyOwner { - require(!availableChainIds[destinationChainId], "MultiChainValue: destinationChainId already enabled"); + if (availableChainIds[destinationChainId]) revert ChainIdAlreadyEnabled(); availableChainIds[destinationChainId] = true; } function removeAvailableChainId(uint256 destinationChainId) external onlyOwner { - require(availableChainIds[destinationChainId], "MultiChainValue: destinationChainId not available"); + if (!availableChainIds[destinationChainId]) revert ChainIdNotAvailable(); delete availableChainIds[destinationChainId]; } @@ -35,12 +41,12 @@ contract MultiChainValue is Ownable { bytes calldata destinationAddress, uint256 zetaValueAndGas ) external { - require(availableChainIds[destinationChainId], "MultiChainValue: destinationChainId not available"); - require(zetaValueAndGas != 0, "MultiChainValue: zetaValueAndGas should be greater than 0"); + if (!availableChainIds[destinationChainId]) revert InvalidDestinationChainId(); + if (zetaValueAndGas == 0) revert InvalidZetaValueAndGas(); - bool success1 = ZetaEth(zetaToken).approve(zetaConnector, zetaValueAndGas); + bool success1 = ZetaEth(zetaToken).approve(address(connector), zetaValueAndGas); bool success2 = ZetaEth(zetaToken).transferFrom(msg.sender, address(this), zetaValueAndGas); - require((success1 && success2) == true, "MultiChainValue: error transferring Zeta"); + if (!(success1 && success2)) revert ErrorTransferringZeta(); connector.send( ZetaInterfaces.SendInput({ diff --git a/packages/example-contracts/test/CrossChainCounter.spec.ts b/packages/example-contracts/test/CrossChainCounter.spec.ts index 4f787842..a2680263 100644 --- a/packages/example-contracts/test/CrossChainCounter.spec.ts +++ b/packages/example-contracts/test/CrossChainCounter.spec.ts @@ -32,14 +32,12 @@ describe("CrossChainCounter tests", () => { zetaConnectorMockAddress: zetaConnectorMockContract.address, }); - await crossChainCounterContractA.setCrossChainAddress( + await crossChainCounterContractA.setInteractorByChainId(chainBId, ethers.utils.solidityPack(["address"], [crossChainCounterContractB.address]) ); - await crossChainCounterContractB.setCrossChainAddress( + await crossChainCounterContractB.setInteractorByChainId(chainAId, ethers.utils.solidityPack(["address"], [crossChainCounterContractA.address]) ); - await crossChainCounterContractA.setCrossChainId(chainBId); - await crossChainCounterContractB.setCrossChainId(chainAId); accounts = await ethers.getSigners(); [deployer] = accounts; @@ -52,7 +50,7 @@ describe("CrossChainCounter tests", () => { zetaConnectorMockAddress: zetaConnectorMockContract.address, }); - await expect(unsetContract.crossChainCount()).to.be.revertedWith("Cross-chain address is not set"); + await expect(unsetContract.crossChainCount(chainAId)).to.be.revertedWith("InvalidDestinationChainId()"); }); it("Should revert if the cross chain id wasn't set", async () => { @@ -60,11 +58,7 @@ describe("CrossChainCounter tests", () => { zetaConnectorMockAddress: zetaConnectorMockContract.address, }); - await unsetContract.setCrossChainAddress( - ethers.utils.solidityPack(["address"], [crossChainCounterContractB.address]) - ); - - await expect(unsetContract.crossChainCount()).to.be.revertedWith("Cross-chain id is not set"); + await expect(unsetContract.crossChainCount(chainAId)).to.be.revertedWith("InvalidDestinationChainId()"); }); }); @@ -78,7 +72,7 @@ describe("CrossChainCounter tests", () => { zetaTxSenderAddress: ethers.utils.solidityPack(["address"], [crossChainCounterContractA.address]), zetaValueAndGas: 0, }) - ).to.be.revertedWith("This function can only be called by the Connector contract"); + ).to.be.revertedWith(`InvalidCaller("${deployer.address}")`); }); it("Should revert if the cross-chain address doesn't match with the stored one", async () => { @@ -90,7 +84,7 @@ describe("CrossChainCounter tests", () => { 0, encoder.encode(["address"], [zetaConnectorMockContract.address]) ) - ).to.be.revertedWith("Cross-chain address doesn't match"); + ).to.be.revertedWith("InvalidZetaMessageCall()"); }); describe("Given a valid message", () => { diff --git a/packages/example-contracts/test/CrossChainWarriors.spec.ts b/packages/example-contracts/test/CrossChainWarriors.spec.ts index e00d60c6..740523de 100644 --- a/packages/example-contracts/test/CrossChainWarriors.spec.ts +++ b/packages/example-contracts/test/CrossChainWarriors.spec.ts @@ -36,19 +36,18 @@ describe("CrossChainWarriors tests", () => { zetaConnectorMockAddress: zetaConnectorMockContract.address, zetaTokenMockAddress: zetaEthTokenMockContract.address, }); - await crossChainWarriorsContractChainA.setCrossChainId(chainBId); crossChainWarriorsContractChainB = await deployCrossChainWarriorsMock({ customUseEven: true, zetaConnectorMockAddress: zetaConnectorMockContract.address, zetaTokenMockAddress: zetaEthTokenMockContract.address, }); - await crossChainWarriorsContractChainB.setCrossChainId(chainAId); - await crossChainWarriorsContractChainB.setCrossChainAddress( + + await crossChainWarriorsContractChainB.setInteractorByChainId(chainAId, ethers.utils.solidityPack(["address"], [crossChainWarriorsContractChainA.address]) ); - await crossChainWarriorsContractChainA.setCrossChainAddress( + await crossChainWarriorsContractChainA.setInteractorByChainId(chainBId, ethers.utils.solidityPack(["address"], [crossChainWarriorsContractChainB.address]) ); @@ -111,7 +110,7 @@ describe("CrossChainWarriors tests", () => { /** * The caller is the contract deployer and the NFT owner is account1 */ - expect(crossChainWarriorsContractChainA.crossChainTransfer(account1Address, id)).to.be.revertedWith( + expect(crossChainWarriorsContractChainA.crossChainTransfer(chainBId, account1Address, id)).to.be.revertedWith( "Transfer caller is not owner nor approved" ); }); @@ -123,7 +122,7 @@ describe("CrossChainWarriors tests", () => { expect(await crossChainWarriorsContractChainA.ownerOf(id)).to.equal(deployerAddress); - await (await crossChainWarriorsContractChainA.crossChainTransfer(account1Address, id)).wait(); + await (await crossChainWarriorsContractChainA.crossChainTransfer(chainBId, account1Address, id)).wait(); expect(crossChainWarriorsContractChainA.ownerOf(id)).to.be.revertedWith( "ERC721: owner query for nonexistent token" @@ -135,7 +134,7 @@ describe("CrossChainWarriors tests", () => { await (await crossChainWarriorsContractChainA.mintId(deployerAddress, id)).wait(); - await (await crossChainWarriorsContractChainA.crossChainTransfer(account1Address, id)).wait(); + await (await crossChainWarriorsContractChainA.crossChainTransfer(chainBId, account1Address, id)).wait(); expect(await crossChainWarriorsContractChainB.ownerOf(id)).to.equal(account1Address); }); @@ -151,7 +150,7 @@ describe("CrossChainWarriors tests", () => { zetaTxSenderAddress: ethers.utils.solidityPack(["address"], [crossChainWarriorsContractChainA.address]), zetaValueAndGas: 0, }) - ).to.be.revertedWith("This function can only be called by the Connector contract"); + ).to.be.revertedWith(`InvalidCaller("${deployer.address}")`); }); it("Should revert if the cross-chain address doesn't match with the stored one", async () => { @@ -163,7 +162,7 @@ describe("CrossChainWarriors tests", () => { 0, encoder.encode(["address"], [zetaConnectorMockContract.address]) ) - ).to.be.revertedWith("Cross-chain address doesn't match"); + ).to.be.revertedWith("InvalidZetaMessageCall()"); }); it("Should revert if the message type doesn't match with CROSS_CHAIN_TRANSFER_MESSAGE", async () => { @@ -182,7 +181,7 @@ describe("CrossChainWarriors tests", () => { [invalidMessageType, 1, deployerAddress, deployerAddress] ) ) - ).to.be.revertedWith("Invalid message type"); + ).to.be.revertedWith("InvalidMessageType()"); }); it("Should revert if the token already exists", async () => { @@ -251,7 +250,7 @@ describe("CrossChainWarriors tests", () => { await (await crossChainWarriorsContractChainA.mintId(deployerAddress, nftId)).wait(); - await (await crossChainWarriorsContractChainA.crossChainTransfer(deployerAddress, nftId)).wait(); + await (await crossChainWarriorsContractChainA.crossChainTransfer(chainBId, deployerAddress, nftId)).wait(); // Make sure that the NFT was removed from the source chain await expect(crossChainWarriorsContractChainA.ownerOf(nftId)).to.be.revertedWith( diff --git a/packages/example-contracts/test/MultiChainValue.spec.ts b/packages/example-contracts/test/MultiChainValue.spec.ts index 06363278..41273a28 100644 --- a/packages/example-contracts/test/MultiChainValue.spec.ts +++ b/packages/example-contracts/test/MultiChainValue.spec.ts @@ -44,7 +44,7 @@ describe("MultiChainValue tests", () => { await (await multiChainValueContractA.addAvailableChainId(1)).wait(); await expect(multiChainValueContractA.addAvailableChainId(1)).to.be.revertedWith( - "MultiChainValue: destinationChainId already enabled" + "ChainIdAlreadyEnabled()" ); }); @@ -58,7 +58,7 @@ describe("MultiChainValue tests", () => { describe("removeAvailableChainId", () => { it("Should prevent disabling a chainId that's already disabled", async () => { await expect(multiChainValueContractA.removeAvailableChainId(1)).to.be.revertedWith( - "MultiChainValue: destinationChainId not available" + "ChainIdNotAvailable()" ); }); @@ -74,7 +74,7 @@ describe("MultiChainValue tests", () => { describe("send", () => { it("Should prevent sending value to a disabled chainId", async () => { await expect(multiChainValueContractA.send(1, account1Address, 100_000)).to.be.revertedWith( - "MultiChainValue: destinationChainId not available" + "InvalidDestinationChainId()" ); }); @@ -82,7 +82,7 @@ describe("MultiChainValue tests", () => { await (await multiChainValueContractA.addAvailableChainId(1)).wait(); await expect(multiChainValueContractA.send(1, account1Address, 0)).to.be.revertedWith( - "MultiChainValue: zetaValueAndGas should be greater than 0" + "InvalidZetaValueAndGas()" ); }); From 89a5cd124e53cde2e7dc5e8253a67cc726e1c1df Mon Sep 17 00:00:00 2001 From: Lucas Date: Fri, 1 Jul 2022 10:41:30 -0300 Subject: [PATCH 021/115] Add not audited contracts disclaimer (#25) --- README.md | 8 ++++++++ packages/addresses/README.md | 3 +++ packages/example-contracts/README.md | 2 ++ 3 files changed, 13 insertions(+) create mode 100644 packages/addresses/README.md diff --git a/README.md b/README.md index c0067ec4..fc524685 100644 --- a/README.md +++ b/README.md @@ -32,6 +32,14 @@ ZetaChain is a public, decentralized blockchain and smart contract platform buil yarn compile +### Packages + +#### [Addresses](packages/addresses) + +#### [Example contracts](packages/example-contracts) + +#### [Protocol contracts](packages/example-contracts) + ### Cross-repo commands #### Package-specific commands diff --git a/packages/addresses/README.md b/packages/addresses/README.md new file mode 100644 index 00000000..542c3f7e --- /dev/null +++ b/packages/addresses/README.md @@ -0,0 +1,3 @@ +# ZetaChain addresses + +This package includes utilities to work with multiple addresses and networks. diff --git a/packages/example-contracts/README.md b/packages/example-contracts/README.md index 50ced2fe..f14c08bb 100644 --- a/packages/example-contracts/README.md +++ b/packages/example-contracts/README.md @@ -1,5 +1,7 @@ # ZetaChain example contracts +> ⚠️ The contracts **are not audited yet**, use at your own risk. + ## Environment variables Follow the template in `.env.example`. From 10a8344e7acdb705e5b3b57bd8e68d1653bb3213 Mon Sep 17 00:00:00 2001 From: Charlie Date: Fri, 1 Jul 2022 16:52:06 -0600 Subject: [PATCH 022/115] Add connector token approval script (#4) * script to approve connector to spend tokens * PR feedback * Update packages/protocol-contracts/lib/contracts.helpers.ts Co-authored-by: Lucas Co-authored-by: Lucas --- .../lib/contracts.helpers.ts | 12 +++++++ .../scripts/token-approval.ts | 32 +++++++++++++++++++ 2 files changed, 44 insertions(+) create mode 100644 packages/protocol-contracts/scripts/token-approval.ts diff --git a/packages/protocol-contracts/lib/contracts.helpers.ts b/packages/protocol-contracts/lib/contracts.helpers.ts index 2fe64fbd..38e67f48 100644 --- a/packages/protocol-contracts/lib/contracts.helpers.ts +++ b/packages/protocol-contracts/lib/contracts.helpers.ts @@ -101,6 +101,18 @@ export const getZetaConnectorNonEth = async (params: GetContractParams) => + await getContract({ + contractName: "ZetaNonEth", + ...params, + }); + +export const getZetaFactoryEth = async (params: GetContractParams) => + await getContract({ + contractName: "ZetaNonEth", + ...params, + }); + export const getZetaInteractorMock = async (zetaToken: string) => getContract({ contractName: "ZetaInteractorMock", diff --git a/packages/protocol-contracts/scripts/token-approval.ts b/packages/protocol-contracts/scripts/token-approval.ts new file mode 100644 index 00000000..245f4525 --- /dev/null +++ b/packages/protocol-contracts/scripts/token-approval.ts @@ -0,0 +1,32 @@ +import { getAddress, isNetworkName } from "@zetachain/addresses"; +import { ethers, network } from "hardhat"; + +import { getZetaFactoryEth, getZetaFactoryNonEth, isEthNetworkName } from "../lib/contracts.helpers"; +import { ZetaEth__factory as ZetaEthFactory, ZetaNonEth__factory as ZetaNonEthFactory } from "../typechain-types"; + +const approvalAmount = ethers.utils.parseEther("10000000.0"); + +export async function setTokenApproval() { + if (!isNetworkName(network.name)) { + throw new Error(`network.name: ${network.name} isn't supported.`); + } + + let contract; + if (isEthNetworkName(network.name)) { + contract = await getZetaFactoryEth({ deployParams: null, existingContractAddress: getAddress("zetaToken") }); + } else { + contract = await getZetaFactoryNonEth({ deployParams: null, existingContractAddress: getAddress("zetaToken") }); + } + + let tx = await contract.approve(getAddress("connector"), approvalAmount); + tx.wait(); + + console.log(`Approved Connector Contract ${getAddress("connector")} for ${approvalAmount} `); +} + +setTokenApproval() + .then(() => process.exit(0)) + .catch((error) => { + console.error(error); + process.exit(1); + }); From 6952f972f7ee499e995ce73f80ba07a0bba4beec Mon Sep 17 00:00:00 2001 From: Andres Martin Aiello <50411235+andresaiello@users.noreply.github.com> Date: Tue, 5 Jul 2022 13:06:51 -0300 Subject: [PATCH 023/115] Integrate zeta token consumer (#26) * Integrate zeta token consumer * add crosschain test * add zetaConsumer address * fix small comments and renames * update ZetaTokenConsumer to return amount * remove unused functions --- packages/addresses/src/addresses.helpers.ts | 4 +- .../src/addresses/addresses.athens.json | 12 +- .../src/addresses/addresses.mainnet.json | 3 +- .../src/addresses/addresses.troy.json | 12 +- .../cross-chain-message/CrossChainMessage.sol | 21 ++- .../test/CrossChainMessageConnector.sol | 63 ++++++++ .../CrossChainWarriors.sol | 21 +-- .../test/CrossChainWarriorsMock.sol | 3 +- .../contracts/shared/ZetaTestContracts.sol | 8 + .../CrossChainMessage.helpers.ts | 61 ++++++++ .../CrossChainWarriors.helpers.ts | 20 ++- .../lib/shared/deploy.helpers.ts | 8 + .../set-cross-chain-data.ts | 10 +- .../multi-chain-swap/verify-contract.ts | 2 - .../test/CrossChainCounter.spec.ts | 14 +- .../test/CrossChainMessage.spec.ts | 140 ++++++++++++++++++ .../test/CrossChainWarriors.spec.ts | 70 ++++++--- .../test/MultiChainSwap.spec.ts | 6 +- .../example-contracts/test/test.helpers.ts | 40 ++++- .../ZetaTokenConsumerUniV2.strategy.sol | 17 ++- .../ZetaTokenConsumerUniV3.strategy.sol | 17 ++- .../contracts/interfaces/ZetaInterfaces.sol | 8 +- 22 files changed, 478 insertions(+), 82 deletions(-) create mode 100644 packages/example-contracts/contracts/cross-chain-message/test/CrossChainMessageConnector.sol create mode 100644 packages/example-contracts/contracts/shared/ZetaTestContracts.sol create mode 100644 packages/example-contracts/lib/cross-chain-message/CrossChainMessage.helpers.ts create mode 100644 packages/example-contracts/test/CrossChainMessage.spec.ts diff --git a/packages/addresses/src/addresses.helpers.ts b/packages/addresses/src/addresses.helpers.ts index 76e5a023..1fd2f737 100644 --- a/packages/addresses/src/addresses.helpers.ts +++ b/packages/addresses/src/addresses.helpers.ts @@ -21,7 +21,8 @@ export type ZetaAddress = | "uniswapV3Router" | "usdc" | "weth9" - | "zetaToken"; + | "zetaToken" + | "zetaTokenConsumerUniV2"; type NetworkAddresses = Record; const zetaAddresses: Record = { @@ -41,6 +42,7 @@ const zetaAddresses: Record = { usdc: true, weth9: true, zetaToken: true, + zetaTokenConsumerUniV2: true, }; export const isZetaAddress = (a: string | undefined): a is ZetaAddress => Boolean(zetaAddresses[a as ZetaAddress]); diff --git a/packages/addresses/src/addresses/addresses.athens.json b/packages/addresses/src/addresses/addresses.athens.json index d5e14b85..c23c4afd 100644 --- a/packages/addresses/src/addresses/addresses.athens.json +++ b/packages/addresses/src/addresses/addresses.athens.json @@ -14,7 +14,8 @@ "uniswapV3Router": "", "usdc": "", "weth9": "", - "zetaToken": "0xad7d0795ffdf21f20c89240D540487B1445c7D03" + "zetaToken": "0xad7d0795ffdf21f20c89240D540487B1445c7D03", + "zetaTokenConsumerUniV2": "" }, "goerli": { "connector": "0x0B16Fc7e2D627d82255ba21e53Cf6c11B5186046", @@ -31,7 +32,8 @@ "uniswapV3Router": "", "usdc": "", "weth9": "", - "zetaToken": "0x011a76081989aDA18d0a16bf3fee2C6c3BD07B07" + "zetaToken": "0x011a76081989aDA18d0a16bf3fee2C6c3BD07B07", + "zetaTokenConsumerUniV2": "" }, "polygon-mumbai": { "connector": "0xa5467B39Ad9f51DEb6b30Abfa9828531dCBA99A9", @@ -47,7 +49,8 @@ "uniswapV3Router": "", "usdc": "", "weth9": "", - "zetaToken": "0x84383be9B3Eda50ABD5899936D4963505d449de2" + "zetaToken": "0x84383be9B3Eda50ABD5899936D4963505d449de2", + "zetaTokenConsumerUniV2": "" }, "ropsten": { "connector": "0x91Ea4f79D39DA890B03E965111953d0494936072", @@ -63,6 +66,7 @@ "uniswapV3Router": "", "usdc": "", "weth9": "", - "zetaToken": "0x3357A3bd90A001282bA2152D6c0a2372c8E0e28E" + "zetaToken": "0x3357A3bd90A001282bA2152D6c0a2372c8E0e28E", + "zetaTokenConsumerUniV2": "" } } diff --git a/packages/addresses/src/addresses/addresses.mainnet.json b/packages/addresses/src/addresses/addresses.mainnet.json index 74a87cbd..8565581d 100644 --- a/packages/addresses/src/addresses/addresses.mainnet.json +++ b/packages/addresses/src/addresses/addresses.mainnet.json @@ -13,6 +13,7 @@ "uniswapV3Router": "0xE592427A0AEce92De3Edee1F18E0157C05861564", "usdc": "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48", "weth9": "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2", - "zetaToken": "" + "zetaToken": "", + "zetaTokenConsumerUniV2": "" } } diff --git a/packages/addresses/src/addresses/addresses.troy.json b/packages/addresses/src/addresses/addresses.troy.json index 626a9f4c..89820cbb 100644 --- a/packages/addresses/src/addresses/addresses.troy.json +++ b/packages/addresses/src/addresses/addresses.troy.json @@ -14,7 +14,8 @@ "uniswapV3Router": "", "usdc": "", "weth9": "", - "zetaToken": "0xddE78e6202518FF4936b5302cC2891ec180E8bFf" + "zetaToken": "0xddE78e6202518FF4936b5302cC2891ec180E8bFf", + "zetaTokenConsumerUniV2": "" }, "eth-localnet": { "connector": "0xD7db1F9D0279876a9dcDb92e06057E0818b9B34b", @@ -30,7 +31,8 @@ "uniswapV3Router": "", "usdc": "", "weth9": "", - "zetaToken": "0xaEF27C0E302005dB3b442edF762EB070Dc2DB9b5" + "zetaToken": "0xaEF27C0E302005dB3b442edF762EB070Dc2DB9b5", + "zetaTokenConsumerUniV2": "" }, "bsc-localnet": { "connector": "0x960bd6A9d8424455953a68c17Be7f56e0cf83A9E", @@ -46,7 +48,8 @@ "uniswapV3Router": "", "usdc": "", "weth9": "", - "zetaToken": "0x0CF6e5aA211A4b7da5d04e93dC40Ee18202a5f84" + "zetaToken": "0x0CF6e5aA211A4b7da5d04e93dC40Ee18202a5f84", + "zetaTokenConsumerUniV2": "" }, "polygon-localnet": { "connector": "0xa16BD8468d10d28E6c16F03798EEb710fc84F616", @@ -62,6 +65,7 @@ "uniswapV3Router": "", "usdc": "", "weth9": "", - "zetaToken": "0xD443E93f689a7E1d517Fef799b1d2Fd2FA536d3A" + "zetaToken": "0xD443E93f689a7E1d517Fef799b1d2Fd2FA536d3A", + "zetaTokenConsumerUniV2": "" } } diff --git a/packages/example-contracts/contracts/cross-chain-message/CrossChainMessage.sol b/packages/example-contracts/contracts/cross-chain-message/CrossChainMessage.sol index dc862d6e..c7f81650 100644 --- a/packages/example-contracts/contracts/cross-chain-message/CrossChainMessage.sol +++ b/packages/example-contracts/contracts/cross-chain-message/CrossChainMessage.sol @@ -1,6 +1,7 @@ // SPDX-License-Identifier: MIT pragma solidity 0.8.7; +import "@openzeppelin/contracts/interfaces/IERC20.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@zetachain/protocol-contracts/contracts/ZetaInteractor.sol"; import "@zetachain/protocol-contracts/contracts/interfaces/ZetaInterfaces.sol"; @@ -20,18 +21,32 @@ contract CrossChainMessage is ZetaInteractor, ZetaReceiver, CrossChainMessageErr event HelloWorldEvent(string messageData); event RevertedHelloWorldEvent(string messageData); - constructor(address connectorAddress_) ZetaInteractor(connectorAddress_) {} + ZetaTokenConsumer private _zetaConsumer; + IERC20 internal _zetaToken; - function sendHelloWorld(uint256 destinationChainId) external { + constructor( + address connectorAddress, + address zetaTokenAddress, + address zetaConsumerAddress + ) ZetaInteractor(connectorAddress) { + _zetaToken = IERC20(zetaTokenAddress); + _zetaConsumer = ZetaTokenConsumer(zetaConsumerAddress); + } + + function sendHelloWorld(uint256 destinationChainId) external payable { if (!_isValidChainId(destinationChainId)) revert InvalidDestinationChainId(); + uint256 crossChainGas = 18 * (10**18); + uint256 zetaValueAndGas = _zetaConsumer.getZetaFromEth{value: msg.value}(address(this), crossChainGas); + _zetaToken.approve(address(connector), zetaValueAndGas); + connector.send( ZetaInterfaces.SendInput({ destinationChainId: destinationChainId, destinationAddress: interactorsByChainId[destinationChainId], destinationGasLimit: 2500000, message: abi.encode(HELLO_WORLD_MESSAGE_TYPE, "Hello, Cross-Chain World!"), - zetaValueAndGas: 0, + zetaValueAndGas: zetaValueAndGas, zetaParams: abi.encode("") }) ); diff --git a/packages/example-contracts/contracts/cross-chain-message/test/CrossChainMessageConnector.sol b/packages/example-contracts/contracts/cross-chain-message/test/CrossChainMessageConnector.sol new file mode 100644 index 00000000..e641c763 --- /dev/null +++ b/packages/example-contracts/contracts/cross-chain-message/test/CrossChainMessageConnector.sol @@ -0,0 +1,63 @@ +// SPDX-License-Identifier: MIT +pragma solidity 0.8.7; + +import "@zetachain/protocol-contracts/contracts/interfaces/ZetaInterfaces.sol"; + +import "../CrossChainMessage.sol"; + +contract CrossChainMessageConnector is ZetaConnector { + function callOnZetaMessage( + bytes memory zetaTxSenderAddress, + uint256 sourceChainId, + address destinationAddress, + uint256 zetaValueAndGas, + bytes calldata message + ) public { + return + CrossChainMessage(payable(destinationAddress)).onZetaMessage( + ZetaInterfaces.ZetaMessage({ + zetaTxSenderAddress: zetaTxSenderAddress, + sourceChainId: sourceChainId, + destinationAddress: destinationAddress, + zetaValueAndGas: zetaValueAndGas, + message: message + }) + ); + } + + function callOnZetaRevert( + address zetaTxSenderAddress, + uint256 sourceChainId, + uint256 destinationChainId, + bytes calldata destinationAddress, + uint256 zetaValueAndGas, + uint256, // destinationGasLimit + bytes calldata message + ) public { + return + CrossChainMessage(payable(zetaTxSenderAddress)).onZetaRevert( + ZetaInterfaces.ZetaRevert({ + zetaTxSenderAddress: zetaTxSenderAddress, + sourceChainId: sourceChainId, + destinationAddress: destinationAddress, + destinationChainId: destinationChainId, + zetaValueAndGas: zetaValueAndGas, + message: message + }) + ); + } + + function send(ZetaInterfaces.SendInput calldata sendInput) external override { + uint256 sourceChainId = sendInput.destinationChainId == 2 ? 1 : 2; + address dest = address(uint160(bytes20(sendInput.destinationAddress))); + + return + callOnZetaMessage( + abi.encodePacked(msg.sender), + sourceChainId, + dest, + sendInput.zetaValueAndGas, + sendInput.message + ); + } +} diff --git a/packages/example-contracts/contracts/cross-chain-warriors/CrossChainWarriors.sol b/packages/example-contracts/contracts/cross-chain-warriors/CrossChainWarriors.sol index 34e95dc9..076820b4 100644 --- a/packages/example-contracts/contracts/cross-chain-warriors/CrossChainWarriors.sol +++ b/packages/example-contracts/contracts/cross-chain-warriors/CrossChainWarriors.sol @@ -33,12 +33,16 @@ contract CrossChainWarriors is Counters.Counter public tokenIds; + ZetaTokenConsumer private _zetaConsumer; + constructor( - address connectorAddress_, + address connectorAddress, address zetaTokenAddress, + address zetaConsumerAddress, bool useEven - ) ZetaInteractor(connectorAddress_) { + ) ZetaInteractor(connectorAddress) { _zetaToken = IERC20(zetaTokenAddress); + _zetaConsumer = ZetaTokenConsumer(zetaConsumerAddress); /** * @dev A simple way to prevent collisions between cross-chain token ids @@ -89,16 +93,13 @@ contract CrossChainWarriors is uint256 crossChainId, address to, uint256 tokenId - ) external { + ) external payable { if (!_isValidChainId(crossChainId)) revert InvalidDestinationChainId(); if (!_isApprovedOrOwner(_msgSender(), tokenId)) revert InvalidTransferCaller(); - uint256 crossChainGas = 18000000000000000000; - - { - bool success = _zetaToken.transferFrom(msg.sender, address(connector), crossChainGas); - if (!success) revert ErrorApprovingZeta(); - } + uint256 crossChainGas = 18 * (10**18); + uint256 zetaValueAndGas = _zetaConsumer.getZetaFromEth{value: msg.value}(address(this), crossChainGas); + _zetaToken.approve(address(connector), zetaValueAndGas); _burnWarrior(tokenId); @@ -108,7 +109,7 @@ contract CrossChainWarriors is destinationAddress: interactorsByChainId[crossChainId], destinationGasLimit: 500000, message: abi.encode(CROSS_CHAIN_TRANSFER_MESSAGE, tokenId, msg.sender, to), - zetaValueAndGas: crossChainGas, + zetaValueAndGas: zetaValueAndGas, zetaParams: abi.encode("") }) ); diff --git a/packages/example-contracts/contracts/cross-chain-warriors/test/CrossChainWarriorsMock.sol b/packages/example-contracts/contracts/cross-chain-warriors/test/CrossChainWarriorsMock.sol index 48155868..69eff602 100644 --- a/packages/example-contracts/contracts/cross-chain-warriors/test/CrossChainWarriorsMock.sol +++ b/packages/example-contracts/contracts/cross-chain-warriors/test/CrossChainWarriorsMock.sol @@ -7,8 +7,9 @@ contract CrossChainWarriorsMock is CrossChainWarriors { constructor( address connectorAddress, address zetaTokenAddress, + address zetaConsumerAddress, bool useEven - ) CrossChainWarriors(connectorAddress, zetaTokenAddress, useEven) {} + ) CrossChainWarriors(connectorAddress, zetaTokenAddress, zetaConsumerAddress, useEven) {} function mintId(address to, uint256 tokenId) external { return _mintId(to, tokenId); diff --git a/packages/example-contracts/contracts/shared/ZetaTestContracts.sol b/packages/example-contracts/contracts/shared/ZetaTestContracts.sol new file mode 100644 index 00000000..355fde4d --- /dev/null +++ b/packages/example-contracts/contracts/shared/ZetaTestContracts.sol @@ -0,0 +1,8 @@ +// SPDX-License-Identifier: MIT +pragma solidity 0.8.7; + +/** + * @dev Contracts that need to be compiled for testing purposes + */ + +import "@zetachain/protocol-contracts/contracts/ZetaTokenConsumerUniV2.strategy.sol"; diff --git a/packages/example-contracts/lib/cross-chain-message/CrossChainMessage.helpers.ts b/packages/example-contracts/lib/cross-chain-message/CrossChainMessage.helpers.ts new file mode 100644 index 00000000..47adfbee --- /dev/null +++ b/packages/example-contracts/lib/cross-chain-message/CrossChainMessage.helpers.ts @@ -0,0 +1,61 @@ +import assert from "assert"; +import { ContractFactory, ContractReceipt } from "ethers"; +import { ethers, network } from "hardhat"; + +import { + CrossChainMessage, + CrossChainMessage__factory, + CrossChainMessageConnector, + CrossChainMessageConnector__factory, +} from "../../typechain-types"; + +export type GetContractParams = + | { + deployParams: Parameters; + existingContractAddress?: null; + } + | { + deployParams?: null; + existingContractAddress: string; + }; + +/** + * @description only for testing or local environment + */ +export const deployCrossChainMessageMock = async ({ + zetaConnectorMockAddress, + zetaTokenConsumerAddress, + zetaTokenMockAddress, +}: { + zetaConnectorMockAddress: string; + zetaTokenConsumerAddress: string; + zetaTokenMockAddress: string; +}) => { + const isLocalEnvironment = network.name === "hardhat"; + + assert(isLocalEnvironment, "deployCrossChainMessageMock is only intended to be used in the local environment"); + + const Factory = (await ethers.getContractFactory("CrossChainMessage")) as CrossChainMessage__factory; + + const crossChainMessageContract = (await Factory.deploy( + zetaConnectorMockAddress, + zetaTokenMockAddress, + zetaTokenConsumerAddress + )) as CrossChainMessage; + + await crossChainMessageContract.deployed(); + + return crossChainMessageContract; +}; + +export const deployZetaConnectorMock = async () => { + const Factory = (await ethers.getContractFactory( + "CrossChainMessageConnector" + )) as CrossChainMessageConnector__factory; + + const zetaConnectorMockContract = (await Factory.deploy()) as CrossChainMessageConnector; + + await zetaConnectorMockContract.deployed(); + + return zetaConnectorMockContract; +}; diff --git a/packages/example-contracts/lib/cross-chain-warriors/CrossChainWarriors.helpers.ts b/packages/example-contracts/lib/cross-chain-warriors/CrossChainWarriors.helpers.ts index c948cb9b..991276be 100644 --- a/packages/example-contracts/lib/cross-chain-warriors/CrossChainWarriors.helpers.ts +++ b/packages/example-contracts/lib/cross-chain-warriors/CrossChainWarriors.helpers.ts @@ -1,5 +1,6 @@ import { getAddress } from "@zetachain/addresses"; import assert from "assert"; +import { ContractFactory } from "ethers"; import { ethers, network } from "hardhat"; import { @@ -12,6 +13,16 @@ import { } from "../../typechain-types"; import { isNetworkName } from "../shared/network.constants"; +export type GetContractParams = + | { + deployParams: Parameters; + existingContractAddress?: null; + } + | { + deployParams?: null; + existingContractAddress: string; + }; + /** * @description only for testing or local environment */ @@ -19,9 +30,11 @@ export const deployCrossChainWarriorsMock = async ({ customUseEven, zetaConnectorMockAddress, zetaTokenMockAddress, + zetaTokenConsumerAddress, }: { customUseEven: boolean; zetaConnectorMockAddress: string; + zetaTokenConsumerAddress: string; zetaTokenMockAddress: string; }) => { const isLocalEnvironment = network.name === "hardhat"; @@ -35,6 +48,7 @@ export const deployCrossChainWarriorsMock = async ({ const crossChainWarriorsContract = (await Factory.deploy( zetaConnectorMockAddress, zetaTokenMockAddress, + zetaTokenConsumerAddress, useEven )) as CrossChainWarriorsMock; @@ -43,9 +57,10 @@ export const deployCrossChainWarriorsMock = async ({ return crossChainWarriorsContract; }; -export const getCrossChainWarriorsArgs = (): [string, string, boolean] => [ +export const getCrossChainWarriorsArgs = (): [string, string, string, boolean] => [ getAddress("connector"), getAddress("zetaToken"), + getAddress("zetaTokenConsumerUniV2"), network.name === "goerli", ]; @@ -64,7 +79,8 @@ export const getCrossChainWarriors = async (existingContractAddress?: string) => const crossChainWarriorsContract = (await Factory.deploy( getCrossChainWarriorsArgs()[0], getCrossChainWarriorsArgs()[1], - getCrossChainWarriorsArgs()[2] + getCrossChainWarriorsArgs()[2], + getCrossChainWarriorsArgs()[3] )) as CrossChainWarriors; await crossChainWarriorsContract.deployed(); diff --git a/packages/example-contracts/lib/shared/deploy.helpers.ts b/packages/example-contracts/lib/shared/deploy.helpers.ts index e57bcc2c..aef2132d 100644 --- a/packages/example-contracts/lib/shared/deploy.helpers.ts +++ b/packages/example-contracts/lib/shared/deploy.helpers.ts @@ -10,6 +10,8 @@ import { UniswapV2Router02__factory as UniswapV2Router02Factory, ZetaEthMock, ZetaEthMock__factory as ZetaEthMockFactory, + ZetaTokenConsumerUniV2, + ZetaTokenConsumerUniV2__factory, } from "../../typechain-types"; export type GetContractParams = @@ -84,3 +86,9 @@ export const verifyContract = ( execSync(command); }; + +export const deployZetaTokenConsumerUniV2 = async (zetaToken_: string, uniswapV2Router_: string) => + getContract({ + contractName: "ZetaTokenConsumerUniV2", + ...{ deployParams: [zetaToken_, uniswapV2Router_] }, + }); diff --git a/packages/example-contracts/scripts/cross-chain-warriors/set-cross-chain-data.ts b/packages/example-contracts/scripts/cross-chain-warriors/set-cross-chain-data.ts index e3f9fbed..5a3759c9 100644 --- a/packages/example-contracts/scripts/cross-chain-warriors/set-cross-chain-data.ts +++ b/packages/example-contracts/scripts/cross-chain-warriors/set-cross-chain-data.ts @@ -21,13 +21,11 @@ async function main() { const encodedCrossChainAddress = ethers.utils.solidityPack(["address"], [crossChainAddress]); - console.log("Setting cross-chain address:", encodedCrossChainAddress); + console.log("Setting cross-chain data:", _networkVariables.crossChainId, encodedCrossChainAddress); - await (await crossChainWarriorsContract.setCrossChainAddress(encodedCrossChainAddress)).wait(); - - console.log("Setting cross-chain id:", _networkVariables.crossChainId); - - await (await crossChainWarriorsContract.setCrossChainId(_networkVariables.crossChainId)).wait(); + await ( + await crossChainWarriorsContract.setInteractorByChainId(_networkVariables.crossChainId, encodedCrossChainAddress) + ).wait(); } main().catch((error) => { diff --git a/packages/example-contracts/scripts/multi-chain-swap/verify-contract.ts b/packages/example-contracts/scripts/multi-chain-swap/verify-contract.ts index 0c47d60d..0768eae7 100644 --- a/packages/example-contracts/scripts/multi-chain-swap/verify-contract.ts +++ b/packages/example-contracts/scripts/multi-chain-swap/verify-contract.ts @@ -1,8 +1,6 @@ import { getAddress } from "@zetachain/addresses"; import hardhat from "hardhat"; -import { getCrossChainWarriorsArgs } from "../../lib/cross-chain-warriors/CrossChainWarriors.helpers"; - async function main() { await hardhat.run("verify:verify", { address: getAddress("multiChainSwap"), diff --git a/packages/example-contracts/test/CrossChainCounter.spec.ts b/packages/example-contracts/test/CrossChainCounter.spec.ts index a2680263..4b94fbea 100644 --- a/packages/example-contracts/test/CrossChainCounter.spec.ts +++ b/packages/example-contracts/test/CrossChainCounter.spec.ts @@ -32,10 +32,12 @@ describe("CrossChainCounter tests", () => { zetaConnectorMockAddress: zetaConnectorMockContract.address, }); - await crossChainCounterContractA.setInteractorByChainId(chainBId, + await crossChainCounterContractA.setInteractorByChainId( + chainBId, ethers.utils.solidityPack(["address"], [crossChainCounterContractB.address]) ); - await crossChainCounterContractB.setInteractorByChainId(chainAId, + await crossChainCounterContractB.setInteractorByChainId( + chainAId, ethers.utils.solidityPack(["address"], [crossChainCounterContractA.address]) ); @@ -52,14 +54,6 @@ describe("CrossChainCounter tests", () => { await expect(unsetContract.crossChainCount(chainAId)).to.be.revertedWith("InvalidDestinationChainId()"); }); - - it("Should revert if the cross chain id wasn't set", async () => { - const unsetContract = await deployTestCrossChainCounter({ - zetaConnectorMockAddress: zetaConnectorMockContract.address, - }); - - await expect(unsetContract.crossChainCount(chainAId)).to.be.revertedWith("InvalidDestinationChainId()"); - }); }); describe("onZetaMessage", () => { diff --git a/packages/example-contracts/test/CrossChainMessage.spec.ts b/packages/example-contracts/test/CrossChainMessage.spec.ts new file mode 100644 index 00000000..e6fc4fe2 --- /dev/null +++ b/packages/example-contracts/test/CrossChainMessage.spec.ts @@ -0,0 +1,140 @@ +import { SignerWithAddress } from "@nomiclabs/hardhat-ethers/signers"; +import { getAddress } from "@zetachain/addresses"; +import { expect } from "chai"; +import { parseEther } from "ethers/lib/utils"; +import { ethers } from "hardhat"; + +import { + deployCrossChainMessageMock, + deployZetaConnectorMock, +} from "../lib/cross-chain-message/CrossChainMessage.helpers"; +import { deployZetaTokenConsumerUniV2, getZetaMock } from "../lib/shared/deploy.helpers"; +import { CrossChainMessage, CrossChainMessageConnector, ZetaEthMock } from "../typechain-types"; +import { ZetaTokenConsumerUniV2 } from "../typechain-types/@zetachain/protocol-contracts/contracts/ZetaTokenConsumerUniV2.strategy.sol"; +import { addZetaEthLiquidityTest } from "./test.helpers"; + +describe("CrossChainMessage tests", () => { + let zetaConnectorMockContract: CrossChainMessageConnector; + let zetaEthTokenMockContract: ZetaEthMock; + let zetaTokenConsumerUniV2: ZetaTokenConsumerUniV2; + + let crossChainMessageContractChainA: CrossChainMessage; + const chainAId = 1; + + let crossChainMessageContractChainB: CrossChainMessage; + const chainBId = 2; + + let accounts: SignerWithAddress[]; + let deployer: SignerWithAddress; + let deployerAddress: string; + + const SAMPLE_TEXT = "Hello, Cross-Chain World!"; + const encoder = new ethers.utils.AbiCoder(); + + beforeEach(async () => { + accounts = await ethers.getSigners(); + [deployer] = accounts; + deployerAddress = deployer.address; + + zetaEthTokenMockContract = await getZetaMock(); + zetaConnectorMockContract = await deployZetaConnectorMock(); + + const uniswapRouterAddr = getAddress("uniswapV2Router02", { + customNetworkName: "eth-mainnet", + customZetaNetwork: "mainnet", + }); + + await addZetaEthLiquidityTest(zetaEthTokenMockContract.address, parseEther("200000"), parseEther("100"), deployer); + // @dev: guarantee that the account has no zeta balance but still can use the protocol :D + const zetaBalance = await zetaEthTokenMockContract.balanceOf(deployer.address); + await zetaEthTokenMockContract.transfer(accounts[5].address, zetaBalance); + + zetaTokenConsumerUniV2 = await deployZetaTokenConsumerUniV2(zetaEthTokenMockContract.address, uniswapRouterAddr); + + crossChainMessageContractChainA = await deployCrossChainMessageMock({ + zetaConnectorMockAddress: zetaConnectorMockContract.address, + zetaTokenConsumerAddress: zetaTokenConsumerUniV2.address, + zetaTokenMockAddress: zetaEthTokenMockContract.address, + }); + + crossChainMessageContractChainB = await deployCrossChainMessageMock({ + zetaConnectorMockAddress: zetaConnectorMockContract.address, + zetaTokenConsumerAddress: zetaTokenConsumerUniV2.address, + zetaTokenMockAddress: zetaEthTokenMockContract.address, + }); + + await crossChainMessageContractChainB.setInteractorByChainId( + chainAId, + ethers.utils.solidityPack(["address"], [crossChainMessageContractChainA.address]) + ); + + await crossChainMessageContractChainA.setInteractorByChainId( + chainBId, + ethers.utils.solidityPack(["address"], [crossChainMessageContractChainB.address]) + ); + }); + + describe("sendHelloWorld", () => { + it("Should revert if the cross chain address wasn't set", async () => { + const unsetContract = await deployCrossChainMessageMock({ + zetaConnectorMockAddress: zetaConnectorMockContract.address, + zetaTokenConsumerAddress: zetaTokenConsumerUniV2.address, + zetaTokenMockAddress: zetaEthTokenMockContract.address, + }); + + await expect(unsetContract.sendHelloWorld(chainAId)).to.be.revertedWith("InvalidDestinationChainId()"); + }); + + it("Should send hello world", async () => { + await expect(crossChainMessageContractChainA.sendHelloWorld(chainBId, { value: parseEther("1") })).to.be.not + .reverted; + }); + }); + + describe("onZetaMessage", () => { + it("Should revert if the caller is not the Connector contract", async () => { + await expect( + crossChainMessageContractChainA.onZetaMessage({ + destinationAddress: crossChainMessageContractChainB.address, + message: encoder.encode(["address", "string"], [deployerAddress, SAMPLE_TEXT]), + sourceChainId: 1, + zetaTxSenderAddress: ethers.utils.solidityPack(["address"], [crossChainMessageContractChainA.address]), + zetaValueAndGas: 0, + }) + ).to.be.revertedWith(`InvalidCaller("${deployer.address}")`); + }); + + it("Should revert if the cross-chain address doesn't match with the stored one", async () => { + await expect( + zetaConnectorMockContract.callOnZetaMessage( + ethers.utils.solidityPack(["address"], [deployerAddress]), + 1, + crossChainMessageContractChainB.address, + 0, + encoder.encode(["address", "string"], [zetaConnectorMockContract.address, SAMPLE_TEXT]) + ) + ).to.be.revertedWith("InvalidZetaMessageCall()"); + }); + + describe("Given a valid message", () => { + it("Should emit `HelloWorldEvent`", async () => { + const messageType = await crossChainMessageContractChainA.HELLO_WORLD_MESSAGE_TYPE(); + + const tx = await zetaConnectorMockContract.callOnZetaMessage( + ethers.utils.solidityPack(["address"], [crossChainMessageContractChainA.address]), + 1, + crossChainMessageContractChainB.address, + 0, + encoder.encode(["bytes32", "string"], [messageType, SAMPLE_TEXT]) + ); + + await tx.wait(); + + const helloWorldEventFilter = crossChainMessageContractChainB.filters.HelloWorldEvent(); + const e1 = await crossChainMessageContractChainB.queryFilter(helloWorldEventFilter); + expect(e1.length).to.equal(1); + expect(e1[0].transactionHash).to.equal(tx.hash); + }); + }); + }); +}); diff --git a/packages/example-contracts/test/CrossChainWarriors.spec.ts b/packages/example-contracts/test/CrossChainWarriors.spec.ts index 740523de..d1088770 100644 --- a/packages/example-contracts/test/CrossChainWarriors.spec.ts +++ b/packages/example-contracts/test/CrossChainWarriors.spec.ts @@ -1,18 +1,22 @@ import { SignerWithAddress } from "@nomiclabs/hardhat-ethers/signers"; +import { getAddress } from "@zetachain/addresses"; import { expect } from "chai"; +import { parseEther } from "ethers/lib/utils"; import { ethers } from "hardhat"; import { deployCrossChainWarriorsMock, deployZetaConnectorMock, } from "../lib/cross-chain-warriors/CrossChainWarriors.helpers"; -import { getZetaMock } from "../lib/shared/deploy.helpers"; +import { deployZetaTokenConsumerUniV2, getZetaMock } from "../lib/shared/deploy.helpers"; import { CrossChainWarriorsMock, CrossChainWarriorsZetaConnectorMock, ZetaEthMock } from "../typechain-types"; -import { getMintTokenId } from "./test.helpers"; +import { ZetaTokenConsumerUniV2 } from "../typechain-types/@zetachain/protocol-contracts/contracts/ZetaTokenConsumerUniV2.strategy.sol"; +import { addZetaEthLiquidityTest, getMintTokenId } from "./test.helpers"; describe("CrossChainWarriors tests", () => { let zetaConnectorMockContract: CrossChainWarriorsZetaConnectorMock; let zetaEthTokenMockContract: ZetaEthMock; + let zetaTokenConsumerUniV2: ZetaTokenConsumerUniV2; let crossChainWarriorsContractChainA: CrossChainWarriorsMock; const chainAId = 1; @@ -28,39 +32,49 @@ describe("CrossChainWarriors tests", () => { const encoder = new ethers.utils.AbiCoder(); beforeEach(async () => { - zetaConnectorMockContract = await deployZetaConnectorMock(); + accounts = await ethers.getSigners(); + [deployer, account1] = accounts; + deployerAddress = deployer.address; + account1Address = account1.address; + zetaEthTokenMockContract = await getZetaMock(); + zetaConnectorMockContract = await deployZetaConnectorMock(); + + const uniswapRouterAddr = getAddress("uniswapV2Router02", { + customNetworkName: "eth-mainnet", + customZetaNetwork: "mainnet", + }); + + await addZetaEthLiquidityTest(zetaEthTokenMockContract.address, parseEther("200000"), parseEther("100"), deployer); + // @dev: guarantee that the account has no zeta balance but still can use the protocol :D + const zetaBalance = await zetaEthTokenMockContract.balanceOf(deployer.address); + await zetaEthTokenMockContract.transfer(accounts[5].address, zetaBalance); + + zetaTokenConsumerUniV2 = await deployZetaTokenConsumerUniV2(zetaEthTokenMockContract.address, uniswapRouterAddr); crossChainWarriorsContractChainA = await deployCrossChainWarriorsMock({ customUseEven: false, zetaConnectorMockAddress: zetaConnectorMockContract.address, + zetaTokenConsumerAddress: zetaTokenConsumerUniV2.address, zetaTokenMockAddress: zetaEthTokenMockContract.address, }); crossChainWarriorsContractChainB = await deployCrossChainWarriorsMock({ customUseEven: true, zetaConnectorMockAddress: zetaConnectorMockContract.address, + zetaTokenConsumerAddress: zetaTokenConsumerUniV2.address, zetaTokenMockAddress: zetaEthTokenMockContract.address, }); - await crossChainWarriorsContractChainB.setInteractorByChainId(chainAId, + await crossChainWarriorsContractChainB.setInteractorByChainId( + chainAId, ethers.utils.solidityPack(["address"], [crossChainWarriorsContractChainA.address]) ); - await crossChainWarriorsContractChainA.setInteractorByChainId(chainBId, + await crossChainWarriorsContractChainA.setInteractorByChainId( + chainBId, ethers.utils.solidityPack(["address"], [crossChainWarriorsContractChainB.address]) ); - - /** - * @description to pay for cross-chain gas - */ - await zetaEthTokenMockContract.approve(crossChainWarriorsContractChainA.address, ethers.constants.MaxUint256); - await zetaEthTokenMockContract.approve(crossChainWarriorsContractChainB.address, ethers.constants.MaxUint256); - - accounts = await ethers.getSigners(); - [deployer, account1] = accounts; - deployerAddress = deployer.address; - account1Address = account1.address; }); describe("constructor", () => { @@ -110,9 +124,9 @@ describe("CrossChainWarriors tests", () => { /** * The caller is the contract deployer and the NFT owner is account1 */ - expect(crossChainWarriorsContractChainA.crossChainTransfer(chainBId, account1Address, id)).to.be.revertedWith( - "Transfer caller is not owner nor approved" - ); + expect( + crossChainWarriorsContractChainA.crossChainTransfer(chainBId, account1Address, id, { value: parseEther("1") }) + ).to.be.revertedWith("Transfer caller is not owner nor approved"); }); it("Should burn the tokenId", async () => { @@ -122,7 +136,11 @@ describe("CrossChainWarriors tests", () => { expect(await crossChainWarriorsContractChainA.ownerOf(id)).to.equal(deployerAddress); - await (await crossChainWarriorsContractChainA.crossChainTransfer(chainBId, account1Address, id)).wait(); + await ( + await crossChainWarriorsContractChainA.crossChainTransfer(chainBId, account1Address, id, { + value: parseEther("1"), + }) + ).wait(); expect(crossChainWarriorsContractChainA.ownerOf(id)).to.be.revertedWith( "ERC721: owner query for nonexistent token" @@ -134,7 +152,11 @@ describe("CrossChainWarriors tests", () => { await (await crossChainWarriorsContractChainA.mintId(deployerAddress, id)).wait(); - await (await crossChainWarriorsContractChainA.crossChainTransfer(chainBId, account1Address, id)).wait(); + await ( + await crossChainWarriorsContractChainA.crossChainTransfer(chainBId, account1Address, id, { + value: parseEther("1"), + }) + ).wait(); expect(await crossChainWarriorsContractChainB.ownerOf(id)).to.equal(account1Address); }); @@ -250,7 +272,11 @@ describe("CrossChainWarriors tests", () => { await (await crossChainWarriorsContractChainA.mintId(deployerAddress, nftId)).wait(); - await (await crossChainWarriorsContractChainA.crossChainTransfer(chainBId, deployerAddress, nftId)).wait(); + await ( + await crossChainWarriorsContractChainA.crossChainTransfer(chainBId, deployerAddress, nftId, { + value: parseEther("1"), + }) + ).wait(); // Make sure that the NFT was removed from the source chain await expect(crossChainWarriorsContractChainA.ownerOf(nftId)).to.be.revertedWith( diff --git a/packages/example-contracts/test/MultiChainSwap.spec.ts b/packages/example-contracts/test/MultiChainSwap.spec.ts index 777fabd4..ea86552e 100644 --- a/packages/example-contracts/test/MultiChainSwap.spec.ts +++ b/packages/example-contracts/test/MultiChainSwap.spec.ts @@ -1,7 +1,7 @@ import { FakeContract, smock } from "@defi-wonderland/smock"; import { BigNumber } from "@ethersproject/bignumber"; import { AddressZero, MaxUint256 } from "@ethersproject/constants"; -import { parseUnits } from "@ethersproject/units"; +import { parseEther, parseUnits } from "@ethersproject/units"; import { SignerWithAddress } from "@nomiclabs/hardhat-ethers/signers"; import { getAddress } from "@zetachain/addresses"; import chai, { expect } from "chai"; @@ -56,12 +56,12 @@ describe("MultiChainSwap tests", () => { // 2 ZETA = 1 ETH const tx2 = await uniswapRouterFork.addLiquidityETH( zetaTokenMock.address, - parseUnits("2000"), + parseUnits("1000"), 0, 0, deployer.address, (await getNow()) + 360, - { value: parseUnits("1000") } + { value: parseUnits("500") } ); await tx2.wait(); }; diff --git a/packages/example-contracts/test/test.helpers.ts b/packages/example-contracts/test/test.helpers.ts index 19824bb5..b4dbcf4e 100644 --- a/packages/example-contracts/test/test.helpers.ts +++ b/packages/example-contracts/test/test.helpers.ts @@ -1,6 +1,15 @@ +import { MaxUint256 } from "@ethersproject/constants"; +import { SignerWithAddress } from "@nomiclabs/hardhat-ethers/signers"; +import { getAddress } from "@zetachain/addresses"; import { BigNumber, ContractReceipt } from "ethers"; -import { IUniswapV2Pair__factory, MultiChainSwapBase__factory } from "../typechain-types"; +import { getNow } from "../lib/shared/deploy.helpers"; +import { + ERC20__factory, + IUniswapV2Pair__factory, + MultiChainSwapBase__factory, + UniswapV2Router02__factory, +} from "../typechain-types"; export const getMintTokenId = (mintTx: ContractReceipt) => mintTx.events?.[0].args?.tokenId; @@ -51,3 +60,32 @@ export const getCustomErrorMessage = (errorMethod: string, params?: [CustomError : ""; return `VM Exception while processing transaction: reverted with custom error '${errorMethod}(${stringParams})'`; }; + +export const addZetaEthLiquidityTest = async ( + zetaTokenAddress: string, + zetaToAdd: BigNumber, + ETHToAdd: BigNumber, + deployer: SignerWithAddress +) => { + const uniswapRouterAddr = getAddress("uniswapV2Router02", { + customNetworkName: "eth-mainnet", + customZetaNetwork: "mainnet", + }); + const uniswapRouter = UniswapV2Router02__factory.connect(uniswapRouterAddr, deployer); + + const ZetaTokenContract = ERC20__factory.connect(zetaTokenAddress, deployer); + + const tx1 = await ZetaTokenContract.approve(uniswapRouter.address, MaxUint256); + await tx1.wait(); + + const tx2 = await uniswapRouter.addLiquidityETH( + ZetaTokenContract.address, + zetaToAdd, + 0, + 0, + deployer.address, + (await getNow()) + 360, + { gasLimit: 10_000_000, value: ETHToAdd } + ); + await tx2.wait(); +}; diff --git a/packages/protocol-contracts/contracts/ZetaTokenConsumerUniV2.strategy.sol b/packages/protocol-contracts/contracts/ZetaTokenConsumerUniV2.strategy.sol index 44ff7a58..22592abc 100644 --- a/packages/protocol-contracts/contracts/ZetaTokenConsumerUniV2.strategy.sol +++ b/packages/protocol-contracts/contracts/ZetaTokenConsumerUniV2.strategy.sol @@ -37,7 +37,12 @@ contract ZetaTokenConsumerUniV2 is ZetaTokenConsumer, ZetaTokenConsumerUniV2Erro wETH = uniswapV2Router.WETH(); } - function getZetaFromEth(address destinationAddress, uint256 minAmountOut) external payable override { + function getZetaFromEth(address destinationAddress, uint256 minAmountOut) + external + payable + override + returns (uint256) + { if (destinationAddress == address(0)) revert InvalidAddress(); if (msg.value == 0) revert InputCantBeZero(); @@ -55,6 +60,7 @@ contract ZetaTokenConsumerUniV2 is ZetaTokenConsumer, ZetaTokenConsumerUniV2Erro uint256 amountOut = amounts[path.length - 1]; emit EthExchangedForZeta(msg.value, amountOut); + return amountOut; } function getZetaFromToken( @@ -62,7 +68,7 @@ contract ZetaTokenConsumerUniV2 is ZetaTokenConsumer, ZetaTokenConsumerUniV2Erro uint256 minAmountOut, address inputToken, uint256 inputTokenAmount - ) external override { + ) external override returns (uint256) { if (destinationAddress == address(0) || inputToken == address(0)) revert InvalidAddress(); if (inputTokenAmount == 0) revert InputCantBeZero(); @@ -93,13 +99,14 @@ contract ZetaTokenConsumerUniV2 is ZetaTokenConsumer, ZetaTokenConsumerUniV2Erro uint256 amountOut = amounts[path.length - 1]; emit TokenExchangedForZeta(inputToken, inputTokenAmount, amountOut); + return amountOut; } function getEthFromZeta( address destinationAddress, uint256 minAmountOut, uint256 zetaTokenAmount - ) external override { + ) external override returns (uint256) { if (destinationAddress == address(0)) revert InvalidAddress(); if (zetaTokenAmount == 0) revert InputCantBeZero(); @@ -123,6 +130,7 @@ contract ZetaTokenConsumerUniV2 is ZetaTokenConsumer, ZetaTokenConsumerUniV2Erro uint256 amountOut = amounts[path.length - 1]; emit ZetaExchangedForEth(zetaTokenAmount, amountOut); + return amountOut; } function getTokenFromZeta( @@ -130,7 +138,7 @@ contract ZetaTokenConsumerUniV2 is ZetaTokenConsumer, ZetaTokenConsumerUniV2Erro uint256 minAmountOut, address outputToken, uint256 zetaTokenAmount - ) external override { + ) external override returns (uint256) { if (destinationAddress == address(0) || outputToken == address(0)) revert InvalidAddress(); if (zetaTokenAmount == 0) revert InputCantBeZero(); @@ -162,5 +170,6 @@ contract ZetaTokenConsumerUniV2 is ZetaTokenConsumer, ZetaTokenConsumerUniV2Erro uint256 amountOut = amounts[path.length - 1]; emit ZetaExchangedForToken(outputToken, zetaTokenAmount, amountOut); + return amountOut; } } diff --git a/packages/protocol-contracts/contracts/ZetaTokenConsumerUniV3.strategy.sol b/packages/protocol-contracts/contracts/ZetaTokenConsumerUniV3.strategy.sol index 9ae1013f..f6e0a621 100644 --- a/packages/protocol-contracts/contracts/ZetaTokenConsumerUniV3.strategy.sol +++ b/packages/protocol-contracts/contracts/ZetaTokenConsumerUniV3.strategy.sol @@ -61,7 +61,12 @@ contract ZetaTokenConsumerUniV3 is ZetaTokenConsumer, ZetaTokenConsumerUniV3Erro receive() external payable {} - function getZetaFromEth(address destinationAddress, uint256 minAmountOut) external payable override { + function getZetaFromEth(address destinationAddress, uint256 minAmountOut) + external + payable + override + returns (uint256) + { if (destinationAddress == address(0)) revert InvalidAddress(); if (msg.value == 0) revert InputCantBeZero(); @@ -79,6 +84,7 @@ contract ZetaTokenConsumerUniV3 is ZetaTokenConsumer, ZetaTokenConsumerUniV3Erro uint256 amountOut = uniswapV3Router.exactInputSingle{value: msg.value}(params); emit EthExchangedForZeta(msg.value, amountOut); + return amountOut; } function getZetaFromToken( @@ -86,7 +92,7 @@ contract ZetaTokenConsumerUniV3 is ZetaTokenConsumer, ZetaTokenConsumerUniV3Erro uint256 minAmountOut, address inputToken, uint256 inputTokenAmount - ) external override { + ) external override returns (uint256) { if (destinationAddress == address(0) || inputToken == address(0)) revert InvalidAddress(); if (inputTokenAmount == 0) revert InputCantBeZero(); @@ -106,13 +112,14 @@ contract ZetaTokenConsumerUniV3 is ZetaTokenConsumer, ZetaTokenConsumerUniV3Erro uint256 amountOut = uniswapV3Router.exactInput(params); emit TokenExchangedForZeta(inputToken, inputTokenAmount, amountOut); + return amountOut; } function getEthFromZeta( address destinationAddress, uint256 minAmountOut, uint256 zetaTokenAmount - ) external override { + ) external override returns (uint256) { if (destinationAddress == address(0)) revert InvalidAddress(); if (zetaTokenAmount == 0) revert InputCantBeZero(); @@ -140,6 +147,7 @@ contract ZetaTokenConsumerUniV3 is ZetaTokenConsumer, ZetaTokenConsumerUniV3Erro if (!sent) revert ErrorSendingETH(); emit ZetaExchangedForEth(zetaTokenAmount, amountOut); + return amountOut; } function getTokenFromZeta( @@ -147,7 +155,7 @@ contract ZetaTokenConsumerUniV3 is ZetaTokenConsumer, ZetaTokenConsumerUniV3Erro uint256 minAmountOut, address outputToken, uint256 zetaTokenAmount - ) external override { + ) external override returns (uint256) { if (destinationAddress == address(0) || outputToken == address(0)) revert InvalidAddress(); if (zetaTokenAmount == 0) revert InputCantBeZero(); @@ -167,5 +175,6 @@ contract ZetaTokenConsumerUniV3 is ZetaTokenConsumer, ZetaTokenConsumerUniV3Erro uint256 amountOut = uniswapV3Router.exactInput(params); emit ZetaExchangedForToken(outputToken, zetaTokenAmount, amountOut); + return amountOut; } } diff --git a/packages/protocol-contracts/contracts/interfaces/ZetaInterfaces.sol b/packages/protocol-contracts/contracts/interfaces/ZetaInterfaces.sol index 2f103fcf..b6eb7532 100644 --- a/packages/protocol-contracts/contracts/interfaces/ZetaInterfaces.sol +++ b/packages/protocol-contracts/contracts/interfaces/ZetaInterfaces.sol @@ -78,25 +78,25 @@ interface ZetaTokenConsumer { event ZetaExchangedForEth(uint256 amountIn, uint256 amountOut); event ZetaExchangedForToken(address token, uint256 amountIn, uint256 amountOut); - function getZetaFromEth(address destinationAddress, uint256 minAmountOut) external payable; + function getZetaFromEth(address destinationAddress, uint256 minAmountOut) external payable returns (uint256); function getZetaFromToken( address destinationAddress, uint256 minAmountOut, address inputToken, uint256 inputTokenAmount - ) external; + ) external returns (uint256); function getEthFromZeta( address destinationAddress, uint256 minAmountOut, uint256 zetaTokenAmount - ) external; + ) external returns (uint256); function getTokenFromZeta( address destinationAddress, uint256 minAmountOut, address outputToken, uint256 zetaTokenAmount - ) external; + ) external returns (uint256); } From 11564d65b0b33f229aa28635a8cc9456b0ab05d4 Mon Sep 17 00:00:00 2001 From: Andres Martin Aiello <50411235+andresaiello@users.noreply.github.com> Date: Wed, 13 Jul 2022 13:36:59 -0300 Subject: [PATCH 024/115] Implement veridise audit suggestions (#30) * Implement veridise audit suggestions * add interface --- .../multi-chain-swap/MultiChainSwap.base.sol | 2 +- .../contracts/Zeta.non-eth.sol | 8 +++--- .../contracts/ZetaConnector.non-eth.sol | 25 +++++++------------ .../contracts/ZetaInteractor.sol | 3 ++- .../ZetaTokenConsumerUniV2.strategy.sol | 2 +- .../ZetaTokenConsumerUniV3.strategy.sol | 18 ++++++++++--- .../interfaces/ZetaNonEthInterface.sol | 14 +++++++++++ 7 files changed, 47 insertions(+), 25 deletions(-) create mode 100644 packages/protocol-contracts/contracts/interfaces/ZetaNonEthInterface.sol diff --git a/packages/example-contracts/contracts/multi-chain-swap/MultiChainSwap.base.sol b/packages/example-contracts/contracts/multi-chain-swap/MultiChainSwap.base.sol index bbd6a9b3..35fbf8ba 100644 --- a/packages/example-contracts/contracts/multi-chain-swap/MultiChainSwap.base.sol +++ b/packages/example-contracts/contracts/multi-chain-swap/MultiChainSwap.base.sol @@ -9,7 +9,7 @@ import "@zetachain/protocol-contracts/contracts/interfaces/ZetaInterfaces.sol"; import "./MultiChainSwapErrors.sol"; contract MultiChainSwapBase is ZetaInteractor, ZetaReceiver, MultiChainSwapErrors { - uint16 internal constant MAX_DEADLINE = 365; + uint16 internal constant MAX_DEADLINE = 200; bytes32 public constant CROSS_CHAIN_SWAP_MESSAGE = keccak256("CROSS_CHAIN_SWAP"); address public uniswapV2RouterAddress; diff --git a/packages/protocol-contracts/contracts/Zeta.non-eth.sol b/packages/protocol-contracts/contracts/Zeta.non-eth.sol index 3e25a000..bd354bbf 100644 --- a/packages/protocol-contracts/contracts/Zeta.non-eth.sol +++ b/packages/protocol-contracts/contracts/Zeta.non-eth.sol @@ -5,7 +5,9 @@ import "@openzeppelin/contracts/token/ERC20/extensions/ERC20Burnable.sol"; import "./interfaces/ZetaErrors.sol"; -contract ZetaNonEth is ERC20Burnable, ZetaErrors { +import "./interfaces/ZetaNonEthInterface.sol"; + +contract ZetaNonEth is ZetaNonEthInterface, ERC20Burnable, ZetaErrors { address public connectorAddress; /** @@ -51,7 +53,7 @@ contract ZetaNonEth is ERC20Burnable, ZetaErrors { address mintee, uint256 value, bytes32 internalSendHash - ) external { + ) external override { /** * @dev Only Connector can mint. Minting requires burning the equivalent amount on another chain */ @@ -62,7 +64,7 @@ contract ZetaNonEth is ERC20Burnable, ZetaErrors { emit Minted(mintee, value, internalSendHash); } - function burnFrom(address account, uint256 amount) public override { + function burnFrom(address account, uint256 amount) public override(ZetaNonEthInterface, ERC20Burnable) { /** * @dev Only Connector can burn. */ diff --git a/packages/protocol-contracts/contracts/ZetaConnector.non-eth.sol b/packages/protocol-contracts/contracts/ZetaConnector.non-eth.sol index 6eeb6efa..9370a9d0 100644 --- a/packages/protocol-contracts/contracts/ZetaConnector.non-eth.sol +++ b/packages/protocol-contracts/contracts/ZetaConnector.non-eth.sol @@ -5,16 +5,7 @@ import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import "./ZetaConnector.base.sol"; import "./interfaces/ZetaInterfaces.sol"; - -interface ZetaToken is IERC20 { - function burnFrom(address account, uint256 amount) external; - - function mint( - address mintee, - uint256 value, - bytes32 internalSendHash - ) external; -} +import "./interfaces/ZetaNonEthInterface.sol"; contract ZetaConnectorNonEth is ZetaConnectorBase { uint256 public maxSupply = 2**256 - 1; @@ -27,7 +18,7 @@ contract ZetaConnectorNonEth is ZetaConnectorBase { ) ZetaConnectorBase(zetaTokenAddress_, tssAddress_, tssAddressUpdater_, pauserAddress_) {} function getLockedAmount() external view returns (uint256) { - return ZetaToken(zetaToken).balanceOf(address(this)); + return ZetaNonEthInterface(zetaToken).balanceOf(address(this)); } function setMaxSupply(uint256 maxSupply_) external onlyTssAddress { @@ -35,7 +26,7 @@ contract ZetaConnectorNonEth is ZetaConnectorBase { } function send(ZetaInterfaces.SendInput calldata input) external override whenNotPaused { - ZetaToken(zetaToken).burnFrom(msg.sender, input.zetaValueAndGas); + ZetaNonEthInterface(zetaToken).burnFrom(msg.sender, input.zetaValueAndGas); emit ZetaSent( tx.origin, @@ -57,8 +48,9 @@ contract ZetaConnectorNonEth is ZetaConnectorBase { bytes calldata message, bytes32 internalSendHash ) external override whenNotPaused onlyTssAddress { - if (zetaValueAndGas + ZetaToken(zetaToken).totalSupply() > maxSupply) revert ExceedsMaxSupply(maxSupply); - ZetaToken(zetaToken).mint(destinationAddress, zetaValueAndGas, internalSendHash); + if (zetaValueAndGas + ZetaNonEthInterface(zetaToken).totalSupply() > maxSupply) + revert ExceedsMaxSupply(maxSupply); + ZetaNonEthInterface(zetaToken).mint(destinationAddress, zetaValueAndGas, internalSendHash); if (message.length > 0) { ZetaReceiver(destinationAddress).onZetaMessage( @@ -91,8 +83,9 @@ contract ZetaConnectorNonEth is ZetaConnectorBase { bytes calldata message, bytes32 internalSendHash ) external override whenNotPaused onlyTssAddress { - if (zetaValueAndGas + ZetaToken(zetaToken).totalSupply() > maxSupply) revert ExceedsMaxSupply(maxSupply); - ZetaToken(zetaToken).mint(zetaTxSenderAddress, zetaValueAndGas, internalSendHash); + if (zetaValueAndGas + ZetaNonEthInterface(zetaToken).totalSupply() > maxSupply) + revert ExceedsMaxSupply(maxSupply); + ZetaNonEthInterface(zetaToken).mint(zetaTxSenderAddress, zetaValueAndGas, internalSendHash); if (message.length > 0) { ZetaReceiver(zetaTxSenderAddress).onZetaRevert( diff --git a/packages/protocol-contracts/contracts/ZetaInteractor.sol b/packages/protocol-contracts/contracts/ZetaInteractor.sol index ff6a7daf..273cd307 100644 --- a/packages/protocol-contracts/contracts/ZetaInteractor.sol +++ b/packages/protocol-contracts/contracts/ZetaInteractor.sol @@ -7,6 +7,7 @@ import "./interfaces/ZetaInterfaces.sol"; import "./interfaces/ZetaInteractorErrors.sol"; abstract contract ZetaInteractor is Ownable, ZetaInteractorErrors { + bytes32 constant ZERO_BYTES = keccak256(new bytes(0)); uint256 internal immutable currentChainId; ZetaConnector public connector; @@ -46,7 +47,7 @@ abstract contract ZetaInteractor is Ownable, ZetaInteractorErrors { * @dev Useful for contracts that inherit from this one */ function _isValidChainId(uint256 chainId) internal view returns (bool) { - return (keccak256(interactorsByChainId[chainId]) != keccak256(new bytes(0))); + return (keccak256(interactorsByChainId[chainId]) != ZERO_BYTES); } function setInteractorByChainId(uint256 destinationChainId, bytes calldata contractAddress) external onlyOwner { diff --git a/packages/protocol-contracts/contracts/ZetaTokenConsumerUniV2.strategy.sol b/packages/protocol-contracts/contracts/ZetaTokenConsumerUniV2.strategy.sol index 22592abc..51cb9840 100644 --- a/packages/protocol-contracts/contracts/ZetaTokenConsumerUniV2.strategy.sol +++ b/packages/protocol-contracts/contracts/ZetaTokenConsumerUniV2.strategy.sol @@ -20,7 +20,7 @@ interface ZetaTokenConsumerUniV2Errors { * @dev Uniswap V2 strategy for ZetaTokenConsumer */ contract ZetaTokenConsumerUniV2 is ZetaTokenConsumer, ZetaTokenConsumerUniV2Errors { - uint256 internal constant MAX_DEADLINE = 100; + uint256 internal constant MAX_DEADLINE = 200; address public uniswapV2RouterAddress; address internal immutable wETH; diff --git a/packages/protocol-contracts/contracts/ZetaTokenConsumerUniV3.strategy.sol b/packages/protocol-contracts/contracts/ZetaTokenConsumerUniV3.strategy.sol index f6e0a621..89340e68 100644 --- a/packages/protocol-contracts/contracts/ZetaTokenConsumerUniV3.strategy.sol +++ b/packages/protocol-contracts/contracts/ZetaTokenConsumerUniV3.strategy.sol @@ -15,6 +15,8 @@ interface ZetaTokenConsumerUniV3Errors { error ErrorGettingToken(); error ErrorSendingETH(); + + error RentrancyError(); } interface WETH9 { @@ -25,7 +27,7 @@ interface WETH9 { * @dev Uniswap V3 strategy for ZetaTokenConsumer */ contract ZetaTokenConsumerUniV3 is ZetaTokenConsumer, ZetaTokenConsumerUniV3Errors { - uint256 internal constant MAX_DEADLINE = 100; + uint256 internal constant MAX_DEADLINE = 200; uint24 public immutable zetaPoolFee; uint24 public immutable tokenPoolFee; @@ -36,6 +38,8 @@ contract ZetaTokenConsumerUniV3 is ZetaTokenConsumer, ZetaTokenConsumerUniV3Erro ISwapRouter public immutable uniswapV3Router; IQuoter public immutable quoter; + bool internal locked; + constructor( address zetaToken_, address uniswapV3Router_, @@ -59,6 +63,13 @@ contract ZetaTokenConsumerUniV3 is ZetaTokenConsumer, ZetaTokenConsumerUniV3Erro tokenPoolFee = tokenPoolFee_; } + modifier nonReentrant() { + if (locked) revert RentrancyError(); + locked = true; + _; + locked = false; + } + receive() external payable {} function getZetaFromEth(address destinationAddress, uint256 minAmountOut) @@ -143,10 +154,11 @@ contract ZetaTokenConsumerUniV3 is ZetaTokenConsumer, ZetaTokenConsumerUniV3Erro WETH9(WETH9Address).withdraw(amountOut); + emit ZetaExchangedForEth(zetaTokenAmount, amountOut); + (bool sent, ) = destinationAddress.call{value: amountOut}(""); if (!sent) revert ErrorSendingETH(); - emit ZetaExchangedForEth(zetaTokenAmount, amountOut); return amountOut; } @@ -155,7 +167,7 @@ contract ZetaTokenConsumerUniV3 is ZetaTokenConsumer, ZetaTokenConsumerUniV3Erro uint256 minAmountOut, address outputToken, uint256 zetaTokenAmount - ) external override returns (uint256) { + ) external override nonReentrant returns (uint256) { if (destinationAddress == address(0) || outputToken == address(0)) revert InvalidAddress(); if (zetaTokenAmount == 0) revert InputCantBeZero(); diff --git a/packages/protocol-contracts/contracts/interfaces/ZetaNonEthInterface.sol b/packages/protocol-contracts/contracts/interfaces/ZetaNonEthInterface.sol new file mode 100644 index 00000000..d4a93f1f --- /dev/null +++ b/packages/protocol-contracts/contracts/interfaces/ZetaNonEthInterface.sol @@ -0,0 +1,14 @@ +// SPDX-License-Identifier: MIT +pragma solidity 0.8.7; + +import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; + +interface ZetaNonEthInterface is IERC20 { + function burnFrom(address account, uint256 amount) external; + + function mint( + address mintee, + uint256 value, + bytes32 internalSendHash + ) external; +} From 3bf2e3f4457cf4c2ce76cc09a83a1f679ad01d99 Mon Sep 17 00:00:00 2001 From: Andres Martin Aiello <50411235+andresaiello@users.noreply.github.com> Date: Wed, 13 Jul 2022 14:21:59 -0300 Subject: [PATCH 025/115] Aaiello/zeta 790 implement veridise suggestions (#31) * Implement veridise audit suggestions * add interface * rename --- .../contracts/ZetaTokenConsumerUniV3.strategy.sol | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/protocol-contracts/contracts/ZetaTokenConsumerUniV3.strategy.sol b/packages/protocol-contracts/contracts/ZetaTokenConsumerUniV3.strategy.sol index 89340e68..94158b85 100644 --- a/packages/protocol-contracts/contracts/ZetaTokenConsumerUniV3.strategy.sol +++ b/packages/protocol-contracts/contracts/ZetaTokenConsumerUniV3.strategy.sol @@ -38,7 +38,7 @@ contract ZetaTokenConsumerUniV3 is ZetaTokenConsumer, ZetaTokenConsumerUniV3Erro ISwapRouter public immutable uniswapV3Router; IQuoter public immutable quoter; - bool internal locked; + bool internal _locked; constructor( address zetaToken_, @@ -64,10 +64,10 @@ contract ZetaTokenConsumerUniV3 is ZetaTokenConsumer, ZetaTokenConsumerUniV3Erro } modifier nonReentrant() { - if (locked) revert RentrancyError(); - locked = true; + if (_locked) revert RentrancyError(); + _locked = true; _; - locked = false; + _locked = false; } receive() external payable {} From 30cd3d21a06aaf608d1839cfba5a88b26b80b06c Mon Sep 17 00:00:00 2001 From: Andres Martin Aiello <50411235+andresaiello@users.noreply.github.com> Date: Thu, 14 Jul 2022 14:48:04 -0300 Subject: [PATCH 026/115] Implement veridise suggestions (#32) * Implement veridise audit suggestions * add interface * rename * add immutable --- .../contracts/ZetaConnector.base.sol | 2 +- .../contracts/ZetaInteractor.sol | 2 +- .../contracts/ZetaTokenConsumerUniV2.strategy.sol | 14 ++++++-------- .../contracts/ZetaTokenConsumerUniV3.strategy.sol | 4 ++-- 4 files changed, 10 insertions(+), 12 deletions(-) diff --git a/packages/protocol-contracts/contracts/ZetaConnector.base.sol b/packages/protocol-contracts/contracts/ZetaConnector.base.sol index 5a574ad2..24092f74 100644 --- a/packages/protocol-contracts/contracts/ZetaConnector.base.sol +++ b/packages/protocol-contracts/contracts/ZetaConnector.base.sol @@ -8,7 +8,7 @@ import "./interfaces/ConnectorErrors.sol"; import "./interfaces/ZetaInterfaces.sol"; contract ZetaConnectorBase is ConnectorErrors, Pausable { - address public zetaToken; + address public immutable zetaToken; address public pauserAddress; diff --git a/packages/protocol-contracts/contracts/ZetaInteractor.sol b/packages/protocol-contracts/contracts/ZetaInteractor.sol index 273cd307..4a9e0a8b 100644 --- a/packages/protocol-contracts/contracts/ZetaInteractor.sol +++ b/packages/protocol-contracts/contracts/ZetaInteractor.sol @@ -9,7 +9,7 @@ import "./interfaces/ZetaInteractorErrors.sol"; abstract contract ZetaInteractor is Ownable, ZetaInteractorErrors { bytes32 constant ZERO_BYTES = keccak256(new bytes(0)); uint256 internal immutable currentChainId; - ZetaConnector public connector; + ZetaConnector public immutable connector; /** * @dev Maps a chain id to its corresponding address of the MultiChainSwap contract diff --git a/packages/protocol-contracts/contracts/ZetaTokenConsumerUniV2.strategy.sol b/packages/protocol-contracts/contracts/ZetaTokenConsumerUniV2.strategy.sol index 51cb9840..e91a2f9a 100644 --- a/packages/protocol-contracts/contracts/ZetaTokenConsumerUniV2.strategy.sol +++ b/packages/protocol-contracts/contracts/ZetaTokenConsumerUniV2.strategy.sol @@ -22,19 +22,17 @@ interface ZetaTokenConsumerUniV2Errors { contract ZetaTokenConsumerUniV2 is ZetaTokenConsumer, ZetaTokenConsumerUniV2Errors { uint256 internal constant MAX_DEADLINE = 200; - address public uniswapV2RouterAddress; address internal immutable wETH; - address public zetaToken; + address public immutable zetaToken; - IUniswapV2Router02 internal uniswapV2Router; + IUniswapV2Router02 internal immutable uniswapV2Router; constructor(address zetaToken_, address uniswapV2Router_) { if (zetaToken_ == address(0) || uniswapV2Router_ == address(0)) revert InvalidAddress(); zetaToken = zetaToken_; - uniswapV2RouterAddress = uniswapV2Router_; uniswapV2Router = IUniswapV2Router02(uniswapV2Router_); - wETH = uniswapV2Router.WETH(); + wETH = IUniswapV2Router02(uniswapV2Router_).WETH(); } function getZetaFromEth(address destinationAddress, uint256 minAmountOut) @@ -74,7 +72,7 @@ contract ZetaTokenConsumerUniV2 is ZetaTokenConsumer, ZetaTokenConsumerUniV2Erro bool success = IERC20(inputToken).transferFrom(msg.sender, address(this), inputTokenAmount); if (!success) revert ErrorGettingZeta(); - success = IERC20(inputToken).approve(uniswapV2RouterAddress, inputTokenAmount); + success = IERC20(inputToken).approve(address(uniswapV2Router), inputTokenAmount); if (!success) revert ErrorGettingZeta(); address[] memory path; @@ -112,7 +110,7 @@ contract ZetaTokenConsumerUniV2 is ZetaTokenConsumer, ZetaTokenConsumerUniV2Erro bool success = IERC20(zetaToken).transferFrom(msg.sender, address(this), zetaTokenAmount); if (!success) revert ErrorExchangingZeta(); - success = IERC20(zetaToken).approve(uniswapV2RouterAddress, zetaTokenAmount); + success = IERC20(zetaToken).approve(address(uniswapV2Router), zetaTokenAmount); if (!success) revert ErrorExchangingZeta(); address[] memory path = new address[](2); @@ -144,7 +142,7 @@ contract ZetaTokenConsumerUniV2 is ZetaTokenConsumer, ZetaTokenConsumerUniV2Erro bool success = IERC20(zetaToken).transferFrom(msg.sender, address(this), zetaTokenAmount); if (!success) revert ErrorExchangingZeta(); - success = IERC20(zetaToken).approve(uniswapV2RouterAddress, zetaTokenAmount); + success = IERC20(zetaToken).approve(address(uniswapV2Router), zetaTokenAmount); if (!success) revert ErrorExchangingZeta(); address[] memory path; diff --git a/packages/protocol-contracts/contracts/ZetaTokenConsumerUniV3.strategy.sol b/packages/protocol-contracts/contracts/ZetaTokenConsumerUniV3.strategy.sol index 94158b85..705ef7c6 100644 --- a/packages/protocol-contracts/contracts/ZetaTokenConsumerUniV3.strategy.sol +++ b/packages/protocol-contracts/contracts/ZetaTokenConsumerUniV3.strategy.sol @@ -16,7 +16,7 @@ interface ZetaTokenConsumerUniV3Errors { error ErrorSendingETH(); - error RentrancyError(); + error ReentrancyError(); } interface WETH9 { @@ -64,7 +64,7 @@ contract ZetaTokenConsumerUniV3 is ZetaTokenConsumer, ZetaTokenConsumerUniV3Erro } modifier nonReentrant() { - if (_locked) revert RentrancyError(); + if (_locked) revert ReentrancyError(); _locked = true; _; _locked = false; From be7898db9519ebb38a474b36eff4df176bffd979 Mon Sep 17 00:00:00 2001 From: Andres Martin Aiello <50411235+andresaiello@users.noreply.github.com> Date: Mon, 18 Jul 2022 15:09:09 -0300 Subject: [PATCH 027/115] Implement PeckShield suggestions (#33) implement PeckShield suggestions --- .../ZetaTokenConsumerUniV2.strategy.sol | 24 +++++++------------ .../ZetaTokenConsumerUniV3.strategy.sol | 22 +++++++---------- 2 files changed, 16 insertions(+), 30 deletions(-) diff --git a/packages/protocol-contracts/contracts/ZetaTokenConsumerUniV2.strategy.sol b/packages/protocol-contracts/contracts/ZetaTokenConsumerUniV2.strategy.sol index e91a2f9a..fa3c96ca 100644 --- a/packages/protocol-contracts/contracts/ZetaTokenConsumerUniV2.strategy.sol +++ b/packages/protocol-contracts/contracts/ZetaTokenConsumerUniV2.strategy.sol @@ -2,6 +2,7 @@ pragma solidity 0.8.7; import "@openzeppelin/contracts/interfaces/IERC20.sol"; +import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol"; import "@uniswap/v2-periphery/contracts/interfaces/IUniswapV2Router02.sol"; import "./interfaces/ZetaInterfaces.sol"; @@ -10,16 +11,13 @@ interface ZetaTokenConsumerUniV2Errors { error InvalidAddress(); error InputCantBeZero(); - - error ErrorGettingZeta(); - - error ErrorExchangingZeta(); } /** * @dev Uniswap V2 strategy for ZetaTokenConsumer */ contract ZetaTokenConsumerUniV2 is ZetaTokenConsumer, ZetaTokenConsumerUniV2Errors { + using SafeERC20 for IERC20; uint256 internal constant MAX_DEADLINE = 200; address internal immutable wETH; @@ -70,10 +68,8 @@ contract ZetaTokenConsumerUniV2 is ZetaTokenConsumer, ZetaTokenConsumerUniV2Erro if (destinationAddress == address(0) || inputToken == address(0)) revert InvalidAddress(); if (inputTokenAmount == 0) revert InputCantBeZero(); - bool success = IERC20(inputToken).transferFrom(msg.sender, address(this), inputTokenAmount); - if (!success) revert ErrorGettingZeta(); - success = IERC20(inputToken).approve(address(uniswapV2Router), inputTokenAmount); - if (!success) revert ErrorGettingZeta(); + IERC20(inputToken).safeTransferFrom(msg.sender, address(this), inputTokenAmount); + IERC20(inputToken).safeApprove(address(uniswapV2Router), inputTokenAmount); address[] memory path; if (inputToken == wETH) { @@ -108,10 +104,8 @@ contract ZetaTokenConsumerUniV2 is ZetaTokenConsumer, ZetaTokenConsumerUniV2Erro if (destinationAddress == address(0)) revert InvalidAddress(); if (zetaTokenAmount == 0) revert InputCantBeZero(); - bool success = IERC20(zetaToken).transferFrom(msg.sender, address(this), zetaTokenAmount); - if (!success) revert ErrorExchangingZeta(); - success = IERC20(zetaToken).approve(address(uniswapV2Router), zetaTokenAmount); - if (!success) revert ErrorExchangingZeta(); + IERC20(zetaToken).safeTransferFrom(msg.sender, address(this), zetaTokenAmount); + IERC20(zetaToken).safeApprove(address(uniswapV2Router), zetaTokenAmount); address[] memory path = new address[](2); path[0] = zetaToken; @@ -140,10 +134,8 @@ contract ZetaTokenConsumerUniV2 is ZetaTokenConsumer, ZetaTokenConsumerUniV2Erro if (destinationAddress == address(0) || outputToken == address(0)) revert InvalidAddress(); if (zetaTokenAmount == 0) revert InputCantBeZero(); - bool success = IERC20(zetaToken).transferFrom(msg.sender, address(this), zetaTokenAmount); - if (!success) revert ErrorExchangingZeta(); - success = IERC20(zetaToken).approve(address(uniswapV2Router), zetaTokenAmount); - if (!success) revert ErrorExchangingZeta(); + IERC20(zetaToken).safeTransferFrom(msg.sender, address(this), zetaTokenAmount); + IERC20(zetaToken).safeApprove(address(uniswapV2Router), zetaTokenAmount); address[] memory path; if (outputToken == wETH) { diff --git a/packages/protocol-contracts/contracts/ZetaTokenConsumerUniV3.strategy.sol b/packages/protocol-contracts/contracts/ZetaTokenConsumerUniV3.strategy.sol index 705ef7c6..57c75420 100644 --- a/packages/protocol-contracts/contracts/ZetaTokenConsumerUniV3.strategy.sol +++ b/packages/protocol-contracts/contracts/ZetaTokenConsumerUniV3.strategy.sol @@ -2,6 +2,7 @@ pragma solidity 0.8.7; import "@openzeppelin/contracts/interfaces/IERC20.sol"; +import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol"; import "@uniswap/v3-periphery/contracts/interfaces/ISwapRouter.sol"; import "@uniswap/v3-periphery/contracts/interfaces/IQuoter.sol"; @@ -12,8 +13,6 @@ interface ZetaTokenConsumerUniV3Errors { error InputCantBeZero(); - error ErrorGettingToken(); - error ErrorSendingETH(); error ReentrancyError(); @@ -27,6 +26,7 @@ interface WETH9 { * @dev Uniswap V3 strategy for ZetaTokenConsumer */ contract ZetaTokenConsumerUniV3 is ZetaTokenConsumer, ZetaTokenConsumerUniV3Errors { + using SafeERC20 for IERC20; uint256 internal constant MAX_DEADLINE = 200; uint24 public immutable zetaPoolFee; @@ -107,10 +107,8 @@ contract ZetaTokenConsumerUniV3 is ZetaTokenConsumer, ZetaTokenConsumerUniV3Erro if (destinationAddress == address(0) || inputToken == address(0)) revert InvalidAddress(); if (inputTokenAmount == 0) revert InputCantBeZero(); - bool success = IERC20(inputToken).transferFrom(msg.sender, address(this), inputTokenAmount); - if (!success) revert ErrorGettingToken(); - success = IERC20(inputToken).approve(address(uniswapV3Router), inputTokenAmount); - if (!success) revert ErrorGettingToken(); + IERC20(inputToken).safeTransferFrom(msg.sender, address(this), inputTokenAmount); + IERC20(inputToken).safeApprove(address(uniswapV3Router), inputTokenAmount); ISwapRouter.ExactInputParams memory params = ISwapRouter.ExactInputParams({ deadline: block.timestamp + MAX_DEADLINE, @@ -134,10 +132,8 @@ contract ZetaTokenConsumerUniV3 is ZetaTokenConsumer, ZetaTokenConsumerUniV3Erro if (destinationAddress == address(0)) revert InvalidAddress(); if (zetaTokenAmount == 0) revert InputCantBeZero(); - bool success = IERC20(zetaToken).transferFrom(msg.sender, address(this), zetaTokenAmount); - if (!success) revert ErrorGettingToken(); - success = IERC20(zetaToken).approve(address(uniswapV3Router), zetaTokenAmount); - if (!success) revert ErrorGettingToken(); + IERC20(zetaToken).safeTransferFrom(msg.sender, address(this), zetaTokenAmount); + IERC20(zetaToken).safeApprove(address(uniswapV3Router), zetaTokenAmount); ISwapRouter.ExactInputSingleParams memory params = ISwapRouter.ExactInputSingleParams({ deadline: block.timestamp + MAX_DEADLINE, @@ -171,10 +167,8 @@ contract ZetaTokenConsumerUniV3 is ZetaTokenConsumer, ZetaTokenConsumerUniV3Erro if (destinationAddress == address(0) || outputToken == address(0)) revert InvalidAddress(); if (zetaTokenAmount == 0) revert InputCantBeZero(); - bool success = IERC20(zetaToken).transferFrom(msg.sender, address(this), zetaTokenAmount); - if (!success) revert ErrorGettingToken(); - success = IERC20(zetaToken).approve(address(uniswapV3Router), zetaTokenAmount); - if (!success) revert ErrorGettingToken(); + IERC20(zetaToken).safeTransferFrom(msg.sender, address(this), zetaTokenAmount); + IERC20(zetaToken).safeApprove(address(uniswapV3Router), zetaTokenAmount); ISwapRouter.ExactInputParams memory params = ISwapRouter.ExactInputParams({ deadline: block.timestamp + MAX_DEADLINE, From 53ca9cd4343fc5bc256c5c31c44e04321902192c Mon Sep 17 00:00:00 2001 From: Andres Martin Aiello <50411235+andresaiello@users.noreply.github.com> Date: Wed, 20 Jul 2022 18:28:57 -0300 Subject: [PATCH 028/115] Deploy to deterministic addresses (#28) * Deploy to deterministic addresses * deploy with leading zeros * update labels * refactor * update comment * remove unused * deploy immutableCreate2Factory --- packages/addresses/src/addresses.helpers.ts | 2 + .../src/addresses/addresses.athens.json | 14 +- .../contracts/ImmutableCreate2Factory.sol | 194 ++++++++++++++++++ packages/protocol-contracts/hardhat.config.ts | 1 + .../ImmutableCreate2Factory.helpers.ts | 81 ++++++++ .../lib/contracts.helpers.ts | 12 ++ .../deploy-immutable-create2-factory.ts | 26 +++ .../test/ImmutableCreate2Factory.spec.ts | 104 ++++++++++ 8 files changed, 429 insertions(+), 5 deletions(-) create mode 100644 packages/protocol-contracts/contracts/ImmutableCreate2Factory.sol create mode 100644 packages/protocol-contracts/lib/ImmutableCreate2Factory/ImmutableCreate2Factory.helpers.ts create mode 100644 packages/protocol-contracts/scripts/deploy-immutable-create2-factory.ts create mode 100644 packages/protocol-contracts/test/ImmutableCreate2Factory.spec.ts diff --git a/packages/addresses/src/addresses.helpers.ts b/packages/addresses/src/addresses.helpers.ts index 1fd2f737..1e97be04 100644 --- a/packages/addresses/src/addresses.helpers.ts +++ b/packages/addresses/src/addresses.helpers.ts @@ -10,6 +10,7 @@ export type ZetaAddress = | "crossChainCounter" | "crossChainNft" | "dai" + | "immutableCreate2Factory" | "multiChainSwap" | "multiChainSwapZetaConnector" | "multiChainValue" @@ -30,6 +31,7 @@ const zetaAddresses: Record = { crossChainCounter: true, crossChainNft: true, dai: true, + immutableCreate2Factory: true, multiChainSwap: true, multiChainSwapZetaConnector: true, multiChainValue: true, diff --git a/packages/addresses/src/addresses/addresses.athens.json b/packages/addresses/src/addresses/addresses.athens.json index c23c4afd..b5387158 100644 --- a/packages/addresses/src/addresses/addresses.athens.json +++ b/packages/addresses/src/addresses/addresses.athens.json @@ -15,7 +15,8 @@ "usdc": "", "weth9": "", "zetaToken": "0xad7d0795ffdf21f20c89240D540487B1445c7D03", - "zetaTokenConsumerUniV2": "" + "zetaTokenConsumerUniV2": "", + "immutableCreate2Factory": "0x095a03c6a68137fE9a566bBc3e552F299d8b886d" }, "goerli": { "connector": "0x0B16Fc7e2D627d82255ba21e53Cf6c11B5186046", @@ -33,7 +34,8 @@ "usdc": "", "weth9": "", "zetaToken": "0x011a76081989aDA18d0a16bf3fee2C6c3BD07B07", - "zetaTokenConsumerUniV2": "" + "zetaTokenConsumerUniV2": "", + "immutableCreate2Factory": "0x095a03c6a68137fE9a566bBc3e552F299d8b886d" }, "polygon-mumbai": { "connector": "0xa5467B39Ad9f51DEb6b30Abfa9828531dCBA99A9", @@ -50,7 +52,8 @@ "usdc": "", "weth9": "", "zetaToken": "0x84383be9B3Eda50ABD5899936D4963505d449de2", - "zetaTokenConsumerUniV2": "" + "zetaTokenConsumerUniV2": "", + "immutableCreate2Factory": "0x095a03c6a68137fE9a566bBc3e552F299d8b886d" }, "ropsten": { "connector": "0x91Ea4f79D39DA890B03E965111953d0494936072", @@ -67,6 +70,7 @@ "usdc": "", "weth9": "", "zetaToken": "0x3357A3bd90A001282bA2152D6c0a2372c8E0e28E", - "zetaTokenConsumerUniV2": "" + "zetaTokenConsumerUniV2": "", + "immutableCreate2Factory": "0x095a03c6a68137fE9a566bBc3e552F299d8b886d" } -} +} \ No newline at end of file diff --git a/packages/protocol-contracts/contracts/ImmutableCreate2Factory.sol b/packages/protocol-contracts/contracts/ImmutableCreate2Factory.sol new file mode 100644 index 00000000..4d639e29 --- /dev/null +++ b/packages/protocol-contracts/contracts/ImmutableCreate2Factory.sol @@ -0,0 +1,194 @@ +pragma solidity 0.5.10; // optimization enabled, 99999 runs, evm: petersburg + +/** + * @title Immutable Create2 Contract Factory + * @author 0age + * @notice This contract provides a safeCreate2 function that takes a salt value + * and a block of initialization code as arguments and passes them into inline + * assembly. The contract prevents redeploys by maintaining a mapping of all + * contracts that have already been deployed, and prevents frontrunning or other + * collisions by requiring that the first 20 bytes of the salt are equal to the + * address of the caller (this can be bypassed by setting the first 20 bytes to + * the null address). There is also a view function that computes the address of + * the contract that will be created when submitting a given salt or nonce along + * with a given block of initialization code. + * @dev This contract has not yet been fully tested or audited - proceed with + * caution and please share any exploits or optimizations you discover. + */ +contract ImmutableCreate2Factory { + // mapping to track which addresses have already been deployed. + mapping(address => bool) private _deployed; + + /** + * @dev Create a contract using CREATE2 by submitting a given salt or nonce + * along with the initialization code for the contract. Note that the first 20 + * bytes of the salt must match those of the calling address, which prevents + * contract creation events from being submitted by unintended parties. + * @param salt bytes32 The nonce that will be passed into the CREATE2 call. + * @param initializationCode bytes The initialization code that will be passed + * into the CREATE2 call. + * @return Address of the contract that will be created, or the null address + * if a contract already exists at that address. + */ + function safeCreate2(bytes32 salt, bytes calldata initializationCode) + external + payable + containsCaller(salt) + returns (address deploymentAddress) + { + // move the initialization code from calldata to memory. + bytes memory initCode = initializationCode; + + // determine the target address for contract deployment. + address targetDeploymentAddress = address( + uint160( // downcast to match the address type. + uint256( // convert to uint to truncate upper digits. + keccak256( // compute the CREATE2 hash using 4 inputs. + abi.encodePacked( // pack all inputs to the hash together. + hex"ff", // start with 0xff to distinguish from RLP. + address(this), // this contract will be the caller. + salt, // pass in the supplied salt value. + keccak256(abi.encodePacked(initCode)) // pass in the hash of initialization code. + ) + ) + ) + ) + ); + + // ensure that a contract hasn't been previously deployed to target address. + require(!_deployed[targetDeploymentAddress], "Invalid contract creation - contract has already been deployed."); + + // using inline assembly: load data and length of data, then call CREATE2. + assembly { + // solhint-disable-line + let encoded_data := add(0x20, initCode) // load initialization code. + let encoded_size := mload(initCode) // load the init code's length. + deploymentAddress := create2( + // call CREATE2 with 4 arguments. + callvalue, // forward any attached value. + encoded_data, // pass in initialization code. + encoded_size, // pass in init code's length. + salt // pass in the salt value. + ) + } + + // check address against target to ensure that deployment was successful. + require( + deploymentAddress == targetDeploymentAddress, + "Failed to deploy contract using provided salt and initialization code." + ); + + // record the deployment of the contract to prevent redeploys. + _deployed[deploymentAddress] = true; + } + + /** + * @dev Compute the address of the contract that will be created when + * submitting a given salt or nonce to the contract along with the contract's + * initialization code. The CREATE2 address is computed in accordance with + * EIP-1014, and adheres to the formula therein of + * `keccak256( 0xff ++ address ++ salt ++ keccak256(init_code)))[12:]` when + * performing the computation. The computed address is then checked for any + * existing contract code - if so, the null address will be returned instead. + * @param salt bytes32 The nonce passed into the CREATE2 address calculation. + * @param initCode bytes The contract initialization code to be used. + * that will be passed into the CREATE2 address calculation. + * @return Address of the contract that will be created, or the null address + * if a contract has already been deployed to that address. + */ + function findCreate2Address(bytes32 salt, bytes calldata initCode) + external + view + returns (address deploymentAddress) + { + // determine the address where the contract will be deployed. + deploymentAddress = address( + uint160( // downcast to match the address type. + uint256( // convert to uint to truncate upper digits. + keccak256( // compute the CREATE2 hash using 4 inputs. + abi.encodePacked( // pack all inputs to the hash together. + hex"ff", // start with 0xff to distinguish from RLP. + address(this), // this contract will be the caller. + salt, // pass in the supplied salt value. + keccak256(abi.encodePacked(initCode)) // pass in the hash of initialization code. + ) + ) + ) + ) + ); + + // return null address to signify failure if contract has been deployed. + if (_deployed[deploymentAddress]) { + return address(0); + } + } + + /** + * @dev Compute the address of the contract that will be created when + * submitting a given salt or nonce to the contract along with the keccak256 + * hash of the contract's initialization code. The CREATE2 address is computed + * in accordance with EIP-1014, and adheres to the formula therein of + * `keccak256( 0xff ++ address ++ salt ++ keccak256(init_code)))[12:]` when + * performing the computation. The computed address is then checked for any + * existing contract code - if so, the null address will be returned instead. + * @param salt bytes32 The nonce passed into the CREATE2 address calculation. + * @param initCodeHash bytes32 The keccak256 hash of the initialization code + * that will be passed into the CREATE2 address calculation. + * @return Address of the contract that will be created, or the null address + * if a contract has already been deployed to that address. + */ + function findCreate2AddressViaHash(bytes32 salt, bytes32 initCodeHash) + external + view + returns (address deploymentAddress) + { + // determine the address where the contract will be deployed. + deploymentAddress = address( + uint160( // downcast to match the address type. + uint256( // convert to uint to truncate upper digits. + keccak256( // compute the CREATE2 hash using 4 inputs. + abi.encodePacked( // pack all inputs to the hash together. + hex"ff", // start with 0xff to distinguish from RLP. + address(this), // this contract will be the caller. + salt, // pass in the supplied salt value. + initCodeHash // pass in the hash of initialization code. + ) + ) + ) + ) + ); + + // return null address to signify failure if contract has been deployed. + if (_deployed[deploymentAddress]) { + return address(0); + } + } + + /** + * @dev Determine if a contract has already been deployed by the factory to a + * given address. + * @param deploymentAddress address The contract address to check. + * @return True if the contract has been deployed, false otherwise. + */ + function hasBeenDeployed(address deploymentAddress) external view returns (bool) { + // determine if a contract has been deployed to the provided address. + return _deployed[deploymentAddress]; + } + + /** + * @dev Modifier to ensure that the first 20 bytes of a submitted salt match + * those of the calling account. This provides protection against the salt + * being stolen by frontrunners or other attackers. The protection can also be + * bypassed if desired by setting each of the first 20 bytes to zero. + * @param salt bytes32 The salt value to check against the calling address. + */ + modifier containsCaller(bytes32 salt) { + // prevent contract submissions from being stolen from tx.pool by requiring + // that the first 20 bytes of the submitted salt match msg.sender. + require( + (address(bytes20(salt)) == msg.sender) || (bytes20(salt) == bytes20(0)), + "Invalid salt - first 20 bytes of the salt must match calling address." + ); + _; + } +} diff --git a/packages/protocol-contracts/hardhat.config.ts b/packages/protocol-contracts/hardhat.config.ts index 5d95e45e..65f14a7d 100644 --- a/packages/protocol-contracts/hardhat.config.ts +++ b/packages/protocol-contracts/hardhat.config.ts @@ -21,6 +21,7 @@ const config: HardhatUserConfig = { }, solidity: { compilers: [ + { version: "0.5.10" /** For create2 factory */ }, { version: "0.6.6" /** For uniswap v2 */ }, { version: "0.7.6" /** For uniswap v3 */ }, { version: "0.8.7" }, diff --git a/packages/protocol-contracts/lib/ImmutableCreate2Factory/ImmutableCreate2Factory.helpers.ts b/packages/protocol-contracts/lib/ImmutableCreate2Factory/ImmutableCreate2Factory.helpers.ts new file mode 100644 index 00000000..19fd3fd0 --- /dev/null +++ b/packages/protocol-contracts/lib/ImmutableCreate2Factory/ImmutableCreate2Factory.helpers.ts @@ -0,0 +1,81 @@ +import { Provider, TransactionReceipt } from "@ethersproject/providers"; +import assert from "assert"; +import { ethers, Signer } from "ethers"; + +import { ImmutableCreate2Factory__factory } from "../../typechain-types"; + +export const buildBytecode = (constructorTypes: any[], constructorArgs: any[], contractBytecode: string) => + `${contractBytecode}${encodeParams(constructorTypes, constructorArgs).slice(2)}`; + +export const buildCreate2Address = (saltHex: string, byteCode: string, factoryAddress: string) => { + const payload = ethers.utils.keccak256( + `0x${["ff", factoryAddress, saltHex, ethers.utils.keccak256(byteCode)].map((x) => x.replace(/0x/, "")).join("")}` + ); + + return `0x${payload.slice(-40)}`.toLowerCase(); +}; + +export const numberToUint256 = (value: number) => { + const hex = value.toString(16); + return `0x${"0".repeat(64 - hex.length)}${hex}`; +}; + +export const saltToHex = (salt: string, signerAddress: string) => { + let salthex = ethers.utils.formatBytes32String(salt); + return `${signerAddress}${salthex.slice(2)}`.substring(0, salthex.length); +}; + +export const encodeParam = (dataType: any, data: any) => { + const abiCoder = ethers.utils.defaultAbiCoder; + return abiCoder.encode([dataType], [data]); +}; + +export const encodeParams = (dataTypes: any[], data: any[]) => { + const abiCoder = ethers.utils.defaultAbiCoder; + return abiCoder.encode(dataTypes, data); +}; + +export async function deployContractToAddress({ + factoryAddress, + salt, + contractBytecode, + constructorTypes = [] as string[], + constructorArgs = [] as any[], + signer, +}: { + constructorArgs?: any[]; + constructorTypes?: string[]; + contractBytecode: string; + factoryAddress: string; + salt: string; + signer: Signer; +}) { + const factory = ImmutableCreate2Factory__factory.connect(factoryAddress, signer); + + const bytecode = buildBytecode(constructorTypes, constructorArgs, contractBytecode); + + const computedAddr = await factory.findCreate2Address(salt, bytecode); + + const tx = await factory.safeCreate2(salt, bytecode, { + gasLimit: 6000000, + }); + const result = await tx.wait(); + + const addr = result.logs[0].address; + + assert.strictEqual(addr, computedAddr); + + return { + address: computedAddr as string, + receipt: result as TransactionReceipt, + txHash: result.transactionHash as string, + }; +} + +/** + * Determines if there's a contract deployed on the provided address. + */ +export async function isDeployed(address: string, provider: Provider) { + const code = await provider.getCode(address); + return code.slice(2).length > 0; +} diff --git a/packages/protocol-contracts/lib/contracts.helpers.ts b/packages/protocol-contracts/lib/contracts.helpers.ts index 38e67f48..9f449539 100644 --- a/packages/protocol-contracts/lib/contracts.helpers.ts +++ b/packages/protocol-contracts/lib/contracts.helpers.ts @@ -2,6 +2,8 @@ import { BaseContract, ContractFactory } from "ethers"; import { ethers } from "hardhat"; import { + ImmutableCreate2Factory, + ImmutableCreate2Factory__factory, ZetaConnectorBase, ZetaConnectorBase__factory as ZetaConnectorBaseFactory, ZetaConnectorEth, @@ -89,6 +91,16 @@ export const deployZetaNonEth = async ({ args }: { args: Parameters { + const Factory = (await ethers.getContractFactory("ImmutableCreate2Factory")) as ImmutableCreate2Factory__factory; + + const ImmutableCreate2FactoryContract = (await Factory.deploy()) as ImmutableCreate2Factory; + + await ImmutableCreate2FactoryContract.deployed(); + + return ImmutableCreate2FactoryContract; +}; + export const getZetaConnectorEth = async (params: GetContractParams) => getContract({ contractName: "ZetaConnectorEth", diff --git a/packages/protocol-contracts/scripts/deploy-immutable-create2-factory.ts b/packages/protocol-contracts/scripts/deploy-immutable-create2-factory.ts new file mode 100644 index 00000000..e834232e --- /dev/null +++ b/packages/protocol-contracts/scripts/deploy-immutable-create2-factory.ts @@ -0,0 +1,26 @@ +import { isNetworkName, saveAddress } from "@zetachain/addresses"; +import { network } from "hardhat"; + +import { deployImmutableCreate2Factory as deploy } from "../lib/contracts.helpers"; + +export async function deployImmutableCreate2Factory() { + if (!isNetworkName(network.name)) { + throw new Error(`network.name: ${network.name} isn't supported.`); + } + + console.log(`Deploying ImmutableCreate2Factory to ${network.name}`); + + const contract = await deploy(); + + saveAddress("immutableCreate2Factory", contract.address); + console.log("Deployed ImmutableCreate2Factory. Address:", contract.address); +} + +if (!process.env.EXECUTE_PROGRAMMATICALLY) { + deployImmutableCreate2Factory() + .then(() => process.exit(0)) + .catch((error) => { + console.error(error); + process.exit(1); + }); +} diff --git a/packages/protocol-contracts/test/ImmutableCreate2Factory.spec.ts b/packages/protocol-contracts/test/ImmutableCreate2Factory.spec.ts new file mode 100644 index 00000000..f547eda1 --- /dev/null +++ b/packages/protocol-contracts/test/ImmutableCreate2Factory.spec.ts @@ -0,0 +1,104 @@ +import { SignerWithAddress } from "@nomiclabs/hardhat-ethers/signers"; +import chai, { expect } from "chai"; +import { parseEther } from "ethers/lib/utils"; +import { ethers } from "hardhat"; + +import { + buildBytecode, + buildCreate2Address, + deployContractToAddress, + isDeployed, + saltToHex, +} from "../lib/ImmutableCreate2Factory/ImmutableCreate2Factory.helpers"; +import { + IERC20__factory, + ImmutableCreate2Factory, + ImmutableCreate2Factory__factory, + ZetaEth__factory, +} from "../typechain-types"; + +chai.should(); + +describe("Deterministic deployment tests", () => { + let immutableCreate2: ImmutableCreate2Factory; + + let accounts: SignerWithAddress[]; + let signer: SignerWithAddress; + + beforeEach(async () => { + accounts = await ethers.getSigners(); + [signer] = accounts; + + const immutableCreate2Factory = new ImmutableCreate2Factory__factory(signer); + immutableCreate2 = await immutableCreate2Factory.deploy(); + }); + + describe("Deploy zeta token with deterministic deployment", () => { + it("Should deploy a contract", async () => { + const salthex = saltToHex("hola", signer.address); + const constructorTypes = ["uint256"]; + const constructorArgs = ["2100000000"]; + const contractBytecode = ZetaEth__factory.bytecode; + + const bytecode = buildBytecode(constructorTypes, constructorArgs, contractBytecode); + const expectedAddress = await immutableCreate2.findCreate2Address(salthex, bytecode); + + // Deploy contract + const { address } = await deployContractToAddress({ + constructorArgs: constructorArgs, + constructorTypes: constructorTypes, + contractBytecode: ZetaEth__factory.bytecode, + factoryAddress: immutableCreate2.address, + salt: salthex, + signer: signer, + }); + + expect(address).to.be.eq(expectedAddress); + + // Query if contract deployed at address + const success = await isDeployed(address, ethers.provider); + expect(success).to.be.true; + + const token = IERC20__factory.connect(address, signer); + const totalSup = await token.totalSupply(); + expect(totalSup.toString()).to.be.eq(parseEther(constructorArgs[0])); + }); + }); + + it("Should deploy with leading zeros", async () => { + let saltStr = "0"; + + let minAddress = "0xfffffffffff"; + let minAddressSalt = ""; + for (let i = 0; i < 300; i++) { + const salthex = saltToHex(saltStr, signer.address); + const constructorTypes = ["uint256"]; + const constructorArgs = ["2100000000"]; + const contractBytecode = ZetaEth__factory.bytecode; + + const bytecode = buildBytecode(constructorTypes, constructorArgs, contractBytecode); + const expectedAddress = buildCreate2Address(salthex, bytecode, immutableCreate2.address); + if (expectedAddress < minAddress) { + minAddress = expectedAddress; + minAddressSalt = saltStr; + } + saltStr = i.toString(); + } + + expect(minAddress.substring(0, 4)).to.be.eq("0x00"); + }); + + it("Should generate same address offchain and onchain", async () => { + let saltStr = "0"; + + const salthex = saltToHex(saltStr, signer.address); + const constructorTypes = ["uint256"]; + const constructorArgs = ["2100000000"]; + const contractBytecode = ZetaEth__factory.bytecode; + + const bytecode = buildBytecode(constructorTypes, constructorArgs, contractBytecode); + const expectedAddress = await immutableCreate2.findCreate2Address(salthex, bytecode); + const expectedAddressOffchain = buildCreate2Address(salthex, bytecode, immutableCreate2.address); + expect(expectedAddress.toLocaleLowerCase()).to.be.eq(expectedAddressOffchain); + }); +}); From 07ca732a1234aeefad5c693600cbb926a900cff4 Mon Sep 17 00:00:00 2001 From: Andres Martin Aiello <50411235+andresaiello@users.noreply.github.com> Date: Thu, 21 Jul 2022 14:07:15 -0300 Subject: [PATCH 029/115] Add changeset to publish on npm (#29) * Add changeset to publish on npm * add npm ignore * suggestions --- .changeset/config.json | 11 +++++++ .github/workflows/release.yml | 38 ++++++++++++++++++++++++ package.json | 5 +++- packages/addresses/package.json | 6 ++++ packages/example-contracts/package.json | 6 ++++ packages/protocol-contracts/.npmignore | 20 +++++++++++++ packages/protocol-contracts/package.json | 7 ++++- 7 files changed, 91 insertions(+), 2 deletions(-) create mode 100644 .changeset/config.json create mode 100644 .github/workflows/release.yml create mode 100644 packages/protocol-contracts/.npmignore diff --git a/.changeset/config.json b/.changeset/config.json new file mode 100644 index 00000000..e2e93b35 --- /dev/null +++ b/.changeset/config.json @@ -0,0 +1,11 @@ +{ + "$schema": "https://unpkg.com/@changesets/config@2.0.1/schema.json", + "changelog": "@changesets/cli/changelog", + "commit": false, + "fixed": [], + "linked": [], + "access": "restricted", + "baseBranch": "main", + "updateInternalDependencies": "patch", + "ignore": [] +} \ No newline at end of file diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 00000000..d8a94b67 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,38 @@ +name: Release + +on: + push: + branches: + - main + +concurrency: ${{ github.workflow }}-${{ github.ref }} + +jobs: + release: + name: Release + runs-on: ubuntu-latest + steps: + - name: Checkout Repo + uses: actions/checkout@v2 + + - name: Setup Node.js 12.x + uses: actions/setup-node@v2 + with: + node-version: 12.x + + - name: Install Dependencies + run: yarn + + - name: Create Release Pull Request or Publish to npm + id: changesets + uses: changesets/action@v1 + with: + # This expects you to have a script called g:release which does a build for your packages and calls changeset publish + publish: yarn g:release + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + NPM_TOKEN: ${{ secrets.NPM_TOKEN }} + + #- name: Send a Slack notification if a publish happens + # if: steps.changesets.outputs.published == 'true' + # run: my-slack-bot send-notification --message "A new version of ${GITHUB_REPOSITORY} was published!" diff --git a/package.json b/package.json index aacf17d8..c9021750 100644 --- a/package.json +++ b/package.json @@ -21,9 +21,12 @@ "lint:fix": "npx eslint . --ext .js,.ts --fix", "lint": "npx eslint . --ext .js,.ts", "slither": "npx ts-node ./scripts/slither.ts", - "test": "yarn workspaces foreach -ptv run test" + "test": "yarn workspaces foreach -ptv run test", + "g:changeset": "changeset", + "g:release": "yarn changeset publish" }, "devDependencies": { + "@changesets/cli": "^2.23.1", "@nomiclabs/hardhat-ethers": "^2.0.5", "@nomiclabs/hardhat-etherscan": "3.0.3", "@nomiclabs/hardhat-waffle": "^2.0.3", diff --git a/packages/addresses/package.json b/packages/addresses/package.json index 03cc3445..818f3e31 100644 --- a/packages/addresses/package.json +++ b/packages/addresses/package.json @@ -2,6 +2,12 @@ "name": "@zetachain/addresses", "version": "0.0.1", "license": "MIT", + "private": "true", + "author": "zetachain", + "publishConfig": { + "access": "public", + "registry": "https://registry.npmjs.org/" + }, "main": "src/index.ts", "scripts": { "tsc:watch": "npx tsc --watch" diff --git a/packages/example-contracts/package.json b/packages/example-contracts/package.json index 04ec3744..3de1ca45 100644 --- a/packages/example-contracts/package.json +++ b/packages/example-contracts/package.json @@ -2,6 +2,12 @@ "name": "@zetachain/example-contracts", "version": "0.0.1", "license": "MIT", + "private": "true", + "author": "zetachain", + "publishConfig": { + "access": "public", + "registry": "https://registry.npmjs.org/" + }, "scripts": { "clean": "npx hardhat clean", "compile": "npx hardhat compile", diff --git a/packages/protocol-contracts/.npmignore b/packages/protocol-contracts/.npmignore new file mode 100644 index 00000000..d80f8693 --- /dev/null +++ b/packages/protocol-contracts/.npmignore @@ -0,0 +1,20 @@ +# https://docs.npmjs.com/misc/developers#keeping-files-out-of-your-package +cache +scripts +lib +artifacts +# Tests +test +# Build tools +.travis.yml +.jenkins.yml +.codeclimate.yml +# Linters +.jscsrc +.jshintrc +.eslintrc* +.env +.env.example +# Editor settings +.idea +.editorconfig \ No newline at end of file diff --git a/packages/protocol-contracts/package.json b/packages/protocol-contracts/package.json index 8cb110b9..078df6fb 100644 --- a/packages/protocol-contracts/package.json +++ b/packages/protocol-contracts/package.json @@ -1,7 +1,12 @@ { "name": "@zetachain/protocol-contracts", - "version": "0.0.1", + "version": "0.0.3", "license": "MIT", + "author": "zetachain", + "publishConfig": { + "access": "public", + "registry": "https://registry.npmjs.org/" + }, "scripts": { "clean": "npx hardhat clean", "compile": "npx hardhat compile", From 1366de22ec7887feeb87a4f7bb78c17ce74bccae Mon Sep 17 00:00:00 2001 From: Andres Martin Aiello <50411235+andresaiello@users.noreply.github.com> Date: Thu, 28 Jul 2022 13:28:43 -0300 Subject: [PATCH 030/115] Fix ci on zetachain repo (#36) --- packages/addresses/package.json | 1 - packages/example-contracts/package.json | 1 - yarn.lock | 1136 ++++++++++++++++++++++- 3 files changed, 1114 insertions(+), 24 deletions(-) diff --git a/packages/addresses/package.json b/packages/addresses/package.json index 818f3e31..6c199b6d 100644 --- a/packages/addresses/package.json +++ b/packages/addresses/package.json @@ -2,7 +2,6 @@ "name": "@zetachain/addresses", "version": "0.0.1", "license": "MIT", - "private": "true", "author": "zetachain", "publishConfig": { "access": "public", diff --git a/packages/example-contracts/package.json b/packages/example-contracts/package.json index 3de1ca45..4da25750 100644 --- a/packages/example-contracts/package.json +++ b/packages/example-contracts/package.json @@ -2,7 +2,6 @@ "name": "@zetachain/example-contracts", "version": "0.0.1", "license": "MIT", - "private": "true", "author": "zetachain", "publishConfig": { "access": "public", diff --git a/yarn.lock b/yarn.lock index 0ecdfe78..35c1127f 100644 --- a/yarn.lock +++ b/yarn.lock @@ -5,6 +5,277 @@ __metadata: version: 6 cacheKey: 8 +"@babel/code-frame@npm:^7.0.0": + version: 7.18.6 + resolution: "@babel/code-frame@npm:7.18.6" + dependencies: + "@babel/highlight": ^7.18.6 + checksum: 195e2be3172d7684bf95cff69ae3b7a15a9841ea9d27d3c843662d50cdd7d6470fd9c8e64be84d031117e4a4083486effba39f9aef6bbb2c89f7f21bcfba33ba + languageName: node + linkType: hard + +"@babel/helper-validator-identifier@npm:^7.18.6": + version: 7.18.6 + resolution: "@babel/helper-validator-identifier@npm:7.18.6" + checksum: e295254d616bbe26e48c196a198476ab4d42a73b90478c9842536cf910ead887f5af6b5c4df544d3052a25ccb3614866fa808dc1e3a5a4291acd444e243c0648 + languageName: node + linkType: hard + +"@babel/highlight@npm:^7.18.6": + version: 7.18.6 + resolution: "@babel/highlight@npm:7.18.6" + dependencies: + "@babel/helper-validator-identifier": ^7.18.6 + chalk: ^2.0.0 + js-tokens: ^4.0.0 + checksum: 92d8ee61549de5ff5120e945e774728e5ccd57fd3b2ed6eace020ec744823d4a98e242be1453d21764a30a14769ecd62170fba28539b211799bbaf232bbb2789 + languageName: node + linkType: hard + +"@babel/runtime@npm:^7.10.4, @babel/runtime@npm:^7.5.5": + version: 7.18.9 + resolution: "@babel/runtime@npm:7.18.9" + dependencies: + regenerator-runtime: ^0.13.4 + checksum: 36dd736baba7164e82b3cc9d43e081f0cb2d05ff867ad39cac515d99546cee75b7f782018b02a3dcf5f2ef3d27f319faa68965fdfec49d4912c60c6002353a2e + languageName: node + linkType: hard + +"@changesets/apply-release-plan@npm:^6.0.3": + version: 6.0.3 + resolution: "@changesets/apply-release-plan@npm:6.0.3" + dependencies: + "@babel/runtime": ^7.10.4 + "@changesets/config": ^2.1.0 + "@changesets/get-version-range-type": ^0.3.2 + "@changesets/git": ^1.4.1 + "@changesets/types": ^5.1.0 + "@manypkg/get-packages": ^1.1.3 + detect-indent: ^6.0.0 + fs-extra: ^7.0.1 + lodash.startcase: ^4.4.0 + outdent: ^0.5.0 + prettier: ^1.19.1 + resolve-from: ^5.0.0 + semver: ^5.4.1 + checksum: e40cac11719faf00f6573a647202941737408739f30ab534c0a2d69e6b2247940882dac521f254b936f7321e6ffac5dd104b9efaa2f2ccf429002f7f4cf2fc4c + languageName: node + linkType: hard + +"@changesets/assemble-release-plan@npm:^5.2.0": + version: 5.2.0 + resolution: "@changesets/assemble-release-plan@npm:5.2.0" + dependencies: + "@babel/runtime": ^7.10.4 + "@changesets/errors": ^0.1.4 + "@changesets/get-dependents-graph": ^1.3.3 + "@changesets/types": ^5.1.0 + "@manypkg/get-packages": ^1.1.3 + semver: ^5.4.1 + checksum: 1f26617c00656203e6324fcda135103e7b023427cdb92bbc8b7defb01820d74d62efe19dec6173cfefb68b6bc0898b91abdc8e96dd312eff3ddf9e58268f70a7 + languageName: node + linkType: hard + +"@changesets/changelog-git@npm:^0.1.12": + version: 0.1.12 + resolution: "@changesets/changelog-git@npm:0.1.12" + dependencies: + "@changesets/types": ^5.1.0 + checksum: 68ae2ccb7e18f4559c954bcc104cd2e311c6daf5a39e9339290c0e1db8db926a1432e54485c593d977083253736147d855e923053d50daaef1041aa486172538 + languageName: node + linkType: hard + +"@changesets/cli@npm:^2.23.1": + version: 2.24.1 + resolution: "@changesets/cli@npm:2.24.1" + dependencies: + "@babel/runtime": ^7.10.4 + "@changesets/apply-release-plan": ^6.0.3 + "@changesets/assemble-release-plan": ^5.2.0 + "@changesets/changelog-git": ^0.1.12 + "@changesets/config": ^2.1.0 + "@changesets/errors": ^0.1.4 + "@changesets/get-dependents-graph": ^1.3.3 + "@changesets/get-release-plan": ^3.0.12 + "@changesets/git": ^1.4.1 + "@changesets/logger": ^0.0.5 + "@changesets/pre": ^1.0.12 + "@changesets/read": ^0.5.7 + "@changesets/types": ^5.1.0 + "@changesets/write": ^0.1.9 + "@manypkg/get-packages": ^1.1.3 + "@types/is-ci": ^3.0.0 + "@types/semver": ^6.0.0 + ansi-colors: ^4.1.3 + chalk: ^2.1.0 + enquirer: ^2.3.0 + external-editor: ^3.1.0 + fs-extra: ^7.0.1 + human-id: ^1.0.2 + is-ci: ^3.0.1 + meow: ^6.0.0 + outdent: ^0.5.0 + p-limit: ^2.2.0 + preferred-pm: ^3.0.0 + resolve-from: ^5.0.0 + semver: ^5.4.1 + spawndamnit: ^2.0.0 + term-size: ^2.1.0 + tty-table: ^4.1.5 + bin: + changeset: bin.js + checksum: 1860969140fbdfd834e4fcb983dccf8e01cf2d5e7fe48eb793318c0411934e6abd1811711a61b1b379fc23b69a5c625354c85d3162045ef4ec726315a7e0ff2b + languageName: node + linkType: hard + +"@changesets/config@npm:^2.1.0": + version: 2.1.0 + resolution: "@changesets/config@npm:2.1.0" + dependencies: + "@changesets/errors": ^0.1.4 + "@changesets/get-dependents-graph": ^1.3.3 + "@changesets/logger": ^0.0.5 + "@changesets/types": ^5.1.0 + "@manypkg/get-packages": ^1.1.3 + fs-extra: ^7.0.1 + micromatch: ^4.0.2 + checksum: 0b7ba7ea965739ede9b935efd8d582ed0c939e3df1b147db93c6572e799b3feb1634036e0222926bf223a5e680b9ff433edddf9d670400a3e7a4986f17c27ed1 + languageName: node + linkType: hard + +"@changesets/errors@npm:^0.1.4": + version: 0.1.4 + resolution: "@changesets/errors@npm:0.1.4" + dependencies: + extendable-error: ^0.1.5 + checksum: 10734f1379715bf5a70b566dd42b50a75964d76f382bb67332776614454deda6d04a43dd7e727cd7cba56d7f2f7c95a07c7c0a19dd5d64fb1980b28322840733 + languageName: node + linkType: hard + +"@changesets/get-dependents-graph@npm:^1.3.3": + version: 1.3.3 + resolution: "@changesets/get-dependents-graph@npm:1.3.3" + dependencies: + "@changesets/types": ^5.1.0 + "@manypkg/get-packages": ^1.1.3 + chalk: ^2.1.0 + fs-extra: ^7.0.1 + semver: ^5.4.1 + checksum: 0ccde4d7e233fef875447e08219da45eb3cd9b073124b6ce051b35ed3fac89ce2cb185fce41eae1ed2a41aa741cd9f999f5384c5c76086c72c5b5e7609716fd9 + languageName: node + linkType: hard + +"@changesets/get-release-plan@npm:^3.0.12": + version: 3.0.12 + resolution: "@changesets/get-release-plan@npm:3.0.12" + dependencies: + "@babel/runtime": ^7.10.4 + "@changesets/assemble-release-plan": ^5.2.0 + "@changesets/config": ^2.1.0 + "@changesets/pre": ^1.0.12 + "@changesets/read": ^0.5.7 + "@changesets/types": ^5.1.0 + "@manypkg/get-packages": ^1.1.3 + checksum: 383b325c770344b89dfb417996a311390ea718af638f20833124bf2a493cb614ba3603eb01ff7294d48aa211d99d6fda85bf069e426daf5ebc9ded4c857f0055 + languageName: node + linkType: hard + +"@changesets/get-version-range-type@npm:^0.3.2": + version: 0.3.2 + resolution: "@changesets/get-version-range-type@npm:0.3.2" + checksum: b7ee7127c472a3886906ca6db336ac11233a5e75abc882084bfb4794e79a8936e3faceec3c04bf61c26453cd7f74278d9bf22aea4cdca8c1cd992591925b3c9b + languageName: node + linkType: hard + +"@changesets/git@npm:^1.4.1": + version: 1.4.1 + resolution: "@changesets/git@npm:1.4.1" + dependencies: + "@babel/runtime": ^7.10.4 + "@changesets/errors": ^0.1.4 + "@changesets/types": ^5.1.0 + "@manypkg/get-packages": ^1.1.3 + is-subdir: ^1.1.1 + spawndamnit: ^2.0.0 + checksum: 9b710d532a1816a2540fe4bc4212e13acb102f39f3b49d23396cad9b3fcae8bfe3f838902a9279a5b0b3e4533ca0965ffb169f0bebeb8b4933a48965679ed991 + languageName: node + linkType: hard + +"@changesets/logger@npm:^0.0.5": + version: 0.0.5 + resolution: "@changesets/logger@npm:0.0.5" + dependencies: + chalk: ^2.1.0 + checksum: bfec3cd9122b00c0ec25e96730f771ffd662ef3906d571bad1e4e9993f9d54d357d3eaf074b3dfaa4e23af759ce68efa2a97d8b845b0d8c951df5d21c6dfdff5 + languageName: node + linkType: hard + +"@changesets/parse@npm:^0.3.14": + version: 0.3.14 + resolution: "@changesets/parse@npm:0.3.14" + dependencies: + "@changesets/types": ^5.1.0 + js-yaml: ^3.13.1 + checksum: 4234e93ba3081fc30ec6ed3425cb2f4ac9e69fec0fc90d6d0438d850840c247f7bc9365b78a5295a6084c4cdba1c657c1bc4acd2f666dc0097741f0933111cf7 + languageName: node + linkType: hard + +"@changesets/pre@npm:^1.0.12": + version: 1.0.12 + resolution: "@changesets/pre@npm:1.0.12" + dependencies: + "@babel/runtime": ^7.10.4 + "@changesets/errors": ^0.1.4 + "@changesets/types": ^5.1.0 + "@manypkg/get-packages": ^1.1.3 + fs-extra: ^7.0.1 + checksum: 6a81027feaca4727b2809410ec246481a324b4230e0f06b6add52ac2f28f8d7cb9b72cea56b2cfb64a15eb016fb6923bad49c3f2e767ecd2b30b13357a75a0da + languageName: node + linkType: hard + +"@changesets/read@npm:^0.5.7": + version: 0.5.7 + resolution: "@changesets/read@npm:0.5.7" + dependencies: + "@babel/runtime": ^7.10.4 + "@changesets/git": ^1.4.1 + "@changesets/logger": ^0.0.5 + "@changesets/parse": ^0.3.14 + "@changesets/types": ^5.1.0 + chalk: ^2.1.0 + fs-extra: ^7.0.1 + p-filter: ^2.1.0 + checksum: 5c9ea7f4ad1391e971ba7eea4e64fd2c1ad2b00db2884a35ec262fa356fc9c72f813ea1c077c7ce904cd4ce2e97b3599d21116df1c0452f7d240c0af71a34f84 + languageName: node + linkType: hard + +"@changesets/types@npm:^4.0.1": + version: 4.1.0 + resolution: "@changesets/types@npm:4.1.0" + checksum: 72c1f58044178ca867dd9349ecc4b7c233ce3781bb03b5b72a70c3166fbbab54a2f2cb19a81f96b4649ba004442c8734569fba238be4dd737fb4624a135c6098 + languageName: node + linkType: hard + +"@changesets/types@npm:^5.1.0": + version: 5.1.0 + resolution: "@changesets/types@npm:5.1.0" + checksum: fa903b53d5cc0ce1bd6054fd6c0053af54f604ade2c6436e735a7a66e4f31f7757ec324ceed3355ccd7f0653174fe8b51e1b3850a0b0d80315d13d92a45185b2 + languageName: node + linkType: hard + +"@changesets/write@npm:^0.1.9": + version: 0.1.9 + resolution: "@changesets/write@npm:0.1.9" + dependencies: + "@babel/runtime": ^7.10.4 + "@changesets/types": ^5.1.0 + fs-extra: ^7.0.1 + human-id: ^1.0.2 + prettier: ^1.19.1 + checksum: 71f3139ef24aff68631299f845cae584e5235f66721ba2a78a6f4788ea3fef784b8911e14668cf4b6fde61606b38a193cac7c17596d8ef94abfce49c4d08755d + languageName: node + linkType: hard + "@cspotcode/source-map-support@npm:^0.8.0": version: 0.8.1 resolution: "@cspotcode/source-map-support@npm:0.8.1" @@ -1095,6 +1366,32 @@ __metadata: languageName: node linkType: hard +"@manypkg/find-root@npm:^1.1.0": + version: 1.1.0 + resolution: "@manypkg/find-root@npm:1.1.0" + dependencies: + "@babel/runtime": ^7.5.5 + "@types/node": ^12.7.1 + find-up: ^4.1.0 + fs-extra: ^8.1.0 + checksum: f0fd881a5a81a351cb6561cd24117e8ee9481bbf3b6d1c7d9d10bef1f4744ca2ba3d064713e83c0a0574416d1e5b4a4c6c414aad91913c4a1c6040d87283ac50 + languageName: node + linkType: hard + +"@manypkg/get-packages@npm:^1.1.3": + version: 1.1.3 + resolution: "@manypkg/get-packages@npm:1.1.3" + dependencies: + "@babel/runtime": ^7.5.5 + "@changesets/types": ^4.0.1 + "@manypkg/find-root": ^1.1.0 + fs-extra: ^8.1.0 + globby: ^11.0.0 + read-yaml-file: ^1.1.0 + checksum: f5a756e5a659e0e1c33f48852d56826d170d5b10a3cdea89ce4fcaa77678d8799aa4004b30e1985c87b73dbc390b95bb6411b78336dd1e0db87c08c74b5c0e74 + languageName: node + linkType: hard + "@metamask/eth-sig-util@npm:^4.0.0": version: 4.0.0 resolution: "@metamask/eth-sig-util@npm:4.0.0" @@ -1615,6 +1912,15 @@ __metadata: languageName: node linkType: hard +"@types/is-ci@npm:^3.0.0": + version: 3.0.0 + resolution: "@types/is-ci@npm:3.0.0" + dependencies: + ci-info: ^3.1.0 + checksum: 7c1f1f16c1fa2134de7400d82766c83fa76057261ba890628af77a09382ebb92d945bb077b98cfcf3d40ab1469c9ffbd2278112867edbe57aa655f53547eb139 + languageName: node + linkType: hard + "@types/json-schema@npm:^7.0.9": version: 7.0.11 resolution: "@types/json-schema@npm:7.0.11" @@ -1670,6 +1976,13 @@ __metadata: languageName: node linkType: hard +"@types/minimist@npm:^1.2.0": + version: 1.2.2 + resolution: "@types/minimist@npm:1.2.2" + checksum: b8da83c66eb4aac0440e64674b19564d9d86c80ae273144db9681e5eeff66f238ade9515f5006ffbfa955ceff8b89ad2bd8ec577d7caee74ba101431fb07045d + languageName: node + linkType: hard + "@types/mkdirp@npm:^0.5.2": version: 0.5.2 resolution: "@types/mkdirp@npm:0.5.2" @@ -1717,6 +2030,13 @@ __metadata: languageName: node linkType: hard +"@types/node@npm:^12.7.1": + version: 12.20.55 + resolution: "@types/node@npm:12.20.55" + checksum: e4f86785f4092706e0d3b0edff8dca5a13b45627e4b36700acd8dfe6ad53db71928c8dee914d4276c7fd3b6ccd829aa919811c9eb708a2c8e4c6eb3701178c37 + languageName: node + linkType: hard + "@types/node@npm:^17.0.25": version: 17.0.25 resolution: "@types/node@npm:17.0.25" @@ -1731,6 +2051,13 @@ __metadata: languageName: node linkType: hard +"@types/normalize-package-data@npm:^2.4.0": + version: 2.4.1 + resolution: "@types/normalize-package-data@npm:2.4.1" + checksum: e87bccbf11f95035c89a132b52b79ce69a1e3652fe55962363063c9c0dae0fe2477ebc585e03a9652adc6f381d24ba5589cc5e51849df4ced3d3e004a7d40ed5 + languageName: node + linkType: hard + "@types/pbkdf2@npm:^3.0.0": version: 3.1.0 resolution: "@types/pbkdf2@npm:3.1.0" @@ -1781,6 +2108,13 @@ __metadata: languageName: node linkType: hard +"@types/semver@npm:^6.0.0": + version: 6.2.3 + resolution: "@types/semver@npm:6.2.3" + checksum: 83c86d7005b229df9c4c0d6d13825b839a01932895504596140aea19e2b88f63ac27ab1575347451b50eedb63f72309e845ce1a0ca78360c4f719bbb38371594 + languageName: node + linkType: hard + "@types/sinon-chai@npm:^3.2.3": version: 3.2.8 resolution: "@types/sinon-chai@npm:3.2.8" @@ -2358,6 +2692,13 @@ __metadata: languageName: node linkType: hard +"ansi-colors@npm:^4.1.3": + version: 4.1.3 + resolution: "ansi-colors@npm:4.1.3" + checksum: a9c2ec842038a1fabc7db9ece7d3177e2fe1c5dc6f0c51ecfbf5f39911427b89c00b5dc6b8bd95f82a26e9b16aaae2e83d45f060e98070ce4d1333038edceb0e + languageName: node + linkType: hard + "ansi-escapes@npm:^4.2.1, ansi-escapes@npm:^4.3.0": version: 4.3.2 resolution: "ansi-escapes@npm:4.3.2" @@ -2571,6 +2912,18 @@ __metadata: languageName: node linkType: hard +"array.prototype.flat@npm:^1.2.3": + version: 1.3.0 + resolution: "array.prototype.flat@npm:1.3.0" + dependencies: + call-bind: ^1.0.2 + define-properties: ^1.1.3 + es-abstract: ^1.19.2 + es-shim-unscopables: ^1.0.0 + checksum: 2a652b3e8dc0bebb6117e42a5ab5738af0203a14c27341d7bb2431467bdb4b348e2c5dc555dfcda8af0a5e4075c400b85311ded73861c87290a71a17c3e0a257 + languageName: node + linkType: hard + "array.prototype.flat@npm:^1.2.5": version: 1.2.5 resolution: "array.prototype.flat@npm:1.2.5" @@ -2582,7 +2935,7 @@ __metadata: languageName: node linkType: hard -"arrify@npm:^1.0.0": +"arrify@npm:^1.0.0, arrify@npm:^1.0.1": version: 1.0.1 resolution: "arrify@npm:1.0.1" checksum: 745075dd4a4624ff0225c331dacb99be501a515d39bcb7c84d24660314a6ec28e68131b137e6f7e16318170842ce97538cd298fc4cd6b2cc798e0b957f2747e7 @@ -3422,6 +3775,15 @@ __metadata: languageName: node linkType: hard +"better-path-resolve@npm:1.0.0": + version: 1.0.0 + resolution: "better-path-resolve@npm:1.0.0" + dependencies: + is-windows: ^1.0.0 + checksum: 5392dbe04e7fe68b944eb37961d9dfa147aaac3ee9ee3f6e13d42e2c9fbe949e68d16e896c14ee9016fa5f8e6e53ec7fd8b5f01b50a32067a7d94ac9cfb9a050 + languageName: node + linkType: hard + "bignumber.js@npm:^9.0.0, bignumber.js@npm:^9.0.1": version: 9.0.2 resolution: "bignumber.js@npm:9.0.2" @@ -3595,6 +3957,15 @@ __metadata: languageName: node linkType: hard +"breakword@npm:^1.0.5": + version: 1.0.5 + resolution: "breakword@npm:1.0.5" + dependencies: + wcwidth: ^1.0.1 + checksum: 8ca7b10bbbbfe1c45c12c9119c4bc1e585452ddd58c5da93020a0c1deac3cf6bb335632675c9c705ba7b644065ae1d6623a25e79b7a48e0ee0ff42cb6e94b357 + languageName: node + linkType: hard + "brorand@npm:^1.0.1, brorand@npm:^1.1.0": version: 1.1.0 resolution: "brorand@npm:1.1.0" @@ -3866,6 +4237,17 @@ __metadata: languageName: node linkType: hard +"camelcase-keys@npm:^6.2.2": + version: 6.2.2 + resolution: "camelcase-keys@npm:6.2.2" + dependencies: + camelcase: ^5.3.1 + map-obj: ^4.0.0 + quick-lru: ^4.0.1 + checksum: 43c9af1adf840471e54c68ab3e5fe8a62719a6b7dbf4e2e86886b7b0ff96112c945736342b837bd2529ec9d1c7d1934e5653318478d98e0cf22c475c04658e2a + languageName: node + linkType: hard + "camelcase@npm:^3.0.0": version: 3.0.0 resolution: "camelcase@npm:3.0.0" @@ -3873,7 +4255,7 @@ __metadata: languageName: node linkType: hard -"camelcase@npm:^5.0.0": +"camelcase@npm:^5.0.0, camelcase@npm:^5.3.1": version: 5.3.1 resolution: "camelcase@npm:5.3.1" checksum: e6effce26b9404e3c0f301498184f243811c30dfe6d0b9051863bd8e4034d09c8c2923794f280d6827e5aa055f6c434115ff97864a16a963366fb35fd673024b @@ -3946,7 +4328,7 @@ __metadata: languageName: node linkType: hard -"chalk@npm:^2.4.1, chalk@npm:^2.4.2": +"chalk@npm:^2.0.0, chalk@npm:^2.1.0, chalk@npm:^2.4.1, chalk@npm:^2.4.2": version: 2.4.2 resolution: "chalk@npm:2.4.2" dependencies: @@ -3957,7 +4339,7 @@ __metadata: languageName: node linkType: hard -"chalk@npm:^4.0.0, chalk@npm:^4.1.0, chalk@npm:^4.1.1": +"chalk@npm:^4.0.0, chalk@npm:^4.1.0, chalk@npm:^4.1.1, chalk@npm:^4.1.2": version: 4.1.2 resolution: "chalk@npm:4.1.2" dependencies: @@ -4056,6 +4438,13 @@ __metadata: languageName: node linkType: hard +"ci-info@npm:^3.1.0, ci-info@npm:^3.2.0": + version: 3.3.2 + resolution: "ci-info@npm:3.3.2" + checksum: fd81f1edd2d3b0f6cb077b2e84365136d87b9db8c055928c1ad69da8a76c2c2f19cba8ea51b90238302157ca927f91f92b653e933f2398dde4867500f08d6e62 + languageName: node + linkType: hard + "cids@npm:^0.7.1": version: 0.7.5 resolution: "cids@npm:0.7.5" @@ -4164,6 +4553,17 @@ __metadata: languageName: node linkType: hard +"cliui@npm:^6.0.0": + version: 6.0.0 + resolution: "cliui@npm:6.0.0" + dependencies: + string-width: ^4.2.0 + strip-ansi: ^6.0.0 + wrap-ansi: ^6.2.0 + checksum: 4fcfd26d292c9f00238117f39fc797608292ae36bac2168cfee4c85923817d0607fe21b3329a8621e01aedf512c99b7eaa60e363a671ffd378df6649fb48ae42 + languageName: node + linkType: hard + "cliui@npm:^7.0.2": version: 7.0.4 resolution: "cliui@npm:7.0.4" @@ -4521,6 +4921,17 @@ __metadata: languageName: node linkType: hard +"cross-spawn@npm:^5.1.0": + version: 5.1.0 + resolution: "cross-spawn@npm:5.1.0" + dependencies: + lru-cache: ^4.0.1 + shebang-command: ^1.2.0 + which: ^1.2.9 + checksum: 726939c9954fc70c20e538923feaaa33bebc253247d13021737c3c7f68cdc3e0a57f720c0fe75057c0387995349f3f12e20e9bfdbf12274db28019c7ea4ec166 + languageName: node + linkType: hard + "cross-spawn@npm:^6.0.5": version: 6.0.5 resolution: "cross-spawn@npm:6.0.5" @@ -4571,6 +4982,39 @@ __metadata: languageName: node linkType: hard +"csv-generate@npm:^3.4.3": + version: 3.4.3 + resolution: "csv-generate@npm:3.4.3" + checksum: 868dc630e8bcabf42d3d1ef22c09fb783de72d7e5929854aad0323f44059b1747edf8a2724e32fdc5008396e2ea38d5c45df0b0e3a1b506e3ab34f76f3e2fb3a + languageName: node + linkType: hard + +"csv-parse@npm:^4.16.3": + version: 4.16.3 + resolution: "csv-parse@npm:4.16.3" + checksum: 5ad7790fc31c32ca1623bad1a54906134ba44fa109e8dd2dfda440bf7e9fd93610d9076a78f45c872701bfafdf7f93c9b75500c09d7efd6611d863f1d45ec69f + languageName: node + linkType: hard + +"csv-stringify@npm:^5.6.5": + version: 5.6.5 + resolution: "csv-stringify@npm:5.6.5" + checksum: f93e1444857416081de3d86765b62e4c4f7c110974ad6bbcb0031d7db39b6624847ac9ee5705726e7011346f32f3696f27299b74b23a6c2b083adff0dd2755fe + languageName: node + linkType: hard + +"csv@npm:^5.5.0": + version: 5.5.3 + resolution: "csv@npm:5.5.3" + dependencies: + csv-generate: ^3.4.3 + csv-parse: ^4.16.3 + csv-stringify: ^5.6.5 + stream-transform: ^2.1.3 + checksum: 0decc2d0d7a0abf127f4556d6f3cef5a54015b78d348608b5e8f42256c2bd0a021f34f1efc9723b2cd162680917de4c0b3967bfb65a07305eca0827654ca727e + languageName: node + linkType: hard + "d@npm:1, d@npm:^1.0.1": version: 1.0.1 resolution: "d@npm:1.0.1" @@ -4648,7 +5092,17 @@ __metadata: languageName: node linkType: hard -"decamelize@npm:^1.1.1, decamelize@npm:^1.2.0": +"decamelize-keys@npm:^1.1.0": + version: 1.1.0 + resolution: "decamelize-keys@npm:1.1.0" + dependencies: + decamelize: ^1.1.0 + map-obj: ^1.0.0 + checksum: 8bc5d32e035a072f5dffc1f1f3d26ca7ab1fb44a9cade34c97ab6cd1e62c81a87e718101e96de07d78cecda20a3fdb955df958e46671ccad01bb8dcf0de2e298 + languageName: node + linkType: hard + +"decamelize@npm:^1.1.0, decamelize@npm:^1.1.1, decamelize@npm:^1.2.0": version: 1.2.0 resolution: "decamelize@npm:1.2.0" checksum: ad8c51a7e7e0720c70ec2eeb1163b66da03e7616d7b98c9ef43cce2416395e84c1e9548dd94f5f6ffecfee9f8b94251fc57121a8b021f2ff2469b2bae247b8aa @@ -4769,6 +5223,16 @@ __metadata: languageName: node linkType: hard +"define-properties@npm:^1.1.4": + version: 1.1.4 + resolution: "define-properties@npm:1.1.4" + dependencies: + has-property-descriptors: ^1.0.0 + object-keys: ^1.1.1 + checksum: ce0aef3f9eb193562b5cfb79b2d2c86b6a109dfc9fdcb5f45d680631a1a908c06824ddcdb72b7573b54e26ace07f0a23420aaba0d5c627b34d2c1de8ef527e2b + languageName: node + linkType: hard + "define-property@npm:^0.2.5": version: 0.2.5 resolution: "define-property@npm:0.2.5" @@ -4865,6 +5329,13 @@ __metadata: languageName: node linkType: hard +"detect-indent@npm:^6.0.0": + version: 6.1.0 + resolution: "detect-indent@npm:6.1.0" + checksum: ab953a73c72dbd4e8fc68e4ed4bfd92c97eb6c43734af3900add963fd3a9316f3bc0578b018b24198d4c31a358571eff5f0656e81a1f3b9ad5c547d58b2d093d + languageName: node + linkType: hard + "detect-port@npm:^1.3.0": version: 1.3.0 resolution: "detect-port@npm:1.3.0" @@ -5117,7 +5588,7 @@ __metadata: languageName: node linkType: hard -"error-ex@npm:^1.2.0": +"error-ex@npm:^1.2.0, error-ex@npm:^1.3.1": version: 1.3.2 resolution: "error-ex@npm:1.3.2" dependencies: @@ -5154,6 +5625,46 @@ __metadata: languageName: node linkType: hard +"es-abstract@npm:^1.19.2, es-abstract@npm:^1.19.5": + version: 1.20.1 + resolution: "es-abstract@npm:1.20.1" + dependencies: + call-bind: ^1.0.2 + es-to-primitive: ^1.2.1 + function-bind: ^1.1.1 + function.prototype.name: ^1.1.5 + get-intrinsic: ^1.1.1 + get-symbol-description: ^1.0.0 + has: ^1.0.3 + has-property-descriptors: ^1.0.0 + has-symbols: ^1.0.3 + internal-slot: ^1.0.3 + is-callable: ^1.2.4 + is-negative-zero: ^2.0.2 + is-regex: ^1.1.4 + is-shared-array-buffer: ^1.0.2 + is-string: ^1.0.7 + is-weakref: ^1.0.2 + object-inspect: ^1.12.0 + object-keys: ^1.1.1 + object.assign: ^4.1.2 + regexp.prototype.flags: ^1.4.3 + string.prototype.trimend: ^1.0.5 + string.prototype.trimstart: ^1.0.5 + unbox-primitive: ^1.0.2 + checksum: 28da27ae0ed9c76df7ee8ef5c278df79dcfdb554415faf7068bb7c58f8ba8e2a16bfb59e586844be6429ab4c302ca7748979d48442224cb1140b051866d74b7f + languageName: node + linkType: hard + +"es-shim-unscopables@npm:^1.0.0": + version: 1.0.0 + resolution: "es-shim-unscopables@npm:1.0.0" + dependencies: + has: ^1.0.3 + checksum: 83e95cadbb6ee44d3644dfad60dcad7929edbc42c85e66c3e99aefd68a3a5c5665f2686885cddb47dfeabfd77bd5ea5a7060f2092a955a729bbd8834f0d86fa1 + languageName: node + linkType: hard + "es-to-primitive@npm:^1.2.1": version: 1.2.1 resolution: "es-to-primitive@npm:1.2.1" @@ -6369,7 +6880,14 @@ __metadata: languageName: node linkType: hard -"external-editor@npm:^3.0.3": +"extendable-error@npm:^0.1.5": + version: 0.1.7 + resolution: "extendable-error@npm:0.1.7" + checksum: 80478be7429a1675d2085f701239796bab3230ed6f2fb1b138fbabec24bea6516b7c5ceb6e9c209efcc9c089948d93715703845653535f8e8a49655066a9255e + languageName: node + linkType: hard + +"external-editor@npm:^3.0.3, external-editor@npm:^3.1.0": version: 3.1.0 resolution: "external-editor@npm:3.1.0" dependencies: @@ -6567,7 +7085,7 @@ __metadata: languageName: node linkType: hard -"find-up@npm:5.0.0": +"find-up@npm:5.0.0, find-up@npm:^5.0.0": version: 5.0.0 resolution: "find-up@npm:5.0.0" dependencies: @@ -6596,6 +7114,26 @@ __metadata: languageName: node linkType: hard +"find-up@npm:^4.0.0, find-up@npm:^4.1.0": + version: 4.1.0 + resolution: "find-up@npm:4.1.0" + dependencies: + locate-path: ^5.0.0 + path-exists: ^4.0.0 + checksum: 4c172680e8f8c1f78839486e14a43ef82e9decd0e74145f40707cc42e7420506d5ec92d9a11c22bd2c48fb0c384ea05dd30e10dd152fefeec6f2f75282a8b844 + languageName: node + linkType: hard + +"find-yarn-workspace-root2@npm:1.2.16": + version: 1.2.16 + resolution: "find-yarn-workspace-root2@npm:1.2.16" + dependencies: + micromatch: ^4.0.2 + pkg-dir: ^4.2.0 + checksum: b4abdd37ab87c2172e2abab69ecbfed365d63232742cd1f0a165020fba1b200478e944ec2035c6aaf0ae142ac4c523cbf08670f45e59b242bcc295731b017825 + languageName: node + linkType: hard + "find-yarn-workspace-root@npm:^1.2.1": version: 1.2.1 resolution: "find-yarn-workspace-root@npm:1.2.1" @@ -6904,6 +7442,18 @@ __metadata: languageName: node linkType: hard +"function.prototype.name@npm:^1.1.5": + version: 1.1.5 + resolution: "function.prototype.name@npm:1.1.5" + dependencies: + call-bind: ^1.0.2 + define-properties: ^1.1.3 + es-abstract: ^1.19.0 + functions-have-names: ^1.2.2 + checksum: acd21d733a9b649c2c442f067567743214af5fa248dbeee69d8278ce7df3329ea5abac572be9f7470b4ec1cd4d8f1040e3c5caccf98ebf2bf861a0deab735c27 + languageName: node + linkType: hard + "functional-red-black-tree@npm:^1.0.1, functional-red-black-tree@npm:~1.0.1": version: 1.0.1 resolution: "functional-red-black-tree@npm:1.0.1" @@ -6911,6 +7461,13 @@ __metadata: languageName: node linkType: hard +"functions-have-names@npm:^1.2.2": + version: 1.2.3 + resolution: "functions-have-names@npm:1.2.3" + checksum: c3f1f5ba20f4e962efb71344ce0a40722163e85bee2101ce25f88214e78182d2d2476aa85ef37950c579eb6cf6ee811c17b3101bb84004bb75655f3e33f3fdb5 + languageName: node + linkType: hard + "ganache-core@npm:^2.13.2": version: 2.13.2 resolution: "ganache-core@npm:2.13.2" @@ -7207,7 +7764,7 @@ __metadata: languageName: node linkType: hard -"globby@npm:^11.0.4, globby@npm:^11.1.0": +"globby@npm:^11.0.0, globby@npm:^11.0.4, globby@npm:^11.1.0": version: 11.1.0 resolution: "globby@npm:11.1.0" dependencies: @@ -7262,16 +7819,23 @@ __metadata: languageName: node linkType: hard -"graceful-fs@npm:^4.1.11, graceful-fs@npm:^4.1.2, graceful-fs@npm:^4.1.6, graceful-fs@npm:^4.1.9, graceful-fs@npm:^4.2.0, graceful-fs@npm:^4.2.6": +"graceful-fs@npm:^4.1.11, graceful-fs@npm:^4.1.2, graceful-fs@npm:^4.1.5, graceful-fs@npm:^4.1.6, graceful-fs@npm:^4.1.9, graceful-fs@npm:^4.2.0, graceful-fs@npm:^4.2.6": version: 4.2.10 resolution: "graceful-fs@npm:4.2.10" checksum: 3f109d70ae123951905d85032ebeae3c2a5a7a997430df00ea30df0e3a6c60cf6689b109654d6fdacd28810a053348c4d14642da1d075049e6be1ba5216218da languageName: node linkType: hard -"growl@npm:1.10.5": - version: 1.10.5 - resolution: "growl@npm:1.10.5" +"grapheme-splitter@npm:^1.0.4": + version: 1.0.4 + resolution: "grapheme-splitter@npm:1.0.4" + checksum: 0c22ec54dee1b05cd480f78cf14f732cb5b108edc073572c4ec205df4cd63f30f8db8025afc5debc8835a8ddeacf648a1c7992fe3dcd6ad38f9a476d84906620 + languageName: node + linkType: hard + +"growl@npm:1.10.5": + version: 1.10.5 + resolution: "growl@npm:1.10.5" checksum: 4b86685de6831cebcbb19f93870bea624afee61124b0a20c49017013987cd129e73a8c4baeca295728f41d21265e1f859d25ef36731b142ca59c655fea94bb1a languageName: node linkType: hard @@ -7311,6 +7875,13 @@ __metadata: languageName: node linkType: hard +"hard-rejection@npm:^2.1.0": + version: 2.1.0 + resolution: "hard-rejection@npm:2.1.0" + checksum: 7baaf80a0c7fff4ca79687b4060113f1529589852152fa935e6787a2bc96211e784ad4588fb3048136ff8ffc9dfcf3ae385314a5b24db32de20bea0d1597f9dc + languageName: node + linkType: hard + "hardhat-gas-reporter@npm:^1.0.8": version: 1.0.8 resolution: "hardhat-gas-reporter@npm:1.0.8" @@ -7411,6 +7982,13 @@ __metadata: languageName: node linkType: hard +"has-bigints@npm:^1.0.2": + version: 1.0.2 + resolution: "has-bigints@npm:1.0.2" + checksum: 390e31e7be7e5c6fe68b81babb73dfc35d413604d7ee5f56da101417027a4b4ce6a27e46eff97ad040c835b5d228676eae99a9b5c3bc0e23c8e81a49241ff45b + languageName: node + linkType: hard + "has-flag@npm:^1.0.0": version: 1.0.0 resolution: "has-flag@npm:1.0.0" @@ -7432,6 +8010,15 @@ __metadata: languageName: node linkType: hard +"has-property-descriptors@npm:^1.0.0": + version: 1.0.0 + resolution: "has-property-descriptors@npm:1.0.0" + dependencies: + get-intrinsic: ^1.1.1 + checksum: a6d3f0a266d0294d972e354782e872e2fe1b6495b321e6ef678c9b7a06a40408a6891817350c62e752adced73a94ac903c54734fee05bf65b1905ee1368194bb + languageName: node + linkType: hard + "has-symbol-support-x@npm:^1.4.1": version: 1.4.2 resolution: "has-symbol-support-x@npm:1.4.2" @@ -7687,6 +8274,13 @@ __metadata: languageName: node linkType: hard +"human-id@npm:^1.0.2": + version: 1.0.2 + resolution: "human-id@npm:1.0.2" + checksum: 95ee57ffae849f008e2ef3fe6e437be8c999861b4256f18c3b194c8928670a8a149e0576917105d5fd77e5edbb621c5a4736fade20bb7bf130113c1ebc95cb74 + languageName: node + linkType: hard + "humanize-ms@npm:^1.2.1": version: 1.2.1 resolution: "humanize-ms@npm:1.2.1" @@ -7988,6 +8582,17 @@ __metadata: languageName: node linkType: hard +"is-ci@npm:^3.0.1": + version: 3.0.1 + resolution: "is-ci@npm:3.0.1" + dependencies: + ci-info: ^3.2.0 + bin: + is-ci: bin.js + checksum: 192c66dc7826d58f803ecae624860dccf1899fc1f3ac5505284c0a5cf5f889046ffeb958fa651e5725d5705c5bcb14f055b79150ea5fcad7456a9569de60260e + languageName: node + linkType: hard + "is-core-module@npm:^2.8.1": version: 2.8.1 resolution: "is-core-module@npm:2.8.1" @@ -8240,7 +8845,7 @@ __metadata: languageName: node linkType: hard -"is-shared-array-buffer@npm:^1.0.1": +"is-shared-array-buffer@npm:^1.0.1, is-shared-array-buffer@npm:^1.0.2": version: 1.0.2 resolution: "is-shared-array-buffer@npm:1.0.2" dependencies: @@ -8265,6 +8870,15 @@ __metadata: languageName: node linkType: hard +"is-subdir@npm:^1.1.1": + version: 1.2.0 + resolution: "is-subdir@npm:1.2.0" + dependencies: + better-path-resolve: 1.0.0 + checksum: 31029a383972bff4cc4f1bd1463fd04dde017e0a04ae3a6f6e08124a90c6c4656312d593101b0f38805fa3f3c8f6bc4583524bbf72c50784fa5ca0d3e5a76279 + languageName: node + linkType: hard + "is-symbol@npm:^1.0.2, is-symbol@npm:^1.0.3": version: 1.0.4 resolution: "is-symbol@npm:1.0.4" @@ -8324,7 +8938,7 @@ __metadata: languageName: node linkType: hard -"is-windows@npm:^1.0.2": +"is-windows@npm:^1.0.0, is-windows@npm:^1.0.2": version: 1.0.2 resolution: "is-windows@npm:1.0.2" checksum: 438b7e52656fe3b9b293b180defb4e448088e7023a523ec21a91a80b9ff8cdb3377ddb5b6e60f7c7de4fa8b63ab56e121b6705fe081b3cf1b828b0a380009ad7 @@ -8408,7 +9022,7 @@ __metadata: languageName: node linkType: hard -"js-tokens@npm:^3.0.0 || ^4.0.0": +"js-tokens@npm:^3.0.0 || ^4.0.0, js-tokens@npm:^4.0.0": version: 4.0.0 resolution: "js-tokens@npm:4.0.0" checksum: 8a95213a5a77deb6cbe94d86340e8d9ace2b93bc367790b260101d2f36a2eaf4e4e22d9fa9cf459b38af3a32fb4190e638024cf82ec95ef708680e405ea7cc78 @@ -8434,7 +9048,7 @@ __metadata: languageName: node linkType: hard -"js-yaml@npm:3.x": +"js-yaml@npm:3.x, js-yaml@npm:^3.13.0, js-yaml@npm:^3.13.1, js-yaml@npm:^3.6.1": version: 3.14.1 resolution: "js-yaml@npm:3.14.1" dependencies: @@ -8489,6 +9103,13 @@ __metadata: languageName: node linkType: hard +"json-parse-even-better-errors@npm:^2.3.0": + version: 2.3.1 + resolution: "json-parse-even-better-errors@npm:2.3.1" + checksum: 798ed4cf3354a2d9ccd78e86d2169515a0097a5c133337807cdf7f1fc32e1391d207ccfc276518cc1d7d8d4db93288b8a50ba4293d212ad1336e52a8ec0a941f + languageName: node + linkType: hard + "json-rpc-engine@npm:^3.4.0, json-rpc-engine@npm:^3.6.0": version: 3.8.0 resolution: "json-rpc-engine@npm:3.8.0" @@ -8709,7 +9330,7 @@ __metadata: languageName: node linkType: hard -"kind-of@npm:^6.0.0, kind-of@npm:^6.0.2": +"kind-of@npm:^6.0.0, kind-of@npm:^6.0.2, kind-of@npm:^6.0.3": version: 6.0.3 resolution: "kind-of@npm:6.0.3" checksum: 3ab01e7b1d440b22fe4c31f23d8d38b4d9b91d9f291df683476576493d5dfd2e03848a8b05813dd0c3f0e835bc63f433007ddeceb71f05cb25c45ae1b19c6d3b @@ -8737,6 +9358,13 @@ __metadata: languageName: node linkType: hard +"kleur@npm:^4.1.4": + version: 4.1.5 + resolution: "kleur@npm:4.1.5" + checksum: 1dc476e32741acf0b1b5b0627ffd0d722e342c1b0da14de3e8ae97821327ca08f9fb944542fb3c126d90ac5f27f9d804edbe7c585bf7d12ef495d115e0f22c12 + languageName: node + linkType: hard + "lcid@npm:^1.0.0": version: 1.0.0 resolution: "lcid@npm:1.0.0" @@ -9009,6 +9637,13 @@ __metadata: languageName: node linkType: hard +"lines-and-columns@npm:^1.1.6": + version: 1.2.4 + resolution: "lines-and-columns@npm:1.2.4" + checksum: 0c37f9f7fa212b38912b7145e1cd16a5f3cd34d782441c3e6ca653485d326f58b3caccda66efce1c5812bde4961bbde3374fae4b0d11bf1226152337f3894aa5 + languageName: node + linkType: hard + "load-json-file@npm:^1.0.0": version: 1.1.0 resolution: "load-json-file@npm:1.1.0" @@ -9022,6 +9657,18 @@ __metadata: languageName: node linkType: hard +"load-yaml-file@npm:^0.2.0": + version: 0.2.0 + resolution: "load-yaml-file@npm:0.2.0" + dependencies: + graceful-fs: ^4.1.5 + js-yaml: ^3.13.0 + pify: ^4.0.1 + strip-bom: ^3.0.0 + checksum: d86d7ec7b15a1c35b40fb0d8abe710a7de83e0c1186c1d35a7eaaf8581611828089a3e706f64560c2939762bc73f18a7b85aed9335058c640e033933cf317f11 + languageName: node + linkType: hard + "locate-path@npm:^2.0.0": version: 2.0.0 resolution: "locate-path@npm:2.0.0" @@ -9042,6 +9689,15 @@ __metadata: languageName: node linkType: hard +"locate-path@npm:^5.0.0": + version: 5.0.0 + resolution: "locate-path@npm:5.0.0" + dependencies: + p-locate: ^4.1.0 + checksum: 83e51725e67517287d73e1ded92b28602e3ae5580b301fe54bfb76c0c723e3f285b19252e375712316774cf52006cb236aed5704692c32db0d5d089b69696e30 + languageName: node + linkType: hard + "locate-path@npm:^6.0.0": version: 6.0.0 resolution: "locate-path@npm:6.0.0" @@ -9086,6 +9742,13 @@ __metadata: languageName: node linkType: hard +"lodash.startcase@npm:^4.4.0": + version: 4.4.0 + resolution: "lodash.startcase@npm:4.4.0" + checksum: c03a4a784aca653845fe09d0ef67c902b6e49288dc45f542a4ab345a9c406a6dc194c774423fa313ee7b06283950301c1221dd2a1d8ecb2dac8dfbb9ed5606b5 + languageName: node + linkType: hard + "lodash@npm:4.17.20": version: 4.17.20 resolution: "lodash@npm:4.17.20" @@ -9185,6 +9848,16 @@ __metadata: languageName: node linkType: hard +"lru-cache@npm:^4.0.1": + version: 4.1.5 + resolution: "lru-cache@npm:4.1.5" + dependencies: + pseudomap: ^1.0.2 + yallist: ^2.1.2 + checksum: 4bb4b58a36cd7dc4dcec74cbe6a8f766a38b7426f1ff59d4cf7d82a2aa9b9565cd1cb98f6ff60ce5cd174524868d7bc9b7b1c294371851356066ca9ac4cf135a + languageName: node + linkType: hard + "lru-cache@npm:^6.0.0": version: 6.0.0 resolution: "lru-cache@npm:6.0.0" @@ -9260,6 +9933,20 @@ __metadata: languageName: node linkType: hard +"map-obj@npm:^1.0.0": + version: 1.0.1 + resolution: "map-obj@npm:1.0.1" + checksum: 9949e7baec2a336e63b8d4dc71018c117c3ce6e39d2451ccbfd3b8350c547c4f6af331a4cbe1c83193d7c6b786082b6256bde843db90cb7da2a21e8fcc28afed + languageName: node + linkType: hard + +"map-obj@npm:^4.0.0": + version: 4.3.0 + resolution: "map-obj@npm:4.3.0" + checksum: fbc554934d1a27a1910e842bc87b177b1a556609dd803747c85ece420692380827c6ae94a95cce4407c054fa0964be3bf8226f7f2cb2e9eeee432c7c1985684e + languageName: node + linkType: hard + "map-visit@npm:^1.0.0": version: 1.0.0 resolution: "map-visit@npm:1.0.0" @@ -9350,6 +10037,25 @@ __metadata: languageName: node linkType: hard +"meow@npm:^6.0.0": + version: 6.1.1 + resolution: "meow@npm:6.1.1" + dependencies: + "@types/minimist": ^1.2.0 + camelcase-keys: ^6.2.2 + decamelize-keys: ^1.1.0 + hard-rejection: ^2.1.0 + minimist-options: ^4.0.2 + normalize-package-data: ^2.5.0 + read-pkg-up: ^7.0.1 + redent: ^3.0.0 + trim-newlines: ^3.0.0 + type-fest: ^0.13.1 + yargs-parser: ^18.1.3 + checksum: 77b569781145ad030be77130623d9f74d6eef0af5e0a349419d3df39bcf6d88cc25be046a7757062162a88160fb5d8604e540b5177b371d2bbc2aaf73ec01479 + languageName: node + linkType: hard + "merge-descriptors@npm:1.0.1": version: 1.0.1 resolution: "merge-descriptors@npm:1.0.1" @@ -9507,6 +10213,13 @@ __metadata: languageName: node linkType: hard +"min-indent@npm:^1.0.0": + version: 1.0.1 + resolution: "min-indent@npm:1.0.1" + checksum: bfc6dd03c5eaf623a4963ebd94d087f6f4bbbfd8c41329a7f09706b0cb66969c4ddd336abeb587bc44bc6f08e13bf90f0b374f9d71f9f01e04adc2cd6f083ef1 + languageName: node + linkType: hard + "minimalistic-assert@npm:^1.0.0, minimalistic-assert@npm:^1.0.1": version: 1.0.1 resolution: "minimalistic-assert@npm:1.0.1" @@ -9548,6 +10261,17 @@ __metadata: languageName: node linkType: hard +"minimist-options@npm:^4.0.2": + version: 4.1.0 + resolution: "minimist-options@npm:4.1.0" + dependencies: + arrify: ^1.0.1 + is-plain-obj: ^1.1.0 + kind-of: ^6.0.3 + checksum: 8c040b3068811e79de1140ca2b708d3e203c8003eb9a414c1ab3cd467fc5f17c9ca02a5aef23bedc51a7f8bfbe77f87e9a7e31ec81fba304cda675b019496f4e + languageName: node + linkType: hard + "minimist@npm:^1.2.0, minimist@npm:^1.2.5, minimist@npm:^1.2.6, minimist@npm:~1.2.6": version: 1.2.6 resolution: "minimist@npm:1.2.6" @@ -9654,6 +10378,13 @@ __metadata: languageName: node linkType: hard +"mixme@npm:^0.5.1": + version: 0.5.4 + resolution: "mixme@npm:0.5.4" + checksum: cec5f6127c92455bc86d592f0a0628e188c7ccf3909bd106703a1d939f0e2f451ddaac6da0d77c5f14d53dd2d58f64f5b2f8ff55a68ec68be95a73d290e4d430 + languageName: node + linkType: hard + "mkdirp-promise@npm:^5.0.1": version: 5.0.1 resolution: "mkdirp-promise@npm:5.0.1" @@ -10063,7 +10794,7 @@ __metadata: languageName: node linkType: hard -"normalize-package-data@npm:^2.3.2": +"normalize-package-data@npm:^2.3.2, normalize-package-data@npm:^2.5.0": version: 2.5.0 resolution: "normalize-package-data@npm:2.5.0" dependencies: @@ -10377,6 +11108,13 @@ __metadata: languageName: node linkType: hard +"outdent@npm:^0.5.0": + version: 0.5.0 + resolution: "outdent@npm:0.5.0" + checksum: 6e6c63dd09e9890e67ef9a0b4d35df0b0b850b2059ce3f7e19e4cc1a146b26dc5d8c45df238dbf187dfffc8bd82cd07d37c697544015680bcb9f07f29a36c678 + languageName: node + linkType: hard + "p-cancelable@npm:^0.3.0": version: 0.3.0 resolution: "p-cancelable@npm:0.3.0" @@ -10391,6 +11129,15 @@ __metadata: languageName: node linkType: hard +"p-filter@npm:^2.1.0": + version: 2.1.0 + resolution: "p-filter@npm:2.1.0" + dependencies: + p-map: ^2.0.0 + checksum: 76e552ca624ce2233448d68b19eec9de42b695208121998f7e011edce71d1079a83096ee6a2078fb2a59cfa8a5c999f046edf00ebf16a8e780022010b4693234 + languageName: node + linkType: hard + "p-finally@npm:^1.0.0": version: 1.0.0 resolution: "p-finally@npm:1.0.0" @@ -10407,7 +11154,7 @@ __metadata: languageName: node linkType: hard -"p-limit@npm:^2.0.0": +"p-limit@npm:^2.0.0, p-limit@npm:^2.2.0": version: 2.3.0 resolution: "p-limit@npm:2.3.0" dependencies: @@ -10443,6 +11190,15 @@ __metadata: languageName: node linkType: hard +"p-locate@npm:^4.1.0": + version: 4.1.0 + resolution: "p-locate@npm:4.1.0" + dependencies: + p-limit: ^2.2.0 + checksum: 513bd14a455f5da4ebfcb819ef706c54adb09097703de6aeaa5d26fe5ea16df92b48d1ac45e01e3944ce1e6aa2a66f7f8894742b8c9d6e276e16cd2049a2b870 + languageName: node + linkType: hard + "p-locate@npm:^5.0.0": version: 5.0.0 resolution: "p-locate@npm:5.0.0" @@ -10452,6 +11208,13 @@ __metadata: languageName: node linkType: hard +"p-map@npm:^2.0.0": + version: 2.1.0 + resolution: "p-map@npm:2.1.0" + checksum: 9e3ad3c9f6d75a5b5661bcad78c91f3a63849189737cd75e4f1225bf9ac205194e5c44aac2ef6f09562b1facdb9bd1425584d7ac375bfaa17b3f1a142dab936d + languageName: node + linkType: hard + "p-map@npm:^4.0.0": version: 4.0.0 resolution: "p-map@npm:4.0.0" @@ -10529,6 +11292,18 @@ __metadata: languageName: node linkType: hard +"parse-json@npm:^5.0.0": + version: 5.2.0 + resolution: "parse-json@npm:5.2.0" + dependencies: + "@babel/code-frame": ^7.0.0 + error-ex: ^1.3.1 + json-parse-even-better-errors: ^2.3.0 + lines-and-columns: ^1.1.6 + checksum: 62085b17d64da57f40f6afc2ac1f4d95def18c4323577e1eced571db75d9ab59b297d1d10582920f84b15985cbfc6b6d450ccbf317644cfa176f3ed982ad87e2 + languageName: node + linkType: hard + "parseurl@npm:~1.3.3": version: 1.3.3 resolution: "parseurl@npm:1.3.3" @@ -10735,6 +11510,15 @@ __metadata: languageName: node linkType: hard +"pkg-dir@npm:^4.2.0": + version: 4.2.0 + resolution: "pkg-dir@npm:4.2.0" + dependencies: + find-up: ^4.0.0 + checksum: 9863e3f35132bf99ae1636d31ff1e1e3501251d480336edb1c211133c8d58906bed80f154a1d723652df1fda91e01c7442c2eeaf9dc83157c7ae89087e43c8d6 + languageName: node + linkType: hard + "posix-character-classes@npm:^0.1.0": version: 0.1.1 resolution: "posix-character-classes@npm:0.1.1" @@ -10756,6 +11540,18 @@ __metadata: languageName: node linkType: hard +"preferred-pm@npm:^3.0.0": + version: 3.0.3 + resolution: "preferred-pm@npm:3.0.3" + dependencies: + find-up: ^5.0.0 + find-yarn-workspace-root2: 1.2.16 + path-exists: ^4.0.0 + which-pm: 2.0.0 + checksum: 0de0948cb6ae22213f2ad7868032d89f1e1443d9caabc22ceeb9d284f19d359d65b67fab178f4db5c8c6ca6ae34642bdc72730b70ab1899ea158e2677a88a6d0 + languageName: node + linkType: hard + "prelude-ls@npm:^1.2.1": version: 1.2.1 resolution: "prelude-ls@npm:1.2.1" @@ -10793,6 +11589,15 @@ __metadata: languageName: node linkType: hard +"prettier@npm:^1.19.1": + version: 1.19.1 + resolution: "prettier@npm:1.19.1" + bin: + prettier: ./bin-prettier.js + checksum: bc78219e0f8173a808f4c6c8e0a137dd8ebd4fbe013e63fe1a37a82b48612f17b8ae8e18a992adf802ee2cf7428f14f084e7c2846ca5759cf4013c6e54810e1f + languageName: node + linkType: hard + "prettier@npm:^2.1.2, prettier@npm:^2.3.1": version: 2.6.2 resolution: "prettier@npm:2.6.2" @@ -10876,7 +11681,7 @@ __metadata: languageName: node linkType: hard -"pseudomap@npm:^1.0.1": +"pseudomap@npm:^1.0.1, pseudomap@npm:^1.0.2": version: 1.0.2 resolution: "pseudomap@npm:1.0.2" checksum: 856c0aae0ff2ad60881168334448e898ad7a0e45fe7386d114b150084254c01e200c957cf378378025df4e052c7890c5bd933939b0e0d2ecfcc1dc2f0b2991f5 @@ -11045,6 +11850,13 @@ __metadata: languageName: node linkType: hard +"quick-lru@npm:^4.0.1": + version: 4.0.1 + resolution: "quick-lru@npm:4.0.1" + checksum: bea46e1abfaa07023e047d3cf1716a06172c4947886c053ede5c50321893711577cb6119360f810cc3ffcd70c4d7db4069c3cee876b358ceff8596e062bd1154 + languageName: node + linkType: hard + "randombytes@npm:^2.0.0, randombytes@npm:^2.0.1, randombytes@npm:^2.0.5, randombytes@npm:^2.0.6, randombytes@npm:^2.1.0": version: 2.1.0 resolution: "randombytes@npm:2.1.0" @@ -11105,6 +11917,17 @@ __metadata: languageName: node linkType: hard +"read-pkg-up@npm:^7.0.1": + version: 7.0.1 + resolution: "read-pkg-up@npm:7.0.1" + dependencies: + find-up: ^4.1.0 + read-pkg: ^5.2.0 + type-fest: ^0.8.1 + checksum: e4e93ce70e5905b490ca8f883eb9e48b5d3cebc6cd4527c25a0d8f3ae2903bd4121c5ab9c5a3e217ada0141098eeb661313c86fa008524b089b8ed0b7f165e44 + languageName: node + linkType: hard + "read-pkg@npm:^1.0.0": version: 1.1.0 resolution: "read-pkg@npm:1.1.0" @@ -11116,6 +11939,30 @@ __metadata: languageName: node linkType: hard +"read-pkg@npm:^5.2.0": + version: 5.2.0 + resolution: "read-pkg@npm:5.2.0" + dependencies: + "@types/normalize-package-data": ^2.4.0 + normalize-package-data: ^2.5.0 + parse-json: ^5.0.0 + type-fest: ^0.6.0 + checksum: eb696e60528b29aebe10e499ba93f44991908c57d70f2d26f369e46b8b9afc208ef11b4ba64f67630f31df8b6872129e0a8933c8c53b7b4daf0eace536901222 + languageName: node + linkType: hard + +"read-yaml-file@npm:^1.1.0": + version: 1.1.0 + resolution: "read-yaml-file@npm:1.1.0" + dependencies: + graceful-fs: ^4.1.5 + js-yaml: ^3.6.1 + pify: ^4.0.1 + strip-bom: ^3.0.0 + checksum: 41ee5f075507ef0403328dd54e225a61c3149f915675ce7fd0fd791ddcce2e6c30a9fe0f76ffa7a465c1c157b9b4ad8ded1dcf47dc3b396103eeb013490bbc2e + languageName: node + linkType: hard + "readable-stream@npm:^1.0.33": version: 1.1.14 resolution: "readable-stream@npm:1.1.14" @@ -11202,6 +12049,16 @@ __metadata: languageName: node linkType: hard +"redent@npm:^3.0.0": + version: 3.0.0 + resolution: "redent@npm:3.0.0" + dependencies: + indent-string: ^4.0.0 + strip-indent: ^3.0.0 + checksum: fa1ef20404a2d399235e83cc80bd55a956642e37dd197b4b612ba7327bf87fa32745aeb4a1634b2bab25467164ab4ed9c15be2c307923dd08b0fe7c52431ae6b + languageName: node + linkType: hard + "reduce-flatten@npm:^2.0.0": version: 2.0.0 resolution: "reduce-flatten@npm:2.0.0" @@ -11223,6 +12080,13 @@ __metadata: languageName: node linkType: hard +"regenerator-runtime@npm:^0.13.4": + version: 0.13.9 + resolution: "regenerator-runtime@npm:0.13.9" + checksum: 65ed455fe5afd799e2897baf691ca21c2772e1a969d19bb0c4695757c2d96249eb74ee3553ea34a91062b2a676beedf630b4c1551cc6299afb937be1426ec55e + languageName: node + linkType: hard + "regenerator-transform@npm:^0.10.0": version: 0.10.1 resolution: "regenerator-transform@npm:0.10.1" @@ -11254,6 +12118,17 @@ __metadata: languageName: node linkType: hard +"regexp.prototype.flags@npm:^1.4.3": + version: 1.4.3 + resolution: "regexp.prototype.flags@npm:1.4.3" + dependencies: + call-bind: ^1.0.2 + define-properties: ^1.1.3 + functions-have-names: ^1.2.2 + checksum: 51228bae732592adb3ededd5e15426be25f289e9c4ef15212f4da73f4ec3919b6140806374b8894036a86020d054a8d2657d3fee6bb9b4d35d8939c20030b7a6 + languageName: node + linkType: hard + "regexpp@npm:^3.0.0, regexpp@npm:^3.2.0": version: 3.2.0 resolution: "regexpp@npm:3.2.0" @@ -11439,6 +12314,13 @@ __metadata: languageName: node linkType: hard +"resolve-from@npm:^5.0.0": + version: 5.0.0 + resolution: "resolve-from@npm:5.0.0" + checksum: 4ceeb9113e1b1372d0cd969f3468fa042daa1dd9527b1b6bb88acb6ab55d8b9cd65dbf18819f9f9ddf0db804990901dcdaade80a215e7b2c23daae38e64f5bdf + languageName: node + linkType: hard + "resolve-url@npm:^0.2.1": version: 0.2.1 resolution: "resolve-url@npm:0.2.1" @@ -11764,7 +12646,7 @@ __metadata: languageName: node linkType: hard -"semver@npm:2 || 3 || 4 || 5, semver@npm:^5.3.0, semver@npm:^5.5.0, semver@npm:^5.6.0, semver@npm:^5.7.0": +"semver@npm:2 || 3 || 4 || 5, semver@npm:^5.3.0, semver@npm:^5.4.1, semver@npm:^5.5.0, semver@npm:^5.6.0, semver@npm:^5.7.0": version: 5.7.1 resolution: "semver@npm:5.7.1" bin: @@ -12046,6 +12928,22 @@ __metadata: languageName: node linkType: hard +"smartwrap@npm:^2.0.2": + version: 2.0.2 + resolution: "smartwrap@npm:2.0.2" + dependencies: + array.prototype.flat: ^1.2.3 + breakword: ^1.0.5 + grapheme-splitter: ^1.0.4 + strip-ansi: ^6.0.0 + wcwidth: ^1.0.1 + yargs: ^15.1.0 + bin: + smartwrap: src/terminal-adapter.js + checksum: 1a6833eb1c3d8488b036df66dcab37dcdda5270bb9629c471155785c09ee1b591177a9774c588c43f8fa28833204500019265da2ffed28ac7bbf4589b943d2fa + languageName: node + linkType: hard + "snapdragon-node@npm:^2.0.1": version: 2.1.1 resolution: "snapdragon-node@npm:2.1.1" @@ -12255,6 +13153,16 @@ __metadata: languageName: node linkType: hard +"spawndamnit@npm:^2.0.0": + version: 2.0.0 + resolution: "spawndamnit@npm:2.0.0" + dependencies: + cross-spawn: ^5.1.0 + signal-exit: ^3.0.2 + checksum: c74b5e264ee5bc13d55692fd422d74c282e4607eb04ac64d19d06796718d89b14921620fa4237ec5635e7acdff21461670ff19850f210225410a353cad0d7fed + languageName: node + linkType: hard + "spdx-correct@npm:^3.0.0": version: 3.1.1 resolution: "spdx-correct@npm:3.1.1" @@ -12385,6 +13293,15 @@ __metadata: languageName: node linkType: hard +"stream-transform@npm:^2.1.3": + version: 2.1.3 + resolution: "stream-transform@npm:2.1.3" + dependencies: + mixme: ^0.5.1 + checksum: 26ce872a6812d5c784fa1f042bfd403644bc1c019f64627b5012c4544830a5570bef98b47225b38120c5878b326f3d1a213cd999a2285c98b536e5e202ca5bdf + languageName: node + linkType: hard + "strict-uri-encode@npm:^1.0.0": version: 1.1.0 resolution: "strict-uri-encode@npm:1.1.0" @@ -12463,6 +13380,17 @@ __metadata: languageName: node linkType: hard +"string.prototype.trimend@npm:^1.0.5": + version: 1.0.5 + resolution: "string.prototype.trimend@npm:1.0.5" + dependencies: + call-bind: ^1.0.2 + define-properties: ^1.1.4 + es-abstract: ^1.19.5 + checksum: d44f543833112f57224e79182debadc9f4f3bf9d48a0414d6f0cbd2a86f2b3e8c0ca1f95c3f8e5b32ae83e91554d79d932fc746b411895f03f93d89ed3dfb6bc + languageName: node + linkType: hard + "string.prototype.trimstart@npm:^1.0.4": version: 1.0.4 resolution: "string.prototype.trimstart@npm:1.0.4" @@ -12473,6 +13401,17 @@ __metadata: languageName: node linkType: hard +"string.prototype.trimstart@npm:^1.0.5": + version: 1.0.5 + resolution: "string.prototype.trimstart@npm:1.0.5" + dependencies: + call-bind: ^1.0.2 + define-properties: ^1.1.4 + es-abstract: ^1.19.5 + checksum: a4857c5399ad709d159a77371eeaa8f9cc284469a0b5e1bfe405de16f1fd4166a8ea6f4180e55032f348d1b679b1599fd4301fbc7a8b72bdb3e795e43f7b1048 + languageName: node + linkType: hard + "string_decoder@npm:^1.1.1": version: 1.3.0 resolution: "string_decoder@npm:1.3.0" @@ -12559,6 +13498,15 @@ __metadata: languageName: node linkType: hard +"strip-indent@npm:^3.0.0": + version: 3.0.0 + resolution: "strip-indent@npm:3.0.0" + dependencies: + min-indent: ^1.0.0 + checksum: 18f045d57d9d0d90cd16f72b2313d6364fd2cb4bf85b9f593523ad431c8720011a4d5f08b6591c9d580f446e78855c5334a30fb91aa1560f5d9f95ed1b4a0530 + languageName: node + linkType: hard + "strip-json-comments@npm:2.0.1": version: 2.0.1 resolution: "strip-json-comments@npm:2.0.1" @@ -12737,6 +13685,13 @@ __metadata: languageName: node linkType: hard +"term-size@npm:^2.1.0": + version: 2.2.1 + resolution: "term-size@npm:2.2.1" + checksum: 1ed981335483babc1e8206f843e06bd2bf89b85f0bf5a9a9d928033a0fcacdba183c03ba7d91814643015543ba002f1339f7112402a21da8f24b6c56b062a5a9 + languageName: node + linkType: hard + "test-value@npm:^2.1.0": version: 2.1.0 resolution: "test-value@npm:2.1.0" @@ -12900,6 +13855,13 @@ __metadata: languageName: node linkType: hard +"trim-newlines@npm:^3.0.0": + version: 3.0.1 + resolution: "trim-newlines@npm:3.0.1" + checksum: b530f3fadf78e570cf3c761fb74fef655beff6b0f84b29209bac6c9622db75ad1417f4a7b5d54c96605dcd72734ad44526fef9f396807b90839449eb543c6206 + languageName: node + linkType: hard + "trim-right@npm:^1.0.1": version: 1.0.1 resolution: "trim-right@npm:1.0.1" @@ -13089,6 +14051,23 @@ __metadata: languageName: node linkType: hard +"tty-table@npm:^4.1.5": + version: 4.1.6 + resolution: "tty-table@npm:4.1.6" + dependencies: + chalk: ^4.1.2 + csv: ^5.5.0 + kleur: ^4.1.4 + smartwrap: ^2.0.2 + strip-ansi: ^6.0.0 + wcwidth: ^1.0.1 + yargs: ^17.1.1 + bin: + tty-table: adapters/terminal-adapter.js + checksum: 0f689b7d79ad6b9e608299e667a493309901fe802f1c4d66627a90cacb6fe11e0521e1a2dc5a75f793750ecdd849e98292d4874e5e6e988edd928b67045eb847 + languageName: node + linkType: hard + "tunnel-agent@npm:^0.6.0": version: 0.6.0 resolution: "tunnel-agent@npm:0.6.0" @@ -13144,6 +14123,13 @@ __metadata: languageName: node linkType: hard +"type-fest@npm:^0.13.1": + version: 0.13.1 + resolution: "type-fest@npm:0.13.1" + checksum: e6bf2e3c449f27d4ef5d56faf8b86feafbc3aec3025fc9a5fbe2db0a2587c44714521f9c30d8516a833c8c506d6263f5cc11267522b10c6ccdb6cc55b0a9d1c4 + languageName: node + linkType: hard + "type-fest@npm:^0.20.2": version: 0.20.2 resolution: "type-fest@npm:0.20.2" @@ -13158,6 +14144,13 @@ __metadata: languageName: node linkType: hard +"type-fest@npm:^0.6.0": + version: 0.6.0 + resolution: "type-fest@npm:0.6.0" + checksum: b2188e6e4b21557f6e92960ec496d28a51d68658018cba8b597bd3ef757721d1db309f120ae987abeeda874511d14b776157ff809f23c6d1ce8f83b9b2b7d60f + languageName: node + linkType: hard + "type-fest@npm:^0.7.1": version: 0.7.1 resolution: "type-fest@npm:0.7.1" @@ -13165,6 +14158,13 @@ __metadata: languageName: node linkType: hard +"type-fest@npm:^0.8.1": + version: 0.8.1 + resolution: "type-fest@npm:0.8.1" + checksum: d61c4b2eba24009033ae4500d7d818a94fd6d1b481a8111612ee141400d5f1db46f199c014766b9fa9b31a6a7374d96fc748c6d688a78a3ce5a33123839becb7 + languageName: node + linkType: hard + "type-is@npm:~1.6.18": version: 1.6.18 resolution: "type-is@npm:1.6.18" @@ -13336,6 +14336,18 @@ __metadata: languageName: node linkType: hard +"unbox-primitive@npm:^1.0.2": + version: 1.0.2 + resolution: "unbox-primitive@npm:1.0.2" + dependencies: + call-bind: ^1.0.2 + has-bigints: ^1.0.2 + has-symbols: ^1.0.3 + which-boxed-primitive: ^1.0.2 + checksum: b7a1cf5862b5e4b5deb091672ffa579aa274f648410009c81cca63fed3b62b610c4f3b773f912ce545bb4e31edc3138975b5bc777fc6e4817dca51affb6380e9 + languageName: node + linkType: hard + "underscore@npm:1.9.1": version: 1.9.1 resolution: "underscore@npm:1.9.1" @@ -14307,6 +15319,16 @@ __metadata: languageName: node linkType: hard +"which-pm@npm:2.0.0": + version: 2.0.0 + resolution: "which-pm@npm:2.0.0" + dependencies: + load-yaml-file: ^0.2.0 + path-exists: ^4.0.0 + checksum: e556635eaf237b3a101043a21c2890af045db40eac4df3575161d4fb834c2aa65456f81c60d8ea4db2d51fe5ac549d989eeabd17278767c2e4179361338ac5ce + languageName: node + linkType: hard + "which-typed-array@npm:^1.1.2": version: 1.1.7 resolution: "which-typed-array@npm:1.1.7" @@ -14422,6 +15444,17 @@ __metadata: languageName: node linkType: hard +"wrap-ansi@npm:^6.2.0": + version: 6.2.0 + resolution: "wrap-ansi@npm:6.2.0" + dependencies: + ansi-styles: ^4.0.0 + string-width: ^4.1.0 + strip-ansi: ^6.0.0 + checksum: 6cd96a410161ff617b63581a08376f0cb9162375adeb7956e10c8cd397821f7eb2a6de24eb22a0b28401300bf228c86e50617cd568209b5f6775b93c97d2fe3a + languageName: node + linkType: hard + "wrap-ansi@npm:^7.0.0": version: 7.0.0 resolution: "wrap-ansi@npm:7.0.0" @@ -14586,6 +15619,13 @@ __metadata: languageName: node linkType: hard +"yallist@npm:^2.1.2": + version: 2.1.2 + resolution: "yallist@npm:2.1.2" + checksum: 9ba99409209f485b6fcb970330908a6d41fa1c933f75e08250316cce19383179a6b70a7e0721b89672ebb6199cc377bf3e432f55100da6a7d6e11902b0a642cb + languageName: node + linkType: hard + "yallist@npm:^3.0.0, yallist@npm:^3.0.2, yallist@npm:^3.1.1": version: 3.1.1 resolution: "yallist@npm:3.1.1" @@ -14617,6 +15657,16 @@ __metadata: languageName: node linkType: hard +"yargs-parser@npm:^18.1.2, yargs-parser@npm:^18.1.3": + version: 18.1.3 + resolution: "yargs-parser@npm:18.1.3" + dependencies: + camelcase: ^5.0.0 + decamelize: ^1.2.0 + checksum: 60e8c7d1b85814594d3719300ecad4e6ae3796748b0926137bfec1f3042581b8646d67e83c6fc80a692ef08b8390f21ddcacb9464476c39bbdf52e34961dd4d9 + languageName: node + linkType: hard + "yargs-parser@npm:^2.4.1": version: 2.4.1 resolution: "yargs-parser@npm:2.4.1" @@ -14634,6 +15684,13 @@ __metadata: languageName: node linkType: hard +"yargs-parser@npm:^21.0.0": + version: 21.0.1 + resolution: "yargs-parser@npm:21.0.1" + checksum: c3ea2ed12cad0377ce3096b3f138df8267edf7b1aa7d710cd502fe16af417bafe4443dd71b28158c22fcd1be5dfd0e86319597e47badf42ff83815485887323a + languageName: node + linkType: hard + "yargs-unparser@npm:1.6.0": version: 1.6.0 resolution: "yargs-unparser@npm:1.6.0" @@ -14690,6 +15747,40 @@ __metadata: languageName: node linkType: hard +"yargs@npm:^15.1.0": + version: 15.4.1 + resolution: "yargs@npm:15.4.1" + dependencies: + cliui: ^6.0.0 + decamelize: ^1.2.0 + find-up: ^4.1.0 + get-caller-file: ^2.0.1 + require-directory: ^2.1.1 + require-main-filename: ^2.0.0 + set-blocking: ^2.0.0 + string-width: ^4.2.0 + which-module: ^2.0.0 + y18n: ^4.0.0 + yargs-parser: ^18.1.2 + checksum: 40b974f508d8aed28598087720e086ecd32a5fd3e945e95ea4457da04ee9bdb8bdd17fd91acff36dc5b7f0595a735929c514c40c402416bbb87c03f6fb782373 + languageName: node + linkType: hard + +"yargs@npm:^17.1.1": + version: 17.5.1 + resolution: "yargs@npm:17.5.1" + dependencies: + cliui: ^7.0.2 + escalade: ^3.1.1 + get-caller-file: ^2.0.5 + require-directory: ^2.1.1 + string-width: ^4.2.3 + y18n: ^5.0.5 + yargs-parser: ^21.0.0 + checksum: 00d58a2c052937fa044834313f07910fd0a115dec5ee35919e857eeee3736b21a4eafa8264535800ba8bac312991ce785ecb8a51f4d2cc8c4676d865af1cfbde + languageName: node + linkType: hard + "yargs@npm:^4.7.1": version: 4.8.1 resolution: "yargs@npm:4.8.1" @@ -14737,6 +15828,7 @@ __metadata: version: 0.0.0-use.local resolution: "zetachain@workspace:." dependencies: + "@changesets/cli": ^2.23.1 "@nomiclabs/hardhat-ethers": ^2.0.5 "@nomiclabs/hardhat-etherscan": 3.0.3 "@nomiclabs/hardhat-waffle": ^2.0.3 From 501b847578bd4d6a43541d3d42af1a53334fa12e Mon Sep 17 00:00:00 2001 From: Andres Martin Aiello <50411235+andresaiello@users.noreply.github.com> Date: Wed, 3 Aug 2022 16:10:48 -0300 Subject: [PATCH 031/115] Improve zetaValueAndgGas naming (#39) * ignore from npm examples and address * Improve zetavalueandgas naming * restore pkg * update connector * add comment --- .../test/CounterZetaConnectorMock.sol | 8 ++--- .../test/CrossChainMessageConnector.sol | 8 ++--- .../CrossChainWarriorsZetaConnectorMock.sol | 8 ++--- .../multi-chain-swap/MultiChainSwap.base.sol | 28 ++++++++------- .../test/MultiChainSwapZetaConnector.sol | 8 ++--- .../test/CrossChainCounter.spec.ts | 2 +- .../test/CrossChainMessage.spec.ts | 2 +- .../test/CrossChainWarriors.spec.ts | 2 +- .../test/MultiChainSwap.spec.ts | 4 +-- .../test/MultiChainValue.spec.ts | 12 ++----- .../contracts/ZetaConnector.base.sol | 8 ++--- .../contracts/ZetaConnector.eth.sol | 29 +++++----------- .../contracts/ZetaConnector.non-eth.sol | 34 ++++++------------- .../contracts/interfaces/ZetaInterfaces.sol | 6 ++-- .../test/ZetaInteractor.spec.ts | 6 ++-- 15 files changed, 69 insertions(+), 96 deletions(-) diff --git a/packages/example-contracts/contracts/cross-chain-counter/test/CounterZetaConnectorMock.sol b/packages/example-contracts/contracts/cross-chain-counter/test/CounterZetaConnectorMock.sol index 22b2507e..7093d8e3 100644 --- a/packages/example-contracts/contracts/cross-chain-counter/test/CounterZetaConnectorMock.sol +++ b/packages/example-contracts/contracts/cross-chain-counter/test/CounterZetaConnectorMock.sol @@ -10,7 +10,7 @@ contract CounterZetaConnectorMock is ZetaConnector { bytes memory zetaTxSenderAddress, uint256 sourceChainId, address destinationAddress, - uint256 zetaValueAndGas, + uint256 zetaValue, bytes calldata message ) public { return @@ -19,7 +19,7 @@ contract CounterZetaConnectorMock is ZetaConnector { zetaTxSenderAddress: zetaTxSenderAddress, sourceChainId: sourceChainId, destinationAddress: destinationAddress, - zetaValueAndGas: zetaValueAndGas, + zetaValue: zetaValue, message: message }) ); @@ -30,7 +30,7 @@ contract CounterZetaConnectorMock is ZetaConnector { uint256 sourceChainId, uint256 destinationChainId, bytes calldata destinationAddress, - uint256 zetaValueAndGas, + uint256 remainingZetaValue, uint256, // destinationGasLimit bytes calldata message ) public { @@ -41,7 +41,7 @@ contract CounterZetaConnectorMock is ZetaConnector { sourceChainId: sourceChainId, destinationAddress: destinationAddress, destinationChainId: destinationChainId, - zetaValueAndGas: zetaValueAndGas, + remainingZetaValue: remainingZetaValue, message: message }) ); diff --git a/packages/example-contracts/contracts/cross-chain-message/test/CrossChainMessageConnector.sol b/packages/example-contracts/contracts/cross-chain-message/test/CrossChainMessageConnector.sol index e641c763..31be1252 100644 --- a/packages/example-contracts/contracts/cross-chain-message/test/CrossChainMessageConnector.sol +++ b/packages/example-contracts/contracts/cross-chain-message/test/CrossChainMessageConnector.sol @@ -10,7 +10,7 @@ contract CrossChainMessageConnector is ZetaConnector { bytes memory zetaTxSenderAddress, uint256 sourceChainId, address destinationAddress, - uint256 zetaValueAndGas, + uint256 zetaValue, bytes calldata message ) public { return @@ -19,7 +19,7 @@ contract CrossChainMessageConnector is ZetaConnector { zetaTxSenderAddress: zetaTxSenderAddress, sourceChainId: sourceChainId, destinationAddress: destinationAddress, - zetaValueAndGas: zetaValueAndGas, + zetaValue: zetaValue, message: message }) ); @@ -30,7 +30,7 @@ contract CrossChainMessageConnector is ZetaConnector { uint256 sourceChainId, uint256 destinationChainId, bytes calldata destinationAddress, - uint256 zetaValueAndGas, + uint256 remainingZetaValue, uint256, // destinationGasLimit bytes calldata message ) public { @@ -41,7 +41,7 @@ contract CrossChainMessageConnector is ZetaConnector { sourceChainId: sourceChainId, destinationAddress: destinationAddress, destinationChainId: destinationChainId, - zetaValueAndGas: zetaValueAndGas, + remainingZetaValue: remainingZetaValue, message: message }) ); diff --git a/packages/example-contracts/contracts/cross-chain-warriors/test/CrossChainWarriorsZetaConnectorMock.sol b/packages/example-contracts/contracts/cross-chain-warriors/test/CrossChainWarriorsZetaConnectorMock.sol index 6acdad3f..bc4a3795 100644 --- a/packages/example-contracts/contracts/cross-chain-warriors/test/CrossChainWarriorsZetaConnectorMock.sol +++ b/packages/example-contracts/contracts/cross-chain-warriors/test/CrossChainWarriorsZetaConnectorMock.sol @@ -10,7 +10,7 @@ contract CrossChainWarriorsZetaConnectorMock is ZetaConnector { bytes memory zetaTxSenderAddress, uint256 sourceChainId, address destinationAddress, - uint256 zetaValueAndGas, + uint256 zetaValue, bytes calldata message ) public { return @@ -19,7 +19,7 @@ contract CrossChainWarriorsZetaConnectorMock is ZetaConnector { zetaTxSenderAddress: zetaTxSenderAddress, sourceChainId: sourceChainId, destinationAddress: destinationAddress, - zetaValueAndGas: zetaValueAndGas, + zetaValue: zetaValue, message: message }) ); @@ -30,7 +30,7 @@ contract CrossChainWarriorsZetaConnectorMock is ZetaConnector { uint256 sourceChainId, uint256 destinationChainId, bytes calldata destinationAddress, - uint256 zetaValueAndGas, + uint256 remainingZetaValue, uint256, // destinationGasLimit bytes calldata message ) public { @@ -41,7 +41,7 @@ contract CrossChainWarriorsZetaConnectorMock is ZetaConnector { sourceChainId: sourceChainId, destinationAddress: destinationAddress, destinationChainId: destinationChainId, - zetaValueAndGas: zetaValueAndGas, + remainingZetaValue: remainingZetaValue, message: message }) ); diff --git a/packages/example-contracts/contracts/multi-chain-swap/MultiChainSwap.base.sol b/packages/example-contracts/contracts/multi-chain-swap/MultiChainSwap.base.sol index 35fbf8ba..627d4401 100644 --- a/packages/example-contracts/contracts/multi-chain-swap/MultiChainSwap.base.sol +++ b/packages/example-contracts/contracts/multi-chain-swap/MultiChainSwap.base.sol @@ -240,18 +240,18 @@ contract MultiChainSwapBase is ZetaInteractor, ZetaReceiver, MultiChainSwapError uint256 outTokenFinalAmount; if (destinationOutToken == zetaToken) { - if (zetaMessage.zetaValueAndGas < outTokenMinAmount) revert InsufficientOutToken(); + if (zetaMessage.zetaValue < outTokenMinAmount) revert InsufficientOutToken(); - bool success = IERC20(zetaToken).transfer(receiverAddress, zetaMessage.zetaValueAndGas); + bool success = IERC20(zetaToken).transfer(receiverAddress, zetaMessage.zetaValue); if (!success) revert ErrorTransferringTokens(zetaToken); - outTokenFinalAmount = zetaMessage.zetaValueAndGas; + outTokenFinalAmount = zetaMessage.zetaValue; } else { /** * @dev If the out token is not Zeta, get it using Uniswap */ { - bool success = IERC20(zetaToken).approve(uniswapV2RouterAddress, zetaMessage.zetaValueAndGas); + bool success = IERC20(zetaToken).approve(uniswapV2RouterAddress, zetaMessage.zetaValue); if (!success) revert ErrorApprovingTokens(zetaToken); } @@ -270,7 +270,7 @@ contract MultiChainSwapBase is ZetaInteractor, ZetaReceiver, MultiChainSwapError uint256[] memory amounts; if (isDestinationOutETH) { amounts = uniswapV2Router.swapExactTokensForETH( - zetaMessage.zetaValueAndGas, + zetaMessage.zetaValue, outTokenMinAmount, path, receiverAddress, @@ -278,7 +278,7 @@ contract MultiChainSwapBase is ZetaInteractor, ZetaReceiver, MultiChainSwapError ); } else { amounts = uniswapV2Router.swapExactTokensForTokens( - zetaMessage.zetaValueAndGas, + zetaMessage.zetaValue, outTokenMinAmount, path, receiverAddress, @@ -323,16 +323,20 @@ contract MultiChainSwapBase is ZetaInteractor, ZetaReceiver, MultiChainSwapError uint256 inputTokenReturnedAmount; if (sourceInputToken == zetaToken) { - bool success1 = IERC20(zetaToken).approve(address(this), zetaRevert.zetaValueAndGas); - bool success2 = IERC20(zetaToken).transferFrom(address(this), sourceTxOrigin, zetaRevert.zetaValueAndGas); + bool success1 = IERC20(zetaToken).approve(address(this), zetaRevert.remainingZetaValue); + bool success2 = IERC20(zetaToken).transferFrom( + address(this), + sourceTxOrigin, + zetaRevert.remainingZetaValue + ); if (!success1 || !success2) revert ErrorTransferringTokens(zetaToken); - inputTokenReturnedAmount = zetaRevert.zetaValueAndGas; + inputTokenReturnedAmount = zetaRevert.remainingZetaValue; } else { /** * @dev If the source input token is not Zeta, trade it using Uniswap */ { - bool success = IERC20(zetaToken).approve(uniswapV2RouterAddress, zetaRevert.zetaValueAndGas); + bool success = IERC20(zetaToken).approve(uniswapV2RouterAddress, zetaRevert.remainingZetaValue); if (!success) revert ErrorTransferringTokens(zetaToken); } @@ -352,7 +356,7 @@ contract MultiChainSwapBase is ZetaInteractor, ZetaReceiver, MultiChainSwapError if (inputTokenIsETH) { amounts = uniswapV2Router.swapExactTokensForETH( - zetaRevert.zetaValueAndGas, + zetaRevert.remainingZetaValue, 0, /// @dev Any output is fine, otherwise the value will be stuck in the contract path, sourceTxOrigin, @@ -360,7 +364,7 @@ contract MultiChainSwapBase is ZetaInteractor, ZetaReceiver, MultiChainSwapError ); } else { amounts = uniswapV2Router.swapExactTokensForTokens( - zetaRevert.zetaValueAndGas, + zetaRevert.remainingZetaValue, 0, /// @dev Any output is fine, otherwise the value will be stuck in the contract path, sourceTxOrigin, diff --git a/packages/example-contracts/contracts/multi-chain-swap/test/MultiChainSwapZetaConnector.sol b/packages/example-contracts/contracts/multi-chain-swap/test/MultiChainSwapZetaConnector.sol index e37cd10d..2ecc1d33 100644 --- a/packages/example-contracts/contracts/multi-chain-swap/test/MultiChainSwapZetaConnector.sol +++ b/packages/example-contracts/contracts/multi-chain-swap/test/MultiChainSwapZetaConnector.sol @@ -16,7 +16,7 @@ contract MultiChainSwapZetaConnector is ZetaConnector { bytes memory zetaTxSenderAddress, uint256 sourceChainId, address destinationAddress, - uint256 zetaValueAndGas, + uint256 zetaValue, bytes calldata message ) public { return @@ -25,7 +25,7 @@ contract MultiChainSwapZetaConnector is ZetaConnector { zetaTxSenderAddress: zetaTxSenderAddress, sourceChainId: sourceChainId, destinationAddress: destinationAddress, - zetaValueAndGas: zetaValueAndGas, + zetaValue: zetaValue, message: message }) ); @@ -36,7 +36,7 @@ contract MultiChainSwapZetaConnector is ZetaConnector { uint256 sourceChainId, uint256 destinationChainId, bytes calldata destinationAddress, - uint256 zetaValueAndGas, + uint256 remainingZetaValue, uint256, // destinationGasLimit bytes calldata message ) public { @@ -47,7 +47,7 @@ contract MultiChainSwapZetaConnector is ZetaConnector { sourceChainId: sourceChainId, destinationAddress: destinationAddress, destinationChainId: destinationChainId, - zetaValueAndGas: zetaValueAndGas, + remainingZetaValue: remainingZetaValue, message: message }) ); diff --git a/packages/example-contracts/test/CrossChainCounter.spec.ts b/packages/example-contracts/test/CrossChainCounter.spec.ts index 4b94fbea..66f3ad67 100644 --- a/packages/example-contracts/test/CrossChainCounter.spec.ts +++ b/packages/example-contracts/test/CrossChainCounter.spec.ts @@ -64,7 +64,7 @@ describe("CrossChainCounter tests", () => { message: encoder.encode(["address"], [deployerAddress]), sourceChainId: 1, zetaTxSenderAddress: ethers.utils.solidityPack(["address"], [crossChainCounterContractA.address]), - zetaValueAndGas: 0, + zetaValue: 0, }) ).to.be.revertedWith(`InvalidCaller("${deployer.address}")`); }); diff --git a/packages/example-contracts/test/CrossChainMessage.spec.ts b/packages/example-contracts/test/CrossChainMessage.spec.ts index e6fc4fe2..ba408e41 100644 --- a/packages/example-contracts/test/CrossChainMessage.spec.ts +++ b/packages/example-contracts/test/CrossChainMessage.spec.ts @@ -99,7 +99,7 @@ describe("CrossChainMessage tests", () => { message: encoder.encode(["address", "string"], [deployerAddress, SAMPLE_TEXT]), sourceChainId: 1, zetaTxSenderAddress: ethers.utils.solidityPack(["address"], [crossChainMessageContractChainA.address]), - zetaValueAndGas: 0, + zetaValue: 0, }) ).to.be.revertedWith(`InvalidCaller("${deployer.address}")`); }); diff --git a/packages/example-contracts/test/CrossChainWarriors.spec.ts b/packages/example-contracts/test/CrossChainWarriors.spec.ts index d1088770..99817bc7 100644 --- a/packages/example-contracts/test/CrossChainWarriors.spec.ts +++ b/packages/example-contracts/test/CrossChainWarriors.spec.ts @@ -170,7 +170,7 @@ describe("CrossChainWarriors tests", () => { message: encoder.encode(["address"], [deployerAddress]), sourceChainId: 1, zetaTxSenderAddress: ethers.utils.solidityPack(["address"], [crossChainWarriorsContractChainA.address]), - zetaValueAndGas: 0, + zetaValue: 0, }) ).to.be.revertedWith(`InvalidCaller("${deployer.address}")`); }); diff --git a/packages/example-contracts/test/MultiChainSwap.spec.ts b/packages/example-contracts/test/MultiChainSwap.spec.ts index ea86552e..e4314bbf 100644 --- a/packages/example-contracts/test/MultiChainSwap.spec.ts +++ b/packages/example-contracts/test/MultiChainSwap.spec.ts @@ -406,7 +406,7 @@ describe("MultiChainSwap tests", () => { message: encoder.encode(["address"], [multiChainSwapContractA.address]), sourceChainId: chainBId, zetaTxSenderAddress: ethers.utils.solidityPack(["address"], [multiChainSwapContractA.address]), - zetaValueAndGas: 0, + zetaValue: 0, }) ).to.be.revertedWith(getCustomErrorMessage("InvalidCaller", [deployer.address])); }); @@ -431,9 +431,9 @@ describe("MultiChainSwap tests", () => { destinationAddress: ethers.utils.solidityPack(["address"], [multiChainSwapContractB.address]), destinationChainId: chainBId, message: encoder.encode(["address"], [multiChainSwapContractA.address]), + remainingZetaValue: 0, sourceChainId: chainAId, zetaTxSenderAddress: deployer.address, - zetaValueAndGas: 0, }) ).to.be.revertedWith(getCustomErrorMessage("InvalidCaller", [deployer.address])); }); diff --git a/packages/example-contracts/test/MultiChainValue.spec.ts b/packages/example-contracts/test/MultiChainValue.spec.ts index 41273a28..7af7cf2b 100644 --- a/packages/example-contracts/test/MultiChainValue.spec.ts +++ b/packages/example-contracts/test/MultiChainValue.spec.ts @@ -43,9 +43,7 @@ describe("MultiChainValue tests", () => { it("Should prevent enabling a chainId that's already enabled", async () => { await (await multiChainValueContractA.addAvailableChainId(1)).wait(); - await expect(multiChainValueContractA.addAvailableChainId(1)).to.be.revertedWith( - "ChainIdAlreadyEnabled()" - ); + await expect(multiChainValueContractA.addAvailableChainId(1)).to.be.revertedWith("ChainIdAlreadyEnabled()"); }); it("Should enable the provided chainId", async () => { @@ -57,9 +55,7 @@ describe("MultiChainValue tests", () => { describe("removeAvailableChainId", () => { it("Should prevent disabling a chainId that's already disabled", async () => { - await expect(multiChainValueContractA.removeAvailableChainId(1)).to.be.revertedWith( - "ChainIdNotAvailable()" - ); + await expect(multiChainValueContractA.removeAvailableChainId(1)).to.be.revertedWith("ChainIdNotAvailable()"); }); it("Should disable the provided chainId", async () => { @@ -81,9 +77,7 @@ describe("MultiChainValue tests", () => { it("Should prevent sending 0 value", async () => { await (await multiChainValueContractA.addAvailableChainId(1)).wait(); - await expect(multiChainValueContractA.send(1, account1Address, 0)).to.be.revertedWith( - "InvalidZetaValueAndGas()" - ); + await expect(multiChainValueContractA.send(1, account1Address, 0)).to.be.revertedWith("InvalidZetaValueAndGas()"); }); it("Should prevent sending if the account has no Zeta balance", async () => { diff --git a/packages/protocol-contracts/contracts/ZetaConnector.base.sol b/packages/protocol-contracts/contracts/ZetaConnector.base.sol index 24092f74..af5803ec 100644 --- a/packages/protocol-contracts/contracts/ZetaConnector.base.sol +++ b/packages/protocol-contracts/contracts/ZetaConnector.base.sol @@ -34,7 +34,7 @@ contract ZetaConnectorBase is ConnectorErrors, Pausable { bytes zetaTxSenderAddress, uint256 indexed sourceChainId, address indexed destinationAddress, - uint256 zetaValueAndGas, + uint256 zetaValue, bytes message, bytes32 indexed internalSendHash ); @@ -44,7 +44,7 @@ contract ZetaConnectorBase is ConnectorErrors, Pausable { uint256 sourceChainId, uint256 indexed destinationChainId, bytes indexed destinationAddress, - uint256 zetaValueAndGas, + uint256 remainingZetaValue, bytes message, bytes32 indexed internalSendHash ); @@ -129,7 +129,7 @@ contract ZetaConnectorBase is ConnectorErrors, Pausable { bytes calldata zetaTxSenderAddress, uint256 sourceChainId, address destinationAddress, - uint256 zetaValueAndGas, + uint256 zetaValue, bytes calldata message, bytes32 internalSendHash ) external virtual {} @@ -139,7 +139,7 @@ contract ZetaConnectorBase is ConnectorErrors, Pausable { uint256 sourceChainId, bytes calldata destinationAddress, uint256 destinationChainId, - uint256 zetaValueAndGas, + uint256 remainingZetaValue, bytes calldata message, bytes32 internalSendHash ) external virtual {} diff --git a/packages/protocol-contracts/contracts/ZetaConnector.eth.sol b/packages/protocol-contracts/contracts/ZetaConnector.eth.sol index 09a32d6d..bc3ffcf1 100644 --- a/packages/protocol-contracts/contracts/ZetaConnector.eth.sol +++ b/packages/protocol-contracts/contracts/ZetaConnector.eth.sol @@ -39,33 +39,20 @@ contract ZetaConnectorEth is ZetaConnectorBase { bytes calldata zetaTxSenderAddress, uint256 sourceChainId, address destinationAddress, - uint256 zetaValueAndGas, + uint256 zetaValue, bytes calldata message, bytes32 internalSendHash ) external override whenNotPaused onlyTssAddress { - bool success = IERC20(zetaToken).transfer(destinationAddress, zetaValueAndGas); + bool success = IERC20(zetaToken).transfer(destinationAddress, zetaValue); if (!success) revert ZetaTransferError(); if (message.length > 0) { ZetaReceiver(destinationAddress).onZetaMessage( - ZetaInterfaces.ZetaMessage( - zetaTxSenderAddress, - sourceChainId, - destinationAddress, - zetaValueAndGas, - message - ) + ZetaInterfaces.ZetaMessage(zetaTxSenderAddress, sourceChainId, destinationAddress, zetaValue, message) ); } - emit ZetaReceived( - zetaTxSenderAddress, - sourceChainId, - destinationAddress, - zetaValueAndGas, - message, - internalSendHash - ); + emit ZetaReceived(zetaTxSenderAddress, sourceChainId, destinationAddress, zetaValue, message, internalSendHash); } function onRevert( @@ -73,11 +60,11 @@ contract ZetaConnectorEth is ZetaConnectorBase { uint256 sourceChainId, bytes calldata destinationAddress, uint256 destinationChainId, - uint256 zetaValueAndGas, + uint256 remainingZetaValue, bytes calldata message, bytes32 internalSendHash ) external override whenNotPaused onlyTssAddress { - bool success = IERC20(zetaToken).transfer(zetaTxSenderAddress, zetaValueAndGas); + bool success = IERC20(zetaToken).transfer(zetaTxSenderAddress, remainingZetaValue); if (!success) revert ZetaTransferError(); if (message.length > 0) { @@ -87,7 +74,7 @@ contract ZetaConnectorEth is ZetaConnectorBase { sourceChainId, destinationAddress, destinationChainId, - zetaValueAndGas, + remainingZetaValue, message ) ); @@ -98,7 +85,7 @@ contract ZetaConnectorEth is ZetaConnectorBase { sourceChainId, destinationChainId, destinationAddress, - zetaValueAndGas, + remainingZetaValue, message, internalSendHash ); diff --git a/packages/protocol-contracts/contracts/ZetaConnector.non-eth.sol b/packages/protocol-contracts/contracts/ZetaConnector.non-eth.sol index 9370a9d0..4b891023 100644 --- a/packages/protocol-contracts/contracts/ZetaConnector.non-eth.sol +++ b/packages/protocol-contracts/contracts/ZetaConnector.non-eth.sol @@ -44,34 +44,20 @@ contract ZetaConnectorNonEth is ZetaConnectorBase { bytes calldata zetaTxSenderAddress, uint256 sourceChainId, address destinationAddress, - uint256 zetaValueAndGas, + uint256 zetaValue, bytes calldata message, bytes32 internalSendHash ) external override whenNotPaused onlyTssAddress { - if (zetaValueAndGas + ZetaNonEthInterface(zetaToken).totalSupply() > maxSupply) - revert ExceedsMaxSupply(maxSupply); - ZetaNonEthInterface(zetaToken).mint(destinationAddress, zetaValueAndGas, internalSendHash); + if (zetaValue + ZetaNonEthInterface(zetaToken).totalSupply() > maxSupply) revert ExceedsMaxSupply(maxSupply); + ZetaNonEthInterface(zetaToken).mint(destinationAddress, zetaValue, internalSendHash); if (message.length > 0) { ZetaReceiver(destinationAddress).onZetaMessage( - ZetaInterfaces.ZetaMessage( - zetaTxSenderAddress, - sourceChainId, - destinationAddress, - zetaValueAndGas, - message - ) + ZetaInterfaces.ZetaMessage(zetaTxSenderAddress, sourceChainId, destinationAddress, zetaValue, message) ); } - emit ZetaReceived( - zetaTxSenderAddress, - sourceChainId, - destinationAddress, - zetaValueAndGas, - message, - internalSendHash - ); + emit ZetaReceived(zetaTxSenderAddress, sourceChainId, destinationAddress, zetaValue, message, internalSendHash); } function onRevert( @@ -79,13 +65,13 @@ contract ZetaConnectorNonEth is ZetaConnectorBase { uint256 sourceChainId, bytes calldata destinationAddress, uint256 destinationChainId, - uint256 zetaValueAndGas, + uint256 remainingZetaValue, bytes calldata message, bytes32 internalSendHash ) external override whenNotPaused onlyTssAddress { - if (zetaValueAndGas + ZetaNonEthInterface(zetaToken).totalSupply() > maxSupply) + if (remainingZetaValue + ZetaNonEthInterface(zetaToken).totalSupply() > maxSupply) revert ExceedsMaxSupply(maxSupply); - ZetaNonEthInterface(zetaToken).mint(zetaTxSenderAddress, zetaValueAndGas, internalSendHash); + ZetaNonEthInterface(zetaToken).mint(zetaTxSenderAddress, remainingZetaValue, internalSendHash); if (message.length > 0) { ZetaReceiver(zetaTxSenderAddress).onZetaRevert( @@ -94,7 +80,7 @@ contract ZetaConnectorNonEth is ZetaConnectorBase { sourceChainId, destinationAddress, destinationChainId, - zetaValueAndGas, + remainingZetaValue, message ) ); @@ -105,7 +91,7 @@ contract ZetaConnectorNonEth is ZetaConnectorBase { sourceChainId, destinationChainId, destinationAddress, - zetaValueAndGas, + remainingZetaValue, message, internalSendHash ); diff --git a/packages/protocol-contracts/contracts/interfaces/ZetaInterfaces.sol b/packages/protocol-contracts/contracts/interfaces/ZetaInterfaces.sol index b6eb7532..ce46579e 100644 --- a/packages/protocol-contracts/contracts/interfaces/ZetaInterfaces.sol +++ b/packages/protocol-contracts/contracts/interfaces/ZetaInterfaces.sol @@ -27,7 +27,8 @@ interface ZetaInterfaces { bytes zetaTxSenderAddress; uint256 sourceChainId; address destinationAddress; - uint256 zetaValueAndGas; + /// @dev Remaining ZETA from zetaValueAndGas after subtracting ZetaChain gas fees and destination gas fees + uint256 zetaValue; bytes message; } @@ -39,7 +40,8 @@ interface ZetaInterfaces { uint256 sourceChainId; bytes destinationAddress; uint256 destinationChainId; - uint256 zetaValueAndGas; + /// @dev Equals to: zetaValueAndGas - ZetaChain gas fees - destination chain gas fees - source chain revert tx gas fees + uint256 remainingZetaValue; bytes message; } } diff --git a/packages/protocol-contracts/test/ZetaInteractor.spec.ts b/packages/protocol-contracts/test/ZetaInteractor.spec.ts index 4fe8fcc1..3732d516 100644 --- a/packages/protocol-contracts/test/ZetaInteractor.spec.ts +++ b/packages/protocol-contracts/test/ZetaInteractor.spec.ts @@ -38,7 +38,7 @@ describe("ZetaInteractor tests", () => { message: encoder.encode(["address"], [zetaInteractorMock.address]), sourceChainId: chainBId, zetaTxSenderAddress: ethers.utils.solidityPack(["address"], [zetaInteractorMock.address]), - zetaValueAndGas: 0, + zetaValue: 0, }) ).to.be.revertedWith(getCustomErrorMessage("InvalidCaller", [deployer.address])); }); @@ -50,7 +50,7 @@ describe("ZetaInteractor tests", () => { message: encoder.encode(["address"], [crossChainContractB.address]), sourceChainId: chainBId, zetaTxSenderAddress: ethers.utils.solidityPack(["address"], [zetaInteractorMock.address]), - zetaValueAndGas: 0, + zetaValue: 0, }) ).to.be.revertedWith(getCustomErrorMessage("InvalidZetaMessageCall")); }); @@ -63,9 +63,9 @@ describe("ZetaInteractor tests", () => { destinationAddress: ethers.utils.solidityPack(["address"], [crossChainContractB.address]), destinationChainId: chainBId, message: encoder.encode(["address"], [zetaInteractorMock.address]), + remainingZetaValue: 0, sourceChainId: chainAId, zetaTxSenderAddress: deployer.address, - zetaValueAndGas: 0, }) ).to.be.revertedWith(getCustomErrorMessage("InvalidCaller", [deployer.address])); }); From 79d150d138a84250add6407db7422473c449d124 Mon Sep 17 00:00:00 2001 From: Andres Martin Aiello <50411235+andresaiello@users.noreply.github.com> Date: Thu, 4 Aug 2022 11:05:01 -0300 Subject: [PATCH 032/115] Update zetasent event to be read by the protocol (#40) * Update zetasent event * add onrevert --- packages/protocol-contracts/contracts/ZetaConnector.base.sol | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/protocol-contracts/contracts/ZetaConnector.base.sol b/packages/protocol-contracts/contracts/ZetaConnector.base.sol index af5803ec..4258e223 100644 --- a/packages/protocol-contracts/contracts/ZetaConnector.base.sol +++ b/packages/protocol-contracts/contracts/ZetaConnector.base.sol @@ -23,7 +23,7 @@ contract ZetaConnectorBase is ConnectorErrors, Pausable { address sourceTxOriginAddress, address indexed zetaTxSenderAddress, uint256 indexed destinationChainId, - bytes indexed destinationAddress, + bytes destinationAddress, uint256 zetaValueAndGas, uint256 destinationGasLimit, bytes message, @@ -43,7 +43,7 @@ contract ZetaConnectorBase is ConnectorErrors, Pausable { address zetaTxSenderAddress, uint256 sourceChainId, uint256 indexed destinationChainId, - bytes indexed destinationAddress, + bytes destinationAddress, uint256 remainingZetaValue, bytes message, bytes32 indexed internalSendHash From 4e35b551f4d6564fcdca32be319ce8c5c0d2e09f Mon Sep 17 00:00:00 2001 From: Andres Martin Aiello <50411235+andresaiello@users.noreply.github.com> Date: Thu, 4 Aug 2022 12:21:25 -0300 Subject: [PATCH 033/115] Expose addresses on npm (#37) * ignore from npm examples and address * Expose addresses on npm * update addr * deploy v1 * rename pkg * update readme * update readme * move read functions to addresses pkg * add getAddressAsync * Expose abis and types on npm packages (#38) Expose abis and types on npm * rename to loadAddressFromFile * Update packages/addresses/src/addresses.helpers.ts Co-authored-by: Lucas * Update packages/addresses/src/addresses.helpers.ts Co-authored-by: Lucas * Update packages/addresses/src/addresses.helpers.ts Co-authored-by: Lucas * refactor * rename aux func Co-authored-by: Lucas --- packages/addresses-tools/README.md | 3 + packages/addresses-tools/hardhat.config.ts | 5 + packages/addresses-tools/package.json | 18 + .../src/add-new-address.ts | 0 .../src/add-new-network.ts | 0 .../addresses-tools/src/addresses.helpers.ts | 244 +++ packages/addresses-tools/src/index.ts | 1 + .../src/log-addresses.ts | 3 +- .../src/misc.constants.ts | 0 .../src/misc.helpers.ts | 0 .../src/networks.ts | 0 .../tsconfig.json | 0 packages/addresses/README.md | 2 +- packages/addresses/package.json | 2 +- .../src/{addresses => }/addresses.athens.json | 0 packages/addresses/src/addresses.helpers.ts | 204 +-- .../{addresses => }/addresses.mainnet.json | 0 .../src/{addresses => }/addresses.troy.json | 0 packages/example-contracts/package.json | 2 + .../scripts/cross-chain-warriors/deploy.ts | 3 +- .../deploy-multi-chain-swap.ts | 3 +- .../scripts/multi-chain-value/deploy.ts | 3 +- packages/interfaces/.gitignore | 2 + packages/interfaces/README.md | 3 + .../contracts/access/Ownable.sol/Ownable.json | 54 + .../security/Pausable.sol/Pausable.json | 41 + .../token/ERC20/ERC20.sol/ERC20.json | 288 ++++ .../token/ERC20/IERC20.sol/IERC20.json | 185 +++ .../ERC20Burnable.sol/ERC20Burnable.json | 303 ++++ .../IERC20Metadata.sol/IERC20Metadata.json | 224 +++ .../IUniswapV2Factory.json | 165 ++ .../IUniswapV2Pair.sol/IUniswapV2Pair.json | 653 ++++++++ .../UniswapV2Router02.json | 973 +++++++++++ .../interfaces/IERC20.sol/IERC20.json | 224 +++ .../IUniswapV2Router01.json | 751 +++++++++ .../IUniswapV2Router02.json | 953 +++++++++++ .../contracts/interfaces/IWETH.sol/IWETH.json | 46 + .../IUniswapV3SwapCallback.json | 25 + .../interfaces/IQuoter.sol/IQuoter.json | 128 ++ .../ISwapRouter.sol/ISwapRouter.json | 239 +++ .../ImmutableCreate2Factory.json | 90 + .../json/contracts/Zeta.eth.sol/ZetaEth.json | 283 ++++ .../Zeta.non-eth.sol/ZetaNonEth.json | 504 ++++++ .../ZetaConnectorBase.json | 542 ++++++ .../ZetaConnectorEth.json | 555 +++++++ .../ZetaConnectorNonEth.json | 581 +++++++ .../ZetaInteractor.sol/ZetaInteractor.json | 130 ++ .../ZetaTokenConsumerUniV2.json | 250 +++ .../ZetaTokenConsumerUniV2Errors.json | 12 + .../WETH9.json | 15 + .../ZetaTokenConsumerUniV3.json | 336 ++++ .../ZetaTokenConsumerUniV3Errors.json | 22 + .../ConnectorErrors.sol/ConnectorErrors.json | 67 + .../interfaces/ZetaErrors.sol/ZetaErrors.json | 56 + .../ZetaInteractorErrors.json | 28 + .../ZetaInterfaces.sol/ZetaConnector.json | 47 + .../ZetaInterfaces.sol/ZetaReceiver.json | 87 + .../ZetaInterfaces.sol/ZetaTokenConsumer.json | 211 +++ .../ZetaNonEthInterface.json | 226 +++ .../INonfungiblePositionManager.json | 431 +++++ .../IPoolInitializer.json | 36 + .../ZetaInteractorMock.json | 226 +++ .../ZetaReceiverMock.json | 113 ++ packages/interfaces/package.json | 13 + .../@openzeppelin/contracts/access/Ownable.ts | 175 ++ .../@openzeppelin/contracts/access/index.ts | 4 + .../@openzeppelin/contracts/index.ts | 9 + .../contracts/security/Pausable.ts | 111 ++ .../@openzeppelin/contracts/security/index.ts | 4 + .../contracts/token/ERC20/ERC20.ts | 444 +++++ .../contracts/token/ERC20/IERC20.ts | 322 ++++ .../token/ERC20/extensions/ERC20Burnable.ts | 507 ++++++ .../token/ERC20/extensions/IERC20Metadata.ts | 364 +++++ .../contracts/token/ERC20/extensions/index.ts | 5 + .../contracts/token/ERC20/index.ts | 7 + .../@openzeppelin/contracts/token/index.ts | 5 + .../typechain-types/@openzeppelin/index.ts | 5 + .../typechain-types/@uniswap/index.ts | 11 + .../@uniswap/v2-core/contracts/index.ts | 5 + .../contracts/interfaces/IUniswapV2Factory.ts | 316 ++++ .../contracts/interfaces/IUniswapV2Pair.ts | 944 +++++++++++ .../v2-core/contracts/interfaces/index.ts | 5 + .../typechain-types/@uniswap/v2-core/index.ts | 5 + .../contracts/UniswapV2Router02.ts | 1446 +++++++++++++++++ .../@uniswap/v2-periphery/contracts/index.ts | 6 + .../contracts/interfaces/IERC20.ts | 364 +++++ .../interfaces/IUniswapV2Router01.ts | 1128 +++++++++++++ .../interfaces/IUniswapV2Router02.ts | 1446 +++++++++++++++++ .../contracts/interfaces/IWETH.ts | 159 ++ .../contracts/interfaces/index.ts | 7 + .../@uniswap/v2-periphery/index.ts | 5 + .../@uniswap/v3-core/contracts/index.ts | 5 + .../callback/IUniswapV3SwapCallback.ts | 117 ++ .../contracts/interfaces/callback/index.ts | 4 + .../v3-core/contracts/interfaces/index.ts | 5 + .../typechain-types/@uniswap/v3-core/index.ts | 5 + .../@uniswap/v3-periphery/contracts/index.ts | 5 + .../contracts/interfaces/IQuoter.ts | 263 +++ .../contracts/interfaces/ISwapRouter.ts | 364 +++++ .../contracts/interfaces/index.ts | 5 + .../@uniswap/v3-periphery/index.ts | 5 + packages/interfaces/typechain-types/common.ts | 44 + .../contracts/ImmutableCreate2Factory.ts | 227 +++ .../contracts/Zeta.eth.sol/ZetaEth.ts | 444 +++++ .../contracts/Zeta.eth.sol/index.ts | 4 + .../contracts/Zeta.non-eth.sol/ZetaNonEth.ts | 715 ++++++++ .../contracts/Zeta.non-eth.sol/index.ts | 4 + .../ZetaConnectorBase.ts | 680 ++++++++ .../contracts/ZetaConnector.base.sol/index.ts | 4 + .../ZetaConnector.eth.sol/ZetaConnectorEth.ts | 700 ++++++++ .../contracts/ZetaConnector.eth.sol/index.ts | 4 + .../ZetaConnectorNonEth.ts | 749 +++++++++ .../ZetaConnector.non-eth.sol/index.ts | 4 + .../contracts/ZetaInteractor.ts | 268 +++ .../ZetaTokenConsumerUniV2.ts | 377 +++++ .../ZetaTokenConsumerUniV2Errors.ts | 55 + .../index.ts | 5 + .../WETH9.ts | 99 ++ .../ZetaTokenConsumerUniV3.ts | 451 +++++ .../ZetaTokenConsumerUniV3Errors.ts | 55 + .../index.ts | 6 + .../typechain-types/contracts/index.ts | 23 + .../contracts/interfaces/ConnectorErrors.ts | 55 + .../contracts/interfaces/ZetaErrors.ts | 55 + .../interfaces/ZetaInteractorErrors.ts | 55 + .../ZetaInterfaces.sol/ZetaConnector.ts | 129 ++ .../ZetaInterfaces.sol/ZetaReceiver.ts | 190 +++ .../ZetaInterfaces.sol/ZetaTokenConsumer.ts | 363 +++++ .../interfaces/ZetaInterfaces.sol/index.ts | 6 + .../interfaces/ZetaNonEthInterface.ts | 401 +++++ .../contracts/interfaces/index.ts | 9 + .../INonfungiblePositionManager.ts | 566 +++++++ .../IPoolInitializer.ts | 122 ++ .../TestUniswapV3Contracts.sol/index.ts | 5 + .../contracts/testing/ZetaInteractorMock.ts | 387 +++++ .../contracts/testing/ZetaReceiverMock.ts | 232 +++ .../contracts/testing/index.ts | 7 + .../contracts/access/Ownable__factory.ts | 78 + .../@openzeppelin/contracts/access/index.ts | 4 + .../@openzeppelin/contracts/index.ts | 6 + .../contracts/security/Pausable__factory.ts | 65 + .../@openzeppelin/contracts/security/index.ts | 4 + .../contracts/token/ERC20/ERC20__factory.ts | 349 ++++ .../contracts/token/ERC20/IERC20__factory.ts | 206 +++ .../extensions/ERC20Burnable__factory.ts | 327 ++++ .../extensions/IERC20Metadata__factory.ts | 248 +++ .../contracts/token/ERC20/extensions/index.ts | 5 + .../contracts/token/ERC20/index.ts | 6 + .../@openzeppelin/contracts/token/index.ts | 4 + .../factories/@openzeppelin/index.ts | 4 + .../factories/@uniswap/index.ts | 7 + .../@uniswap/v2-core/contracts/index.ts | 4 + .../interfaces/IUniswapV2Factory__factory.ts | 189 +++ .../interfaces/IUniswapV2Pair__factory.ts | 677 ++++++++ .../v2-core/contracts/interfaces/index.ts | 5 + .../factories/@uniswap/v2-core/index.ts | 4 + .../contracts/UniswapV2Router02__factory.ts | 1041 ++++++++++++ .../@uniswap/v2-periphery/contracts/index.ts | 5 + .../contracts/interfaces/IERC20__factory.ts | 245 +++ .../interfaces/IUniswapV2Router01__factory.ts | 775 +++++++++ .../interfaces/IUniswapV2Router02__factory.ts | 977 +++++++++++ .../contracts/interfaces/IWETH__factory.ts | 67 + .../contracts/interfaces/index.ts | 7 + .../factories/@uniswap/v2-periphery/index.ts | 4 + .../@uniswap/v3-core/contracts/index.ts | 4 + .../IUniswapV3SwapCallback__factory.ts | 53 + .../contracts/interfaces/callback/index.ts | 4 + .../v3-core/contracts/interfaces/index.ts | 4 + .../factories/@uniswap/v3-core/index.ts | 4 + .../@uniswap/v3-periphery/contracts/index.ts | 4 + .../contracts/interfaces/IQuoter__factory.ts | 152 ++ .../interfaces/ISwapRouter__factory.ts | 263 +++ .../contracts/interfaces/index.ts | 5 + .../factories/@uniswap/v3-periphery/index.ts | 4 + .../ImmutableCreate2Factory__factory.ts | 154 ++ .../Zeta.eth.sol/ZetaEth__factory.ts | 352 ++++ .../factories/contracts/Zeta.eth.sol/index.ts | 4 + .../Zeta.non-eth.sol/ZetaNonEth__factory.ts | 576 +++++++ .../contracts/Zeta.non-eth.sol/index.ts | 4 + .../ZetaConnectorBase__factory.ts | 622 +++++++ .../contracts/ZetaConnector.base.sol/index.ts | 4 + .../ZetaConnectorEth__factory.ts | 635 ++++++++ .../contracts/ZetaConnector.eth.sol/index.ts | 4 + .../ZetaConnectorNonEth__factory.ts | 661 ++++++++ .../ZetaConnector.non-eth.sol/index.ts | 4 + .../contracts/ZetaInteractor__factory.ts | 154 ++ .../ZetaTokenConsumerUniV2Errors__factory.ts | 40 + .../ZetaTokenConsumerUniV2__factory.ts | 326 ++++ .../index.ts | 5 + .../WETH9__factory.ts | 36 + .../ZetaTokenConsumerUniV3Errors__factory.ts | 50 + .../ZetaTokenConsumerUniV3__factory.ts | 435 +++++ .../index.ts | 6 + .../factories/contracts/index.ts | 14 + .../interfaces/ConnectorErrors__factory.ts | 91 ++ .../interfaces/ZetaErrors__factory.ts | 80 + .../ZetaInteractorErrors__factory.ts | 56 + .../ZetaConnector__factory.ts | 71 + .../ZetaReceiver__factory.ts | 111 ++ .../ZetaTokenConsumer__factory.ts | 235 +++ .../interfaces/ZetaInterfaces.sol/index.ts | 6 + .../ZetaNonEthInterface__factory.ts | 250 +++ .../factories/contracts/interfaces/index.ts | 8 + .../INonfungiblePositionManager__factory.ts | 461 ++++++ .../IPoolInitializer__factory.ts | 60 + .../TestUniswapV3Contracts.sol/index.ts | 5 + .../testing/ZetaInteractorMock__factory.ts | 291 ++++ .../testing/ZetaReceiverMock__factory.ts | 173 ++ .../factories/contracts/testing/index.ts | 6 + .../typechain-types/factories/index.ts | 6 + .../interfaces/typechain-types/hardhat.d.ts | 384 +++++ packages/interfaces/typechain-types/index.ts | 86 + packages/protocol-contracts/hardhat.config.ts | 14 +- .../ImmutableCreate2Factory.helpers.ts | 3 +- .../lib/contracts.helpers.ts | 7 +- packages/protocol-contracts/package.json | 4 + .../deploy-immutable-create2-factory.ts | 3 +- .../scripts/deploy-zeta-connector.ts | 3 +- .../scripts/deploy-zeta-token.ts | 3 +- packages/protocol-contracts/scripts/deploy.ts | 3 +- .../scripts/set-zeta-token-addresses.ts | 3 +- .../scripts/test-zeta-send.ts | 3 +- .../scripts/token-approval.ts | 1 - .../scripts/update-tss-address.ts | 3 +- .../test/ImmutableCreate2Factory.spec.ts | 12 +- .../test/Zeta.non-eth.spec.ts | 2 +- .../test/ZetaConnector.spec.ts | 16 +- .../test/ZetaInteractor.spec.ts | 2 +- .../test/ZetaTokenConsumer.spec.ts | 20 +- .../protocol-contracts/test/test.helpers.ts | 3 +- packages/protocol-contracts/tsconfig.json | 7 +- yarn.lock | 56 +- 232 files changed, 38897 insertions(+), 245 deletions(-) create mode 100644 packages/addresses-tools/README.md create mode 100644 packages/addresses-tools/hardhat.config.ts create mode 100644 packages/addresses-tools/package.json rename packages/{addresses => addresses-tools}/src/add-new-address.ts (100%) rename packages/{addresses => addresses-tools}/src/add-new-network.ts (100%) create mode 100644 packages/addresses-tools/src/addresses.helpers.ts create mode 100644 packages/addresses-tools/src/index.ts rename packages/{addresses => addresses-tools}/src/log-addresses.ts (86%) rename packages/{addresses => addresses-tools}/src/misc.constants.ts (100%) rename packages/{addresses => addresses-tools}/src/misc.helpers.ts (100%) rename packages/{addresses => addresses-tools}/src/networks.ts (100%) rename packages/{addresses => addresses-tools}/tsconfig.json (100%) rename packages/addresses/src/{addresses => }/addresses.athens.json (100%) rename packages/addresses/src/{addresses => }/addresses.mainnet.json (100%) rename packages/addresses/src/{addresses => }/addresses.troy.json (100%) create mode 100644 packages/interfaces/.gitignore create mode 100644 packages/interfaces/README.md create mode 100644 packages/interfaces/abi/json/@openzeppelin/contracts/access/Ownable.sol/Ownable.json create mode 100644 packages/interfaces/abi/json/@openzeppelin/contracts/security/Pausable.sol/Pausable.json create mode 100644 packages/interfaces/abi/json/@openzeppelin/contracts/token/ERC20/ERC20.sol/ERC20.json create mode 100644 packages/interfaces/abi/json/@openzeppelin/contracts/token/ERC20/IERC20.sol/IERC20.json create mode 100644 packages/interfaces/abi/json/@openzeppelin/contracts/token/ERC20/extensions/ERC20Burnable.sol/ERC20Burnable.json create mode 100644 packages/interfaces/abi/json/@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol/IERC20Metadata.json create mode 100644 packages/interfaces/abi/json/@uniswap/v2-core/contracts/interfaces/IUniswapV2Factory.sol/IUniswapV2Factory.json create mode 100644 packages/interfaces/abi/json/@uniswap/v2-core/contracts/interfaces/IUniswapV2Pair.sol/IUniswapV2Pair.json create mode 100644 packages/interfaces/abi/json/@uniswap/v2-periphery/contracts/UniswapV2Router02.sol/UniswapV2Router02.json create mode 100644 packages/interfaces/abi/json/@uniswap/v2-periphery/contracts/interfaces/IERC20.sol/IERC20.json create mode 100644 packages/interfaces/abi/json/@uniswap/v2-periphery/contracts/interfaces/IUniswapV2Router01.sol/IUniswapV2Router01.json create mode 100644 packages/interfaces/abi/json/@uniswap/v2-periphery/contracts/interfaces/IUniswapV2Router02.sol/IUniswapV2Router02.json create mode 100644 packages/interfaces/abi/json/@uniswap/v2-periphery/contracts/interfaces/IWETH.sol/IWETH.json create mode 100644 packages/interfaces/abi/json/@uniswap/v3-core/contracts/interfaces/callback/IUniswapV3SwapCallback.sol/IUniswapV3SwapCallback.json create mode 100644 packages/interfaces/abi/json/@uniswap/v3-periphery/contracts/interfaces/IQuoter.sol/IQuoter.json create mode 100644 packages/interfaces/abi/json/@uniswap/v3-periphery/contracts/interfaces/ISwapRouter.sol/ISwapRouter.json create mode 100644 packages/interfaces/abi/json/contracts/ImmutableCreate2Factory.sol/ImmutableCreate2Factory.json create mode 100644 packages/interfaces/abi/json/contracts/Zeta.eth.sol/ZetaEth.json create mode 100644 packages/interfaces/abi/json/contracts/Zeta.non-eth.sol/ZetaNonEth.json create mode 100644 packages/interfaces/abi/json/contracts/ZetaConnector.base.sol/ZetaConnectorBase.json create mode 100644 packages/interfaces/abi/json/contracts/ZetaConnector.eth.sol/ZetaConnectorEth.json create mode 100644 packages/interfaces/abi/json/contracts/ZetaConnector.non-eth.sol/ZetaConnectorNonEth.json create mode 100644 packages/interfaces/abi/json/contracts/ZetaInteractor.sol/ZetaInteractor.json create mode 100644 packages/interfaces/abi/json/contracts/ZetaTokenConsumerUniV2.strategy.sol/ZetaTokenConsumerUniV2.json create mode 100644 packages/interfaces/abi/json/contracts/ZetaTokenConsumerUniV2.strategy.sol/ZetaTokenConsumerUniV2Errors.json create mode 100644 packages/interfaces/abi/json/contracts/ZetaTokenConsumerUniV3.strategy.sol/WETH9.json create mode 100644 packages/interfaces/abi/json/contracts/ZetaTokenConsumerUniV3.strategy.sol/ZetaTokenConsumerUniV3.json create mode 100644 packages/interfaces/abi/json/contracts/ZetaTokenConsumerUniV3.strategy.sol/ZetaTokenConsumerUniV3Errors.json create mode 100644 packages/interfaces/abi/json/contracts/interfaces/ConnectorErrors.sol/ConnectorErrors.json create mode 100644 packages/interfaces/abi/json/contracts/interfaces/ZetaErrors.sol/ZetaErrors.json create mode 100644 packages/interfaces/abi/json/contracts/interfaces/ZetaInteractorErrors.sol/ZetaInteractorErrors.json create mode 100644 packages/interfaces/abi/json/contracts/interfaces/ZetaInterfaces.sol/ZetaConnector.json create mode 100644 packages/interfaces/abi/json/contracts/interfaces/ZetaInterfaces.sol/ZetaReceiver.json create mode 100644 packages/interfaces/abi/json/contracts/interfaces/ZetaInterfaces.sol/ZetaTokenConsumer.json create mode 100644 packages/interfaces/abi/json/contracts/interfaces/ZetaNonEthInterface.sol/ZetaNonEthInterface.json create mode 100644 packages/interfaces/abi/json/contracts/testing/TestUniswapV3Contracts.sol/INonfungiblePositionManager.json create mode 100644 packages/interfaces/abi/json/contracts/testing/TestUniswapV3Contracts.sol/IPoolInitializer.json create mode 100644 packages/interfaces/abi/json/contracts/testing/ZetaInteractorMock.sol/ZetaInteractorMock.json create mode 100644 packages/interfaces/abi/json/contracts/testing/ZetaReceiverMock.sol/ZetaReceiverMock.json create mode 100644 packages/interfaces/package.json create mode 100644 packages/interfaces/typechain-types/@openzeppelin/contracts/access/Ownable.ts create mode 100644 packages/interfaces/typechain-types/@openzeppelin/contracts/access/index.ts create mode 100644 packages/interfaces/typechain-types/@openzeppelin/contracts/index.ts create mode 100644 packages/interfaces/typechain-types/@openzeppelin/contracts/security/Pausable.ts create mode 100644 packages/interfaces/typechain-types/@openzeppelin/contracts/security/index.ts create mode 100644 packages/interfaces/typechain-types/@openzeppelin/contracts/token/ERC20/ERC20.ts create mode 100644 packages/interfaces/typechain-types/@openzeppelin/contracts/token/ERC20/IERC20.ts create mode 100644 packages/interfaces/typechain-types/@openzeppelin/contracts/token/ERC20/extensions/ERC20Burnable.ts create mode 100644 packages/interfaces/typechain-types/@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.ts create mode 100644 packages/interfaces/typechain-types/@openzeppelin/contracts/token/ERC20/extensions/index.ts create mode 100644 packages/interfaces/typechain-types/@openzeppelin/contracts/token/ERC20/index.ts create mode 100644 packages/interfaces/typechain-types/@openzeppelin/contracts/token/index.ts create mode 100644 packages/interfaces/typechain-types/@openzeppelin/index.ts create mode 100644 packages/interfaces/typechain-types/@uniswap/index.ts create mode 100644 packages/interfaces/typechain-types/@uniswap/v2-core/contracts/index.ts create mode 100644 packages/interfaces/typechain-types/@uniswap/v2-core/contracts/interfaces/IUniswapV2Factory.ts create mode 100644 packages/interfaces/typechain-types/@uniswap/v2-core/contracts/interfaces/IUniswapV2Pair.ts create mode 100644 packages/interfaces/typechain-types/@uniswap/v2-core/contracts/interfaces/index.ts create mode 100644 packages/interfaces/typechain-types/@uniswap/v2-core/index.ts create mode 100644 packages/interfaces/typechain-types/@uniswap/v2-periphery/contracts/UniswapV2Router02.ts create mode 100644 packages/interfaces/typechain-types/@uniswap/v2-periphery/contracts/index.ts create mode 100644 packages/interfaces/typechain-types/@uniswap/v2-periphery/contracts/interfaces/IERC20.ts create mode 100644 packages/interfaces/typechain-types/@uniswap/v2-periphery/contracts/interfaces/IUniswapV2Router01.ts create mode 100644 packages/interfaces/typechain-types/@uniswap/v2-periphery/contracts/interfaces/IUniswapV2Router02.ts create mode 100644 packages/interfaces/typechain-types/@uniswap/v2-periphery/contracts/interfaces/IWETH.ts create mode 100644 packages/interfaces/typechain-types/@uniswap/v2-periphery/contracts/interfaces/index.ts create mode 100644 packages/interfaces/typechain-types/@uniswap/v2-periphery/index.ts create mode 100644 packages/interfaces/typechain-types/@uniswap/v3-core/contracts/index.ts create mode 100644 packages/interfaces/typechain-types/@uniswap/v3-core/contracts/interfaces/callback/IUniswapV3SwapCallback.ts create mode 100644 packages/interfaces/typechain-types/@uniswap/v3-core/contracts/interfaces/callback/index.ts create mode 100644 packages/interfaces/typechain-types/@uniswap/v3-core/contracts/interfaces/index.ts create mode 100644 packages/interfaces/typechain-types/@uniswap/v3-core/index.ts create mode 100644 packages/interfaces/typechain-types/@uniswap/v3-periphery/contracts/index.ts create mode 100644 packages/interfaces/typechain-types/@uniswap/v3-periphery/contracts/interfaces/IQuoter.ts create mode 100644 packages/interfaces/typechain-types/@uniswap/v3-periphery/contracts/interfaces/ISwapRouter.ts create mode 100644 packages/interfaces/typechain-types/@uniswap/v3-periphery/contracts/interfaces/index.ts create mode 100644 packages/interfaces/typechain-types/@uniswap/v3-periphery/index.ts create mode 100644 packages/interfaces/typechain-types/common.ts create mode 100644 packages/interfaces/typechain-types/contracts/ImmutableCreate2Factory.ts create mode 100644 packages/interfaces/typechain-types/contracts/Zeta.eth.sol/ZetaEth.ts create mode 100644 packages/interfaces/typechain-types/contracts/Zeta.eth.sol/index.ts create mode 100644 packages/interfaces/typechain-types/contracts/Zeta.non-eth.sol/ZetaNonEth.ts create mode 100644 packages/interfaces/typechain-types/contracts/Zeta.non-eth.sol/index.ts create mode 100644 packages/interfaces/typechain-types/contracts/ZetaConnector.base.sol/ZetaConnectorBase.ts create mode 100644 packages/interfaces/typechain-types/contracts/ZetaConnector.base.sol/index.ts create mode 100644 packages/interfaces/typechain-types/contracts/ZetaConnector.eth.sol/ZetaConnectorEth.ts create mode 100644 packages/interfaces/typechain-types/contracts/ZetaConnector.eth.sol/index.ts create mode 100644 packages/interfaces/typechain-types/contracts/ZetaConnector.non-eth.sol/ZetaConnectorNonEth.ts create mode 100644 packages/interfaces/typechain-types/contracts/ZetaConnector.non-eth.sol/index.ts create mode 100644 packages/interfaces/typechain-types/contracts/ZetaInteractor.ts create mode 100644 packages/interfaces/typechain-types/contracts/ZetaTokenConsumerUniV2.strategy.sol/ZetaTokenConsumerUniV2.ts create mode 100644 packages/interfaces/typechain-types/contracts/ZetaTokenConsumerUniV2.strategy.sol/ZetaTokenConsumerUniV2Errors.ts create mode 100644 packages/interfaces/typechain-types/contracts/ZetaTokenConsumerUniV2.strategy.sol/index.ts create mode 100644 packages/interfaces/typechain-types/contracts/ZetaTokenConsumerUniV3.strategy.sol/WETH9.ts create mode 100644 packages/interfaces/typechain-types/contracts/ZetaTokenConsumerUniV3.strategy.sol/ZetaTokenConsumerUniV3.ts create mode 100644 packages/interfaces/typechain-types/contracts/ZetaTokenConsumerUniV3.strategy.sol/ZetaTokenConsumerUniV3Errors.ts create mode 100644 packages/interfaces/typechain-types/contracts/ZetaTokenConsumerUniV3.strategy.sol/index.ts create mode 100644 packages/interfaces/typechain-types/contracts/index.ts create mode 100644 packages/interfaces/typechain-types/contracts/interfaces/ConnectorErrors.ts create mode 100644 packages/interfaces/typechain-types/contracts/interfaces/ZetaErrors.ts create mode 100644 packages/interfaces/typechain-types/contracts/interfaces/ZetaInteractorErrors.ts create mode 100644 packages/interfaces/typechain-types/contracts/interfaces/ZetaInterfaces.sol/ZetaConnector.ts create mode 100644 packages/interfaces/typechain-types/contracts/interfaces/ZetaInterfaces.sol/ZetaReceiver.ts create mode 100644 packages/interfaces/typechain-types/contracts/interfaces/ZetaInterfaces.sol/ZetaTokenConsumer.ts create mode 100644 packages/interfaces/typechain-types/contracts/interfaces/ZetaInterfaces.sol/index.ts create mode 100644 packages/interfaces/typechain-types/contracts/interfaces/ZetaNonEthInterface.ts create mode 100644 packages/interfaces/typechain-types/contracts/interfaces/index.ts create mode 100644 packages/interfaces/typechain-types/contracts/testing/TestUniswapV3Contracts.sol/INonfungiblePositionManager.ts create mode 100644 packages/interfaces/typechain-types/contracts/testing/TestUniswapV3Contracts.sol/IPoolInitializer.ts create mode 100644 packages/interfaces/typechain-types/contracts/testing/TestUniswapV3Contracts.sol/index.ts create mode 100644 packages/interfaces/typechain-types/contracts/testing/ZetaInteractorMock.ts create mode 100644 packages/interfaces/typechain-types/contracts/testing/ZetaReceiverMock.ts create mode 100644 packages/interfaces/typechain-types/contracts/testing/index.ts create mode 100644 packages/interfaces/typechain-types/factories/@openzeppelin/contracts/access/Ownable__factory.ts create mode 100644 packages/interfaces/typechain-types/factories/@openzeppelin/contracts/access/index.ts create mode 100644 packages/interfaces/typechain-types/factories/@openzeppelin/contracts/index.ts create mode 100644 packages/interfaces/typechain-types/factories/@openzeppelin/contracts/security/Pausable__factory.ts create mode 100644 packages/interfaces/typechain-types/factories/@openzeppelin/contracts/security/index.ts create mode 100644 packages/interfaces/typechain-types/factories/@openzeppelin/contracts/token/ERC20/ERC20__factory.ts create mode 100644 packages/interfaces/typechain-types/factories/@openzeppelin/contracts/token/ERC20/IERC20__factory.ts create mode 100644 packages/interfaces/typechain-types/factories/@openzeppelin/contracts/token/ERC20/extensions/ERC20Burnable__factory.ts create mode 100644 packages/interfaces/typechain-types/factories/@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata__factory.ts create mode 100644 packages/interfaces/typechain-types/factories/@openzeppelin/contracts/token/ERC20/extensions/index.ts create mode 100644 packages/interfaces/typechain-types/factories/@openzeppelin/contracts/token/ERC20/index.ts create mode 100644 packages/interfaces/typechain-types/factories/@openzeppelin/contracts/token/index.ts create mode 100644 packages/interfaces/typechain-types/factories/@openzeppelin/index.ts create mode 100644 packages/interfaces/typechain-types/factories/@uniswap/index.ts create mode 100644 packages/interfaces/typechain-types/factories/@uniswap/v2-core/contracts/index.ts create mode 100644 packages/interfaces/typechain-types/factories/@uniswap/v2-core/contracts/interfaces/IUniswapV2Factory__factory.ts create mode 100644 packages/interfaces/typechain-types/factories/@uniswap/v2-core/contracts/interfaces/IUniswapV2Pair__factory.ts create mode 100644 packages/interfaces/typechain-types/factories/@uniswap/v2-core/contracts/interfaces/index.ts create mode 100644 packages/interfaces/typechain-types/factories/@uniswap/v2-core/index.ts create mode 100644 packages/interfaces/typechain-types/factories/@uniswap/v2-periphery/contracts/UniswapV2Router02__factory.ts create mode 100644 packages/interfaces/typechain-types/factories/@uniswap/v2-periphery/contracts/index.ts create mode 100644 packages/interfaces/typechain-types/factories/@uniswap/v2-periphery/contracts/interfaces/IERC20__factory.ts create mode 100644 packages/interfaces/typechain-types/factories/@uniswap/v2-periphery/contracts/interfaces/IUniswapV2Router01__factory.ts create mode 100644 packages/interfaces/typechain-types/factories/@uniswap/v2-periphery/contracts/interfaces/IUniswapV2Router02__factory.ts create mode 100644 packages/interfaces/typechain-types/factories/@uniswap/v2-periphery/contracts/interfaces/IWETH__factory.ts create mode 100644 packages/interfaces/typechain-types/factories/@uniswap/v2-periphery/contracts/interfaces/index.ts create mode 100644 packages/interfaces/typechain-types/factories/@uniswap/v2-periphery/index.ts create mode 100644 packages/interfaces/typechain-types/factories/@uniswap/v3-core/contracts/index.ts create mode 100644 packages/interfaces/typechain-types/factories/@uniswap/v3-core/contracts/interfaces/callback/IUniswapV3SwapCallback__factory.ts create mode 100644 packages/interfaces/typechain-types/factories/@uniswap/v3-core/contracts/interfaces/callback/index.ts create mode 100644 packages/interfaces/typechain-types/factories/@uniswap/v3-core/contracts/interfaces/index.ts create mode 100644 packages/interfaces/typechain-types/factories/@uniswap/v3-core/index.ts create mode 100644 packages/interfaces/typechain-types/factories/@uniswap/v3-periphery/contracts/index.ts create mode 100644 packages/interfaces/typechain-types/factories/@uniswap/v3-periphery/contracts/interfaces/IQuoter__factory.ts create mode 100644 packages/interfaces/typechain-types/factories/@uniswap/v3-periphery/contracts/interfaces/ISwapRouter__factory.ts create mode 100644 packages/interfaces/typechain-types/factories/@uniswap/v3-periphery/contracts/interfaces/index.ts create mode 100644 packages/interfaces/typechain-types/factories/@uniswap/v3-periphery/index.ts create mode 100644 packages/interfaces/typechain-types/factories/contracts/ImmutableCreate2Factory__factory.ts create mode 100644 packages/interfaces/typechain-types/factories/contracts/Zeta.eth.sol/ZetaEth__factory.ts create mode 100644 packages/interfaces/typechain-types/factories/contracts/Zeta.eth.sol/index.ts create mode 100644 packages/interfaces/typechain-types/factories/contracts/Zeta.non-eth.sol/ZetaNonEth__factory.ts create mode 100644 packages/interfaces/typechain-types/factories/contracts/Zeta.non-eth.sol/index.ts create mode 100644 packages/interfaces/typechain-types/factories/contracts/ZetaConnector.base.sol/ZetaConnectorBase__factory.ts create mode 100644 packages/interfaces/typechain-types/factories/contracts/ZetaConnector.base.sol/index.ts create mode 100644 packages/interfaces/typechain-types/factories/contracts/ZetaConnector.eth.sol/ZetaConnectorEth__factory.ts create mode 100644 packages/interfaces/typechain-types/factories/contracts/ZetaConnector.eth.sol/index.ts create mode 100644 packages/interfaces/typechain-types/factories/contracts/ZetaConnector.non-eth.sol/ZetaConnectorNonEth__factory.ts create mode 100644 packages/interfaces/typechain-types/factories/contracts/ZetaConnector.non-eth.sol/index.ts create mode 100644 packages/interfaces/typechain-types/factories/contracts/ZetaInteractor__factory.ts create mode 100644 packages/interfaces/typechain-types/factories/contracts/ZetaTokenConsumerUniV2.strategy.sol/ZetaTokenConsumerUniV2Errors__factory.ts create mode 100644 packages/interfaces/typechain-types/factories/contracts/ZetaTokenConsumerUniV2.strategy.sol/ZetaTokenConsumerUniV2__factory.ts create mode 100644 packages/interfaces/typechain-types/factories/contracts/ZetaTokenConsumerUniV2.strategy.sol/index.ts create mode 100644 packages/interfaces/typechain-types/factories/contracts/ZetaTokenConsumerUniV3.strategy.sol/WETH9__factory.ts create mode 100644 packages/interfaces/typechain-types/factories/contracts/ZetaTokenConsumerUniV3.strategy.sol/ZetaTokenConsumerUniV3Errors__factory.ts create mode 100644 packages/interfaces/typechain-types/factories/contracts/ZetaTokenConsumerUniV3.strategy.sol/ZetaTokenConsumerUniV3__factory.ts create mode 100644 packages/interfaces/typechain-types/factories/contracts/ZetaTokenConsumerUniV3.strategy.sol/index.ts create mode 100644 packages/interfaces/typechain-types/factories/contracts/index.ts create mode 100644 packages/interfaces/typechain-types/factories/contracts/interfaces/ConnectorErrors__factory.ts create mode 100644 packages/interfaces/typechain-types/factories/contracts/interfaces/ZetaErrors__factory.ts create mode 100644 packages/interfaces/typechain-types/factories/contracts/interfaces/ZetaInteractorErrors__factory.ts create mode 100644 packages/interfaces/typechain-types/factories/contracts/interfaces/ZetaInterfaces.sol/ZetaConnector__factory.ts create mode 100644 packages/interfaces/typechain-types/factories/contracts/interfaces/ZetaInterfaces.sol/ZetaReceiver__factory.ts create mode 100644 packages/interfaces/typechain-types/factories/contracts/interfaces/ZetaInterfaces.sol/ZetaTokenConsumer__factory.ts create mode 100644 packages/interfaces/typechain-types/factories/contracts/interfaces/ZetaInterfaces.sol/index.ts create mode 100644 packages/interfaces/typechain-types/factories/contracts/interfaces/ZetaNonEthInterface__factory.ts create mode 100644 packages/interfaces/typechain-types/factories/contracts/interfaces/index.ts create mode 100644 packages/interfaces/typechain-types/factories/contracts/testing/TestUniswapV3Contracts.sol/INonfungiblePositionManager__factory.ts create mode 100644 packages/interfaces/typechain-types/factories/contracts/testing/TestUniswapV3Contracts.sol/IPoolInitializer__factory.ts create mode 100644 packages/interfaces/typechain-types/factories/contracts/testing/TestUniswapV3Contracts.sol/index.ts create mode 100644 packages/interfaces/typechain-types/factories/contracts/testing/ZetaInteractorMock__factory.ts create mode 100644 packages/interfaces/typechain-types/factories/contracts/testing/ZetaReceiverMock__factory.ts create mode 100644 packages/interfaces/typechain-types/factories/contracts/testing/index.ts create mode 100644 packages/interfaces/typechain-types/factories/index.ts create mode 100644 packages/interfaces/typechain-types/hardhat.d.ts create mode 100644 packages/interfaces/typechain-types/index.ts diff --git a/packages/addresses-tools/README.md b/packages/addresses-tools/README.md new file mode 100644 index 00000000..5e0a61c6 --- /dev/null +++ b/packages/addresses-tools/README.md @@ -0,0 +1,3 @@ +# ZetaChain addresses-tools + +This package includes utilities to work with multiple addresses and networks. diff --git a/packages/addresses-tools/hardhat.config.ts b/packages/addresses-tools/hardhat.config.ts new file mode 100644 index 00000000..a3b8359f --- /dev/null +++ b/packages/addresses-tools/hardhat.config.ts @@ -0,0 +1,5 @@ +import { HardhatUserConfig } from "hardhat/types"; + +const config: HardhatUserConfig = {}; + +export default config; diff --git a/packages/addresses-tools/package.json b/packages/addresses-tools/package.json new file mode 100644 index 00000000..0d1f0d92 --- /dev/null +++ b/packages/addresses-tools/package.json @@ -0,0 +1,18 @@ +{ + "name": "@zetachain/addresses-tools", + "version": "0.0.1", + "license": "MIT", + "private": true, + "author": "zetachain", + "publishConfig": { + "access": "public", + "registry": "https://registry.npmjs.org/" + }, + "main": "src/index.ts", + "scripts": { + "tsc:watch": "npx tsc --watch" + }, + "devDependencies": { + "@zetachain/addresses": "workspace:^" + } +} diff --git a/packages/addresses/src/add-new-address.ts b/packages/addresses-tools/src/add-new-address.ts similarity index 100% rename from packages/addresses/src/add-new-address.ts rename to packages/addresses-tools/src/add-new-address.ts diff --git a/packages/addresses/src/add-new-network.ts b/packages/addresses-tools/src/add-new-network.ts similarity index 100% rename from packages/addresses/src/add-new-network.ts rename to packages/addresses-tools/src/add-new-network.ts diff --git a/packages/addresses-tools/src/addresses.helpers.ts b/packages/addresses-tools/src/addresses.helpers.ts new file mode 100644 index 00000000..e49913d7 --- /dev/null +++ b/packages/addresses-tools/src/addresses.helpers.ts @@ -0,0 +1,244 @@ +import { + isLocalNetworkName, + isMainnetNetworkName, + isNetworkName, + isTestnetNetworkName, + isZetaLocalnet, + isZetaMainnet, + isZetaNetworkName, + isZetaTestnet, + LocalnetAddressGroup, + LocalNetworkName, + MainnetAddressGroup, + MainnetNetworkName, + NetworkAddresses, + NetworkName, + TestnetAddressGroup, + TestnetNetworkName, + ZetaAddress, + ZetaLocalNetworkName, + ZetaMainnetNetworkName, + ZetaNetworkName, + ZetaTestnetNetworkName, +} from "@zetachain/addresses"; +import dotenv from "dotenv"; +import { readdirSync, readFileSync, writeFileSync } from "fs"; +import { network } from "hardhat"; +import { join } from "path"; + +import { deepCloneSerializable } from "./misc.helpers"; + +const LOCAL_PKG = "addresses-tools"; +const PUBLIC_PKG = "addresses"; + +const dirname = __dirname.replace(LOCAL_PKG, PUBLIC_PKG); + +export const getExplorerUrl = ({ customNetworkName }: { customNetworkName?: string } = {}): string => { + const networkName = customNetworkName || network.name; + if (!isNetworkName(networkName)) throw new Error(); + dotenv.config(); + + const v = { + "bsc-localnet": "", + "bsc-testnet": "https://testnet.bscscan.com/", + "eth-localnet": "", + "eth-mainnet": "https://etherscan.io/", + goerli: "https://goerli.etherscan.io/", + hardhat: "", + "polygon-localnet": "", + "polygon-mumbai": "https://mumbai.polygonscan.com/", + ropsten: "https://ropsten.etherscan.io/", + }; + + return v[networkName]; +}; + +const MissingZetaNetworkError = new Error( + "ZETA_NETWORK is not defined, please set the environment variable (e.g.: ZETA_NETWORK=athens )" +); + +export const saveAddress = (addressName: ZetaAddress, newAddress: string) => { + const { ZETA_NETWORK } = process.env; + const { name: networkName } = network; + + if (!ZETA_NETWORK) throw MissingZetaNetworkError; + + console.log(`Updating ${addressName} address on ${ZETA_NETWORK}: ${networkName}.`); + + const filename = join(dirname, `./addresses.${ZETA_NETWORK}.json`); + + if (isZetaLocalnet(ZETA_NETWORK) && isLocalNetworkName(networkName)) { + const newAddresses: LocalnetAddressGroup = JSON.parse(readFileSync(filename, "utf8")); + if (typeof newAddresses[networkName][addressName] === "undefined") { + console.log( + `The address ${addressName} does not exist, it will get created but make sure to add it to the types.` + ); + } + + newAddresses[networkName][addressName] = newAddress; + + writeFileSync(filename, JSON.stringify(newAddresses, null, 2)); + + console.log(`Updated, new address: ${newAddress}.`); + + return; + } + + if (isZetaTestnet(ZETA_NETWORK) && isTestnetNetworkName(networkName)) { + const newAddresses: TestnetAddressGroup = JSON.parse(readFileSync(filename, "utf8")); + newAddresses[networkName][addressName] = newAddress; + + writeFileSync(filename, JSON.stringify(newAddresses, null, 2)); + + console.log(`Updated, new address: ${newAddress}.`); + + return; + } + + if (isZetaMainnet(ZETA_NETWORK) && isMainnetNetworkName(networkName)) { + const newAddresses: MainnetAddressGroup = JSON.parse(readFileSync(filename, "utf8")); + newAddresses[networkName][addressName] = newAddress; + + writeFileSync(filename, JSON.stringify(newAddresses, null, 2)); + + console.log(`Updated, new address: ${newAddress}.`); + + return; + } + + throw new Error(`Invalid ZETA_NETWORK + network combination ${ZETA_NETWORK} ${networkName}.`); +}; + +export const addNewAddress = (addressName: string, addressValue: string = "") => { + if (!addressName) throw new Error("Emtpy address name."); + + const addressesDirname = join(dirname, `./`); + const addressesFiles = readdirSync(addressesDirname); + + addressesFiles.forEach((addressesFilename) => { + const addressPath = join(addressesDirname, addressesFilename); + + const addressesByNetwork = JSON.parse(readFileSync(addressPath, "utf8")); + + Object.keys(addressesByNetwork).forEach((network) => { + if (!isNetworkName(network)) return; + + addressesByNetwork[network][addressName] = addressValue; + addressesByNetwork[network] = Object.keys(addressesByNetwork[network]) + .sort() + .reduce((obj, key) => { + obj[key as ZetaAddress] = addressesByNetwork[network][key]; + return obj; + }, {} as NetworkAddresses); + }); + + writeFileSync(addressPath, JSON.stringify(addressesByNetwork, null, 2)); + }); + + console.log(`To enable IntelliSense, add the address (${addressName}) to the constants (addresses.helpers.ts).`); +}; + +export const addNewNetwork = (newNetworkName: string, addTo: ZetaNetworkName[]) => { + if (!newNetworkName) throw new Error("Emtpy networkName name."); + const addressesDirname = join(dirname, `./`); + const addressesFiles = readdirSync(addressesDirname); + + addressesFiles.forEach((addressFilename) => { + const addressesFilePath = join(addressesDirname, addressFilename); + /** + * Gets the Zeta network name using the filename, e.g.: addresses.athens.json -> athens + */ + const zetaNetworkName = addressFilename.substring( + addressFilename.indexOf(".") + 1, + addressFilename.lastIndexOf(".") + ); + + if (!isZetaNetworkName(zetaNetworkName)) throw new Error("Error getting Zeta network name."); + + if (!addTo.includes(zetaNetworkName)) return; + + const fileNetworks = JSON.parse(readFileSync(addressesFilePath, "utf8")); + + if (Boolean(fileNetworks[newNetworkName])) throw new Error("Network already exists."); + + /** + * Use an existing network object to populate the new one + */ + const randomNetworkName = Object.keys(fileNetworks)[0]; + fileNetworks[newNetworkName] = deepCloneSerializable(fileNetworks[randomNetworkName]); + + const emptyNewNetworkAddresses = () => { + Object.keys(fileNetworks[newNetworkName]).forEach((addressName) => { + fileNetworks[newNetworkName][addressName] = ""; + }); + }; + emptyNewNetworkAddresses(); + + /** + * The types below aren't 100% correct + */ + const orderedFileNetworks = Object.keys(fileNetworks) + .sort() + .reduce((obj, key) => { + obj[key as LocalNetworkName | MainnetNetworkName | TestnetNetworkName] = fileNetworks[key]; + return obj; + }, {} as LocalnetAddressGroup & MainnetAddressGroup & TestnetAddressGroup); + + writeFileSync(addressesFilePath, JSON.stringify(orderedFileNetworks, null, 2)); + }); + + console.log(`To enable IntelliSense, add the network (${newNetworkName}) to the constants (addresses.helpers.ts).`); +}; + +export const getLocalnetListFromFile = async (): Promise> => { + const troy = await require("./addresses.troy.json"); + return { + troy: troy as LocalnetAddressGroup, + }; +}; + +export const getTestnetListFromFile = async (): Promise> => { + const athens = await require("./addresses.athens.json"); + return { + athens: athens as TestnetAddressGroup, + }; +}; + +export const getMainnetListFromFile = async (): Promise> => { + const mainnet = await require("./addresses.mainnet.json"); + return { + mainnet: mainnet as MainnetAddressGroup, + }; +}; + +export const loadAddressFromFile = async ( + address: ZetaAddress, + { + customNetworkName, + customZetaNetwork, + }: { customNetworkName?: NetworkName; customZetaNetwork?: ZetaNetworkName } = {} +): Promise => { + const { name: _networkName } = network; + const networkName = customNetworkName || _networkName; + + const { ZETA_NETWORK: _ZETA_NETWORK } = process.env; + const ZETA_NETWORK = customZetaNetwork || _ZETA_NETWORK; + + if (!ZETA_NETWORK) throw MissingZetaNetworkError; + + console.log(`Getting ${address} address from ${ZETA_NETWORK}: ${networkName}.`); + + if (isZetaLocalnet(ZETA_NETWORK) && isLocalNetworkName(networkName)) { + return (await getLocalnetListFromFile())[ZETA_NETWORK][networkName][address]; + } + + if (isZetaTestnet(ZETA_NETWORK) && isTestnetNetworkName(networkName)) { + return (await getTestnetListFromFile())[ZETA_NETWORK][networkName][address]; + } + + if (isZetaMainnet(ZETA_NETWORK) && isMainnetNetworkName(networkName)) { + return (await getMainnetListFromFile())[ZETA_NETWORK][networkName][address]; + } + + throw new Error(`Invalid ZETA_NETWORK + network combination ${ZETA_NETWORK} ${networkName}.`); +}; diff --git a/packages/addresses-tools/src/index.ts b/packages/addresses-tools/src/index.ts new file mode 100644 index 00000000..57e3950d --- /dev/null +++ b/packages/addresses-tools/src/index.ts @@ -0,0 +1 @@ +export * from "./addresses.helpers"; diff --git a/packages/addresses/src/log-addresses.ts b/packages/addresses-tools/src/log-addresses.ts similarity index 86% rename from packages/addresses/src/log-addresses.ts rename to packages/addresses-tools/src/log-addresses.ts index f7defc3d..13e18ace 100644 --- a/packages/addresses/src/log-addresses.ts +++ b/packages/addresses-tools/src/log-addresses.ts @@ -1,5 +1,6 @@ -import { getExplorerUrl, getTestnetList, isZetaNetworkName, ZetaTestnetNetworkName } from "./addresses.helpers"; +import { getTestnetList, isZetaNetworkName, ZetaTestnetNetworkName } from "@zetachain/addresses"; +import { getExplorerUrl } from "./addresses.helpers"; const network = process.argv[2]; const toFilter = process.argv[3].split(",").map((w) => w.toLowerCase()); diff --git a/packages/addresses/src/misc.constants.ts b/packages/addresses-tools/src/misc.constants.ts similarity index 100% rename from packages/addresses/src/misc.constants.ts rename to packages/addresses-tools/src/misc.constants.ts diff --git a/packages/addresses/src/misc.helpers.ts b/packages/addresses-tools/src/misc.helpers.ts similarity index 100% rename from packages/addresses/src/misc.helpers.ts rename to packages/addresses-tools/src/misc.helpers.ts diff --git a/packages/addresses/src/networks.ts b/packages/addresses-tools/src/networks.ts similarity index 100% rename from packages/addresses/src/networks.ts rename to packages/addresses-tools/src/networks.ts diff --git a/packages/addresses/tsconfig.json b/packages/addresses-tools/tsconfig.json similarity index 100% rename from packages/addresses/tsconfig.json rename to packages/addresses-tools/tsconfig.json diff --git a/packages/addresses/README.md b/packages/addresses/README.md index 542c3f7e..8a9d13a1 100644 --- a/packages/addresses/README.md +++ b/packages/addresses/README.md @@ -1,3 +1,3 @@ # ZetaChain addresses -This package includes utilities to work with multiple addresses and networks. +This package includes the addresses and networks to use Zetachain. diff --git a/packages/addresses/package.json b/packages/addresses/package.json index 6c199b6d..f108ef00 100644 --- a/packages/addresses/package.json +++ b/packages/addresses/package.json @@ -1,6 +1,6 @@ { "name": "@zetachain/addresses", - "version": "0.0.1", + "version": "0.0.3", "license": "MIT", "author": "zetachain", "publishConfig": { diff --git a/packages/addresses/src/addresses/addresses.athens.json b/packages/addresses/src/addresses.athens.json similarity index 100% rename from packages/addresses/src/addresses/addresses.athens.json rename to packages/addresses/src/addresses.athens.json diff --git a/packages/addresses/src/addresses.helpers.ts b/packages/addresses/src/addresses.helpers.ts index 1e97be04..725dac23 100644 --- a/packages/addresses/src/addresses.helpers.ts +++ b/packages/addresses/src/addresses.helpers.ts @@ -1,9 +1,8 @@ -import dotenv from "dotenv"; -import { readdirSync, readFileSync, writeFileSync } from "fs"; import { network } from "hardhat"; -import { join } from "path"; -import { deepCloneSerializable } from "./misc.helpers"; +import athens from "./addresses.athens.json"; +import mainnet from "./addresses.mainnet.json"; +import troy from "./addresses.troy.json"; export type ZetaAddress = | "connector" @@ -25,7 +24,7 @@ export type ZetaAddress = | "zetaToken" | "zetaTokenConsumerUniV2"; -type NetworkAddresses = Record; +export type NetworkAddresses = Record; const zetaAddresses: Record = { connector: true, crossChainCounter: true, @@ -55,7 +54,7 @@ export const isZetaAddress = (a: string | undefined): a is ZetaAddress => Boolea export type LocalNetworkName = "bsc-localnet" | "eth-localnet" | "hardhat" | "polygon-localnet"; export type ZetaLocalNetworkName = "troy"; -type LocalnetAddressGroup = Record; +export type LocalnetAddressGroup = Record; export const isLocalNetworkName = (networkName: string): networkName is LocalNetworkName => networkName === "hardhat" || networkName === "eth-localnet" || @@ -65,7 +64,7 @@ export const isZetaLocalnet = (networkName: string | undefined): networkName is networkName === "troy"; export const getLocalnetList = (): Record => ({ - troy: JSON.parse(readFileSync(join(__dirname, "./addresses/addresses.troy.json"), "utf8")) as LocalnetAddressGroup, + troy: troy as LocalnetAddressGroup, }); /** @@ -74,8 +73,8 @@ export const getLocalnetList = (): Record; -const isTestnetNetworkName = (networkName: string): networkName is TestnetNetworkName => +export type TestnetAddressGroup = Record; +export const isTestnetNetworkName = (networkName: string): networkName is TestnetNetworkName => networkName === "goerli" || networkName === "bsc-testnet" || networkName === "polygon-mumbai" || @@ -84,7 +83,7 @@ export const isZetaTestnet = (networkName: string | undefined): networkName is Z networkName === "athens"; export const getTestnetList = (): Record => ({ - athens: JSON.parse(readFileSync(join(__dirname, "./addresses/addresses.athens.json"), "utf8")) as TestnetAddressGroup, + athens: athens as TestnetAddressGroup, }); /** @@ -93,15 +92,14 @@ export const getTestnetList = (): Record; -const isMainnetNetworkName = (networkName: string): networkName is MainnetNetworkName => networkName === "eth-mainnet"; +export type MainnetAddressGroup = Record; +export const isMainnetNetworkName = (networkName: string): networkName is MainnetNetworkName => + networkName === "eth-mainnet"; export const isZetaMainnet = (networkName: string | undefined): networkName is ZetaMainnetNetworkName => networkName === "mainnet"; -const getMainnetList: () => Record = () => ({ - mainnet: JSON.parse( - readFileSync(join(__dirname, "./addresses/addresses.mainnet.json"), "utf8") - ) as MainnetAddressGroup, +export const getMainnetList = (): Record => ({ + mainnet: mainnet as MainnetAddressGroup, }); /** @@ -133,46 +131,6 @@ export const isNetworkName = (str: string): str is NetworkName => export const isZetaNetworkName = (str: string): str is ZetaNetworkName => isZetaLocalnet(str) || isZetaTestnet(str) || isZetaMainnet(str); -export const getScanVariable = ({ customNetworkName }: { customNetworkName?: string } = {}): string => { - const networkName = customNetworkName || network.name; - if (!isNetworkName(networkName)) throw new Error(); - dotenv.config(); - - const v = { - "bsc-localnet": "", - "bsc-testnet": process.env.BSCSCAN_API_KEY || "", - "eth-localnet": "", - "eth-mainnet": process.env.ETHERSCAN_API_KEY || "", - goerli: process.env.ETHERSCAN_API_KEY || "", - hardhat: "", - "polygon-localnet": "", - "polygon-mumbai": process.env.POLYGONSCAN_API_KEY || "", - ropsten: process.env.ETHERSCAN_API_KEY || "", - }; - - return v[networkName]; -}; - -export const getExplorerUrl = ({ customNetworkName }: { customNetworkName?: string } = {}): string => { - const networkName = customNetworkName || network.name; - if (!isNetworkName(networkName)) throw new Error(); - dotenv.config(); - - const v = { - "bsc-localnet": "", - "bsc-testnet": "https://testnet.bscscan.com/", - "eth-localnet": "", - "eth-mainnet": "https://etherscan.io/", - goerli: "https://goerli.etherscan.io/", - hardhat: "", - "polygon-localnet": "", - "polygon-mumbai": "https://mumbai.polygonscan.com/", - ropsten: "https://ropsten.etherscan.io/", - }; - - return v[networkName]; -}; - const MissingZetaNetworkError = new Error( "ZETA_NETWORK is not defined, please set the environment variable (e.g.: ZETA_NETWORK=athens )" ); @@ -208,137 +166,3 @@ export const getAddress = ( throw new Error(`Invalid ZETA_NETWORK + network combination ${ZETA_NETWORK} ${networkName}.`); }; - -export const saveAddress = (addressName: ZetaAddress, newAddress: string) => { - const { ZETA_NETWORK } = process.env; - const { name: networkName } = network; - - if (!ZETA_NETWORK) throw MissingZetaNetworkError; - - console.log(`Updating ${addressName} address on ${ZETA_NETWORK}: ${networkName}.`); - - const filename = join(__dirname, `./addresses/addresses.${ZETA_NETWORK}.json`); - - if (isZetaLocalnet(ZETA_NETWORK) && isLocalNetworkName(networkName)) { - const newAddresses: LocalnetAddressGroup = JSON.parse(readFileSync(filename, "utf8")); - if (typeof newAddresses[networkName][addressName] === "undefined") { - console.log( - `The address ${addressName} does not exist, it will get created but make sure to add it to the types.` - ); - } - - newAddresses[networkName][addressName] = newAddress; - - writeFileSync(filename, JSON.stringify(newAddresses, null, 2)); - - console.log(`Updated, new address: ${newAddress}.`); - - return; - } - - if (isZetaTestnet(ZETA_NETWORK) && isTestnetNetworkName(networkName)) { - const newAddresses: TestnetAddressGroup = JSON.parse(readFileSync(filename, "utf8")); - newAddresses[networkName][addressName] = newAddress; - - writeFileSync(filename, JSON.stringify(newAddresses, null, 2)); - - console.log(`Updated, new address: ${newAddress}.`); - - return; - } - - if (isZetaMainnet(ZETA_NETWORK) && isMainnetNetworkName(networkName)) { - const newAddresses: MainnetAddressGroup = JSON.parse(readFileSync(filename, "utf8")); - newAddresses[networkName][addressName] = newAddress; - - writeFileSync(filename, JSON.stringify(newAddresses, null, 2)); - - console.log(`Updated, new address: ${newAddress}.`); - - return; - } - - throw new Error(`Invalid ZETA_NETWORK + network combination ${ZETA_NETWORK} ${networkName}.`); -}; - -export const addNewAddress = (addressName: string, addressValue: string = "") => { - if (!addressName) throw new Error("Emtpy address name."); - - const addressesDirname = join(__dirname, `./addresses`); - const addressesFiles = readdirSync(addressesDirname); - - addressesFiles.forEach((addressesFilename) => { - const addressPath = join(addressesDirname, addressesFilename); - - const addressesByNetwork = JSON.parse(readFileSync(addressPath, "utf8")); - - Object.keys(addressesByNetwork).forEach((network) => { - if (!isNetworkName(network)) return; - - addressesByNetwork[network][addressName] = addressValue; - addressesByNetwork[network] = Object.keys(addressesByNetwork[network]) - .sort() - .reduce((obj, key) => { - obj[key as ZetaAddress] = addressesByNetwork[network][key]; - return obj; - }, {} as NetworkAddresses); - }); - - writeFileSync(addressPath, JSON.stringify(addressesByNetwork, null, 2)); - }); - - console.log(`To enable IntelliSense, add the address (${addressName}) to the constants (addresses.helpers.ts).`); -}; - -export const addNewNetwork = (newNetworkName: string, addTo: ZetaNetworkName[]) => { - if (!newNetworkName) throw new Error("Emtpy networkName name."); - - const addressesDirname = join(__dirname, `./addresses`); - const addressesFiles = readdirSync(addressesDirname); - - addressesFiles.forEach((addressFilename) => { - const addressesFilePath = join(addressesDirname, addressFilename); - /** - * Gets the Zeta network name using the filename, e.g.: addresses.athens.json -> athens - */ - const zetaNetworkName = addressFilename.substring( - addressFilename.indexOf(".") + 1, - addressFilename.lastIndexOf(".") - ); - - if (!isZetaNetworkName(zetaNetworkName)) throw new Error("Error getting Zeta network name."); - - if (!addTo.includes(zetaNetworkName)) return; - - const fileNetworks = JSON.parse(readFileSync(addressesFilePath, "utf8")); - - if (Boolean(fileNetworks[newNetworkName])) throw new Error("Network already exists."); - - /** - * Use an existing network object to populate the new one - */ - const randomNetworkName = Object.keys(fileNetworks)[0]; - fileNetworks[newNetworkName] = deepCloneSerializable(fileNetworks[randomNetworkName]); - - const emptyNewNetworkAddresses = () => { - Object.keys(fileNetworks[newNetworkName]).forEach((addressName) => { - fileNetworks[newNetworkName][addressName] = ""; - }); - }; - emptyNewNetworkAddresses(); - - /** - * The types below aren't 100% correct - */ - const orderedFileNetworks = Object.keys(fileNetworks) - .sort() - .reduce((obj, key) => { - obj[key as LocalNetworkName | MainnetNetworkName | TestnetNetworkName] = fileNetworks[key]; - return obj; - }, {} as LocalnetAddressGroup & MainnetAddressGroup & TestnetAddressGroup); - - writeFileSync(addressesFilePath, JSON.stringify(orderedFileNetworks, null, 2)); - }); - - console.log(`To enable IntelliSense, add the network (${newNetworkName}) to the constants (addresses.helpers.ts).`); -}; diff --git a/packages/addresses/src/addresses/addresses.mainnet.json b/packages/addresses/src/addresses.mainnet.json similarity index 100% rename from packages/addresses/src/addresses/addresses.mainnet.json rename to packages/addresses/src/addresses.mainnet.json diff --git a/packages/addresses/src/addresses/addresses.troy.json b/packages/addresses/src/addresses.troy.json similarity index 100% rename from packages/addresses/src/addresses/addresses.troy.json rename to packages/addresses/src/addresses.troy.json diff --git a/packages/example-contracts/package.json b/packages/example-contracts/package.json index 4da25750..2c55c1eb 100644 --- a/packages/example-contracts/package.json +++ b/packages/example-contracts/package.json @@ -2,6 +2,7 @@ "name": "@zetachain/example-contracts", "version": "0.0.1", "license": "MIT", + "private": true, "author": "zetachain", "publishConfig": { "access": "public", @@ -32,6 +33,7 @@ "@openzeppelin/contracts": "4.6.0", "@uniswap/v2-periphery": "1.1.0-beta.0", "@zetachain/addresses": "workspace:^", + "@zetachain/addresses-tools": "workspace:^", "@zetachain/protocol-contracts": "workspace:^", "ethers": "5.6.8" } diff --git a/packages/example-contracts/scripts/cross-chain-warriors/deploy.ts b/packages/example-contracts/scripts/cross-chain-warriors/deploy.ts index cbed34ef..ac857da4 100644 --- a/packages/example-contracts/scripts/cross-chain-warriors/deploy.ts +++ b/packages/example-contracts/scripts/cross-chain-warriors/deploy.ts @@ -1,4 +1,5 @@ -import { isNetworkName, saveAddress } from "@zetachain/addresses"; +import { isNetworkName } from "@zetachain/addresses"; +import { saveAddress } from "@zetachain/addresses-tools"; import { ethers, network } from "hardhat"; import { getCrossChainWarriors } from "../../lib/cross-chain-warriors/CrossChainWarriors.helpers"; diff --git a/packages/example-contracts/scripts/multi-chain-swap/deploy-multi-chain-swap.ts b/packages/example-contracts/scripts/multi-chain-swap/deploy-multi-chain-swap.ts index 4ff20ac5..e2e3fa74 100644 --- a/packages/example-contracts/scripts/multi-chain-swap/deploy-multi-chain-swap.ts +++ b/packages/example-contracts/scripts/multi-chain-swap/deploy-multi-chain-swap.ts @@ -1,4 +1,5 @@ -import { getAddress, isNetworkName, saveAddress } from "@zetachain/addresses"; +import { getAddress, isNetworkName } from "@zetachain/addresses"; +import { saveAddress } from "@zetachain/addresses-tools"; import { network } from "hardhat"; import { getMultiChainSwapBase } from "../../lib/multi-chain-swap/MultiChainSwap.helpers"; diff --git a/packages/example-contracts/scripts/multi-chain-value/deploy.ts b/packages/example-contracts/scripts/multi-chain-value/deploy.ts index 37e634e5..ee1c8ce0 100644 --- a/packages/example-contracts/scripts/multi-chain-value/deploy.ts +++ b/packages/example-contracts/scripts/multi-chain-value/deploy.ts @@ -1,4 +1,5 @@ -import { getAddress, getChainId, isNetworkName, isZetaTestnet, saveAddress } from "@zetachain/addresses"; +import { getAddress, getChainId, isNetworkName, isZetaTestnet } from "@zetachain/addresses"; +import { saveAddress } from "@zetachain/addresses-tools"; import { network } from "hardhat"; import { getMultiChainValue } from "../../lib/multi-chain-value/MultiChainValue.helpers"; diff --git a/packages/interfaces/.gitignore b/packages/interfaces/.gitignore new file mode 100644 index 00000000..aaad1b1b --- /dev/null +++ b/packages/interfaces/.gitignore @@ -0,0 +1,2 @@ +# Typechain +!typechain-types diff --git a/packages/interfaces/README.md b/packages/interfaces/README.md new file mode 100644 index 00000000..7dedbfd4 --- /dev/null +++ b/packages/interfaces/README.md @@ -0,0 +1,3 @@ +# ZetaChain interfaces + +This package includes the interfaces to use Zetachain like abi and TS types. diff --git a/packages/interfaces/abi/json/@openzeppelin/contracts/access/Ownable.sol/Ownable.json b/packages/interfaces/abi/json/@openzeppelin/contracts/access/Ownable.sol/Ownable.json new file mode 100644 index 00000000..310a2968 --- /dev/null +++ b/packages/interfaces/abi/json/@openzeppelin/contracts/access/Ownable.sol/Ownable.json @@ -0,0 +1,54 @@ +[ + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipTransferred", + "type": "event" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "renounceOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } +] diff --git a/packages/interfaces/abi/json/@openzeppelin/contracts/security/Pausable.sol/Pausable.json b/packages/interfaces/abi/json/@openzeppelin/contracts/security/Pausable.sol/Pausable.json new file mode 100644 index 00000000..98525601 --- /dev/null +++ b/packages/interfaces/abi/json/@openzeppelin/contracts/security/Pausable.sol/Pausable.json @@ -0,0 +1,41 @@ +[ + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "Paused", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "Unpaused", + "type": "event" + }, + { + "inputs": [], + "name": "paused", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + } +] diff --git a/packages/interfaces/abi/json/@openzeppelin/contracts/token/ERC20/ERC20.sol/ERC20.json b/packages/interfaces/abi/json/@openzeppelin/contracts/token/ERC20/ERC20.sol/ERC20.json new file mode 100644 index 00000000..e1f61ef8 --- /dev/null +++ b/packages/interfaces/abi/json/@openzeppelin/contracts/token/ERC20/ERC20.sol/ERC20.json @@ -0,0 +1,288 @@ +[ + { + "inputs": [ + { + "internalType": "string", + "name": "name_", + "type": "string" + }, + { + "internalType": "string", + "name": "symbol_", + "type": "string" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "Approval", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "Transfer", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "spender", + "type": "address" + } + ], + "name": "allowance", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "approve", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "balanceOf", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "decimals", + "outputs": [ + { + "internalType": "uint8", + "name": "", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "subtractedValue", + "type": "uint256" + } + ], + "name": "decreaseAllowance", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "addedValue", + "type": "uint256" + } + ], + "name": "increaseAllowance", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "name", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "symbol", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "totalSupply", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transfer", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transferFrom", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + } +] diff --git a/packages/interfaces/abi/json/@openzeppelin/contracts/token/ERC20/IERC20.sol/IERC20.json b/packages/interfaces/abi/json/@openzeppelin/contracts/token/ERC20/IERC20.sol/IERC20.json new file mode 100644 index 00000000..2a6f247e --- /dev/null +++ b/packages/interfaces/abi/json/@openzeppelin/contracts/token/ERC20/IERC20.sol/IERC20.json @@ -0,0 +1,185 @@ +[ + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "Approval", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "Transfer", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "spender", + "type": "address" + } + ], + "name": "allowance", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "approve", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "balanceOf", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "totalSupply", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transfer", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transferFrom", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + } +] diff --git a/packages/interfaces/abi/json/@openzeppelin/contracts/token/ERC20/extensions/ERC20Burnable.sol/ERC20Burnable.json b/packages/interfaces/abi/json/@openzeppelin/contracts/token/ERC20/extensions/ERC20Burnable.sol/ERC20Burnable.json new file mode 100644 index 00000000..45723de7 --- /dev/null +++ b/packages/interfaces/abi/json/@openzeppelin/contracts/token/ERC20/extensions/ERC20Burnable.sol/ERC20Burnable.json @@ -0,0 +1,303 @@ +[ + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "Approval", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "Transfer", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "spender", + "type": "address" + } + ], + "name": "allowance", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "approve", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "balanceOf", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "burn", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "burnFrom", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "decimals", + "outputs": [ + { + "internalType": "uint8", + "name": "", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "subtractedValue", + "type": "uint256" + } + ], + "name": "decreaseAllowance", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "addedValue", + "type": "uint256" + } + ], + "name": "increaseAllowance", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "name", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "symbol", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "totalSupply", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transfer", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transferFrom", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + } +] diff --git a/packages/interfaces/abi/json/@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol/IERC20Metadata.json b/packages/interfaces/abi/json/@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol/IERC20Metadata.json new file mode 100644 index 00000000..177ac839 --- /dev/null +++ b/packages/interfaces/abi/json/@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol/IERC20Metadata.json @@ -0,0 +1,224 @@ +[ + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "Approval", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "Transfer", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "spender", + "type": "address" + } + ], + "name": "allowance", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "approve", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "balanceOf", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "decimals", + "outputs": [ + { + "internalType": "uint8", + "name": "", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "name", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "symbol", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "totalSupply", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transfer", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transferFrom", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + } +] diff --git a/packages/interfaces/abi/json/@uniswap/v2-core/contracts/interfaces/IUniswapV2Factory.sol/IUniswapV2Factory.json b/packages/interfaces/abi/json/@uniswap/v2-core/contracts/interfaces/IUniswapV2Factory.sol/IUniswapV2Factory.json new file mode 100644 index 00000000..d8c9c7a8 --- /dev/null +++ b/packages/interfaces/abi/json/@uniswap/v2-core/contracts/interfaces/IUniswapV2Factory.sol/IUniswapV2Factory.json @@ -0,0 +1,165 @@ +[ + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "token0", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "token1", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "pair", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "PairCreated", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "allPairs", + "outputs": [ + { + "internalType": "address", + "name": "pair", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "allPairsLength", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "tokenA", + "type": "address" + }, + { + "internalType": "address", + "name": "tokenB", + "type": "address" + } + ], + "name": "createPair", + "outputs": [ + { + "internalType": "address", + "name": "pair", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "feeTo", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "feeToSetter", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "tokenA", + "type": "address" + }, + { + "internalType": "address", + "name": "tokenB", + "type": "address" + } + ], + "name": "getPair", + "outputs": [ + { + "internalType": "address", + "name": "pair", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "setFeeTo", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "setFeeToSetter", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } +] diff --git a/packages/interfaces/abi/json/@uniswap/v2-core/contracts/interfaces/IUniswapV2Pair.sol/IUniswapV2Pair.json b/packages/interfaces/abi/json/@uniswap/v2-core/contracts/interfaces/IUniswapV2Pair.sol/IUniswapV2Pair.json new file mode 100644 index 00000000..d3141815 --- /dev/null +++ b/packages/interfaces/abi/json/@uniswap/v2-core/contracts/interfaces/IUniswapV2Pair.sol/IUniswapV2Pair.json @@ -0,0 +1,653 @@ +[ + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "Approval", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "sender", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount0", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount1", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + } + ], + "name": "Burn", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "sender", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount0", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount1", + "type": "uint256" + } + ], + "name": "Mint", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "sender", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount0In", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount1In", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount0Out", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount1Out", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + } + ], + "name": "Swap", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint112", + "name": "reserve0", + "type": "uint112" + }, + { + "indexed": false, + "internalType": "uint112", + "name": "reserve1", + "type": "uint112" + } + ], + "name": "Sync", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "Transfer", + "type": "event" + }, + { + "inputs": [], + "name": "DOMAIN_SEPARATOR", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "MINIMUM_LIQUIDITY", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [], + "name": "PERMIT_TYPEHASH", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "spender", + "type": "address" + } + ], + "name": "allowance", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "approve", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "balanceOf", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "to", + "type": "address" + } + ], + "name": "burn", + "outputs": [ + { + "internalType": "uint256", + "name": "amount0", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "amount1", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "decimals", + "outputs": [ + { + "internalType": "uint8", + "name": "", + "type": "uint8" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [], + "name": "factory", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getReserves", + "outputs": [ + { + "internalType": "uint112", + "name": "reserve0", + "type": "uint112" + }, + { + "internalType": "uint112", + "name": "reserve1", + "type": "uint112" + }, + { + "internalType": "uint32", + "name": "blockTimestampLast", + "type": "uint32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "initialize", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "kLast", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "to", + "type": "address" + } + ], + "name": "mint", + "outputs": [ + { + "internalType": "uint256", + "name": "liquidity", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "name", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "nonces", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "deadline", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "v", + "type": "uint8" + }, + { + "internalType": "bytes32", + "name": "r", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "s", + "type": "bytes32" + } + ], + "name": "permit", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "price0CumulativeLast", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "price1CumulativeLast", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "to", + "type": "address" + } + ], + "name": "skim", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "amount0Out", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "amount1Out", + "type": "uint256" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "swap", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "symbol", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [], + "name": "sync", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "token0", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "token1", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "totalSupply", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "transfer", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "transferFrom", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + } +] diff --git a/packages/interfaces/abi/json/@uniswap/v2-periphery/contracts/UniswapV2Router02.sol/UniswapV2Router02.json b/packages/interfaces/abi/json/@uniswap/v2-periphery/contracts/UniswapV2Router02.sol/UniswapV2Router02.json new file mode 100644 index 00000000..c1d05c2c --- /dev/null +++ b/packages/interfaces/abi/json/@uniswap/v2-periphery/contracts/UniswapV2Router02.sol/UniswapV2Router02.json @@ -0,0 +1,973 @@ +[ + { + "inputs": [ + { + "internalType": "address", + "name": "_factory", + "type": "address" + }, + { + "internalType": "address", + "name": "_WETH", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "inputs": [], + "name": "WETH", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "tokenA", + "type": "address" + }, + { + "internalType": "address", + "name": "tokenB", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amountADesired", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "amountBDesired", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "amountAMin", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "amountBMin", + "type": "uint256" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "deadline", + "type": "uint256" + } + ], + "name": "addLiquidity", + "outputs": [ + { + "internalType": "uint256", + "name": "amountA", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "amountB", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "liquidity", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "token", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amountTokenDesired", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "amountTokenMin", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "amountETHMin", + "type": "uint256" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "deadline", + "type": "uint256" + } + ], + "name": "addLiquidityETH", + "outputs": [ + { + "internalType": "uint256", + "name": "amountToken", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "amountETH", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "liquidity", + "type": "uint256" + } + ], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [], + "name": "factory", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "amountOut", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "reserveIn", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "reserveOut", + "type": "uint256" + } + ], + "name": "getAmountIn", + "outputs": [ + { + "internalType": "uint256", + "name": "amountIn", + "type": "uint256" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "amountIn", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "reserveIn", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "reserveOut", + "type": "uint256" + } + ], + "name": "getAmountOut", + "outputs": [ + { + "internalType": "uint256", + "name": "amountOut", + "type": "uint256" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "amountOut", + "type": "uint256" + }, + { + "internalType": "address[]", + "name": "path", + "type": "address[]" + } + ], + "name": "getAmountsIn", + "outputs": [ + { + "internalType": "uint256[]", + "name": "amounts", + "type": "uint256[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "amountIn", + "type": "uint256" + }, + { + "internalType": "address[]", + "name": "path", + "type": "address[]" + } + ], + "name": "getAmountsOut", + "outputs": [ + { + "internalType": "uint256[]", + "name": "amounts", + "type": "uint256[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "amountA", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "reserveA", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "reserveB", + "type": "uint256" + } + ], + "name": "quote", + "outputs": [ + { + "internalType": "uint256", + "name": "amountB", + "type": "uint256" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "tokenA", + "type": "address" + }, + { + "internalType": "address", + "name": "tokenB", + "type": "address" + }, + { + "internalType": "uint256", + "name": "liquidity", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "amountAMin", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "amountBMin", + "type": "uint256" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "deadline", + "type": "uint256" + } + ], + "name": "removeLiquidity", + "outputs": [ + { + "internalType": "uint256", + "name": "amountA", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "amountB", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "token", + "type": "address" + }, + { + "internalType": "uint256", + "name": "liquidity", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "amountTokenMin", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "amountETHMin", + "type": "uint256" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "deadline", + "type": "uint256" + } + ], + "name": "removeLiquidityETH", + "outputs": [ + { + "internalType": "uint256", + "name": "amountToken", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "amountETH", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "token", + "type": "address" + }, + { + "internalType": "uint256", + "name": "liquidity", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "amountTokenMin", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "amountETHMin", + "type": "uint256" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "deadline", + "type": "uint256" + } + ], + "name": "removeLiquidityETHSupportingFeeOnTransferTokens", + "outputs": [ + { + "internalType": "uint256", + "name": "amountETH", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "token", + "type": "address" + }, + { + "internalType": "uint256", + "name": "liquidity", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "amountTokenMin", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "amountETHMin", + "type": "uint256" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "deadline", + "type": "uint256" + }, + { + "internalType": "bool", + "name": "approveMax", + "type": "bool" + }, + { + "internalType": "uint8", + "name": "v", + "type": "uint8" + }, + { + "internalType": "bytes32", + "name": "r", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "s", + "type": "bytes32" + } + ], + "name": "removeLiquidityETHWithPermit", + "outputs": [ + { + "internalType": "uint256", + "name": "amountToken", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "amountETH", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "token", + "type": "address" + }, + { + "internalType": "uint256", + "name": "liquidity", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "amountTokenMin", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "amountETHMin", + "type": "uint256" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "deadline", + "type": "uint256" + }, + { + "internalType": "bool", + "name": "approveMax", + "type": "bool" + }, + { + "internalType": "uint8", + "name": "v", + "type": "uint8" + }, + { + "internalType": "bytes32", + "name": "r", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "s", + "type": "bytes32" + } + ], + "name": "removeLiquidityETHWithPermitSupportingFeeOnTransferTokens", + "outputs": [ + { + "internalType": "uint256", + "name": "amountETH", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "tokenA", + "type": "address" + }, + { + "internalType": "address", + "name": "tokenB", + "type": "address" + }, + { + "internalType": "uint256", + "name": "liquidity", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "amountAMin", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "amountBMin", + "type": "uint256" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "deadline", + "type": "uint256" + }, + { + "internalType": "bool", + "name": "approveMax", + "type": "bool" + }, + { + "internalType": "uint8", + "name": "v", + "type": "uint8" + }, + { + "internalType": "bytes32", + "name": "r", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "s", + "type": "bytes32" + } + ], + "name": "removeLiquidityWithPermit", + "outputs": [ + { + "internalType": "uint256", + "name": "amountA", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "amountB", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "amountOut", + "type": "uint256" + }, + { + "internalType": "address[]", + "name": "path", + "type": "address[]" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "deadline", + "type": "uint256" + } + ], + "name": "swapETHForExactTokens", + "outputs": [ + { + "internalType": "uint256[]", + "name": "amounts", + "type": "uint256[]" + } + ], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "amountOutMin", + "type": "uint256" + }, + { + "internalType": "address[]", + "name": "path", + "type": "address[]" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "deadline", + "type": "uint256" + } + ], + "name": "swapExactETHForTokens", + "outputs": [ + { + "internalType": "uint256[]", + "name": "amounts", + "type": "uint256[]" + } + ], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "amountOutMin", + "type": "uint256" + }, + { + "internalType": "address[]", + "name": "path", + "type": "address[]" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "deadline", + "type": "uint256" + } + ], + "name": "swapExactETHForTokensSupportingFeeOnTransferTokens", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "amountIn", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "amountOutMin", + "type": "uint256" + }, + { + "internalType": "address[]", + "name": "path", + "type": "address[]" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "deadline", + "type": "uint256" + } + ], + "name": "swapExactTokensForETH", + "outputs": [ + { + "internalType": "uint256[]", + "name": "amounts", + "type": "uint256[]" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "amountIn", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "amountOutMin", + "type": "uint256" + }, + { + "internalType": "address[]", + "name": "path", + "type": "address[]" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "deadline", + "type": "uint256" + } + ], + "name": "swapExactTokensForETHSupportingFeeOnTransferTokens", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "amountIn", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "amountOutMin", + "type": "uint256" + }, + { + "internalType": "address[]", + "name": "path", + "type": "address[]" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "deadline", + "type": "uint256" + } + ], + "name": "swapExactTokensForTokens", + "outputs": [ + { + "internalType": "uint256[]", + "name": "amounts", + "type": "uint256[]" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "amountIn", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "amountOutMin", + "type": "uint256" + }, + { + "internalType": "address[]", + "name": "path", + "type": "address[]" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "deadline", + "type": "uint256" + } + ], + "name": "swapExactTokensForTokensSupportingFeeOnTransferTokens", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "amountOut", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "amountInMax", + "type": "uint256" + }, + { + "internalType": "address[]", + "name": "path", + "type": "address[]" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "deadline", + "type": "uint256" + } + ], + "name": "swapTokensForExactETH", + "outputs": [ + { + "internalType": "uint256[]", + "name": "amounts", + "type": "uint256[]" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "amountOut", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "amountInMax", + "type": "uint256" + }, + { + "internalType": "address[]", + "name": "path", + "type": "address[]" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "deadline", + "type": "uint256" + } + ], + "name": "swapTokensForExactTokens", + "outputs": [ + { + "internalType": "uint256[]", + "name": "amounts", + "type": "uint256[]" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "stateMutability": "payable", + "type": "receive" + } +] diff --git a/packages/interfaces/abi/json/@uniswap/v2-periphery/contracts/interfaces/IERC20.sol/IERC20.json b/packages/interfaces/abi/json/@uniswap/v2-periphery/contracts/interfaces/IERC20.sol/IERC20.json new file mode 100644 index 00000000..42d5877d --- /dev/null +++ b/packages/interfaces/abi/json/@uniswap/v2-periphery/contracts/interfaces/IERC20.sol/IERC20.json @@ -0,0 +1,224 @@ +[ + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "Approval", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "Transfer", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "spender", + "type": "address" + } + ], + "name": "allowance", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "approve", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "balanceOf", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "decimals", + "outputs": [ + { + "internalType": "uint8", + "name": "", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "name", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "symbol", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "totalSupply", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "transfer", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "transferFrom", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + } +] diff --git a/packages/interfaces/abi/json/@uniswap/v2-periphery/contracts/interfaces/IUniswapV2Router01.sol/IUniswapV2Router01.json b/packages/interfaces/abi/json/@uniswap/v2-periphery/contracts/interfaces/IUniswapV2Router01.sol/IUniswapV2Router01.json new file mode 100644 index 00000000..be154174 --- /dev/null +++ b/packages/interfaces/abi/json/@uniswap/v2-periphery/contracts/interfaces/IUniswapV2Router01.sol/IUniswapV2Router01.json @@ -0,0 +1,751 @@ +[ + { + "inputs": [], + "name": "WETH", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "tokenA", + "type": "address" + }, + { + "internalType": "address", + "name": "tokenB", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amountADesired", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "amountBDesired", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "amountAMin", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "amountBMin", + "type": "uint256" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "deadline", + "type": "uint256" + } + ], + "name": "addLiquidity", + "outputs": [ + { + "internalType": "uint256", + "name": "amountA", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "amountB", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "liquidity", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "token", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amountTokenDesired", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "amountTokenMin", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "amountETHMin", + "type": "uint256" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "deadline", + "type": "uint256" + } + ], + "name": "addLiquidityETH", + "outputs": [ + { + "internalType": "uint256", + "name": "amountToken", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "amountETH", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "liquidity", + "type": "uint256" + } + ], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [], + "name": "factory", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "amountOut", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "reserveIn", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "reserveOut", + "type": "uint256" + } + ], + "name": "getAmountIn", + "outputs": [ + { + "internalType": "uint256", + "name": "amountIn", + "type": "uint256" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "amountIn", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "reserveIn", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "reserveOut", + "type": "uint256" + } + ], + "name": "getAmountOut", + "outputs": [ + { + "internalType": "uint256", + "name": "amountOut", + "type": "uint256" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "amountOut", + "type": "uint256" + }, + { + "internalType": "address[]", + "name": "path", + "type": "address[]" + } + ], + "name": "getAmountsIn", + "outputs": [ + { + "internalType": "uint256[]", + "name": "amounts", + "type": "uint256[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "amountIn", + "type": "uint256" + }, + { + "internalType": "address[]", + "name": "path", + "type": "address[]" + } + ], + "name": "getAmountsOut", + "outputs": [ + { + "internalType": "uint256[]", + "name": "amounts", + "type": "uint256[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "amountA", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "reserveA", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "reserveB", + "type": "uint256" + } + ], + "name": "quote", + "outputs": [ + { + "internalType": "uint256", + "name": "amountB", + "type": "uint256" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "tokenA", + "type": "address" + }, + { + "internalType": "address", + "name": "tokenB", + "type": "address" + }, + { + "internalType": "uint256", + "name": "liquidity", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "amountAMin", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "amountBMin", + "type": "uint256" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "deadline", + "type": "uint256" + } + ], + "name": "removeLiquidity", + "outputs": [ + { + "internalType": "uint256", + "name": "amountA", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "amountB", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "token", + "type": "address" + }, + { + "internalType": "uint256", + "name": "liquidity", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "amountTokenMin", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "amountETHMin", + "type": "uint256" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "deadline", + "type": "uint256" + } + ], + "name": "removeLiquidityETH", + "outputs": [ + { + "internalType": "uint256", + "name": "amountToken", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "amountETH", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "token", + "type": "address" + }, + { + "internalType": "uint256", + "name": "liquidity", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "amountTokenMin", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "amountETHMin", + "type": "uint256" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "deadline", + "type": "uint256" + }, + { + "internalType": "bool", + "name": "approveMax", + "type": "bool" + }, + { + "internalType": "uint8", + "name": "v", + "type": "uint8" + }, + { + "internalType": "bytes32", + "name": "r", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "s", + "type": "bytes32" + } + ], + "name": "removeLiquidityETHWithPermit", + "outputs": [ + { + "internalType": "uint256", + "name": "amountToken", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "amountETH", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "tokenA", + "type": "address" + }, + { + "internalType": "address", + "name": "tokenB", + "type": "address" + }, + { + "internalType": "uint256", + "name": "liquidity", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "amountAMin", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "amountBMin", + "type": "uint256" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "deadline", + "type": "uint256" + }, + { + "internalType": "bool", + "name": "approveMax", + "type": "bool" + }, + { + "internalType": "uint8", + "name": "v", + "type": "uint8" + }, + { + "internalType": "bytes32", + "name": "r", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "s", + "type": "bytes32" + } + ], + "name": "removeLiquidityWithPermit", + "outputs": [ + { + "internalType": "uint256", + "name": "amountA", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "amountB", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "amountOut", + "type": "uint256" + }, + { + "internalType": "address[]", + "name": "path", + "type": "address[]" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "deadline", + "type": "uint256" + } + ], + "name": "swapETHForExactTokens", + "outputs": [ + { + "internalType": "uint256[]", + "name": "amounts", + "type": "uint256[]" + } + ], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "amountOutMin", + "type": "uint256" + }, + { + "internalType": "address[]", + "name": "path", + "type": "address[]" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "deadline", + "type": "uint256" + } + ], + "name": "swapExactETHForTokens", + "outputs": [ + { + "internalType": "uint256[]", + "name": "amounts", + "type": "uint256[]" + } + ], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "amountIn", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "amountOutMin", + "type": "uint256" + }, + { + "internalType": "address[]", + "name": "path", + "type": "address[]" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "deadline", + "type": "uint256" + } + ], + "name": "swapExactTokensForETH", + "outputs": [ + { + "internalType": "uint256[]", + "name": "amounts", + "type": "uint256[]" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "amountIn", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "amountOutMin", + "type": "uint256" + }, + { + "internalType": "address[]", + "name": "path", + "type": "address[]" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "deadline", + "type": "uint256" + } + ], + "name": "swapExactTokensForTokens", + "outputs": [ + { + "internalType": "uint256[]", + "name": "amounts", + "type": "uint256[]" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "amountOut", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "amountInMax", + "type": "uint256" + }, + { + "internalType": "address[]", + "name": "path", + "type": "address[]" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "deadline", + "type": "uint256" + } + ], + "name": "swapTokensForExactETH", + "outputs": [ + { + "internalType": "uint256[]", + "name": "amounts", + "type": "uint256[]" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "amountOut", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "amountInMax", + "type": "uint256" + }, + { + "internalType": "address[]", + "name": "path", + "type": "address[]" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "deadline", + "type": "uint256" + } + ], + "name": "swapTokensForExactTokens", + "outputs": [ + { + "internalType": "uint256[]", + "name": "amounts", + "type": "uint256[]" + } + ], + "stateMutability": "nonpayable", + "type": "function" + } +] diff --git a/packages/interfaces/abi/json/@uniswap/v2-periphery/contracts/interfaces/IUniswapV2Router02.sol/IUniswapV2Router02.json b/packages/interfaces/abi/json/@uniswap/v2-periphery/contracts/interfaces/IUniswapV2Router02.sol/IUniswapV2Router02.json new file mode 100644 index 00000000..55ca7a73 --- /dev/null +++ b/packages/interfaces/abi/json/@uniswap/v2-periphery/contracts/interfaces/IUniswapV2Router02.sol/IUniswapV2Router02.json @@ -0,0 +1,953 @@ +[ + { + "inputs": [], + "name": "WETH", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "tokenA", + "type": "address" + }, + { + "internalType": "address", + "name": "tokenB", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amountADesired", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "amountBDesired", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "amountAMin", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "amountBMin", + "type": "uint256" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "deadline", + "type": "uint256" + } + ], + "name": "addLiquidity", + "outputs": [ + { + "internalType": "uint256", + "name": "amountA", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "amountB", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "liquidity", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "token", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amountTokenDesired", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "amountTokenMin", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "amountETHMin", + "type": "uint256" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "deadline", + "type": "uint256" + } + ], + "name": "addLiquidityETH", + "outputs": [ + { + "internalType": "uint256", + "name": "amountToken", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "amountETH", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "liquidity", + "type": "uint256" + } + ], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [], + "name": "factory", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "amountOut", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "reserveIn", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "reserveOut", + "type": "uint256" + } + ], + "name": "getAmountIn", + "outputs": [ + { + "internalType": "uint256", + "name": "amountIn", + "type": "uint256" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "amountIn", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "reserveIn", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "reserveOut", + "type": "uint256" + } + ], + "name": "getAmountOut", + "outputs": [ + { + "internalType": "uint256", + "name": "amountOut", + "type": "uint256" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "amountOut", + "type": "uint256" + }, + { + "internalType": "address[]", + "name": "path", + "type": "address[]" + } + ], + "name": "getAmountsIn", + "outputs": [ + { + "internalType": "uint256[]", + "name": "amounts", + "type": "uint256[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "amountIn", + "type": "uint256" + }, + { + "internalType": "address[]", + "name": "path", + "type": "address[]" + } + ], + "name": "getAmountsOut", + "outputs": [ + { + "internalType": "uint256[]", + "name": "amounts", + "type": "uint256[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "amountA", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "reserveA", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "reserveB", + "type": "uint256" + } + ], + "name": "quote", + "outputs": [ + { + "internalType": "uint256", + "name": "amountB", + "type": "uint256" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "tokenA", + "type": "address" + }, + { + "internalType": "address", + "name": "tokenB", + "type": "address" + }, + { + "internalType": "uint256", + "name": "liquidity", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "amountAMin", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "amountBMin", + "type": "uint256" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "deadline", + "type": "uint256" + } + ], + "name": "removeLiquidity", + "outputs": [ + { + "internalType": "uint256", + "name": "amountA", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "amountB", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "token", + "type": "address" + }, + { + "internalType": "uint256", + "name": "liquidity", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "amountTokenMin", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "amountETHMin", + "type": "uint256" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "deadline", + "type": "uint256" + } + ], + "name": "removeLiquidityETH", + "outputs": [ + { + "internalType": "uint256", + "name": "amountToken", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "amountETH", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "token", + "type": "address" + }, + { + "internalType": "uint256", + "name": "liquidity", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "amountTokenMin", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "amountETHMin", + "type": "uint256" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "deadline", + "type": "uint256" + } + ], + "name": "removeLiquidityETHSupportingFeeOnTransferTokens", + "outputs": [ + { + "internalType": "uint256", + "name": "amountETH", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "token", + "type": "address" + }, + { + "internalType": "uint256", + "name": "liquidity", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "amountTokenMin", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "amountETHMin", + "type": "uint256" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "deadline", + "type": "uint256" + }, + { + "internalType": "bool", + "name": "approveMax", + "type": "bool" + }, + { + "internalType": "uint8", + "name": "v", + "type": "uint8" + }, + { + "internalType": "bytes32", + "name": "r", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "s", + "type": "bytes32" + } + ], + "name": "removeLiquidityETHWithPermit", + "outputs": [ + { + "internalType": "uint256", + "name": "amountToken", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "amountETH", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "token", + "type": "address" + }, + { + "internalType": "uint256", + "name": "liquidity", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "amountTokenMin", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "amountETHMin", + "type": "uint256" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "deadline", + "type": "uint256" + }, + { + "internalType": "bool", + "name": "approveMax", + "type": "bool" + }, + { + "internalType": "uint8", + "name": "v", + "type": "uint8" + }, + { + "internalType": "bytes32", + "name": "r", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "s", + "type": "bytes32" + } + ], + "name": "removeLiquidityETHWithPermitSupportingFeeOnTransferTokens", + "outputs": [ + { + "internalType": "uint256", + "name": "amountETH", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "tokenA", + "type": "address" + }, + { + "internalType": "address", + "name": "tokenB", + "type": "address" + }, + { + "internalType": "uint256", + "name": "liquidity", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "amountAMin", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "amountBMin", + "type": "uint256" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "deadline", + "type": "uint256" + }, + { + "internalType": "bool", + "name": "approveMax", + "type": "bool" + }, + { + "internalType": "uint8", + "name": "v", + "type": "uint8" + }, + { + "internalType": "bytes32", + "name": "r", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "s", + "type": "bytes32" + } + ], + "name": "removeLiquidityWithPermit", + "outputs": [ + { + "internalType": "uint256", + "name": "amountA", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "amountB", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "amountOut", + "type": "uint256" + }, + { + "internalType": "address[]", + "name": "path", + "type": "address[]" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "deadline", + "type": "uint256" + } + ], + "name": "swapETHForExactTokens", + "outputs": [ + { + "internalType": "uint256[]", + "name": "amounts", + "type": "uint256[]" + } + ], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "amountOutMin", + "type": "uint256" + }, + { + "internalType": "address[]", + "name": "path", + "type": "address[]" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "deadline", + "type": "uint256" + } + ], + "name": "swapExactETHForTokens", + "outputs": [ + { + "internalType": "uint256[]", + "name": "amounts", + "type": "uint256[]" + } + ], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "amountOutMin", + "type": "uint256" + }, + { + "internalType": "address[]", + "name": "path", + "type": "address[]" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "deadline", + "type": "uint256" + } + ], + "name": "swapExactETHForTokensSupportingFeeOnTransferTokens", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "amountIn", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "amountOutMin", + "type": "uint256" + }, + { + "internalType": "address[]", + "name": "path", + "type": "address[]" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "deadline", + "type": "uint256" + } + ], + "name": "swapExactTokensForETH", + "outputs": [ + { + "internalType": "uint256[]", + "name": "amounts", + "type": "uint256[]" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "amountIn", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "amountOutMin", + "type": "uint256" + }, + { + "internalType": "address[]", + "name": "path", + "type": "address[]" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "deadline", + "type": "uint256" + } + ], + "name": "swapExactTokensForETHSupportingFeeOnTransferTokens", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "amountIn", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "amountOutMin", + "type": "uint256" + }, + { + "internalType": "address[]", + "name": "path", + "type": "address[]" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "deadline", + "type": "uint256" + } + ], + "name": "swapExactTokensForTokens", + "outputs": [ + { + "internalType": "uint256[]", + "name": "amounts", + "type": "uint256[]" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "amountIn", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "amountOutMin", + "type": "uint256" + }, + { + "internalType": "address[]", + "name": "path", + "type": "address[]" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "deadline", + "type": "uint256" + } + ], + "name": "swapExactTokensForTokensSupportingFeeOnTransferTokens", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "amountOut", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "amountInMax", + "type": "uint256" + }, + { + "internalType": "address[]", + "name": "path", + "type": "address[]" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "deadline", + "type": "uint256" + } + ], + "name": "swapTokensForExactETH", + "outputs": [ + { + "internalType": "uint256[]", + "name": "amounts", + "type": "uint256[]" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "amountOut", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "amountInMax", + "type": "uint256" + }, + { + "internalType": "address[]", + "name": "path", + "type": "address[]" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "deadline", + "type": "uint256" + } + ], + "name": "swapTokensForExactTokens", + "outputs": [ + { + "internalType": "uint256[]", + "name": "amounts", + "type": "uint256[]" + } + ], + "stateMutability": "nonpayable", + "type": "function" + } +] diff --git a/packages/interfaces/abi/json/@uniswap/v2-periphery/contracts/interfaces/IWETH.sol/IWETH.json b/packages/interfaces/abi/json/@uniswap/v2-periphery/contracts/interfaces/IWETH.sol/IWETH.json new file mode 100644 index 00000000..19287122 --- /dev/null +++ b/packages/interfaces/abi/json/@uniswap/v2-periphery/contracts/interfaces/IWETH.sol/IWETH.json @@ -0,0 +1,46 @@ +[ + { + "inputs": [], + "name": "deposit", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "transfer", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "withdraw", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } +] diff --git a/packages/interfaces/abi/json/@uniswap/v3-core/contracts/interfaces/callback/IUniswapV3SwapCallback.sol/IUniswapV3SwapCallback.json b/packages/interfaces/abi/json/@uniswap/v3-core/contracts/interfaces/callback/IUniswapV3SwapCallback.sol/IUniswapV3SwapCallback.json new file mode 100644 index 00000000..03e7a2c0 --- /dev/null +++ b/packages/interfaces/abi/json/@uniswap/v3-core/contracts/interfaces/callback/IUniswapV3SwapCallback.sol/IUniswapV3SwapCallback.json @@ -0,0 +1,25 @@ +[ + { + "inputs": [ + { + "internalType": "int256", + "name": "amount0Delta", + "type": "int256" + }, + { + "internalType": "int256", + "name": "amount1Delta", + "type": "int256" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "uniswapV3SwapCallback", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } +] diff --git a/packages/interfaces/abi/json/@uniswap/v3-periphery/contracts/interfaces/IQuoter.sol/IQuoter.json b/packages/interfaces/abi/json/@uniswap/v3-periphery/contracts/interfaces/IQuoter.sol/IQuoter.json new file mode 100644 index 00000000..ec672426 --- /dev/null +++ b/packages/interfaces/abi/json/@uniswap/v3-periphery/contracts/interfaces/IQuoter.sol/IQuoter.json @@ -0,0 +1,128 @@ +[ + { + "inputs": [ + { + "internalType": "bytes", + "name": "path", + "type": "bytes" + }, + { + "internalType": "uint256", + "name": "amountIn", + "type": "uint256" + } + ], + "name": "quoteExactInput", + "outputs": [ + { + "internalType": "uint256", + "name": "amountOut", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "tokenIn", + "type": "address" + }, + { + "internalType": "address", + "name": "tokenOut", + "type": "address" + }, + { + "internalType": "uint24", + "name": "fee", + "type": "uint24" + }, + { + "internalType": "uint256", + "name": "amountIn", + "type": "uint256" + }, + { + "internalType": "uint160", + "name": "sqrtPriceLimitX96", + "type": "uint160" + } + ], + "name": "quoteExactInputSingle", + "outputs": [ + { + "internalType": "uint256", + "name": "amountOut", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes", + "name": "path", + "type": "bytes" + }, + { + "internalType": "uint256", + "name": "amountOut", + "type": "uint256" + } + ], + "name": "quoteExactOutput", + "outputs": [ + { + "internalType": "uint256", + "name": "amountIn", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "tokenIn", + "type": "address" + }, + { + "internalType": "address", + "name": "tokenOut", + "type": "address" + }, + { + "internalType": "uint24", + "name": "fee", + "type": "uint24" + }, + { + "internalType": "uint256", + "name": "amountOut", + "type": "uint256" + }, + { + "internalType": "uint160", + "name": "sqrtPriceLimitX96", + "type": "uint160" + } + ], + "name": "quoteExactOutputSingle", + "outputs": [ + { + "internalType": "uint256", + "name": "amountIn", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + } +] diff --git a/packages/interfaces/abi/json/@uniswap/v3-periphery/contracts/interfaces/ISwapRouter.sol/ISwapRouter.json b/packages/interfaces/abi/json/@uniswap/v3-periphery/contracts/interfaces/ISwapRouter.sol/ISwapRouter.json new file mode 100644 index 00000000..21e3a353 --- /dev/null +++ b/packages/interfaces/abi/json/@uniswap/v3-periphery/contracts/interfaces/ISwapRouter.sol/ISwapRouter.json @@ -0,0 +1,239 @@ +[ + { + "inputs": [ + { + "components": [ + { + "internalType": "bytes", + "name": "path", + "type": "bytes" + }, + { + "internalType": "address", + "name": "recipient", + "type": "address" + }, + { + "internalType": "uint256", + "name": "deadline", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "amountIn", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "amountOutMinimum", + "type": "uint256" + } + ], + "internalType": "struct ISwapRouter.ExactInputParams", + "name": "params", + "type": "tuple" + } + ], + "name": "exactInput", + "outputs": [ + { + "internalType": "uint256", + "name": "amountOut", + "type": "uint256" + } + ], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "components": [ + { + "internalType": "address", + "name": "tokenIn", + "type": "address" + }, + { + "internalType": "address", + "name": "tokenOut", + "type": "address" + }, + { + "internalType": "uint24", + "name": "fee", + "type": "uint24" + }, + { + "internalType": "address", + "name": "recipient", + "type": "address" + }, + { + "internalType": "uint256", + "name": "deadline", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "amountIn", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "amountOutMinimum", + "type": "uint256" + }, + { + "internalType": "uint160", + "name": "sqrtPriceLimitX96", + "type": "uint160" + } + ], + "internalType": "struct ISwapRouter.ExactInputSingleParams", + "name": "params", + "type": "tuple" + } + ], + "name": "exactInputSingle", + "outputs": [ + { + "internalType": "uint256", + "name": "amountOut", + "type": "uint256" + } + ], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "components": [ + { + "internalType": "bytes", + "name": "path", + "type": "bytes" + }, + { + "internalType": "address", + "name": "recipient", + "type": "address" + }, + { + "internalType": "uint256", + "name": "deadline", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "amountOut", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "amountInMaximum", + "type": "uint256" + } + ], + "internalType": "struct ISwapRouter.ExactOutputParams", + "name": "params", + "type": "tuple" + } + ], + "name": "exactOutput", + "outputs": [ + { + "internalType": "uint256", + "name": "amountIn", + "type": "uint256" + } + ], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "components": [ + { + "internalType": "address", + "name": "tokenIn", + "type": "address" + }, + { + "internalType": "address", + "name": "tokenOut", + "type": "address" + }, + { + "internalType": "uint24", + "name": "fee", + "type": "uint24" + }, + { + "internalType": "address", + "name": "recipient", + "type": "address" + }, + { + "internalType": "uint256", + "name": "deadline", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "amountOut", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "amountInMaximum", + "type": "uint256" + }, + { + "internalType": "uint160", + "name": "sqrtPriceLimitX96", + "type": "uint160" + } + ], + "internalType": "struct ISwapRouter.ExactOutputSingleParams", + "name": "params", + "type": "tuple" + } + ], + "name": "exactOutputSingle", + "outputs": [ + { + "internalType": "uint256", + "name": "amountIn", + "type": "uint256" + } + ], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "int256", + "name": "amount0Delta", + "type": "int256" + }, + { + "internalType": "int256", + "name": "amount1Delta", + "type": "int256" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "uniswapV3SwapCallback", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } +] diff --git a/packages/interfaces/abi/json/contracts/ImmutableCreate2Factory.sol/ImmutableCreate2Factory.json b/packages/interfaces/abi/json/contracts/ImmutableCreate2Factory.sol/ImmutableCreate2Factory.json new file mode 100644 index 00000000..b7a40ec3 --- /dev/null +++ b/packages/interfaces/abi/json/contracts/ImmutableCreate2Factory.sol/ImmutableCreate2Factory.json @@ -0,0 +1,90 @@ +[ + { + "constant": true, + "inputs": [ + { + "name": "deploymentAddress", + "type": "address" + } + ], + "name": "hasBeenDeployed", + "outputs": [ + { + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "salt", + "type": "bytes32" + }, + { + "name": "initializationCode", + "type": "bytes" + } + ], + "name": "safeCreate2", + "outputs": [ + { + "name": "deploymentAddress", + "type": "address" + } + ], + "payable": true, + "stateMutability": "payable", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "name": "salt", + "type": "bytes32" + }, + { + "name": "initCode", + "type": "bytes" + } + ], + "name": "findCreate2Address", + "outputs": [ + { + "name": "deploymentAddress", + "type": "address" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "name": "salt", + "type": "bytes32" + }, + { + "name": "initCodeHash", + "type": "bytes32" + } + ], + "name": "findCreate2AddressViaHash", + "outputs": [ + { + "name": "deploymentAddress", + "type": "address" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + } +] diff --git a/packages/interfaces/abi/json/contracts/Zeta.eth.sol/ZetaEth.json b/packages/interfaces/abi/json/contracts/Zeta.eth.sol/ZetaEth.json new file mode 100644 index 00000000..80e345e6 --- /dev/null +++ b/packages/interfaces/abi/json/contracts/Zeta.eth.sol/ZetaEth.json @@ -0,0 +1,283 @@ +[ + { + "inputs": [ + { + "internalType": "uint256", + "name": "initialSupply", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "Approval", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "Transfer", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "spender", + "type": "address" + } + ], + "name": "allowance", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "approve", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "balanceOf", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "decimals", + "outputs": [ + { + "internalType": "uint8", + "name": "", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "subtractedValue", + "type": "uint256" + } + ], + "name": "decreaseAllowance", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "addedValue", + "type": "uint256" + } + ], + "name": "increaseAllowance", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "name", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "symbol", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "totalSupply", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transfer", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transferFrom", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + } +] diff --git a/packages/interfaces/abi/json/contracts/Zeta.non-eth.sol/ZetaNonEth.json b/packages/interfaces/abi/json/contracts/Zeta.non-eth.sol/ZetaNonEth.json new file mode 100644 index 00000000..b9596116 --- /dev/null +++ b/packages/interfaces/abi/json/contracts/Zeta.non-eth.sol/ZetaNonEth.json @@ -0,0 +1,504 @@ +[ + { + "inputs": [ + { + "internalType": "address", + "name": "tssAddress_", + "type": "address" + }, + { + "internalType": "address", + "name": "tssAddressUpdater_", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "caller", + "type": "address" + } + ], + "name": "CallerIsNotConnector", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "caller", + "type": "address" + } + ], + "name": "CallerIsNotTss", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "caller", + "type": "address" + } + ], + "name": "CallerIsNotTssOrUpdater", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "caller", + "type": "address" + } + ], + "name": "CallerIsNotTssUpdater", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidAddress", + "type": "error" + }, + { + "inputs": [], + "name": "ZetaTransferError", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "Approval", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "burnee", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "Burnt", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "mintee", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "internalSendHash", + "type": "bytes32" + } + ], + "name": "Minted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "Transfer", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "spender", + "type": "address" + } + ], + "name": "allowance", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "approve", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "balanceOf", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "burn", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "burnFrom", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "connectorAddress", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "decimals", + "outputs": [ + { + "internalType": "uint8", + "name": "", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "subtractedValue", + "type": "uint256" + } + ], + "name": "decreaseAllowance", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "addedValue", + "type": "uint256" + } + ], + "name": "increaseAllowance", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "mintee", + "type": "address" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + }, + { + "internalType": "bytes32", + "name": "internalSendHash", + "type": "bytes32" + } + ], + "name": "mint", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "name", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "renounceTssAddressUpdater", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "symbol", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "totalSupply", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transfer", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transferFrom", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "tssAddress", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "tssAddressUpdater", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "tssAddress_", + "type": "address" + }, + { + "internalType": "address", + "name": "connectorAddress_", + "type": "address" + } + ], + "name": "updateTssAndConnectorAddresses", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } +] diff --git a/packages/interfaces/abi/json/contracts/ZetaConnector.base.sol/ZetaConnectorBase.json b/packages/interfaces/abi/json/contracts/ZetaConnector.base.sol/ZetaConnectorBase.json new file mode 100644 index 00000000..06b8dda3 --- /dev/null +++ b/packages/interfaces/abi/json/contracts/ZetaConnector.base.sol/ZetaConnectorBase.json @@ -0,0 +1,542 @@ +[ + { + "inputs": [ + { + "internalType": "address", + "name": "zetaToken_", + "type": "address" + }, + { + "internalType": "address", + "name": "tssAddress_", + "type": "address" + }, + { + "internalType": "address", + "name": "tssAddressUpdater_", + "type": "address" + }, + { + "internalType": "address", + "name": "pauserAddress_", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "caller", + "type": "address" + } + ], + "name": "CallerIsNotPauser", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "caller", + "type": "address" + } + ], + "name": "CallerIsNotTss", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "caller", + "type": "address" + } + ], + "name": "CallerIsNotTssOrUpdater", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "caller", + "type": "address" + } + ], + "name": "CallerIsNotTssUpdater", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "maxSupply", + "type": "uint256" + } + ], + "name": "ExceedsMaxSupply", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidAddress", + "type": "error" + }, + { + "inputs": [], + "name": "ZetaTransferError", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "Paused", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "updaterAddress", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "newTssAddress", + "type": "address" + } + ], + "name": "PauserAddressUpdated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "zetaTxSenderAddress", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "newTssAddress", + "type": "address" + } + ], + "name": "TSSAddressUpdated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "Unpaused", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "bytes", + "name": "zetaTxSenderAddress", + "type": "bytes" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "sourceChainId", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "address", + "name": "destinationAddress", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "zetaValueAndGas", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "message", + "type": "bytes" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "internalSendHash", + "type": "bytes32" + } + ], + "name": "ZetaReceived", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "zetaTxSenderAddress", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "sourceChainId", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "destinationChainId", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "bytes", + "name": "destinationAddress", + "type": "bytes" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "zetaValueAndGas", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "message", + "type": "bytes" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "internalSendHash", + "type": "bytes32" + } + ], + "name": "ZetaReverted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "sourceTxOriginAddress", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "zetaTxSenderAddress", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "destinationChainId", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "bytes", + "name": "destinationAddress", + "type": "bytes" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "zetaValueAndGas", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "destinationGasLimit", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "message", + "type": "bytes" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "zetaParams", + "type": "bytes" + } + ], + "name": "ZetaSent", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "bytes", + "name": "zetaTxSenderAddress", + "type": "bytes" + }, + { + "internalType": "uint256", + "name": "sourceChainId", + "type": "uint256" + }, + { + "internalType": "address", + "name": "destinationAddress", + "type": "address" + }, + { + "internalType": "uint256", + "name": "zetaValueAndGas", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "message", + "type": "bytes" + }, + { + "internalType": "bytes32", + "name": "internalSendHash", + "type": "bytes32" + } + ], + "name": "onReceive", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "zetaTxSenderAddress", + "type": "address" + }, + { + "internalType": "uint256", + "name": "sourceChainId", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "destinationAddress", + "type": "bytes" + }, + { + "internalType": "uint256", + "name": "destinationChainId", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "zetaValueAndGas", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "message", + "type": "bytes" + }, + { + "internalType": "bytes32", + "name": "internalSendHash", + "type": "bytes32" + } + ], + "name": "onRevert", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "pause", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "paused", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "pauserAddress", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "renounceTssAddressUpdater", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "components": [ + { + "internalType": "uint256", + "name": "destinationChainId", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "destinationAddress", + "type": "bytes" + }, + { + "internalType": "uint256", + "name": "destinationGasLimit", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "message", + "type": "bytes" + }, + { + "internalType": "uint256", + "name": "zetaValueAndGas", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "zetaParams", + "type": "bytes" + } + ], + "internalType": "struct ZetaInterfaces.SendInput", + "name": "input", + "type": "tuple" + } + ], + "name": "send", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "tssAddress", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "tssAddressUpdater", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "unpause", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "pauserAddress_", + "type": "address" + } + ], + "name": "updatePauserAddress", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "tssAddress_", + "type": "address" + } + ], + "name": "updateTssAddress", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "zetaToken", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + } +] diff --git a/packages/interfaces/abi/json/contracts/ZetaConnector.eth.sol/ZetaConnectorEth.json b/packages/interfaces/abi/json/contracts/ZetaConnector.eth.sol/ZetaConnectorEth.json new file mode 100644 index 00000000..a7c081a5 --- /dev/null +++ b/packages/interfaces/abi/json/contracts/ZetaConnector.eth.sol/ZetaConnectorEth.json @@ -0,0 +1,555 @@ +[ + { + "inputs": [ + { + "internalType": "address", + "name": "zetaToken_", + "type": "address" + }, + { + "internalType": "address", + "name": "tssAddress_", + "type": "address" + }, + { + "internalType": "address", + "name": "tssAddressUpdater_", + "type": "address" + }, + { + "internalType": "address", + "name": "pauserAddress_", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "caller", + "type": "address" + } + ], + "name": "CallerIsNotPauser", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "caller", + "type": "address" + } + ], + "name": "CallerIsNotTss", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "caller", + "type": "address" + } + ], + "name": "CallerIsNotTssOrUpdater", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "caller", + "type": "address" + } + ], + "name": "CallerIsNotTssUpdater", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "maxSupply", + "type": "uint256" + } + ], + "name": "ExceedsMaxSupply", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidAddress", + "type": "error" + }, + { + "inputs": [], + "name": "ZetaTransferError", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "Paused", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "updaterAddress", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "newTssAddress", + "type": "address" + } + ], + "name": "PauserAddressUpdated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "zetaTxSenderAddress", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "newTssAddress", + "type": "address" + } + ], + "name": "TSSAddressUpdated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "Unpaused", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "bytes", + "name": "zetaTxSenderAddress", + "type": "bytes" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "sourceChainId", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "address", + "name": "destinationAddress", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "zetaValueAndGas", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "message", + "type": "bytes" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "internalSendHash", + "type": "bytes32" + } + ], + "name": "ZetaReceived", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "zetaTxSenderAddress", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "sourceChainId", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "destinationChainId", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "bytes", + "name": "destinationAddress", + "type": "bytes" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "zetaValueAndGas", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "message", + "type": "bytes" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "internalSendHash", + "type": "bytes32" + } + ], + "name": "ZetaReverted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "sourceTxOriginAddress", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "zetaTxSenderAddress", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "destinationChainId", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "bytes", + "name": "destinationAddress", + "type": "bytes" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "zetaValueAndGas", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "destinationGasLimit", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "message", + "type": "bytes" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "zetaParams", + "type": "bytes" + } + ], + "name": "ZetaSent", + "type": "event" + }, + { + "inputs": [], + "name": "getLockedAmount", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes", + "name": "zetaTxSenderAddress", + "type": "bytes" + }, + { + "internalType": "uint256", + "name": "sourceChainId", + "type": "uint256" + }, + { + "internalType": "address", + "name": "destinationAddress", + "type": "address" + }, + { + "internalType": "uint256", + "name": "zetaValueAndGas", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "message", + "type": "bytes" + }, + { + "internalType": "bytes32", + "name": "internalSendHash", + "type": "bytes32" + } + ], + "name": "onReceive", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "zetaTxSenderAddress", + "type": "address" + }, + { + "internalType": "uint256", + "name": "sourceChainId", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "destinationAddress", + "type": "bytes" + }, + { + "internalType": "uint256", + "name": "destinationChainId", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "zetaValueAndGas", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "message", + "type": "bytes" + }, + { + "internalType": "bytes32", + "name": "internalSendHash", + "type": "bytes32" + } + ], + "name": "onRevert", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "pause", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "paused", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "pauserAddress", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "renounceTssAddressUpdater", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "components": [ + { + "internalType": "uint256", + "name": "destinationChainId", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "destinationAddress", + "type": "bytes" + }, + { + "internalType": "uint256", + "name": "destinationGasLimit", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "message", + "type": "bytes" + }, + { + "internalType": "uint256", + "name": "zetaValueAndGas", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "zetaParams", + "type": "bytes" + } + ], + "internalType": "struct ZetaInterfaces.SendInput", + "name": "input", + "type": "tuple" + } + ], + "name": "send", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "tssAddress", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "tssAddressUpdater", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "unpause", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "pauserAddress_", + "type": "address" + } + ], + "name": "updatePauserAddress", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "tssAddress_", + "type": "address" + } + ], + "name": "updateTssAddress", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "zetaToken", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + } +] diff --git a/packages/interfaces/abi/json/contracts/ZetaConnector.non-eth.sol/ZetaConnectorNonEth.json b/packages/interfaces/abi/json/contracts/ZetaConnector.non-eth.sol/ZetaConnectorNonEth.json new file mode 100644 index 00000000..1facd746 --- /dev/null +++ b/packages/interfaces/abi/json/contracts/ZetaConnector.non-eth.sol/ZetaConnectorNonEth.json @@ -0,0 +1,581 @@ +[ + { + "inputs": [ + { + "internalType": "address", + "name": "zetaTokenAddress_", + "type": "address" + }, + { + "internalType": "address", + "name": "tssAddress_", + "type": "address" + }, + { + "internalType": "address", + "name": "tssAddressUpdater_", + "type": "address" + }, + { + "internalType": "address", + "name": "pauserAddress_", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "caller", + "type": "address" + } + ], + "name": "CallerIsNotPauser", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "caller", + "type": "address" + } + ], + "name": "CallerIsNotTss", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "caller", + "type": "address" + } + ], + "name": "CallerIsNotTssOrUpdater", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "caller", + "type": "address" + } + ], + "name": "CallerIsNotTssUpdater", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "maxSupply", + "type": "uint256" + } + ], + "name": "ExceedsMaxSupply", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidAddress", + "type": "error" + }, + { + "inputs": [], + "name": "ZetaTransferError", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "Paused", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "updaterAddress", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "newTssAddress", + "type": "address" + } + ], + "name": "PauserAddressUpdated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "zetaTxSenderAddress", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "newTssAddress", + "type": "address" + } + ], + "name": "TSSAddressUpdated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "Unpaused", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "bytes", + "name": "zetaTxSenderAddress", + "type": "bytes" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "sourceChainId", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "address", + "name": "destinationAddress", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "zetaValueAndGas", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "message", + "type": "bytes" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "internalSendHash", + "type": "bytes32" + } + ], + "name": "ZetaReceived", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "zetaTxSenderAddress", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "sourceChainId", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "destinationChainId", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "bytes", + "name": "destinationAddress", + "type": "bytes" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "zetaValueAndGas", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "message", + "type": "bytes" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "internalSendHash", + "type": "bytes32" + } + ], + "name": "ZetaReverted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "sourceTxOriginAddress", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "zetaTxSenderAddress", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "destinationChainId", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "bytes", + "name": "destinationAddress", + "type": "bytes" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "zetaValueAndGas", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "destinationGasLimit", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "message", + "type": "bytes" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "zetaParams", + "type": "bytes" + } + ], + "name": "ZetaSent", + "type": "event" + }, + { + "inputs": [], + "name": "getLockedAmount", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "maxSupply", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes", + "name": "zetaTxSenderAddress", + "type": "bytes" + }, + { + "internalType": "uint256", + "name": "sourceChainId", + "type": "uint256" + }, + { + "internalType": "address", + "name": "destinationAddress", + "type": "address" + }, + { + "internalType": "uint256", + "name": "zetaValueAndGas", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "message", + "type": "bytes" + }, + { + "internalType": "bytes32", + "name": "internalSendHash", + "type": "bytes32" + } + ], + "name": "onReceive", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "zetaTxSenderAddress", + "type": "address" + }, + { + "internalType": "uint256", + "name": "sourceChainId", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "destinationAddress", + "type": "bytes" + }, + { + "internalType": "uint256", + "name": "destinationChainId", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "zetaValueAndGas", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "message", + "type": "bytes" + }, + { + "internalType": "bytes32", + "name": "internalSendHash", + "type": "bytes32" + } + ], + "name": "onRevert", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "pause", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "paused", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "pauserAddress", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "renounceTssAddressUpdater", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "components": [ + { + "internalType": "uint256", + "name": "destinationChainId", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "destinationAddress", + "type": "bytes" + }, + { + "internalType": "uint256", + "name": "destinationGasLimit", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "message", + "type": "bytes" + }, + { + "internalType": "uint256", + "name": "zetaValueAndGas", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "zetaParams", + "type": "bytes" + } + ], + "internalType": "struct ZetaInterfaces.SendInput", + "name": "input", + "type": "tuple" + } + ], + "name": "send", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "maxSupply_", + "type": "uint256" + } + ], + "name": "setMaxSupply", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "tssAddress", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "tssAddressUpdater", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "unpause", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "pauserAddress_", + "type": "address" + } + ], + "name": "updatePauserAddress", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "tssAddress_", + "type": "address" + } + ], + "name": "updateTssAddress", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "zetaToken", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + } +] diff --git a/packages/interfaces/abi/json/contracts/ZetaInteractor.sol/ZetaInteractor.json b/packages/interfaces/abi/json/contracts/ZetaInteractor.sol/ZetaInteractor.json new file mode 100644 index 00000000..dc07294b --- /dev/null +++ b/packages/interfaces/abi/json/contracts/ZetaInteractor.sol/ZetaInteractor.json @@ -0,0 +1,130 @@ +[ + { + "inputs": [ + { + "internalType": "address", + "name": "caller", + "type": "address" + } + ], + "name": "InvalidCaller", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidDestinationChainId", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidZetaMessageCall", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidZetaRevertCall", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipTransferred", + "type": "event" + }, + { + "inputs": [], + "name": "connector", + "outputs": [ + { + "internalType": "contract ZetaConnector", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "interactorsByChainId", + "outputs": [ + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "renounceOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "destinationChainId", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "contractAddress", + "type": "bytes" + } + ], + "name": "setInteractorByChainId", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } +] diff --git a/packages/interfaces/abi/json/contracts/ZetaTokenConsumerUniV2.strategy.sol/ZetaTokenConsumerUniV2.json b/packages/interfaces/abi/json/contracts/ZetaTokenConsumerUniV2.strategy.sol/ZetaTokenConsumerUniV2.json new file mode 100644 index 00000000..c5c92d7e --- /dev/null +++ b/packages/interfaces/abi/json/contracts/ZetaTokenConsumerUniV2.strategy.sol/ZetaTokenConsumerUniV2.json @@ -0,0 +1,250 @@ +[ + { + "inputs": [ + { + "internalType": "address", + "name": "zetaToken_", + "type": "address" + }, + { + "internalType": "address", + "name": "uniswapV2Router_", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "inputs": [], + "name": "InputCantBeZero", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidAddress", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "amountIn", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amountOut", + "type": "uint256" + } + ], + "name": "EthExchangedForZeta", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "token", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amountIn", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amountOut", + "type": "uint256" + } + ], + "name": "TokenExchangedForZeta", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "amountIn", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amountOut", + "type": "uint256" + } + ], + "name": "ZetaExchangedForEth", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "token", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amountIn", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amountOut", + "type": "uint256" + } + ], + "name": "ZetaExchangedForToken", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "destinationAddress", + "type": "address" + }, + { + "internalType": "uint256", + "name": "minAmountOut", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "zetaTokenAmount", + "type": "uint256" + } + ], + "name": "getEthFromZeta", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "destinationAddress", + "type": "address" + }, + { + "internalType": "uint256", + "name": "minAmountOut", + "type": "uint256" + }, + { + "internalType": "address", + "name": "outputToken", + "type": "address" + }, + { + "internalType": "uint256", + "name": "zetaTokenAmount", + "type": "uint256" + } + ], + "name": "getTokenFromZeta", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "destinationAddress", + "type": "address" + }, + { + "internalType": "uint256", + "name": "minAmountOut", + "type": "uint256" + } + ], + "name": "getZetaFromEth", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "destinationAddress", + "type": "address" + }, + { + "internalType": "uint256", + "name": "minAmountOut", + "type": "uint256" + }, + { + "internalType": "address", + "name": "inputToken", + "type": "address" + }, + { + "internalType": "uint256", + "name": "inputTokenAmount", + "type": "uint256" + } + ], + "name": "getZetaFromToken", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "zetaToken", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + } +] diff --git a/packages/interfaces/abi/json/contracts/ZetaTokenConsumerUniV2.strategy.sol/ZetaTokenConsumerUniV2Errors.json b/packages/interfaces/abi/json/contracts/ZetaTokenConsumerUniV2.strategy.sol/ZetaTokenConsumerUniV2Errors.json new file mode 100644 index 00000000..58399351 --- /dev/null +++ b/packages/interfaces/abi/json/contracts/ZetaTokenConsumerUniV2.strategy.sol/ZetaTokenConsumerUniV2Errors.json @@ -0,0 +1,12 @@ +[ + { + "inputs": [], + "name": "InputCantBeZero", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidAddress", + "type": "error" + } +] diff --git a/packages/interfaces/abi/json/contracts/ZetaTokenConsumerUniV3.strategy.sol/WETH9.json b/packages/interfaces/abi/json/contracts/ZetaTokenConsumerUniV3.strategy.sol/WETH9.json new file mode 100644 index 00000000..2725b25c --- /dev/null +++ b/packages/interfaces/abi/json/contracts/ZetaTokenConsumerUniV3.strategy.sol/WETH9.json @@ -0,0 +1,15 @@ +[ + { + "inputs": [ + { + "internalType": "uint256", + "name": "wad", + "type": "uint256" + } + ], + "name": "withdraw", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } +] diff --git a/packages/interfaces/abi/json/contracts/ZetaTokenConsumerUniV3.strategy.sol/ZetaTokenConsumerUniV3.json b/packages/interfaces/abi/json/contracts/ZetaTokenConsumerUniV3.strategy.sol/ZetaTokenConsumerUniV3.json new file mode 100644 index 00000000..98817dc7 --- /dev/null +++ b/packages/interfaces/abi/json/contracts/ZetaTokenConsumerUniV3.strategy.sol/ZetaTokenConsumerUniV3.json @@ -0,0 +1,336 @@ +[ + { + "inputs": [ + { + "internalType": "address", + "name": "zetaToken_", + "type": "address" + }, + { + "internalType": "address", + "name": "uniswapV3Router_", + "type": "address" + }, + { + "internalType": "address", + "name": "quoter_", + "type": "address" + }, + { + "internalType": "address", + "name": "WETH9Address_", + "type": "address" + }, + { + "internalType": "uint24", + "name": "zetaPoolFee_", + "type": "uint24" + }, + { + "internalType": "uint24", + "name": "tokenPoolFee_", + "type": "uint24" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "inputs": [], + "name": "ErrorSendingETH", + "type": "error" + }, + { + "inputs": [], + "name": "InputCantBeZero", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidAddress", + "type": "error" + }, + { + "inputs": [], + "name": "ReentrancyError", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "amountIn", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amountOut", + "type": "uint256" + } + ], + "name": "EthExchangedForZeta", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "token", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amountIn", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amountOut", + "type": "uint256" + } + ], + "name": "TokenExchangedForZeta", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "amountIn", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amountOut", + "type": "uint256" + } + ], + "name": "ZetaExchangedForEth", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "token", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amountIn", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amountOut", + "type": "uint256" + } + ], + "name": "ZetaExchangedForToken", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "destinationAddress", + "type": "address" + }, + { + "internalType": "uint256", + "name": "minAmountOut", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "zetaTokenAmount", + "type": "uint256" + } + ], + "name": "getEthFromZeta", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "destinationAddress", + "type": "address" + }, + { + "internalType": "uint256", + "name": "minAmountOut", + "type": "uint256" + }, + { + "internalType": "address", + "name": "outputToken", + "type": "address" + }, + { + "internalType": "uint256", + "name": "zetaTokenAmount", + "type": "uint256" + } + ], + "name": "getTokenFromZeta", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "destinationAddress", + "type": "address" + }, + { + "internalType": "uint256", + "name": "minAmountOut", + "type": "uint256" + } + ], + "name": "getZetaFromEth", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "destinationAddress", + "type": "address" + }, + { + "internalType": "uint256", + "name": "minAmountOut", + "type": "uint256" + }, + { + "internalType": "address", + "name": "inputToken", + "type": "address" + }, + { + "internalType": "uint256", + "name": "inputTokenAmount", + "type": "uint256" + } + ], + "name": "getZetaFromToken", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "quoter", + "outputs": [ + { + "internalType": "contract IQuoter", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "tokenPoolFee", + "outputs": [ + { + "internalType": "uint24", + "name": "", + "type": "uint24" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "uniswapV3Router", + "outputs": [ + { + "internalType": "contract ISwapRouter", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "zetaPoolFee", + "outputs": [ + { + "internalType": "uint24", + "name": "", + "type": "uint24" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "zetaToken", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "stateMutability": "payable", + "type": "receive" + } +] diff --git a/packages/interfaces/abi/json/contracts/ZetaTokenConsumerUniV3.strategy.sol/ZetaTokenConsumerUniV3Errors.json b/packages/interfaces/abi/json/contracts/ZetaTokenConsumerUniV3.strategy.sol/ZetaTokenConsumerUniV3Errors.json new file mode 100644 index 00000000..c358ff10 --- /dev/null +++ b/packages/interfaces/abi/json/contracts/ZetaTokenConsumerUniV3.strategy.sol/ZetaTokenConsumerUniV3Errors.json @@ -0,0 +1,22 @@ +[ + { + "inputs": [], + "name": "ErrorSendingETH", + "type": "error" + }, + { + "inputs": [], + "name": "InputCantBeZero", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidAddress", + "type": "error" + }, + { + "inputs": [], + "name": "ReentrancyError", + "type": "error" + } +] diff --git a/packages/interfaces/abi/json/contracts/interfaces/ConnectorErrors.sol/ConnectorErrors.json b/packages/interfaces/abi/json/contracts/interfaces/ConnectorErrors.sol/ConnectorErrors.json new file mode 100644 index 00000000..616428da --- /dev/null +++ b/packages/interfaces/abi/json/contracts/interfaces/ConnectorErrors.sol/ConnectorErrors.json @@ -0,0 +1,67 @@ +[ + { + "inputs": [ + { + "internalType": "address", + "name": "caller", + "type": "address" + } + ], + "name": "CallerIsNotPauser", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "caller", + "type": "address" + } + ], + "name": "CallerIsNotTss", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "caller", + "type": "address" + } + ], + "name": "CallerIsNotTssOrUpdater", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "caller", + "type": "address" + } + ], + "name": "CallerIsNotTssUpdater", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "maxSupply", + "type": "uint256" + } + ], + "name": "ExceedsMaxSupply", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidAddress", + "type": "error" + }, + { + "inputs": [], + "name": "ZetaTransferError", + "type": "error" + } +] diff --git a/packages/interfaces/abi/json/contracts/interfaces/ZetaErrors.sol/ZetaErrors.json b/packages/interfaces/abi/json/contracts/interfaces/ZetaErrors.sol/ZetaErrors.json new file mode 100644 index 00000000..f7887293 --- /dev/null +++ b/packages/interfaces/abi/json/contracts/interfaces/ZetaErrors.sol/ZetaErrors.json @@ -0,0 +1,56 @@ +[ + { + "inputs": [ + { + "internalType": "address", + "name": "caller", + "type": "address" + } + ], + "name": "CallerIsNotConnector", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "caller", + "type": "address" + } + ], + "name": "CallerIsNotTss", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "caller", + "type": "address" + } + ], + "name": "CallerIsNotTssOrUpdater", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "caller", + "type": "address" + } + ], + "name": "CallerIsNotTssUpdater", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidAddress", + "type": "error" + }, + { + "inputs": [], + "name": "ZetaTransferError", + "type": "error" + } +] diff --git a/packages/interfaces/abi/json/contracts/interfaces/ZetaInteractorErrors.sol/ZetaInteractorErrors.json b/packages/interfaces/abi/json/contracts/interfaces/ZetaInteractorErrors.sol/ZetaInteractorErrors.json new file mode 100644 index 00000000..cbb5ad16 --- /dev/null +++ b/packages/interfaces/abi/json/contracts/interfaces/ZetaInteractorErrors.sol/ZetaInteractorErrors.json @@ -0,0 +1,28 @@ +[ + { + "inputs": [ + { + "internalType": "address", + "name": "caller", + "type": "address" + } + ], + "name": "InvalidCaller", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidDestinationChainId", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidZetaMessageCall", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidZetaRevertCall", + "type": "error" + } +] diff --git a/packages/interfaces/abi/json/contracts/interfaces/ZetaInterfaces.sol/ZetaConnector.json b/packages/interfaces/abi/json/contracts/interfaces/ZetaInterfaces.sol/ZetaConnector.json new file mode 100644 index 00000000..a6da1b57 --- /dev/null +++ b/packages/interfaces/abi/json/contracts/interfaces/ZetaInterfaces.sol/ZetaConnector.json @@ -0,0 +1,47 @@ +[ + { + "inputs": [ + { + "components": [ + { + "internalType": "uint256", + "name": "destinationChainId", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "destinationAddress", + "type": "bytes" + }, + { + "internalType": "uint256", + "name": "destinationGasLimit", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "message", + "type": "bytes" + }, + { + "internalType": "uint256", + "name": "zetaValueAndGas", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "zetaParams", + "type": "bytes" + } + ], + "internalType": "struct ZetaInterfaces.SendInput", + "name": "input", + "type": "tuple" + } + ], + "name": "send", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } +] diff --git a/packages/interfaces/abi/json/contracts/interfaces/ZetaInterfaces.sol/ZetaReceiver.json b/packages/interfaces/abi/json/contracts/interfaces/ZetaInterfaces.sol/ZetaReceiver.json new file mode 100644 index 00000000..fff85f22 --- /dev/null +++ b/packages/interfaces/abi/json/contracts/interfaces/ZetaInterfaces.sol/ZetaReceiver.json @@ -0,0 +1,87 @@ +[ + { + "inputs": [ + { + "components": [ + { + "internalType": "bytes", + "name": "zetaTxSenderAddress", + "type": "bytes" + }, + { + "internalType": "uint256", + "name": "sourceChainId", + "type": "uint256" + }, + { + "internalType": "address", + "name": "destinationAddress", + "type": "address" + }, + { + "internalType": "uint256", + "name": "zetaValueAndGas", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "message", + "type": "bytes" + } + ], + "internalType": "struct ZetaInterfaces.ZetaMessage", + "name": "zetaMessage", + "type": "tuple" + } + ], + "name": "onZetaMessage", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "components": [ + { + "internalType": "address", + "name": "zetaTxSenderAddress", + "type": "address" + }, + { + "internalType": "uint256", + "name": "sourceChainId", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "destinationAddress", + "type": "bytes" + }, + { + "internalType": "uint256", + "name": "destinationChainId", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "zetaValueAndGas", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "message", + "type": "bytes" + } + ], + "internalType": "struct ZetaInterfaces.ZetaRevert", + "name": "zetaRevert", + "type": "tuple" + } + ], + "name": "onZetaRevert", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } +] diff --git a/packages/interfaces/abi/json/contracts/interfaces/ZetaInterfaces.sol/ZetaTokenConsumer.json b/packages/interfaces/abi/json/contracts/interfaces/ZetaInterfaces.sol/ZetaTokenConsumer.json new file mode 100644 index 00000000..4f3ac77f --- /dev/null +++ b/packages/interfaces/abi/json/contracts/interfaces/ZetaInterfaces.sol/ZetaTokenConsumer.json @@ -0,0 +1,211 @@ +[ + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "amountIn", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amountOut", + "type": "uint256" + } + ], + "name": "EthExchangedForZeta", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "token", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amountIn", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amountOut", + "type": "uint256" + } + ], + "name": "TokenExchangedForZeta", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "amountIn", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amountOut", + "type": "uint256" + } + ], + "name": "ZetaExchangedForEth", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "token", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amountIn", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amountOut", + "type": "uint256" + } + ], + "name": "ZetaExchangedForToken", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "destinationAddress", + "type": "address" + }, + { + "internalType": "uint256", + "name": "minAmountOut", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "zetaTokenAmount", + "type": "uint256" + } + ], + "name": "getEthFromZeta", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "destinationAddress", + "type": "address" + }, + { + "internalType": "uint256", + "name": "minAmountOut", + "type": "uint256" + }, + { + "internalType": "address", + "name": "outputToken", + "type": "address" + }, + { + "internalType": "uint256", + "name": "zetaTokenAmount", + "type": "uint256" + } + ], + "name": "getTokenFromZeta", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "destinationAddress", + "type": "address" + }, + { + "internalType": "uint256", + "name": "minAmountOut", + "type": "uint256" + } + ], + "name": "getZetaFromEth", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "destinationAddress", + "type": "address" + }, + { + "internalType": "uint256", + "name": "minAmountOut", + "type": "uint256" + }, + { + "internalType": "address", + "name": "inputToken", + "type": "address" + }, + { + "internalType": "uint256", + "name": "inputTokenAmount", + "type": "uint256" + } + ], + "name": "getZetaFromToken", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + } +] diff --git a/packages/interfaces/abi/json/contracts/interfaces/ZetaNonEthInterface.sol/ZetaNonEthInterface.json b/packages/interfaces/abi/json/contracts/interfaces/ZetaNonEthInterface.sol/ZetaNonEthInterface.json new file mode 100644 index 00000000..26ac30db --- /dev/null +++ b/packages/interfaces/abi/json/contracts/interfaces/ZetaNonEthInterface.sol/ZetaNonEthInterface.json @@ -0,0 +1,226 @@ +[ + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "Approval", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "Transfer", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "spender", + "type": "address" + } + ], + "name": "allowance", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "approve", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "balanceOf", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "burnFrom", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "mintee", + "type": "address" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + }, + { + "internalType": "bytes32", + "name": "internalSendHash", + "type": "bytes32" + } + ], + "name": "mint", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "totalSupply", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transfer", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transferFrom", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + } +] diff --git a/packages/interfaces/abi/json/contracts/testing/TestUniswapV3Contracts.sol/INonfungiblePositionManager.json b/packages/interfaces/abi/json/contracts/testing/TestUniswapV3Contracts.sol/INonfungiblePositionManager.json new file mode 100644 index 00000000..3741b1f7 --- /dev/null +++ b/packages/interfaces/abi/json/contracts/testing/TestUniswapV3Contracts.sol/INonfungiblePositionManager.json @@ -0,0 +1,431 @@ +[ + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "address", + "name": "recipient", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount0", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount1", + "type": "uint256" + } + ], + "name": "Collect", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint128", + "name": "liquidity", + "type": "uint128" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount0", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount1", + "type": "uint256" + } + ], + "name": "DecreaseLiquidity", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint128", + "name": "liquidity", + "type": "uint128" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount0", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount1", + "type": "uint256" + } + ], + "name": "IncreaseLiquidity", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "burn", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "components": [ + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + }, + { + "internalType": "address", + "name": "recipient", + "type": "address" + }, + { + "internalType": "uint128", + "name": "amount0Max", + "type": "uint128" + }, + { + "internalType": "uint128", + "name": "amount1Max", + "type": "uint128" + } + ], + "internalType": "struct INonfungiblePositionManager.CollectParams", + "name": "params", + "type": "tuple" + } + ], + "name": "collect", + "outputs": [ + { + "internalType": "uint256", + "name": "amount0", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "amount1", + "type": "uint256" + } + ], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "components": [ + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + }, + { + "internalType": "uint128", + "name": "liquidity", + "type": "uint128" + }, + { + "internalType": "uint256", + "name": "amount0Min", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "amount1Min", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "deadline", + "type": "uint256" + } + ], + "internalType": "struct INonfungiblePositionManager.DecreaseLiquidityParams", + "name": "params", + "type": "tuple" + } + ], + "name": "decreaseLiquidity", + "outputs": [ + { + "internalType": "uint256", + "name": "amount0", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "amount1", + "type": "uint256" + } + ], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "components": [ + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "amount0Desired", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "amount1Desired", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "amount0Min", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "amount1Min", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "deadline", + "type": "uint256" + } + ], + "internalType": "struct INonfungiblePositionManager.IncreaseLiquidityParams", + "name": "params", + "type": "tuple" + } + ], + "name": "increaseLiquidity", + "outputs": [ + { + "internalType": "uint128", + "name": "liquidity", + "type": "uint128" + }, + { + "internalType": "uint256", + "name": "amount0", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "amount1", + "type": "uint256" + } + ], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "components": [ + { + "internalType": "address", + "name": "token0", + "type": "address" + }, + { + "internalType": "address", + "name": "token1", + "type": "address" + }, + { + "internalType": "uint24", + "name": "fee", + "type": "uint24" + }, + { + "internalType": "int24", + "name": "tickLower", + "type": "int24" + }, + { + "internalType": "int24", + "name": "tickUpper", + "type": "int24" + }, + { + "internalType": "uint256", + "name": "amount0Desired", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "amount1Desired", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "amount0Min", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "amount1Min", + "type": "uint256" + }, + { + "internalType": "address", + "name": "recipient", + "type": "address" + }, + { + "internalType": "uint256", + "name": "deadline", + "type": "uint256" + } + ], + "internalType": "struct INonfungiblePositionManager.MintParams", + "name": "params", + "type": "tuple" + } + ], + "name": "mint", + "outputs": [ + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + }, + { + "internalType": "uint128", + "name": "liquidity", + "type": "uint128" + }, + { + "internalType": "uint256", + "name": "amount0", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "amount1", + "type": "uint256" + } + ], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "positions", + "outputs": [ + { + "internalType": "uint96", + "name": "nonce", + "type": "uint96" + }, + { + "internalType": "address", + "name": "operator", + "type": "address" + }, + { + "internalType": "address", + "name": "token0", + "type": "address" + }, + { + "internalType": "address", + "name": "token1", + "type": "address" + }, + { + "internalType": "uint24", + "name": "fee", + "type": "uint24" + }, + { + "internalType": "int24", + "name": "tickLower", + "type": "int24" + }, + { + "internalType": "int24", + "name": "tickUpper", + "type": "int24" + }, + { + "internalType": "uint128", + "name": "liquidity", + "type": "uint128" + }, + { + "internalType": "uint256", + "name": "feeGrowthInside0LastX128", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "feeGrowthInside1LastX128", + "type": "uint256" + }, + { + "internalType": "uint128", + "name": "tokensOwed0", + "type": "uint128" + }, + { + "internalType": "uint128", + "name": "tokensOwed1", + "type": "uint128" + } + ], + "stateMutability": "view", + "type": "function" + } +] diff --git a/packages/interfaces/abi/json/contracts/testing/TestUniswapV3Contracts.sol/IPoolInitializer.json b/packages/interfaces/abi/json/contracts/testing/TestUniswapV3Contracts.sol/IPoolInitializer.json new file mode 100644 index 00000000..f689da85 --- /dev/null +++ b/packages/interfaces/abi/json/contracts/testing/TestUniswapV3Contracts.sol/IPoolInitializer.json @@ -0,0 +1,36 @@ +[ + { + "inputs": [ + { + "internalType": "address", + "name": "token0", + "type": "address" + }, + { + "internalType": "address", + "name": "token1", + "type": "address" + }, + { + "internalType": "uint24", + "name": "fee", + "type": "uint24" + }, + { + "internalType": "uint160", + "name": "sqrtPriceX96", + "type": "uint160" + } + ], + "name": "createAndInitializePoolIfNecessary", + "outputs": [ + { + "internalType": "address", + "name": "pool", + "type": "address" + } + ], + "stateMutability": "payable", + "type": "function" + } +] diff --git a/packages/interfaces/abi/json/contracts/testing/ZetaInteractorMock.sol/ZetaInteractorMock.json b/packages/interfaces/abi/json/contracts/testing/ZetaInteractorMock.sol/ZetaInteractorMock.json new file mode 100644 index 00000000..aeaa964c --- /dev/null +++ b/packages/interfaces/abi/json/contracts/testing/ZetaInteractorMock.sol/ZetaInteractorMock.json @@ -0,0 +1,226 @@ +[ + { + "inputs": [ + { + "internalType": "address", + "name": "zetaConnectorAddress", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "caller", + "type": "address" + } + ], + "name": "InvalidCaller", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidDestinationChainId", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidZetaMessageCall", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidZetaRevertCall", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipTransferred", + "type": "event" + }, + { + "inputs": [], + "name": "connector", + "outputs": [ + { + "internalType": "contract ZetaConnector", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "interactorsByChainId", + "outputs": [ + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "components": [ + { + "internalType": "bytes", + "name": "zetaTxSenderAddress", + "type": "bytes" + }, + { + "internalType": "uint256", + "name": "sourceChainId", + "type": "uint256" + }, + { + "internalType": "address", + "name": "destinationAddress", + "type": "address" + }, + { + "internalType": "uint256", + "name": "zetaValueAndGas", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "message", + "type": "bytes" + } + ], + "internalType": "struct ZetaInterfaces.ZetaMessage", + "name": "zetaMessage", + "type": "tuple" + } + ], + "name": "onZetaMessage", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "components": [ + { + "internalType": "address", + "name": "zetaTxSenderAddress", + "type": "address" + }, + { + "internalType": "uint256", + "name": "sourceChainId", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "destinationAddress", + "type": "bytes" + }, + { + "internalType": "uint256", + "name": "destinationChainId", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "zetaValueAndGas", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "message", + "type": "bytes" + } + ], + "internalType": "struct ZetaInterfaces.ZetaRevert", + "name": "zetaRevert", + "type": "tuple" + } + ], + "name": "onZetaRevert", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "renounceOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "destinationChainId", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "contractAddress", + "type": "bytes" + } + ], + "name": "setInteractorByChainId", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } +] diff --git a/packages/interfaces/abi/json/contracts/testing/ZetaReceiverMock.sol/ZetaReceiverMock.json b/packages/interfaces/abi/json/contracts/testing/ZetaReceiverMock.sol/ZetaReceiverMock.json new file mode 100644 index 00000000..41efc9a5 --- /dev/null +++ b/packages/interfaces/abi/json/contracts/testing/ZetaReceiverMock.sol/ZetaReceiverMock.json @@ -0,0 +1,113 @@ +[ + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "destinationAddress", + "type": "address" + } + ], + "name": "MockOnZetaMessage", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "zetaTxSenderAddress", + "type": "address" + } + ], + "name": "MockOnZetaRevert", + "type": "event" + }, + { + "inputs": [ + { + "components": [ + { + "internalType": "bytes", + "name": "zetaTxSenderAddress", + "type": "bytes" + }, + { + "internalType": "uint256", + "name": "sourceChainId", + "type": "uint256" + }, + { + "internalType": "address", + "name": "destinationAddress", + "type": "address" + }, + { + "internalType": "uint256", + "name": "zetaValueAndGas", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "message", + "type": "bytes" + } + ], + "internalType": "struct ZetaInterfaces.ZetaMessage", + "name": "zetaMessage", + "type": "tuple" + } + ], + "name": "onZetaMessage", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "components": [ + { + "internalType": "address", + "name": "zetaTxSenderAddress", + "type": "address" + }, + { + "internalType": "uint256", + "name": "sourceChainId", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "destinationAddress", + "type": "bytes" + }, + { + "internalType": "uint256", + "name": "destinationChainId", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "zetaValueAndGas", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "message", + "type": "bytes" + } + ], + "internalType": "struct ZetaInterfaces.ZetaRevert", + "name": "zetaRevert", + "type": "tuple" + } + ], + "name": "onZetaRevert", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } +] diff --git a/packages/interfaces/package.json b/packages/interfaces/package.json new file mode 100644 index 00000000..6d9293a1 --- /dev/null +++ b/packages/interfaces/package.json @@ -0,0 +1,13 @@ +{ + "name": "@zetachain/interfaces", + "version": "0.0.1", + "license": "MIT", + "author": "zetachain", + "publishConfig": { + "access": "public", + "registry": "https://registry.npmjs.org/" + }, + "scripts": { + "tsc:watch": "npx tsc --watch" + } +} diff --git a/packages/interfaces/typechain-types/@openzeppelin/contracts/access/Ownable.ts b/packages/interfaces/typechain-types/@openzeppelin/contracts/access/Ownable.ts new file mode 100644 index 00000000..111524cd --- /dev/null +++ b/packages/interfaces/typechain-types/@openzeppelin/contracts/access/Ownable.ts @@ -0,0 +1,175 @@ +/* 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, + EventFragment, +} from "@ethersproject/abi"; +import type { Listener, Provider } from "@ethersproject/providers"; +import type { + TypedEventFilter, + TypedEvent, + TypedListener, + OnEvent, +} from "../../../common"; + +export interface OwnableInterface extends utils.Interface { + functions: { + "owner()": FunctionFragment; + "renounceOwnership()": FunctionFragment; + "transferOwnership(address)": FunctionFragment; + }; + + getFunction( + nameOrSignatureOrTopic: "owner" | "renounceOwnership" | "transferOwnership" + ): FunctionFragment; + + encodeFunctionData(functionFragment: "owner", values?: undefined): string; + encodeFunctionData( + functionFragment: "renounceOwnership", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "transferOwnership", + values: [string] + ): string; + + decodeFunctionResult(functionFragment: "owner", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "renounceOwnership", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "transferOwnership", + data: BytesLike + ): Result; + + events: { + "OwnershipTransferred(address,address)": EventFragment; + }; + + getEvent(nameOrSignatureOrTopic: "OwnershipTransferred"): EventFragment; +} + +export interface OwnershipTransferredEventObject { + previousOwner: string; + newOwner: string; +} +export type OwnershipTransferredEvent = TypedEvent< + [string, string], + OwnershipTransferredEventObject +>; + +export type OwnershipTransferredEventFilter = + TypedEventFilter; + +export interface Ownable extends BaseContract { + connect(signerOrProvider: Signer | Provider | string): this; + attach(addressOrName: string): this; + deployed(): Promise; + + interface: OwnableInterface; + + 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: { + owner(overrides?: CallOverrides): Promise<[string]>; + + renounceOwnership( + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + transferOwnership( + newOwner: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + }; + + owner(overrides?: CallOverrides): Promise; + + renounceOwnership( + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + transferOwnership( + newOwner: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + callStatic: { + owner(overrides?: CallOverrides): Promise; + + renounceOwnership(overrides?: CallOverrides): Promise; + + transferOwnership( + newOwner: string, + overrides?: CallOverrides + ): Promise; + }; + + filters: { + "OwnershipTransferred(address,address)"( + previousOwner?: string | null, + newOwner?: string | null + ): OwnershipTransferredEventFilter; + OwnershipTransferred( + previousOwner?: string | null, + newOwner?: string | null + ): OwnershipTransferredEventFilter; + }; + + estimateGas: { + owner(overrides?: CallOverrides): Promise; + + renounceOwnership( + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + transferOwnership( + newOwner: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + }; + + populateTransaction: { + owner(overrides?: CallOverrides): Promise; + + renounceOwnership( + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + transferOwnership( + newOwner: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + }; +} diff --git a/packages/interfaces/typechain-types/@openzeppelin/contracts/access/index.ts b/packages/interfaces/typechain-types/@openzeppelin/contracts/access/index.ts new file mode 100644 index 00000000..999bcc77 --- /dev/null +++ b/packages/interfaces/typechain-types/@openzeppelin/contracts/access/index.ts @@ -0,0 +1,4 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +export type { Ownable } from "./Ownable"; diff --git a/packages/interfaces/typechain-types/@openzeppelin/contracts/index.ts b/packages/interfaces/typechain-types/@openzeppelin/contracts/index.ts new file mode 100644 index 00000000..e1885aa2 --- /dev/null +++ b/packages/interfaces/typechain-types/@openzeppelin/contracts/index.ts @@ -0,0 +1,9 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import type * as access from "./access"; +export type { access }; +import type * as security from "./security"; +export type { security }; +import type * as token from "./token"; +export type { token }; diff --git a/packages/interfaces/typechain-types/@openzeppelin/contracts/security/Pausable.ts b/packages/interfaces/typechain-types/@openzeppelin/contracts/security/Pausable.ts new file mode 100644 index 00000000..a7508118 --- /dev/null +++ b/packages/interfaces/typechain-types/@openzeppelin/contracts/security/Pausable.ts @@ -0,0 +1,111 @@ +/* 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, + EventFragment, +} from "@ethersproject/abi"; +import type { Listener, Provider } from "@ethersproject/providers"; +import type { + TypedEventFilter, + TypedEvent, + TypedListener, + OnEvent, +} from "../../../common"; + +export interface PausableInterface extends utils.Interface { + functions: { + "paused()": FunctionFragment; + }; + + getFunction(nameOrSignatureOrTopic: "paused"): FunctionFragment; + + encodeFunctionData(functionFragment: "paused", values?: undefined): string; + + decodeFunctionResult(functionFragment: "paused", data: BytesLike): Result; + + events: { + "Paused(address)": EventFragment; + "Unpaused(address)": EventFragment; + }; + + getEvent(nameOrSignatureOrTopic: "Paused"): EventFragment; + getEvent(nameOrSignatureOrTopic: "Unpaused"): EventFragment; +} + +export interface PausedEventObject { + account: string; +} +export type PausedEvent = TypedEvent<[string], PausedEventObject>; + +export type PausedEventFilter = TypedEventFilter; + +export interface UnpausedEventObject { + account: string; +} +export type UnpausedEvent = TypedEvent<[string], UnpausedEventObject>; + +export type UnpausedEventFilter = TypedEventFilter; + +export interface Pausable extends BaseContract { + connect(signerOrProvider: Signer | Provider | string): this; + attach(addressOrName: string): this; + deployed(): Promise; + + interface: PausableInterface; + + 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: { + paused(overrides?: CallOverrides): Promise<[boolean]>; + }; + + paused(overrides?: CallOverrides): Promise; + + callStatic: { + paused(overrides?: CallOverrides): Promise; + }; + + filters: { + "Paused(address)"(account?: null): PausedEventFilter; + Paused(account?: null): PausedEventFilter; + + "Unpaused(address)"(account?: null): UnpausedEventFilter; + Unpaused(account?: null): UnpausedEventFilter; + }; + + estimateGas: { + paused(overrides?: CallOverrides): Promise; + }; + + populateTransaction: { + paused(overrides?: CallOverrides): Promise; + }; +} diff --git a/packages/interfaces/typechain-types/@openzeppelin/contracts/security/index.ts b/packages/interfaces/typechain-types/@openzeppelin/contracts/security/index.ts new file mode 100644 index 00000000..ed703c8f --- /dev/null +++ b/packages/interfaces/typechain-types/@openzeppelin/contracts/security/index.ts @@ -0,0 +1,4 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +export type { Pausable } from "./Pausable"; diff --git a/packages/interfaces/typechain-types/@openzeppelin/contracts/token/ERC20/ERC20.ts b/packages/interfaces/typechain-types/@openzeppelin/contracts/token/ERC20/ERC20.ts new file mode 100644 index 00000000..95d95417 --- /dev/null +++ b/packages/interfaces/typechain-types/@openzeppelin/contracts/token/ERC20/ERC20.ts @@ -0,0 +1,444 @@ +/* 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, +} from "../../../../common"; + +export interface ERC20Interface extends utils.Interface { + functions: { + "allowance(address,address)": FunctionFragment; + "approve(address,uint256)": FunctionFragment; + "balanceOf(address)": FunctionFragment; + "decimals()": FunctionFragment; + "decreaseAllowance(address,uint256)": FunctionFragment; + "increaseAllowance(address,uint256)": FunctionFragment; + "name()": FunctionFragment; + "symbol()": FunctionFragment; + "totalSupply()": FunctionFragment; + "transfer(address,uint256)": FunctionFragment; + "transferFrom(address,address,uint256)": FunctionFragment; + }; + + getFunction( + nameOrSignatureOrTopic: + | "allowance" + | "approve" + | "balanceOf" + | "decimals" + | "decreaseAllowance" + | "increaseAllowance" + | "name" + | "symbol" + | "totalSupply" + | "transfer" + | "transferFrom" + ): FunctionFragment; + + encodeFunctionData( + functionFragment: "allowance", + values: [string, string] + ): string; + encodeFunctionData( + functionFragment: "approve", + values: [string, BigNumberish] + ): string; + encodeFunctionData(functionFragment: "balanceOf", values: [string]): string; + encodeFunctionData(functionFragment: "decimals", values?: undefined): string; + encodeFunctionData( + functionFragment: "decreaseAllowance", + values: [string, BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "increaseAllowance", + values: [string, BigNumberish] + ): string; + encodeFunctionData(functionFragment: "name", values?: undefined): string; + encodeFunctionData(functionFragment: "symbol", values?: undefined): string; + encodeFunctionData( + functionFragment: "totalSupply", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "transfer", + values: [string, BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "transferFrom", + values: [string, string, BigNumberish] + ): string; + + decodeFunctionResult(functionFragment: "allowance", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "approve", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "balanceOf", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "decimals", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "decreaseAllowance", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "increaseAllowance", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "name", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "symbol", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "totalSupply", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "transfer", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "transferFrom", + data: BytesLike + ): Result; + + events: { + "Approval(address,address,uint256)": EventFragment; + "Transfer(address,address,uint256)": EventFragment; + }; + + getEvent(nameOrSignatureOrTopic: "Approval"): EventFragment; + getEvent(nameOrSignatureOrTopic: "Transfer"): EventFragment; +} + +export interface ApprovalEventObject { + owner: string; + spender: string; + value: BigNumber; +} +export type ApprovalEvent = TypedEvent< + [string, string, BigNumber], + ApprovalEventObject +>; + +export type ApprovalEventFilter = TypedEventFilter; + +export interface TransferEventObject { + from: string; + to: string; + value: BigNumber; +} +export type TransferEvent = TypedEvent< + [string, string, BigNumber], + TransferEventObject +>; + +export type TransferEventFilter = TypedEventFilter; + +export interface ERC20 extends BaseContract { + connect(signerOrProvider: Signer | Provider | string): this; + attach(addressOrName: string): this; + deployed(): Promise; + + interface: ERC20Interface; + + 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: { + allowance( + owner: string, + spender: string, + overrides?: CallOverrides + ): Promise<[BigNumber]>; + + approve( + spender: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + balanceOf(account: string, overrides?: CallOverrides): Promise<[BigNumber]>; + + decimals(overrides?: CallOverrides): Promise<[number]>; + + decreaseAllowance( + spender: string, + subtractedValue: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + increaseAllowance( + spender: string, + addedValue: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + name(overrides?: CallOverrides): Promise<[string]>; + + symbol(overrides?: CallOverrides): Promise<[string]>; + + totalSupply(overrides?: CallOverrides): Promise<[BigNumber]>; + + transfer( + to: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + transferFrom( + from: string, + to: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + }; + + allowance( + owner: string, + spender: string, + overrides?: CallOverrides + ): Promise; + + approve( + spender: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + balanceOf(account: string, overrides?: CallOverrides): Promise; + + decimals(overrides?: CallOverrides): Promise; + + decreaseAllowance( + spender: string, + subtractedValue: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + increaseAllowance( + spender: string, + addedValue: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + name(overrides?: CallOverrides): Promise; + + symbol(overrides?: CallOverrides): Promise; + + totalSupply(overrides?: CallOverrides): Promise; + + transfer( + to: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + transferFrom( + from: string, + to: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + callStatic: { + allowance( + owner: string, + spender: string, + overrides?: CallOverrides + ): Promise; + + approve( + spender: string, + amount: BigNumberish, + overrides?: CallOverrides + ): Promise; + + balanceOf(account: string, overrides?: CallOverrides): Promise; + + decimals(overrides?: CallOverrides): Promise; + + decreaseAllowance( + spender: string, + subtractedValue: BigNumberish, + overrides?: CallOverrides + ): Promise; + + increaseAllowance( + spender: string, + addedValue: BigNumberish, + overrides?: CallOverrides + ): Promise; + + name(overrides?: CallOverrides): Promise; + + symbol(overrides?: CallOverrides): Promise; + + totalSupply(overrides?: CallOverrides): Promise; + + transfer( + to: string, + amount: BigNumberish, + overrides?: CallOverrides + ): Promise; + + transferFrom( + from: string, + to: string, + amount: BigNumberish, + overrides?: CallOverrides + ): Promise; + }; + + filters: { + "Approval(address,address,uint256)"( + owner?: string | null, + spender?: string | null, + value?: null + ): ApprovalEventFilter; + Approval( + owner?: string | null, + spender?: string | null, + value?: null + ): ApprovalEventFilter; + + "Transfer(address,address,uint256)"( + from?: string | null, + to?: string | null, + value?: null + ): TransferEventFilter; + Transfer( + from?: string | null, + to?: string | null, + value?: null + ): TransferEventFilter; + }; + + estimateGas: { + allowance( + owner: string, + spender: string, + overrides?: CallOverrides + ): Promise; + + approve( + spender: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + balanceOf(account: string, overrides?: CallOverrides): Promise; + + decimals(overrides?: CallOverrides): Promise; + + decreaseAllowance( + spender: string, + subtractedValue: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + increaseAllowance( + spender: string, + addedValue: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + name(overrides?: CallOverrides): Promise; + + symbol(overrides?: CallOverrides): Promise; + + totalSupply(overrides?: CallOverrides): Promise; + + transfer( + to: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + transferFrom( + from: string, + to: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + }; + + populateTransaction: { + allowance( + owner: string, + spender: string, + overrides?: CallOverrides + ): Promise; + + approve( + spender: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + balanceOf( + account: string, + overrides?: CallOverrides + ): Promise; + + decimals(overrides?: CallOverrides): Promise; + + decreaseAllowance( + spender: string, + subtractedValue: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + increaseAllowance( + spender: string, + addedValue: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + name(overrides?: CallOverrides): Promise; + + symbol(overrides?: CallOverrides): Promise; + + totalSupply(overrides?: CallOverrides): Promise; + + transfer( + to: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + transferFrom( + from: string, + to: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + }; +} diff --git a/packages/interfaces/typechain-types/@openzeppelin/contracts/token/ERC20/IERC20.ts b/packages/interfaces/typechain-types/@openzeppelin/contracts/token/ERC20/IERC20.ts new file mode 100644 index 00000000..d7090694 --- /dev/null +++ b/packages/interfaces/typechain-types/@openzeppelin/contracts/token/ERC20/IERC20.ts @@ -0,0 +1,322 @@ +/* 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, +} from "../../../../common"; + +export interface IERC20Interface extends utils.Interface { + functions: { + "allowance(address,address)": FunctionFragment; + "approve(address,uint256)": FunctionFragment; + "balanceOf(address)": FunctionFragment; + "totalSupply()": FunctionFragment; + "transfer(address,uint256)": FunctionFragment; + "transferFrom(address,address,uint256)": FunctionFragment; + }; + + getFunction( + nameOrSignatureOrTopic: + | "allowance" + | "approve" + | "balanceOf" + | "totalSupply" + | "transfer" + | "transferFrom" + ): FunctionFragment; + + encodeFunctionData( + functionFragment: "allowance", + values: [string, string] + ): string; + encodeFunctionData( + functionFragment: "approve", + values: [string, BigNumberish] + ): string; + encodeFunctionData(functionFragment: "balanceOf", values: [string]): string; + encodeFunctionData( + functionFragment: "totalSupply", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "transfer", + values: [string, BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "transferFrom", + values: [string, string, BigNumberish] + ): string; + + decodeFunctionResult(functionFragment: "allowance", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "approve", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "balanceOf", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "totalSupply", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "transfer", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "transferFrom", + data: BytesLike + ): Result; + + events: { + "Approval(address,address,uint256)": EventFragment; + "Transfer(address,address,uint256)": EventFragment; + }; + + getEvent(nameOrSignatureOrTopic: "Approval"): EventFragment; + getEvent(nameOrSignatureOrTopic: "Transfer"): EventFragment; +} + +export interface ApprovalEventObject { + owner: string; + spender: string; + value: BigNumber; +} +export type ApprovalEvent = TypedEvent< + [string, string, BigNumber], + ApprovalEventObject +>; + +export type ApprovalEventFilter = TypedEventFilter; + +export interface TransferEventObject { + from: string; + to: string; + value: BigNumber; +} +export type TransferEvent = TypedEvent< + [string, string, BigNumber], + TransferEventObject +>; + +export type TransferEventFilter = TypedEventFilter; + +export interface IERC20 extends BaseContract { + connect(signerOrProvider: Signer | Provider | string): this; + attach(addressOrName: string): this; + deployed(): Promise; + + interface: IERC20Interface; + + 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: { + allowance( + owner: string, + spender: string, + overrides?: CallOverrides + ): Promise<[BigNumber]>; + + approve( + spender: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + balanceOf(account: string, overrides?: CallOverrides): Promise<[BigNumber]>; + + totalSupply(overrides?: CallOverrides): Promise<[BigNumber]>; + + transfer( + to: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + transferFrom( + from: string, + to: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + }; + + allowance( + owner: string, + spender: string, + overrides?: CallOverrides + ): Promise; + + approve( + spender: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + balanceOf(account: string, overrides?: CallOverrides): Promise; + + totalSupply(overrides?: CallOverrides): Promise; + + transfer( + to: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + transferFrom( + from: string, + to: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + callStatic: { + allowance( + owner: string, + spender: string, + overrides?: CallOverrides + ): Promise; + + approve( + spender: string, + amount: BigNumberish, + overrides?: CallOverrides + ): Promise; + + balanceOf(account: string, overrides?: CallOverrides): Promise; + + totalSupply(overrides?: CallOverrides): Promise; + + transfer( + to: string, + amount: BigNumberish, + overrides?: CallOverrides + ): Promise; + + transferFrom( + from: string, + to: string, + amount: BigNumberish, + overrides?: CallOverrides + ): Promise; + }; + + filters: { + "Approval(address,address,uint256)"( + owner?: string | null, + spender?: string | null, + value?: null + ): ApprovalEventFilter; + Approval( + owner?: string | null, + spender?: string | null, + value?: null + ): ApprovalEventFilter; + + "Transfer(address,address,uint256)"( + from?: string | null, + to?: string | null, + value?: null + ): TransferEventFilter; + Transfer( + from?: string | null, + to?: string | null, + value?: null + ): TransferEventFilter; + }; + + estimateGas: { + allowance( + owner: string, + spender: string, + overrides?: CallOverrides + ): Promise; + + approve( + spender: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + balanceOf(account: string, overrides?: CallOverrides): Promise; + + totalSupply(overrides?: CallOverrides): Promise; + + transfer( + to: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + transferFrom( + from: string, + to: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + }; + + populateTransaction: { + allowance( + owner: string, + spender: string, + overrides?: CallOverrides + ): Promise; + + approve( + spender: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + balanceOf( + account: string, + overrides?: CallOverrides + ): Promise; + + totalSupply(overrides?: CallOverrides): Promise; + + transfer( + to: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + transferFrom( + from: string, + to: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + }; +} diff --git a/packages/interfaces/typechain-types/@openzeppelin/contracts/token/ERC20/extensions/ERC20Burnable.ts b/packages/interfaces/typechain-types/@openzeppelin/contracts/token/ERC20/extensions/ERC20Burnable.ts new file mode 100644 index 00000000..20beb310 --- /dev/null +++ b/packages/interfaces/typechain-types/@openzeppelin/contracts/token/ERC20/extensions/ERC20Burnable.ts @@ -0,0 +1,507 @@ +/* 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, +} from "../../../../../common"; + +export interface ERC20BurnableInterface extends utils.Interface { + functions: { + "allowance(address,address)": FunctionFragment; + "approve(address,uint256)": FunctionFragment; + "balanceOf(address)": FunctionFragment; + "burn(uint256)": FunctionFragment; + "burnFrom(address,uint256)": FunctionFragment; + "decimals()": FunctionFragment; + "decreaseAllowance(address,uint256)": FunctionFragment; + "increaseAllowance(address,uint256)": FunctionFragment; + "name()": FunctionFragment; + "symbol()": FunctionFragment; + "totalSupply()": FunctionFragment; + "transfer(address,uint256)": FunctionFragment; + "transferFrom(address,address,uint256)": FunctionFragment; + }; + + getFunction( + nameOrSignatureOrTopic: + | "allowance" + | "approve" + | "balanceOf" + | "burn" + | "burnFrom" + | "decimals" + | "decreaseAllowance" + | "increaseAllowance" + | "name" + | "symbol" + | "totalSupply" + | "transfer" + | "transferFrom" + ): FunctionFragment; + + encodeFunctionData( + functionFragment: "allowance", + values: [string, string] + ): string; + encodeFunctionData( + functionFragment: "approve", + values: [string, BigNumberish] + ): string; + encodeFunctionData(functionFragment: "balanceOf", values: [string]): string; + encodeFunctionData(functionFragment: "burn", values: [BigNumberish]): string; + encodeFunctionData( + functionFragment: "burnFrom", + values: [string, BigNumberish] + ): string; + encodeFunctionData(functionFragment: "decimals", values?: undefined): string; + encodeFunctionData( + functionFragment: "decreaseAllowance", + values: [string, BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "increaseAllowance", + values: [string, BigNumberish] + ): string; + encodeFunctionData(functionFragment: "name", values?: undefined): string; + encodeFunctionData(functionFragment: "symbol", values?: undefined): string; + encodeFunctionData( + functionFragment: "totalSupply", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "transfer", + values: [string, BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "transferFrom", + values: [string, string, BigNumberish] + ): string; + + decodeFunctionResult(functionFragment: "allowance", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "approve", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "balanceOf", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "burn", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "burnFrom", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "decimals", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "decreaseAllowance", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "increaseAllowance", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "name", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "symbol", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "totalSupply", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "transfer", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "transferFrom", + data: BytesLike + ): Result; + + events: { + "Approval(address,address,uint256)": EventFragment; + "Transfer(address,address,uint256)": EventFragment; + }; + + getEvent(nameOrSignatureOrTopic: "Approval"): EventFragment; + getEvent(nameOrSignatureOrTopic: "Transfer"): EventFragment; +} + +export interface ApprovalEventObject { + owner: string; + spender: string; + value: BigNumber; +} +export type ApprovalEvent = TypedEvent< + [string, string, BigNumber], + ApprovalEventObject +>; + +export type ApprovalEventFilter = TypedEventFilter; + +export interface TransferEventObject { + from: string; + to: string; + value: BigNumber; +} +export type TransferEvent = TypedEvent< + [string, string, BigNumber], + TransferEventObject +>; + +export type TransferEventFilter = TypedEventFilter; + +export interface ERC20Burnable extends BaseContract { + connect(signerOrProvider: Signer | Provider | string): this; + attach(addressOrName: string): this; + deployed(): Promise; + + interface: ERC20BurnableInterface; + + 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: { + allowance( + owner: string, + spender: string, + overrides?: CallOverrides + ): Promise<[BigNumber]>; + + approve( + spender: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + balanceOf(account: string, overrides?: CallOverrides): Promise<[BigNumber]>; + + burn( + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + burnFrom( + account: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + decimals(overrides?: CallOverrides): Promise<[number]>; + + decreaseAllowance( + spender: string, + subtractedValue: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + increaseAllowance( + spender: string, + addedValue: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + name(overrides?: CallOverrides): Promise<[string]>; + + symbol(overrides?: CallOverrides): Promise<[string]>; + + totalSupply(overrides?: CallOverrides): Promise<[BigNumber]>; + + transfer( + to: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + transferFrom( + from: string, + to: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + }; + + allowance( + owner: string, + spender: string, + overrides?: CallOverrides + ): Promise; + + approve( + spender: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + balanceOf(account: string, overrides?: CallOverrides): Promise; + + burn( + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + burnFrom( + account: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + decimals(overrides?: CallOverrides): Promise; + + decreaseAllowance( + spender: string, + subtractedValue: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + increaseAllowance( + spender: string, + addedValue: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + name(overrides?: CallOverrides): Promise; + + symbol(overrides?: CallOverrides): Promise; + + totalSupply(overrides?: CallOverrides): Promise; + + transfer( + to: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + transferFrom( + from: string, + to: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + callStatic: { + allowance( + owner: string, + spender: string, + overrides?: CallOverrides + ): Promise; + + approve( + spender: string, + amount: BigNumberish, + overrides?: CallOverrides + ): Promise; + + balanceOf(account: string, overrides?: CallOverrides): Promise; + + burn(amount: BigNumberish, overrides?: CallOverrides): Promise; + + burnFrom( + account: string, + amount: BigNumberish, + overrides?: CallOverrides + ): Promise; + + decimals(overrides?: CallOverrides): Promise; + + decreaseAllowance( + spender: string, + subtractedValue: BigNumberish, + overrides?: CallOverrides + ): Promise; + + increaseAllowance( + spender: string, + addedValue: BigNumberish, + overrides?: CallOverrides + ): Promise; + + name(overrides?: CallOverrides): Promise; + + symbol(overrides?: CallOverrides): Promise; + + totalSupply(overrides?: CallOverrides): Promise; + + transfer( + to: string, + amount: BigNumberish, + overrides?: CallOverrides + ): Promise; + + transferFrom( + from: string, + to: string, + amount: BigNumberish, + overrides?: CallOverrides + ): Promise; + }; + + filters: { + "Approval(address,address,uint256)"( + owner?: string | null, + spender?: string | null, + value?: null + ): ApprovalEventFilter; + Approval( + owner?: string | null, + spender?: string | null, + value?: null + ): ApprovalEventFilter; + + "Transfer(address,address,uint256)"( + from?: string | null, + to?: string | null, + value?: null + ): TransferEventFilter; + Transfer( + from?: string | null, + to?: string | null, + value?: null + ): TransferEventFilter; + }; + + estimateGas: { + allowance( + owner: string, + spender: string, + overrides?: CallOverrides + ): Promise; + + approve( + spender: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + balanceOf(account: string, overrides?: CallOverrides): Promise; + + burn( + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + burnFrom( + account: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + decimals(overrides?: CallOverrides): Promise; + + decreaseAllowance( + spender: string, + subtractedValue: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + increaseAllowance( + spender: string, + addedValue: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + name(overrides?: CallOverrides): Promise; + + symbol(overrides?: CallOverrides): Promise; + + totalSupply(overrides?: CallOverrides): Promise; + + transfer( + to: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + transferFrom( + from: string, + to: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + }; + + populateTransaction: { + allowance( + owner: string, + spender: string, + overrides?: CallOverrides + ): Promise; + + approve( + spender: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + balanceOf( + account: string, + overrides?: CallOverrides + ): Promise; + + burn( + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + burnFrom( + account: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + decimals(overrides?: CallOverrides): Promise; + + decreaseAllowance( + spender: string, + subtractedValue: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + increaseAllowance( + spender: string, + addedValue: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + name(overrides?: CallOverrides): Promise; + + symbol(overrides?: CallOverrides): Promise; + + totalSupply(overrides?: CallOverrides): Promise; + + transfer( + to: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + transferFrom( + from: string, + to: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + }; +} diff --git a/packages/interfaces/typechain-types/@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.ts b/packages/interfaces/typechain-types/@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.ts new file mode 100644 index 00000000..d2cf5ed7 --- /dev/null +++ b/packages/interfaces/typechain-types/@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.ts @@ -0,0 +1,364 @@ +/* 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, +} from "../../../../../common"; + +export interface IERC20MetadataInterface extends utils.Interface { + functions: { + "allowance(address,address)": FunctionFragment; + "approve(address,uint256)": FunctionFragment; + "balanceOf(address)": FunctionFragment; + "decimals()": FunctionFragment; + "name()": FunctionFragment; + "symbol()": FunctionFragment; + "totalSupply()": FunctionFragment; + "transfer(address,uint256)": FunctionFragment; + "transferFrom(address,address,uint256)": FunctionFragment; + }; + + getFunction( + nameOrSignatureOrTopic: + | "allowance" + | "approve" + | "balanceOf" + | "decimals" + | "name" + | "symbol" + | "totalSupply" + | "transfer" + | "transferFrom" + ): FunctionFragment; + + encodeFunctionData( + functionFragment: "allowance", + values: [string, string] + ): string; + encodeFunctionData( + functionFragment: "approve", + values: [string, BigNumberish] + ): string; + encodeFunctionData(functionFragment: "balanceOf", values: [string]): string; + encodeFunctionData(functionFragment: "decimals", values?: undefined): string; + encodeFunctionData(functionFragment: "name", values?: undefined): string; + encodeFunctionData(functionFragment: "symbol", values?: undefined): string; + encodeFunctionData( + functionFragment: "totalSupply", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "transfer", + values: [string, BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "transferFrom", + values: [string, string, BigNumberish] + ): string; + + decodeFunctionResult(functionFragment: "allowance", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "approve", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "balanceOf", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "decimals", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "name", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "symbol", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "totalSupply", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "transfer", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "transferFrom", + data: BytesLike + ): Result; + + events: { + "Approval(address,address,uint256)": EventFragment; + "Transfer(address,address,uint256)": EventFragment; + }; + + getEvent(nameOrSignatureOrTopic: "Approval"): EventFragment; + getEvent(nameOrSignatureOrTopic: "Transfer"): EventFragment; +} + +export interface ApprovalEventObject { + owner: string; + spender: string; + value: BigNumber; +} +export type ApprovalEvent = TypedEvent< + [string, string, BigNumber], + ApprovalEventObject +>; + +export type ApprovalEventFilter = TypedEventFilter; + +export interface TransferEventObject { + from: string; + to: string; + value: BigNumber; +} +export type TransferEvent = TypedEvent< + [string, string, BigNumber], + TransferEventObject +>; + +export type TransferEventFilter = TypedEventFilter; + +export interface IERC20Metadata extends BaseContract { + connect(signerOrProvider: Signer | Provider | string): this; + attach(addressOrName: string): this; + deployed(): Promise; + + interface: IERC20MetadataInterface; + + 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: { + allowance( + owner: string, + spender: string, + overrides?: CallOverrides + ): Promise<[BigNumber]>; + + approve( + spender: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + balanceOf(account: string, overrides?: CallOverrides): Promise<[BigNumber]>; + + decimals(overrides?: CallOverrides): Promise<[number]>; + + name(overrides?: CallOverrides): Promise<[string]>; + + symbol(overrides?: CallOverrides): Promise<[string]>; + + totalSupply(overrides?: CallOverrides): Promise<[BigNumber]>; + + transfer( + to: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + transferFrom( + from: string, + to: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + }; + + allowance( + owner: string, + spender: string, + overrides?: CallOverrides + ): Promise; + + approve( + spender: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + balanceOf(account: string, overrides?: CallOverrides): Promise; + + decimals(overrides?: CallOverrides): Promise; + + name(overrides?: CallOverrides): Promise; + + symbol(overrides?: CallOverrides): Promise; + + totalSupply(overrides?: CallOverrides): Promise; + + transfer( + to: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + transferFrom( + from: string, + to: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + callStatic: { + allowance( + owner: string, + spender: string, + overrides?: CallOverrides + ): Promise; + + approve( + spender: string, + amount: BigNumberish, + overrides?: CallOverrides + ): Promise; + + balanceOf(account: string, overrides?: CallOverrides): Promise; + + decimals(overrides?: CallOverrides): Promise; + + name(overrides?: CallOverrides): Promise; + + symbol(overrides?: CallOverrides): Promise; + + totalSupply(overrides?: CallOverrides): Promise; + + transfer( + to: string, + amount: BigNumberish, + overrides?: CallOverrides + ): Promise; + + transferFrom( + from: string, + to: string, + amount: BigNumberish, + overrides?: CallOverrides + ): Promise; + }; + + filters: { + "Approval(address,address,uint256)"( + owner?: string | null, + spender?: string | null, + value?: null + ): ApprovalEventFilter; + Approval( + owner?: string | null, + spender?: string | null, + value?: null + ): ApprovalEventFilter; + + "Transfer(address,address,uint256)"( + from?: string | null, + to?: string | null, + value?: null + ): TransferEventFilter; + Transfer( + from?: string | null, + to?: string | null, + value?: null + ): TransferEventFilter; + }; + + estimateGas: { + allowance( + owner: string, + spender: string, + overrides?: CallOverrides + ): Promise; + + approve( + spender: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + balanceOf(account: string, overrides?: CallOverrides): Promise; + + decimals(overrides?: CallOverrides): Promise; + + name(overrides?: CallOverrides): Promise; + + symbol(overrides?: CallOverrides): Promise; + + totalSupply(overrides?: CallOverrides): Promise; + + transfer( + to: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + transferFrom( + from: string, + to: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + }; + + populateTransaction: { + allowance( + owner: string, + spender: string, + overrides?: CallOverrides + ): Promise; + + approve( + spender: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + balanceOf( + account: string, + overrides?: CallOverrides + ): Promise; + + decimals(overrides?: CallOverrides): Promise; + + name(overrides?: CallOverrides): Promise; + + symbol(overrides?: CallOverrides): Promise; + + totalSupply(overrides?: CallOverrides): Promise; + + transfer( + to: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + transferFrom( + from: string, + to: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + }; +} diff --git a/packages/interfaces/typechain-types/@openzeppelin/contracts/token/ERC20/extensions/index.ts b/packages/interfaces/typechain-types/@openzeppelin/contracts/token/ERC20/extensions/index.ts new file mode 100644 index 00000000..96ee12e9 --- /dev/null +++ b/packages/interfaces/typechain-types/@openzeppelin/contracts/token/ERC20/extensions/index.ts @@ -0,0 +1,5 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +export type { ERC20Burnable } from "./ERC20Burnable"; +export type { IERC20Metadata } from "./IERC20Metadata"; diff --git a/packages/interfaces/typechain-types/@openzeppelin/contracts/token/ERC20/index.ts b/packages/interfaces/typechain-types/@openzeppelin/contracts/token/ERC20/index.ts new file mode 100644 index 00000000..cc196974 --- /dev/null +++ b/packages/interfaces/typechain-types/@openzeppelin/contracts/token/ERC20/index.ts @@ -0,0 +1,7 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import type * as extensions from "./extensions"; +export type { extensions }; +export type { ERC20 } from "./ERC20"; +export type { IERC20 } from "./IERC20"; diff --git a/packages/interfaces/typechain-types/@openzeppelin/contracts/token/index.ts b/packages/interfaces/typechain-types/@openzeppelin/contracts/token/index.ts new file mode 100644 index 00000000..5c4062a9 --- /dev/null +++ b/packages/interfaces/typechain-types/@openzeppelin/contracts/token/index.ts @@ -0,0 +1,5 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import type * as erc20 from "./ERC20"; +export type { erc20 }; diff --git a/packages/interfaces/typechain-types/@openzeppelin/index.ts b/packages/interfaces/typechain-types/@openzeppelin/index.ts new file mode 100644 index 00000000..a11e4ca2 --- /dev/null +++ b/packages/interfaces/typechain-types/@openzeppelin/index.ts @@ -0,0 +1,5 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import type * as contracts from "./contracts"; +export type { contracts }; diff --git a/packages/interfaces/typechain-types/@uniswap/index.ts b/packages/interfaces/typechain-types/@uniswap/index.ts new file mode 100644 index 00000000..7a53629e --- /dev/null +++ b/packages/interfaces/typechain-types/@uniswap/index.ts @@ -0,0 +1,11 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import type * as v2Core from "./v2-core"; +export type { v2Core }; +import type * as v2Periphery from "./v2-periphery"; +export type { v2Periphery }; +import type * as v3Core from "./v3-core"; +export type { v3Core }; +import type * as v3Periphery from "./v3-periphery"; +export type { v3Periphery }; diff --git a/packages/interfaces/typechain-types/@uniswap/v2-core/contracts/index.ts b/packages/interfaces/typechain-types/@uniswap/v2-core/contracts/index.ts new file mode 100644 index 00000000..92159233 --- /dev/null +++ b/packages/interfaces/typechain-types/@uniswap/v2-core/contracts/index.ts @@ -0,0 +1,5 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import type * as interfaces from "./interfaces"; +export type { interfaces }; diff --git a/packages/interfaces/typechain-types/@uniswap/v2-core/contracts/interfaces/IUniswapV2Factory.ts b/packages/interfaces/typechain-types/@uniswap/v2-core/contracts/interfaces/IUniswapV2Factory.ts new file mode 100644 index 00000000..cf4e7113 --- /dev/null +++ b/packages/interfaces/typechain-types/@uniswap/v2-core/contracts/interfaces/IUniswapV2Factory.ts @@ -0,0 +1,316 @@ +/* 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, +} from "../../../../common"; + +export interface IUniswapV2FactoryInterface extends utils.Interface { + functions: { + "allPairs(uint256)": FunctionFragment; + "allPairsLength()": FunctionFragment; + "createPair(address,address)": FunctionFragment; + "feeTo()": FunctionFragment; + "feeToSetter()": FunctionFragment; + "getPair(address,address)": FunctionFragment; + "setFeeTo(address)": FunctionFragment; + "setFeeToSetter(address)": FunctionFragment; + }; + + getFunction( + nameOrSignatureOrTopic: + | "allPairs" + | "allPairsLength" + | "createPair" + | "feeTo" + | "feeToSetter" + | "getPair" + | "setFeeTo" + | "setFeeToSetter" + ): FunctionFragment; + + encodeFunctionData( + functionFragment: "allPairs", + values: [BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "allPairsLength", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "createPair", + values: [string, string] + ): string; + encodeFunctionData(functionFragment: "feeTo", values?: undefined): string; + encodeFunctionData( + functionFragment: "feeToSetter", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "getPair", + values: [string, string] + ): string; + encodeFunctionData(functionFragment: "setFeeTo", values: [string]): string; + encodeFunctionData( + functionFragment: "setFeeToSetter", + values: [string] + ): string; + + decodeFunctionResult(functionFragment: "allPairs", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "allPairsLength", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "createPair", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "feeTo", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "feeToSetter", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "getPair", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "setFeeTo", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "setFeeToSetter", + data: BytesLike + ): Result; + + events: { + "PairCreated(address,address,address,uint256)": EventFragment; + }; + + getEvent(nameOrSignatureOrTopic: "PairCreated"): EventFragment; +} + +export interface PairCreatedEventObject { + token0: string; + token1: string; + pair: string; + arg3: BigNumber; +} +export type PairCreatedEvent = TypedEvent< + [string, string, string, BigNumber], + PairCreatedEventObject +>; + +export type PairCreatedEventFilter = TypedEventFilter; + +export interface IUniswapV2Factory extends BaseContract { + connect(signerOrProvider: Signer | Provider | string): this; + attach(addressOrName: string): this; + deployed(): Promise; + + interface: IUniswapV2FactoryInterface; + + 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: { + allPairs( + arg0: BigNumberish, + overrides?: CallOverrides + ): Promise<[string] & { pair: string }>; + + allPairsLength(overrides?: CallOverrides): Promise<[BigNumber]>; + + createPair( + tokenA: string, + tokenB: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + feeTo(overrides?: CallOverrides): Promise<[string]>; + + feeToSetter(overrides?: CallOverrides): Promise<[string]>; + + getPair( + tokenA: string, + tokenB: string, + overrides?: CallOverrides + ): Promise<[string] & { pair: string }>; + + setFeeTo( + arg0: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + setFeeToSetter( + arg0: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + }; + + allPairs(arg0: BigNumberish, overrides?: CallOverrides): Promise; + + allPairsLength(overrides?: CallOverrides): Promise; + + createPair( + tokenA: string, + tokenB: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + feeTo(overrides?: CallOverrides): Promise; + + feeToSetter(overrides?: CallOverrides): Promise; + + getPair( + tokenA: string, + tokenB: string, + overrides?: CallOverrides + ): Promise; + + setFeeTo( + arg0: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + setFeeToSetter( + arg0: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + callStatic: { + allPairs(arg0: BigNumberish, overrides?: CallOverrides): Promise; + + allPairsLength(overrides?: CallOverrides): Promise; + + createPair( + tokenA: string, + tokenB: string, + overrides?: CallOverrides + ): Promise; + + feeTo(overrides?: CallOverrides): Promise; + + feeToSetter(overrides?: CallOverrides): Promise; + + getPair( + tokenA: string, + tokenB: string, + overrides?: CallOverrides + ): Promise; + + setFeeTo(arg0: string, overrides?: CallOverrides): Promise; + + setFeeToSetter(arg0: string, overrides?: CallOverrides): Promise; + }; + + filters: { + "PairCreated(address,address,address,uint256)"( + token0?: string | null, + token1?: string | null, + pair?: null, + arg3?: null + ): PairCreatedEventFilter; + PairCreated( + token0?: string | null, + token1?: string | null, + pair?: null, + arg3?: null + ): PairCreatedEventFilter; + }; + + estimateGas: { + allPairs(arg0: BigNumberish, overrides?: CallOverrides): Promise; + + allPairsLength(overrides?: CallOverrides): Promise; + + createPair( + tokenA: string, + tokenB: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + feeTo(overrides?: CallOverrides): Promise; + + feeToSetter(overrides?: CallOverrides): Promise; + + getPair( + tokenA: string, + tokenB: string, + overrides?: CallOverrides + ): Promise; + + setFeeTo( + arg0: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + setFeeToSetter( + arg0: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + }; + + populateTransaction: { + allPairs( + arg0: BigNumberish, + overrides?: CallOverrides + ): Promise; + + allPairsLength(overrides?: CallOverrides): Promise; + + createPair( + tokenA: string, + tokenB: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + feeTo(overrides?: CallOverrides): Promise; + + feeToSetter(overrides?: CallOverrides): Promise; + + getPair( + tokenA: string, + tokenB: string, + overrides?: CallOverrides + ): Promise; + + setFeeTo( + arg0: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + setFeeToSetter( + arg0: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + }; +} diff --git a/packages/interfaces/typechain-types/@uniswap/v2-core/contracts/interfaces/IUniswapV2Pair.ts b/packages/interfaces/typechain-types/@uniswap/v2-core/contracts/interfaces/IUniswapV2Pair.ts new file mode 100644 index 00000000..f0266a52 --- /dev/null +++ b/packages/interfaces/typechain-types/@uniswap/v2-core/contracts/interfaces/IUniswapV2Pair.ts @@ -0,0 +1,944 @@ +/* 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, +} from "../../../../common"; + +export interface IUniswapV2PairInterface extends utils.Interface { + functions: { + "DOMAIN_SEPARATOR()": FunctionFragment; + "MINIMUM_LIQUIDITY()": FunctionFragment; + "PERMIT_TYPEHASH()": FunctionFragment; + "allowance(address,address)": FunctionFragment; + "approve(address,uint256)": FunctionFragment; + "balanceOf(address)": FunctionFragment; + "burn(address)": FunctionFragment; + "decimals()": FunctionFragment; + "factory()": FunctionFragment; + "getReserves()": FunctionFragment; + "initialize(address,address)": FunctionFragment; + "kLast()": FunctionFragment; + "mint(address)": FunctionFragment; + "name()": FunctionFragment; + "nonces(address)": FunctionFragment; + "permit(address,address,uint256,uint256,uint8,bytes32,bytes32)": FunctionFragment; + "price0CumulativeLast()": FunctionFragment; + "price1CumulativeLast()": FunctionFragment; + "skim(address)": FunctionFragment; + "swap(uint256,uint256,address,bytes)": FunctionFragment; + "symbol()": FunctionFragment; + "sync()": FunctionFragment; + "token0()": FunctionFragment; + "token1()": FunctionFragment; + "totalSupply()": FunctionFragment; + "transfer(address,uint256)": FunctionFragment; + "transferFrom(address,address,uint256)": FunctionFragment; + }; + + getFunction( + nameOrSignatureOrTopic: + | "DOMAIN_SEPARATOR" + | "MINIMUM_LIQUIDITY" + | "PERMIT_TYPEHASH" + | "allowance" + | "approve" + | "balanceOf" + | "burn" + | "decimals" + | "factory" + | "getReserves" + | "initialize" + | "kLast" + | "mint" + | "name" + | "nonces" + | "permit" + | "price0CumulativeLast" + | "price1CumulativeLast" + | "skim" + | "swap" + | "symbol" + | "sync" + | "token0" + | "token1" + | "totalSupply" + | "transfer" + | "transferFrom" + ): FunctionFragment; + + encodeFunctionData( + functionFragment: "DOMAIN_SEPARATOR", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "MINIMUM_LIQUIDITY", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "PERMIT_TYPEHASH", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "allowance", + values: [string, string] + ): string; + encodeFunctionData( + functionFragment: "approve", + values: [string, BigNumberish] + ): string; + encodeFunctionData(functionFragment: "balanceOf", values: [string]): string; + encodeFunctionData(functionFragment: "burn", values: [string]): string; + encodeFunctionData(functionFragment: "decimals", values?: undefined): string; + encodeFunctionData(functionFragment: "factory", values?: undefined): string; + encodeFunctionData( + functionFragment: "getReserves", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "initialize", + values: [string, string] + ): string; + encodeFunctionData(functionFragment: "kLast", values?: undefined): string; + encodeFunctionData(functionFragment: "mint", values: [string]): string; + encodeFunctionData(functionFragment: "name", values?: undefined): string; + encodeFunctionData(functionFragment: "nonces", values: [string]): string; + encodeFunctionData( + functionFragment: "permit", + values: [ + string, + string, + BigNumberish, + BigNumberish, + BigNumberish, + BytesLike, + BytesLike + ] + ): string; + encodeFunctionData( + functionFragment: "price0CumulativeLast", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "price1CumulativeLast", + values?: undefined + ): string; + encodeFunctionData(functionFragment: "skim", values: [string]): string; + encodeFunctionData( + functionFragment: "swap", + values: [BigNumberish, BigNumberish, string, BytesLike] + ): string; + encodeFunctionData(functionFragment: "symbol", values?: undefined): string; + encodeFunctionData(functionFragment: "sync", values?: undefined): string; + encodeFunctionData(functionFragment: "token0", values?: undefined): string; + encodeFunctionData(functionFragment: "token1", values?: undefined): string; + encodeFunctionData( + functionFragment: "totalSupply", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "transfer", + values: [string, BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "transferFrom", + values: [string, string, BigNumberish] + ): string; + + decodeFunctionResult( + functionFragment: "DOMAIN_SEPARATOR", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "MINIMUM_LIQUIDITY", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "PERMIT_TYPEHASH", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "allowance", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "approve", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "balanceOf", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "burn", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "decimals", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "factory", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "getReserves", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "initialize", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "kLast", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "mint", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "name", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "nonces", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "permit", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "price0CumulativeLast", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "price1CumulativeLast", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "skim", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "swap", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "symbol", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "sync", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "token0", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "token1", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "totalSupply", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "transfer", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "transferFrom", + data: BytesLike + ): Result; + + events: { + "Approval(address,address,uint256)": EventFragment; + "Burn(address,uint256,uint256,address)": EventFragment; + "Mint(address,uint256,uint256)": EventFragment; + "Swap(address,uint256,uint256,uint256,uint256,address)": EventFragment; + "Sync(uint112,uint112)": EventFragment; + "Transfer(address,address,uint256)": EventFragment; + }; + + getEvent(nameOrSignatureOrTopic: "Approval"): EventFragment; + getEvent(nameOrSignatureOrTopic: "Burn"): EventFragment; + getEvent(nameOrSignatureOrTopic: "Mint"): EventFragment; + getEvent(nameOrSignatureOrTopic: "Swap"): EventFragment; + getEvent(nameOrSignatureOrTopic: "Sync"): EventFragment; + getEvent(nameOrSignatureOrTopic: "Transfer"): EventFragment; +} + +export interface ApprovalEventObject { + owner: string; + spender: string; + value: BigNumber; +} +export type ApprovalEvent = TypedEvent< + [string, string, BigNumber], + ApprovalEventObject +>; + +export type ApprovalEventFilter = TypedEventFilter; + +export interface BurnEventObject { + sender: string; + amount0: BigNumber; + amount1: BigNumber; + to: string; +} +export type BurnEvent = TypedEvent< + [string, BigNumber, BigNumber, string], + BurnEventObject +>; + +export type BurnEventFilter = TypedEventFilter; + +export interface MintEventObject { + sender: string; + amount0: BigNumber; + amount1: BigNumber; +} +export type MintEvent = TypedEvent< + [string, BigNumber, BigNumber], + MintEventObject +>; + +export type MintEventFilter = TypedEventFilter; + +export interface SwapEventObject { + sender: string; + amount0In: BigNumber; + amount1In: BigNumber; + amount0Out: BigNumber; + amount1Out: BigNumber; + to: string; +} +export type SwapEvent = TypedEvent< + [string, BigNumber, BigNumber, BigNumber, BigNumber, string], + SwapEventObject +>; + +export type SwapEventFilter = TypedEventFilter; + +export interface SyncEventObject { + reserve0: BigNumber; + reserve1: BigNumber; +} +export type SyncEvent = TypedEvent<[BigNumber, BigNumber], SyncEventObject>; + +export type SyncEventFilter = TypedEventFilter; + +export interface TransferEventObject { + from: string; + to: string; + value: BigNumber; +} +export type TransferEvent = TypedEvent< + [string, string, BigNumber], + TransferEventObject +>; + +export type TransferEventFilter = TypedEventFilter; + +export interface IUniswapV2Pair extends BaseContract { + connect(signerOrProvider: Signer | Provider | string): this; + attach(addressOrName: string): this; + deployed(): Promise; + + interface: IUniswapV2PairInterface; + + 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: { + DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise<[string]>; + + MINIMUM_LIQUIDITY(overrides?: CallOverrides): Promise<[BigNumber]>; + + PERMIT_TYPEHASH(overrides?: CallOverrides): Promise<[string]>; + + allowance( + owner: string, + spender: string, + overrides?: CallOverrides + ): Promise<[BigNumber]>; + + approve( + spender: string, + value: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + balanceOf(owner: string, overrides?: CallOverrides): Promise<[BigNumber]>; + + burn( + to: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + decimals(overrides?: CallOverrides): Promise<[number]>; + + factory(overrides?: CallOverrides): Promise<[string]>; + + getReserves( + overrides?: CallOverrides + ): Promise< + [BigNumber, BigNumber, number] & { + reserve0: BigNumber; + reserve1: BigNumber; + blockTimestampLast: number; + } + >; + + initialize( + arg0: string, + arg1: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + kLast(overrides?: CallOverrides): Promise<[BigNumber]>; + + mint( + to: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + name(overrides?: CallOverrides): Promise<[string]>; + + nonces(owner: string, overrides?: CallOverrides): Promise<[BigNumber]>; + + permit( + owner: string, + spender: string, + value: BigNumberish, + deadline: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + price0CumulativeLast(overrides?: CallOverrides): Promise<[BigNumber]>; + + price1CumulativeLast(overrides?: CallOverrides): Promise<[BigNumber]>; + + skim( + to: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + swap( + amount0Out: BigNumberish, + amount1Out: BigNumberish, + to: string, + data: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + symbol(overrides?: CallOverrides): Promise<[string]>; + + sync( + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + token0(overrides?: CallOverrides): Promise<[string]>; + + token1(overrides?: CallOverrides): Promise<[string]>; + + totalSupply(overrides?: CallOverrides): Promise<[BigNumber]>; + + transfer( + to: string, + value: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + transferFrom( + from: string, + to: string, + value: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + }; + + DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise; + + MINIMUM_LIQUIDITY(overrides?: CallOverrides): Promise; + + PERMIT_TYPEHASH(overrides?: CallOverrides): Promise; + + allowance( + owner: string, + spender: string, + overrides?: CallOverrides + ): Promise; + + approve( + spender: string, + value: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + balanceOf(owner: string, overrides?: CallOverrides): Promise; + + burn( + to: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + decimals(overrides?: CallOverrides): Promise; + + factory(overrides?: CallOverrides): Promise; + + getReserves( + overrides?: CallOverrides + ): Promise< + [BigNumber, BigNumber, number] & { + reserve0: BigNumber; + reserve1: BigNumber; + blockTimestampLast: number; + } + >; + + initialize( + arg0: string, + arg1: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + kLast(overrides?: CallOverrides): Promise; + + mint( + to: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + name(overrides?: CallOverrides): Promise; + + nonces(owner: string, overrides?: CallOverrides): Promise; + + permit( + owner: string, + spender: string, + value: BigNumberish, + deadline: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + price0CumulativeLast(overrides?: CallOverrides): Promise; + + price1CumulativeLast(overrides?: CallOverrides): Promise; + + skim( + to: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + swap( + amount0Out: BigNumberish, + amount1Out: BigNumberish, + to: string, + data: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + symbol(overrides?: CallOverrides): Promise; + + sync( + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + token0(overrides?: CallOverrides): Promise; + + token1(overrides?: CallOverrides): Promise; + + totalSupply(overrides?: CallOverrides): Promise; + + transfer( + to: string, + value: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + transferFrom( + from: string, + to: string, + value: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + callStatic: { + DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise; + + MINIMUM_LIQUIDITY(overrides?: CallOverrides): Promise; + + PERMIT_TYPEHASH(overrides?: CallOverrides): Promise; + + allowance( + owner: string, + spender: string, + overrides?: CallOverrides + ): Promise; + + approve( + spender: string, + value: BigNumberish, + overrides?: CallOverrides + ): Promise; + + balanceOf(owner: string, overrides?: CallOverrides): Promise; + + burn( + to: string, + overrides?: CallOverrides + ): Promise< + [BigNumber, BigNumber] & { amount0: BigNumber; amount1: BigNumber } + >; + + decimals(overrides?: CallOverrides): Promise; + + factory(overrides?: CallOverrides): Promise; + + getReserves( + overrides?: CallOverrides + ): Promise< + [BigNumber, BigNumber, number] & { + reserve0: BigNumber; + reserve1: BigNumber; + blockTimestampLast: number; + } + >; + + initialize( + arg0: string, + arg1: string, + overrides?: CallOverrides + ): Promise; + + kLast(overrides?: CallOverrides): Promise; + + mint(to: string, overrides?: CallOverrides): Promise; + + name(overrides?: CallOverrides): Promise; + + nonces(owner: string, overrides?: CallOverrides): Promise; + + permit( + owner: string, + spender: string, + value: BigNumberish, + deadline: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: CallOverrides + ): Promise; + + price0CumulativeLast(overrides?: CallOverrides): Promise; + + price1CumulativeLast(overrides?: CallOverrides): Promise; + + skim(to: string, overrides?: CallOverrides): Promise; + + swap( + amount0Out: BigNumberish, + amount1Out: BigNumberish, + to: string, + data: BytesLike, + overrides?: CallOverrides + ): Promise; + + symbol(overrides?: CallOverrides): Promise; + + sync(overrides?: CallOverrides): Promise; + + token0(overrides?: CallOverrides): Promise; + + token1(overrides?: CallOverrides): Promise; + + totalSupply(overrides?: CallOverrides): Promise; + + transfer( + to: string, + value: BigNumberish, + overrides?: CallOverrides + ): Promise; + + transferFrom( + from: string, + to: string, + value: BigNumberish, + overrides?: CallOverrides + ): Promise; + }; + + filters: { + "Approval(address,address,uint256)"( + owner?: string | null, + spender?: string | null, + value?: null + ): ApprovalEventFilter; + Approval( + owner?: string | null, + spender?: string | null, + value?: null + ): ApprovalEventFilter; + + "Burn(address,uint256,uint256,address)"( + sender?: string | null, + amount0?: null, + amount1?: null, + to?: string | null + ): BurnEventFilter; + Burn( + sender?: string | null, + amount0?: null, + amount1?: null, + to?: string | null + ): BurnEventFilter; + + "Mint(address,uint256,uint256)"( + sender?: string | null, + amount0?: null, + amount1?: null + ): MintEventFilter; + Mint( + sender?: string | null, + amount0?: null, + amount1?: null + ): MintEventFilter; + + "Swap(address,uint256,uint256,uint256,uint256,address)"( + sender?: string | null, + amount0In?: null, + amount1In?: null, + amount0Out?: null, + amount1Out?: null, + to?: string | null + ): SwapEventFilter; + Swap( + sender?: string | null, + amount0In?: null, + amount1In?: null, + amount0Out?: null, + amount1Out?: null, + to?: string | null + ): SwapEventFilter; + + "Sync(uint112,uint112)"(reserve0?: null, reserve1?: null): SyncEventFilter; + Sync(reserve0?: null, reserve1?: null): SyncEventFilter; + + "Transfer(address,address,uint256)"( + from?: string | null, + to?: string | null, + value?: null + ): TransferEventFilter; + Transfer( + from?: string | null, + to?: string | null, + value?: null + ): TransferEventFilter; + }; + + estimateGas: { + DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise; + + MINIMUM_LIQUIDITY(overrides?: CallOverrides): Promise; + + PERMIT_TYPEHASH(overrides?: CallOverrides): Promise; + + allowance( + owner: string, + spender: string, + overrides?: CallOverrides + ): Promise; + + approve( + spender: string, + value: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + balanceOf(owner: string, overrides?: CallOverrides): Promise; + + burn( + to: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + decimals(overrides?: CallOverrides): Promise; + + factory(overrides?: CallOverrides): Promise; + + getReserves(overrides?: CallOverrides): Promise; + + initialize( + arg0: string, + arg1: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + kLast(overrides?: CallOverrides): Promise; + + mint( + to: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + name(overrides?: CallOverrides): Promise; + + nonces(owner: string, overrides?: CallOverrides): Promise; + + permit( + owner: string, + spender: string, + value: BigNumberish, + deadline: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + price0CumulativeLast(overrides?: CallOverrides): Promise; + + price1CumulativeLast(overrides?: CallOverrides): Promise; + + skim( + to: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + swap( + amount0Out: BigNumberish, + amount1Out: BigNumberish, + to: string, + data: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + symbol(overrides?: CallOverrides): Promise; + + sync( + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + token0(overrides?: CallOverrides): Promise; + + token1(overrides?: CallOverrides): Promise; + + totalSupply(overrides?: CallOverrides): Promise; + + transfer( + to: string, + value: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + transferFrom( + from: string, + to: string, + value: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + }; + + populateTransaction: { + DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise; + + MINIMUM_LIQUIDITY(overrides?: CallOverrides): Promise; + + PERMIT_TYPEHASH(overrides?: CallOverrides): Promise; + + allowance( + owner: string, + spender: string, + overrides?: CallOverrides + ): Promise; + + approve( + spender: string, + value: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + balanceOf( + owner: string, + overrides?: CallOverrides + ): Promise; + + burn( + to: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + decimals(overrides?: CallOverrides): Promise; + + factory(overrides?: CallOverrides): Promise; + + getReserves(overrides?: CallOverrides): Promise; + + initialize( + arg0: string, + arg1: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + kLast(overrides?: CallOverrides): Promise; + + mint( + to: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + name(overrides?: CallOverrides): Promise; + + nonces( + owner: string, + overrides?: CallOverrides + ): Promise; + + permit( + owner: string, + spender: string, + value: BigNumberish, + deadline: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + price0CumulativeLast( + overrides?: CallOverrides + ): Promise; + + price1CumulativeLast( + overrides?: CallOverrides + ): Promise; + + skim( + to: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + swap( + amount0Out: BigNumberish, + amount1Out: BigNumberish, + to: string, + data: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + symbol(overrides?: CallOverrides): Promise; + + sync( + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + token0(overrides?: CallOverrides): Promise; + + token1(overrides?: CallOverrides): Promise; + + totalSupply(overrides?: CallOverrides): Promise; + + transfer( + to: string, + value: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + transferFrom( + from: string, + to: string, + value: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + }; +} diff --git a/packages/interfaces/typechain-types/@uniswap/v2-core/contracts/interfaces/index.ts b/packages/interfaces/typechain-types/@uniswap/v2-core/contracts/interfaces/index.ts new file mode 100644 index 00000000..0cf9f47a --- /dev/null +++ b/packages/interfaces/typechain-types/@uniswap/v2-core/contracts/interfaces/index.ts @@ -0,0 +1,5 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +export type { IUniswapV2Factory } from "./IUniswapV2Factory"; +export type { IUniswapV2Pair } from "./IUniswapV2Pair"; diff --git a/packages/interfaces/typechain-types/@uniswap/v2-core/index.ts b/packages/interfaces/typechain-types/@uniswap/v2-core/index.ts new file mode 100644 index 00000000..a11e4ca2 --- /dev/null +++ b/packages/interfaces/typechain-types/@uniswap/v2-core/index.ts @@ -0,0 +1,5 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import type * as contracts from "./contracts"; +export type { contracts }; diff --git a/packages/interfaces/typechain-types/@uniswap/v2-periphery/contracts/UniswapV2Router02.ts b/packages/interfaces/typechain-types/@uniswap/v2-periphery/contracts/UniswapV2Router02.ts new file mode 100644 index 00000000..1c45dd48 --- /dev/null +++ b/packages/interfaces/typechain-types/@uniswap/v2-periphery/contracts/UniswapV2Router02.ts @@ -0,0 +1,1446 @@ +/* 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 } from "@ethersproject/abi"; +import type { Listener, Provider } from "@ethersproject/providers"; +import type { + TypedEventFilter, + TypedEvent, + TypedListener, + OnEvent, +} from "../../../common"; + +export interface UniswapV2Router02Interface extends utils.Interface { + functions: { + "WETH()": FunctionFragment; + "addLiquidity(address,address,uint256,uint256,uint256,uint256,address,uint256)": FunctionFragment; + "addLiquidityETH(address,uint256,uint256,uint256,address,uint256)": FunctionFragment; + "factory()": FunctionFragment; + "getAmountIn(uint256,uint256,uint256)": FunctionFragment; + "getAmountOut(uint256,uint256,uint256)": FunctionFragment; + "getAmountsIn(uint256,address[])": FunctionFragment; + "getAmountsOut(uint256,address[])": FunctionFragment; + "quote(uint256,uint256,uint256)": FunctionFragment; + "removeLiquidity(address,address,uint256,uint256,uint256,address,uint256)": FunctionFragment; + "removeLiquidityETH(address,uint256,uint256,uint256,address,uint256)": FunctionFragment; + "removeLiquidityETHSupportingFeeOnTransferTokens(address,uint256,uint256,uint256,address,uint256)": FunctionFragment; + "removeLiquidityETHWithPermit(address,uint256,uint256,uint256,address,uint256,bool,uint8,bytes32,bytes32)": FunctionFragment; + "removeLiquidityETHWithPermitSupportingFeeOnTransferTokens(address,uint256,uint256,uint256,address,uint256,bool,uint8,bytes32,bytes32)": FunctionFragment; + "removeLiquidityWithPermit(address,address,uint256,uint256,uint256,address,uint256,bool,uint8,bytes32,bytes32)": FunctionFragment; + "swapETHForExactTokens(uint256,address[],address,uint256)": FunctionFragment; + "swapExactETHForTokens(uint256,address[],address,uint256)": FunctionFragment; + "swapExactETHForTokensSupportingFeeOnTransferTokens(uint256,address[],address,uint256)": FunctionFragment; + "swapExactTokensForETH(uint256,uint256,address[],address,uint256)": FunctionFragment; + "swapExactTokensForETHSupportingFeeOnTransferTokens(uint256,uint256,address[],address,uint256)": FunctionFragment; + "swapExactTokensForTokens(uint256,uint256,address[],address,uint256)": FunctionFragment; + "swapExactTokensForTokensSupportingFeeOnTransferTokens(uint256,uint256,address[],address,uint256)": FunctionFragment; + "swapTokensForExactETH(uint256,uint256,address[],address,uint256)": FunctionFragment; + "swapTokensForExactTokens(uint256,uint256,address[],address,uint256)": FunctionFragment; + }; + + getFunction( + nameOrSignatureOrTopic: + | "WETH" + | "addLiquidity" + | "addLiquidityETH" + | "factory" + | "getAmountIn" + | "getAmountOut" + | "getAmountsIn" + | "getAmountsOut" + | "quote" + | "removeLiquidity" + | "removeLiquidityETH" + | "removeLiquidityETHSupportingFeeOnTransferTokens" + | "removeLiquidityETHWithPermit" + | "removeLiquidityETHWithPermitSupportingFeeOnTransferTokens" + | "removeLiquidityWithPermit" + | "swapETHForExactTokens" + | "swapExactETHForTokens" + | "swapExactETHForTokensSupportingFeeOnTransferTokens" + | "swapExactTokensForETH" + | "swapExactTokensForETHSupportingFeeOnTransferTokens" + | "swapExactTokensForTokens" + | "swapExactTokensForTokensSupportingFeeOnTransferTokens" + | "swapTokensForExactETH" + | "swapTokensForExactTokens" + ): FunctionFragment; + + encodeFunctionData(functionFragment: "WETH", values?: undefined): string; + encodeFunctionData( + functionFragment: "addLiquidity", + values: [ + string, + string, + BigNumberish, + BigNumberish, + BigNumberish, + BigNumberish, + string, + BigNumberish + ] + ): string; + encodeFunctionData( + functionFragment: "addLiquidityETH", + values: [ + string, + BigNumberish, + BigNumberish, + BigNumberish, + string, + BigNumberish + ] + ): string; + encodeFunctionData(functionFragment: "factory", values?: undefined): string; + encodeFunctionData( + functionFragment: "getAmountIn", + values: [BigNumberish, BigNumberish, BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "getAmountOut", + values: [BigNumberish, BigNumberish, BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "getAmountsIn", + values: [BigNumberish, string[]] + ): string; + encodeFunctionData( + functionFragment: "getAmountsOut", + values: [BigNumberish, string[]] + ): string; + encodeFunctionData( + functionFragment: "quote", + values: [BigNumberish, BigNumberish, BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "removeLiquidity", + values: [ + string, + string, + BigNumberish, + BigNumberish, + BigNumberish, + string, + BigNumberish + ] + ): string; + encodeFunctionData( + functionFragment: "removeLiquidityETH", + values: [ + string, + BigNumberish, + BigNumberish, + BigNumberish, + string, + BigNumberish + ] + ): string; + encodeFunctionData( + functionFragment: "removeLiquidityETHSupportingFeeOnTransferTokens", + values: [ + string, + BigNumberish, + BigNumberish, + BigNumberish, + string, + BigNumberish + ] + ): string; + encodeFunctionData( + functionFragment: "removeLiquidityETHWithPermit", + values: [ + string, + BigNumberish, + BigNumberish, + BigNumberish, + string, + BigNumberish, + boolean, + BigNumberish, + BytesLike, + BytesLike + ] + ): string; + encodeFunctionData( + functionFragment: "removeLiquidityETHWithPermitSupportingFeeOnTransferTokens", + values: [ + string, + BigNumberish, + BigNumberish, + BigNumberish, + string, + BigNumberish, + boolean, + BigNumberish, + BytesLike, + BytesLike + ] + ): string; + encodeFunctionData( + functionFragment: "removeLiquidityWithPermit", + values: [ + string, + string, + BigNumberish, + BigNumberish, + BigNumberish, + string, + BigNumberish, + boolean, + BigNumberish, + BytesLike, + BytesLike + ] + ): string; + encodeFunctionData( + functionFragment: "swapETHForExactTokens", + values: [BigNumberish, string[], string, BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "swapExactETHForTokens", + values: [BigNumberish, string[], string, BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "swapExactETHForTokensSupportingFeeOnTransferTokens", + values: [BigNumberish, string[], string, BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "swapExactTokensForETH", + values: [BigNumberish, BigNumberish, string[], string, BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "swapExactTokensForETHSupportingFeeOnTransferTokens", + values: [BigNumberish, BigNumberish, string[], string, BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "swapExactTokensForTokens", + values: [BigNumberish, BigNumberish, string[], string, BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "swapExactTokensForTokensSupportingFeeOnTransferTokens", + values: [BigNumberish, BigNumberish, string[], string, BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "swapTokensForExactETH", + values: [BigNumberish, BigNumberish, string[], string, BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "swapTokensForExactTokens", + values: [BigNumberish, BigNumberish, string[], string, BigNumberish] + ): string; + + decodeFunctionResult(functionFragment: "WETH", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "addLiquidity", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "addLiquidityETH", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "factory", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "getAmountIn", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "getAmountOut", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "getAmountsIn", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "getAmountsOut", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "quote", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "removeLiquidity", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "removeLiquidityETH", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "removeLiquidityETHSupportingFeeOnTransferTokens", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "removeLiquidityETHWithPermit", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "removeLiquidityETHWithPermitSupportingFeeOnTransferTokens", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "removeLiquidityWithPermit", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "swapETHForExactTokens", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "swapExactETHForTokens", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "swapExactETHForTokensSupportingFeeOnTransferTokens", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "swapExactTokensForETH", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "swapExactTokensForETHSupportingFeeOnTransferTokens", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "swapExactTokensForTokens", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "swapExactTokensForTokensSupportingFeeOnTransferTokens", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "swapTokensForExactETH", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "swapTokensForExactTokens", + data: BytesLike + ): Result; + + events: {}; +} + +export interface UniswapV2Router02 extends BaseContract { + connect(signerOrProvider: Signer | Provider | string): this; + attach(addressOrName: string): this; + deployed(): Promise; + + interface: UniswapV2Router02Interface; + + 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: { + WETH(overrides?: CallOverrides): Promise<[string]>; + + addLiquidity( + tokenA: string, + tokenB: string, + amountADesired: BigNumberish, + amountBDesired: BigNumberish, + amountAMin: BigNumberish, + amountBMin: BigNumberish, + to: string, + deadline: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + addLiquidityETH( + token: string, + amountTokenDesired: BigNumberish, + amountTokenMin: BigNumberish, + amountETHMin: BigNumberish, + to: string, + deadline: BigNumberish, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + + factory(overrides?: CallOverrides): Promise<[string]>; + + getAmountIn( + amountOut: BigNumberish, + reserveIn: BigNumberish, + reserveOut: BigNumberish, + overrides?: CallOverrides + ): Promise<[BigNumber] & { amountIn: BigNumber }>; + + getAmountOut( + amountIn: BigNumberish, + reserveIn: BigNumberish, + reserveOut: BigNumberish, + overrides?: CallOverrides + ): Promise<[BigNumber] & { amountOut: BigNumber }>; + + getAmountsIn( + amountOut: BigNumberish, + path: string[], + overrides?: CallOverrides + ): Promise<[BigNumber[]] & { amounts: BigNumber[] }>; + + getAmountsOut( + amountIn: BigNumberish, + path: string[], + overrides?: CallOverrides + ): Promise<[BigNumber[]] & { amounts: BigNumber[] }>; + + quote( + amountA: BigNumberish, + reserveA: BigNumberish, + reserveB: BigNumberish, + overrides?: CallOverrides + ): Promise<[BigNumber] & { amountB: BigNumber }>; + + removeLiquidity( + tokenA: string, + tokenB: string, + liquidity: BigNumberish, + amountAMin: BigNumberish, + amountBMin: BigNumberish, + to: string, + deadline: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + removeLiquidityETH( + token: string, + liquidity: BigNumberish, + amountTokenMin: BigNumberish, + amountETHMin: BigNumberish, + to: string, + deadline: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + removeLiquidityETHSupportingFeeOnTransferTokens( + token: string, + liquidity: BigNumberish, + amountTokenMin: BigNumberish, + amountETHMin: BigNumberish, + to: string, + deadline: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + removeLiquidityETHWithPermit( + token: string, + liquidity: BigNumberish, + amountTokenMin: BigNumberish, + amountETHMin: BigNumberish, + to: string, + deadline: BigNumberish, + approveMax: boolean, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + removeLiquidityETHWithPermitSupportingFeeOnTransferTokens( + token: string, + liquidity: BigNumberish, + amountTokenMin: BigNumberish, + amountETHMin: BigNumberish, + to: string, + deadline: BigNumberish, + approveMax: boolean, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + removeLiquidityWithPermit( + tokenA: string, + tokenB: string, + liquidity: BigNumberish, + amountAMin: BigNumberish, + amountBMin: BigNumberish, + to: string, + deadline: BigNumberish, + approveMax: boolean, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + swapETHForExactTokens( + amountOut: BigNumberish, + path: string[], + to: string, + deadline: BigNumberish, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + + swapExactETHForTokens( + amountOutMin: BigNumberish, + path: string[], + to: string, + deadline: BigNumberish, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + + swapExactETHForTokensSupportingFeeOnTransferTokens( + amountOutMin: BigNumberish, + path: string[], + to: string, + deadline: BigNumberish, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + + swapExactTokensForETH( + amountIn: BigNumberish, + amountOutMin: BigNumberish, + path: string[], + to: string, + deadline: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + swapExactTokensForETHSupportingFeeOnTransferTokens( + amountIn: BigNumberish, + amountOutMin: BigNumberish, + path: string[], + to: string, + deadline: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + swapExactTokensForTokens( + amountIn: BigNumberish, + amountOutMin: BigNumberish, + path: string[], + to: string, + deadline: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + swapExactTokensForTokensSupportingFeeOnTransferTokens( + amountIn: BigNumberish, + amountOutMin: BigNumberish, + path: string[], + to: string, + deadline: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + swapTokensForExactETH( + amountOut: BigNumberish, + amountInMax: BigNumberish, + path: string[], + to: string, + deadline: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + swapTokensForExactTokens( + amountOut: BigNumberish, + amountInMax: BigNumberish, + path: string[], + to: string, + deadline: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + }; + + WETH(overrides?: CallOverrides): Promise; + + addLiquidity( + tokenA: string, + tokenB: string, + amountADesired: BigNumberish, + amountBDesired: BigNumberish, + amountAMin: BigNumberish, + amountBMin: BigNumberish, + to: string, + deadline: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + addLiquidityETH( + token: string, + amountTokenDesired: BigNumberish, + amountTokenMin: BigNumberish, + amountETHMin: BigNumberish, + to: string, + deadline: BigNumberish, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + + factory(overrides?: CallOverrides): Promise; + + getAmountIn( + amountOut: BigNumberish, + reserveIn: BigNumberish, + reserveOut: BigNumberish, + overrides?: CallOverrides + ): Promise; + + getAmountOut( + amountIn: BigNumberish, + reserveIn: BigNumberish, + reserveOut: BigNumberish, + overrides?: CallOverrides + ): Promise; + + getAmountsIn( + amountOut: BigNumberish, + path: string[], + overrides?: CallOverrides + ): Promise; + + getAmountsOut( + amountIn: BigNumberish, + path: string[], + overrides?: CallOverrides + ): Promise; + + quote( + amountA: BigNumberish, + reserveA: BigNumberish, + reserveB: BigNumberish, + overrides?: CallOverrides + ): Promise; + + removeLiquidity( + tokenA: string, + tokenB: string, + liquidity: BigNumberish, + amountAMin: BigNumberish, + amountBMin: BigNumberish, + to: string, + deadline: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + removeLiquidityETH( + token: string, + liquidity: BigNumberish, + amountTokenMin: BigNumberish, + amountETHMin: BigNumberish, + to: string, + deadline: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + removeLiquidityETHSupportingFeeOnTransferTokens( + token: string, + liquidity: BigNumberish, + amountTokenMin: BigNumberish, + amountETHMin: BigNumberish, + to: string, + deadline: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + removeLiquidityETHWithPermit( + token: string, + liquidity: BigNumberish, + amountTokenMin: BigNumberish, + amountETHMin: BigNumberish, + to: string, + deadline: BigNumberish, + approveMax: boolean, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + removeLiquidityETHWithPermitSupportingFeeOnTransferTokens( + token: string, + liquidity: BigNumberish, + amountTokenMin: BigNumberish, + amountETHMin: BigNumberish, + to: string, + deadline: BigNumberish, + approveMax: boolean, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + removeLiquidityWithPermit( + tokenA: string, + tokenB: string, + liquidity: BigNumberish, + amountAMin: BigNumberish, + amountBMin: BigNumberish, + to: string, + deadline: BigNumberish, + approveMax: boolean, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + swapETHForExactTokens( + amountOut: BigNumberish, + path: string[], + to: string, + deadline: BigNumberish, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + + swapExactETHForTokens( + amountOutMin: BigNumberish, + path: string[], + to: string, + deadline: BigNumberish, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + + swapExactETHForTokensSupportingFeeOnTransferTokens( + amountOutMin: BigNumberish, + path: string[], + to: string, + deadline: BigNumberish, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + + swapExactTokensForETH( + amountIn: BigNumberish, + amountOutMin: BigNumberish, + path: string[], + to: string, + deadline: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + swapExactTokensForETHSupportingFeeOnTransferTokens( + amountIn: BigNumberish, + amountOutMin: BigNumberish, + path: string[], + to: string, + deadline: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + swapExactTokensForTokens( + amountIn: BigNumberish, + amountOutMin: BigNumberish, + path: string[], + to: string, + deadline: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + swapExactTokensForTokensSupportingFeeOnTransferTokens( + amountIn: BigNumberish, + amountOutMin: BigNumberish, + path: string[], + to: string, + deadline: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + swapTokensForExactETH( + amountOut: BigNumberish, + amountInMax: BigNumberish, + path: string[], + to: string, + deadline: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + swapTokensForExactTokens( + amountOut: BigNumberish, + amountInMax: BigNumberish, + path: string[], + to: string, + deadline: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + callStatic: { + WETH(overrides?: CallOverrides): Promise; + + addLiquidity( + tokenA: string, + tokenB: string, + amountADesired: BigNumberish, + amountBDesired: BigNumberish, + amountAMin: BigNumberish, + amountBMin: BigNumberish, + to: string, + deadline: BigNumberish, + overrides?: CallOverrides + ): Promise< + [BigNumber, BigNumber, BigNumber] & { + amountA: BigNumber; + amountB: BigNumber; + liquidity: BigNumber; + } + >; + + addLiquidityETH( + token: string, + amountTokenDesired: BigNumberish, + amountTokenMin: BigNumberish, + amountETHMin: BigNumberish, + to: string, + deadline: BigNumberish, + overrides?: CallOverrides + ): Promise< + [BigNumber, BigNumber, BigNumber] & { + amountToken: BigNumber; + amountETH: BigNumber; + liquidity: BigNumber; + } + >; + + factory(overrides?: CallOverrides): Promise; + + getAmountIn( + amountOut: BigNumberish, + reserveIn: BigNumberish, + reserveOut: BigNumberish, + overrides?: CallOverrides + ): Promise; + + getAmountOut( + amountIn: BigNumberish, + reserveIn: BigNumberish, + reserveOut: BigNumberish, + overrides?: CallOverrides + ): Promise; + + getAmountsIn( + amountOut: BigNumberish, + path: string[], + overrides?: CallOverrides + ): Promise; + + getAmountsOut( + amountIn: BigNumberish, + path: string[], + overrides?: CallOverrides + ): Promise; + + quote( + amountA: BigNumberish, + reserveA: BigNumberish, + reserveB: BigNumberish, + overrides?: CallOverrides + ): Promise; + + removeLiquidity( + tokenA: string, + tokenB: string, + liquidity: BigNumberish, + amountAMin: BigNumberish, + amountBMin: BigNumberish, + to: string, + deadline: BigNumberish, + overrides?: CallOverrides + ): Promise< + [BigNumber, BigNumber] & { amountA: BigNumber; amountB: BigNumber } + >; + + removeLiquidityETH( + token: string, + liquidity: BigNumberish, + amountTokenMin: BigNumberish, + amountETHMin: BigNumberish, + to: string, + deadline: BigNumberish, + overrides?: CallOverrides + ): Promise< + [BigNumber, BigNumber] & { amountToken: BigNumber; amountETH: BigNumber } + >; + + removeLiquidityETHSupportingFeeOnTransferTokens( + token: string, + liquidity: BigNumberish, + amountTokenMin: BigNumberish, + amountETHMin: BigNumberish, + to: string, + deadline: BigNumberish, + overrides?: CallOverrides + ): Promise; + + removeLiquidityETHWithPermit( + token: string, + liquidity: BigNumberish, + amountTokenMin: BigNumberish, + amountETHMin: BigNumberish, + to: string, + deadline: BigNumberish, + approveMax: boolean, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: CallOverrides + ): Promise< + [BigNumber, BigNumber] & { amountToken: BigNumber; amountETH: BigNumber } + >; + + removeLiquidityETHWithPermitSupportingFeeOnTransferTokens( + token: string, + liquidity: BigNumberish, + amountTokenMin: BigNumberish, + amountETHMin: BigNumberish, + to: string, + deadline: BigNumberish, + approveMax: boolean, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: CallOverrides + ): Promise; + + removeLiquidityWithPermit( + tokenA: string, + tokenB: string, + liquidity: BigNumberish, + amountAMin: BigNumberish, + amountBMin: BigNumberish, + to: string, + deadline: BigNumberish, + approveMax: boolean, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: CallOverrides + ): Promise< + [BigNumber, BigNumber] & { amountA: BigNumber; amountB: BigNumber } + >; + + swapETHForExactTokens( + amountOut: BigNumberish, + path: string[], + to: string, + deadline: BigNumberish, + overrides?: CallOverrides + ): Promise; + + swapExactETHForTokens( + amountOutMin: BigNumberish, + path: string[], + to: string, + deadline: BigNumberish, + overrides?: CallOverrides + ): Promise; + + swapExactETHForTokensSupportingFeeOnTransferTokens( + amountOutMin: BigNumberish, + path: string[], + to: string, + deadline: BigNumberish, + overrides?: CallOverrides + ): Promise; + + swapExactTokensForETH( + amountIn: BigNumberish, + amountOutMin: BigNumberish, + path: string[], + to: string, + deadline: BigNumberish, + overrides?: CallOverrides + ): Promise; + + swapExactTokensForETHSupportingFeeOnTransferTokens( + amountIn: BigNumberish, + amountOutMin: BigNumberish, + path: string[], + to: string, + deadline: BigNumberish, + overrides?: CallOverrides + ): Promise; + + swapExactTokensForTokens( + amountIn: BigNumberish, + amountOutMin: BigNumberish, + path: string[], + to: string, + deadline: BigNumberish, + overrides?: CallOverrides + ): Promise; + + swapExactTokensForTokensSupportingFeeOnTransferTokens( + amountIn: BigNumberish, + amountOutMin: BigNumberish, + path: string[], + to: string, + deadline: BigNumberish, + overrides?: CallOverrides + ): Promise; + + swapTokensForExactETH( + amountOut: BigNumberish, + amountInMax: BigNumberish, + path: string[], + to: string, + deadline: BigNumberish, + overrides?: CallOverrides + ): Promise; + + swapTokensForExactTokens( + amountOut: BigNumberish, + amountInMax: BigNumberish, + path: string[], + to: string, + deadline: BigNumberish, + overrides?: CallOverrides + ): Promise; + }; + + filters: {}; + + estimateGas: { + WETH(overrides?: CallOverrides): Promise; + + addLiquidity( + tokenA: string, + tokenB: string, + amountADesired: BigNumberish, + amountBDesired: BigNumberish, + amountAMin: BigNumberish, + amountBMin: BigNumberish, + to: string, + deadline: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + addLiquidityETH( + token: string, + amountTokenDesired: BigNumberish, + amountTokenMin: BigNumberish, + amountETHMin: BigNumberish, + to: string, + deadline: BigNumberish, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + + factory(overrides?: CallOverrides): Promise; + + getAmountIn( + amountOut: BigNumberish, + reserveIn: BigNumberish, + reserveOut: BigNumberish, + overrides?: CallOverrides + ): Promise; + + getAmountOut( + amountIn: BigNumberish, + reserveIn: BigNumberish, + reserveOut: BigNumberish, + overrides?: CallOverrides + ): Promise; + + getAmountsIn( + amountOut: BigNumberish, + path: string[], + overrides?: CallOverrides + ): Promise; + + getAmountsOut( + amountIn: BigNumberish, + path: string[], + overrides?: CallOverrides + ): Promise; + + quote( + amountA: BigNumberish, + reserveA: BigNumberish, + reserveB: BigNumberish, + overrides?: CallOverrides + ): Promise; + + removeLiquidity( + tokenA: string, + tokenB: string, + liquidity: BigNumberish, + amountAMin: BigNumberish, + amountBMin: BigNumberish, + to: string, + deadline: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + removeLiquidityETH( + token: string, + liquidity: BigNumberish, + amountTokenMin: BigNumberish, + amountETHMin: BigNumberish, + to: string, + deadline: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + removeLiquidityETHSupportingFeeOnTransferTokens( + token: string, + liquidity: BigNumberish, + amountTokenMin: BigNumberish, + amountETHMin: BigNumberish, + to: string, + deadline: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + removeLiquidityETHWithPermit( + token: string, + liquidity: BigNumberish, + amountTokenMin: BigNumberish, + amountETHMin: BigNumberish, + to: string, + deadline: BigNumberish, + approveMax: boolean, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + removeLiquidityETHWithPermitSupportingFeeOnTransferTokens( + token: string, + liquidity: BigNumberish, + amountTokenMin: BigNumberish, + amountETHMin: BigNumberish, + to: string, + deadline: BigNumberish, + approveMax: boolean, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + removeLiquidityWithPermit( + tokenA: string, + tokenB: string, + liquidity: BigNumberish, + amountAMin: BigNumberish, + amountBMin: BigNumberish, + to: string, + deadline: BigNumberish, + approveMax: boolean, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + swapETHForExactTokens( + amountOut: BigNumberish, + path: string[], + to: string, + deadline: BigNumberish, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + + swapExactETHForTokens( + amountOutMin: BigNumberish, + path: string[], + to: string, + deadline: BigNumberish, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + + swapExactETHForTokensSupportingFeeOnTransferTokens( + amountOutMin: BigNumberish, + path: string[], + to: string, + deadline: BigNumberish, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + + swapExactTokensForETH( + amountIn: BigNumberish, + amountOutMin: BigNumberish, + path: string[], + to: string, + deadline: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + swapExactTokensForETHSupportingFeeOnTransferTokens( + amountIn: BigNumberish, + amountOutMin: BigNumberish, + path: string[], + to: string, + deadline: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + swapExactTokensForTokens( + amountIn: BigNumberish, + amountOutMin: BigNumberish, + path: string[], + to: string, + deadline: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + swapExactTokensForTokensSupportingFeeOnTransferTokens( + amountIn: BigNumberish, + amountOutMin: BigNumberish, + path: string[], + to: string, + deadline: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + swapTokensForExactETH( + amountOut: BigNumberish, + amountInMax: BigNumberish, + path: string[], + to: string, + deadline: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + swapTokensForExactTokens( + amountOut: BigNumberish, + amountInMax: BigNumberish, + path: string[], + to: string, + deadline: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + }; + + populateTransaction: { + WETH(overrides?: CallOverrides): Promise; + + addLiquidity( + tokenA: string, + tokenB: string, + amountADesired: BigNumberish, + amountBDesired: BigNumberish, + amountAMin: BigNumberish, + amountBMin: BigNumberish, + to: string, + deadline: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + addLiquidityETH( + token: string, + amountTokenDesired: BigNumberish, + amountTokenMin: BigNumberish, + amountETHMin: BigNumberish, + to: string, + deadline: BigNumberish, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + + factory(overrides?: CallOverrides): Promise; + + getAmountIn( + amountOut: BigNumberish, + reserveIn: BigNumberish, + reserveOut: BigNumberish, + overrides?: CallOverrides + ): Promise; + + getAmountOut( + amountIn: BigNumberish, + reserveIn: BigNumberish, + reserveOut: BigNumberish, + overrides?: CallOverrides + ): Promise; + + getAmountsIn( + amountOut: BigNumberish, + path: string[], + overrides?: CallOverrides + ): Promise; + + getAmountsOut( + amountIn: BigNumberish, + path: string[], + overrides?: CallOverrides + ): Promise; + + quote( + amountA: BigNumberish, + reserveA: BigNumberish, + reserveB: BigNumberish, + overrides?: CallOverrides + ): Promise; + + removeLiquidity( + tokenA: string, + tokenB: string, + liquidity: BigNumberish, + amountAMin: BigNumberish, + amountBMin: BigNumberish, + to: string, + deadline: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + removeLiquidityETH( + token: string, + liquidity: BigNumberish, + amountTokenMin: BigNumberish, + amountETHMin: BigNumberish, + to: string, + deadline: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + removeLiquidityETHSupportingFeeOnTransferTokens( + token: string, + liquidity: BigNumberish, + amountTokenMin: BigNumberish, + amountETHMin: BigNumberish, + to: string, + deadline: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + removeLiquidityETHWithPermit( + token: string, + liquidity: BigNumberish, + amountTokenMin: BigNumberish, + amountETHMin: BigNumberish, + to: string, + deadline: BigNumberish, + approveMax: boolean, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + removeLiquidityETHWithPermitSupportingFeeOnTransferTokens( + token: string, + liquidity: BigNumberish, + amountTokenMin: BigNumberish, + amountETHMin: BigNumberish, + to: string, + deadline: BigNumberish, + approveMax: boolean, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + removeLiquidityWithPermit( + tokenA: string, + tokenB: string, + liquidity: BigNumberish, + amountAMin: BigNumberish, + amountBMin: BigNumberish, + to: string, + deadline: BigNumberish, + approveMax: boolean, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + swapETHForExactTokens( + amountOut: BigNumberish, + path: string[], + to: string, + deadline: BigNumberish, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + + swapExactETHForTokens( + amountOutMin: BigNumberish, + path: string[], + to: string, + deadline: BigNumberish, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + + swapExactETHForTokensSupportingFeeOnTransferTokens( + amountOutMin: BigNumberish, + path: string[], + to: string, + deadline: BigNumberish, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + + swapExactTokensForETH( + amountIn: BigNumberish, + amountOutMin: BigNumberish, + path: string[], + to: string, + deadline: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + swapExactTokensForETHSupportingFeeOnTransferTokens( + amountIn: BigNumberish, + amountOutMin: BigNumberish, + path: string[], + to: string, + deadline: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + swapExactTokensForTokens( + amountIn: BigNumberish, + amountOutMin: BigNumberish, + path: string[], + to: string, + deadline: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + swapExactTokensForTokensSupportingFeeOnTransferTokens( + amountIn: BigNumberish, + amountOutMin: BigNumberish, + path: string[], + to: string, + deadline: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + swapTokensForExactETH( + amountOut: BigNumberish, + amountInMax: BigNumberish, + path: string[], + to: string, + deadline: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + swapTokensForExactTokens( + amountOut: BigNumberish, + amountInMax: BigNumberish, + path: string[], + to: string, + deadline: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + }; +} diff --git a/packages/interfaces/typechain-types/@uniswap/v2-periphery/contracts/index.ts b/packages/interfaces/typechain-types/@uniswap/v2-periphery/contracts/index.ts new file mode 100644 index 00000000..33335590 --- /dev/null +++ b/packages/interfaces/typechain-types/@uniswap/v2-periphery/contracts/index.ts @@ -0,0 +1,6 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import type * as interfaces from "./interfaces"; +export type { interfaces }; +export type { UniswapV2Router02 } from "./UniswapV2Router02"; diff --git a/packages/interfaces/typechain-types/@uniswap/v2-periphery/contracts/interfaces/IERC20.ts b/packages/interfaces/typechain-types/@uniswap/v2-periphery/contracts/interfaces/IERC20.ts new file mode 100644 index 00000000..44c615d1 --- /dev/null +++ b/packages/interfaces/typechain-types/@uniswap/v2-periphery/contracts/interfaces/IERC20.ts @@ -0,0 +1,364 @@ +/* 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, +} from "../../../../common"; + +export interface IERC20Interface extends utils.Interface { + functions: { + "allowance(address,address)": FunctionFragment; + "approve(address,uint256)": FunctionFragment; + "balanceOf(address)": FunctionFragment; + "decimals()": FunctionFragment; + "name()": FunctionFragment; + "symbol()": FunctionFragment; + "totalSupply()": FunctionFragment; + "transfer(address,uint256)": FunctionFragment; + "transferFrom(address,address,uint256)": FunctionFragment; + }; + + getFunction( + nameOrSignatureOrTopic: + | "allowance" + | "approve" + | "balanceOf" + | "decimals" + | "name" + | "symbol" + | "totalSupply" + | "transfer" + | "transferFrom" + ): FunctionFragment; + + encodeFunctionData( + functionFragment: "allowance", + values: [string, string] + ): string; + encodeFunctionData( + functionFragment: "approve", + values: [string, BigNumberish] + ): string; + encodeFunctionData(functionFragment: "balanceOf", values: [string]): string; + encodeFunctionData(functionFragment: "decimals", values?: undefined): string; + encodeFunctionData(functionFragment: "name", values?: undefined): string; + encodeFunctionData(functionFragment: "symbol", values?: undefined): string; + encodeFunctionData( + functionFragment: "totalSupply", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "transfer", + values: [string, BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "transferFrom", + values: [string, string, BigNumberish] + ): string; + + decodeFunctionResult(functionFragment: "allowance", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "approve", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "balanceOf", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "decimals", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "name", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "symbol", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "totalSupply", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "transfer", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "transferFrom", + data: BytesLike + ): Result; + + events: { + "Approval(address,address,uint256)": EventFragment; + "Transfer(address,address,uint256)": EventFragment; + }; + + getEvent(nameOrSignatureOrTopic: "Approval"): EventFragment; + getEvent(nameOrSignatureOrTopic: "Transfer"): EventFragment; +} + +export interface ApprovalEventObject { + owner: string; + spender: string; + value: BigNumber; +} +export type ApprovalEvent = TypedEvent< + [string, string, BigNumber], + ApprovalEventObject +>; + +export type ApprovalEventFilter = TypedEventFilter; + +export interface TransferEventObject { + from: string; + to: string; + value: BigNumber; +} +export type TransferEvent = TypedEvent< + [string, string, BigNumber], + TransferEventObject +>; + +export type TransferEventFilter = TypedEventFilter; + +export interface IERC20 extends BaseContract { + connect(signerOrProvider: Signer | Provider | string): this; + attach(addressOrName: string): this; + deployed(): Promise; + + interface: IERC20Interface; + + 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: { + allowance( + owner: string, + spender: string, + overrides?: CallOverrides + ): Promise<[BigNumber]>; + + approve( + spender: string, + value: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + balanceOf(owner: string, overrides?: CallOverrides): Promise<[BigNumber]>; + + decimals(overrides?: CallOverrides): Promise<[number]>; + + name(overrides?: CallOverrides): Promise<[string]>; + + symbol(overrides?: CallOverrides): Promise<[string]>; + + totalSupply(overrides?: CallOverrides): Promise<[BigNumber]>; + + transfer( + to: string, + value: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + transferFrom( + from: string, + to: string, + value: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + }; + + allowance( + owner: string, + spender: string, + overrides?: CallOverrides + ): Promise; + + approve( + spender: string, + value: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + balanceOf(owner: string, overrides?: CallOverrides): Promise; + + decimals(overrides?: CallOverrides): Promise; + + name(overrides?: CallOverrides): Promise; + + symbol(overrides?: CallOverrides): Promise; + + totalSupply(overrides?: CallOverrides): Promise; + + transfer( + to: string, + value: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + transferFrom( + from: string, + to: string, + value: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + callStatic: { + allowance( + owner: string, + spender: string, + overrides?: CallOverrides + ): Promise; + + approve( + spender: string, + value: BigNumberish, + overrides?: CallOverrides + ): Promise; + + balanceOf(owner: string, overrides?: CallOverrides): Promise; + + decimals(overrides?: CallOverrides): Promise; + + name(overrides?: CallOverrides): Promise; + + symbol(overrides?: CallOverrides): Promise; + + totalSupply(overrides?: CallOverrides): Promise; + + transfer( + to: string, + value: BigNumberish, + overrides?: CallOverrides + ): Promise; + + transferFrom( + from: string, + to: string, + value: BigNumberish, + overrides?: CallOverrides + ): Promise; + }; + + filters: { + "Approval(address,address,uint256)"( + owner?: string | null, + spender?: string | null, + value?: null + ): ApprovalEventFilter; + Approval( + owner?: string | null, + spender?: string | null, + value?: null + ): ApprovalEventFilter; + + "Transfer(address,address,uint256)"( + from?: string | null, + to?: string | null, + value?: null + ): TransferEventFilter; + Transfer( + from?: string | null, + to?: string | null, + value?: null + ): TransferEventFilter; + }; + + estimateGas: { + allowance( + owner: string, + spender: string, + overrides?: CallOverrides + ): Promise; + + approve( + spender: string, + value: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + balanceOf(owner: string, overrides?: CallOverrides): Promise; + + decimals(overrides?: CallOverrides): Promise; + + name(overrides?: CallOverrides): Promise; + + symbol(overrides?: CallOverrides): Promise; + + totalSupply(overrides?: CallOverrides): Promise; + + transfer( + to: string, + value: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + transferFrom( + from: string, + to: string, + value: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + }; + + populateTransaction: { + allowance( + owner: string, + spender: string, + overrides?: CallOverrides + ): Promise; + + approve( + spender: string, + value: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + balanceOf( + owner: string, + overrides?: CallOverrides + ): Promise; + + decimals(overrides?: CallOverrides): Promise; + + name(overrides?: CallOverrides): Promise; + + symbol(overrides?: CallOverrides): Promise; + + totalSupply(overrides?: CallOverrides): Promise; + + transfer( + to: string, + value: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + transferFrom( + from: string, + to: string, + value: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + }; +} diff --git a/packages/interfaces/typechain-types/@uniswap/v2-periphery/contracts/interfaces/IUniswapV2Router01.ts b/packages/interfaces/typechain-types/@uniswap/v2-periphery/contracts/interfaces/IUniswapV2Router01.ts new file mode 100644 index 00000000..0248d604 --- /dev/null +++ b/packages/interfaces/typechain-types/@uniswap/v2-periphery/contracts/interfaces/IUniswapV2Router01.ts @@ -0,0 +1,1128 @@ +/* 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 } from "@ethersproject/abi"; +import type { Listener, Provider } from "@ethersproject/providers"; +import type { + TypedEventFilter, + TypedEvent, + TypedListener, + OnEvent, +} from "../../../../common"; + +export interface IUniswapV2Router01Interface extends utils.Interface { + functions: { + "WETH()": FunctionFragment; + "addLiquidity(address,address,uint256,uint256,uint256,uint256,address,uint256)": FunctionFragment; + "addLiquidityETH(address,uint256,uint256,uint256,address,uint256)": FunctionFragment; + "factory()": FunctionFragment; + "getAmountIn(uint256,uint256,uint256)": FunctionFragment; + "getAmountOut(uint256,uint256,uint256)": FunctionFragment; + "getAmountsIn(uint256,address[])": FunctionFragment; + "getAmountsOut(uint256,address[])": FunctionFragment; + "quote(uint256,uint256,uint256)": FunctionFragment; + "removeLiquidity(address,address,uint256,uint256,uint256,address,uint256)": FunctionFragment; + "removeLiquidityETH(address,uint256,uint256,uint256,address,uint256)": FunctionFragment; + "removeLiquidityETHWithPermit(address,uint256,uint256,uint256,address,uint256,bool,uint8,bytes32,bytes32)": FunctionFragment; + "removeLiquidityWithPermit(address,address,uint256,uint256,uint256,address,uint256,bool,uint8,bytes32,bytes32)": FunctionFragment; + "swapETHForExactTokens(uint256,address[],address,uint256)": FunctionFragment; + "swapExactETHForTokens(uint256,address[],address,uint256)": FunctionFragment; + "swapExactTokensForETH(uint256,uint256,address[],address,uint256)": FunctionFragment; + "swapExactTokensForTokens(uint256,uint256,address[],address,uint256)": FunctionFragment; + "swapTokensForExactETH(uint256,uint256,address[],address,uint256)": FunctionFragment; + "swapTokensForExactTokens(uint256,uint256,address[],address,uint256)": FunctionFragment; + }; + + getFunction( + nameOrSignatureOrTopic: + | "WETH" + | "addLiquidity" + | "addLiquidityETH" + | "factory" + | "getAmountIn" + | "getAmountOut" + | "getAmountsIn" + | "getAmountsOut" + | "quote" + | "removeLiquidity" + | "removeLiquidityETH" + | "removeLiquidityETHWithPermit" + | "removeLiquidityWithPermit" + | "swapETHForExactTokens" + | "swapExactETHForTokens" + | "swapExactTokensForETH" + | "swapExactTokensForTokens" + | "swapTokensForExactETH" + | "swapTokensForExactTokens" + ): FunctionFragment; + + encodeFunctionData(functionFragment: "WETH", values?: undefined): string; + encodeFunctionData( + functionFragment: "addLiquidity", + values: [ + string, + string, + BigNumberish, + BigNumberish, + BigNumberish, + BigNumberish, + string, + BigNumberish + ] + ): string; + encodeFunctionData( + functionFragment: "addLiquidityETH", + values: [ + string, + BigNumberish, + BigNumberish, + BigNumberish, + string, + BigNumberish + ] + ): string; + encodeFunctionData(functionFragment: "factory", values?: undefined): string; + encodeFunctionData( + functionFragment: "getAmountIn", + values: [BigNumberish, BigNumberish, BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "getAmountOut", + values: [BigNumberish, BigNumberish, BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "getAmountsIn", + values: [BigNumberish, string[]] + ): string; + encodeFunctionData( + functionFragment: "getAmountsOut", + values: [BigNumberish, string[]] + ): string; + encodeFunctionData( + functionFragment: "quote", + values: [BigNumberish, BigNumberish, BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "removeLiquidity", + values: [ + string, + string, + BigNumberish, + BigNumberish, + BigNumberish, + string, + BigNumberish + ] + ): string; + encodeFunctionData( + functionFragment: "removeLiquidityETH", + values: [ + string, + BigNumberish, + BigNumberish, + BigNumberish, + string, + BigNumberish + ] + ): string; + encodeFunctionData( + functionFragment: "removeLiquidityETHWithPermit", + values: [ + string, + BigNumberish, + BigNumberish, + BigNumberish, + string, + BigNumberish, + boolean, + BigNumberish, + BytesLike, + BytesLike + ] + ): string; + encodeFunctionData( + functionFragment: "removeLiquidityWithPermit", + values: [ + string, + string, + BigNumberish, + BigNumberish, + BigNumberish, + string, + BigNumberish, + boolean, + BigNumberish, + BytesLike, + BytesLike + ] + ): string; + encodeFunctionData( + functionFragment: "swapETHForExactTokens", + values: [BigNumberish, string[], string, BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "swapExactETHForTokens", + values: [BigNumberish, string[], string, BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "swapExactTokensForETH", + values: [BigNumberish, BigNumberish, string[], string, BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "swapExactTokensForTokens", + values: [BigNumberish, BigNumberish, string[], string, BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "swapTokensForExactETH", + values: [BigNumberish, BigNumberish, string[], string, BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "swapTokensForExactTokens", + values: [BigNumberish, BigNumberish, string[], string, BigNumberish] + ): string; + + decodeFunctionResult(functionFragment: "WETH", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "addLiquidity", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "addLiquidityETH", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "factory", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "getAmountIn", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "getAmountOut", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "getAmountsIn", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "getAmountsOut", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "quote", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "removeLiquidity", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "removeLiquidityETH", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "removeLiquidityETHWithPermit", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "removeLiquidityWithPermit", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "swapETHForExactTokens", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "swapExactETHForTokens", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "swapExactTokensForETH", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "swapExactTokensForTokens", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "swapTokensForExactETH", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "swapTokensForExactTokens", + data: BytesLike + ): Result; + + events: {}; +} + +export interface IUniswapV2Router01 extends BaseContract { + connect(signerOrProvider: Signer | Provider | string): this; + attach(addressOrName: string): this; + deployed(): Promise; + + interface: IUniswapV2Router01Interface; + + 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: { + WETH(overrides?: CallOverrides): Promise<[string]>; + + addLiquidity( + tokenA: string, + tokenB: string, + amountADesired: BigNumberish, + amountBDesired: BigNumberish, + amountAMin: BigNumberish, + amountBMin: BigNumberish, + to: string, + deadline: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + addLiquidityETH( + token: string, + amountTokenDesired: BigNumberish, + amountTokenMin: BigNumberish, + amountETHMin: BigNumberish, + to: string, + deadline: BigNumberish, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + + factory(overrides?: CallOverrides): Promise<[string]>; + + getAmountIn( + amountOut: BigNumberish, + reserveIn: BigNumberish, + reserveOut: BigNumberish, + overrides?: CallOverrides + ): Promise<[BigNumber] & { amountIn: BigNumber }>; + + getAmountOut( + amountIn: BigNumberish, + reserveIn: BigNumberish, + reserveOut: BigNumberish, + overrides?: CallOverrides + ): Promise<[BigNumber] & { amountOut: BigNumber }>; + + getAmountsIn( + amountOut: BigNumberish, + path: string[], + overrides?: CallOverrides + ): Promise<[BigNumber[]] & { amounts: BigNumber[] }>; + + getAmountsOut( + amountIn: BigNumberish, + path: string[], + overrides?: CallOverrides + ): Promise<[BigNumber[]] & { amounts: BigNumber[] }>; + + quote( + amountA: BigNumberish, + reserveA: BigNumberish, + reserveB: BigNumberish, + overrides?: CallOverrides + ): Promise<[BigNumber] & { amountB: BigNumber }>; + + removeLiquidity( + tokenA: string, + tokenB: string, + liquidity: BigNumberish, + amountAMin: BigNumberish, + amountBMin: BigNumberish, + to: string, + deadline: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + removeLiquidityETH( + token: string, + liquidity: BigNumberish, + amountTokenMin: BigNumberish, + amountETHMin: BigNumberish, + to: string, + deadline: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + removeLiquidityETHWithPermit( + token: string, + liquidity: BigNumberish, + amountTokenMin: BigNumberish, + amountETHMin: BigNumberish, + to: string, + deadline: BigNumberish, + approveMax: boolean, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + removeLiquidityWithPermit( + tokenA: string, + tokenB: string, + liquidity: BigNumberish, + amountAMin: BigNumberish, + amountBMin: BigNumberish, + to: string, + deadline: BigNumberish, + approveMax: boolean, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + swapETHForExactTokens( + amountOut: BigNumberish, + path: string[], + to: string, + deadline: BigNumberish, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + + swapExactETHForTokens( + amountOutMin: BigNumberish, + path: string[], + to: string, + deadline: BigNumberish, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + + swapExactTokensForETH( + amountIn: BigNumberish, + amountOutMin: BigNumberish, + path: string[], + to: string, + deadline: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + swapExactTokensForTokens( + amountIn: BigNumberish, + amountOutMin: BigNumberish, + path: string[], + to: string, + deadline: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + swapTokensForExactETH( + amountOut: BigNumberish, + amountInMax: BigNumberish, + path: string[], + to: string, + deadline: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + swapTokensForExactTokens( + amountOut: BigNumberish, + amountInMax: BigNumberish, + path: string[], + to: string, + deadline: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + }; + + WETH(overrides?: CallOverrides): Promise; + + addLiquidity( + tokenA: string, + tokenB: string, + amountADesired: BigNumberish, + amountBDesired: BigNumberish, + amountAMin: BigNumberish, + amountBMin: BigNumberish, + to: string, + deadline: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + addLiquidityETH( + token: string, + amountTokenDesired: BigNumberish, + amountTokenMin: BigNumberish, + amountETHMin: BigNumberish, + to: string, + deadline: BigNumberish, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + + factory(overrides?: CallOverrides): Promise; + + getAmountIn( + amountOut: BigNumberish, + reserveIn: BigNumberish, + reserveOut: BigNumberish, + overrides?: CallOverrides + ): Promise; + + getAmountOut( + amountIn: BigNumberish, + reserveIn: BigNumberish, + reserveOut: BigNumberish, + overrides?: CallOverrides + ): Promise; + + getAmountsIn( + amountOut: BigNumberish, + path: string[], + overrides?: CallOverrides + ): Promise; + + getAmountsOut( + amountIn: BigNumberish, + path: string[], + overrides?: CallOverrides + ): Promise; + + quote( + amountA: BigNumberish, + reserveA: BigNumberish, + reserveB: BigNumberish, + overrides?: CallOverrides + ): Promise; + + removeLiquidity( + tokenA: string, + tokenB: string, + liquidity: BigNumberish, + amountAMin: BigNumberish, + amountBMin: BigNumberish, + to: string, + deadline: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + removeLiquidityETH( + token: string, + liquidity: BigNumberish, + amountTokenMin: BigNumberish, + amountETHMin: BigNumberish, + to: string, + deadline: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + removeLiquidityETHWithPermit( + token: string, + liquidity: BigNumberish, + amountTokenMin: BigNumberish, + amountETHMin: BigNumberish, + to: string, + deadline: BigNumberish, + approveMax: boolean, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + removeLiquidityWithPermit( + tokenA: string, + tokenB: string, + liquidity: BigNumberish, + amountAMin: BigNumberish, + amountBMin: BigNumberish, + to: string, + deadline: BigNumberish, + approveMax: boolean, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + swapETHForExactTokens( + amountOut: BigNumberish, + path: string[], + to: string, + deadline: BigNumberish, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + + swapExactETHForTokens( + amountOutMin: BigNumberish, + path: string[], + to: string, + deadline: BigNumberish, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + + swapExactTokensForETH( + amountIn: BigNumberish, + amountOutMin: BigNumberish, + path: string[], + to: string, + deadline: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + swapExactTokensForTokens( + amountIn: BigNumberish, + amountOutMin: BigNumberish, + path: string[], + to: string, + deadline: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + swapTokensForExactETH( + amountOut: BigNumberish, + amountInMax: BigNumberish, + path: string[], + to: string, + deadline: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + swapTokensForExactTokens( + amountOut: BigNumberish, + amountInMax: BigNumberish, + path: string[], + to: string, + deadline: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + callStatic: { + WETH(overrides?: CallOverrides): Promise; + + addLiquidity( + tokenA: string, + tokenB: string, + amountADesired: BigNumberish, + amountBDesired: BigNumberish, + amountAMin: BigNumberish, + amountBMin: BigNumberish, + to: string, + deadline: BigNumberish, + overrides?: CallOverrides + ): Promise< + [BigNumber, BigNumber, BigNumber] & { + amountA: BigNumber; + amountB: BigNumber; + liquidity: BigNumber; + } + >; + + addLiquidityETH( + token: string, + amountTokenDesired: BigNumberish, + amountTokenMin: BigNumberish, + amountETHMin: BigNumberish, + to: string, + deadline: BigNumberish, + overrides?: CallOverrides + ): Promise< + [BigNumber, BigNumber, BigNumber] & { + amountToken: BigNumber; + amountETH: BigNumber; + liquidity: BigNumber; + } + >; + + factory(overrides?: CallOverrides): Promise; + + getAmountIn( + amountOut: BigNumberish, + reserveIn: BigNumberish, + reserveOut: BigNumberish, + overrides?: CallOverrides + ): Promise; + + getAmountOut( + amountIn: BigNumberish, + reserveIn: BigNumberish, + reserveOut: BigNumberish, + overrides?: CallOverrides + ): Promise; + + getAmountsIn( + amountOut: BigNumberish, + path: string[], + overrides?: CallOverrides + ): Promise; + + getAmountsOut( + amountIn: BigNumberish, + path: string[], + overrides?: CallOverrides + ): Promise; + + quote( + amountA: BigNumberish, + reserveA: BigNumberish, + reserveB: BigNumberish, + overrides?: CallOverrides + ): Promise; + + removeLiquidity( + tokenA: string, + tokenB: string, + liquidity: BigNumberish, + amountAMin: BigNumberish, + amountBMin: BigNumberish, + to: string, + deadline: BigNumberish, + overrides?: CallOverrides + ): Promise< + [BigNumber, BigNumber] & { amountA: BigNumber; amountB: BigNumber } + >; + + removeLiquidityETH( + token: string, + liquidity: BigNumberish, + amountTokenMin: BigNumberish, + amountETHMin: BigNumberish, + to: string, + deadline: BigNumberish, + overrides?: CallOverrides + ): Promise< + [BigNumber, BigNumber] & { amountToken: BigNumber; amountETH: BigNumber } + >; + + removeLiquidityETHWithPermit( + token: string, + liquidity: BigNumberish, + amountTokenMin: BigNumberish, + amountETHMin: BigNumberish, + to: string, + deadline: BigNumberish, + approveMax: boolean, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: CallOverrides + ): Promise< + [BigNumber, BigNumber] & { amountToken: BigNumber; amountETH: BigNumber } + >; + + removeLiquidityWithPermit( + tokenA: string, + tokenB: string, + liquidity: BigNumberish, + amountAMin: BigNumberish, + amountBMin: BigNumberish, + to: string, + deadline: BigNumberish, + approveMax: boolean, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: CallOverrides + ): Promise< + [BigNumber, BigNumber] & { amountA: BigNumber; amountB: BigNumber } + >; + + swapETHForExactTokens( + amountOut: BigNumberish, + path: string[], + to: string, + deadline: BigNumberish, + overrides?: CallOverrides + ): Promise; + + swapExactETHForTokens( + amountOutMin: BigNumberish, + path: string[], + to: string, + deadline: BigNumberish, + overrides?: CallOverrides + ): Promise; + + swapExactTokensForETH( + amountIn: BigNumberish, + amountOutMin: BigNumberish, + path: string[], + to: string, + deadline: BigNumberish, + overrides?: CallOverrides + ): Promise; + + swapExactTokensForTokens( + amountIn: BigNumberish, + amountOutMin: BigNumberish, + path: string[], + to: string, + deadline: BigNumberish, + overrides?: CallOverrides + ): Promise; + + swapTokensForExactETH( + amountOut: BigNumberish, + amountInMax: BigNumberish, + path: string[], + to: string, + deadline: BigNumberish, + overrides?: CallOverrides + ): Promise; + + swapTokensForExactTokens( + amountOut: BigNumberish, + amountInMax: BigNumberish, + path: string[], + to: string, + deadline: BigNumberish, + overrides?: CallOverrides + ): Promise; + }; + + filters: {}; + + estimateGas: { + WETH(overrides?: CallOverrides): Promise; + + addLiquidity( + tokenA: string, + tokenB: string, + amountADesired: BigNumberish, + amountBDesired: BigNumberish, + amountAMin: BigNumberish, + amountBMin: BigNumberish, + to: string, + deadline: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + addLiquidityETH( + token: string, + amountTokenDesired: BigNumberish, + amountTokenMin: BigNumberish, + amountETHMin: BigNumberish, + to: string, + deadline: BigNumberish, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + + factory(overrides?: CallOverrides): Promise; + + getAmountIn( + amountOut: BigNumberish, + reserveIn: BigNumberish, + reserveOut: BigNumberish, + overrides?: CallOverrides + ): Promise; + + getAmountOut( + amountIn: BigNumberish, + reserveIn: BigNumberish, + reserveOut: BigNumberish, + overrides?: CallOverrides + ): Promise; + + getAmountsIn( + amountOut: BigNumberish, + path: string[], + overrides?: CallOverrides + ): Promise; + + getAmountsOut( + amountIn: BigNumberish, + path: string[], + overrides?: CallOverrides + ): Promise; + + quote( + amountA: BigNumberish, + reserveA: BigNumberish, + reserveB: BigNumberish, + overrides?: CallOverrides + ): Promise; + + removeLiquidity( + tokenA: string, + tokenB: string, + liquidity: BigNumberish, + amountAMin: BigNumberish, + amountBMin: BigNumberish, + to: string, + deadline: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + removeLiquidityETH( + token: string, + liquidity: BigNumberish, + amountTokenMin: BigNumberish, + amountETHMin: BigNumberish, + to: string, + deadline: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + removeLiquidityETHWithPermit( + token: string, + liquidity: BigNumberish, + amountTokenMin: BigNumberish, + amountETHMin: BigNumberish, + to: string, + deadline: BigNumberish, + approveMax: boolean, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + removeLiquidityWithPermit( + tokenA: string, + tokenB: string, + liquidity: BigNumberish, + amountAMin: BigNumberish, + amountBMin: BigNumberish, + to: string, + deadline: BigNumberish, + approveMax: boolean, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + swapETHForExactTokens( + amountOut: BigNumberish, + path: string[], + to: string, + deadline: BigNumberish, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + + swapExactETHForTokens( + amountOutMin: BigNumberish, + path: string[], + to: string, + deadline: BigNumberish, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + + swapExactTokensForETH( + amountIn: BigNumberish, + amountOutMin: BigNumberish, + path: string[], + to: string, + deadline: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + swapExactTokensForTokens( + amountIn: BigNumberish, + amountOutMin: BigNumberish, + path: string[], + to: string, + deadline: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + swapTokensForExactETH( + amountOut: BigNumberish, + amountInMax: BigNumberish, + path: string[], + to: string, + deadline: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + swapTokensForExactTokens( + amountOut: BigNumberish, + amountInMax: BigNumberish, + path: string[], + to: string, + deadline: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + }; + + populateTransaction: { + WETH(overrides?: CallOverrides): Promise; + + addLiquidity( + tokenA: string, + tokenB: string, + amountADesired: BigNumberish, + amountBDesired: BigNumberish, + amountAMin: BigNumberish, + amountBMin: BigNumberish, + to: string, + deadline: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + addLiquidityETH( + token: string, + amountTokenDesired: BigNumberish, + amountTokenMin: BigNumberish, + amountETHMin: BigNumberish, + to: string, + deadline: BigNumberish, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + + factory(overrides?: CallOverrides): Promise; + + getAmountIn( + amountOut: BigNumberish, + reserveIn: BigNumberish, + reserveOut: BigNumberish, + overrides?: CallOverrides + ): Promise; + + getAmountOut( + amountIn: BigNumberish, + reserveIn: BigNumberish, + reserveOut: BigNumberish, + overrides?: CallOverrides + ): Promise; + + getAmountsIn( + amountOut: BigNumberish, + path: string[], + overrides?: CallOverrides + ): Promise; + + getAmountsOut( + amountIn: BigNumberish, + path: string[], + overrides?: CallOverrides + ): Promise; + + quote( + amountA: BigNumberish, + reserveA: BigNumberish, + reserveB: BigNumberish, + overrides?: CallOverrides + ): Promise; + + removeLiquidity( + tokenA: string, + tokenB: string, + liquidity: BigNumberish, + amountAMin: BigNumberish, + amountBMin: BigNumberish, + to: string, + deadline: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + removeLiquidityETH( + token: string, + liquidity: BigNumberish, + amountTokenMin: BigNumberish, + amountETHMin: BigNumberish, + to: string, + deadline: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + removeLiquidityETHWithPermit( + token: string, + liquidity: BigNumberish, + amountTokenMin: BigNumberish, + amountETHMin: BigNumberish, + to: string, + deadline: BigNumberish, + approveMax: boolean, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + removeLiquidityWithPermit( + tokenA: string, + tokenB: string, + liquidity: BigNumberish, + amountAMin: BigNumberish, + amountBMin: BigNumberish, + to: string, + deadline: BigNumberish, + approveMax: boolean, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + swapETHForExactTokens( + amountOut: BigNumberish, + path: string[], + to: string, + deadline: BigNumberish, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + + swapExactETHForTokens( + amountOutMin: BigNumberish, + path: string[], + to: string, + deadline: BigNumberish, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + + swapExactTokensForETH( + amountIn: BigNumberish, + amountOutMin: BigNumberish, + path: string[], + to: string, + deadline: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + swapExactTokensForTokens( + amountIn: BigNumberish, + amountOutMin: BigNumberish, + path: string[], + to: string, + deadline: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + swapTokensForExactETH( + amountOut: BigNumberish, + amountInMax: BigNumberish, + path: string[], + to: string, + deadline: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + swapTokensForExactTokens( + amountOut: BigNumberish, + amountInMax: BigNumberish, + path: string[], + to: string, + deadline: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + }; +} diff --git a/packages/interfaces/typechain-types/@uniswap/v2-periphery/contracts/interfaces/IUniswapV2Router02.ts b/packages/interfaces/typechain-types/@uniswap/v2-periphery/contracts/interfaces/IUniswapV2Router02.ts new file mode 100644 index 00000000..2a9ed54f --- /dev/null +++ b/packages/interfaces/typechain-types/@uniswap/v2-periphery/contracts/interfaces/IUniswapV2Router02.ts @@ -0,0 +1,1446 @@ +/* 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 } from "@ethersproject/abi"; +import type { Listener, Provider } from "@ethersproject/providers"; +import type { + TypedEventFilter, + TypedEvent, + TypedListener, + OnEvent, +} from "../../../../common"; + +export interface IUniswapV2Router02Interface extends utils.Interface { + functions: { + "WETH()": FunctionFragment; + "addLiquidity(address,address,uint256,uint256,uint256,uint256,address,uint256)": FunctionFragment; + "addLiquidityETH(address,uint256,uint256,uint256,address,uint256)": FunctionFragment; + "factory()": FunctionFragment; + "getAmountIn(uint256,uint256,uint256)": FunctionFragment; + "getAmountOut(uint256,uint256,uint256)": FunctionFragment; + "getAmountsIn(uint256,address[])": FunctionFragment; + "getAmountsOut(uint256,address[])": FunctionFragment; + "quote(uint256,uint256,uint256)": FunctionFragment; + "removeLiquidity(address,address,uint256,uint256,uint256,address,uint256)": FunctionFragment; + "removeLiquidityETH(address,uint256,uint256,uint256,address,uint256)": FunctionFragment; + "removeLiquidityETHSupportingFeeOnTransferTokens(address,uint256,uint256,uint256,address,uint256)": FunctionFragment; + "removeLiquidityETHWithPermit(address,uint256,uint256,uint256,address,uint256,bool,uint8,bytes32,bytes32)": FunctionFragment; + "removeLiquidityETHWithPermitSupportingFeeOnTransferTokens(address,uint256,uint256,uint256,address,uint256,bool,uint8,bytes32,bytes32)": FunctionFragment; + "removeLiquidityWithPermit(address,address,uint256,uint256,uint256,address,uint256,bool,uint8,bytes32,bytes32)": FunctionFragment; + "swapETHForExactTokens(uint256,address[],address,uint256)": FunctionFragment; + "swapExactETHForTokens(uint256,address[],address,uint256)": FunctionFragment; + "swapExactETHForTokensSupportingFeeOnTransferTokens(uint256,address[],address,uint256)": FunctionFragment; + "swapExactTokensForETH(uint256,uint256,address[],address,uint256)": FunctionFragment; + "swapExactTokensForETHSupportingFeeOnTransferTokens(uint256,uint256,address[],address,uint256)": FunctionFragment; + "swapExactTokensForTokens(uint256,uint256,address[],address,uint256)": FunctionFragment; + "swapExactTokensForTokensSupportingFeeOnTransferTokens(uint256,uint256,address[],address,uint256)": FunctionFragment; + "swapTokensForExactETH(uint256,uint256,address[],address,uint256)": FunctionFragment; + "swapTokensForExactTokens(uint256,uint256,address[],address,uint256)": FunctionFragment; + }; + + getFunction( + nameOrSignatureOrTopic: + | "WETH" + | "addLiquidity" + | "addLiquidityETH" + | "factory" + | "getAmountIn" + | "getAmountOut" + | "getAmountsIn" + | "getAmountsOut" + | "quote" + | "removeLiquidity" + | "removeLiquidityETH" + | "removeLiquidityETHSupportingFeeOnTransferTokens" + | "removeLiquidityETHWithPermit" + | "removeLiquidityETHWithPermitSupportingFeeOnTransferTokens" + | "removeLiquidityWithPermit" + | "swapETHForExactTokens" + | "swapExactETHForTokens" + | "swapExactETHForTokensSupportingFeeOnTransferTokens" + | "swapExactTokensForETH" + | "swapExactTokensForETHSupportingFeeOnTransferTokens" + | "swapExactTokensForTokens" + | "swapExactTokensForTokensSupportingFeeOnTransferTokens" + | "swapTokensForExactETH" + | "swapTokensForExactTokens" + ): FunctionFragment; + + encodeFunctionData(functionFragment: "WETH", values?: undefined): string; + encodeFunctionData( + functionFragment: "addLiquidity", + values: [ + string, + string, + BigNumberish, + BigNumberish, + BigNumberish, + BigNumberish, + string, + BigNumberish + ] + ): string; + encodeFunctionData( + functionFragment: "addLiquidityETH", + values: [ + string, + BigNumberish, + BigNumberish, + BigNumberish, + string, + BigNumberish + ] + ): string; + encodeFunctionData(functionFragment: "factory", values?: undefined): string; + encodeFunctionData( + functionFragment: "getAmountIn", + values: [BigNumberish, BigNumberish, BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "getAmountOut", + values: [BigNumberish, BigNumberish, BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "getAmountsIn", + values: [BigNumberish, string[]] + ): string; + encodeFunctionData( + functionFragment: "getAmountsOut", + values: [BigNumberish, string[]] + ): string; + encodeFunctionData( + functionFragment: "quote", + values: [BigNumberish, BigNumberish, BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "removeLiquidity", + values: [ + string, + string, + BigNumberish, + BigNumberish, + BigNumberish, + string, + BigNumberish + ] + ): string; + encodeFunctionData( + functionFragment: "removeLiquidityETH", + values: [ + string, + BigNumberish, + BigNumberish, + BigNumberish, + string, + BigNumberish + ] + ): string; + encodeFunctionData( + functionFragment: "removeLiquidityETHSupportingFeeOnTransferTokens", + values: [ + string, + BigNumberish, + BigNumberish, + BigNumberish, + string, + BigNumberish + ] + ): string; + encodeFunctionData( + functionFragment: "removeLiquidityETHWithPermit", + values: [ + string, + BigNumberish, + BigNumberish, + BigNumberish, + string, + BigNumberish, + boolean, + BigNumberish, + BytesLike, + BytesLike + ] + ): string; + encodeFunctionData( + functionFragment: "removeLiquidityETHWithPermitSupportingFeeOnTransferTokens", + values: [ + string, + BigNumberish, + BigNumberish, + BigNumberish, + string, + BigNumberish, + boolean, + BigNumberish, + BytesLike, + BytesLike + ] + ): string; + encodeFunctionData( + functionFragment: "removeLiquidityWithPermit", + values: [ + string, + string, + BigNumberish, + BigNumberish, + BigNumberish, + string, + BigNumberish, + boolean, + BigNumberish, + BytesLike, + BytesLike + ] + ): string; + encodeFunctionData( + functionFragment: "swapETHForExactTokens", + values: [BigNumberish, string[], string, BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "swapExactETHForTokens", + values: [BigNumberish, string[], string, BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "swapExactETHForTokensSupportingFeeOnTransferTokens", + values: [BigNumberish, string[], string, BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "swapExactTokensForETH", + values: [BigNumberish, BigNumberish, string[], string, BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "swapExactTokensForETHSupportingFeeOnTransferTokens", + values: [BigNumberish, BigNumberish, string[], string, BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "swapExactTokensForTokens", + values: [BigNumberish, BigNumberish, string[], string, BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "swapExactTokensForTokensSupportingFeeOnTransferTokens", + values: [BigNumberish, BigNumberish, string[], string, BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "swapTokensForExactETH", + values: [BigNumberish, BigNumberish, string[], string, BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "swapTokensForExactTokens", + values: [BigNumberish, BigNumberish, string[], string, BigNumberish] + ): string; + + decodeFunctionResult(functionFragment: "WETH", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "addLiquidity", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "addLiquidityETH", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "factory", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "getAmountIn", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "getAmountOut", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "getAmountsIn", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "getAmountsOut", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "quote", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "removeLiquidity", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "removeLiquidityETH", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "removeLiquidityETHSupportingFeeOnTransferTokens", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "removeLiquidityETHWithPermit", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "removeLiquidityETHWithPermitSupportingFeeOnTransferTokens", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "removeLiquidityWithPermit", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "swapETHForExactTokens", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "swapExactETHForTokens", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "swapExactETHForTokensSupportingFeeOnTransferTokens", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "swapExactTokensForETH", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "swapExactTokensForETHSupportingFeeOnTransferTokens", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "swapExactTokensForTokens", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "swapExactTokensForTokensSupportingFeeOnTransferTokens", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "swapTokensForExactETH", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "swapTokensForExactTokens", + data: BytesLike + ): Result; + + events: {}; +} + +export interface IUniswapV2Router02 extends BaseContract { + connect(signerOrProvider: Signer | Provider | string): this; + attach(addressOrName: string): this; + deployed(): Promise; + + interface: IUniswapV2Router02Interface; + + 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: { + WETH(overrides?: CallOverrides): Promise<[string]>; + + addLiquidity( + tokenA: string, + tokenB: string, + amountADesired: BigNumberish, + amountBDesired: BigNumberish, + amountAMin: BigNumberish, + amountBMin: BigNumberish, + to: string, + deadline: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + addLiquidityETH( + token: string, + amountTokenDesired: BigNumberish, + amountTokenMin: BigNumberish, + amountETHMin: BigNumberish, + to: string, + deadline: BigNumberish, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + + factory(overrides?: CallOverrides): Promise<[string]>; + + getAmountIn( + amountOut: BigNumberish, + reserveIn: BigNumberish, + reserveOut: BigNumberish, + overrides?: CallOverrides + ): Promise<[BigNumber] & { amountIn: BigNumber }>; + + getAmountOut( + amountIn: BigNumberish, + reserveIn: BigNumberish, + reserveOut: BigNumberish, + overrides?: CallOverrides + ): Promise<[BigNumber] & { amountOut: BigNumber }>; + + getAmountsIn( + amountOut: BigNumberish, + path: string[], + overrides?: CallOverrides + ): Promise<[BigNumber[]] & { amounts: BigNumber[] }>; + + getAmountsOut( + amountIn: BigNumberish, + path: string[], + overrides?: CallOverrides + ): Promise<[BigNumber[]] & { amounts: BigNumber[] }>; + + quote( + amountA: BigNumberish, + reserveA: BigNumberish, + reserveB: BigNumberish, + overrides?: CallOverrides + ): Promise<[BigNumber] & { amountB: BigNumber }>; + + removeLiquidity( + tokenA: string, + tokenB: string, + liquidity: BigNumberish, + amountAMin: BigNumberish, + amountBMin: BigNumberish, + to: string, + deadline: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + removeLiquidityETH( + token: string, + liquidity: BigNumberish, + amountTokenMin: BigNumberish, + amountETHMin: BigNumberish, + to: string, + deadline: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + removeLiquidityETHSupportingFeeOnTransferTokens( + token: string, + liquidity: BigNumberish, + amountTokenMin: BigNumberish, + amountETHMin: BigNumberish, + to: string, + deadline: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + removeLiquidityETHWithPermit( + token: string, + liquidity: BigNumberish, + amountTokenMin: BigNumberish, + amountETHMin: BigNumberish, + to: string, + deadline: BigNumberish, + approveMax: boolean, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + removeLiquidityETHWithPermitSupportingFeeOnTransferTokens( + token: string, + liquidity: BigNumberish, + amountTokenMin: BigNumberish, + amountETHMin: BigNumberish, + to: string, + deadline: BigNumberish, + approveMax: boolean, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + removeLiquidityWithPermit( + tokenA: string, + tokenB: string, + liquidity: BigNumberish, + amountAMin: BigNumberish, + amountBMin: BigNumberish, + to: string, + deadline: BigNumberish, + approveMax: boolean, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + swapETHForExactTokens( + amountOut: BigNumberish, + path: string[], + to: string, + deadline: BigNumberish, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + + swapExactETHForTokens( + amountOutMin: BigNumberish, + path: string[], + to: string, + deadline: BigNumberish, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + + swapExactETHForTokensSupportingFeeOnTransferTokens( + amountOutMin: BigNumberish, + path: string[], + to: string, + deadline: BigNumberish, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + + swapExactTokensForETH( + amountIn: BigNumberish, + amountOutMin: BigNumberish, + path: string[], + to: string, + deadline: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + swapExactTokensForETHSupportingFeeOnTransferTokens( + amountIn: BigNumberish, + amountOutMin: BigNumberish, + path: string[], + to: string, + deadline: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + swapExactTokensForTokens( + amountIn: BigNumberish, + amountOutMin: BigNumberish, + path: string[], + to: string, + deadline: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + swapExactTokensForTokensSupportingFeeOnTransferTokens( + amountIn: BigNumberish, + amountOutMin: BigNumberish, + path: string[], + to: string, + deadline: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + swapTokensForExactETH( + amountOut: BigNumberish, + amountInMax: BigNumberish, + path: string[], + to: string, + deadline: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + swapTokensForExactTokens( + amountOut: BigNumberish, + amountInMax: BigNumberish, + path: string[], + to: string, + deadline: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + }; + + WETH(overrides?: CallOverrides): Promise; + + addLiquidity( + tokenA: string, + tokenB: string, + amountADesired: BigNumberish, + amountBDesired: BigNumberish, + amountAMin: BigNumberish, + amountBMin: BigNumberish, + to: string, + deadline: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + addLiquidityETH( + token: string, + amountTokenDesired: BigNumberish, + amountTokenMin: BigNumberish, + amountETHMin: BigNumberish, + to: string, + deadline: BigNumberish, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + + factory(overrides?: CallOverrides): Promise; + + getAmountIn( + amountOut: BigNumberish, + reserveIn: BigNumberish, + reserveOut: BigNumberish, + overrides?: CallOverrides + ): Promise; + + getAmountOut( + amountIn: BigNumberish, + reserveIn: BigNumberish, + reserveOut: BigNumberish, + overrides?: CallOverrides + ): Promise; + + getAmountsIn( + amountOut: BigNumberish, + path: string[], + overrides?: CallOverrides + ): Promise; + + getAmountsOut( + amountIn: BigNumberish, + path: string[], + overrides?: CallOverrides + ): Promise; + + quote( + amountA: BigNumberish, + reserveA: BigNumberish, + reserveB: BigNumberish, + overrides?: CallOverrides + ): Promise; + + removeLiquidity( + tokenA: string, + tokenB: string, + liquidity: BigNumberish, + amountAMin: BigNumberish, + amountBMin: BigNumberish, + to: string, + deadline: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + removeLiquidityETH( + token: string, + liquidity: BigNumberish, + amountTokenMin: BigNumberish, + amountETHMin: BigNumberish, + to: string, + deadline: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + removeLiquidityETHSupportingFeeOnTransferTokens( + token: string, + liquidity: BigNumberish, + amountTokenMin: BigNumberish, + amountETHMin: BigNumberish, + to: string, + deadline: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + removeLiquidityETHWithPermit( + token: string, + liquidity: BigNumberish, + amountTokenMin: BigNumberish, + amountETHMin: BigNumberish, + to: string, + deadline: BigNumberish, + approveMax: boolean, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + removeLiquidityETHWithPermitSupportingFeeOnTransferTokens( + token: string, + liquidity: BigNumberish, + amountTokenMin: BigNumberish, + amountETHMin: BigNumberish, + to: string, + deadline: BigNumberish, + approveMax: boolean, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + removeLiquidityWithPermit( + tokenA: string, + tokenB: string, + liquidity: BigNumberish, + amountAMin: BigNumberish, + amountBMin: BigNumberish, + to: string, + deadline: BigNumberish, + approveMax: boolean, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + swapETHForExactTokens( + amountOut: BigNumberish, + path: string[], + to: string, + deadline: BigNumberish, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + + swapExactETHForTokens( + amountOutMin: BigNumberish, + path: string[], + to: string, + deadline: BigNumberish, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + + swapExactETHForTokensSupportingFeeOnTransferTokens( + amountOutMin: BigNumberish, + path: string[], + to: string, + deadline: BigNumberish, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + + swapExactTokensForETH( + amountIn: BigNumberish, + amountOutMin: BigNumberish, + path: string[], + to: string, + deadline: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + swapExactTokensForETHSupportingFeeOnTransferTokens( + amountIn: BigNumberish, + amountOutMin: BigNumberish, + path: string[], + to: string, + deadline: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + swapExactTokensForTokens( + amountIn: BigNumberish, + amountOutMin: BigNumberish, + path: string[], + to: string, + deadline: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + swapExactTokensForTokensSupportingFeeOnTransferTokens( + amountIn: BigNumberish, + amountOutMin: BigNumberish, + path: string[], + to: string, + deadline: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + swapTokensForExactETH( + amountOut: BigNumberish, + amountInMax: BigNumberish, + path: string[], + to: string, + deadline: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + swapTokensForExactTokens( + amountOut: BigNumberish, + amountInMax: BigNumberish, + path: string[], + to: string, + deadline: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + callStatic: { + WETH(overrides?: CallOverrides): Promise; + + addLiquidity( + tokenA: string, + tokenB: string, + amountADesired: BigNumberish, + amountBDesired: BigNumberish, + amountAMin: BigNumberish, + amountBMin: BigNumberish, + to: string, + deadline: BigNumberish, + overrides?: CallOverrides + ): Promise< + [BigNumber, BigNumber, BigNumber] & { + amountA: BigNumber; + amountB: BigNumber; + liquidity: BigNumber; + } + >; + + addLiquidityETH( + token: string, + amountTokenDesired: BigNumberish, + amountTokenMin: BigNumberish, + amountETHMin: BigNumberish, + to: string, + deadline: BigNumberish, + overrides?: CallOverrides + ): Promise< + [BigNumber, BigNumber, BigNumber] & { + amountToken: BigNumber; + amountETH: BigNumber; + liquidity: BigNumber; + } + >; + + factory(overrides?: CallOverrides): Promise; + + getAmountIn( + amountOut: BigNumberish, + reserveIn: BigNumberish, + reserveOut: BigNumberish, + overrides?: CallOverrides + ): Promise; + + getAmountOut( + amountIn: BigNumberish, + reserveIn: BigNumberish, + reserveOut: BigNumberish, + overrides?: CallOverrides + ): Promise; + + getAmountsIn( + amountOut: BigNumberish, + path: string[], + overrides?: CallOverrides + ): Promise; + + getAmountsOut( + amountIn: BigNumberish, + path: string[], + overrides?: CallOverrides + ): Promise; + + quote( + amountA: BigNumberish, + reserveA: BigNumberish, + reserveB: BigNumberish, + overrides?: CallOverrides + ): Promise; + + removeLiquidity( + tokenA: string, + tokenB: string, + liquidity: BigNumberish, + amountAMin: BigNumberish, + amountBMin: BigNumberish, + to: string, + deadline: BigNumberish, + overrides?: CallOverrides + ): Promise< + [BigNumber, BigNumber] & { amountA: BigNumber; amountB: BigNumber } + >; + + removeLiquidityETH( + token: string, + liquidity: BigNumberish, + amountTokenMin: BigNumberish, + amountETHMin: BigNumberish, + to: string, + deadline: BigNumberish, + overrides?: CallOverrides + ): Promise< + [BigNumber, BigNumber] & { amountToken: BigNumber; amountETH: BigNumber } + >; + + removeLiquidityETHSupportingFeeOnTransferTokens( + token: string, + liquidity: BigNumberish, + amountTokenMin: BigNumberish, + amountETHMin: BigNumberish, + to: string, + deadline: BigNumberish, + overrides?: CallOverrides + ): Promise; + + removeLiquidityETHWithPermit( + token: string, + liquidity: BigNumberish, + amountTokenMin: BigNumberish, + amountETHMin: BigNumberish, + to: string, + deadline: BigNumberish, + approveMax: boolean, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: CallOverrides + ): Promise< + [BigNumber, BigNumber] & { amountToken: BigNumber; amountETH: BigNumber } + >; + + removeLiquidityETHWithPermitSupportingFeeOnTransferTokens( + token: string, + liquidity: BigNumberish, + amountTokenMin: BigNumberish, + amountETHMin: BigNumberish, + to: string, + deadline: BigNumberish, + approveMax: boolean, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: CallOverrides + ): Promise; + + removeLiquidityWithPermit( + tokenA: string, + tokenB: string, + liquidity: BigNumberish, + amountAMin: BigNumberish, + amountBMin: BigNumberish, + to: string, + deadline: BigNumberish, + approveMax: boolean, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: CallOverrides + ): Promise< + [BigNumber, BigNumber] & { amountA: BigNumber; amountB: BigNumber } + >; + + swapETHForExactTokens( + amountOut: BigNumberish, + path: string[], + to: string, + deadline: BigNumberish, + overrides?: CallOverrides + ): Promise; + + swapExactETHForTokens( + amountOutMin: BigNumberish, + path: string[], + to: string, + deadline: BigNumberish, + overrides?: CallOverrides + ): Promise; + + swapExactETHForTokensSupportingFeeOnTransferTokens( + amountOutMin: BigNumberish, + path: string[], + to: string, + deadline: BigNumberish, + overrides?: CallOverrides + ): Promise; + + swapExactTokensForETH( + amountIn: BigNumberish, + amountOutMin: BigNumberish, + path: string[], + to: string, + deadline: BigNumberish, + overrides?: CallOverrides + ): Promise; + + swapExactTokensForETHSupportingFeeOnTransferTokens( + amountIn: BigNumberish, + amountOutMin: BigNumberish, + path: string[], + to: string, + deadline: BigNumberish, + overrides?: CallOverrides + ): Promise; + + swapExactTokensForTokens( + amountIn: BigNumberish, + amountOutMin: BigNumberish, + path: string[], + to: string, + deadline: BigNumberish, + overrides?: CallOverrides + ): Promise; + + swapExactTokensForTokensSupportingFeeOnTransferTokens( + amountIn: BigNumberish, + amountOutMin: BigNumberish, + path: string[], + to: string, + deadline: BigNumberish, + overrides?: CallOverrides + ): Promise; + + swapTokensForExactETH( + amountOut: BigNumberish, + amountInMax: BigNumberish, + path: string[], + to: string, + deadline: BigNumberish, + overrides?: CallOverrides + ): Promise; + + swapTokensForExactTokens( + amountOut: BigNumberish, + amountInMax: BigNumberish, + path: string[], + to: string, + deadline: BigNumberish, + overrides?: CallOverrides + ): Promise; + }; + + filters: {}; + + estimateGas: { + WETH(overrides?: CallOverrides): Promise; + + addLiquidity( + tokenA: string, + tokenB: string, + amountADesired: BigNumberish, + amountBDesired: BigNumberish, + amountAMin: BigNumberish, + amountBMin: BigNumberish, + to: string, + deadline: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + addLiquidityETH( + token: string, + amountTokenDesired: BigNumberish, + amountTokenMin: BigNumberish, + amountETHMin: BigNumberish, + to: string, + deadline: BigNumberish, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + + factory(overrides?: CallOverrides): Promise; + + getAmountIn( + amountOut: BigNumberish, + reserveIn: BigNumberish, + reserveOut: BigNumberish, + overrides?: CallOverrides + ): Promise; + + getAmountOut( + amountIn: BigNumberish, + reserveIn: BigNumberish, + reserveOut: BigNumberish, + overrides?: CallOverrides + ): Promise; + + getAmountsIn( + amountOut: BigNumberish, + path: string[], + overrides?: CallOverrides + ): Promise; + + getAmountsOut( + amountIn: BigNumberish, + path: string[], + overrides?: CallOverrides + ): Promise; + + quote( + amountA: BigNumberish, + reserveA: BigNumberish, + reserveB: BigNumberish, + overrides?: CallOverrides + ): Promise; + + removeLiquidity( + tokenA: string, + tokenB: string, + liquidity: BigNumberish, + amountAMin: BigNumberish, + amountBMin: BigNumberish, + to: string, + deadline: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + removeLiquidityETH( + token: string, + liquidity: BigNumberish, + amountTokenMin: BigNumberish, + amountETHMin: BigNumberish, + to: string, + deadline: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + removeLiquidityETHSupportingFeeOnTransferTokens( + token: string, + liquidity: BigNumberish, + amountTokenMin: BigNumberish, + amountETHMin: BigNumberish, + to: string, + deadline: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + removeLiquidityETHWithPermit( + token: string, + liquidity: BigNumberish, + amountTokenMin: BigNumberish, + amountETHMin: BigNumberish, + to: string, + deadline: BigNumberish, + approveMax: boolean, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + removeLiquidityETHWithPermitSupportingFeeOnTransferTokens( + token: string, + liquidity: BigNumberish, + amountTokenMin: BigNumberish, + amountETHMin: BigNumberish, + to: string, + deadline: BigNumberish, + approveMax: boolean, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + removeLiquidityWithPermit( + tokenA: string, + tokenB: string, + liquidity: BigNumberish, + amountAMin: BigNumberish, + amountBMin: BigNumberish, + to: string, + deadline: BigNumberish, + approveMax: boolean, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + swapETHForExactTokens( + amountOut: BigNumberish, + path: string[], + to: string, + deadline: BigNumberish, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + + swapExactETHForTokens( + amountOutMin: BigNumberish, + path: string[], + to: string, + deadline: BigNumberish, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + + swapExactETHForTokensSupportingFeeOnTransferTokens( + amountOutMin: BigNumberish, + path: string[], + to: string, + deadline: BigNumberish, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + + swapExactTokensForETH( + amountIn: BigNumberish, + amountOutMin: BigNumberish, + path: string[], + to: string, + deadline: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + swapExactTokensForETHSupportingFeeOnTransferTokens( + amountIn: BigNumberish, + amountOutMin: BigNumberish, + path: string[], + to: string, + deadline: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + swapExactTokensForTokens( + amountIn: BigNumberish, + amountOutMin: BigNumberish, + path: string[], + to: string, + deadline: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + swapExactTokensForTokensSupportingFeeOnTransferTokens( + amountIn: BigNumberish, + amountOutMin: BigNumberish, + path: string[], + to: string, + deadline: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + swapTokensForExactETH( + amountOut: BigNumberish, + amountInMax: BigNumberish, + path: string[], + to: string, + deadline: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + swapTokensForExactTokens( + amountOut: BigNumberish, + amountInMax: BigNumberish, + path: string[], + to: string, + deadline: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + }; + + populateTransaction: { + WETH(overrides?: CallOverrides): Promise; + + addLiquidity( + tokenA: string, + tokenB: string, + amountADesired: BigNumberish, + amountBDesired: BigNumberish, + amountAMin: BigNumberish, + amountBMin: BigNumberish, + to: string, + deadline: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + addLiquidityETH( + token: string, + amountTokenDesired: BigNumberish, + amountTokenMin: BigNumberish, + amountETHMin: BigNumberish, + to: string, + deadline: BigNumberish, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + + factory(overrides?: CallOverrides): Promise; + + getAmountIn( + amountOut: BigNumberish, + reserveIn: BigNumberish, + reserveOut: BigNumberish, + overrides?: CallOverrides + ): Promise; + + getAmountOut( + amountIn: BigNumberish, + reserveIn: BigNumberish, + reserveOut: BigNumberish, + overrides?: CallOverrides + ): Promise; + + getAmountsIn( + amountOut: BigNumberish, + path: string[], + overrides?: CallOverrides + ): Promise; + + getAmountsOut( + amountIn: BigNumberish, + path: string[], + overrides?: CallOverrides + ): Promise; + + quote( + amountA: BigNumberish, + reserveA: BigNumberish, + reserveB: BigNumberish, + overrides?: CallOverrides + ): Promise; + + removeLiquidity( + tokenA: string, + tokenB: string, + liquidity: BigNumberish, + amountAMin: BigNumberish, + amountBMin: BigNumberish, + to: string, + deadline: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + removeLiquidityETH( + token: string, + liquidity: BigNumberish, + amountTokenMin: BigNumberish, + amountETHMin: BigNumberish, + to: string, + deadline: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + removeLiquidityETHSupportingFeeOnTransferTokens( + token: string, + liquidity: BigNumberish, + amountTokenMin: BigNumberish, + amountETHMin: BigNumberish, + to: string, + deadline: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + removeLiquidityETHWithPermit( + token: string, + liquidity: BigNumberish, + amountTokenMin: BigNumberish, + amountETHMin: BigNumberish, + to: string, + deadline: BigNumberish, + approveMax: boolean, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + removeLiquidityETHWithPermitSupportingFeeOnTransferTokens( + token: string, + liquidity: BigNumberish, + amountTokenMin: BigNumberish, + amountETHMin: BigNumberish, + to: string, + deadline: BigNumberish, + approveMax: boolean, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + removeLiquidityWithPermit( + tokenA: string, + tokenB: string, + liquidity: BigNumberish, + amountAMin: BigNumberish, + amountBMin: BigNumberish, + to: string, + deadline: BigNumberish, + approveMax: boolean, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + swapETHForExactTokens( + amountOut: BigNumberish, + path: string[], + to: string, + deadline: BigNumberish, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + + swapExactETHForTokens( + amountOutMin: BigNumberish, + path: string[], + to: string, + deadline: BigNumberish, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + + swapExactETHForTokensSupportingFeeOnTransferTokens( + amountOutMin: BigNumberish, + path: string[], + to: string, + deadline: BigNumberish, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + + swapExactTokensForETH( + amountIn: BigNumberish, + amountOutMin: BigNumberish, + path: string[], + to: string, + deadline: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + swapExactTokensForETHSupportingFeeOnTransferTokens( + amountIn: BigNumberish, + amountOutMin: BigNumberish, + path: string[], + to: string, + deadline: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + swapExactTokensForTokens( + amountIn: BigNumberish, + amountOutMin: BigNumberish, + path: string[], + to: string, + deadline: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + swapExactTokensForTokensSupportingFeeOnTransferTokens( + amountIn: BigNumberish, + amountOutMin: BigNumberish, + path: string[], + to: string, + deadline: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + swapTokensForExactETH( + amountOut: BigNumberish, + amountInMax: BigNumberish, + path: string[], + to: string, + deadline: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + swapTokensForExactTokens( + amountOut: BigNumberish, + amountInMax: BigNumberish, + path: string[], + to: string, + deadline: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + }; +} diff --git a/packages/interfaces/typechain-types/@uniswap/v2-periphery/contracts/interfaces/IWETH.ts b/packages/interfaces/typechain-types/@uniswap/v2-periphery/contracts/interfaces/IWETH.ts new file mode 100644 index 00000000..faa73a92 --- /dev/null +++ b/packages/interfaces/typechain-types/@uniswap/v2-periphery/contracts/interfaces/IWETH.ts @@ -0,0 +1,159 @@ +/* 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 } from "@ethersproject/abi"; +import type { Listener, Provider } from "@ethersproject/providers"; +import type { + TypedEventFilter, + TypedEvent, + TypedListener, + OnEvent, +} from "../../../../common"; + +export interface IWETHInterface extends utils.Interface { + functions: { + "deposit()": FunctionFragment; + "transfer(address,uint256)": FunctionFragment; + "withdraw(uint256)": FunctionFragment; + }; + + getFunction( + nameOrSignatureOrTopic: "deposit" | "transfer" | "withdraw" + ): FunctionFragment; + + encodeFunctionData(functionFragment: "deposit", values?: undefined): string; + encodeFunctionData( + functionFragment: "transfer", + values: [string, BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "withdraw", + values: [BigNumberish] + ): string; + + decodeFunctionResult(functionFragment: "deposit", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "transfer", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "withdraw", data: BytesLike): Result; + + events: {}; +} + +export interface IWETH extends BaseContract { + connect(signerOrProvider: Signer | Provider | string): this; + attach(addressOrName: string): this; + deployed(): Promise; + + interface: IWETHInterface; + + 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: { + deposit( + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + + transfer( + to: string, + value: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + withdraw( + arg0: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + }; + + deposit( + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + + transfer( + to: string, + value: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + withdraw( + arg0: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + callStatic: { + deposit(overrides?: CallOverrides): Promise; + + transfer( + to: string, + value: BigNumberish, + overrides?: CallOverrides + ): Promise; + + withdraw(arg0: BigNumberish, overrides?: CallOverrides): Promise; + }; + + filters: {}; + + estimateGas: { + deposit( + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + + transfer( + to: string, + value: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + withdraw( + arg0: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + }; + + populateTransaction: { + deposit( + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + + transfer( + to: string, + value: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + withdraw( + arg0: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + }; +} diff --git a/packages/interfaces/typechain-types/@uniswap/v2-periphery/contracts/interfaces/index.ts b/packages/interfaces/typechain-types/@uniswap/v2-periphery/contracts/interfaces/index.ts new file mode 100644 index 00000000..d7c00510 --- /dev/null +++ b/packages/interfaces/typechain-types/@uniswap/v2-periphery/contracts/interfaces/index.ts @@ -0,0 +1,7 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +export type { IERC20 } from "./IERC20"; +export type { IUniswapV2Router01 } from "./IUniswapV2Router01"; +export type { IUniswapV2Router02 } from "./IUniswapV2Router02"; +export type { IWETH } from "./IWETH"; diff --git a/packages/interfaces/typechain-types/@uniswap/v2-periphery/index.ts b/packages/interfaces/typechain-types/@uniswap/v2-periphery/index.ts new file mode 100644 index 00000000..a11e4ca2 --- /dev/null +++ b/packages/interfaces/typechain-types/@uniswap/v2-periphery/index.ts @@ -0,0 +1,5 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import type * as contracts from "./contracts"; +export type { contracts }; diff --git a/packages/interfaces/typechain-types/@uniswap/v3-core/contracts/index.ts b/packages/interfaces/typechain-types/@uniswap/v3-core/contracts/index.ts new file mode 100644 index 00000000..92159233 --- /dev/null +++ b/packages/interfaces/typechain-types/@uniswap/v3-core/contracts/index.ts @@ -0,0 +1,5 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import type * as interfaces from "./interfaces"; +export type { interfaces }; diff --git a/packages/interfaces/typechain-types/@uniswap/v3-core/contracts/interfaces/callback/IUniswapV3SwapCallback.ts b/packages/interfaces/typechain-types/@uniswap/v3-core/contracts/interfaces/callback/IUniswapV3SwapCallback.ts new file mode 100644 index 00000000..be70eb94 --- /dev/null +++ b/packages/interfaces/typechain-types/@uniswap/v3-core/contracts/interfaces/callback/IUniswapV3SwapCallback.ts @@ -0,0 +1,117 @@ +/* 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, +} from "../../../../../common"; + +export interface IUniswapV3SwapCallbackInterface extends utils.Interface { + functions: { + "uniswapV3SwapCallback(int256,int256,bytes)": FunctionFragment; + }; + + getFunction( + nameOrSignatureOrTopic: "uniswapV3SwapCallback" + ): FunctionFragment; + + encodeFunctionData( + functionFragment: "uniswapV3SwapCallback", + values: [BigNumberish, BigNumberish, BytesLike] + ): string; + + decodeFunctionResult( + functionFragment: "uniswapV3SwapCallback", + data: BytesLike + ): Result; + + events: {}; +} + +export interface IUniswapV3SwapCallback extends BaseContract { + connect(signerOrProvider: Signer | Provider | string): this; + attach(addressOrName: string): this; + deployed(): Promise; + + interface: IUniswapV3SwapCallbackInterface; + + 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: { + uniswapV3SwapCallback( + amount0Delta: BigNumberish, + amount1Delta: BigNumberish, + data: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + }; + + uniswapV3SwapCallback( + amount0Delta: BigNumberish, + amount1Delta: BigNumberish, + data: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + callStatic: { + uniswapV3SwapCallback( + amount0Delta: BigNumberish, + amount1Delta: BigNumberish, + data: BytesLike, + overrides?: CallOverrides + ): Promise; + }; + + filters: {}; + + estimateGas: { + uniswapV3SwapCallback( + amount0Delta: BigNumberish, + amount1Delta: BigNumberish, + data: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + }; + + populateTransaction: { + uniswapV3SwapCallback( + amount0Delta: BigNumberish, + amount1Delta: BigNumberish, + data: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + }; +} diff --git a/packages/interfaces/typechain-types/@uniswap/v3-core/contracts/interfaces/callback/index.ts b/packages/interfaces/typechain-types/@uniswap/v3-core/contracts/interfaces/callback/index.ts new file mode 100644 index 00000000..c552691c --- /dev/null +++ b/packages/interfaces/typechain-types/@uniswap/v3-core/contracts/interfaces/callback/index.ts @@ -0,0 +1,4 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +export type { IUniswapV3SwapCallback } from "./IUniswapV3SwapCallback"; diff --git a/packages/interfaces/typechain-types/@uniswap/v3-core/contracts/interfaces/index.ts b/packages/interfaces/typechain-types/@uniswap/v3-core/contracts/interfaces/index.ts new file mode 100644 index 00000000..3b69c538 --- /dev/null +++ b/packages/interfaces/typechain-types/@uniswap/v3-core/contracts/interfaces/index.ts @@ -0,0 +1,5 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import type * as callback from "./callback"; +export type { callback }; diff --git a/packages/interfaces/typechain-types/@uniswap/v3-core/index.ts b/packages/interfaces/typechain-types/@uniswap/v3-core/index.ts new file mode 100644 index 00000000..a11e4ca2 --- /dev/null +++ b/packages/interfaces/typechain-types/@uniswap/v3-core/index.ts @@ -0,0 +1,5 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import type * as contracts from "./contracts"; +export type { contracts }; diff --git a/packages/interfaces/typechain-types/@uniswap/v3-periphery/contracts/index.ts b/packages/interfaces/typechain-types/@uniswap/v3-periphery/contracts/index.ts new file mode 100644 index 00000000..92159233 --- /dev/null +++ b/packages/interfaces/typechain-types/@uniswap/v3-periphery/contracts/index.ts @@ -0,0 +1,5 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import type * as interfaces from "./interfaces"; +export type { interfaces }; diff --git a/packages/interfaces/typechain-types/@uniswap/v3-periphery/contracts/interfaces/IQuoter.ts b/packages/interfaces/typechain-types/@uniswap/v3-periphery/contracts/interfaces/IQuoter.ts new file mode 100644 index 00000000..2fc8d32b --- /dev/null +++ b/packages/interfaces/typechain-types/@uniswap/v3-periphery/contracts/interfaces/IQuoter.ts @@ -0,0 +1,263 @@ +/* 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, +} from "../../../../common"; + +export interface IQuoterInterface extends utils.Interface { + functions: { + "quoteExactInput(bytes,uint256)": FunctionFragment; + "quoteExactInputSingle(address,address,uint24,uint256,uint160)": FunctionFragment; + "quoteExactOutput(bytes,uint256)": FunctionFragment; + "quoteExactOutputSingle(address,address,uint24,uint256,uint160)": FunctionFragment; + }; + + getFunction( + nameOrSignatureOrTopic: + | "quoteExactInput" + | "quoteExactInputSingle" + | "quoteExactOutput" + | "quoteExactOutputSingle" + ): FunctionFragment; + + encodeFunctionData( + functionFragment: "quoteExactInput", + values: [BytesLike, BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "quoteExactInputSingle", + values: [string, string, BigNumberish, BigNumberish, BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "quoteExactOutput", + values: [BytesLike, BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "quoteExactOutputSingle", + values: [string, string, BigNumberish, BigNumberish, BigNumberish] + ): string; + + decodeFunctionResult( + functionFragment: "quoteExactInput", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "quoteExactInputSingle", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "quoteExactOutput", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "quoteExactOutputSingle", + data: BytesLike + ): Result; + + events: {}; +} + +export interface IQuoter extends BaseContract { + connect(signerOrProvider: Signer | Provider | string): this; + attach(addressOrName: string): this; + deployed(): Promise; + + interface: IQuoterInterface; + + 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: { + quoteExactInput( + path: BytesLike, + amountIn: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + quoteExactInputSingle( + tokenIn: string, + tokenOut: string, + fee: BigNumberish, + amountIn: BigNumberish, + sqrtPriceLimitX96: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + quoteExactOutput( + path: BytesLike, + amountOut: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + quoteExactOutputSingle( + tokenIn: string, + tokenOut: string, + fee: BigNumberish, + amountOut: BigNumberish, + sqrtPriceLimitX96: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + }; + + quoteExactInput( + path: BytesLike, + amountIn: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + quoteExactInputSingle( + tokenIn: string, + tokenOut: string, + fee: BigNumberish, + amountIn: BigNumberish, + sqrtPriceLimitX96: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + quoteExactOutput( + path: BytesLike, + amountOut: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + quoteExactOutputSingle( + tokenIn: string, + tokenOut: string, + fee: BigNumberish, + amountOut: BigNumberish, + sqrtPriceLimitX96: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + callStatic: { + quoteExactInput( + path: BytesLike, + amountIn: BigNumberish, + overrides?: CallOverrides + ): Promise; + + quoteExactInputSingle( + tokenIn: string, + tokenOut: string, + fee: BigNumberish, + amountIn: BigNumberish, + sqrtPriceLimitX96: BigNumberish, + overrides?: CallOverrides + ): Promise; + + quoteExactOutput( + path: BytesLike, + amountOut: BigNumberish, + overrides?: CallOverrides + ): Promise; + + quoteExactOutputSingle( + tokenIn: string, + tokenOut: string, + fee: BigNumberish, + amountOut: BigNumberish, + sqrtPriceLimitX96: BigNumberish, + overrides?: CallOverrides + ): Promise; + }; + + filters: {}; + + estimateGas: { + quoteExactInput( + path: BytesLike, + amountIn: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + quoteExactInputSingle( + tokenIn: string, + tokenOut: string, + fee: BigNumberish, + amountIn: BigNumberish, + sqrtPriceLimitX96: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + quoteExactOutput( + path: BytesLike, + amountOut: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + quoteExactOutputSingle( + tokenIn: string, + tokenOut: string, + fee: BigNumberish, + amountOut: BigNumberish, + sqrtPriceLimitX96: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + }; + + populateTransaction: { + quoteExactInput( + path: BytesLike, + amountIn: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + quoteExactInputSingle( + tokenIn: string, + tokenOut: string, + fee: BigNumberish, + amountIn: BigNumberish, + sqrtPriceLimitX96: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + quoteExactOutput( + path: BytesLike, + amountOut: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + quoteExactOutputSingle( + tokenIn: string, + tokenOut: string, + fee: BigNumberish, + amountOut: BigNumberish, + sqrtPriceLimitX96: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + }; +} diff --git a/packages/interfaces/typechain-types/@uniswap/v3-periphery/contracts/interfaces/ISwapRouter.ts b/packages/interfaces/typechain-types/@uniswap/v3-periphery/contracts/interfaces/ISwapRouter.ts new file mode 100644 index 00000000..87c276dc --- /dev/null +++ b/packages/interfaces/typechain-types/@uniswap/v3-periphery/contracts/interfaces/ISwapRouter.ts @@ -0,0 +1,364 @@ +/* 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 } from "@ethersproject/abi"; +import type { Listener, Provider } from "@ethersproject/providers"; +import type { + TypedEventFilter, + TypedEvent, + TypedListener, + OnEvent, +} from "../../../../common"; + +export declare namespace ISwapRouter { + export type ExactInputParamsStruct = { + path: BytesLike; + recipient: string; + deadline: BigNumberish; + amountIn: BigNumberish; + amountOutMinimum: BigNumberish; + }; + + export type ExactInputParamsStructOutput = [ + string, + string, + BigNumber, + BigNumber, + BigNumber + ] & { + path: string; + recipient: string; + deadline: BigNumber; + amountIn: BigNumber; + amountOutMinimum: BigNumber; + }; + + export type ExactInputSingleParamsStruct = { + tokenIn: string; + tokenOut: string; + fee: BigNumberish; + recipient: string; + deadline: BigNumberish; + amountIn: BigNumberish; + amountOutMinimum: BigNumberish; + sqrtPriceLimitX96: BigNumberish; + }; + + export type ExactInputSingleParamsStructOutput = [ + string, + string, + number, + string, + BigNumber, + BigNumber, + BigNumber, + BigNumber + ] & { + tokenIn: string; + tokenOut: string; + fee: number; + recipient: string; + deadline: BigNumber; + amountIn: BigNumber; + amountOutMinimum: BigNumber; + sqrtPriceLimitX96: BigNumber; + }; + + export type ExactOutputParamsStruct = { + path: BytesLike; + recipient: string; + deadline: BigNumberish; + amountOut: BigNumberish; + amountInMaximum: BigNumberish; + }; + + export type ExactOutputParamsStructOutput = [ + string, + string, + BigNumber, + BigNumber, + BigNumber + ] & { + path: string; + recipient: string; + deadline: BigNumber; + amountOut: BigNumber; + amountInMaximum: BigNumber; + }; + + export type ExactOutputSingleParamsStruct = { + tokenIn: string; + tokenOut: string; + fee: BigNumberish; + recipient: string; + deadline: BigNumberish; + amountOut: BigNumberish; + amountInMaximum: BigNumberish; + sqrtPriceLimitX96: BigNumberish; + }; + + export type ExactOutputSingleParamsStructOutput = [ + string, + string, + number, + string, + BigNumber, + BigNumber, + BigNumber, + BigNumber + ] & { + tokenIn: string; + tokenOut: string; + fee: number; + recipient: string; + deadline: BigNumber; + amountOut: BigNumber; + amountInMaximum: BigNumber; + sqrtPriceLimitX96: BigNumber; + }; +} + +export interface ISwapRouterInterface extends utils.Interface { + functions: { + "exactInput((bytes,address,uint256,uint256,uint256))": FunctionFragment; + "exactInputSingle((address,address,uint24,address,uint256,uint256,uint256,uint160))": FunctionFragment; + "exactOutput((bytes,address,uint256,uint256,uint256))": FunctionFragment; + "exactOutputSingle((address,address,uint24,address,uint256,uint256,uint256,uint160))": FunctionFragment; + "uniswapV3SwapCallback(int256,int256,bytes)": FunctionFragment; + }; + + getFunction( + nameOrSignatureOrTopic: + | "exactInput" + | "exactInputSingle" + | "exactOutput" + | "exactOutputSingle" + | "uniswapV3SwapCallback" + ): FunctionFragment; + + encodeFunctionData( + functionFragment: "exactInput", + values: [ISwapRouter.ExactInputParamsStruct] + ): string; + encodeFunctionData( + functionFragment: "exactInputSingle", + values: [ISwapRouter.ExactInputSingleParamsStruct] + ): string; + encodeFunctionData( + functionFragment: "exactOutput", + values: [ISwapRouter.ExactOutputParamsStruct] + ): string; + encodeFunctionData( + functionFragment: "exactOutputSingle", + values: [ISwapRouter.ExactOutputSingleParamsStruct] + ): string; + encodeFunctionData( + functionFragment: "uniswapV3SwapCallback", + values: [BigNumberish, BigNumberish, BytesLike] + ): string; + + decodeFunctionResult(functionFragment: "exactInput", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "exactInputSingle", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "exactOutput", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "exactOutputSingle", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "uniswapV3SwapCallback", + data: BytesLike + ): Result; + + events: {}; +} + +export interface ISwapRouter extends BaseContract { + connect(signerOrProvider: Signer | Provider | string): this; + attach(addressOrName: string): this; + deployed(): Promise; + + interface: ISwapRouterInterface; + + 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: { + exactInput( + params: ISwapRouter.ExactInputParamsStruct, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + + exactInputSingle( + params: ISwapRouter.ExactInputSingleParamsStruct, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + + exactOutput( + params: ISwapRouter.ExactOutputParamsStruct, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + + exactOutputSingle( + params: ISwapRouter.ExactOutputSingleParamsStruct, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + + uniswapV3SwapCallback( + amount0Delta: BigNumberish, + amount1Delta: BigNumberish, + data: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + }; + + exactInput( + params: ISwapRouter.ExactInputParamsStruct, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + + exactInputSingle( + params: ISwapRouter.ExactInputSingleParamsStruct, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + + exactOutput( + params: ISwapRouter.ExactOutputParamsStruct, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + + exactOutputSingle( + params: ISwapRouter.ExactOutputSingleParamsStruct, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + + uniswapV3SwapCallback( + amount0Delta: BigNumberish, + amount1Delta: BigNumberish, + data: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + callStatic: { + exactInput( + params: ISwapRouter.ExactInputParamsStruct, + overrides?: CallOverrides + ): Promise; + + exactInputSingle( + params: ISwapRouter.ExactInputSingleParamsStruct, + overrides?: CallOverrides + ): Promise; + + exactOutput( + params: ISwapRouter.ExactOutputParamsStruct, + overrides?: CallOverrides + ): Promise; + + exactOutputSingle( + params: ISwapRouter.ExactOutputSingleParamsStruct, + overrides?: CallOverrides + ): Promise; + + uniswapV3SwapCallback( + amount0Delta: BigNumberish, + amount1Delta: BigNumberish, + data: BytesLike, + overrides?: CallOverrides + ): Promise; + }; + + filters: {}; + + estimateGas: { + exactInput( + params: ISwapRouter.ExactInputParamsStruct, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + + exactInputSingle( + params: ISwapRouter.ExactInputSingleParamsStruct, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + + exactOutput( + params: ISwapRouter.ExactOutputParamsStruct, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + + exactOutputSingle( + params: ISwapRouter.ExactOutputSingleParamsStruct, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + + uniswapV3SwapCallback( + amount0Delta: BigNumberish, + amount1Delta: BigNumberish, + data: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + }; + + populateTransaction: { + exactInput( + params: ISwapRouter.ExactInputParamsStruct, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + + exactInputSingle( + params: ISwapRouter.ExactInputSingleParamsStruct, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + + exactOutput( + params: ISwapRouter.ExactOutputParamsStruct, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + + exactOutputSingle( + params: ISwapRouter.ExactOutputSingleParamsStruct, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + + uniswapV3SwapCallback( + amount0Delta: BigNumberish, + amount1Delta: BigNumberish, + data: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + }; +} diff --git a/packages/interfaces/typechain-types/@uniswap/v3-periphery/contracts/interfaces/index.ts b/packages/interfaces/typechain-types/@uniswap/v3-periphery/contracts/interfaces/index.ts new file mode 100644 index 00000000..0490b486 --- /dev/null +++ b/packages/interfaces/typechain-types/@uniswap/v3-periphery/contracts/interfaces/index.ts @@ -0,0 +1,5 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +export type { IQuoter } from "./IQuoter"; +export type { ISwapRouter } from "./ISwapRouter"; diff --git a/packages/interfaces/typechain-types/@uniswap/v3-periphery/index.ts b/packages/interfaces/typechain-types/@uniswap/v3-periphery/index.ts new file mode 100644 index 00000000..a11e4ca2 --- /dev/null +++ b/packages/interfaces/typechain-types/@uniswap/v3-periphery/index.ts @@ -0,0 +1,5 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import type * as contracts from "./contracts"; +export type { contracts }; diff --git a/packages/interfaces/typechain-types/common.ts b/packages/interfaces/typechain-types/common.ts new file mode 100644 index 00000000..2fc40c7f --- /dev/null +++ b/packages/interfaces/typechain-types/common.ts @@ -0,0 +1,44 @@ +/* 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; diff --git a/packages/interfaces/typechain-types/contracts/ImmutableCreate2Factory.ts b/packages/interfaces/typechain-types/contracts/ImmutableCreate2Factory.ts new file mode 100644 index 00000000..70ca5354 --- /dev/null +++ b/packages/interfaces/typechain-types/contracts/ImmutableCreate2Factory.ts @@ -0,0 +1,227 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import type { + BaseContract, + BigNumber, + BytesLike, + CallOverrides, + ContractTransaction, + PayableOverrides, + 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, +} from "../common"; + +export interface ImmutableCreate2FactoryInterface extends utils.Interface { + functions: { + "hasBeenDeployed(address)": FunctionFragment; + "safeCreate2(bytes32,bytes)": FunctionFragment; + "findCreate2Address(bytes32,bytes)": FunctionFragment; + "findCreate2AddressViaHash(bytes32,bytes32)": FunctionFragment; + }; + + getFunction( + nameOrSignatureOrTopic: + | "hasBeenDeployed" + | "safeCreate2" + | "findCreate2Address" + | "findCreate2AddressViaHash" + ): FunctionFragment; + + encodeFunctionData( + functionFragment: "hasBeenDeployed", + values: [string] + ): string; + encodeFunctionData( + functionFragment: "safeCreate2", + values: [BytesLike, BytesLike] + ): string; + encodeFunctionData( + functionFragment: "findCreate2Address", + values: [BytesLike, BytesLike] + ): string; + encodeFunctionData( + functionFragment: "findCreate2AddressViaHash", + values: [BytesLike, BytesLike] + ): string; + + decodeFunctionResult( + functionFragment: "hasBeenDeployed", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "safeCreate2", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "findCreate2Address", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "findCreate2AddressViaHash", + data: BytesLike + ): Result; + + events: {}; +} + +export interface ImmutableCreate2Factory extends BaseContract { + connect(signerOrProvider: Signer | Provider | string): this; + attach(addressOrName: string): this; + deployed(): Promise; + + interface: ImmutableCreate2FactoryInterface; + + 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: { + hasBeenDeployed( + deploymentAddress: string, + overrides?: CallOverrides + ): Promise<[boolean]>; + + safeCreate2( + salt: BytesLike, + initializationCode: BytesLike, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + + findCreate2Address( + salt: BytesLike, + initCode: BytesLike, + overrides?: CallOverrides + ): Promise<[string] & { deploymentAddress: string }>; + + findCreate2AddressViaHash( + salt: BytesLike, + initCodeHash: BytesLike, + overrides?: CallOverrides + ): Promise<[string] & { deploymentAddress: string }>; + }; + + hasBeenDeployed( + deploymentAddress: string, + overrides?: CallOverrides + ): Promise; + + safeCreate2( + salt: BytesLike, + initializationCode: BytesLike, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + + findCreate2Address( + salt: BytesLike, + initCode: BytesLike, + overrides?: CallOverrides + ): Promise; + + findCreate2AddressViaHash( + salt: BytesLike, + initCodeHash: BytesLike, + overrides?: CallOverrides + ): Promise; + + callStatic: { + hasBeenDeployed( + deploymentAddress: string, + overrides?: CallOverrides + ): Promise; + + safeCreate2( + salt: BytesLike, + initializationCode: BytesLike, + overrides?: CallOverrides + ): Promise; + + findCreate2Address( + salt: BytesLike, + initCode: BytesLike, + overrides?: CallOverrides + ): Promise; + + findCreate2AddressViaHash( + salt: BytesLike, + initCodeHash: BytesLike, + overrides?: CallOverrides + ): Promise; + }; + + filters: {}; + + estimateGas: { + hasBeenDeployed( + deploymentAddress: string, + overrides?: CallOverrides + ): Promise; + + safeCreate2( + salt: BytesLike, + initializationCode: BytesLike, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + + findCreate2Address( + salt: BytesLike, + initCode: BytesLike, + overrides?: CallOverrides + ): Promise; + + findCreate2AddressViaHash( + salt: BytesLike, + initCodeHash: BytesLike, + overrides?: CallOverrides + ): Promise; + }; + + populateTransaction: { + hasBeenDeployed( + deploymentAddress: string, + overrides?: CallOverrides + ): Promise; + + safeCreate2( + salt: BytesLike, + initializationCode: BytesLike, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + + findCreate2Address( + salt: BytesLike, + initCode: BytesLike, + overrides?: CallOverrides + ): Promise; + + findCreate2AddressViaHash( + salt: BytesLike, + initCodeHash: BytesLike, + overrides?: CallOverrides + ): Promise; + }; +} diff --git a/packages/interfaces/typechain-types/contracts/Zeta.eth.sol/ZetaEth.ts b/packages/interfaces/typechain-types/contracts/Zeta.eth.sol/ZetaEth.ts new file mode 100644 index 00000000..3be201be --- /dev/null +++ b/packages/interfaces/typechain-types/contracts/Zeta.eth.sol/ZetaEth.ts @@ -0,0 +1,444 @@ +/* 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, +} from "../../common"; + +export interface ZetaEthInterface extends utils.Interface { + functions: { + "allowance(address,address)": FunctionFragment; + "approve(address,uint256)": FunctionFragment; + "balanceOf(address)": FunctionFragment; + "decimals()": FunctionFragment; + "decreaseAllowance(address,uint256)": FunctionFragment; + "increaseAllowance(address,uint256)": FunctionFragment; + "name()": FunctionFragment; + "symbol()": FunctionFragment; + "totalSupply()": FunctionFragment; + "transfer(address,uint256)": FunctionFragment; + "transferFrom(address,address,uint256)": FunctionFragment; + }; + + getFunction( + nameOrSignatureOrTopic: + | "allowance" + | "approve" + | "balanceOf" + | "decimals" + | "decreaseAllowance" + | "increaseAllowance" + | "name" + | "symbol" + | "totalSupply" + | "transfer" + | "transferFrom" + ): FunctionFragment; + + encodeFunctionData( + functionFragment: "allowance", + values: [string, string] + ): string; + encodeFunctionData( + functionFragment: "approve", + values: [string, BigNumberish] + ): string; + encodeFunctionData(functionFragment: "balanceOf", values: [string]): string; + encodeFunctionData(functionFragment: "decimals", values?: undefined): string; + encodeFunctionData( + functionFragment: "decreaseAllowance", + values: [string, BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "increaseAllowance", + values: [string, BigNumberish] + ): string; + encodeFunctionData(functionFragment: "name", values?: undefined): string; + encodeFunctionData(functionFragment: "symbol", values?: undefined): string; + encodeFunctionData( + functionFragment: "totalSupply", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "transfer", + values: [string, BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "transferFrom", + values: [string, string, BigNumberish] + ): string; + + decodeFunctionResult(functionFragment: "allowance", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "approve", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "balanceOf", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "decimals", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "decreaseAllowance", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "increaseAllowance", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "name", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "symbol", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "totalSupply", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "transfer", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "transferFrom", + data: BytesLike + ): Result; + + events: { + "Approval(address,address,uint256)": EventFragment; + "Transfer(address,address,uint256)": EventFragment; + }; + + getEvent(nameOrSignatureOrTopic: "Approval"): EventFragment; + getEvent(nameOrSignatureOrTopic: "Transfer"): EventFragment; +} + +export interface ApprovalEventObject { + owner: string; + spender: string; + value: BigNumber; +} +export type ApprovalEvent = TypedEvent< + [string, string, BigNumber], + ApprovalEventObject +>; + +export type ApprovalEventFilter = TypedEventFilter; + +export interface TransferEventObject { + from: string; + to: string; + value: BigNumber; +} +export type TransferEvent = TypedEvent< + [string, string, BigNumber], + TransferEventObject +>; + +export type TransferEventFilter = TypedEventFilter; + +export interface ZetaEth extends BaseContract { + connect(signerOrProvider: Signer | Provider | string): this; + attach(addressOrName: string): this; + deployed(): Promise; + + interface: ZetaEthInterface; + + 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: { + allowance( + owner: string, + spender: string, + overrides?: CallOverrides + ): Promise<[BigNumber]>; + + approve( + spender: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + balanceOf(account: string, overrides?: CallOverrides): Promise<[BigNumber]>; + + decimals(overrides?: CallOverrides): Promise<[number]>; + + decreaseAllowance( + spender: string, + subtractedValue: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + increaseAllowance( + spender: string, + addedValue: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + name(overrides?: CallOverrides): Promise<[string]>; + + symbol(overrides?: CallOverrides): Promise<[string]>; + + totalSupply(overrides?: CallOverrides): Promise<[BigNumber]>; + + transfer( + to: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + transferFrom( + from: string, + to: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + }; + + allowance( + owner: string, + spender: string, + overrides?: CallOverrides + ): Promise; + + approve( + spender: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + balanceOf(account: string, overrides?: CallOverrides): Promise; + + decimals(overrides?: CallOverrides): Promise; + + decreaseAllowance( + spender: string, + subtractedValue: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + increaseAllowance( + spender: string, + addedValue: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + name(overrides?: CallOverrides): Promise; + + symbol(overrides?: CallOverrides): Promise; + + totalSupply(overrides?: CallOverrides): Promise; + + transfer( + to: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + transferFrom( + from: string, + to: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + callStatic: { + allowance( + owner: string, + spender: string, + overrides?: CallOverrides + ): Promise; + + approve( + spender: string, + amount: BigNumberish, + overrides?: CallOverrides + ): Promise; + + balanceOf(account: string, overrides?: CallOverrides): Promise; + + decimals(overrides?: CallOverrides): Promise; + + decreaseAllowance( + spender: string, + subtractedValue: BigNumberish, + overrides?: CallOverrides + ): Promise; + + increaseAllowance( + spender: string, + addedValue: BigNumberish, + overrides?: CallOverrides + ): Promise; + + name(overrides?: CallOverrides): Promise; + + symbol(overrides?: CallOverrides): Promise; + + totalSupply(overrides?: CallOverrides): Promise; + + transfer( + to: string, + amount: BigNumberish, + overrides?: CallOverrides + ): Promise; + + transferFrom( + from: string, + to: string, + amount: BigNumberish, + overrides?: CallOverrides + ): Promise; + }; + + filters: { + "Approval(address,address,uint256)"( + owner?: string | null, + spender?: string | null, + value?: null + ): ApprovalEventFilter; + Approval( + owner?: string | null, + spender?: string | null, + value?: null + ): ApprovalEventFilter; + + "Transfer(address,address,uint256)"( + from?: string | null, + to?: string | null, + value?: null + ): TransferEventFilter; + Transfer( + from?: string | null, + to?: string | null, + value?: null + ): TransferEventFilter; + }; + + estimateGas: { + allowance( + owner: string, + spender: string, + overrides?: CallOverrides + ): Promise; + + approve( + spender: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + balanceOf(account: string, overrides?: CallOverrides): Promise; + + decimals(overrides?: CallOverrides): Promise; + + decreaseAllowance( + spender: string, + subtractedValue: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + increaseAllowance( + spender: string, + addedValue: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + name(overrides?: CallOverrides): Promise; + + symbol(overrides?: CallOverrides): Promise; + + totalSupply(overrides?: CallOverrides): Promise; + + transfer( + to: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + transferFrom( + from: string, + to: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + }; + + populateTransaction: { + allowance( + owner: string, + spender: string, + overrides?: CallOverrides + ): Promise; + + approve( + spender: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + balanceOf( + account: string, + overrides?: CallOverrides + ): Promise; + + decimals(overrides?: CallOverrides): Promise; + + decreaseAllowance( + spender: string, + subtractedValue: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + increaseAllowance( + spender: string, + addedValue: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + name(overrides?: CallOverrides): Promise; + + symbol(overrides?: CallOverrides): Promise; + + totalSupply(overrides?: CallOverrides): Promise; + + transfer( + to: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + transferFrom( + from: string, + to: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + }; +} diff --git a/packages/interfaces/typechain-types/contracts/Zeta.eth.sol/index.ts b/packages/interfaces/typechain-types/contracts/Zeta.eth.sol/index.ts new file mode 100644 index 00000000..1b92bdea --- /dev/null +++ b/packages/interfaces/typechain-types/contracts/Zeta.eth.sol/index.ts @@ -0,0 +1,4 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +export type { ZetaEth } from "./ZetaEth"; diff --git a/packages/interfaces/typechain-types/contracts/Zeta.non-eth.sol/ZetaNonEth.ts b/packages/interfaces/typechain-types/contracts/Zeta.non-eth.sol/ZetaNonEth.ts new file mode 100644 index 00000000..7f502ecd --- /dev/null +++ b/packages/interfaces/typechain-types/contracts/Zeta.non-eth.sol/ZetaNonEth.ts @@ -0,0 +1,715 @@ +/* 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, +} from "../../common"; + +export interface ZetaNonEthInterface extends utils.Interface { + functions: { + "allowance(address,address)": FunctionFragment; + "approve(address,uint256)": FunctionFragment; + "balanceOf(address)": FunctionFragment; + "burn(uint256)": FunctionFragment; + "burnFrom(address,uint256)": FunctionFragment; + "connectorAddress()": FunctionFragment; + "decimals()": FunctionFragment; + "decreaseAllowance(address,uint256)": FunctionFragment; + "increaseAllowance(address,uint256)": FunctionFragment; + "mint(address,uint256,bytes32)": FunctionFragment; + "name()": FunctionFragment; + "renounceTssAddressUpdater()": FunctionFragment; + "symbol()": FunctionFragment; + "totalSupply()": FunctionFragment; + "transfer(address,uint256)": FunctionFragment; + "transferFrom(address,address,uint256)": FunctionFragment; + "tssAddress()": FunctionFragment; + "tssAddressUpdater()": FunctionFragment; + "updateTssAndConnectorAddresses(address,address)": FunctionFragment; + }; + + getFunction( + nameOrSignatureOrTopic: + | "allowance" + | "approve" + | "balanceOf" + | "burn" + | "burnFrom" + | "connectorAddress" + | "decimals" + | "decreaseAllowance" + | "increaseAllowance" + | "mint" + | "name" + | "renounceTssAddressUpdater" + | "symbol" + | "totalSupply" + | "transfer" + | "transferFrom" + | "tssAddress" + | "tssAddressUpdater" + | "updateTssAndConnectorAddresses" + ): FunctionFragment; + + encodeFunctionData( + functionFragment: "allowance", + values: [string, string] + ): string; + encodeFunctionData( + functionFragment: "approve", + values: [string, BigNumberish] + ): string; + encodeFunctionData(functionFragment: "balanceOf", values: [string]): string; + encodeFunctionData(functionFragment: "burn", values: [BigNumberish]): string; + encodeFunctionData( + functionFragment: "burnFrom", + values: [string, BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "connectorAddress", + values?: undefined + ): string; + encodeFunctionData(functionFragment: "decimals", values?: undefined): string; + encodeFunctionData( + functionFragment: "decreaseAllowance", + values: [string, BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "increaseAllowance", + values: [string, BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "mint", + values: [string, BigNumberish, BytesLike] + ): string; + encodeFunctionData(functionFragment: "name", values?: undefined): string; + encodeFunctionData( + functionFragment: "renounceTssAddressUpdater", + values?: undefined + ): string; + encodeFunctionData(functionFragment: "symbol", values?: undefined): string; + encodeFunctionData( + functionFragment: "totalSupply", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "transfer", + values: [string, BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "transferFrom", + values: [string, string, BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "tssAddress", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "tssAddressUpdater", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "updateTssAndConnectorAddresses", + values: [string, string] + ): string; + + decodeFunctionResult(functionFragment: "allowance", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "approve", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "balanceOf", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "burn", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "burnFrom", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "connectorAddress", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "decimals", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "decreaseAllowance", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "increaseAllowance", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "mint", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "name", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "renounceTssAddressUpdater", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "symbol", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "totalSupply", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "transfer", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "transferFrom", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "tssAddress", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "tssAddressUpdater", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "updateTssAndConnectorAddresses", + data: BytesLike + ): Result; + + events: { + "Approval(address,address,uint256)": EventFragment; + "Burnt(address,uint256)": EventFragment; + "Minted(address,uint256,bytes32)": EventFragment; + "Transfer(address,address,uint256)": EventFragment; + }; + + getEvent(nameOrSignatureOrTopic: "Approval"): EventFragment; + getEvent(nameOrSignatureOrTopic: "Burnt"): EventFragment; + getEvent(nameOrSignatureOrTopic: "Minted"): EventFragment; + getEvent(nameOrSignatureOrTopic: "Transfer"): EventFragment; +} + +export interface ApprovalEventObject { + owner: string; + spender: string; + value: BigNumber; +} +export type ApprovalEvent = TypedEvent< + [string, string, BigNumber], + ApprovalEventObject +>; + +export type ApprovalEventFilter = TypedEventFilter; + +export interface BurntEventObject { + burnee: string; + amount: BigNumber; +} +export type BurntEvent = TypedEvent<[string, BigNumber], BurntEventObject>; + +export type BurntEventFilter = TypedEventFilter; + +export interface MintedEventObject { + mintee: string; + amount: BigNumber; + internalSendHash: string; +} +export type MintedEvent = TypedEvent< + [string, BigNumber, string], + MintedEventObject +>; + +export type MintedEventFilter = TypedEventFilter; + +export interface TransferEventObject { + from: string; + to: string; + value: BigNumber; +} +export type TransferEvent = TypedEvent< + [string, string, BigNumber], + TransferEventObject +>; + +export type TransferEventFilter = TypedEventFilter; + +export interface ZetaNonEth extends BaseContract { + connect(signerOrProvider: Signer | Provider | string): this; + attach(addressOrName: string): this; + deployed(): Promise; + + interface: ZetaNonEthInterface; + + 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: { + allowance( + owner: string, + spender: string, + overrides?: CallOverrides + ): Promise<[BigNumber]>; + + approve( + spender: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + balanceOf(account: string, overrides?: CallOverrides): Promise<[BigNumber]>; + + burn( + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + burnFrom( + account: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + connectorAddress(overrides?: CallOverrides): Promise<[string]>; + + decimals(overrides?: CallOverrides): Promise<[number]>; + + decreaseAllowance( + spender: string, + subtractedValue: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + increaseAllowance( + spender: string, + addedValue: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + mint( + mintee: string, + value: BigNumberish, + internalSendHash: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + name(overrides?: CallOverrides): Promise<[string]>; + + renounceTssAddressUpdater( + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + symbol(overrides?: CallOverrides): Promise<[string]>; + + totalSupply(overrides?: CallOverrides): Promise<[BigNumber]>; + + transfer( + to: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + transferFrom( + from: string, + to: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + tssAddress(overrides?: CallOverrides): Promise<[string]>; + + tssAddressUpdater(overrides?: CallOverrides): Promise<[string]>; + + updateTssAndConnectorAddresses( + tssAddress_: string, + connectorAddress_: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + }; + + allowance( + owner: string, + spender: string, + overrides?: CallOverrides + ): Promise; + + approve( + spender: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + balanceOf(account: string, overrides?: CallOverrides): Promise; + + burn( + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + burnFrom( + account: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + connectorAddress(overrides?: CallOverrides): Promise; + + decimals(overrides?: CallOverrides): Promise; + + decreaseAllowance( + spender: string, + subtractedValue: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + increaseAllowance( + spender: string, + addedValue: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + mint( + mintee: string, + value: BigNumberish, + internalSendHash: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + name(overrides?: CallOverrides): Promise; + + renounceTssAddressUpdater( + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + symbol(overrides?: CallOverrides): Promise; + + totalSupply(overrides?: CallOverrides): Promise; + + transfer( + to: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + transferFrom( + from: string, + to: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + tssAddress(overrides?: CallOverrides): Promise; + + tssAddressUpdater(overrides?: CallOverrides): Promise; + + updateTssAndConnectorAddresses( + tssAddress_: string, + connectorAddress_: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + callStatic: { + allowance( + owner: string, + spender: string, + overrides?: CallOverrides + ): Promise; + + approve( + spender: string, + amount: BigNumberish, + overrides?: CallOverrides + ): Promise; + + balanceOf(account: string, overrides?: CallOverrides): Promise; + + burn(amount: BigNumberish, overrides?: CallOverrides): Promise; + + burnFrom( + account: string, + amount: BigNumberish, + overrides?: CallOverrides + ): Promise; + + connectorAddress(overrides?: CallOverrides): Promise; + + decimals(overrides?: CallOverrides): Promise; + + decreaseAllowance( + spender: string, + subtractedValue: BigNumberish, + overrides?: CallOverrides + ): Promise; + + increaseAllowance( + spender: string, + addedValue: BigNumberish, + overrides?: CallOverrides + ): Promise; + + mint( + mintee: string, + value: BigNumberish, + internalSendHash: BytesLike, + overrides?: CallOverrides + ): Promise; + + name(overrides?: CallOverrides): Promise; + + renounceTssAddressUpdater(overrides?: CallOverrides): Promise; + + symbol(overrides?: CallOverrides): Promise; + + totalSupply(overrides?: CallOverrides): Promise; + + transfer( + to: string, + amount: BigNumberish, + overrides?: CallOverrides + ): Promise; + + transferFrom( + from: string, + to: string, + amount: BigNumberish, + overrides?: CallOverrides + ): Promise; + + tssAddress(overrides?: CallOverrides): Promise; + + tssAddressUpdater(overrides?: CallOverrides): Promise; + + updateTssAndConnectorAddresses( + tssAddress_: string, + connectorAddress_: string, + overrides?: CallOverrides + ): Promise; + }; + + filters: { + "Approval(address,address,uint256)"( + owner?: string | null, + spender?: string | null, + value?: null + ): ApprovalEventFilter; + Approval( + owner?: string | null, + spender?: string | null, + value?: null + ): ApprovalEventFilter; + + "Burnt(address,uint256)"( + burnee?: string | null, + amount?: null + ): BurntEventFilter; + Burnt(burnee?: string | null, amount?: null): BurntEventFilter; + + "Minted(address,uint256,bytes32)"( + mintee?: string | null, + amount?: null, + internalSendHash?: BytesLike | null + ): MintedEventFilter; + Minted( + mintee?: string | null, + amount?: null, + internalSendHash?: BytesLike | null + ): MintedEventFilter; + + "Transfer(address,address,uint256)"( + from?: string | null, + to?: string | null, + value?: null + ): TransferEventFilter; + Transfer( + from?: string | null, + to?: string | null, + value?: null + ): TransferEventFilter; + }; + + estimateGas: { + allowance( + owner: string, + spender: string, + overrides?: CallOverrides + ): Promise; + + approve( + spender: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + balanceOf(account: string, overrides?: CallOverrides): Promise; + + burn( + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + burnFrom( + account: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + connectorAddress(overrides?: CallOverrides): Promise; + + decimals(overrides?: CallOverrides): Promise; + + decreaseAllowance( + spender: string, + subtractedValue: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + increaseAllowance( + spender: string, + addedValue: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + mint( + mintee: string, + value: BigNumberish, + internalSendHash: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + name(overrides?: CallOverrides): Promise; + + renounceTssAddressUpdater( + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + symbol(overrides?: CallOverrides): Promise; + + totalSupply(overrides?: CallOverrides): Promise; + + transfer( + to: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + transferFrom( + from: string, + to: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + tssAddress(overrides?: CallOverrides): Promise; + + tssAddressUpdater(overrides?: CallOverrides): Promise; + + updateTssAndConnectorAddresses( + tssAddress_: string, + connectorAddress_: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + }; + + populateTransaction: { + allowance( + owner: string, + spender: string, + overrides?: CallOverrides + ): Promise; + + approve( + spender: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + balanceOf( + account: string, + overrides?: CallOverrides + ): Promise; + + burn( + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + burnFrom( + account: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + connectorAddress(overrides?: CallOverrides): Promise; + + decimals(overrides?: CallOverrides): Promise; + + decreaseAllowance( + spender: string, + subtractedValue: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + increaseAllowance( + spender: string, + addedValue: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + mint( + mintee: string, + value: BigNumberish, + internalSendHash: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + name(overrides?: CallOverrides): Promise; + + renounceTssAddressUpdater( + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + symbol(overrides?: CallOverrides): Promise; + + totalSupply(overrides?: CallOverrides): Promise; + + transfer( + to: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + transferFrom( + from: string, + to: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + tssAddress(overrides?: CallOverrides): Promise; + + tssAddressUpdater(overrides?: CallOverrides): Promise; + + updateTssAndConnectorAddresses( + tssAddress_: string, + connectorAddress_: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + }; +} diff --git a/packages/interfaces/typechain-types/contracts/Zeta.non-eth.sol/index.ts b/packages/interfaces/typechain-types/contracts/Zeta.non-eth.sol/index.ts new file mode 100644 index 00000000..113265da --- /dev/null +++ b/packages/interfaces/typechain-types/contracts/Zeta.non-eth.sol/index.ts @@ -0,0 +1,4 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +export type { ZetaNonEth } from "./ZetaNonEth"; diff --git a/packages/interfaces/typechain-types/contracts/ZetaConnector.base.sol/ZetaConnectorBase.ts b/packages/interfaces/typechain-types/contracts/ZetaConnector.base.sol/ZetaConnectorBase.ts new file mode 100644 index 00000000..92562636 --- /dev/null +++ b/packages/interfaces/typechain-types/contracts/ZetaConnector.base.sol/ZetaConnectorBase.ts @@ -0,0 +1,680 @@ +/* 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, +} from "../../common"; + +export declare namespace ZetaInterfaces { + export type SendInputStruct = { + destinationChainId: BigNumberish; + destinationAddress: BytesLike; + destinationGasLimit: BigNumberish; + message: BytesLike; + zetaValueAndGas: BigNumberish; + zetaParams: BytesLike; + }; + + export type SendInputStructOutput = [ + BigNumber, + string, + BigNumber, + string, + BigNumber, + string + ] & { + destinationChainId: BigNumber; + destinationAddress: string; + destinationGasLimit: BigNumber; + message: string; + zetaValueAndGas: BigNumber; + zetaParams: string; + }; +} + +export interface ZetaConnectorBaseInterface extends utils.Interface { + functions: { + "onReceive(bytes,uint256,address,uint256,bytes,bytes32)": FunctionFragment; + "onRevert(address,uint256,bytes,uint256,uint256,bytes,bytes32)": FunctionFragment; + "pause()": FunctionFragment; + "paused()": FunctionFragment; + "pauserAddress()": FunctionFragment; + "renounceTssAddressUpdater()": FunctionFragment; + "send((uint256,bytes,uint256,bytes,uint256,bytes))": FunctionFragment; + "tssAddress()": FunctionFragment; + "tssAddressUpdater()": FunctionFragment; + "unpause()": FunctionFragment; + "updatePauserAddress(address)": FunctionFragment; + "updateTssAddress(address)": FunctionFragment; + "zetaToken()": FunctionFragment; + }; + + getFunction( + nameOrSignatureOrTopic: + | "onReceive" + | "onRevert" + | "pause" + | "paused" + | "pauserAddress" + | "renounceTssAddressUpdater" + | "send" + | "tssAddress" + | "tssAddressUpdater" + | "unpause" + | "updatePauserAddress" + | "updateTssAddress" + | "zetaToken" + ): FunctionFragment; + + encodeFunctionData( + functionFragment: "onReceive", + values: [ + BytesLike, + BigNumberish, + string, + BigNumberish, + BytesLike, + BytesLike + ] + ): string; + encodeFunctionData( + functionFragment: "onRevert", + values: [ + string, + BigNumberish, + BytesLike, + BigNumberish, + BigNumberish, + BytesLike, + BytesLike + ] + ): string; + encodeFunctionData(functionFragment: "pause", values?: undefined): string; + encodeFunctionData(functionFragment: "paused", values?: undefined): string; + encodeFunctionData( + functionFragment: "pauserAddress", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "renounceTssAddressUpdater", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "send", + values: [ZetaInterfaces.SendInputStruct] + ): string; + encodeFunctionData( + functionFragment: "tssAddress", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "tssAddressUpdater", + values?: undefined + ): string; + encodeFunctionData(functionFragment: "unpause", values?: undefined): string; + encodeFunctionData( + functionFragment: "updatePauserAddress", + values: [string] + ): string; + encodeFunctionData( + functionFragment: "updateTssAddress", + values: [string] + ): string; + encodeFunctionData(functionFragment: "zetaToken", values?: undefined): string; + + decodeFunctionResult(functionFragment: "onReceive", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "onRevert", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "pause", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "paused", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "pauserAddress", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "renounceTssAddressUpdater", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "send", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "tssAddress", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "tssAddressUpdater", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "unpause", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "updatePauserAddress", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "updateTssAddress", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "zetaToken", data: BytesLike): Result; + + events: { + "Paused(address)": EventFragment; + "PauserAddressUpdated(address,address)": EventFragment; + "TSSAddressUpdated(address,address)": EventFragment; + "Unpaused(address)": EventFragment; + "ZetaReceived(bytes,uint256,address,uint256,bytes,bytes32)": EventFragment; + "ZetaReverted(address,uint256,uint256,bytes,uint256,bytes,bytes32)": EventFragment; + "ZetaSent(address,address,uint256,bytes,uint256,uint256,bytes,bytes)": EventFragment; + }; + + getEvent(nameOrSignatureOrTopic: "Paused"): EventFragment; + getEvent(nameOrSignatureOrTopic: "PauserAddressUpdated"): EventFragment; + getEvent(nameOrSignatureOrTopic: "TSSAddressUpdated"): EventFragment; + getEvent(nameOrSignatureOrTopic: "Unpaused"): EventFragment; + getEvent(nameOrSignatureOrTopic: "ZetaReceived"): EventFragment; + getEvent(nameOrSignatureOrTopic: "ZetaReverted"): EventFragment; + getEvent(nameOrSignatureOrTopic: "ZetaSent"): EventFragment; +} + +export interface PausedEventObject { + account: string; +} +export type PausedEvent = TypedEvent<[string], PausedEventObject>; + +export type PausedEventFilter = TypedEventFilter; + +export interface PauserAddressUpdatedEventObject { + updaterAddress: string; + newTssAddress: string; +} +export type PauserAddressUpdatedEvent = TypedEvent< + [string, string], + PauserAddressUpdatedEventObject +>; + +export type PauserAddressUpdatedEventFilter = + TypedEventFilter; + +export interface TSSAddressUpdatedEventObject { + zetaTxSenderAddress: string; + newTssAddress: string; +} +export type TSSAddressUpdatedEvent = TypedEvent< + [string, string], + TSSAddressUpdatedEventObject +>; + +export type TSSAddressUpdatedEventFilter = + TypedEventFilter; + +export interface UnpausedEventObject { + account: string; +} +export type UnpausedEvent = TypedEvent<[string], UnpausedEventObject>; + +export type UnpausedEventFilter = TypedEventFilter; + +export interface ZetaReceivedEventObject { + zetaTxSenderAddress: string; + sourceChainId: BigNumber; + destinationAddress: string; + zetaValueAndGas: BigNumber; + message: string; + internalSendHash: string; +} +export type ZetaReceivedEvent = TypedEvent< + [string, BigNumber, string, BigNumber, string, string], + ZetaReceivedEventObject +>; + +export type ZetaReceivedEventFilter = TypedEventFilter; + +export interface ZetaRevertedEventObject { + zetaTxSenderAddress: string; + sourceChainId: BigNumber; + destinationChainId: BigNumber; + destinationAddress: string; + zetaValueAndGas: BigNumber; + message: string; + internalSendHash: string; +} +export type ZetaRevertedEvent = TypedEvent< + [string, BigNumber, BigNumber, string, BigNumber, string, string], + ZetaRevertedEventObject +>; + +export type ZetaRevertedEventFilter = TypedEventFilter; + +export interface ZetaSentEventObject { + sourceTxOriginAddress: string; + zetaTxSenderAddress: string; + destinationChainId: BigNumber; + destinationAddress: string; + zetaValueAndGas: BigNumber; + destinationGasLimit: BigNumber; + message: string; + zetaParams: string; +} +export type ZetaSentEvent = TypedEvent< + [string, string, BigNumber, string, BigNumber, BigNumber, string, string], + ZetaSentEventObject +>; + +export type ZetaSentEventFilter = TypedEventFilter; + +export interface ZetaConnectorBase extends BaseContract { + connect(signerOrProvider: Signer | Provider | string): this; + attach(addressOrName: string): this; + deployed(): Promise; + + interface: ZetaConnectorBaseInterface; + + 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: { + onReceive( + zetaTxSenderAddress: BytesLike, + sourceChainId: BigNumberish, + destinationAddress: string, + zetaValueAndGas: BigNumberish, + message: BytesLike, + internalSendHash: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + onRevert( + zetaTxSenderAddress: string, + sourceChainId: BigNumberish, + destinationAddress: BytesLike, + destinationChainId: BigNumberish, + zetaValueAndGas: BigNumberish, + message: BytesLike, + internalSendHash: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + pause( + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + paused(overrides?: CallOverrides): Promise<[boolean]>; + + pauserAddress(overrides?: CallOverrides): Promise<[string]>; + + renounceTssAddressUpdater( + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + send( + input: ZetaInterfaces.SendInputStruct, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + tssAddress(overrides?: CallOverrides): Promise<[string]>; + + tssAddressUpdater(overrides?: CallOverrides): Promise<[string]>; + + unpause( + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + updatePauserAddress( + pauserAddress_: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + updateTssAddress( + tssAddress_: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + zetaToken(overrides?: CallOverrides): Promise<[string]>; + }; + + onReceive( + zetaTxSenderAddress: BytesLike, + sourceChainId: BigNumberish, + destinationAddress: string, + zetaValueAndGas: BigNumberish, + message: BytesLike, + internalSendHash: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + onRevert( + zetaTxSenderAddress: string, + sourceChainId: BigNumberish, + destinationAddress: BytesLike, + destinationChainId: BigNumberish, + zetaValueAndGas: BigNumberish, + message: BytesLike, + internalSendHash: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + pause( + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + paused(overrides?: CallOverrides): Promise; + + pauserAddress(overrides?: CallOverrides): Promise; + + renounceTssAddressUpdater( + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + send( + input: ZetaInterfaces.SendInputStruct, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + tssAddress(overrides?: CallOverrides): Promise; + + tssAddressUpdater(overrides?: CallOverrides): Promise; + + unpause( + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + updatePauserAddress( + pauserAddress_: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + updateTssAddress( + tssAddress_: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + zetaToken(overrides?: CallOverrides): Promise; + + callStatic: { + onReceive( + zetaTxSenderAddress: BytesLike, + sourceChainId: BigNumberish, + destinationAddress: string, + zetaValueAndGas: BigNumberish, + message: BytesLike, + internalSendHash: BytesLike, + overrides?: CallOverrides + ): Promise; + + onRevert( + zetaTxSenderAddress: string, + sourceChainId: BigNumberish, + destinationAddress: BytesLike, + destinationChainId: BigNumberish, + zetaValueAndGas: BigNumberish, + message: BytesLike, + internalSendHash: BytesLike, + overrides?: CallOverrides + ): Promise; + + pause(overrides?: CallOverrides): Promise; + + paused(overrides?: CallOverrides): Promise; + + pauserAddress(overrides?: CallOverrides): Promise; + + renounceTssAddressUpdater(overrides?: CallOverrides): Promise; + + send( + input: ZetaInterfaces.SendInputStruct, + overrides?: CallOverrides + ): Promise; + + tssAddress(overrides?: CallOverrides): Promise; + + tssAddressUpdater(overrides?: CallOverrides): Promise; + + unpause(overrides?: CallOverrides): Promise; + + updatePauserAddress( + pauserAddress_: string, + overrides?: CallOverrides + ): Promise; + + updateTssAddress( + tssAddress_: string, + overrides?: CallOverrides + ): Promise; + + zetaToken(overrides?: CallOverrides): Promise; + }; + + filters: { + "Paused(address)"(account?: null): PausedEventFilter; + Paused(account?: null): PausedEventFilter; + + "PauserAddressUpdated(address,address)"( + updaterAddress?: null, + newTssAddress?: null + ): PauserAddressUpdatedEventFilter; + PauserAddressUpdated( + updaterAddress?: null, + newTssAddress?: null + ): PauserAddressUpdatedEventFilter; + + "TSSAddressUpdated(address,address)"( + zetaTxSenderAddress?: null, + newTssAddress?: null + ): TSSAddressUpdatedEventFilter; + TSSAddressUpdated( + zetaTxSenderAddress?: null, + newTssAddress?: null + ): TSSAddressUpdatedEventFilter; + + "Unpaused(address)"(account?: null): UnpausedEventFilter; + Unpaused(account?: null): UnpausedEventFilter; + + "ZetaReceived(bytes,uint256,address,uint256,bytes,bytes32)"( + zetaTxSenderAddress?: null, + sourceChainId?: BigNumberish | null, + destinationAddress?: string | null, + zetaValueAndGas?: null, + message?: null, + internalSendHash?: BytesLike | null + ): ZetaReceivedEventFilter; + ZetaReceived( + zetaTxSenderAddress?: null, + sourceChainId?: BigNumberish | null, + destinationAddress?: string | null, + zetaValueAndGas?: null, + message?: null, + internalSendHash?: BytesLike | null + ): ZetaReceivedEventFilter; + + "ZetaReverted(address,uint256,uint256,bytes,uint256,bytes,bytes32)"( + zetaTxSenderAddress?: null, + sourceChainId?: null, + destinationChainId?: BigNumberish | null, + destinationAddress?: BytesLike | null, + zetaValueAndGas?: null, + message?: null, + internalSendHash?: BytesLike | null + ): ZetaRevertedEventFilter; + ZetaReverted( + zetaTxSenderAddress?: null, + sourceChainId?: null, + destinationChainId?: BigNumberish | null, + destinationAddress?: BytesLike | null, + zetaValueAndGas?: null, + message?: null, + internalSendHash?: BytesLike | null + ): ZetaRevertedEventFilter; + + "ZetaSent(address,address,uint256,bytes,uint256,uint256,bytes,bytes)"( + sourceTxOriginAddress?: null, + zetaTxSenderAddress?: string | null, + destinationChainId?: BigNumberish | null, + destinationAddress?: BytesLike | null, + zetaValueAndGas?: null, + destinationGasLimit?: null, + message?: null, + zetaParams?: null + ): ZetaSentEventFilter; + ZetaSent( + sourceTxOriginAddress?: null, + zetaTxSenderAddress?: string | null, + destinationChainId?: BigNumberish | null, + destinationAddress?: BytesLike | null, + zetaValueAndGas?: null, + destinationGasLimit?: null, + message?: null, + zetaParams?: null + ): ZetaSentEventFilter; + }; + + estimateGas: { + onReceive( + zetaTxSenderAddress: BytesLike, + sourceChainId: BigNumberish, + destinationAddress: string, + zetaValueAndGas: BigNumberish, + message: BytesLike, + internalSendHash: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + onRevert( + zetaTxSenderAddress: string, + sourceChainId: BigNumberish, + destinationAddress: BytesLike, + destinationChainId: BigNumberish, + zetaValueAndGas: BigNumberish, + message: BytesLike, + internalSendHash: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + pause( + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + paused(overrides?: CallOverrides): Promise; + + pauserAddress(overrides?: CallOverrides): Promise; + + renounceTssAddressUpdater( + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + send( + input: ZetaInterfaces.SendInputStruct, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + tssAddress(overrides?: CallOverrides): Promise; + + tssAddressUpdater(overrides?: CallOverrides): Promise; + + unpause( + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + updatePauserAddress( + pauserAddress_: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + updateTssAddress( + tssAddress_: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + zetaToken(overrides?: CallOverrides): Promise; + }; + + populateTransaction: { + onReceive( + zetaTxSenderAddress: BytesLike, + sourceChainId: BigNumberish, + destinationAddress: string, + zetaValueAndGas: BigNumberish, + message: BytesLike, + internalSendHash: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + onRevert( + zetaTxSenderAddress: string, + sourceChainId: BigNumberish, + destinationAddress: BytesLike, + destinationChainId: BigNumberish, + zetaValueAndGas: BigNumberish, + message: BytesLike, + internalSendHash: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + pause( + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + paused(overrides?: CallOverrides): Promise; + + pauserAddress(overrides?: CallOverrides): Promise; + + renounceTssAddressUpdater( + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + send( + input: ZetaInterfaces.SendInputStruct, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + tssAddress(overrides?: CallOverrides): Promise; + + tssAddressUpdater(overrides?: CallOverrides): Promise; + + unpause( + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + updatePauserAddress( + pauserAddress_: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + updateTssAddress( + tssAddress_: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + zetaToken(overrides?: CallOverrides): Promise; + }; +} diff --git a/packages/interfaces/typechain-types/contracts/ZetaConnector.base.sol/index.ts b/packages/interfaces/typechain-types/contracts/ZetaConnector.base.sol/index.ts new file mode 100644 index 00000000..c1f4cee0 --- /dev/null +++ b/packages/interfaces/typechain-types/contracts/ZetaConnector.base.sol/index.ts @@ -0,0 +1,4 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +export type { ZetaConnectorBase } from "./ZetaConnectorBase"; diff --git a/packages/interfaces/typechain-types/contracts/ZetaConnector.eth.sol/ZetaConnectorEth.ts b/packages/interfaces/typechain-types/contracts/ZetaConnector.eth.sol/ZetaConnectorEth.ts new file mode 100644 index 00000000..660ee13f --- /dev/null +++ b/packages/interfaces/typechain-types/contracts/ZetaConnector.eth.sol/ZetaConnectorEth.ts @@ -0,0 +1,700 @@ +/* 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, +} from "../../common"; + +export declare namespace ZetaInterfaces { + export type SendInputStruct = { + destinationChainId: BigNumberish; + destinationAddress: BytesLike; + destinationGasLimit: BigNumberish; + message: BytesLike; + zetaValueAndGas: BigNumberish; + zetaParams: BytesLike; + }; + + export type SendInputStructOutput = [ + BigNumber, + string, + BigNumber, + string, + BigNumber, + string + ] & { + destinationChainId: BigNumber; + destinationAddress: string; + destinationGasLimit: BigNumber; + message: string; + zetaValueAndGas: BigNumber; + zetaParams: string; + }; +} + +export interface ZetaConnectorEthInterface extends utils.Interface { + functions: { + "getLockedAmount()": FunctionFragment; + "onReceive(bytes,uint256,address,uint256,bytes,bytes32)": FunctionFragment; + "onRevert(address,uint256,bytes,uint256,uint256,bytes,bytes32)": FunctionFragment; + "pause()": FunctionFragment; + "paused()": FunctionFragment; + "pauserAddress()": FunctionFragment; + "renounceTssAddressUpdater()": FunctionFragment; + "send((uint256,bytes,uint256,bytes,uint256,bytes))": FunctionFragment; + "tssAddress()": FunctionFragment; + "tssAddressUpdater()": FunctionFragment; + "unpause()": FunctionFragment; + "updatePauserAddress(address)": FunctionFragment; + "updateTssAddress(address)": FunctionFragment; + "zetaToken()": FunctionFragment; + }; + + getFunction( + nameOrSignatureOrTopic: + | "getLockedAmount" + | "onReceive" + | "onRevert" + | "pause" + | "paused" + | "pauserAddress" + | "renounceTssAddressUpdater" + | "send" + | "tssAddress" + | "tssAddressUpdater" + | "unpause" + | "updatePauserAddress" + | "updateTssAddress" + | "zetaToken" + ): FunctionFragment; + + encodeFunctionData( + functionFragment: "getLockedAmount", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "onReceive", + values: [ + BytesLike, + BigNumberish, + string, + BigNumberish, + BytesLike, + BytesLike + ] + ): string; + encodeFunctionData( + functionFragment: "onRevert", + values: [ + string, + BigNumberish, + BytesLike, + BigNumberish, + BigNumberish, + BytesLike, + BytesLike + ] + ): string; + encodeFunctionData(functionFragment: "pause", values?: undefined): string; + encodeFunctionData(functionFragment: "paused", values?: undefined): string; + encodeFunctionData( + functionFragment: "pauserAddress", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "renounceTssAddressUpdater", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "send", + values: [ZetaInterfaces.SendInputStruct] + ): string; + encodeFunctionData( + functionFragment: "tssAddress", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "tssAddressUpdater", + values?: undefined + ): string; + encodeFunctionData(functionFragment: "unpause", values?: undefined): string; + encodeFunctionData( + functionFragment: "updatePauserAddress", + values: [string] + ): string; + encodeFunctionData( + functionFragment: "updateTssAddress", + values: [string] + ): string; + encodeFunctionData(functionFragment: "zetaToken", values?: undefined): string; + + decodeFunctionResult( + functionFragment: "getLockedAmount", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "onReceive", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "onRevert", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "pause", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "paused", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "pauserAddress", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "renounceTssAddressUpdater", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "send", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "tssAddress", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "tssAddressUpdater", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "unpause", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "updatePauserAddress", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "updateTssAddress", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "zetaToken", data: BytesLike): Result; + + events: { + "Paused(address)": EventFragment; + "PauserAddressUpdated(address,address)": EventFragment; + "TSSAddressUpdated(address,address)": EventFragment; + "Unpaused(address)": EventFragment; + "ZetaReceived(bytes,uint256,address,uint256,bytes,bytes32)": EventFragment; + "ZetaReverted(address,uint256,uint256,bytes,uint256,bytes,bytes32)": EventFragment; + "ZetaSent(address,address,uint256,bytes,uint256,uint256,bytes,bytes)": EventFragment; + }; + + getEvent(nameOrSignatureOrTopic: "Paused"): EventFragment; + getEvent(nameOrSignatureOrTopic: "PauserAddressUpdated"): EventFragment; + getEvent(nameOrSignatureOrTopic: "TSSAddressUpdated"): EventFragment; + getEvent(nameOrSignatureOrTopic: "Unpaused"): EventFragment; + getEvent(nameOrSignatureOrTopic: "ZetaReceived"): EventFragment; + getEvent(nameOrSignatureOrTopic: "ZetaReverted"): EventFragment; + getEvent(nameOrSignatureOrTopic: "ZetaSent"): EventFragment; +} + +export interface PausedEventObject { + account: string; +} +export type PausedEvent = TypedEvent<[string], PausedEventObject>; + +export type PausedEventFilter = TypedEventFilter; + +export interface PauserAddressUpdatedEventObject { + updaterAddress: string; + newTssAddress: string; +} +export type PauserAddressUpdatedEvent = TypedEvent< + [string, string], + PauserAddressUpdatedEventObject +>; + +export type PauserAddressUpdatedEventFilter = + TypedEventFilter; + +export interface TSSAddressUpdatedEventObject { + zetaTxSenderAddress: string; + newTssAddress: string; +} +export type TSSAddressUpdatedEvent = TypedEvent< + [string, string], + TSSAddressUpdatedEventObject +>; + +export type TSSAddressUpdatedEventFilter = + TypedEventFilter; + +export interface UnpausedEventObject { + account: string; +} +export type UnpausedEvent = TypedEvent<[string], UnpausedEventObject>; + +export type UnpausedEventFilter = TypedEventFilter; + +export interface ZetaReceivedEventObject { + zetaTxSenderAddress: string; + sourceChainId: BigNumber; + destinationAddress: string; + zetaValueAndGas: BigNumber; + message: string; + internalSendHash: string; +} +export type ZetaReceivedEvent = TypedEvent< + [string, BigNumber, string, BigNumber, string, string], + ZetaReceivedEventObject +>; + +export type ZetaReceivedEventFilter = TypedEventFilter; + +export interface ZetaRevertedEventObject { + zetaTxSenderAddress: string; + sourceChainId: BigNumber; + destinationChainId: BigNumber; + destinationAddress: string; + zetaValueAndGas: BigNumber; + message: string; + internalSendHash: string; +} +export type ZetaRevertedEvent = TypedEvent< + [string, BigNumber, BigNumber, string, BigNumber, string, string], + ZetaRevertedEventObject +>; + +export type ZetaRevertedEventFilter = TypedEventFilter; + +export interface ZetaSentEventObject { + sourceTxOriginAddress: string; + zetaTxSenderAddress: string; + destinationChainId: BigNumber; + destinationAddress: string; + zetaValueAndGas: BigNumber; + destinationGasLimit: BigNumber; + message: string; + zetaParams: string; +} +export type ZetaSentEvent = TypedEvent< + [string, string, BigNumber, string, BigNumber, BigNumber, string, string], + ZetaSentEventObject +>; + +export type ZetaSentEventFilter = TypedEventFilter; + +export interface ZetaConnectorEth extends BaseContract { + connect(signerOrProvider: Signer | Provider | string): this; + attach(addressOrName: string): this; + deployed(): Promise; + + interface: ZetaConnectorEthInterface; + + 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: { + getLockedAmount(overrides?: CallOverrides): Promise<[BigNumber]>; + + onReceive( + zetaTxSenderAddress: BytesLike, + sourceChainId: BigNumberish, + destinationAddress: string, + zetaValueAndGas: BigNumberish, + message: BytesLike, + internalSendHash: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + onRevert( + zetaTxSenderAddress: string, + sourceChainId: BigNumberish, + destinationAddress: BytesLike, + destinationChainId: BigNumberish, + zetaValueAndGas: BigNumberish, + message: BytesLike, + internalSendHash: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + pause( + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + paused(overrides?: CallOverrides): Promise<[boolean]>; + + pauserAddress(overrides?: CallOverrides): Promise<[string]>; + + renounceTssAddressUpdater( + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + send( + input: ZetaInterfaces.SendInputStruct, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + tssAddress(overrides?: CallOverrides): Promise<[string]>; + + tssAddressUpdater(overrides?: CallOverrides): Promise<[string]>; + + unpause( + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + updatePauserAddress( + pauserAddress_: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + updateTssAddress( + tssAddress_: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + zetaToken(overrides?: CallOverrides): Promise<[string]>; + }; + + getLockedAmount(overrides?: CallOverrides): Promise; + + onReceive( + zetaTxSenderAddress: BytesLike, + sourceChainId: BigNumberish, + destinationAddress: string, + zetaValueAndGas: BigNumberish, + message: BytesLike, + internalSendHash: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + onRevert( + zetaTxSenderAddress: string, + sourceChainId: BigNumberish, + destinationAddress: BytesLike, + destinationChainId: BigNumberish, + zetaValueAndGas: BigNumberish, + message: BytesLike, + internalSendHash: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + pause( + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + paused(overrides?: CallOverrides): Promise; + + pauserAddress(overrides?: CallOverrides): Promise; + + renounceTssAddressUpdater( + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + send( + input: ZetaInterfaces.SendInputStruct, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + tssAddress(overrides?: CallOverrides): Promise; + + tssAddressUpdater(overrides?: CallOverrides): Promise; + + unpause( + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + updatePauserAddress( + pauserAddress_: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + updateTssAddress( + tssAddress_: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + zetaToken(overrides?: CallOverrides): Promise; + + callStatic: { + getLockedAmount(overrides?: CallOverrides): Promise; + + onReceive( + zetaTxSenderAddress: BytesLike, + sourceChainId: BigNumberish, + destinationAddress: string, + zetaValueAndGas: BigNumberish, + message: BytesLike, + internalSendHash: BytesLike, + overrides?: CallOverrides + ): Promise; + + onRevert( + zetaTxSenderAddress: string, + sourceChainId: BigNumberish, + destinationAddress: BytesLike, + destinationChainId: BigNumberish, + zetaValueAndGas: BigNumberish, + message: BytesLike, + internalSendHash: BytesLike, + overrides?: CallOverrides + ): Promise; + + pause(overrides?: CallOverrides): Promise; + + paused(overrides?: CallOverrides): Promise; + + pauserAddress(overrides?: CallOverrides): Promise; + + renounceTssAddressUpdater(overrides?: CallOverrides): Promise; + + send( + input: ZetaInterfaces.SendInputStruct, + overrides?: CallOverrides + ): Promise; + + tssAddress(overrides?: CallOverrides): Promise; + + tssAddressUpdater(overrides?: CallOverrides): Promise; + + unpause(overrides?: CallOverrides): Promise; + + updatePauserAddress( + pauserAddress_: string, + overrides?: CallOverrides + ): Promise; + + updateTssAddress( + tssAddress_: string, + overrides?: CallOverrides + ): Promise; + + zetaToken(overrides?: CallOverrides): Promise; + }; + + filters: { + "Paused(address)"(account?: null): PausedEventFilter; + Paused(account?: null): PausedEventFilter; + + "PauserAddressUpdated(address,address)"( + updaterAddress?: null, + newTssAddress?: null + ): PauserAddressUpdatedEventFilter; + PauserAddressUpdated( + updaterAddress?: null, + newTssAddress?: null + ): PauserAddressUpdatedEventFilter; + + "TSSAddressUpdated(address,address)"( + zetaTxSenderAddress?: null, + newTssAddress?: null + ): TSSAddressUpdatedEventFilter; + TSSAddressUpdated( + zetaTxSenderAddress?: null, + newTssAddress?: null + ): TSSAddressUpdatedEventFilter; + + "Unpaused(address)"(account?: null): UnpausedEventFilter; + Unpaused(account?: null): UnpausedEventFilter; + + "ZetaReceived(bytes,uint256,address,uint256,bytes,bytes32)"( + zetaTxSenderAddress?: null, + sourceChainId?: BigNumberish | null, + destinationAddress?: string | null, + zetaValueAndGas?: null, + message?: null, + internalSendHash?: BytesLike | null + ): ZetaReceivedEventFilter; + ZetaReceived( + zetaTxSenderAddress?: null, + sourceChainId?: BigNumberish | null, + destinationAddress?: string | null, + zetaValueAndGas?: null, + message?: null, + internalSendHash?: BytesLike | null + ): ZetaReceivedEventFilter; + + "ZetaReverted(address,uint256,uint256,bytes,uint256,bytes,bytes32)"( + zetaTxSenderAddress?: null, + sourceChainId?: null, + destinationChainId?: BigNumberish | null, + destinationAddress?: BytesLike | null, + zetaValueAndGas?: null, + message?: null, + internalSendHash?: BytesLike | null + ): ZetaRevertedEventFilter; + ZetaReverted( + zetaTxSenderAddress?: null, + sourceChainId?: null, + destinationChainId?: BigNumberish | null, + destinationAddress?: BytesLike | null, + zetaValueAndGas?: null, + message?: null, + internalSendHash?: BytesLike | null + ): ZetaRevertedEventFilter; + + "ZetaSent(address,address,uint256,bytes,uint256,uint256,bytes,bytes)"( + sourceTxOriginAddress?: null, + zetaTxSenderAddress?: string | null, + destinationChainId?: BigNumberish | null, + destinationAddress?: BytesLike | null, + zetaValueAndGas?: null, + destinationGasLimit?: null, + message?: null, + zetaParams?: null + ): ZetaSentEventFilter; + ZetaSent( + sourceTxOriginAddress?: null, + zetaTxSenderAddress?: string | null, + destinationChainId?: BigNumberish | null, + destinationAddress?: BytesLike | null, + zetaValueAndGas?: null, + destinationGasLimit?: null, + message?: null, + zetaParams?: null + ): ZetaSentEventFilter; + }; + + estimateGas: { + getLockedAmount(overrides?: CallOverrides): Promise; + + onReceive( + zetaTxSenderAddress: BytesLike, + sourceChainId: BigNumberish, + destinationAddress: string, + zetaValueAndGas: BigNumberish, + message: BytesLike, + internalSendHash: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + onRevert( + zetaTxSenderAddress: string, + sourceChainId: BigNumberish, + destinationAddress: BytesLike, + destinationChainId: BigNumberish, + zetaValueAndGas: BigNumberish, + message: BytesLike, + internalSendHash: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + pause( + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + paused(overrides?: CallOverrides): Promise; + + pauserAddress(overrides?: CallOverrides): Promise; + + renounceTssAddressUpdater( + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + send( + input: ZetaInterfaces.SendInputStruct, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + tssAddress(overrides?: CallOverrides): Promise; + + tssAddressUpdater(overrides?: CallOverrides): Promise; + + unpause( + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + updatePauserAddress( + pauserAddress_: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + updateTssAddress( + tssAddress_: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + zetaToken(overrides?: CallOverrides): Promise; + }; + + populateTransaction: { + getLockedAmount(overrides?: CallOverrides): Promise; + + onReceive( + zetaTxSenderAddress: BytesLike, + sourceChainId: BigNumberish, + destinationAddress: string, + zetaValueAndGas: BigNumberish, + message: BytesLike, + internalSendHash: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + onRevert( + zetaTxSenderAddress: string, + sourceChainId: BigNumberish, + destinationAddress: BytesLike, + destinationChainId: BigNumberish, + zetaValueAndGas: BigNumberish, + message: BytesLike, + internalSendHash: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + pause( + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + paused(overrides?: CallOverrides): Promise; + + pauserAddress(overrides?: CallOverrides): Promise; + + renounceTssAddressUpdater( + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + send( + input: ZetaInterfaces.SendInputStruct, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + tssAddress(overrides?: CallOverrides): Promise; + + tssAddressUpdater(overrides?: CallOverrides): Promise; + + unpause( + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + updatePauserAddress( + pauserAddress_: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + updateTssAddress( + tssAddress_: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + zetaToken(overrides?: CallOverrides): Promise; + }; +} diff --git a/packages/interfaces/typechain-types/contracts/ZetaConnector.eth.sol/index.ts b/packages/interfaces/typechain-types/contracts/ZetaConnector.eth.sol/index.ts new file mode 100644 index 00000000..7d49381d --- /dev/null +++ b/packages/interfaces/typechain-types/contracts/ZetaConnector.eth.sol/index.ts @@ -0,0 +1,4 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +export type { ZetaConnectorEth } from "./ZetaConnectorEth"; diff --git a/packages/interfaces/typechain-types/contracts/ZetaConnector.non-eth.sol/ZetaConnectorNonEth.ts b/packages/interfaces/typechain-types/contracts/ZetaConnector.non-eth.sol/ZetaConnectorNonEth.ts new file mode 100644 index 00000000..ca8b9ead --- /dev/null +++ b/packages/interfaces/typechain-types/contracts/ZetaConnector.non-eth.sol/ZetaConnectorNonEth.ts @@ -0,0 +1,749 @@ +/* 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, +} from "../../common"; + +export declare namespace ZetaInterfaces { + export type SendInputStruct = { + destinationChainId: BigNumberish; + destinationAddress: BytesLike; + destinationGasLimit: BigNumberish; + message: BytesLike; + zetaValueAndGas: BigNumberish; + zetaParams: BytesLike; + }; + + export type SendInputStructOutput = [ + BigNumber, + string, + BigNumber, + string, + BigNumber, + string + ] & { + destinationChainId: BigNumber; + destinationAddress: string; + destinationGasLimit: BigNumber; + message: string; + zetaValueAndGas: BigNumber; + zetaParams: string; + }; +} + +export interface ZetaConnectorNonEthInterface extends utils.Interface { + functions: { + "getLockedAmount()": FunctionFragment; + "maxSupply()": FunctionFragment; + "onReceive(bytes,uint256,address,uint256,bytes,bytes32)": FunctionFragment; + "onRevert(address,uint256,bytes,uint256,uint256,bytes,bytes32)": FunctionFragment; + "pause()": FunctionFragment; + "paused()": FunctionFragment; + "pauserAddress()": FunctionFragment; + "renounceTssAddressUpdater()": FunctionFragment; + "send((uint256,bytes,uint256,bytes,uint256,bytes))": FunctionFragment; + "setMaxSupply(uint256)": FunctionFragment; + "tssAddress()": FunctionFragment; + "tssAddressUpdater()": FunctionFragment; + "unpause()": FunctionFragment; + "updatePauserAddress(address)": FunctionFragment; + "updateTssAddress(address)": FunctionFragment; + "zetaToken()": FunctionFragment; + }; + + getFunction( + nameOrSignatureOrTopic: + | "getLockedAmount" + | "maxSupply" + | "onReceive" + | "onRevert" + | "pause" + | "paused" + | "pauserAddress" + | "renounceTssAddressUpdater" + | "send" + | "setMaxSupply" + | "tssAddress" + | "tssAddressUpdater" + | "unpause" + | "updatePauserAddress" + | "updateTssAddress" + | "zetaToken" + ): FunctionFragment; + + encodeFunctionData( + functionFragment: "getLockedAmount", + values?: undefined + ): string; + encodeFunctionData(functionFragment: "maxSupply", values?: undefined): string; + encodeFunctionData( + functionFragment: "onReceive", + values: [ + BytesLike, + BigNumberish, + string, + BigNumberish, + BytesLike, + BytesLike + ] + ): string; + encodeFunctionData( + functionFragment: "onRevert", + values: [ + string, + BigNumberish, + BytesLike, + BigNumberish, + BigNumberish, + BytesLike, + BytesLike + ] + ): string; + encodeFunctionData(functionFragment: "pause", values?: undefined): string; + encodeFunctionData(functionFragment: "paused", values?: undefined): string; + encodeFunctionData( + functionFragment: "pauserAddress", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "renounceTssAddressUpdater", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "send", + values: [ZetaInterfaces.SendInputStruct] + ): string; + encodeFunctionData( + functionFragment: "setMaxSupply", + values: [BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "tssAddress", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "tssAddressUpdater", + values?: undefined + ): string; + encodeFunctionData(functionFragment: "unpause", values?: undefined): string; + encodeFunctionData( + functionFragment: "updatePauserAddress", + values: [string] + ): string; + encodeFunctionData( + functionFragment: "updateTssAddress", + values: [string] + ): string; + encodeFunctionData(functionFragment: "zetaToken", values?: undefined): string; + + decodeFunctionResult( + functionFragment: "getLockedAmount", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "maxSupply", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "onReceive", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "onRevert", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "pause", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "paused", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "pauserAddress", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "renounceTssAddressUpdater", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "send", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "setMaxSupply", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "tssAddress", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "tssAddressUpdater", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "unpause", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "updatePauserAddress", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "updateTssAddress", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "zetaToken", data: BytesLike): Result; + + events: { + "Paused(address)": EventFragment; + "PauserAddressUpdated(address,address)": EventFragment; + "TSSAddressUpdated(address,address)": EventFragment; + "Unpaused(address)": EventFragment; + "ZetaReceived(bytes,uint256,address,uint256,bytes,bytes32)": EventFragment; + "ZetaReverted(address,uint256,uint256,bytes,uint256,bytes,bytes32)": EventFragment; + "ZetaSent(address,address,uint256,bytes,uint256,uint256,bytes,bytes)": EventFragment; + }; + + getEvent(nameOrSignatureOrTopic: "Paused"): EventFragment; + getEvent(nameOrSignatureOrTopic: "PauserAddressUpdated"): EventFragment; + getEvent(nameOrSignatureOrTopic: "TSSAddressUpdated"): EventFragment; + getEvent(nameOrSignatureOrTopic: "Unpaused"): EventFragment; + getEvent(nameOrSignatureOrTopic: "ZetaReceived"): EventFragment; + getEvent(nameOrSignatureOrTopic: "ZetaReverted"): EventFragment; + getEvent(nameOrSignatureOrTopic: "ZetaSent"): EventFragment; +} + +export interface PausedEventObject { + account: string; +} +export type PausedEvent = TypedEvent<[string], PausedEventObject>; + +export type PausedEventFilter = TypedEventFilter; + +export interface PauserAddressUpdatedEventObject { + updaterAddress: string; + newTssAddress: string; +} +export type PauserAddressUpdatedEvent = TypedEvent< + [string, string], + PauserAddressUpdatedEventObject +>; + +export type PauserAddressUpdatedEventFilter = + TypedEventFilter; + +export interface TSSAddressUpdatedEventObject { + zetaTxSenderAddress: string; + newTssAddress: string; +} +export type TSSAddressUpdatedEvent = TypedEvent< + [string, string], + TSSAddressUpdatedEventObject +>; + +export type TSSAddressUpdatedEventFilter = + TypedEventFilter; + +export interface UnpausedEventObject { + account: string; +} +export type UnpausedEvent = TypedEvent<[string], UnpausedEventObject>; + +export type UnpausedEventFilter = TypedEventFilter; + +export interface ZetaReceivedEventObject { + zetaTxSenderAddress: string; + sourceChainId: BigNumber; + destinationAddress: string; + zetaValueAndGas: BigNumber; + message: string; + internalSendHash: string; +} +export type ZetaReceivedEvent = TypedEvent< + [string, BigNumber, string, BigNumber, string, string], + ZetaReceivedEventObject +>; + +export type ZetaReceivedEventFilter = TypedEventFilter; + +export interface ZetaRevertedEventObject { + zetaTxSenderAddress: string; + sourceChainId: BigNumber; + destinationChainId: BigNumber; + destinationAddress: string; + zetaValueAndGas: BigNumber; + message: string; + internalSendHash: string; +} +export type ZetaRevertedEvent = TypedEvent< + [string, BigNumber, BigNumber, string, BigNumber, string, string], + ZetaRevertedEventObject +>; + +export type ZetaRevertedEventFilter = TypedEventFilter; + +export interface ZetaSentEventObject { + sourceTxOriginAddress: string; + zetaTxSenderAddress: string; + destinationChainId: BigNumber; + destinationAddress: string; + zetaValueAndGas: BigNumber; + destinationGasLimit: BigNumber; + message: string; + zetaParams: string; +} +export type ZetaSentEvent = TypedEvent< + [string, string, BigNumber, string, BigNumber, BigNumber, string, string], + ZetaSentEventObject +>; + +export type ZetaSentEventFilter = TypedEventFilter; + +export interface ZetaConnectorNonEth extends BaseContract { + connect(signerOrProvider: Signer | Provider | string): this; + attach(addressOrName: string): this; + deployed(): Promise; + + interface: ZetaConnectorNonEthInterface; + + 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: { + getLockedAmount(overrides?: CallOverrides): Promise<[BigNumber]>; + + maxSupply(overrides?: CallOverrides): Promise<[BigNumber]>; + + onReceive( + zetaTxSenderAddress: BytesLike, + sourceChainId: BigNumberish, + destinationAddress: string, + zetaValueAndGas: BigNumberish, + message: BytesLike, + internalSendHash: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + onRevert( + zetaTxSenderAddress: string, + sourceChainId: BigNumberish, + destinationAddress: BytesLike, + destinationChainId: BigNumberish, + zetaValueAndGas: BigNumberish, + message: BytesLike, + internalSendHash: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + pause( + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + paused(overrides?: CallOverrides): Promise<[boolean]>; + + pauserAddress(overrides?: CallOverrides): Promise<[string]>; + + renounceTssAddressUpdater( + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + send( + input: ZetaInterfaces.SendInputStruct, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + setMaxSupply( + maxSupply_: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + tssAddress(overrides?: CallOverrides): Promise<[string]>; + + tssAddressUpdater(overrides?: CallOverrides): Promise<[string]>; + + unpause( + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + updatePauserAddress( + pauserAddress_: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + updateTssAddress( + tssAddress_: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + zetaToken(overrides?: CallOverrides): Promise<[string]>; + }; + + getLockedAmount(overrides?: CallOverrides): Promise; + + maxSupply(overrides?: CallOverrides): Promise; + + onReceive( + zetaTxSenderAddress: BytesLike, + sourceChainId: BigNumberish, + destinationAddress: string, + zetaValueAndGas: BigNumberish, + message: BytesLike, + internalSendHash: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + onRevert( + zetaTxSenderAddress: string, + sourceChainId: BigNumberish, + destinationAddress: BytesLike, + destinationChainId: BigNumberish, + zetaValueAndGas: BigNumberish, + message: BytesLike, + internalSendHash: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + pause( + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + paused(overrides?: CallOverrides): Promise; + + pauserAddress(overrides?: CallOverrides): Promise; + + renounceTssAddressUpdater( + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + send( + input: ZetaInterfaces.SendInputStruct, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + setMaxSupply( + maxSupply_: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + tssAddress(overrides?: CallOverrides): Promise; + + tssAddressUpdater(overrides?: CallOverrides): Promise; + + unpause( + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + updatePauserAddress( + pauserAddress_: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + updateTssAddress( + tssAddress_: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + zetaToken(overrides?: CallOverrides): Promise; + + callStatic: { + getLockedAmount(overrides?: CallOverrides): Promise; + + maxSupply(overrides?: CallOverrides): Promise; + + onReceive( + zetaTxSenderAddress: BytesLike, + sourceChainId: BigNumberish, + destinationAddress: string, + zetaValueAndGas: BigNumberish, + message: BytesLike, + internalSendHash: BytesLike, + overrides?: CallOverrides + ): Promise; + + onRevert( + zetaTxSenderAddress: string, + sourceChainId: BigNumberish, + destinationAddress: BytesLike, + destinationChainId: BigNumberish, + zetaValueAndGas: BigNumberish, + message: BytesLike, + internalSendHash: BytesLike, + overrides?: CallOverrides + ): Promise; + + pause(overrides?: CallOverrides): Promise; + + paused(overrides?: CallOverrides): Promise; + + pauserAddress(overrides?: CallOverrides): Promise; + + renounceTssAddressUpdater(overrides?: CallOverrides): Promise; + + send( + input: ZetaInterfaces.SendInputStruct, + overrides?: CallOverrides + ): Promise; + + setMaxSupply( + maxSupply_: BigNumberish, + overrides?: CallOverrides + ): Promise; + + tssAddress(overrides?: CallOverrides): Promise; + + tssAddressUpdater(overrides?: CallOverrides): Promise; + + unpause(overrides?: CallOverrides): Promise; + + updatePauserAddress( + pauserAddress_: string, + overrides?: CallOverrides + ): Promise; + + updateTssAddress( + tssAddress_: string, + overrides?: CallOverrides + ): Promise; + + zetaToken(overrides?: CallOverrides): Promise; + }; + + filters: { + "Paused(address)"(account?: null): PausedEventFilter; + Paused(account?: null): PausedEventFilter; + + "PauserAddressUpdated(address,address)"( + updaterAddress?: null, + newTssAddress?: null + ): PauserAddressUpdatedEventFilter; + PauserAddressUpdated( + updaterAddress?: null, + newTssAddress?: null + ): PauserAddressUpdatedEventFilter; + + "TSSAddressUpdated(address,address)"( + zetaTxSenderAddress?: null, + newTssAddress?: null + ): TSSAddressUpdatedEventFilter; + TSSAddressUpdated( + zetaTxSenderAddress?: null, + newTssAddress?: null + ): TSSAddressUpdatedEventFilter; + + "Unpaused(address)"(account?: null): UnpausedEventFilter; + Unpaused(account?: null): UnpausedEventFilter; + + "ZetaReceived(bytes,uint256,address,uint256,bytes,bytes32)"( + zetaTxSenderAddress?: null, + sourceChainId?: BigNumberish | null, + destinationAddress?: string | null, + zetaValueAndGas?: null, + message?: null, + internalSendHash?: BytesLike | null + ): ZetaReceivedEventFilter; + ZetaReceived( + zetaTxSenderAddress?: null, + sourceChainId?: BigNumberish | null, + destinationAddress?: string | null, + zetaValueAndGas?: null, + message?: null, + internalSendHash?: BytesLike | null + ): ZetaReceivedEventFilter; + + "ZetaReverted(address,uint256,uint256,bytes,uint256,bytes,bytes32)"( + zetaTxSenderAddress?: null, + sourceChainId?: null, + destinationChainId?: BigNumberish | null, + destinationAddress?: BytesLike | null, + zetaValueAndGas?: null, + message?: null, + internalSendHash?: BytesLike | null + ): ZetaRevertedEventFilter; + ZetaReverted( + zetaTxSenderAddress?: null, + sourceChainId?: null, + destinationChainId?: BigNumberish | null, + destinationAddress?: BytesLike | null, + zetaValueAndGas?: null, + message?: null, + internalSendHash?: BytesLike | null + ): ZetaRevertedEventFilter; + + "ZetaSent(address,address,uint256,bytes,uint256,uint256,bytes,bytes)"( + sourceTxOriginAddress?: null, + zetaTxSenderAddress?: string | null, + destinationChainId?: BigNumberish | null, + destinationAddress?: BytesLike | null, + zetaValueAndGas?: null, + destinationGasLimit?: null, + message?: null, + zetaParams?: null + ): ZetaSentEventFilter; + ZetaSent( + sourceTxOriginAddress?: null, + zetaTxSenderAddress?: string | null, + destinationChainId?: BigNumberish | null, + destinationAddress?: BytesLike | null, + zetaValueAndGas?: null, + destinationGasLimit?: null, + message?: null, + zetaParams?: null + ): ZetaSentEventFilter; + }; + + estimateGas: { + getLockedAmount(overrides?: CallOverrides): Promise; + + maxSupply(overrides?: CallOverrides): Promise; + + onReceive( + zetaTxSenderAddress: BytesLike, + sourceChainId: BigNumberish, + destinationAddress: string, + zetaValueAndGas: BigNumberish, + message: BytesLike, + internalSendHash: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + onRevert( + zetaTxSenderAddress: string, + sourceChainId: BigNumberish, + destinationAddress: BytesLike, + destinationChainId: BigNumberish, + zetaValueAndGas: BigNumberish, + message: BytesLike, + internalSendHash: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + pause( + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + paused(overrides?: CallOverrides): Promise; + + pauserAddress(overrides?: CallOverrides): Promise; + + renounceTssAddressUpdater( + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + send( + input: ZetaInterfaces.SendInputStruct, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + setMaxSupply( + maxSupply_: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + tssAddress(overrides?: CallOverrides): Promise; + + tssAddressUpdater(overrides?: CallOverrides): Promise; + + unpause( + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + updatePauserAddress( + pauserAddress_: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + updateTssAddress( + tssAddress_: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + zetaToken(overrides?: CallOverrides): Promise; + }; + + populateTransaction: { + getLockedAmount(overrides?: CallOverrides): Promise; + + maxSupply(overrides?: CallOverrides): Promise; + + onReceive( + zetaTxSenderAddress: BytesLike, + sourceChainId: BigNumberish, + destinationAddress: string, + zetaValueAndGas: BigNumberish, + message: BytesLike, + internalSendHash: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + onRevert( + zetaTxSenderAddress: string, + sourceChainId: BigNumberish, + destinationAddress: BytesLike, + destinationChainId: BigNumberish, + zetaValueAndGas: BigNumberish, + message: BytesLike, + internalSendHash: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + pause( + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + paused(overrides?: CallOverrides): Promise; + + pauserAddress(overrides?: CallOverrides): Promise; + + renounceTssAddressUpdater( + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + send( + input: ZetaInterfaces.SendInputStruct, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + setMaxSupply( + maxSupply_: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + tssAddress(overrides?: CallOverrides): Promise; + + tssAddressUpdater(overrides?: CallOverrides): Promise; + + unpause( + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + updatePauserAddress( + pauserAddress_: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + updateTssAddress( + tssAddress_: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + zetaToken(overrides?: CallOverrides): Promise; + }; +} diff --git a/packages/interfaces/typechain-types/contracts/ZetaConnector.non-eth.sol/index.ts b/packages/interfaces/typechain-types/contracts/ZetaConnector.non-eth.sol/index.ts new file mode 100644 index 00000000..7932c27c --- /dev/null +++ b/packages/interfaces/typechain-types/contracts/ZetaConnector.non-eth.sol/index.ts @@ -0,0 +1,4 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +export type { ZetaConnectorNonEth } from "./ZetaConnectorNonEth"; diff --git a/packages/interfaces/typechain-types/contracts/ZetaInteractor.ts b/packages/interfaces/typechain-types/contracts/ZetaInteractor.ts new file mode 100644 index 00000000..f9bbb74f --- /dev/null +++ b/packages/interfaces/typechain-types/contracts/ZetaInteractor.ts @@ -0,0 +1,268 @@ +/* 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, +} from "../common"; + +export interface ZetaInteractorInterface extends utils.Interface { + functions: { + "connector()": FunctionFragment; + "interactorsByChainId(uint256)": FunctionFragment; + "owner()": FunctionFragment; + "renounceOwnership()": FunctionFragment; + "setInteractorByChainId(uint256,bytes)": FunctionFragment; + "transferOwnership(address)": FunctionFragment; + }; + + getFunction( + nameOrSignatureOrTopic: + | "connector" + | "interactorsByChainId" + | "owner" + | "renounceOwnership" + | "setInteractorByChainId" + | "transferOwnership" + ): FunctionFragment; + + encodeFunctionData(functionFragment: "connector", values?: undefined): string; + encodeFunctionData( + functionFragment: "interactorsByChainId", + values: [BigNumberish] + ): string; + encodeFunctionData(functionFragment: "owner", values?: undefined): string; + encodeFunctionData( + functionFragment: "renounceOwnership", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "setInteractorByChainId", + values: [BigNumberish, BytesLike] + ): string; + encodeFunctionData( + functionFragment: "transferOwnership", + values: [string] + ): string; + + decodeFunctionResult(functionFragment: "connector", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "interactorsByChainId", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "owner", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "renounceOwnership", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "setInteractorByChainId", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "transferOwnership", + data: BytesLike + ): Result; + + events: { + "OwnershipTransferred(address,address)": EventFragment; + }; + + getEvent(nameOrSignatureOrTopic: "OwnershipTransferred"): EventFragment; +} + +export interface OwnershipTransferredEventObject { + previousOwner: string; + newOwner: string; +} +export type OwnershipTransferredEvent = TypedEvent< + [string, string], + OwnershipTransferredEventObject +>; + +export type OwnershipTransferredEventFilter = + TypedEventFilter; + +export interface ZetaInteractor extends BaseContract { + connect(signerOrProvider: Signer | Provider | string): this; + attach(addressOrName: string): this; + deployed(): Promise; + + interface: ZetaInteractorInterface; + + 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: { + connector(overrides?: CallOverrides): Promise<[string]>; + + interactorsByChainId( + arg0: BigNumberish, + overrides?: CallOverrides + ): Promise<[string]>; + + owner(overrides?: CallOverrides): Promise<[string]>; + + renounceOwnership( + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + setInteractorByChainId( + destinationChainId: BigNumberish, + contractAddress: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + transferOwnership( + newOwner: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + }; + + connector(overrides?: CallOverrides): Promise; + + interactorsByChainId( + arg0: BigNumberish, + overrides?: CallOverrides + ): Promise; + + owner(overrides?: CallOverrides): Promise; + + renounceOwnership( + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + setInteractorByChainId( + destinationChainId: BigNumberish, + contractAddress: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + transferOwnership( + newOwner: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + callStatic: { + connector(overrides?: CallOverrides): Promise; + + interactorsByChainId( + arg0: BigNumberish, + overrides?: CallOverrides + ): Promise; + + owner(overrides?: CallOverrides): Promise; + + renounceOwnership(overrides?: CallOverrides): Promise; + + setInteractorByChainId( + destinationChainId: BigNumberish, + contractAddress: BytesLike, + overrides?: CallOverrides + ): Promise; + + transferOwnership( + newOwner: string, + overrides?: CallOverrides + ): Promise; + }; + + filters: { + "OwnershipTransferred(address,address)"( + previousOwner?: string | null, + newOwner?: string | null + ): OwnershipTransferredEventFilter; + OwnershipTransferred( + previousOwner?: string | null, + newOwner?: string | null + ): OwnershipTransferredEventFilter; + }; + + estimateGas: { + connector(overrides?: CallOverrides): Promise; + + interactorsByChainId( + arg0: BigNumberish, + overrides?: CallOverrides + ): Promise; + + owner(overrides?: CallOverrides): Promise; + + renounceOwnership( + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + setInteractorByChainId( + destinationChainId: BigNumberish, + contractAddress: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + transferOwnership( + newOwner: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + }; + + populateTransaction: { + connector(overrides?: CallOverrides): Promise; + + interactorsByChainId( + arg0: BigNumberish, + overrides?: CallOverrides + ): Promise; + + owner(overrides?: CallOverrides): Promise; + + renounceOwnership( + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + setInteractorByChainId( + destinationChainId: BigNumberish, + contractAddress: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + transferOwnership( + newOwner: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + }; +} diff --git a/packages/interfaces/typechain-types/contracts/ZetaTokenConsumerUniV2.strategy.sol/ZetaTokenConsumerUniV2.ts b/packages/interfaces/typechain-types/contracts/ZetaTokenConsumerUniV2.strategy.sol/ZetaTokenConsumerUniV2.ts new file mode 100644 index 00000000..13e5c7d3 --- /dev/null +++ b/packages/interfaces/typechain-types/contracts/ZetaTokenConsumerUniV2.strategy.sol/ZetaTokenConsumerUniV2.ts @@ -0,0 +1,377 @@ +/* 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, +} from "../../common"; + +export interface ZetaTokenConsumerUniV2Interface extends utils.Interface { + functions: { + "getEthFromZeta(address,uint256,uint256)": FunctionFragment; + "getTokenFromZeta(address,uint256,address,uint256)": FunctionFragment; + "getZetaFromEth(address,uint256)": FunctionFragment; + "getZetaFromToken(address,uint256,address,uint256)": FunctionFragment; + "zetaToken()": FunctionFragment; + }; + + getFunction( + nameOrSignatureOrTopic: + | "getEthFromZeta" + | "getTokenFromZeta" + | "getZetaFromEth" + | "getZetaFromToken" + | "zetaToken" + ): FunctionFragment; + + encodeFunctionData( + functionFragment: "getEthFromZeta", + values: [string, BigNumberish, BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "getTokenFromZeta", + values: [string, BigNumberish, string, BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "getZetaFromEth", + values: [string, BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "getZetaFromToken", + values: [string, BigNumberish, string, BigNumberish] + ): string; + encodeFunctionData(functionFragment: "zetaToken", values?: undefined): string; + + decodeFunctionResult( + functionFragment: "getEthFromZeta", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "getTokenFromZeta", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "getZetaFromEth", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "getZetaFromToken", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "zetaToken", data: BytesLike): Result; + + events: { + "EthExchangedForZeta(uint256,uint256)": EventFragment; + "TokenExchangedForZeta(address,uint256,uint256)": EventFragment; + "ZetaExchangedForEth(uint256,uint256)": EventFragment; + "ZetaExchangedForToken(address,uint256,uint256)": EventFragment; + }; + + getEvent(nameOrSignatureOrTopic: "EthExchangedForZeta"): EventFragment; + getEvent(nameOrSignatureOrTopic: "TokenExchangedForZeta"): EventFragment; + getEvent(nameOrSignatureOrTopic: "ZetaExchangedForEth"): EventFragment; + getEvent(nameOrSignatureOrTopic: "ZetaExchangedForToken"): EventFragment; +} + +export interface EthExchangedForZetaEventObject { + amountIn: BigNumber; + amountOut: BigNumber; +} +export type EthExchangedForZetaEvent = TypedEvent< + [BigNumber, BigNumber], + EthExchangedForZetaEventObject +>; + +export type EthExchangedForZetaEventFilter = + TypedEventFilter; + +export interface TokenExchangedForZetaEventObject { + token: string; + amountIn: BigNumber; + amountOut: BigNumber; +} +export type TokenExchangedForZetaEvent = TypedEvent< + [string, BigNumber, BigNumber], + TokenExchangedForZetaEventObject +>; + +export type TokenExchangedForZetaEventFilter = + TypedEventFilter; + +export interface ZetaExchangedForEthEventObject { + amountIn: BigNumber; + amountOut: BigNumber; +} +export type ZetaExchangedForEthEvent = TypedEvent< + [BigNumber, BigNumber], + ZetaExchangedForEthEventObject +>; + +export type ZetaExchangedForEthEventFilter = + TypedEventFilter; + +export interface ZetaExchangedForTokenEventObject { + token: string; + amountIn: BigNumber; + amountOut: BigNumber; +} +export type ZetaExchangedForTokenEvent = TypedEvent< + [string, BigNumber, BigNumber], + ZetaExchangedForTokenEventObject +>; + +export type ZetaExchangedForTokenEventFilter = + TypedEventFilter; + +export interface ZetaTokenConsumerUniV2 extends BaseContract { + connect(signerOrProvider: Signer | Provider | string): this; + attach(addressOrName: string): this; + deployed(): Promise; + + interface: ZetaTokenConsumerUniV2Interface; + + 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: { + getEthFromZeta( + destinationAddress: string, + minAmountOut: BigNumberish, + zetaTokenAmount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + getTokenFromZeta( + destinationAddress: string, + minAmountOut: BigNumberish, + outputToken: string, + zetaTokenAmount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + getZetaFromEth( + destinationAddress: string, + minAmountOut: BigNumberish, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + + getZetaFromToken( + destinationAddress: string, + minAmountOut: BigNumberish, + inputToken: string, + inputTokenAmount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + zetaToken(overrides?: CallOverrides): Promise<[string]>; + }; + + getEthFromZeta( + destinationAddress: string, + minAmountOut: BigNumberish, + zetaTokenAmount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + getTokenFromZeta( + destinationAddress: string, + minAmountOut: BigNumberish, + outputToken: string, + zetaTokenAmount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + getZetaFromEth( + destinationAddress: string, + minAmountOut: BigNumberish, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + + getZetaFromToken( + destinationAddress: string, + minAmountOut: BigNumberish, + inputToken: string, + inputTokenAmount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + zetaToken(overrides?: CallOverrides): Promise; + + callStatic: { + getEthFromZeta( + destinationAddress: string, + minAmountOut: BigNumberish, + zetaTokenAmount: BigNumberish, + overrides?: CallOverrides + ): Promise; + + getTokenFromZeta( + destinationAddress: string, + minAmountOut: BigNumberish, + outputToken: string, + zetaTokenAmount: BigNumberish, + overrides?: CallOverrides + ): Promise; + + getZetaFromEth( + destinationAddress: string, + minAmountOut: BigNumberish, + overrides?: CallOverrides + ): Promise; + + getZetaFromToken( + destinationAddress: string, + minAmountOut: BigNumberish, + inputToken: string, + inputTokenAmount: BigNumberish, + overrides?: CallOverrides + ): Promise; + + zetaToken(overrides?: CallOverrides): Promise; + }; + + filters: { + "EthExchangedForZeta(uint256,uint256)"( + amountIn?: null, + amountOut?: null + ): EthExchangedForZetaEventFilter; + EthExchangedForZeta( + amountIn?: null, + amountOut?: null + ): EthExchangedForZetaEventFilter; + + "TokenExchangedForZeta(address,uint256,uint256)"( + token?: null, + amountIn?: null, + amountOut?: null + ): TokenExchangedForZetaEventFilter; + TokenExchangedForZeta( + token?: null, + amountIn?: null, + amountOut?: null + ): TokenExchangedForZetaEventFilter; + + "ZetaExchangedForEth(uint256,uint256)"( + amountIn?: null, + amountOut?: null + ): ZetaExchangedForEthEventFilter; + ZetaExchangedForEth( + amountIn?: null, + amountOut?: null + ): ZetaExchangedForEthEventFilter; + + "ZetaExchangedForToken(address,uint256,uint256)"( + token?: null, + amountIn?: null, + amountOut?: null + ): ZetaExchangedForTokenEventFilter; + ZetaExchangedForToken( + token?: null, + amountIn?: null, + amountOut?: null + ): ZetaExchangedForTokenEventFilter; + }; + + estimateGas: { + getEthFromZeta( + destinationAddress: string, + minAmountOut: BigNumberish, + zetaTokenAmount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + getTokenFromZeta( + destinationAddress: string, + minAmountOut: BigNumberish, + outputToken: string, + zetaTokenAmount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + getZetaFromEth( + destinationAddress: string, + minAmountOut: BigNumberish, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + + getZetaFromToken( + destinationAddress: string, + minAmountOut: BigNumberish, + inputToken: string, + inputTokenAmount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + zetaToken(overrides?: CallOverrides): Promise; + }; + + populateTransaction: { + getEthFromZeta( + destinationAddress: string, + minAmountOut: BigNumberish, + zetaTokenAmount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + getTokenFromZeta( + destinationAddress: string, + minAmountOut: BigNumberish, + outputToken: string, + zetaTokenAmount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + getZetaFromEth( + destinationAddress: string, + minAmountOut: BigNumberish, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + + getZetaFromToken( + destinationAddress: string, + minAmountOut: BigNumberish, + inputToken: string, + inputTokenAmount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + zetaToken(overrides?: CallOverrides): Promise; + }; +} diff --git a/packages/interfaces/typechain-types/contracts/ZetaTokenConsumerUniV2.strategy.sol/ZetaTokenConsumerUniV2Errors.ts b/packages/interfaces/typechain-types/contracts/ZetaTokenConsumerUniV2.strategy.sol/ZetaTokenConsumerUniV2Errors.ts new file mode 100644 index 00000000..8ea365ea --- /dev/null +++ b/packages/interfaces/typechain-types/contracts/ZetaTokenConsumerUniV2.strategy.sol/ZetaTokenConsumerUniV2Errors.ts @@ -0,0 +1,55 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import type { BaseContract, Signer, utils } from "ethers"; + +import type { Listener, Provider } from "@ethersproject/providers"; +import type { + TypedEventFilter, + TypedEvent, + TypedListener, + OnEvent, +} from "../../common"; + +export interface ZetaTokenConsumerUniV2ErrorsInterface extends utils.Interface { + functions: {}; + + events: {}; +} + +export interface ZetaTokenConsumerUniV2Errors extends BaseContract { + connect(signerOrProvider: Signer | Provider | string): this; + attach(addressOrName: string): this; + deployed(): Promise; + + interface: ZetaTokenConsumerUniV2ErrorsInterface; + + 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: {}; + + callStatic: {}; + + filters: {}; + + estimateGas: {}; + + populateTransaction: {}; +} diff --git a/packages/interfaces/typechain-types/contracts/ZetaTokenConsumerUniV2.strategy.sol/index.ts b/packages/interfaces/typechain-types/contracts/ZetaTokenConsumerUniV2.strategy.sol/index.ts new file mode 100644 index 00000000..8e2b13b0 --- /dev/null +++ b/packages/interfaces/typechain-types/contracts/ZetaTokenConsumerUniV2.strategy.sol/index.ts @@ -0,0 +1,5 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +export type { ZetaTokenConsumerUniV2 } from "./ZetaTokenConsumerUniV2"; +export type { ZetaTokenConsumerUniV2Errors } from "./ZetaTokenConsumerUniV2Errors"; diff --git a/packages/interfaces/typechain-types/contracts/ZetaTokenConsumerUniV3.strategy.sol/WETH9.ts b/packages/interfaces/typechain-types/contracts/ZetaTokenConsumerUniV3.strategy.sol/WETH9.ts new file mode 100644 index 00000000..566cde13 --- /dev/null +++ b/packages/interfaces/typechain-types/contracts/ZetaTokenConsumerUniV3.strategy.sol/WETH9.ts @@ -0,0 +1,99 @@ +/* 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, +} from "../../common"; + +export interface WETH9Interface extends utils.Interface { + functions: { + "withdraw(uint256)": FunctionFragment; + }; + + getFunction(nameOrSignatureOrTopic: "withdraw"): FunctionFragment; + + encodeFunctionData( + functionFragment: "withdraw", + values: [BigNumberish] + ): string; + + decodeFunctionResult(functionFragment: "withdraw", data: BytesLike): Result; + + events: {}; +} + +export interface WETH9 extends BaseContract { + connect(signerOrProvider: Signer | Provider | string): this; + attach(addressOrName: string): this; + deployed(): Promise; + + interface: WETH9Interface; + + 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: { + withdraw( + wad: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + }; + + withdraw( + wad: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + callStatic: { + withdraw(wad: BigNumberish, overrides?: CallOverrides): Promise; + }; + + filters: {}; + + estimateGas: { + withdraw( + wad: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + }; + + populateTransaction: { + withdraw( + wad: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + }; +} diff --git a/packages/interfaces/typechain-types/contracts/ZetaTokenConsumerUniV3.strategy.sol/ZetaTokenConsumerUniV3.ts b/packages/interfaces/typechain-types/contracts/ZetaTokenConsumerUniV3.strategy.sol/ZetaTokenConsumerUniV3.ts new file mode 100644 index 00000000..de49351e --- /dev/null +++ b/packages/interfaces/typechain-types/contracts/ZetaTokenConsumerUniV3.strategy.sol/ZetaTokenConsumerUniV3.ts @@ -0,0 +1,451 @@ +/* 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, +} from "../../common"; + +export interface ZetaTokenConsumerUniV3Interface extends utils.Interface { + functions: { + "getEthFromZeta(address,uint256,uint256)": FunctionFragment; + "getTokenFromZeta(address,uint256,address,uint256)": FunctionFragment; + "getZetaFromEth(address,uint256)": FunctionFragment; + "getZetaFromToken(address,uint256,address,uint256)": FunctionFragment; + "quoter()": FunctionFragment; + "tokenPoolFee()": FunctionFragment; + "uniswapV3Router()": FunctionFragment; + "zetaPoolFee()": FunctionFragment; + "zetaToken()": FunctionFragment; + }; + + getFunction( + nameOrSignatureOrTopic: + | "getEthFromZeta" + | "getTokenFromZeta" + | "getZetaFromEth" + | "getZetaFromToken" + | "quoter" + | "tokenPoolFee" + | "uniswapV3Router" + | "zetaPoolFee" + | "zetaToken" + ): FunctionFragment; + + encodeFunctionData( + functionFragment: "getEthFromZeta", + values: [string, BigNumberish, BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "getTokenFromZeta", + values: [string, BigNumberish, string, BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "getZetaFromEth", + values: [string, BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "getZetaFromToken", + values: [string, BigNumberish, string, BigNumberish] + ): string; + encodeFunctionData(functionFragment: "quoter", values?: undefined): string; + encodeFunctionData( + functionFragment: "tokenPoolFee", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "uniswapV3Router", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "zetaPoolFee", + values?: undefined + ): string; + encodeFunctionData(functionFragment: "zetaToken", values?: undefined): string; + + decodeFunctionResult( + functionFragment: "getEthFromZeta", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "getTokenFromZeta", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "getZetaFromEth", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "getZetaFromToken", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "quoter", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "tokenPoolFee", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "uniswapV3Router", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "zetaPoolFee", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "zetaToken", data: BytesLike): Result; + + events: { + "EthExchangedForZeta(uint256,uint256)": EventFragment; + "TokenExchangedForZeta(address,uint256,uint256)": EventFragment; + "ZetaExchangedForEth(uint256,uint256)": EventFragment; + "ZetaExchangedForToken(address,uint256,uint256)": EventFragment; + }; + + getEvent(nameOrSignatureOrTopic: "EthExchangedForZeta"): EventFragment; + getEvent(nameOrSignatureOrTopic: "TokenExchangedForZeta"): EventFragment; + getEvent(nameOrSignatureOrTopic: "ZetaExchangedForEth"): EventFragment; + getEvent(nameOrSignatureOrTopic: "ZetaExchangedForToken"): EventFragment; +} + +export interface EthExchangedForZetaEventObject { + amountIn: BigNumber; + amountOut: BigNumber; +} +export type EthExchangedForZetaEvent = TypedEvent< + [BigNumber, BigNumber], + EthExchangedForZetaEventObject +>; + +export type EthExchangedForZetaEventFilter = + TypedEventFilter; + +export interface TokenExchangedForZetaEventObject { + token: string; + amountIn: BigNumber; + amountOut: BigNumber; +} +export type TokenExchangedForZetaEvent = TypedEvent< + [string, BigNumber, BigNumber], + TokenExchangedForZetaEventObject +>; + +export type TokenExchangedForZetaEventFilter = + TypedEventFilter; + +export interface ZetaExchangedForEthEventObject { + amountIn: BigNumber; + amountOut: BigNumber; +} +export type ZetaExchangedForEthEvent = TypedEvent< + [BigNumber, BigNumber], + ZetaExchangedForEthEventObject +>; + +export type ZetaExchangedForEthEventFilter = + TypedEventFilter; + +export interface ZetaExchangedForTokenEventObject { + token: string; + amountIn: BigNumber; + amountOut: BigNumber; +} +export type ZetaExchangedForTokenEvent = TypedEvent< + [string, BigNumber, BigNumber], + ZetaExchangedForTokenEventObject +>; + +export type ZetaExchangedForTokenEventFilter = + TypedEventFilter; + +export interface ZetaTokenConsumerUniV3 extends BaseContract { + connect(signerOrProvider: Signer | Provider | string): this; + attach(addressOrName: string): this; + deployed(): Promise; + + interface: ZetaTokenConsumerUniV3Interface; + + 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: { + getEthFromZeta( + destinationAddress: string, + minAmountOut: BigNumberish, + zetaTokenAmount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + getTokenFromZeta( + destinationAddress: string, + minAmountOut: BigNumberish, + outputToken: string, + zetaTokenAmount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + getZetaFromEth( + destinationAddress: string, + minAmountOut: BigNumberish, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + + getZetaFromToken( + destinationAddress: string, + minAmountOut: BigNumberish, + inputToken: string, + inputTokenAmount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + quoter(overrides?: CallOverrides): Promise<[string]>; + + tokenPoolFee(overrides?: CallOverrides): Promise<[number]>; + + uniswapV3Router(overrides?: CallOverrides): Promise<[string]>; + + zetaPoolFee(overrides?: CallOverrides): Promise<[number]>; + + zetaToken(overrides?: CallOverrides): Promise<[string]>; + }; + + getEthFromZeta( + destinationAddress: string, + minAmountOut: BigNumberish, + zetaTokenAmount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + getTokenFromZeta( + destinationAddress: string, + minAmountOut: BigNumberish, + outputToken: string, + zetaTokenAmount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + getZetaFromEth( + destinationAddress: string, + minAmountOut: BigNumberish, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + + getZetaFromToken( + destinationAddress: string, + minAmountOut: BigNumberish, + inputToken: string, + inputTokenAmount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + quoter(overrides?: CallOverrides): Promise; + + tokenPoolFee(overrides?: CallOverrides): Promise; + + uniswapV3Router(overrides?: CallOverrides): Promise; + + zetaPoolFee(overrides?: CallOverrides): Promise; + + zetaToken(overrides?: CallOverrides): Promise; + + callStatic: { + getEthFromZeta( + destinationAddress: string, + minAmountOut: BigNumberish, + zetaTokenAmount: BigNumberish, + overrides?: CallOverrides + ): Promise; + + getTokenFromZeta( + destinationAddress: string, + minAmountOut: BigNumberish, + outputToken: string, + zetaTokenAmount: BigNumberish, + overrides?: CallOverrides + ): Promise; + + getZetaFromEth( + destinationAddress: string, + minAmountOut: BigNumberish, + overrides?: CallOverrides + ): Promise; + + getZetaFromToken( + destinationAddress: string, + minAmountOut: BigNumberish, + inputToken: string, + inputTokenAmount: BigNumberish, + overrides?: CallOverrides + ): Promise; + + quoter(overrides?: CallOverrides): Promise; + + tokenPoolFee(overrides?: CallOverrides): Promise; + + uniswapV3Router(overrides?: CallOverrides): Promise; + + zetaPoolFee(overrides?: CallOverrides): Promise; + + zetaToken(overrides?: CallOverrides): Promise; + }; + + filters: { + "EthExchangedForZeta(uint256,uint256)"( + amountIn?: null, + amountOut?: null + ): EthExchangedForZetaEventFilter; + EthExchangedForZeta( + amountIn?: null, + amountOut?: null + ): EthExchangedForZetaEventFilter; + + "TokenExchangedForZeta(address,uint256,uint256)"( + token?: null, + amountIn?: null, + amountOut?: null + ): TokenExchangedForZetaEventFilter; + TokenExchangedForZeta( + token?: null, + amountIn?: null, + amountOut?: null + ): TokenExchangedForZetaEventFilter; + + "ZetaExchangedForEth(uint256,uint256)"( + amountIn?: null, + amountOut?: null + ): ZetaExchangedForEthEventFilter; + ZetaExchangedForEth( + amountIn?: null, + amountOut?: null + ): ZetaExchangedForEthEventFilter; + + "ZetaExchangedForToken(address,uint256,uint256)"( + token?: null, + amountIn?: null, + amountOut?: null + ): ZetaExchangedForTokenEventFilter; + ZetaExchangedForToken( + token?: null, + amountIn?: null, + amountOut?: null + ): ZetaExchangedForTokenEventFilter; + }; + + estimateGas: { + getEthFromZeta( + destinationAddress: string, + minAmountOut: BigNumberish, + zetaTokenAmount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + getTokenFromZeta( + destinationAddress: string, + minAmountOut: BigNumberish, + outputToken: string, + zetaTokenAmount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + getZetaFromEth( + destinationAddress: string, + minAmountOut: BigNumberish, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + + getZetaFromToken( + destinationAddress: string, + minAmountOut: BigNumberish, + inputToken: string, + inputTokenAmount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + quoter(overrides?: CallOverrides): Promise; + + tokenPoolFee(overrides?: CallOverrides): Promise; + + uniswapV3Router(overrides?: CallOverrides): Promise; + + zetaPoolFee(overrides?: CallOverrides): Promise; + + zetaToken(overrides?: CallOverrides): Promise; + }; + + populateTransaction: { + getEthFromZeta( + destinationAddress: string, + minAmountOut: BigNumberish, + zetaTokenAmount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + getTokenFromZeta( + destinationAddress: string, + minAmountOut: BigNumberish, + outputToken: string, + zetaTokenAmount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + getZetaFromEth( + destinationAddress: string, + minAmountOut: BigNumberish, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + + getZetaFromToken( + destinationAddress: string, + minAmountOut: BigNumberish, + inputToken: string, + inputTokenAmount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + quoter(overrides?: CallOverrides): Promise; + + tokenPoolFee(overrides?: CallOverrides): Promise; + + uniswapV3Router(overrides?: CallOverrides): Promise; + + zetaPoolFee(overrides?: CallOverrides): Promise; + + zetaToken(overrides?: CallOverrides): Promise; + }; +} diff --git a/packages/interfaces/typechain-types/contracts/ZetaTokenConsumerUniV3.strategy.sol/ZetaTokenConsumerUniV3Errors.ts b/packages/interfaces/typechain-types/contracts/ZetaTokenConsumerUniV3.strategy.sol/ZetaTokenConsumerUniV3Errors.ts new file mode 100644 index 00000000..7f99eec1 --- /dev/null +++ b/packages/interfaces/typechain-types/contracts/ZetaTokenConsumerUniV3.strategy.sol/ZetaTokenConsumerUniV3Errors.ts @@ -0,0 +1,55 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import type { BaseContract, Signer, utils } from "ethers"; + +import type { Listener, Provider } from "@ethersproject/providers"; +import type { + TypedEventFilter, + TypedEvent, + TypedListener, + OnEvent, +} from "../../common"; + +export interface ZetaTokenConsumerUniV3ErrorsInterface extends utils.Interface { + functions: {}; + + events: {}; +} + +export interface ZetaTokenConsumerUniV3Errors extends BaseContract { + connect(signerOrProvider: Signer | Provider | string): this; + attach(addressOrName: string): this; + deployed(): Promise; + + interface: ZetaTokenConsumerUniV3ErrorsInterface; + + 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: {}; + + callStatic: {}; + + filters: {}; + + estimateGas: {}; + + populateTransaction: {}; +} diff --git a/packages/interfaces/typechain-types/contracts/ZetaTokenConsumerUniV3.strategy.sol/index.ts b/packages/interfaces/typechain-types/contracts/ZetaTokenConsumerUniV3.strategy.sol/index.ts new file mode 100644 index 00000000..bf980c42 --- /dev/null +++ b/packages/interfaces/typechain-types/contracts/ZetaTokenConsumerUniV3.strategy.sol/index.ts @@ -0,0 +1,6 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +export type { WETH9 } from "./WETH9"; +export type { ZetaTokenConsumerUniV3 } from "./ZetaTokenConsumerUniV3"; +export type { ZetaTokenConsumerUniV3Errors } from "./ZetaTokenConsumerUniV3Errors"; diff --git a/packages/interfaces/typechain-types/contracts/index.ts b/packages/interfaces/typechain-types/contracts/index.ts new file mode 100644 index 00000000..2f9ec59f --- /dev/null +++ b/packages/interfaces/typechain-types/contracts/index.ts @@ -0,0 +1,23 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import type * as zetaEthSol from "./Zeta.eth.sol"; +export type { zetaEthSol }; +import type * as zetaNonEthSol from "./Zeta.non-eth.sol"; +export type { zetaNonEthSol }; +import type * as zetaConnectorBaseSol from "./ZetaConnector.base.sol"; +export type { zetaConnectorBaseSol }; +import type * as zetaConnectorEthSol from "./ZetaConnector.eth.sol"; +export type { zetaConnectorEthSol }; +import type * as zetaConnectorNonEthSol from "./ZetaConnector.non-eth.sol"; +export type { zetaConnectorNonEthSol }; +import type * as zetaTokenConsumerUniV2StrategySol from "./ZetaTokenConsumerUniV2.strategy.sol"; +export type { zetaTokenConsumerUniV2StrategySol }; +import type * as zetaTokenConsumerUniV3StrategySol from "./ZetaTokenConsumerUniV3.strategy.sol"; +export type { zetaTokenConsumerUniV3StrategySol }; +import type * as interfaces from "./interfaces"; +export type { interfaces }; +import type * as testing from "./testing"; +export type { testing }; +export type { ImmutableCreate2Factory } from "./ImmutableCreate2Factory"; +export type { ZetaInteractor } from "./ZetaInteractor"; diff --git a/packages/interfaces/typechain-types/contracts/interfaces/ConnectorErrors.ts b/packages/interfaces/typechain-types/contracts/interfaces/ConnectorErrors.ts new file mode 100644 index 00000000..65c75f93 --- /dev/null +++ b/packages/interfaces/typechain-types/contracts/interfaces/ConnectorErrors.ts @@ -0,0 +1,55 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import type { BaseContract, Signer, utils } from "ethers"; + +import type { Listener, Provider } from "@ethersproject/providers"; +import type { + TypedEventFilter, + TypedEvent, + TypedListener, + OnEvent, +} from "../../common"; + +export interface ConnectorErrorsInterface extends utils.Interface { + functions: {}; + + events: {}; +} + +export interface ConnectorErrors extends BaseContract { + connect(signerOrProvider: Signer | Provider | string): this; + attach(addressOrName: string): this; + deployed(): Promise; + + interface: ConnectorErrorsInterface; + + 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: {}; + + callStatic: {}; + + filters: {}; + + estimateGas: {}; + + populateTransaction: {}; +} diff --git a/packages/interfaces/typechain-types/contracts/interfaces/ZetaErrors.ts b/packages/interfaces/typechain-types/contracts/interfaces/ZetaErrors.ts new file mode 100644 index 00000000..f256343f --- /dev/null +++ b/packages/interfaces/typechain-types/contracts/interfaces/ZetaErrors.ts @@ -0,0 +1,55 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import type { BaseContract, Signer, utils } from "ethers"; + +import type { Listener, Provider } from "@ethersproject/providers"; +import type { + TypedEventFilter, + TypedEvent, + TypedListener, + OnEvent, +} from "../../common"; + +export interface ZetaErrorsInterface extends utils.Interface { + functions: {}; + + events: {}; +} + +export interface ZetaErrors extends BaseContract { + connect(signerOrProvider: Signer | Provider | string): this; + attach(addressOrName: string): this; + deployed(): Promise; + + interface: ZetaErrorsInterface; + + 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: {}; + + callStatic: {}; + + filters: {}; + + estimateGas: {}; + + populateTransaction: {}; +} diff --git a/packages/interfaces/typechain-types/contracts/interfaces/ZetaInteractorErrors.ts b/packages/interfaces/typechain-types/contracts/interfaces/ZetaInteractorErrors.ts new file mode 100644 index 00000000..2b6e928f --- /dev/null +++ b/packages/interfaces/typechain-types/contracts/interfaces/ZetaInteractorErrors.ts @@ -0,0 +1,55 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import type { BaseContract, Signer, utils } from "ethers"; + +import type { Listener, Provider } from "@ethersproject/providers"; +import type { + TypedEventFilter, + TypedEvent, + TypedListener, + OnEvent, +} from "../../common"; + +export interface ZetaInteractorErrorsInterface extends utils.Interface { + functions: {}; + + events: {}; +} + +export interface ZetaInteractorErrors extends BaseContract { + connect(signerOrProvider: Signer | Provider | string): this; + attach(addressOrName: string): this; + deployed(): Promise; + + interface: ZetaInteractorErrorsInterface; + + 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: {}; + + callStatic: {}; + + filters: {}; + + estimateGas: {}; + + populateTransaction: {}; +} diff --git a/packages/interfaces/typechain-types/contracts/interfaces/ZetaInterfaces.sol/ZetaConnector.ts b/packages/interfaces/typechain-types/contracts/interfaces/ZetaInterfaces.sol/ZetaConnector.ts new file mode 100644 index 00000000..bf051aa8 --- /dev/null +++ b/packages/interfaces/typechain-types/contracts/interfaces/ZetaInterfaces.sol/ZetaConnector.ts @@ -0,0 +1,129 @@ +/* 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, +} from "../../../common"; + +export declare namespace ZetaInterfaces { + export type SendInputStruct = { + destinationChainId: BigNumberish; + destinationAddress: BytesLike; + destinationGasLimit: BigNumberish; + message: BytesLike; + zetaValueAndGas: BigNumberish; + zetaParams: BytesLike; + }; + + export type SendInputStructOutput = [ + BigNumber, + string, + BigNumber, + string, + BigNumber, + string + ] & { + destinationChainId: BigNumber; + destinationAddress: string; + destinationGasLimit: BigNumber; + message: string; + zetaValueAndGas: BigNumber; + zetaParams: string; + }; +} + +export interface ZetaConnectorInterface extends utils.Interface { + functions: { + "send((uint256,bytes,uint256,bytes,uint256,bytes))": FunctionFragment; + }; + + getFunction(nameOrSignatureOrTopic: "send"): FunctionFragment; + + encodeFunctionData( + functionFragment: "send", + values: [ZetaInterfaces.SendInputStruct] + ): string; + + decodeFunctionResult(functionFragment: "send", data: BytesLike): Result; + + events: {}; +} + +export interface ZetaConnector extends BaseContract { + connect(signerOrProvider: Signer | Provider | string): this; + attach(addressOrName: string): this; + deployed(): Promise; + + interface: ZetaConnectorInterface; + + 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: { + send( + input: ZetaInterfaces.SendInputStruct, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + }; + + send( + input: ZetaInterfaces.SendInputStruct, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + callStatic: { + send( + input: ZetaInterfaces.SendInputStruct, + overrides?: CallOverrides + ): Promise; + }; + + filters: {}; + + estimateGas: { + send( + input: ZetaInterfaces.SendInputStruct, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + }; + + populateTransaction: { + send( + input: ZetaInterfaces.SendInputStruct, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + }; +} diff --git a/packages/interfaces/typechain-types/contracts/interfaces/ZetaInterfaces.sol/ZetaReceiver.ts b/packages/interfaces/typechain-types/contracts/interfaces/ZetaInterfaces.sol/ZetaReceiver.ts new file mode 100644 index 00000000..9ce3e26d --- /dev/null +++ b/packages/interfaces/typechain-types/contracts/interfaces/ZetaInterfaces.sol/ZetaReceiver.ts @@ -0,0 +1,190 @@ +/* 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, +} from "../../../common"; + +export declare namespace ZetaInterfaces { + export type ZetaMessageStruct = { + zetaTxSenderAddress: BytesLike; + sourceChainId: BigNumberish; + destinationAddress: string; + zetaValueAndGas: BigNumberish; + message: BytesLike; + }; + + export type ZetaMessageStructOutput = [ + string, + BigNumber, + string, + BigNumber, + string + ] & { + zetaTxSenderAddress: string; + sourceChainId: BigNumber; + destinationAddress: string; + zetaValueAndGas: BigNumber; + message: string; + }; + + export type ZetaRevertStruct = { + zetaTxSenderAddress: string; + sourceChainId: BigNumberish; + destinationAddress: BytesLike; + destinationChainId: BigNumberish; + zetaValueAndGas: BigNumberish; + message: BytesLike; + }; + + export type ZetaRevertStructOutput = [ + string, + BigNumber, + string, + BigNumber, + BigNumber, + string + ] & { + zetaTxSenderAddress: string; + sourceChainId: BigNumber; + destinationAddress: string; + destinationChainId: BigNumber; + zetaValueAndGas: BigNumber; + message: string; + }; +} + +export interface ZetaReceiverInterface extends utils.Interface { + functions: { + "onZetaMessage((bytes,uint256,address,uint256,bytes))": FunctionFragment; + "onZetaRevert((address,uint256,bytes,uint256,uint256,bytes))": FunctionFragment; + }; + + getFunction( + nameOrSignatureOrTopic: "onZetaMessage" | "onZetaRevert" + ): FunctionFragment; + + encodeFunctionData( + functionFragment: "onZetaMessage", + values: [ZetaInterfaces.ZetaMessageStruct] + ): string; + encodeFunctionData( + functionFragment: "onZetaRevert", + values: [ZetaInterfaces.ZetaRevertStruct] + ): string; + + decodeFunctionResult( + functionFragment: "onZetaMessage", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "onZetaRevert", + data: BytesLike + ): Result; + + events: {}; +} + +export interface ZetaReceiver extends BaseContract { + connect(signerOrProvider: Signer | Provider | string): this; + attach(addressOrName: string): this; + deployed(): Promise; + + interface: ZetaReceiverInterface; + + 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: { + onZetaMessage( + zetaMessage: ZetaInterfaces.ZetaMessageStruct, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + onZetaRevert( + zetaRevert: ZetaInterfaces.ZetaRevertStruct, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + }; + + onZetaMessage( + zetaMessage: ZetaInterfaces.ZetaMessageStruct, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + onZetaRevert( + zetaRevert: ZetaInterfaces.ZetaRevertStruct, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + callStatic: { + onZetaMessage( + zetaMessage: ZetaInterfaces.ZetaMessageStruct, + overrides?: CallOverrides + ): Promise; + + onZetaRevert( + zetaRevert: ZetaInterfaces.ZetaRevertStruct, + overrides?: CallOverrides + ): Promise; + }; + + filters: {}; + + estimateGas: { + onZetaMessage( + zetaMessage: ZetaInterfaces.ZetaMessageStruct, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + onZetaRevert( + zetaRevert: ZetaInterfaces.ZetaRevertStruct, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + }; + + populateTransaction: { + onZetaMessage( + zetaMessage: ZetaInterfaces.ZetaMessageStruct, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + onZetaRevert( + zetaRevert: ZetaInterfaces.ZetaRevertStruct, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + }; +} diff --git a/packages/interfaces/typechain-types/contracts/interfaces/ZetaInterfaces.sol/ZetaTokenConsumer.ts b/packages/interfaces/typechain-types/contracts/interfaces/ZetaInterfaces.sol/ZetaTokenConsumer.ts new file mode 100644 index 00000000..a34288e3 --- /dev/null +++ b/packages/interfaces/typechain-types/contracts/interfaces/ZetaInterfaces.sol/ZetaTokenConsumer.ts @@ -0,0 +1,363 @@ +/* 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, +} from "../../../common"; + +export interface ZetaTokenConsumerInterface extends utils.Interface { + functions: { + "getEthFromZeta(address,uint256,uint256)": FunctionFragment; + "getTokenFromZeta(address,uint256,address,uint256)": FunctionFragment; + "getZetaFromEth(address,uint256)": FunctionFragment; + "getZetaFromToken(address,uint256,address,uint256)": FunctionFragment; + }; + + getFunction( + nameOrSignatureOrTopic: + | "getEthFromZeta" + | "getTokenFromZeta" + | "getZetaFromEth" + | "getZetaFromToken" + ): FunctionFragment; + + encodeFunctionData( + functionFragment: "getEthFromZeta", + values: [string, BigNumberish, BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "getTokenFromZeta", + values: [string, BigNumberish, string, BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "getZetaFromEth", + values: [string, BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "getZetaFromToken", + values: [string, BigNumberish, string, BigNumberish] + ): string; + + decodeFunctionResult( + functionFragment: "getEthFromZeta", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "getTokenFromZeta", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "getZetaFromEth", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "getZetaFromToken", + data: BytesLike + ): Result; + + events: { + "EthExchangedForZeta(uint256,uint256)": EventFragment; + "TokenExchangedForZeta(address,uint256,uint256)": EventFragment; + "ZetaExchangedForEth(uint256,uint256)": EventFragment; + "ZetaExchangedForToken(address,uint256,uint256)": EventFragment; + }; + + getEvent(nameOrSignatureOrTopic: "EthExchangedForZeta"): EventFragment; + getEvent(nameOrSignatureOrTopic: "TokenExchangedForZeta"): EventFragment; + getEvent(nameOrSignatureOrTopic: "ZetaExchangedForEth"): EventFragment; + getEvent(nameOrSignatureOrTopic: "ZetaExchangedForToken"): EventFragment; +} + +export interface EthExchangedForZetaEventObject { + amountIn: BigNumber; + amountOut: BigNumber; +} +export type EthExchangedForZetaEvent = TypedEvent< + [BigNumber, BigNumber], + EthExchangedForZetaEventObject +>; + +export type EthExchangedForZetaEventFilter = + TypedEventFilter; + +export interface TokenExchangedForZetaEventObject { + token: string; + amountIn: BigNumber; + amountOut: BigNumber; +} +export type TokenExchangedForZetaEvent = TypedEvent< + [string, BigNumber, BigNumber], + TokenExchangedForZetaEventObject +>; + +export type TokenExchangedForZetaEventFilter = + TypedEventFilter; + +export interface ZetaExchangedForEthEventObject { + amountIn: BigNumber; + amountOut: BigNumber; +} +export type ZetaExchangedForEthEvent = TypedEvent< + [BigNumber, BigNumber], + ZetaExchangedForEthEventObject +>; + +export type ZetaExchangedForEthEventFilter = + TypedEventFilter; + +export interface ZetaExchangedForTokenEventObject { + token: string; + amountIn: BigNumber; + amountOut: BigNumber; +} +export type ZetaExchangedForTokenEvent = TypedEvent< + [string, BigNumber, BigNumber], + ZetaExchangedForTokenEventObject +>; + +export type ZetaExchangedForTokenEventFilter = + TypedEventFilter; + +export interface ZetaTokenConsumer extends BaseContract { + connect(signerOrProvider: Signer | Provider | string): this; + attach(addressOrName: string): this; + deployed(): Promise; + + interface: ZetaTokenConsumerInterface; + + 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: { + getEthFromZeta( + destinationAddress: string, + minAmountOut: BigNumberish, + zetaTokenAmount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + getTokenFromZeta( + destinationAddress: string, + minAmountOut: BigNumberish, + outputToken: string, + zetaTokenAmount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + getZetaFromEth( + destinationAddress: string, + minAmountOut: BigNumberish, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + + getZetaFromToken( + destinationAddress: string, + minAmountOut: BigNumberish, + inputToken: string, + inputTokenAmount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + }; + + getEthFromZeta( + destinationAddress: string, + minAmountOut: BigNumberish, + zetaTokenAmount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + getTokenFromZeta( + destinationAddress: string, + minAmountOut: BigNumberish, + outputToken: string, + zetaTokenAmount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + getZetaFromEth( + destinationAddress: string, + minAmountOut: BigNumberish, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + + getZetaFromToken( + destinationAddress: string, + minAmountOut: BigNumberish, + inputToken: string, + inputTokenAmount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + callStatic: { + getEthFromZeta( + destinationAddress: string, + minAmountOut: BigNumberish, + zetaTokenAmount: BigNumberish, + overrides?: CallOverrides + ): Promise; + + getTokenFromZeta( + destinationAddress: string, + minAmountOut: BigNumberish, + outputToken: string, + zetaTokenAmount: BigNumberish, + overrides?: CallOverrides + ): Promise; + + getZetaFromEth( + destinationAddress: string, + minAmountOut: BigNumberish, + overrides?: CallOverrides + ): Promise; + + getZetaFromToken( + destinationAddress: string, + minAmountOut: BigNumberish, + inputToken: string, + inputTokenAmount: BigNumberish, + overrides?: CallOverrides + ): Promise; + }; + + filters: { + "EthExchangedForZeta(uint256,uint256)"( + amountIn?: null, + amountOut?: null + ): EthExchangedForZetaEventFilter; + EthExchangedForZeta( + amountIn?: null, + amountOut?: null + ): EthExchangedForZetaEventFilter; + + "TokenExchangedForZeta(address,uint256,uint256)"( + token?: null, + amountIn?: null, + amountOut?: null + ): TokenExchangedForZetaEventFilter; + TokenExchangedForZeta( + token?: null, + amountIn?: null, + amountOut?: null + ): TokenExchangedForZetaEventFilter; + + "ZetaExchangedForEth(uint256,uint256)"( + amountIn?: null, + amountOut?: null + ): ZetaExchangedForEthEventFilter; + ZetaExchangedForEth( + amountIn?: null, + amountOut?: null + ): ZetaExchangedForEthEventFilter; + + "ZetaExchangedForToken(address,uint256,uint256)"( + token?: null, + amountIn?: null, + amountOut?: null + ): ZetaExchangedForTokenEventFilter; + ZetaExchangedForToken( + token?: null, + amountIn?: null, + amountOut?: null + ): ZetaExchangedForTokenEventFilter; + }; + + estimateGas: { + getEthFromZeta( + destinationAddress: string, + minAmountOut: BigNumberish, + zetaTokenAmount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + getTokenFromZeta( + destinationAddress: string, + minAmountOut: BigNumberish, + outputToken: string, + zetaTokenAmount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + getZetaFromEth( + destinationAddress: string, + minAmountOut: BigNumberish, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + + getZetaFromToken( + destinationAddress: string, + minAmountOut: BigNumberish, + inputToken: string, + inputTokenAmount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + }; + + populateTransaction: { + getEthFromZeta( + destinationAddress: string, + minAmountOut: BigNumberish, + zetaTokenAmount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + getTokenFromZeta( + destinationAddress: string, + minAmountOut: BigNumberish, + outputToken: string, + zetaTokenAmount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + getZetaFromEth( + destinationAddress: string, + minAmountOut: BigNumberish, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + + getZetaFromToken( + destinationAddress: string, + minAmountOut: BigNumberish, + inputToken: string, + inputTokenAmount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + }; +} diff --git a/packages/interfaces/typechain-types/contracts/interfaces/ZetaInterfaces.sol/index.ts b/packages/interfaces/typechain-types/contracts/interfaces/ZetaInterfaces.sol/index.ts new file mode 100644 index 00000000..61430840 --- /dev/null +++ b/packages/interfaces/typechain-types/contracts/interfaces/ZetaInterfaces.sol/index.ts @@ -0,0 +1,6 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +export type { ZetaConnector } from "./ZetaConnector"; +export type { ZetaReceiver } from "./ZetaReceiver"; +export type { ZetaTokenConsumer } from "./ZetaTokenConsumer"; diff --git a/packages/interfaces/typechain-types/contracts/interfaces/ZetaNonEthInterface.ts b/packages/interfaces/typechain-types/contracts/interfaces/ZetaNonEthInterface.ts new file mode 100644 index 00000000..e5aa607f --- /dev/null +++ b/packages/interfaces/typechain-types/contracts/interfaces/ZetaNonEthInterface.ts @@ -0,0 +1,401 @@ +/* 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, +} from "../../common"; + +export interface ZetaNonEthInterfaceInterface extends utils.Interface { + functions: { + "allowance(address,address)": FunctionFragment; + "approve(address,uint256)": FunctionFragment; + "balanceOf(address)": FunctionFragment; + "burnFrom(address,uint256)": FunctionFragment; + "mint(address,uint256,bytes32)": FunctionFragment; + "totalSupply()": FunctionFragment; + "transfer(address,uint256)": FunctionFragment; + "transferFrom(address,address,uint256)": FunctionFragment; + }; + + getFunction( + nameOrSignatureOrTopic: + | "allowance" + | "approve" + | "balanceOf" + | "burnFrom" + | "mint" + | "totalSupply" + | "transfer" + | "transferFrom" + ): FunctionFragment; + + encodeFunctionData( + functionFragment: "allowance", + values: [string, string] + ): string; + encodeFunctionData( + functionFragment: "approve", + values: [string, BigNumberish] + ): string; + encodeFunctionData(functionFragment: "balanceOf", values: [string]): string; + encodeFunctionData( + functionFragment: "burnFrom", + values: [string, BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "mint", + values: [string, BigNumberish, BytesLike] + ): string; + encodeFunctionData( + functionFragment: "totalSupply", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "transfer", + values: [string, BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "transferFrom", + values: [string, string, BigNumberish] + ): string; + + decodeFunctionResult(functionFragment: "allowance", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "approve", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "balanceOf", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "burnFrom", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "mint", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "totalSupply", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "transfer", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "transferFrom", + data: BytesLike + ): Result; + + events: { + "Approval(address,address,uint256)": EventFragment; + "Transfer(address,address,uint256)": EventFragment; + }; + + getEvent(nameOrSignatureOrTopic: "Approval"): EventFragment; + getEvent(nameOrSignatureOrTopic: "Transfer"): EventFragment; +} + +export interface ApprovalEventObject { + owner: string; + spender: string; + value: BigNumber; +} +export type ApprovalEvent = TypedEvent< + [string, string, BigNumber], + ApprovalEventObject +>; + +export type ApprovalEventFilter = TypedEventFilter; + +export interface TransferEventObject { + from: string; + to: string; + value: BigNumber; +} +export type TransferEvent = TypedEvent< + [string, string, BigNumber], + TransferEventObject +>; + +export type TransferEventFilter = TypedEventFilter; + +export interface ZetaNonEthInterface extends BaseContract { + connect(signerOrProvider: Signer | Provider | string): this; + attach(addressOrName: string): this; + deployed(): Promise; + + interface: ZetaNonEthInterfaceInterface; + + 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: { + allowance( + owner: string, + spender: string, + overrides?: CallOverrides + ): Promise<[BigNumber]>; + + approve( + spender: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + balanceOf(account: string, overrides?: CallOverrides): Promise<[BigNumber]>; + + burnFrom( + account: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + mint( + mintee: string, + value: BigNumberish, + internalSendHash: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + totalSupply(overrides?: CallOverrides): Promise<[BigNumber]>; + + transfer( + to: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + transferFrom( + from: string, + to: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + }; + + allowance( + owner: string, + spender: string, + overrides?: CallOverrides + ): Promise; + + approve( + spender: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + balanceOf(account: string, overrides?: CallOverrides): Promise; + + burnFrom( + account: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + mint( + mintee: string, + value: BigNumberish, + internalSendHash: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + totalSupply(overrides?: CallOverrides): Promise; + + transfer( + to: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + transferFrom( + from: string, + to: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + callStatic: { + allowance( + owner: string, + spender: string, + overrides?: CallOverrides + ): Promise; + + approve( + spender: string, + amount: BigNumberish, + overrides?: CallOverrides + ): Promise; + + balanceOf(account: string, overrides?: CallOverrides): Promise; + + burnFrom( + account: string, + amount: BigNumberish, + overrides?: CallOverrides + ): Promise; + + mint( + mintee: string, + value: BigNumberish, + internalSendHash: BytesLike, + overrides?: CallOverrides + ): Promise; + + totalSupply(overrides?: CallOverrides): Promise; + + transfer( + to: string, + amount: BigNumberish, + overrides?: CallOverrides + ): Promise; + + transferFrom( + from: string, + to: string, + amount: BigNumberish, + overrides?: CallOverrides + ): Promise; + }; + + filters: { + "Approval(address,address,uint256)"( + owner?: string | null, + spender?: string | null, + value?: null + ): ApprovalEventFilter; + Approval( + owner?: string | null, + spender?: string | null, + value?: null + ): ApprovalEventFilter; + + "Transfer(address,address,uint256)"( + from?: string | null, + to?: string | null, + value?: null + ): TransferEventFilter; + Transfer( + from?: string | null, + to?: string | null, + value?: null + ): TransferEventFilter; + }; + + estimateGas: { + allowance( + owner: string, + spender: string, + overrides?: CallOverrides + ): Promise; + + approve( + spender: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + balanceOf(account: string, overrides?: CallOverrides): Promise; + + burnFrom( + account: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + mint( + mintee: string, + value: BigNumberish, + internalSendHash: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + totalSupply(overrides?: CallOverrides): Promise; + + transfer( + to: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + transferFrom( + from: string, + to: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + }; + + populateTransaction: { + allowance( + owner: string, + spender: string, + overrides?: CallOverrides + ): Promise; + + approve( + spender: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + balanceOf( + account: string, + overrides?: CallOverrides + ): Promise; + + burnFrom( + account: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + mint( + mintee: string, + value: BigNumberish, + internalSendHash: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + totalSupply(overrides?: CallOverrides): Promise; + + transfer( + to: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + transferFrom( + from: string, + to: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + }; +} diff --git a/packages/interfaces/typechain-types/contracts/interfaces/index.ts b/packages/interfaces/typechain-types/contracts/interfaces/index.ts new file mode 100644 index 00000000..22914e47 --- /dev/null +++ b/packages/interfaces/typechain-types/contracts/interfaces/index.ts @@ -0,0 +1,9 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import type * as zetaInterfacesSol from "./ZetaInterfaces.sol"; +export type { zetaInterfacesSol }; +export type { ConnectorErrors } from "./ConnectorErrors"; +export type { ZetaErrors } from "./ZetaErrors"; +export type { ZetaInteractorErrors } from "./ZetaInteractorErrors"; +export type { ZetaNonEthInterface } from "./ZetaNonEthInterface"; diff --git a/packages/interfaces/typechain-types/contracts/testing/TestUniswapV3Contracts.sol/INonfungiblePositionManager.ts b/packages/interfaces/typechain-types/contracts/testing/TestUniswapV3Contracts.sol/INonfungiblePositionManager.ts new file mode 100644 index 00000000..6ea26b8a --- /dev/null +++ b/packages/interfaces/typechain-types/contracts/testing/TestUniswapV3Contracts.sol/INonfungiblePositionManager.ts @@ -0,0 +1,566 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import type { + BaseContract, + BigNumber, + BigNumberish, + BytesLike, + CallOverrides, + ContractTransaction, + 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, +} from "../../../common"; + +export declare namespace INonfungiblePositionManager { + export type CollectParamsStruct = { + tokenId: BigNumberish; + recipient: string; + amount0Max: BigNumberish; + amount1Max: BigNumberish; + }; + + export type CollectParamsStructOutput = [ + BigNumber, + string, + BigNumber, + BigNumber + ] & { + tokenId: BigNumber; + recipient: string; + amount0Max: BigNumber; + amount1Max: BigNumber; + }; + + export type DecreaseLiquidityParamsStruct = { + tokenId: BigNumberish; + liquidity: BigNumberish; + amount0Min: BigNumberish; + amount1Min: BigNumberish; + deadline: BigNumberish; + }; + + export type DecreaseLiquidityParamsStructOutput = [ + BigNumber, + BigNumber, + BigNumber, + BigNumber, + BigNumber + ] & { + tokenId: BigNumber; + liquidity: BigNumber; + amount0Min: BigNumber; + amount1Min: BigNumber; + deadline: BigNumber; + }; + + export type IncreaseLiquidityParamsStruct = { + tokenId: BigNumberish; + amount0Desired: BigNumberish; + amount1Desired: BigNumberish; + amount0Min: BigNumberish; + amount1Min: BigNumberish; + deadline: BigNumberish; + }; + + export type IncreaseLiquidityParamsStructOutput = [ + BigNumber, + BigNumber, + BigNumber, + BigNumber, + BigNumber, + BigNumber + ] & { + tokenId: BigNumber; + amount0Desired: BigNumber; + amount1Desired: BigNumber; + amount0Min: BigNumber; + amount1Min: BigNumber; + deadline: BigNumber; + }; + + export type MintParamsStruct = { + token0: string; + token1: string; + fee: BigNumberish; + tickLower: BigNumberish; + tickUpper: BigNumberish; + amount0Desired: BigNumberish; + amount1Desired: BigNumberish; + amount0Min: BigNumberish; + amount1Min: BigNumberish; + recipient: string; + deadline: BigNumberish; + }; + + export type MintParamsStructOutput = [ + string, + string, + number, + number, + number, + BigNumber, + BigNumber, + BigNumber, + BigNumber, + string, + BigNumber + ] & { + token0: string; + token1: string; + fee: number; + tickLower: number; + tickUpper: number; + amount0Desired: BigNumber; + amount1Desired: BigNumber; + amount0Min: BigNumber; + amount1Min: BigNumber; + recipient: string; + deadline: BigNumber; + }; +} + +export interface INonfungiblePositionManagerInterface extends utils.Interface { + functions: { + "burn(uint256)": FunctionFragment; + "collect((uint256,address,uint128,uint128))": FunctionFragment; + "decreaseLiquidity((uint256,uint128,uint256,uint256,uint256))": FunctionFragment; + "increaseLiquidity((uint256,uint256,uint256,uint256,uint256,uint256))": FunctionFragment; + "mint((address,address,uint24,int24,int24,uint256,uint256,uint256,uint256,address,uint256))": FunctionFragment; + "positions(uint256)": FunctionFragment; + }; + + getFunction( + nameOrSignatureOrTopic: + | "burn" + | "collect" + | "decreaseLiquidity" + | "increaseLiquidity" + | "mint" + | "positions" + ): FunctionFragment; + + encodeFunctionData(functionFragment: "burn", values: [BigNumberish]): string; + encodeFunctionData( + functionFragment: "collect", + values: [INonfungiblePositionManager.CollectParamsStruct] + ): string; + encodeFunctionData( + functionFragment: "decreaseLiquidity", + values: [INonfungiblePositionManager.DecreaseLiquidityParamsStruct] + ): string; + encodeFunctionData( + functionFragment: "increaseLiquidity", + values: [INonfungiblePositionManager.IncreaseLiquidityParamsStruct] + ): string; + encodeFunctionData( + functionFragment: "mint", + values: [INonfungiblePositionManager.MintParamsStruct] + ): string; + encodeFunctionData( + functionFragment: "positions", + values: [BigNumberish] + ): string; + + decodeFunctionResult(functionFragment: "burn", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "collect", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "decreaseLiquidity", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "increaseLiquidity", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "mint", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "positions", data: BytesLike): Result; + + events: { + "Collect(uint256,address,uint256,uint256)": EventFragment; + "DecreaseLiquidity(uint256,uint128,uint256,uint256)": EventFragment; + "IncreaseLiquidity(uint256,uint128,uint256,uint256)": EventFragment; + }; + + getEvent(nameOrSignatureOrTopic: "Collect"): EventFragment; + getEvent(nameOrSignatureOrTopic: "DecreaseLiquidity"): EventFragment; + getEvent(nameOrSignatureOrTopic: "IncreaseLiquidity"): EventFragment; +} + +export interface CollectEventObject { + tokenId: BigNumber; + recipient: string; + amount0: BigNumber; + amount1: BigNumber; +} +export type CollectEvent = TypedEvent< + [BigNumber, string, BigNumber, BigNumber], + CollectEventObject +>; + +export type CollectEventFilter = TypedEventFilter; + +export interface DecreaseLiquidityEventObject { + tokenId: BigNumber; + liquidity: BigNumber; + amount0: BigNumber; + amount1: BigNumber; +} +export type DecreaseLiquidityEvent = TypedEvent< + [BigNumber, BigNumber, BigNumber, BigNumber], + DecreaseLiquidityEventObject +>; + +export type DecreaseLiquidityEventFilter = + TypedEventFilter; + +export interface IncreaseLiquidityEventObject { + tokenId: BigNumber; + liquidity: BigNumber; + amount0: BigNumber; + amount1: BigNumber; +} +export type IncreaseLiquidityEvent = TypedEvent< + [BigNumber, BigNumber, BigNumber, BigNumber], + IncreaseLiquidityEventObject +>; + +export type IncreaseLiquidityEventFilter = + TypedEventFilter; + +export interface INonfungiblePositionManager extends BaseContract { + connect(signerOrProvider: Signer | Provider | string): this; + attach(addressOrName: string): this; + deployed(): Promise; + + interface: INonfungiblePositionManagerInterface; + + 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: { + burn( + tokenId: BigNumberish, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + + collect( + params: INonfungiblePositionManager.CollectParamsStruct, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + + decreaseLiquidity( + params: INonfungiblePositionManager.DecreaseLiquidityParamsStruct, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + + increaseLiquidity( + params: INonfungiblePositionManager.IncreaseLiquidityParamsStruct, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + + mint( + params: INonfungiblePositionManager.MintParamsStruct, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + + positions( + tokenId: BigNumberish, + overrides?: CallOverrides + ): Promise< + [ + BigNumber, + string, + string, + string, + number, + number, + number, + BigNumber, + BigNumber, + BigNumber, + BigNumber, + BigNumber + ] & { + nonce: BigNumber; + operator: string; + token0: string; + token1: string; + fee: number; + tickLower: number; + tickUpper: number; + liquidity: BigNumber; + feeGrowthInside0LastX128: BigNumber; + feeGrowthInside1LastX128: BigNumber; + tokensOwed0: BigNumber; + tokensOwed1: BigNumber; + } + >; + }; + + burn( + tokenId: BigNumberish, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + + collect( + params: INonfungiblePositionManager.CollectParamsStruct, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + + decreaseLiquidity( + params: INonfungiblePositionManager.DecreaseLiquidityParamsStruct, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + + increaseLiquidity( + params: INonfungiblePositionManager.IncreaseLiquidityParamsStruct, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + + mint( + params: INonfungiblePositionManager.MintParamsStruct, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + + positions( + tokenId: BigNumberish, + overrides?: CallOverrides + ): Promise< + [ + BigNumber, + string, + string, + string, + number, + number, + number, + BigNumber, + BigNumber, + BigNumber, + BigNumber, + BigNumber + ] & { + nonce: BigNumber; + operator: string; + token0: string; + token1: string; + fee: number; + tickLower: number; + tickUpper: number; + liquidity: BigNumber; + feeGrowthInside0LastX128: BigNumber; + feeGrowthInside1LastX128: BigNumber; + tokensOwed0: BigNumber; + tokensOwed1: BigNumber; + } + >; + + callStatic: { + burn(tokenId: BigNumberish, overrides?: CallOverrides): Promise; + + collect( + params: INonfungiblePositionManager.CollectParamsStruct, + overrides?: CallOverrides + ): Promise< + [BigNumber, BigNumber] & { amount0: BigNumber; amount1: BigNumber } + >; + + decreaseLiquidity( + params: INonfungiblePositionManager.DecreaseLiquidityParamsStruct, + overrides?: CallOverrides + ): Promise< + [BigNumber, BigNumber] & { amount0: BigNumber; amount1: BigNumber } + >; + + increaseLiquidity( + params: INonfungiblePositionManager.IncreaseLiquidityParamsStruct, + overrides?: CallOverrides + ): Promise< + [BigNumber, BigNumber, BigNumber] & { + liquidity: BigNumber; + amount0: BigNumber; + amount1: BigNumber; + } + >; + + mint( + params: INonfungiblePositionManager.MintParamsStruct, + overrides?: CallOverrides + ): Promise< + [BigNumber, BigNumber, BigNumber, BigNumber] & { + tokenId: BigNumber; + liquidity: BigNumber; + amount0: BigNumber; + amount1: BigNumber; + } + >; + + positions( + tokenId: BigNumberish, + overrides?: CallOverrides + ): Promise< + [ + BigNumber, + string, + string, + string, + number, + number, + number, + BigNumber, + BigNumber, + BigNumber, + BigNumber, + BigNumber + ] & { + nonce: BigNumber; + operator: string; + token0: string; + token1: string; + fee: number; + tickLower: number; + tickUpper: number; + liquidity: BigNumber; + feeGrowthInside0LastX128: BigNumber; + feeGrowthInside1LastX128: BigNumber; + tokensOwed0: BigNumber; + tokensOwed1: BigNumber; + } + >; + }; + + filters: { + "Collect(uint256,address,uint256,uint256)"( + tokenId?: BigNumberish | null, + recipient?: null, + amount0?: null, + amount1?: null + ): CollectEventFilter; + Collect( + tokenId?: BigNumberish | null, + recipient?: null, + amount0?: null, + amount1?: null + ): CollectEventFilter; + + "DecreaseLiquidity(uint256,uint128,uint256,uint256)"( + tokenId?: BigNumberish | null, + liquidity?: null, + amount0?: null, + amount1?: null + ): DecreaseLiquidityEventFilter; + DecreaseLiquidity( + tokenId?: BigNumberish | null, + liquidity?: null, + amount0?: null, + amount1?: null + ): DecreaseLiquidityEventFilter; + + "IncreaseLiquidity(uint256,uint128,uint256,uint256)"( + tokenId?: BigNumberish | null, + liquidity?: null, + amount0?: null, + amount1?: null + ): IncreaseLiquidityEventFilter; + IncreaseLiquidity( + tokenId?: BigNumberish | null, + liquidity?: null, + amount0?: null, + amount1?: null + ): IncreaseLiquidityEventFilter; + }; + + estimateGas: { + burn( + tokenId: BigNumberish, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + + collect( + params: INonfungiblePositionManager.CollectParamsStruct, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + + decreaseLiquidity( + params: INonfungiblePositionManager.DecreaseLiquidityParamsStruct, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + + increaseLiquidity( + params: INonfungiblePositionManager.IncreaseLiquidityParamsStruct, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + + mint( + params: INonfungiblePositionManager.MintParamsStruct, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + + positions( + tokenId: BigNumberish, + overrides?: CallOverrides + ): Promise; + }; + + populateTransaction: { + burn( + tokenId: BigNumberish, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + + collect( + params: INonfungiblePositionManager.CollectParamsStruct, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + + decreaseLiquidity( + params: INonfungiblePositionManager.DecreaseLiquidityParamsStruct, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + + increaseLiquidity( + params: INonfungiblePositionManager.IncreaseLiquidityParamsStruct, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + + mint( + params: INonfungiblePositionManager.MintParamsStruct, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + + positions( + tokenId: BigNumberish, + overrides?: CallOverrides + ): Promise; + }; +} diff --git a/packages/interfaces/typechain-types/contracts/testing/TestUniswapV3Contracts.sol/IPoolInitializer.ts b/packages/interfaces/typechain-types/contracts/testing/TestUniswapV3Contracts.sol/IPoolInitializer.ts new file mode 100644 index 00000000..fdbbf874 --- /dev/null +++ b/packages/interfaces/typechain-types/contracts/testing/TestUniswapV3Contracts.sol/IPoolInitializer.ts @@ -0,0 +1,122 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import type { + BaseContract, + BigNumber, + BigNumberish, + BytesLike, + CallOverrides, + ContractTransaction, + PayableOverrides, + 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, +} from "../../../common"; + +export interface IPoolInitializerInterface extends utils.Interface { + functions: { + "createAndInitializePoolIfNecessary(address,address,uint24,uint160)": FunctionFragment; + }; + + getFunction( + nameOrSignatureOrTopic: "createAndInitializePoolIfNecessary" + ): FunctionFragment; + + encodeFunctionData( + functionFragment: "createAndInitializePoolIfNecessary", + values: [string, string, BigNumberish, BigNumberish] + ): string; + + decodeFunctionResult( + functionFragment: "createAndInitializePoolIfNecessary", + data: BytesLike + ): Result; + + events: {}; +} + +export interface IPoolInitializer extends BaseContract { + connect(signerOrProvider: Signer | Provider | string): this; + attach(addressOrName: string): this; + deployed(): Promise; + + interface: IPoolInitializerInterface; + + 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: { + createAndInitializePoolIfNecessary( + token0: string, + token1: string, + fee: BigNumberish, + sqrtPriceX96: BigNumberish, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + }; + + createAndInitializePoolIfNecessary( + token0: string, + token1: string, + fee: BigNumberish, + sqrtPriceX96: BigNumberish, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + + callStatic: { + createAndInitializePoolIfNecessary( + token0: string, + token1: string, + fee: BigNumberish, + sqrtPriceX96: BigNumberish, + overrides?: CallOverrides + ): Promise; + }; + + filters: {}; + + estimateGas: { + createAndInitializePoolIfNecessary( + token0: string, + token1: string, + fee: BigNumberish, + sqrtPriceX96: BigNumberish, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + }; + + populateTransaction: { + createAndInitializePoolIfNecessary( + token0: string, + token1: string, + fee: BigNumberish, + sqrtPriceX96: BigNumberish, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + }; +} diff --git a/packages/interfaces/typechain-types/contracts/testing/TestUniswapV3Contracts.sol/index.ts b/packages/interfaces/typechain-types/contracts/testing/TestUniswapV3Contracts.sol/index.ts new file mode 100644 index 00000000..84f06e3a --- /dev/null +++ b/packages/interfaces/typechain-types/contracts/testing/TestUniswapV3Contracts.sol/index.ts @@ -0,0 +1,5 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +export type { INonfungiblePositionManager } from "./INonfungiblePositionManager"; +export type { IPoolInitializer } from "./IPoolInitializer"; diff --git a/packages/interfaces/typechain-types/contracts/testing/ZetaInteractorMock.ts b/packages/interfaces/typechain-types/contracts/testing/ZetaInteractorMock.ts new file mode 100644 index 00000000..2b8b35fc --- /dev/null +++ b/packages/interfaces/typechain-types/contracts/testing/ZetaInteractorMock.ts @@ -0,0 +1,387 @@ +/* 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, +} from "../../common"; + +export declare namespace ZetaInterfaces { + export type ZetaMessageStruct = { + zetaTxSenderAddress: BytesLike; + sourceChainId: BigNumberish; + destinationAddress: string; + zetaValueAndGas: BigNumberish; + message: BytesLike; + }; + + export type ZetaMessageStructOutput = [ + string, + BigNumber, + string, + BigNumber, + string + ] & { + zetaTxSenderAddress: string; + sourceChainId: BigNumber; + destinationAddress: string; + zetaValueAndGas: BigNumber; + message: string; + }; + + export type ZetaRevertStruct = { + zetaTxSenderAddress: string; + sourceChainId: BigNumberish; + destinationAddress: BytesLike; + destinationChainId: BigNumberish; + zetaValueAndGas: BigNumberish; + message: BytesLike; + }; + + export type ZetaRevertStructOutput = [ + string, + BigNumber, + string, + BigNumber, + BigNumber, + string + ] & { + zetaTxSenderAddress: string; + sourceChainId: BigNumber; + destinationAddress: string; + destinationChainId: BigNumber; + zetaValueAndGas: BigNumber; + message: string; + }; +} + +export interface ZetaInteractorMockInterface extends utils.Interface { + functions: { + "connector()": FunctionFragment; + "interactorsByChainId(uint256)": FunctionFragment; + "onZetaMessage((bytes,uint256,address,uint256,bytes))": FunctionFragment; + "onZetaRevert((address,uint256,bytes,uint256,uint256,bytes))": FunctionFragment; + "owner()": FunctionFragment; + "renounceOwnership()": FunctionFragment; + "setInteractorByChainId(uint256,bytes)": FunctionFragment; + "transferOwnership(address)": FunctionFragment; + }; + + getFunction( + nameOrSignatureOrTopic: + | "connector" + | "interactorsByChainId" + | "onZetaMessage" + | "onZetaRevert" + | "owner" + | "renounceOwnership" + | "setInteractorByChainId" + | "transferOwnership" + ): FunctionFragment; + + encodeFunctionData(functionFragment: "connector", values?: undefined): string; + encodeFunctionData( + functionFragment: "interactorsByChainId", + values: [BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "onZetaMessage", + values: [ZetaInterfaces.ZetaMessageStruct] + ): string; + encodeFunctionData( + functionFragment: "onZetaRevert", + values: [ZetaInterfaces.ZetaRevertStruct] + ): string; + encodeFunctionData(functionFragment: "owner", values?: undefined): string; + encodeFunctionData( + functionFragment: "renounceOwnership", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "setInteractorByChainId", + values: [BigNumberish, BytesLike] + ): string; + encodeFunctionData( + functionFragment: "transferOwnership", + values: [string] + ): string; + + decodeFunctionResult(functionFragment: "connector", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "interactorsByChainId", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "onZetaMessage", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "onZetaRevert", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "owner", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "renounceOwnership", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "setInteractorByChainId", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "transferOwnership", + data: BytesLike + ): Result; + + events: { + "OwnershipTransferred(address,address)": EventFragment; + }; + + getEvent(nameOrSignatureOrTopic: "OwnershipTransferred"): EventFragment; +} + +export interface OwnershipTransferredEventObject { + previousOwner: string; + newOwner: string; +} +export type OwnershipTransferredEvent = TypedEvent< + [string, string], + OwnershipTransferredEventObject +>; + +export type OwnershipTransferredEventFilter = + TypedEventFilter; + +export interface ZetaInteractorMock extends BaseContract { + connect(signerOrProvider: Signer | Provider | string): this; + attach(addressOrName: string): this; + deployed(): Promise; + + interface: ZetaInteractorMockInterface; + + 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: { + connector(overrides?: CallOverrides): Promise<[string]>; + + interactorsByChainId( + arg0: BigNumberish, + overrides?: CallOverrides + ): Promise<[string]>; + + onZetaMessage( + zetaMessage: ZetaInterfaces.ZetaMessageStruct, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + onZetaRevert( + zetaRevert: ZetaInterfaces.ZetaRevertStruct, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + owner(overrides?: CallOverrides): Promise<[string]>; + + renounceOwnership( + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + setInteractorByChainId( + destinationChainId: BigNumberish, + contractAddress: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + transferOwnership( + newOwner: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + }; + + connector(overrides?: CallOverrides): Promise; + + interactorsByChainId( + arg0: BigNumberish, + overrides?: CallOverrides + ): Promise; + + onZetaMessage( + zetaMessage: ZetaInterfaces.ZetaMessageStruct, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + onZetaRevert( + zetaRevert: ZetaInterfaces.ZetaRevertStruct, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + owner(overrides?: CallOverrides): Promise; + + renounceOwnership( + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + setInteractorByChainId( + destinationChainId: BigNumberish, + contractAddress: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + transferOwnership( + newOwner: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + callStatic: { + connector(overrides?: CallOverrides): Promise; + + interactorsByChainId( + arg0: BigNumberish, + overrides?: CallOverrides + ): Promise; + + onZetaMessage( + zetaMessage: ZetaInterfaces.ZetaMessageStruct, + overrides?: CallOverrides + ): Promise; + + onZetaRevert( + zetaRevert: ZetaInterfaces.ZetaRevertStruct, + overrides?: CallOverrides + ): Promise; + + owner(overrides?: CallOverrides): Promise; + + renounceOwnership(overrides?: CallOverrides): Promise; + + setInteractorByChainId( + destinationChainId: BigNumberish, + contractAddress: BytesLike, + overrides?: CallOverrides + ): Promise; + + transferOwnership( + newOwner: string, + overrides?: CallOverrides + ): Promise; + }; + + filters: { + "OwnershipTransferred(address,address)"( + previousOwner?: string | null, + newOwner?: string | null + ): OwnershipTransferredEventFilter; + OwnershipTransferred( + previousOwner?: string | null, + newOwner?: string | null + ): OwnershipTransferredEventFilter; + }; + + estimateGas: { + connector(overrides?: CallOverrides): Promise; + + interactorsByChainId( + arg0: BigNumberish, + overrides?: CallOverrides + ): Promise; + + onZetaMessage( + zetaMessage: ZetaInterfaces.ZetaMessageStruct, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + onZetaRevert( + zetaRevert: ZetaInterfaces.ZetaRevertStruct, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + owner(overrides?: CallOverrides): Promise; + + renounceOwnership( + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + setInteractorByChainId( + destinationChainId: BigNumberish, + contractAddress: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + transferOwnership( + newOwner: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + }; + + populateTransaction: { + connector(overrides?: CallOverrides): Promise; + + interactorsByChainId( + arg0: BigNumberish, + overrides?: CallOverrides + ): Promise; + + onZetaMessage( + zetaMessage: ZetaInterfaces.ZetaMessageStruct, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + onZetaRevert( + zetaRevert: ZetaInterfaces.ZetaRevertStruct, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + owner(overrides?: CallOverrides): Promise; + + renounceOwnership( + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + setInteractorByChainId( + destinationChainId: BigNumberish, + contractAddress: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + transferOwnership( + newOwner: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + }; +} diff --git a/packages/interfaces/typechain-types/contracts/testing/ZetaReceiverMock.ts b/packages/interfaces/typechain-types/contracts/testing/ZetaReceiverMock.ts new file mode 100644 index 00000000..48c44347 --- /dev/null +++ b/packages/interfaces/typechain-types/contracts/testing/ZetaReceiverMock.ts @@ -0,0 +1,232 @@ +/* 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, +} from "../../common"; + +export declare namespace ZetaInterfaces { + export type ZetaMessageStruct = { + zetaTxSenderAddress: BytesLike; + sourceChainId: BigNumberish; + destinationAddress: string; + zetaValueAndGas: BigNumberish; + message: BytesLike; + }; + + export type ZetaMessageStructOutput = [ + string, + BigNumber, + string, + BigNumber, + string + ] & { + zetaTxSenderAddress: string; + sourceChainId: BigNumber; + destinationAddress: string; + zetaValueAndGas: BigNumber; + message: string; + }; + + export type ZetaRevertStruct = { + zetaTxSenderAddress: string; + sourceChainId: BigNumberish; + destinationAddress: BytesLike; + destinationChainId: BigNumberish; + zetaValueAndGas: BigNumberish; + message: BytesLike; + }; + + export type ZetaRevertStructOutput = [ + string, + BigNumber, + string, + BigNumber, + BigNumber, + string + ] & { + zetaTxSenderAddress: string; + sourceChainId: BigNumber; + destinationAddress: string; + destinationChainId: BigNumber; + zetaValueAndGas: BigNumber; + message: string; + }; +} + +export interface ZetaReceiverMockInterface extends utils.Interface { + functions: { + "onZetaMessage((bytes,uint256,address,uint256,bytes))": FunctionFragment; + "onZetaRevert((address,uint256,bytes,uint256,uint256,bytes))": FunctionFragment; + }; + + getFunction( + nameOrSignatureOrTopic: "onZetaMessage" | "onZetaRevert" + ): FunctionFragment; + + encodeFunctionData( + functionFragment: "onZetaMessage", + values: [ZetaInterfaces.ZetaMessageStruct] + ): string; + encodeFunctionData( + functionFragment: "onZetaRevert", + values: [ZetaInterfaces.ZetaRevertStruct] + ): string; + + decodeFunctionResult( + functionFragment: "onZetaMessage", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "onZetaRevert", + data: BytesLike + ): Result; + + events: { + "MockOnZetaMessage(address)": EventFragment; + "MockOnZetaRevert(address)": EventFragment; + }; + + getEvent(nameOrSignatureOrTopic: "MockOnZetaMessage"): EventFragment; + getEvent(nameOrSignatureOrTopic: "MockOnZetaRevert"): EventFragment; +} + +export interface MockOnZetaMessageEventObject { + destinationAddress: string; +} +export type MockOnZetaMessageEvent = TypedEvent< + [string], + MockOnZetaMessageEventObject +>; + +export type MockOnZetaMessageEventFilter = + TypedEventFilter; + +export interface MockOnZetaRevertEventObject { + zetaTxSenderAddress: string; +} +export type MockOnZetaRevertEvent = TypedEvent< + [string], + MockOnZetaRevertEventObject +>; + +export type MockOnZetaRevertEventFilter = + TypedEventFilter; + +export interface ZetaReceiverMock extends BaseContract { + connect(signerOrProvider: Signer | Provider | string): this; + attach(addressOrName: string): this; + deployed(): Promise; + + interface: ZetaReceiverMockInterface; + + 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: { + onZetaMessage( + zetaMessage: ZetaInterfaces.ZetaMessageStruct, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + onZetaRevert( + zetaRevert: ZetaInterfaces.ZetaRevertStruct, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + }; + + onZetaMessage( + zetaMessage: ZetaInterfaces.ZetaMessageStruct, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + onZetaRevert( + zetaRevert: ZetaInterfaces.ZetaRevertStruct, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + callStatic: { + onZetaMessage( + zetaMessage: ZetaInterfaces.ZetaMessageStruct, + overrides?: CallOverrides + ): Promise; + + onZetaRevert( + zetaRevert: ZetaInterfaces.ZetaRevertStruct, + overrides?: CallOverrides + ): Promise; + }; + + filters: { + "MockOnZetaMessage(address)"( + destinationAddress?: null + ): MockOnZetaMessageEventFilter; + MockOnZetaMessage(destinationAddress?: null): MockOnZetaMessageEventFilter; + + "MockOnZetaRevert(address)"( + zetaTxSenderAddress?: null + ): MockOnZetaRevertEventFilter; + MockOnZetaRevert(zetaTxSenderAddress?: null): MockOnZetaRevertEventFilter; + }; + + estimateGas: { + onZetaMessage( + zetaMessage: ZetaInterfaces.ZetaMessageStruct, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + onZetaRevert( + zetaRevert: ZetaInterfaces.ZetaRevertStruct, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + }; + + populateTransaction: { + onZetaMessage( + zetaMessage: ZetaInterfaces.ZetaMessageStruct, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + onZetaRevert( + zetaRevert: ZetaInterfaces.ZetaRevertStruct, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + }; +} diff --git a/packages/interfaces/typechain-types/contracts/testing/index.ts b/packages/interfaces/typechain-types/contracts/testing/index.ts new file mode 100644 index 00000000..ae63ef88 --- /dev/null +++ b/packages/interfaces/typechain-types/contracts/testing/index.ts @@ -0,0 +1,7 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import type * as testUniswapV3ContractsSol from "./TestUniswapV3Contracts.sol"; +export type { testUniswapV3ContractsSol }; +export type { ZetaInteractorMock } from "./ZetaInteractorMock"; +export type { ZetaReceiverMock } from "./ZetaReceiverMock"; diff --git a/packages/interfaces/typechain-types/factories/@openzeppelin/contracts/access/Ownable__factory.ts b/packages/interfaces/typechain-types/factories/@openzeppelin/contracts/access/Ownable__factory.ts new file mode 100644 index 00000000..32f8cfe6 --- /dev/null +++ b/packages/interfaces/typechain-types/factories/@openzeppelin/contracts/access/Ownable__factory.ts @@ -0,0 +1,78 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ + +import { Contract, Signer, utils } from "ethers"; +import type { Provider } from "@ethersproject/providers"; +import type { + Ownable, + OwnableInterface, +} from "../../../../@openzeppelin/contracts/access/Ownable"; + +const _abi = [ + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "previousOwner", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "newOwner", + type: "address", + }, + ], + name: "OwnershipTransferred", + type: "event", + }, + { + inputs: [], + name: "owner", + outputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "renounceOwnership", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "newOwner", + type: "address", + }, + ], + name: "transferOwnership", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, +]; + +export class Ownable__factory { + static readonly abi = _abi; + static createInterface(): OwnableInterface { + return new utils.Interface(_abi) as OwnableInterface; + } + static connect( + address: string, + signerOrProvider: Signer | Provider + ): Ownable { + return new Contract(address, _abi, signerOrProvider) as Ownable; + } +} diff --git a/packages/interfaces/typechain-types/factories/@openzeppelin/contracts/access/index.ts b/packages/interfaces/typechain-types/factories/@openzeppelin/contracts/access/index.ts new file mode 100644 index 00000000..e332ae32 --- /dev/null +++ b/packages/interfaces/typechain-types/factories/@openzeppelin/contracts/access/index.ts @@ -0,0 +1,4 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +export { Ownable__factory } from "./Ownable__factory"; diff --git a/packages/interfaces/typechain-types/factories/@openzeppelin/contracts/index.ts b/packages/interfaces/typechain-types/factories/@openzeppelin/contracts/index.ts new file mode 100644 index 00000000..f3879d61 --- /dev/null +++ b/packages/interfaces/typechain-types/factories/@openzeppelin/contracts/index.ts @@ -0,0 +1,6 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +export * as access from "./access"; +export * as security from "./security"; +export * as token from "./token"; diff --git a/packages/interfaces/typechain-types/factories/@openzeppelin/contracts/security/Pausable__factory.ts b/packages/interfaces/typechain-types/factories/@openzeppelin/contracts/security/Pausable__factory.ts new file mode 100644 index 00000000..202ac625 --- /dev/null +++ b/packages/interfaces/typechain-types/factories/@openzeppelin/contracts/security/Pausable__factory.ts @@ -0,0 +1,65 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ + +import { Contract, Signer, utils } from "ethers"; +import type { Provider } from "@ethersproject/providers"; +import type { + Pausable, + PausableInterface, +} from "../../../../@openzeppelin/contracts/security/Pausable"; + +const _abi = [ + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "address", + name: "account", + type: "address", + }, + ], + name: "Paused", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "address", + name: "account", + type: "address", + }, + ], + name: "Unpaused", + type: "event", + }, + { + inputs: [], + name: "paused", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "view", + type: "function", + }, +]; + +export class Pausable__factory { + static readonly abi = _abi; + static createInterface(): PausableInterface { + return new utils.Interface(_abi) as PausableInterface; + } + static connect( + address: string, + signerOrProvider: Signer | Provider + ): Pausable { + return new Contract(address, _abi, signerOrProvider) as Pausable; + } +} diff --git a/packages/interfaces/typechain-types/factories/@openzeppelin/contracts/security/index.ts b/packages/interfaces/typechain-types/factories/@openzeppelin/contracts/security/index.ts new file mode 100644 index 00000000..0d4ecd47 --- /dev/null +++ b/packages/interfaces/typechain-types/factories/@openzeppelin/contracts/security/index.ts @@ -0,0 +1,4 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +export { Pausable__factory } from "./Pausable__factory"; diff --git a/packages/interfaces/typechain-types/factories/@openzeppelin/contracts/token/ERC20/ERC20__factory.ts b/packages/interfaces/typechain-types/factories/@openzeppelin/contracts/token/ERC20/ERC20__factory.ts new file mode 100644 index 00000000..ebe8fe78 --- /dev/null +++ b/packages/interfaces/typechain-types/factories/@openzeppelin/contracts/token/ERC20/ERC20__factory.ts @@ -0,0 +1,349 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import { Signer, utils, Contract, ContractFactory, Overrides } from "ethers"; +import type { Provider, TransactionRequest } from "@ethersproject/providers"; +import type { + ERC20, + ERC20Interface, +} from "../../../../../@openzeppelin/contracts/token/ERC20/ERC20"; + +const _abi = [ + { + inputs: [ + { + internalType: "string", + name: "name_", + type: "string", + }, + { + internalType: "string", + name: "symbol_", + type: "string", + }, + ], + stateMutability: "nonpayable", + type: "constructor", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "owner", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "spender", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "value", + type: "uint256", + }, + ], + name: "Approval", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "from", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "to", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "value", + type: "uint256", + }, + ], + name: "Transfer", + type: "event", + }, + { + inputs: [ + { + internalType: "address", + name: "owner", + type: "address", + }, + { + internalType: "address", + name: "spender", + type: "address", + }, + ], + name: "allowance", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "spender", + type: "address", + }, + { + internalType: "uint256", + name: "amount", + type: "uint256", + }, + ], + name: "approve", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "account", + type: "address", + }, + ], + name: "balanceOf", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "decimals", + outputs: [ + { + internalType: "uint8", + name: "", + type: "uint8", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "spender", + type: "address", + }, + { + internalType: "uint256", + name: "subtractedValue", + type: "uint256", + }, + ], + name: "decreaseAllowance", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "spender", + type: "address", + }, + { + internalType: "uint256", + name: "addedValue", + type: "uint256", + }, + ], + name: "increaseAllowance", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "name", + outputs: [ + { + internalType: "string", + name: "", + type: "string", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "symbol", + outputs: [ + { + internalType: "string", + name: "", + type: "string", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "totalSupply", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "to", + type: "address", + }, + { + internalType: "uint256", + name: "amount", + type: "uint256", + }, + ], + name: "transfer", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "from", + type: "address", + }, + { + internalType: "address", + name: "to", + type: "address", + }, + { + internalType: "uint256", + name: "amount", + type: "uint256", + }, + ], + name: "transferFrom", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, +]; + +const _bytecode = + "0x60806040523480156200001157600080fd5b50604051620016203803806200162083398181016040528101906200003791906200019f565b81600390805190602001906200004f92919062000071565b5080600490805190602001906200006892919062000071565b505050620003a8565b8280546200007f90620002b9565b90600052602060002090601f016020900481019282620000a35760008555620000ef565b82601f10620000be57805160ff1916838001178555620000ef565b82800160010185558215620000ef579182015b82811115620000ee578251825591602001919060010190620000d1565b5b509050620000fe919062000102565b5090565b5b808211156200011d57600081600090555060010162000103565b5090565b60006200013862000132846200024d565b62000224565b90508281526020810184848401111562000157576200015662000388565b5b6200016484828562000283565b509392505050565b600082601f83011262000184576200018362000383565b5b81516200019684826020860162000121565b91505092915050565b60008060408385031215620001b957620001b862000392565b5b600083015167ffffffffffffffff811115620001da57620001d96200038d565b5b620001e8858286016200016c565b925050602083015167ffffffffffffffff8111156200020c576200020b6200038d565b5b6200021a858286016200016c565b9150509250929050565b60006200023062000243565b90506200023e8282620002ef565b919050565b6000604051905090565b600067ffffffffffffffff8211156200026b576200026a62000354565b5b620002768262000397565b9050602081019050919050565b60005b83811015620002a357808201518184015260208101905062000286565b83811115620002b3576000848401525b50505050565b60006002820490506001821680620002d257607f821691505b60208210811415620002e957620002e862000325565b5b50919050565b620002fa8262000397565b810181811067ffffffffffffffff821117156200031c576200031b62000354565b5b80604052505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600080fd5b600080fd5b600080fd5b600080fd5b6000601f19601f8301169050919050565b61126880620003b86000396000f3fe608060405234801561001057600080fd5b50600436106100a95760003560e01c80633950935111610071578063395093511461016857806370a082311461019857806395d89b41146101c8578063a457c2d7146101e6578063a9059cbb14610216578063dd62ed3e14610246576100a9565b806306fdde03146100ae578063095ea7b3146100cc57806318160ddd146100fc57806323b872dd1461011a578063313ce5671461014a575b600080fd5b6100b6610276565b6040516100c39190610d29565b60405180910390f35b6100e660048036038101906100e19190610b73565b610308565b6040516100f39190610d0e565b60405180910390f35b61010461032b565b6040516101119190610e2b565b60405180910390f35b610134600480360381019061012f9190610b20565b610335565b6040516101419190610d0e565b60405180910390f35b610152610364565b60405161015f9190610e46565b60405180910390f35b610182600480360381019061017d9190610b73565b61036d565b60405161018f9190610d0e565b60405180910390f35b6101b260048036038101906101ad9190610ab3565b6103a4565b6040516101bf9190610e2b565b60405180910390f35b6101d06103ec565b6040516101dd9190610d29565b60405180910390f35b61020060048036038101906101fb9190610b73565b61047e565b60405161020d9190610d0e565b60405180910390f35b610230600480360381019061022b9190610b73565b6104f5565b60405161023d9190610d0e565b60405180910390f35b610260600480360381019061025b9190610ae0565b610518565b60405161026d9190610e2b565b60405180910390f35b60606003805461028590610f5b565b80601f01602080910402602001604051908101604052809291908181526020018280546102b190610f5b565b80156102fe5780601f106102d3576101008083540402835291602001916102fe565b820191906000526020600020905b8154815290600101906020018083116102e157829003601f168201915b5050505050905090565b60008061031361059f565b90506103208185856105a7565b600191505092915050565b6000600254905090565b60008061034061059f565b905061034d858285610772565b6103588585856107fe565b60019150509392505050565b60006012905090565b60008061037861059f565b905061039981858561038a8589610518565b6103949190610e7d565b6105a7565b600191505092915050565b60008060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b6060600480546103fb90610f5b565b80601f016020809104026020016040519081016040528092919081815260200182805461042790610f5b565b80156104745780601f1061044957610100808354040283529160200191610474565b820191906000526020600020905b81548152906001019060200180831161045757829003601f168201915b5050505050905090565b60008061048961059f565b905060006104978286610518565b9050838110156104dc576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016104d390610e0b565b60405180910390fd5b6104e982868684036105a7565b60019250505092915050565b60008061050061059f565b905061050d8185856107fe565b600191505092915050565b6000600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415610617576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161060e90610deb565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415610687576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161067e90610d6b565b60405180910390fd5b80600160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925836040516107659190610e2b565b60405180910390a3505050565b600061077e8484610518565b90507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff81146107f857818110156107ea576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016107e190610d8b565b60405180910390fd5b6107f784848484036105a7565b5b50505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16141561086e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161086590610dcb565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614156108de576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016108d590610d4b565b60405180910390fd5b6108e9838383610a7f565b60008060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205490508181101561096f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161096690610dab565b60405180910390fd5b8181036000808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550816000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254610a029190610e7d565b925050819055508273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef84604051610a669190610e2b565b60405180910390a3610a79848484610a84565b50505050565b505050565b505050565b600081359050610a9881611204565b92915050565b600081359050610aad8161121b565b92915050565b600060208284031215610ac957610ac8610feb565b5b6000610ad784828501610a89565b91505092915050565b60008060408385031215610af757610af6610feb565b5b6000610b0585828601610a89565b9250506020610b1685828601610a89565b9150509250929050565b600080600060608486031215610b3957610b38610feb565b5b6000610b4786828701610a89565b9350506020610b5886828701610a89565b9250506040610b6986828701610a9e565b9150509250925092565b60008060408385031215610b8a57610b89610feb565b5b6000610b9885828601610a89565b9250506020610ba985828601610a9e565b9150509250929050565b610bbc81610ee5565b82525050565b6000610bcd82610e61565b610bd78185610e6c565b9350610be7818560208601610f28565b610bf081610ff0565b840191505092915050565b6000610c08602383610e6c565b9150610c1382611001565b604082019050919050565b6000610c2b602283610e6c565b9150610c3682611050565b604082019050919050565b6000610c4e601d83610e6c565b9150610c598261109f565b602082019050919050565b6000610c71602683610e6c565b9150610c7c826110c8565b604082019050919050565b6000610c94602583610e6c565b9150610c9f82611117565b604082019050919050565b6000610cb7602483610e6c565b9150610cc282611166565b604082019050919050565b6000610cda602583610e6c565b9150610ce5826111b5565b604082019050919050565b610cf981610f11565b82525050565b610d0881610f1b565b82525050565b6000602082019050610d236000830184610bb3565b92915050565b60006020820190508181036000830152610d438184610bc2565b905092915050565b60006020820190508181036000830152610d6481610bfb565b9050919050565b60006020820190508181036000830152610d8481610c1e565b9050919050565b60006020820190508181036000830152610da481610c41565b9050919050565b60006020820190508181036000830152610dc481610c64565b9050919050565b60006020820190508181036000830152610de481610c87565b9050919050565b60006020820190508181036000830152610e0481610caa565b9050919050565b60006020820190508181036000830152610e2481610ccd565b9050919050565b6000602082019050610e406000830184610cf0565b92915050565b6000602082019050610e5b6000830184610cff565b92915050565b600081519050919050565b600082825260208201905092915050565b6000610e8882610f11565b9150610e9383610f11565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff03821115610ec857610ec7610f8d565b5b828201905092915050565b6000610ede82610ef1565b9050919050565b60008115159050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b600060ff82169050919050565b60005b83811015610f46578082015181840152602081019050610f2b565b83811115610f55576000848401525b50505050565b60006002820490506001821680610f7357607f821691505b60208210811415610f8757610f86610fbc565b5b50919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b600080fd5b6000601f19601f8301169050919050565b7f45524332303a207472616e7366657220746f20746865207a65726f206164647260008201527f6573730000000000000000000000000000000000000000000000000000000000602082015250565b7f45524332303a20617070726f766520746f20746865207a65726f20616464726560008201527f7373000000000000000000000000000000000000000000000000000000000000602082015250565b7f45524332303a20696e73756666696369656e7420616c6c6f77616e6365000000600082015250565b7f45524332303a207472616e7366657220616d6f756e742065786365656473206260008201527f616c616e63650000000000000000000000000000000000000000000000000000602082015250565b7f45524332303a207472616e736665722066726f6d20746865207a65726f20616460008201527f6472657373000000000000000000000000000000000000000000000000000000602082015250565b7f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460008201527f7265737300000000000000000000000000000000000000000000000000000000602082015250565b7f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f7760008201527f207a65726f000000000000000000000000000000000000000000000000000000602082015250565b61120d81610ed3565b811461121857600080fd5b50565b61122481610f11565b811461122f57600080fd5b5056fea2646970667358221220f812f72e4617ac1793217922d861ad44469876d78a78cf959b8249c39441c2b864736f6c63430008070033"; + +type ERC20ConstructorParams = + | [signer?: Signer] + | ConstructorParameters; + +const isSuperArgs = ( + xs: ERC20ConstructorParams +): xs is ConstructorParameters => xs.length > 1; + +export class ERC20__factory extends ContractFactory { + constructor(...args: ERC20ConstructorParams) { + if (isSuperArgs(args)) { + super(...args); + } else { + super(_abi, _bytecode, args[0]); + } + } + + override deploy( + name_: string, + symbol_: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise { + return super.deploy(name_, symbol_, overrides || {}) as Promise; + } + override getDeployTransaction( + name_: string, + symbol_: string, + overrides?: Overrides & { from?: string | Promise } + ): TransactionRequest { + return super.getDeployTransaction(name_, symbol_, overrides || {}); + } + override attach(address: string): ERC20 { + return super.attach(address) as ERC20; + } + override connect(signer: Signer): ERC20__factory { + return super.connect(signer) as ERC20__factory; + } + + static readonly bytecode = _bytecode; + static readonly abi = _abi; + static createInterface(): ERC20Interface { + return new utils.Interface(_abi) as ERC20Interface; + } + static connect(address: string, signerOrProvider: Signer | Provider): ERC20 { + return new Contract(address, _abi, signerOrProvider) as ERC20; + } +} diff --git a/packages/interfaces/typechain-types/factories/@openzeppelin/contracts/token/ERC20/IERC20__factory.ts b/packages/interfaces/typechain-types/factories/@openzeppelin/contracts/token/ERC20/IERC20__factory.ts new file mode 100644 index 00000000..52ad5a1f --- /dev/null +++ b/packages/interfaces/typechain-types/factories/@openzeppelin/contracts/token/ERC20/IERC20__factory.ts @@ -0,0 +1,206 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ + +import { Contract, Signer, utils } from "ethers"; +import type { Provider } from "@ethersproject/providers"; +import type { + IERC20, + IERC20Interface, +} from "../../../../../@openzeppelin/contracts/token/ERC20/IERC20"; + +const _abi = [ + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "owner", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "spender", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "value", + type: "uint256", + }, + ], + name: "Approval", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "from", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "to", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "value", + type: "uint256", + }, + ], + name: "Transfer", + type: "event", + }, + { + inputs: [ + { + internalType: "address", + name: "owner", + type: "address", + }, + { + internalType: "address", + name: "spender", + type: "address", + }, + ], + name: "allowance", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "spender", + type: "address", + }, + { + internalType: "uint256", + name: "amount", + type: "uint256", + }, + ], + name: "approve", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "account", + type: "address", + }, + ], + name: "balanceOf", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "totalSupply", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "to", + type: "address", + }, + { + internalType: "uint256", + name: "amount", + type: "uint256", + }, + ], + name: "transfer", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "from", + type: "address", + }, + { + internalType: "address", + name: "to", + type: "address", + }, + { + internalType: "uint256", + name: "amount", + type: "uint256", + }, + ], + name: "transferFrom", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, +]; + +export class IERC20__factory { + static readonly abi = _abi; + static createInterface(): IERC20Interface { + return new utils.Interface(_abi) as IERC20Interface; + } + static connect(address: string, signerOrProvider: Signer | Provider): IERC20 { + return new Contract(address, _abi, signerOrProvider) as IERC20; + } +} diff --git a/packages/interfaces/typechain-types/factories/@openzeppelin/contracts/token/ERC20/extensions/ERC20Burnable__factory.ts b/packages/interfaces/typechain-types/factories/@openzeppelin/contracts/token/ERC20/extensions/ERC20Burnable__factory.ts new file mode 100644 index 00000000..485144f2 --- /dev/null +++ b/packages/interfaces/typechain-types/factories/@openzeppelin/contracts/token/ERC20/extensions/ERC20Burnable__factory.ts @@ -0,0 +1,327 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ + +import { Contract, Signer, utils } from "ethers"; +import type { Provider } from "@ethersproject/providers"; +import type { + ERC20Burnable, + ERC20BurnableInterface, +} from "../../../../../../@openzeppelin/contracts/token/ERC20/extensions/ERC20Burnable"; + +const _abi = [ + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "owner", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "spender", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "value", + type: "uint256", + }, + ], + name: "Approval", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "from", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "to", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "value", + type: "uint256", + }, + ], + name: "Transfer", + type: "event", + }, + { + inputs: [ + { + internalType: "address", + name: "owner", + type: "address", + }, + { + internalType: "address", + name: "spender", + type: "address", + }, + ], + name: "allowance", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "spender", + type: "address", + }, + { + internalType: "uint256", + name: "amount", + type: "uint256", + }, + ], + name: "approve", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "account", + type: "address", + }, + ], + name: "balanceOf", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "amount", + type: "uint256", + }, + ], + name: "burn", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "account", + type: "address", + }, + { + internalType: "uint256", + name: "amount", + type: "uint256", + }, + ], + name: "burnFrom", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "decimals", + outputs: [ + { + internalType: "uint8", + name: "", + type: "uint8", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "spender", + type: "address", + }, + { + internalType: "uint256", + name: "subtractedValue", + type: "uint256", + }, + ], + name: "decreaseAllowance", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "spender", + type: "address", + }, + { + internalType: "uint256", + name: "addedValue", + type: "uint256", + }, + ], + name: "increaseAllowance", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "name", + outputs: [ + { + internalType: "string", + name: "", + type: "string", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "symbol", + outputs: [ + { + internalType: "string", + name: "", + type: "string", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "totalSupply", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "to", + type: "address", + }, + { + internalType: "uint256", + name: "amount", + type: "uint256", + }, + ], + name: "transfer", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "from", + type: "address", + }, + { + internalType: "address", + name: "to", + type: "address", + }, + { + internalType: "uint256", + name: "amount", + type: "uint256", + }, + ], + name: "transferFrom", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, +]; + +export class ERC20Burnable__factory { + static readonly abi = _abi; + static createInterface(): ERC20BurnableInterface { + return new utils.Interface(_abi) as ERC20BurnableInterface; + } + static connect( + address: string, + signerOrProvider: Signer | Provider + ): ERC20Burnable { + return new Contract(address, _abi, signerOrProvider) as ERC20Burnable; + } +} diff --git a/packages/interfaces/typechain-types/factories/@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata__factory.ts b/packages/interfaces/typechain-types/factories/@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata__factory.ts new file mode 100644 index 00000000..a9ab7436 --- /dev/null +++ b/packages/interfaces/typechain-types/factories/@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata__factory.ts @@ -0,0 +1,248 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ + +import { Contract, Signer, utils } from "ethers"; +import type { Provider } from "@ethersproject/providers"; +import type { + IERC20Metadata, + IERC20MetadataInterface, +} from "../../../../../../@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata"; + +const _abi = [ + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "owner", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "spender", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "value", + type: "uint256", + }, + ], + name: "Approval", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "from", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "to", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "value", + type: "uint256", + }, + ], + name: "Transfer", + type: "event", + }, + { + inputs: [ + { + internalType: "address", + name: "owner", + type: "address", + }, + { + internalType: "address", + name: "spender", + type: "address", + }, + ], + name: "allowance", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "spender", + type: "address", + }, + { + internalType: "uint256", + name: "amount", + type: "uint256", + }, + ], + name: "approve", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "account", + type: "address", + }, + ], + name: "balanceOf", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "decimals", + outputs: [ + { + internalType: "uint8", + name: "", + type: "uint8", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "name", + outputs: [ + { + internalType: "string", + name: "", + type: "string", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "symbol", + outputs: [ + { + internalType: "string", + name: "", + type: "string", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "totalSupply", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "to", + type: "address", + }, + { + internalType: "uint256", + name: "amount", + type: "uint256", + }, + ], + name: "transfer", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "from", + type: "address", + }, + { + internalType: "address", + name: "to", + type: "address", + }, + { + internalType: "uint256", + name: "amount", + type: "uint256", + }, + ], + name: "transferFrom", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, +]; + +export class IERC20Metadata__factory { + static readonly abi = _abi; + static createInterface(): IERC20MetadataInterface { + return new utils.Interface(_abi) as IERC20MetadataInterface; + } + static connect( + address: string, + signerOrProvider: Signer | Provider + ): IERC20Metadata { + return new Contract(address, _abi, signerOrProvider) as IERC20Metadata; + } +} diff --git a/packages/interfaces/typechain-types/factories/@openzeppelin/contracts/token/ERC20/extensions/index.ts b/packages/interfaces/typechain-types/factories/@openzeppelin/contracts/token/ERC20/extensions/index.ts new file mode 100644 index 00000000..3ddce532 --- /dev/null +++ b/packages/interfaces/typechain-types/factories/@openzeppelin/contracts/token/ERC20/extensions/index.ts @@ -0,0 +1,5 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +export { ERC20Burnable__factory } from "./ERC20Burnable__factory"; +export { IERC20Metadata__factory } from "./IERC20Metadata__factory"; diff --git a/packages/interfaces/typechain-types/factories/@openzeppelin/contracts/token/ERC20/index.ts b/packages/interfaces/typechain-types/factories/@openzeppelin/contracts/token/ERC20/index.ts new file mode 100644 index 00000000..3523dc7a --- /dev/null +++ b/packages/interfaces/typechain-types/factories/@openzeppelin/contracts/token/ERC20/index.ts @@ -0,0 +1,6 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +export * as extensions from "./extensions"; +export { ERC20__factory } from "./ERC20__factory"; +export { IERC20__factory } from "./IERC20__factory"; diff --git a/packages/interfaces/typechain-types/factories/@openzeppelin/contracts/token/index.ts b/packages/interfaces/typechain-types/factories/@openzeppelin/contracts/token/index.ts new file mode 100644 index 00000000..da1e061e --- /dev/null +++ b/packages/interfaces/typechain-types/factories/@openzeppelin/contracts/token/index.ts @@ -0,0 +1,4 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +export * as erc20 from "./ERC20"; diff --git a/packages/interfaces/typechain-types/factories/@openzeppelin/index.ts b/packages/interfaces/typechain-types/factories/@openzeppelin/index.ts new file mode 100644 index 00000000..6397da09 --- /dev/null +++ b/packages/interfaces/typechain-types/factories/@openzeppelin/index.ts @@ -0,0 +1,4 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +export * as contracts from "./contracts"; diff --git a/packages/interfaces/typechain-types/factories/@uniswap/index.ts b/packages/interfaces/typechain-types/factories/@uniswap/index.ts new file mode 100644 index 00000000..b34b9840 --- /dev/null +++ b/packages/interfaces/typechain-types/factories/@uniswap/index.ts @@ -0,0 +1,7 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +export * as v2Core from "./v2-core"; +export * as v2Periphery from "./v2-periphery"; +export * as v3Core from "./v3-core"; +export * as v3Periphery from "./v3-periphery"; diff --git a/packages/interfaces/typechain-types/factories/@uniswap/v2-core/contracts/index.ts b/packages/interfaces/typechain-types/factories/@uniswap/v2-core/contracts/index.ts new file mode 100644 index 00000000..1d3444d5 --- /dev/null +++ b/packages/interfaces/typechain-types/factories/@uniswap/v2-core/contracts/index.ts @@ -0,0 +1,4 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +export * as interfaces from "./interfaces"; diff --git a/packages/interfaces/typechain-types/factories/@uniswap/v2-core/contracts/interfaces/IUniswapV2Factory__factory.ts b/packages/interfaces/typechain-types/factories/@uniswap/v2-core/contracts/interfaces/IUniswapV2Factory__factory.ts new file mode 100644 index 00000000..c99bc76d --- /dev/null +++ b/packages/interfaces/typechain-types/factories/@uniswap/v2-core/contracts/interfaces/IUniswapV2Factory__factory.ts @@ -0,0 +1,189 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ + +import { Contract, Signer, utils } from "ethers"; +import type { Provider } from "@ethersproject/providers"; +import type { + IUniswapV2Factory, + IUniswapV2FactoryInterface, +} from "../../../../../@uniswap/v2-core/contracts/interfaces/IUniswapV2Factory"; + +const _abi = [ + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "token0", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "token1", + type: "address", + }, + { + indexed: false, + internalType: "address", + name: "pair", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + name: "PairCreated", + type: "event", + }, + { + inputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + name: "allPairs", + outputs: [ + { + internalType: "address", + name: "pair", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "allPairsLength", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "tokenA", + type: "address", + }, + { + internalType: "address", + name: "tokenB", + type: "address", + }, + ], + name: "createPair", + outputs: [ + { + internalType: "address", + name: "pair", + type: "address", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "feeTo", + outputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "feeToSetter", + outputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "tokenA", + type: "address", + }, + { + internalType: "address", + name: "tokenB", + type: "address", + }, + ], + name: "getPair", + outputs: [ + { + internalType: "address", + name: "pair", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + name: "setFeeTo", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + name: "setFeeToSetter", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, +]; + +export class IUniswapV2Factory__factory { + static readonly abi = _abi; + static createInterface(): IUniswapV2FactoryInterface { + return new utils.Interface(_abi) as IUniswapV2FactoryInterface; + } + static connect( + address: string, + signerOrProvider: Signer | Provider + ): IUniswapV2Factory { + return new Contract(address, _abi, signerOrProvider) as IUniswapV2Factory; + } +} diff --git a/packages/interfaces/typechain-types/factories/@uniswap/v2-core/contracts/interfaces/IUniswapV2Pair__factory.ts b/packages/interfaces/typechain-types/factories/@uniswap/v2-core/contracts/interfaces/IUniswapV2Pair__factory.ts new file mode 100644 index 00000000..4c757ca1 --- /dev/null +++ b/packages/interfaces/typechain-types/factories/@uniswap/v2-core/contracts/interfaces/IUniswapV2Pair__factory.ts @@ -0,0 +1,677 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ + +import { Contract, Signer, utils } from "ethers"; +import type { Provider } from "@ethersproject/providers"; +import type { + IUniswapV2Pair, + IUniswapV2PairInterface, +} from "../../../../../@uniswap/v2-core/contracts/interfaces/IUniswapV2Pair"; + +const _abi = [ + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "owner", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "spender", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "value", + type: "uint256", + }, + ], + name: "Approval", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "sender", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "amount0", + type: "uint256", + }, + { + indexed: false, + internalType: "uint256", + name: "amount1", + type: "uint256", + }, + { + indexed: true, + internalType: "address", + name: "to", + type: "address", + }, + ], + name: "Burn", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "sender", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "amount0", + type: "uint256", + }, + { + indexed: false, + internalType: "uint256", + name: "amount1", + type: "uint256", + }, + ], + name: "Mint", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "sender", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "amount0In", + type: "uint256", + }, + { + indexed: false, + internalType: "uint256", + name: "amount1In", + type: "uint256", + }, + { + indexed: false, + internalType: "uint256", + name: "amount0Out", + type: "uint256", + }, + { + indexed: false, + internalType: "uint256", + name: "amount1Out", + type: "uint256", + }, + { + indexed: true, + internalType: "address", + name: "to", + type: "address", + }, + ], + name: "Swap", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "uint112", + name: "reserve0", + type: "uint112", + }, + { + indexed: false, + internalType: "uint112", + name: "reserve1", + type: "uint112", + }, + ], + name: "Sync", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "from", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "to", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "value", + type: "uint256", + }, + ], + name: "Transfer", + type: "event", + }, + { + inputs: [], + name: "DOMAIN_SEPARATOR", + outputs: [ + { + internalType: "bytes32", + name: "", + type: "bytes32", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "MINIMUM_LIQUIDITY", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "pure", + type: "function", + }, + { + inputs: [], + name: "PERMIT_TYPEHASH", + outputs: [ + { + internalType: "bytes32", + name: "", + type: "bytes32", + }, + ], + stateMutability: "pure", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "owner", + type: "address", + }, + { + internalType: "address", + name: "spender", + type: "address", + }, + ], + name: "allowance", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "spender", + type: "address", + }, + { + internalType: "uint256", + name: "value", + type: "uint256", + }, + ], + name: "approve", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "owner", + type: "address", + }, + ], + name: "balanceOf", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "to", + type: "address", + }, + ], + name: "burn", + outputs: [ + { + internalType: "uint256", + name: "amount0", + type: "uint256", + }, + { + internalType: "uint256", + name: "amount1", + type: "uint256", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "decimals", + outputs: [ + { + internalType: "uint8", + name: "", + type: "uint8", + }, + ], + stateMutability: "pure", + type: "function", + }, + { + inputs: [], + name: "factory", + outputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "getReserves", + outputs: [ + { + internalType: "uint112", + name: "reserve0", + type: "uint112", + }, + { + internalType: "uint112", + name: "reserve1", + type: "uint112", + }, + { + internalType: "uint32", + name: "blockTimestampLast", + type: "uint32", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + { + internalType: "address", + name: "", + type: "address", + }, + ], + name: "initialize", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "kLast", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "to", + type: "address", + }, + ], + name: "mint", + outputs: [ + { + internalType: "uint256", + name: "liquidity", + type: "uint256", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "name", + outputs: [ + { + internalType: "string", + name: "", + type: "string", + }, + ], + stateMutability: "pure", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "owner", + type: "address", + }, + ], + name: "nonces", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "owner", + type: "address", + }, + { + internalType: "address", + name: "spender", + type: "address", + }, + { + internalType: "uint256", + name: "value", + type: "uint256", + }, + { + internalType: "uint256", + name: "deadline", + type: "uint256", + }, + { + internalType: "uint8", + name: "v", + type: "uint8", + }, + { + internalType: "bytes32", + name: "r", + type: "bytes32", + }, + { + internalType: "bytes32", + name: "s", + type: "bytes32", + }, + ], + name: "permit", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "price0CumulativeLast", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "price1CumulativeLast", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "to", + type: "address", + }, + ], + name: "skim", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "amount0Out", + type: "uint256", + }, + { + internalType: "uint256", + name: "amount1Out", + type: "uint256", + }, + { + internalType: "address", + name: "to", + type: "address", + }, + { + internalType: "bytes", + name: "data", + type: "bytes", + }, + ], + name: "swap", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "symbol", + outputs: [ + { + internalType: "string", + name: "", + type: "string", + }, + ], + stateMutability: "pure", + type: "function", + }, + { + inputs: [], + name: "sync", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "token0", + outputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "token1", + outputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "totalSupply", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "to", + type: "address", + }, + { + internalType: "uint256", + name: "value", + type: "uint256", + }, + ], + name: "transfer", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "from", + type: "address", + }, + { + internalType: "address", + name: "to", + type: "address", + }, + { + internalType: "uint256", + name: "value", + type: "uint256", + }, + ], + name: "transferFrom", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, +]; + +export class IUniswapV2Pair__factory { + static readonly abi = _abi; + static createInterface(): IUniswapV2PairInterface { + return new utils.Interface(_abi) as IUniswapV2PairInterface; + } + static connect( + address: string, + signerOrProvider: Signer | Provider + ): IUniswapV2Pair { + return new Contract(address, _abi, signerOrProvider) as IUniswapV2Pair; + } +} diff --git a/packages/interfaces/typechain-types/factories/@uniswap/v2-core/contracts/interfaces/index.ts b/packages/interfaces/typechain-types/factories/@uniswap/v2-core/contracts/interfaces/index.ts new file mode 100644 index 00000000..7ae5955d --- /dev/null +++ b/packages/interfaces/typechain-types/factories/@uniswap/v2-core/contracts/interfaces/index.ts @@ -0,0 +1,5 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +export { IUniswapV2Factory__factory } from "./IUniswapV2Factory__factory"; +export { IUniswapV2Pair__factory } from "./IUniswapV2Pair__factory"; diff --git a/packages/interfaces/typechain-types/factories/@uniswap/v2-core/index.ts b/packages/interfaces/typechain-types/factories/@uniswap/v2-core/index.ts new file mode 100644 index 00000000..6397da09 --- /dev/null +++ b/packages/interfaces/typechain-types/factories/@uniswap/v2-core/index.ts @@ -0,0 +1,4 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +export * as contracts from "./contracts"; diff --git a/packages/interfaces/typechain-types/factories/@uniswap/v2-periphery/contracts/UniswapV2Router02__factory.ts b/packages/interfaces/typechain-types/factories/@uniswap/v2-periphery/contracts/UniswapV2Router02__factory.ts new file mode 100644 index 00000000..1db22e7b --- /dev/null +++ b/packages/interfaces/typechain-types/factories/@uniswap/v2-periphery/contracts/UniswapV2Router02__factory.ts @@ -0,0 +1,1041 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import { Signer, utils, Contract, ContractFactory, Overrides } from "ethers"; +import type { Provider, TransactionRequest } from "@ethersproject/providers"; +import type { + UniswapV2Router02, + UniswapV2Router02Interface, +} from "../../../../@uniswap/v2-periphery/contracts/UniswapV2Router02"; + +const _abi = [ + { + inputs: [ + { + internalType: "address", + name: "_factory", + type: "address", + }, + { + internalType: "address", + name: "_WETH", + type: "address", + }, + ], + stateMutability: "nonpayable", + type: "constructor", + }, + { + inputs: [], + name: "WETH", + outputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "tokenA", + type: "address", + }, + { + internalType: "address", + name: "tokenB", + type: "address", + }, + { + internalType: "uint256", + name: "amountADesired", + type: "uint256", + }, + { + internalType: "uint256", + name: "amountBDesired", + type: "uint256", + }, + { + internalType: "uint256", + name: "amountAMin", + type: "uint256", + }, + { + internalType: "uint256", + name: "amountBMin", + type: "uint256", + }, + { + internalType: "address", + name: "to", + type: "address", + }, + { + internalType: "uint256", + name: "deadline", + type: "uint256", + }, + ], + name: "addLiquidity", + outputs: [ + { + internalType: "uint256", + name: "amountA", + type: "uint256", + }, + { + internalType: "uint256", + name: "amountB", + type: "uint256", + }, + { + internalType: "uint256", + name: "liquidity", + type: "uint256", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "token", + type: "address", + }, + { + internalType: "uint256", + name: "amountTokenDesired", + type: "uint256", + }, + { + internalType: "uint256", + name: "amountTokenMin", + type: "uint256", + }, + { + internalType: "uint256", + name: "amountETHMin", + type: "uint256", + }, + { + internalType: "address", + name: "to", + type: "address", + }, + { + internalType: "uint256", + name: "deadline", + type: "uint256", + }, + ], + name: "addLiquidityETH", + outputs: [ + { + internalType: "uint256", + name: "amountToken", + type: "uint256", + }, + { + internalType: "uint256", + name: "amountETH", + type: "uint256", + }, + { + internalType: "uint256", + name: "liquidity", + type: "uint256", + }, + ], + stateMutability: "payable", + type: "function", + }, + { + inputs: [], + name: "factory", + outputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "amountOut", + type: "uint256", + }, + { + internalType: "uint256", + name: "reserveIn", + type: "uint256", + }, + { + internalType: "uint256", + name: "reserveOut", + type: "uint256", + }, + ], + name: "getAmountIn", + outputs: [ + { + internalType: "uint256", + name: "amountIn", + type: "uint256", + }, + ], + stateMutability: "pure", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "amountIn", + type: "uint256", + }, + { + internalType: "uint256", + name: "reserveIn", + type: "uint256", + }, + { + internalType: "uint256", + name: "reserveOut", + type: "uint256", + }, + ], + name: "getAmountOut", + outputs: [ + { + internalType: "uint256", + name: "amountOut", + type: "uint256", + }, + ], + stateMutability: "pure", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "amountOut", + type: "uint256", + }, + { + internalType: "address[]", + name: "path", + type: "address[]", + }, + ], + name: "getAmountsIn", + outputs: [ + { + internalType: "uint256[]", + name: "amounts", + type: "uint256[]", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "amountIn", + type: "uint256", + }, + { + internalType: "address[]", + name: "path", + type: "address[]", + }, + ], + name: "getAmountsOut", + outputs: [ + { + internalType: "uint256[]", + name: "amounts", + type: "uint256[]", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "amountA", + type: "uint256", + }, + { + internalType: "uint256", + name: "reserveA", + type: "uint256", + }, + { + internalType: "uint256", + name: "reserveB", + type: "uint256", + }, + ], + name: "quote", + outputs: [ + { + internalType: "uint256", + name: "amountB", + type: "uint256", + }, + ], + stateMutability: "pure", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "tokenA", + type: "address", + }, + { + internalType: "address", + name: "tokenB", + type: "address", + }, + { + internalType: "uint256", + name: "liquidity", + type: "uint256", + }, + { + internalType: "uint256", + name: "amountAMin", + type: "uint256", + }, + { + internalType: "uint256", + name: "amountBMin", + type: "uint256", + }, + { + internalType: "address", + name: "to", + type: "address", + }, + { + internalType: "uint256", + name: "deadline", + type: "uint256", + }, + ], + name: "removeLiquidity", + outputs: [ + { + internalType: "uint256", + name: "amountA", + type: "uint256", + }, + { + internalType: "uint256", + name: "amountB", + type: "uint256", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "token", + type: "address", + }, + { + internalType: "uint256", + name: "liquidity", + type: "uint256", + }, + { + internalType: "uint256", + name: "amountTokenMin", + type: "uint256", + }, + { + internalType: "uint256", + name: "amountETHMin", + type: "uint256", + }, + { + internalType: "address", + name: "to", + type: "address", + }, + { + internalType: "uint256", + name: "deadline", + type: "uint256", + }, + ], + name: "removeLiquidityETH", + outputs: [ + { + internalType: "uint256", + name: "amountToken", + type: "uint256", + }, + { + internalType: "uint256", + name: "amountETH", + type: "uint256", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "token", + type: "address", + }, + { + internalType: "uint256", + name: "liquidity", + type: "uint256", + }, + { + internalType: "uint256", + name: "amountTokenMin", + type: "uint256", + }, + { + internalType: "uint256", + name: "amountETHMin", + type: "uint256", + }, + { + internalType: "address", + name: "to", + type: "address", + }, + { + internalType: "uint256", + name: "deadline", + type: "uint256", + }, + ], + name: "removeLiquidityETHSupportingFeeOnTransferTokens", + outputs: [ + { + internalType: "uint256", + name: "amountETH", + type: "uint256", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "token", + type: "address", + }, + { + internalType: "uint256", + name: "liquidity", + type: "uint256", + }, + { + internalType: "uint256", + name: "amountTokenMin", + type: "uint256", + }, + { + internalType: "uint256", + name: "amountETHMin", + type: "uint256", + }, + { + internalType: "address", + name: "to", + type: "address", + }, + { + internalType: "uint256", + name: "deadline", + type: "uint256", + }, + { + internalType: "bool", + name: "approveMax", + type: "bool", + }, + { + internalType: "uint8", + name: "v", + type: "uint8", + }, + { + internalType: "bytes32", + name: "r", + type: "bytes32", + }, + { + internalType: "bytes32", + name: "s", + type: "bytes32", + }, + ], + name: "removeLiquidityETHWithPermit", + outputs: [ + { + internalType: "uint256", + name: "amountToken", + type: "uint256", + }, + { + internalType: "uint256", + name: "amountETH", + type: "uint256", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "token", + type: "address", + }, + { + internalType: "uint256", + name: "liquidity", + type: "uint256", + }, + { + internalType: "uint256", + name: "amountTokenMin", + type: "uint256", + }, + { + internalType: "uint256", + name: "amountETHMin", + type: "uint256", + }, + { + internalType: "address", + name: "to", + type: "address", + }, + { + internalType: "uint256", + name: "deadline", + type: "uint256", + }, + { + internalType: "bool", + name: "approveMax", + type: "bool", + }, + { + internalType: "uint8", + name: "v", + type: "uint8", + }, + { + internalType: "bytes32", + name: "r", + type: "bytes32", + }, + { + internalType: "bytes32", + name: "s", + type: "bytes32", + }, + ], + name: "removeLiquidityETHWithPermitSupportingFeeOnTransferTokens", + outputs: [ + { + internalType: "uint256", + name: "amountETH", + type: "uint256", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "tokenA", + type: "address", + }, + { + internalType: "address", + name: "tokenB", + type: "address", + }, + { + internalType: "uint256", + name: "liquidity", + type: "uint256", + }, + { + internalType: "uint256", + name: "amountAMin", + type: "uint256", + }, + { + internalType: "uint256", + name: "amountBMin", + type: "uint256", + }, + { + internalType: "address", + name: "to", + type: "address", + }, + { + internalType: "uint256", + name: "deadline", + type: "uint256", + }, + { + internalType: "bool", + name: "approveMax", + type: "bool", + }, + { + internalType: "uint8", + name: "v", + type: "uint8", + }, + { + internalType: "bytes32", + name: "r", + type: "bytes32", + }, + { + internalType: "bytes32", + name: "s", + type: "bytes32", + }, + ], + name: "removeLiquidityWithPermit", + outputs: [ + { + internalType: "uint256", + name: "amountA", + type: "uint256", + }, + { + internalType: "uint256", + name: "amountB", + type: "uint256", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "amountOut", + type: "uint256", + }, + { + internalType: "address[]", + name: "path", + type: "address[]", + }, + { + internalType: "address", + name: "to", + type: "address", + }, + { + internalType: "uint256", + name: "deadline", + type: "uint256", + }, + ], + name: "swapETHForExactTokens", + outputs: [ + { + internalType: "uint256[]", + name: "amounts", + type: "uint256[]", + }, + ], + stateMutability: "payable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "amountOutMin", + type: "uint256", + }, + { + internalType: "address[]", + name: "path", + type: "address[]", + }, + { + internalType: "address", + name: "to", + type: "address", + }, + { + internalType: "uint256", + name: "deadline", + type: "uint256", + }, + ], + name: "swapExactETHForTokens", + outputs: [ + { + internalType: "uint256[]", + name: "amounts", + type: "uint256[]", + }, + ], + stateMutability: "payable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "amountOutMin", + type: "uint256", + }, + { + internalType: "address[]", + name: "path", + type: "address[]", + }, + { + internalType: "address", + name: "to", + type: "address", + }, + { + internalType: "uint256", + name: "deadline", + type: "uint256", + }, + ], + name: "swapExactETHForTokensSupportingFeeOnTransferTokens", + outputs: [], + stateMutability: "payable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "amountIn", + type: "uint256", + }, + { + internalType: "uint256", + name: "amountOutMin", + type: "uint256", + }, + { + internalType: "address[]", + name: "path", + type: "address[]", + }, + { + internalType: "address", + name: "to", + type: "address", + }, + { + internalType: "uint256", + name: "deadline", + type: "uint256", + }, + ], + name: "swapExactTokensForETH", + outputs: [ + { + internalType: "uint256[]", + name: "amounts", + type: "uint256[]", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "amountIn", + type: "uint256", + }, + { + internalType: "uint256", + name: "amountOutMin", + type: "uint256", + }, + { + internalType: "address[]", + name: "path", + type: "address[]", + }, + { + internalType: "address", + name: "to", + type: "address", + }, + { + internalType: "uint256", + name: "deadline", + type: "uint256", + }, + ], + name: "swapExactTokensForETHSupportingFeeOnTransferTokens", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "amountIn", + type: "uint256", + }, + { + internalType: "uint256", + name: "amountOutMin", + type: "uint256", + }, + { + internalType: "address[]", + name: "path", + type: "address[]", + }, + { + internalType: "address", + name: "to", + type: "address", + }, + { + internalType: "uint256", + name: "deadline", + type: "uint256", + }, + ], + name: "swapExactTokensForTokens", + outputs: [ + { + internalType: "uint256[]", + name: "amounts", + type: "uint256[]", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "amountIn", + type: "uint256", + }, + { + internalType: "uint256", + name: "amountOutMin", + type: "uint256", + }, + { + internalType: "address[]", + name: "path", + type: "address[]", + }, + { + internalType: "address", + name: "to", + type: "address", + }, + { + internalType: "uint256", + name: "deadline", + type: "uint256", + }, + ], + name: "swapExactTokensForTokensSupportingFeeOnTransferTokens", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "amountOut", + type: "uint256", + }, + { + internalType: "uint256", + name: "amountInMax", + type: "uint256", + }, + { + internalType: "address[]", + name: "path", + type: "address[]", + }, + { + internalType: "address", + name: "to", + type: "address", + }, + { + internalType: "uint256", + name: "deadline", + type: "uint256", + }, + ], + name: "swapTokensForExactETH", + outputs: [ + { + internalType: "uint256[]", + name: "amounts", + type: "uint256[]", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "amountOut", + type: "uint256", + }, + { + internalType: "uint256", + name: "amountInMax", + type: "uint256", + }, + { + internalType: "address[]", + name: "path", + type: "address[]", + }, + { + internalType: "address", + name: "to", + type: "address", + }, + { + internalType: "uint256", + name: "deadline", + type: "uint256", + }, + ], + name: "swapTokensForExactTokens", + outputs: [ + { + internalType: "uint256[]", + name: "amounts", + type: "uint256[]", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + stateMutability: "payable", + type: "receive", + }, +]; + +const _bytecode = + "0x60c06040523480156200001157600080fd5b5060405162006b1038038062006b10833981810160405260408110156200003757600080fd5b8101908080519060200190929190805190602001909291905050508173ffffffffffffffffffffffffffffffffffffffff1660808173ffffffffffffffffffffffffffffffffffffffff1660601b815250508073ffffffffffffffffffffffffffffffffffffffff1660a08173ffffffffffffffffffffffffffffffffffffffff1660601b81525050505060805160601c60a05160601c6169076200020960003980610156528061157452806115b252806116e252806119c05280611f34528061220f528061230552806128a55280612a925280612bc55280612cdd5280612ea55280612f3a528061338e52806134455280613538528061364f528061373e52806137bf5280613fb6528061435452806143ad52806143e1528061446252806146a2528061486752806148fc5250806117d452806118e05280611a935280611acb5280611cc45280611dd05280612026528061212f52806122e3528061251f52806129c55280612dca5280612f79528061319a52806132a352806137fe5280613c315280613f335280613f5c5280613f9452806141c6528061438b528061478f528061493b528061553a528061557e52806158f35280615b5a528061614b5280616273528061638952506169076000f3fe60806040526004361061014f5760003560e01c80638803dbee116100b6578063c45a01551161006f578063c45a015514611001578063d06ca61f14611058578063ded9382a1461117c578063e8e337001461125e578063f305d71914611344578063fb3bdb41146113f2576101ab565b80638803dbee14610c00578063ad5c464814610d19578063ad615dec14610d70578063af2979eb14610dd3578063b6f9de9514610e80578063baa2abde14610f2d576101ab565b80634a25d94a116101085780634a25d94a1461071f5780635b0d5984146108385780635c11d79514610913578063791ac947146109d75780637ff36ab514610a9b57806385f8c25914610b9d576101ab565b806302751cec146101b0578063054d50d41461026457806318cbafe5146102c75780631f00ca74146103e05780632195995c1461050457806338ed173914610606576101ab565b366101ab577f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146101a957fe5b005b600080fd5b3480156101bc57600080fd5b50610247600480360360c08110156101d357600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291908035906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506114f4565b604051808381526020018281526020019250505060405180910390f35b34801561027057600080fd5b506102b16004803603606081101561028757600080fd5b81019080803590602001909291908035906020019092919080359060200190929190505050611651565b6040518082815260200191505060405180910390f35b3480156102d357600080fd5b50610389600480360360a08110156102ea57600080fd5b8101908080359060200190929190803590602001909291908035906020019064010000000081111561031b57600080fd5b82018360208201111561032d57600080fd5b8035906020019184602083028401116401000000008311171561034f57600080fd5b9091929391929390803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050611667565b6040518080602001828103825283818151815260200191508051906020019060200280838360005b838110156103cc5780820151818401526020810190506103b1565b505050509050019250505060405180910390f35b3480156103ec57600080fd5b506104ad6004803603604081101561040357600080fd5b81019080803590602001909291908035906020019064010000000081111561042a57600080fd5b82018360208201111561043c57600080fd5b8035906020019184602083028401116401000000008311171561045e57600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f820116905080830192505050505050509192919290505050611a8c565b6040518080602001828103825283818151815260200191508051906020019060200280838360005b838110156104f05780820151818401526020810190506104d5565b505050509050019250505060405180910390f35b34801561051057600080fd5b506105e9600480360361016081101561052857600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291908035906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803515159060200190929190803560ff1690602001909291908035906020019092919080359060200190929190505050611ac1565b604051808381526020018281526020019250505060405180910390f35b34801561061257600080fd5b506106c8600480360360a081101561062957600080fd5b8101908080359060200190929190803590602001909291908035906020019064010000000081111561065a57600080fd5b82018360208201111561066c57600080fd5b8035906020019184602083028401116401000000008311171561068e57600080fd5b9091929391929390803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050611c46565b6040518080602001828103825283818151815260200191508051906020019060200280838360005b8381101561070b5780820151818401526020810190506106f0565b505050509050019250505060405180910390f35b34801561072b57600080fd5b506107e1600480360360a081101561074257600080fd5b8101908080359060200190929190803590602001909291908035906020019064010000000081111561077357600080fd5b82018360208201111561078557600080fd5b803590602001918460208302840111640100000000831117156107a757600080fd5b9091929391929390803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050611eb9565b6040518080602001828103825283818151815260200191508051906020019060200280838360005b83811015610824578082015181840152602081019050610809565b505050509050019250505060405180910390f35b34801561084457600080fd5b506108fd600480360361014081101561085c57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291908035906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803515159060200190929190803560ff16906020019092919080359060200190929190803590602001909291905050506122db565b6040518082815260200191505060405180910390f35b34801561091f57600080fd5b506109d5600480360360a081101561093657600080fd5b8101908080359060200190929190803590602001909291908035906020019064010000000081111561096757600080fd5b82018360208201111561097957600080fd5b8035906020019184602083028401116401000000008311171561099b57600080fd5b9091929391929390803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050612475565b005b3480156109e357600080fd5b50610a99600480360360a08110156109fa57600080fd5b81019080803590602001909291908035906020019092919080359060200190640100000000811115610a2b57600080fd5b820183602082011115610a3d57600080fd5b80359060200191846020830284011164010000000083111715610a5f57600080fd5b9091929391929390803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919050505061282c565b005b610b4660048036036080811015610ab157600080fd5b810190808035906020019092919080359060200190640100000000811115610ad857600080fd5b820183602082011115610aea57600080fd5b80359060200191846020830284011164010000000083111715610b0c57600080fd5b9091929391929390803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050612c62565b6040518080602001828103825283818151815260200191508051906020019060200280838360005b83811015610b89578082015181840152602081019050610b6e565b505050509050019250505060405180910390f35b348015610ba957600080fd5b50610bea60048036036060811015610bc057600080fd5b81019080803590602001909291908035906020019092919080359060200190929190505050613106565b6040518082815260200191505060405180910390f35b348015610c0c57600080fd5b50610cc2600480360360a0811015610c2357600080fd5b81019080803590602001909291908035906020019092919080359060200190640100000000811115610c5457600080fd5b820183602082011115610c6657600080fd5b80359060200191846020830284011164010000000083111715610c8857600080fd5b9091929391929390803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919050505061311c565b6040518080602001828103825283818151815260200191508051906020019060200280838360005b83811015610d05578082015181840152602081019050610cea565b505050509050019250505060405180910390f35b348015610d2557600080fd5b50610d2e61338c565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b348015610d7c57600080fd5b50610dbd60048036036060811015610d9357600080fd5b810190808035906020019092919080359060200190929190803590602001909291905050506133b0565b6040518082815260200191505060405180910390f35b348015610ddf57600080fd5b50610e6a600480360360c0811015610df657600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291908035906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506133c6565b6040518082815260200191505060405180910390f35b610f2b60048036036080811015610e9657600080fd5b810190808035906020019092919080359060200190640100000000811115610ebd57600080fd5b820183602082011115610ecf57600080fd5b80359060200191846020830284011164010000000083111715610ef157600080fd5b9091929391929390803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506135d6565b005b348015610f3957600080fd5b50610fe4600480360360e0811015610f5057600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291908035906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050613bb0565b604051808381526020018281526020019250505060405180910390f35b34801561100d57600080fd5b50611016613f31565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561106457600080fd5b506111256004803603604081101561107b57600080fd5b8101908080359060200190929190803590602001906401000000008111156110a257600080fd5b8201836020820111156110b457600080fd5b803590602001918460208302840111640100000000831117156110d657600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f820116905080830192505050505050509192919290505050613f55565b6040518080602001828103825283818151815260200191508051906020019060200280838360005b8381101561116857808201518184015260208101905061114d565b505050509050019250505060405180910390f35b34801561118857600080fd5b5061124160048036036101408110156111a057600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291908035906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803515159060200190929190803560ff1690602001909291908035906020019092919080359060200190929190505050613f8a565b604051808381526020018281526020019250505060405180910390f35b34801561126a57600080fd5b50611320600480360361010081101561128257600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803590602001909291908035906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919050505061412d565b60405180848152602001838152602001828152602001935050505060405180910390f35b6113ce600480360360c081101561135a57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291908035906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506142d2565b60405180848152602001838152602001828152602001935050505060405180910390f35b61149d6004803603608081101561140857600080fd5b81019080803590602001909291908035906020019064010000000081111561142f57600080fd5b82018360208201111561144157600080fd5b8035906020019184602083028401116401000000008311171561146357600080fd5b9091929391929390803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050614627565b6040518080602001828103825283818151815260200191508051906020019060200280838360005b838110156114e05780820151818401526020810190506114c5565b505050509050019250505060405180910390f35b600080824281101561156e576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260188152602001807f556e69737761705632526f757465723a2045585049524544000000000000000081525060200191505060405180910390fd5b61159d897f00000000000000000000000000000000000000000000000000000000000000008a8a8a308a613bb0565b80935081945050506115b0898685614b05565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16632e1a7d4d836040518263ffffffff1660e01b815260040180828152602001915050600060405180830381600087803b15801561162357600080fd5b505af1158015611637573d6000803e3d6000fd5b505050506116458583614cfe565b50965096945050505050565b600061165e848484614e5d565b90509392505050565b606081428110156116e0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260188152602001807f556e69737761705632526f757465723a2045585049524544000000000000000081525060200191505060405180910390fd5b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1686866001898990500381811061172957fe5b9050602002013573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146117cf576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601d8152602001807f556e69737761705632526f757465723a20494e56414c49445f5041544800000081525060200191505060405180910390fd5b61183b7f000000000000000000000000000000000000000000000000000000000000000089888880806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f82011690508083019250505050505050614f8d565b9150868260018451038151811061184e57fe5b602002602001015110156118ad576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602b815260200180616858602b913960400191505060405180910390fd5b611972868660008181106118bd57fe5b9050602002013573ffffffffffffffffffffffffffffffffffffffff16336119587f00000000000000000000000000000000000000000000000000000000000000008a8a600081811061190c57fe5b9050602002013573ffffffffffffffffffffffffffffffffffffffff168b8b600181811061193657fe5b9050602002013573ffffffffffffffffffffffffffffffffffffffff16615105565b8560008151811061196557fe5b6020026020010151615260565b6119be82878780806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f8201169050808301925050505050505030615471565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16632e1a7d4d83600185510381518110611a0a57fe5b60200260200101516040518263ffffffff1660e01b815260040180828152602001915050600060405180830381600087803b158015611a4857600080fd5b505af1158015611a5c573d6000803e3d6000fd5b50505050611a818483600185510381518110611a7457fe5b6020026020010151614cfe565b509695505050505050565b6060611ab97f0000000000000000000000000000000000000000000000000000000000000000848461571c565b905092915050565b6000806000611af17f00000000000000000000000000000000000000000000000000000000000000008f8f615105565b9050600087611b00578c611b22565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff5b90508173ffffffffffffffffffffffffffffffffffffffff1663d505accf3330848d8c8c8c6040518863ffffffff1660e01b8152600401808873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018681526020018581526020018460ff1660ff168152602001838152602001828152602001975050505050505050600060405180830381600087803b158015611c0557600080fd5b505af1158015611c19573d6000803e3d6000fd5b50505050611c2c8f8f8f8f8f8f8f613bb0565b809450819550505050509b509b9950505050505050505050565b60608142811015611cbf576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260188152602001807f556e69737761705632526f757465723a2045585049524544000000000000000081525060200191505060405180910390fd5b611d2b7f000000000000000000000000000000000000000000000000000000000000000089888880806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f82011690508083019250505050505050614f8d565b91508682600184510381518110611d3e57fe5b60200260200101511015611d9d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602b815260200180616858602b913960400191505060405180910390fd5b611e6286866000818110611dad57fe5b9050602002013573ffffffffffffffffffffffffffffffffffffffff1633611e487f00000000000000000000000000000000000000000000000000000000000000008a8a6000818110611dfc57fe5b9050602002013573ffffffffffffffffffffffffffffffffffffffff168b8b6001818110611e2657fe5b9050602002013573ffffffffffffffffffffffffffffffffffffffff16615105565b85600081518110611e5557fe5b6020026020010151615260565b611eae82878780806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f8201169050808301925050505050505086615471565b509695505050505050565b60608142811015611f32576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260188152602001807f556e69737761705632526f757465723a2045585049524544000000000000000081525060200191505060405180910390fd5b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16868660018989905003818110611f7b57fe5b9050602002013573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614612021576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601d8152602001807f556e69737761705632526f757465723a20494e56414c49445f5041544800000081525060200191505060405180910390fd5b61208d7f000000000000000000000000000000000000000000000000000000000000000089888880806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f8201169050808301925050505050505061571c565b9150868260008151811061209d57fe5b602002602001015111156120fc576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260278152602001806167e86027913960400191505060405180910390fd5b6121c18686600081811061210c57fe5b9050602002013573ffffffffffffffffffffffffffffffffffffffff16336121a77f00000000000000000000000000000000000000000000000000000000000000008a8a600081811061215b57fe5b9050602002013573ffffffffffffffffffffffffffffffffffffffff168b8b600181811061218557fe5b9050602002013573ffffffffffffffffffffffffffffffffffffffff16615105565b856000815181106121b457fe5b6020026020010151615260565b61220d82878780806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f8201169050808301925050505050505030615471565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16632e1a7d4d8360018551038151811061225957fe5b60200260200101516040518263ffffffff1660e01b815260040180828152602001915050600060405180830381600087803b15801561229757600080fd5b505af11580156122ab573d6000803e3d6000fd5b505050506122d084836001855103815181106122c357fe5b6020026020010151614cfe565b509695505050505050565b6000806123297f00000000000000000000000000000000000000000000000000000000000000008d7f0000000000000000000000000000000000000000000000000000000000000000615105565b9050600086612338578b61235a565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff5b90508173ffffffffffffffffffffffffffffffffffffffff1663d505accf3330848c8b8b8b6040518863ffffffff1660e01b8152600401808873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018681526020018581526020018460ff1660ff168152602001838152602001828152602001975050505050505050600060405180830381600087803b15801561243d57600080fd5b505af1158015612451573d6000803e3d6000fd5b505050506124638d8d8d8d8d8d6133c6565b925050509a9950505050505050505050565b80428110156124ec576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260188152602001807f556e69737761705632526f757465723a2045585049524544000000000000000081525060200191505060405180910390fd5b61259d858560008181106124fc57fe5b9050602002013573ffffffffffffffffffffffffffffffffffffffff16336125977f00000000000000000000000000000000000000000000000000000000000000008989600081811061254b57fe5b9050602002013573ffffffffffffffffffffffffffffffffffffffff168a8a600181811061257557fe5b9050602002013573ffffffffffffffffffffffffffffffffffffffff16615105565b8a615260565b60008585600188889050038181106125b157fe5b9050602002013573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166370a08231856040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b15801561264a57600080fd5b505afa15801561265e573d6000803e3d6000fd5b505050506040513d602081101561267457600080fd5b810190808051906020019092919050505090506126d2868680806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f820116905080830192505050505050508561589c565b866127cb82888860018b8b9050038181106126e957fe5b9050602002013573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166370a08231886040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b15801561278257600080fd5b505afa158015612796573d6000803e3d6000fd5b505050506040513d60208110156127ac57600080fd5b8101908080519060200190929190505050615d1390919063ffffffff16565b1015612822576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602b815260200180616858602b913960400191505060405180910390fd5b5050505050505050565b80428110156128a3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260188152602001807f556e69737761705632526f757465723a2045585049524544000000000000000081525060200191505060405180910390fd5b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff168585600188889050038181106128ec57fe5b9050602002013573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614612992576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601d8152602001807f556e69737761705632526f757465723a20494e56414c49445f5041544800000081525060200191505060405180910390fd5b612a43858560008181106129a257fe5b9050602002013573ffffffffffffffffffffffffffffffffffffffff1633612a3d7f0000000000000000000000000000000000000000000000000000000000000000898960008181106129f157fe5b9050602002013573ffffffffffffffffffffffffffffffffffffffff168a8a6001818110612a1b57fe5b9050602002013573ffffffffffffffffffffffffffffffffffffffff16615105565b8a615260565b612a8e858580806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f820116905080830192505050505050503061589c565b60007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b158015612b2d57600080fd5b505afa158015612b41573d6000803e3d6000fd5b505050506040513d6020811015612b5757600080fd5b8101908080519060200190929190505050905086811015612bc3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602b815260200180616858602b913960400191505060405180910390fd5b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16632e1a7d4d826040518263ffffffff1660e01b815260040180828152602001915050600060405180830381600087803b158015612c3657600080fd5b505af1158015612c4a573d6000803e3d6000fd5b50505050612c588482614cfe565b5050505050505050565b60608142811015612cdb576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260188152602001807f556e69737761705632526f757465723a2045585049524544000000000000000081525060200191505060405180910390fd5b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1686866000818110612d1f57fe5b9050602002013573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614612dc5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601d8152602001807f556e69737761705632526f757465723a20494e56414c49445f5041544800000081525060200191505060405180910390fd5b612e317f000000000000000000000000000000000000000000000000000000000000000034888880806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f82011690508083019250505050505050614f8d565b91508682600184510381518110612e4457fe5b60200260200101511015612ea3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602b815260200180616858602b913960400191505060405180910390fd5b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663d0e30db083600081518110612eec57fe5b60200260200101516040518263ffffffff1660e01b81526004016000604051808303818588803b158015612f1f57600080fd5b505af1158015612f33573d6000803e3d6000fd5b50505050507f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663a9059cbb612ff17f000000000000000000000000000000000000000000000000000000000000000089896000818110612fa557fe5b9050602002013573ffffffffffffffffffffffffffffffffffffffff168a8a6001818110612fcf57fe5b9050602002013573ffffffffffffffffffffffffffffffffffffffff16615105565b84600081518110612ffe57fe5b60200260200101516040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561306f57600080fd5b505af1158015613083573d6000803e3d6000fd5b505050506040513d602081101561309957600080fd5b81019080805190602001909291905050506130b057fe5b6130fc82878780806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f8201169050808301925050505050505086615471565b5095945050505050565b6000613113848484615d96565b90509392505050565b60608142811015613195576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260188152602001807f556e69737761705632526f757465723a2045585049524544000000000000000081525060200191505060405180910390fd5b6132017f000000000000000000000000000000000000000000000000000000000000000089888880806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f8201169050808301925050505050505061571c565b9150868260008151811061321157fe5b60200260200101511115613270576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260278152602001806167e86027913960400191505060405180910390fd5b6133358686600081811061328057fe5b9050602002013573ffffffffffffffffffffffffffffffffffffffff163361331b7f00000000000000000000000000000000000000000000000000000000000000008a8a60008181106132cf57fe5b9050602002013573ffffffffffffffffffffffffffffffffffffffff168b8b60018181106132f957fe5b9050602002013573ffffffffffffffffffffffffffffffffffffffff16615105565b8560008151811061332857fe5b6020026020010151615260565b61338182878780806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f8201169050808301925050505050505086615471565b509695505050505050565b7f000000000000000000000000000000000000000000000000000000000000000081565b60006133bd848484615ed3565b90509392505050565b6000814281101561343f576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260188152602001807f556e69737761705632526f757465723a2045585049524544000000000000000081525060200191505060405180910390fd5b61346e887f00000000000000000000000000000000000000000000000000000000000000008989893089613bb0565b90508092505061353688858a73ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b1580156134f657600080fd5b505afa15801561350a573d6000803e3d6000fd5b505050506040513d602081101561352057600080fd5b8101908080519060200190929190505050614b05565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16632e1a7d4d836040518263ffffffff1660e01b815260040180828152602001915050600060405180830381600087803b1580156135a957600080fd5b505af11580156135bd573d6000803e3d6000fd5b505050506135cb8483614cfe565b509695505050505050565b804281101561364d576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260188152602001807f556e69737761705632526f757465723a2045585049524544000000000000000081525060200191505060405180910390fd5b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff168585600081811061369157fe5b9050602002013573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614613737576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601d8152602001807f556e69737761705632526f757465723a20494e56414c49445f5041544800000081525060200191505060405180910390fd5b60003490507f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663d0e30db0826040518263ffffffff1660e01b81526004016000604051808303818588803b1580156137a457600080fd5b505af11580156137b8573d6000803e3d6000fd5b50505050507f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663a9059cbb6138767f00000000000000000000000000000000000000000000000000000000000000008989600081811061382a57fe5b9050602002013573ffffffffffffffffffffffffffffffffffffffff168a8a600181811061385457fe5b9050602002013573ffffffffffffffffffffffffffffffffffffffff16615105565b836040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b1580156138e057600080fd5b505af11580156138f4573d6000803e3d6000fd5b505050506040513d602081101561390a57600080fd5b810190808051906020019092919050505061392157fe5b600086866001898990500381811061393557fe5b9050602002013573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166370a08231866040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b1580156139ce57600080fd5b505afa1580156139e2573d6000803e3d6000fd5b505050506040513d60208110156139f857600080fd5b81019080805190602001909291905050509050613a56878780806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f820116905080830192505050505050508661589c565b87613b4f82898960018c8c905003818110613a6d57fe5b9050602002013573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166370a08231896040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b158015613b0657600080fd5b505afa158015613b1a573d6000803e3d6000fd5b505050506040513d6020811015613b3057600080fd5b8101908080519060200190929190505050615d1390919063ffffffff16565b1015613ba6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602b815260200180616858602b913960400191505060405180910390fd5b5050505050505050565b6000808242811015613c2a576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260188152602001807f556e69737761705632526f757465723a2045585049524544000000000000000081525060200191505060405180910390fd5b6000613c577f00000000000000000000000000000000000000000000000000000000000000008c8c615105565b90508073ffffffffffffffffffffffffffffffffffffffff166323b872dd33838c6040518463ffffffff1660e01b8152600401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019350505050602060405180830381600087803b158015613d1457600080fd5b505af1158015613d28573d6000803e3d6000fd5b505050506040513d6020811015613d3e57600080fd5b8101908080519060200190929190505050506000808273ffffffffffffffffffffffffffffffffffffffff166389afcb44896040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019150506040805180830381600087803b158015613dd157600080fd5b505af1158015613de5573d6000803e3d6000fd5b505050506040513d6040811015613dfb57600080fd5b810190808051906020019092919080519060200190929190505050915091506000613e268e8e615fb7565b5090508073ffffffffffffffffffffffffffffffffffffffff168e73ffffffffffffffffffffffffffffffffffffffff1614613e63578183613e66565b82825b80975081985050508a871015613ec7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602681526020018061680f6026913960400191505060405180910390fd5b89861015613f20576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260268152602001806167756026913960400191505060405180910390fd5b505050505097509795505050505050565b7f000000000000000000000000000000000000000000000000000000000000000081565b6060613f827f00000000000000000000000000000000000000000000000000000000000000008484614f8d565b905092915050565b6000806000613fda7f00000000000000000000000000000000000000000000000000000000000000008e7f0000000000000000000000000000000000000000000000000000000000000000615105565b9050600087613fe9578c61400b565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff5b90508173ffffffffffffffffffffffffffffffffffffffff1663d505accf3330848d8c8c8c6040518863ffffffff1660e01b8152600401808873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018681526020018581526020018460ff1660ff168152602001838152602001828152602001975050505050505050600060405180830381600087803b1580156140ee57600080fd5b505af1158015614102573d6000803e3d6000fd5b505050506141148e8e8e8e8e8e6114f4565b809450819550505050509a509a98505050505050505050565b600080600083428110156141a9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260188152602001807f556e69737761705632526f757465723a2045585049524544000000000000000081525060200191505060405180910390fd5b6141b78c8c8c8c8c8c61612e565b809450819550505060006141ec7f00000000000000000000000000000000000000000000000000000000000000008e8e615105565b90506141fa8d338388615260565b6142068c338387615260565b8073ffffffffffffffffffffffffffffffffffffffff16636a627842886040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001915050602060405180830381600087803b15801561428557600080fd5b505af1158015614299573d6000803e3d6000fd5b505050506040513d60208110156142af57600080fd5b810190808051906020019092919050505092505050985098509895505050505050565b6000806000834281101561434e576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260188152602001807f556e69737761705632526f757465723a2045585049524544000000000000000081525060200191505060405180910390fd5b61437c8a7f00000000000000000000000000000000000000000000000000000000000000008b348c8c61612e565b809450819550505060006143d17f00000000000000000000000000000000000000000000000000000000000000008c7f0000000000000000000000000000000000000000000000000000000000000000615105565b90506143df8b338388615260565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663d0e30db0856040518263ffffffff1660e01b81526004016000604051808303818588803b15801561444757600080fd5b505af115801561445b573d6000803e3d6000fd5b50505050507f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663a9059cbb82866040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561450757600080fd5b505af115801561451b573d6000803e3d6000fd5b505050506040513d602081101561453157600080fd5b810190808051906020019092919050505061454857fe5b8073ffffffffffffffffffffffffffffffffffffffff16636a627842886040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001915050602060405180830381600087803b1580156145c757600080fd5b505af11580156145db573d6000803e3d6000fd5b505050506040513d60208110156145f157600080fd5b81019080805190602001909291905050509250833411156146195761461833853403614cfe565b5b505096509650969350505050565b606081428110156146a0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260188152602001807f556e69737761705632526f757465723a2045585049524544000000000000000081525060200191505060405180910390fd5b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16868660008181106146e457fe5b9050602002013573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161461478a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601d8152602001807f556e69737761705632526f757465723a20494e56414c49445f5041544800000081525060200191505060405180910390fd5b6147f67f000000000000000000000000000000000000000000000000000000000000000088888880806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f8201169050808301925050505050505061571c565b9150348260008151811061480657fe5b60200260200101511115614865576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260278152602001806167e86027913960400191505060405180910390fd5b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663d0e30db0836000815181106148ae57fe5b60200260200101516040518263ffffffff1660e01b81526004016000604051808303818588803b1580156148e157600080fd5b505af11580156148f5573d6000803e3d6000fd5b50505050507f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663a9059cbb6149b37f00000000000000000000000000000000000000000000000000000000000000008989600081811061496757fe5b9050602002013573ffffffffffffffffffffffffffffffffffffffff168a8a600181811061499157fe5b9050602002013573ffffffffffffffffffffffffffffffffffffffff16615105565b846000815181106149c057fe5b60200260200101516040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b158015614a3157600080fd5b505af1158015614a45573d6000803e3d6000fd5b505050506040513d6020811015614a5b57600080fd5b8101908080519060200190929190505050614a7257fe5b614abe82878780806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f8201169050808301925050505050505086615471565b81600081518110614acb57fe5b6020026020010151341115614afb57614afa3383600081518110614aeb57fe5b60200260200101513403614cfe565b5b5095945050505050565b600060608473ffffffffffffffffffffffffffffffffffffffff1663a9059cbb8585604051602401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001828152602001925050506040516020818303038152906040529060e01b6020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff83818316178352505050506040518082805190602001908083835b60208310614bde5780518252602082019150602081019050602083039250614bbb565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d8060008114614c40576040519150601f19603f3d011682016040523d82523d6000602084013e614c45565b606091505b5091509150818015614c855750600081511480614c845750808060200190516020811015614c7257600080fd5b81019080805190602001909291905050505b5b614cf7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5472616e7366657248656c7065723a205452414e534645525f4641494c45440081525060200191505060405180910390fd5b5050505050565b60008273ffffffffffffffffffffffffffffffffffffffff1682600067ffffffffffffffff81118015614d3057600080fd5b506040519080825280601f01601f191660200182016040528015614d635781602001600182028036833780820191505090505b506040518082805190602001908083835b60208310614d975780518252602082019150602081019050602083039250614d74565b6001836020036101000a03801982511681845116808217855250505050505090500191505060006040518083038185875af1925050503d8060008114614df9576040519150601f19603f3d011682016040523d82523d6000602084013e614dfe565b606091505b5050905080614e58576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260238152602001806168356023913960400191505060405180910390fd5b505050565b6000808411614eb7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602b8152602001806168a7602b913960400191505060405180910390fd5b600083118015614ec75750600082115b614f1c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602881526020018061679b6028913960400191505060405180910390fd5b6000614f336103e5866164e290919063ffffffff16565b90506000614f4a84836164e290919063ffffffff16565b90506000614f7583614f676103e8896164e290919063ffffffff16565b61657790919063ffffffff16565b9050808281614f8057fe5b0493505050509392505050565b6060600282511015615007576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601e8152602001807f556e697377617056324c6962726172793a20494e56414c49445f50415448000081525060200191505060405180910390fd5b815167ffffffffffffffff8111801561501f57600080fd5b5060405190808252806020026020018201604052801561504e5781602001602082028036833780820191505090505b509050828160008151811061505f57fe5b60200260200101818152505060005b60018351038110156150fd576000806150b18786858151811061508d57fe5b60200260200101518760018701815181106150a457fe5b60200260200101516165fa565b915091506150d38484815181106150c457fe5b60200260200101518383614e5d565b8460018501815181106150e257fe5b6020026020010181815250505050808060010191505061506e565b509392505050565b60008060006151148585615fb7565b91509150858282604051602001808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1660601b81526014018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1660601b8152601401925050506040516020818303038152906040528051906020012060405160200180807fff000000000000000000000000000000000000000000000000000000000000008152506001018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1660601b8152601401828152602001807f96e8ac4277198ff8b6f785478aa9a39f403cb768dd02cbee326c3e7da348845f815250602001925050506040516020818303038152906040528051906020012060001c925050509392505050565b600060608573ffffffffffffffffffffffffffffffffffffffff166323b872dd868686604051602401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200193505050506040516020818303038152906040529060e01b6020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff83818316178352505050506040518082805190602001908083835b6020831061536d578051825260208201915060208101905060208303925061534a565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d80600081146153cf576040519150601f19603f3d011682016040523d82523d6000602084013e6153d4565b606091505b50915091508180156154145750600081511480615413575080806020019051602081101561540157600080fd5b81019080805190602001909291905050505b5b615469576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260248152602001806168836024913960400191505060405180910390fd5b505050505050565b60005b60018351038110156157165760008084838151811061548f57fe5b60200260200101518560018501815181106154a657fe5b60200260200101519150915060006154be8383615fb7565b50905060008760018601815181106154d257fe5b602002602001015190506000808373ffffffffffffffffffffffffffffffffffffffff168673ffffffffffffffffffffffffffffffffffffffff161461551a5782600061551e565b6000835b91509150600060028a510388106155355788615577565b6155767f0000000000000000000000000000000000000000000000000000000000000000878c60028c018151811061556957fe5b6020026020010151615105565b5b90506155a47f00000000000000000000000000000000000000000000000000000000000000008888615105565b73ffffffffffffffffffffffffffffffffffffffff1663022c0d9f848484600067ffffffffffffffff811180156155da57600080fd5b506040519080825280601f01601f19166020018201604052801561560d5781602001600182028036833780820191505090505b506040518563ffffffff1660e01b8152600401808581526020018481526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200180602001828103825283818151815260200191508051906020019080838360005b8381101561569b578082015181840152602081019050615680565b50505050905090810190601f1680156156c85780820380516001836020036101000a031916815260200191505b5095505050505050600060405180830381600087803b1580156156ea57600080fd5b505af11580156156fe573d6000803e3d6000fd5b50505050505050505050508080600101915050615474565b50505050565b6060600282511015615796576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601e8152602001807f556e697377617056324c6962726172793a20494e56414c49445f50415448000081525060200191505060405180910390fd5b815167ffffffffffffffff811180156157ae57600080fd5b506040519080825280602002602001820160405280156157dd5781602001602082028036833780820191505090505b50905082816001835103815181106157f157fe5b6020026020010181815250506000600183510390505b6000811115615894576000806158478786600186038151811061582657fe5b602002602001015187868151811061583a57fe5b60200260200101516165fa565b9150915061586984848151811061585a57fe5b60200260200101518383615d96565b84600185038151811061587857fe5b6020026020010181815250505050808060019003915050615807565b509392505050565b60005b6001835103811015615d0e576000808483815181106158ba57fe5b60200260200101518560018501815181106158d157fe5b60200260200101519150915060006158e98383615fb7565b50905060006159197f00000000000000000000000000000000000000000000000000000000000000008585615105565b90506000806000808473ffffffffffffffffffffffffffffffffffffffff16630902f1ac6040518163ffffffff1660e01b815260040160606040518083038186803b15801561596757600080fd5b505afa15801561597b573d6000803e3d6000fd5b505050506040513d606081101561599157600080fd5b81019080805190602001909291908051906020019092919080519060200190929190505050506dffffffffffffffffffffffffffff1691506dffffffffffffffffffffffffffff1691506000808773ffffffffffffffffffffffffffffffffffffffff168a73ffffffffffffffffffffffffffffffffffffffff1614615a18578284615a1b565b83835b91509150615ae9828b73ffffffffffffffffffffffffffffffffffffffff166370a082318a6040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b158015615aa057600080fd5b505afa158015615ab4573d6000803e3d6000fd5b505050506040513d6020811015615aca57600080fd5b8101908080519060200190929190505050615d1390919063ffffffff16565b9550615af6868383614e5d565b9450505050506000808573ffffffffffffffffffffffffffffffffffffffff168873ffffffffffffffffffffffffffffffffffffffff1614615b3a57826000615b3e565b6000835b91509150600060028c51038a10615b55578a615b97565b615b967f0000000000000000000000000000000000000000000000000000000000000000898e60028e0181518110615b8957fe5b6020026020010151615105565b5b90508573ffffffffffffffffffffffffffffffffffffffff1663022c0d9f848484600067ffffffffffffffff81118015615bd057600080fd5b506040519080825280601f01601f191660200182016040528015615c035781602001600182028036833780820191505090505b506040518563ffffffff1660e01b8152600401808581526020018481526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200180602001828103825283818151815260200191508051906020019080838360005b83811015615c91578082015181840152602081019050615c76565b50505050905090810190601f168015615cbe5780820380516001836020036101000a031916815260200191505b5095505050505050600060405180830381600087803b158015615ce057600080fd5b505af1158015615cf4573d6000803e3d6000fd5b50505050505050505050505050808060010191505061589f565b505050565b6000828284039150811115615d90576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260158152602001807f64732d6d6174682d7375622d756e646572666c6f77000000000000000000000081525060200191505060405180910390fd5b92915050565b6000808411615df0576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602c815260200180616724602c913960400191505060405180910390fd5b600083118015615e005750600082115b615e55576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602881526020018061679b6028913960400191505060405180910390fd5b6000615e7e6103e8615e7087876164e290919063ffffffff16565b6164e290919063ffffffff16565b90506000615ea96103e5615e9b8887615d1390919063ffffffff16565b6164e290919063ffffffff16565b9050615ec86001828481615eb957fe5b0461657790919063ffffffff16565b925050509392505050565b6000808411615f2d576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260258152602001806167c36025913960400191505060405180910390fd5b600083118015615f3d5750600082115b615f92576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602881526020018061679b6028913960400191505060405180910390fd5b82615fa683866164e290919063ffffffff16565b81615fad57fe5b0490509392505050565b6000808273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff16141561603f576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260258152602001806167506025913960400191505060405180910390fd5b8273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff161061607957828461607c565b83835b8092508193505050600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415616127576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601e8152602001807f556e697377617056324c6962726172793a205a45524f5f41444452455353000081525060200191505060405180910390fd5b9250929050565b600080600073ffffffffffffffffffffffffffffffffffffffff167f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663e6a439058a8a6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019250505060206040518083038186803b15801561621a57600080fd5b505afa15801561622e573d6000803e3d6000fd5b505050506040513d602081101561624457600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff161415616381577f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663c9c6539689896040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200192505050602060405180830381600087803b15801561634457600080fd5b505af1158015616358573d6000803e3d6000fd5b505050506040513d602081101561636e57600080fd5b8101908080519060200190929190505050505b6000806163af7f00000000000000000000000000000000000000000000000000000000000000008b8b6165fa565b915091506000821480156163c35750600081145b156163d757878780945081955050506164d5565b60006163e4898484615ed3565b90508781116164555785811015616446576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260268152602001806167756026913960400191505060405180910390fd5b888180955081965050506164d3565b6000616462898486615ed3565b90508981111561646e57fe5b878110156164c7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602681526020018061680f6026913960400191505060405180910390fd5b80898096508197505050505b505b5050965096945050505050565b6000808214806164ff57508282838502925082816164fc57fe5b04145b616571576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260148152602001807f64732d6d6174682d6d756c2d6f766572666c6f7700000000000000000000000081525060200191505060405180910390fd5b92915050565b60008282840191508110156165f4576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260148152602001807f64732d6d6174682d6164642d6f766572666c6f7700000000000000000000000081525060200191505060405180910390fd5b92915050565b60008060006166098585615fb7565b50905060008061661a888888615105565b73ffffffffffffffffffffffffffffffffffffffff16630902f1ac6040518163ffffffff1660e01b815260040160606040518083038186803b15801561665f57600080fd5b505afa158015616673573d6000803e3d6000fd5b505050506040513d606081101561668957600080fd5b81019080805190602001909291908051906020019092919080519060200190929190505050506dffffffffffffffffffffffffffff1691506dffffffffffffffffffffffffffff1691508273ffffffffffffffffffffffffffffffffffffffff168773ffffffffffffffffffffffffffffffffffffffff161461670d578082616710565b81815b809550819650505050505093509391505056fe556e697377617056324c6962726172793a20494e53554646494349454e545f4f55545055545f414d4f554e54556e697377617056324c6962726172793a204944454e544943414c5f414444524553534553556e69737761705632526f757465723a20494e53554646494349454e545f425f414d4f554e54556e697377617056324c6962726172793a20494e53554646494349454e545f4c4951554944495459556e697377617056324c6962726172793a20494e53554646494349454e545f414d4f554e54556e69737761705632526f757465723a204558434553534956455f494e5055545f414d4f554e54556e69737761705632526f757465723a20494e53554646494349454e545f415f414d4f554e545472616e7366657248656c7065723a204554485f5452414e534645525f4641494c4544556e69737761705632526f757465723a20494e53554646494349454e545f4f55545055545f414d4f554e545472616e7366657248656c7065723a205452414e534645525f46524f4d5f4641494c4544556e697377617056324c6962726172793a20494e53554646494349454e545f494e5055545f414d4f554e54a26469706673582212208afdc4c37194d7ca1f4cc9961c6827f176017c92df2e6237e0366b088021437364736f6c63430006060033"; + +type UniswapV2Router02ConstructorParams = + | [signer?: Signer] + | ConstructorParameters; + +const isSuperArgs = ( + xs: UniswapV2Router02ConstructorParams +): xs is ConstructorParameters => xs.length > 1; + +export class UniswapV2Router02__factory extends ContractFactory { + constructor(...args: UniswapV2Router02ConstructorParams) { + if (isSuperArgs(args)) { + super(...args); + } else { + super(_abi, _bytecode, args[0]); + } + } + + override deploy( + _factory: string, + _WETH: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise { + return super.deploy( + _factory, + _WETH, + overrides || {} + ) as Promise; + } + override getDeployTransaction( + _factory: string, + _WETH: string, + overrides?: Overrides & { from?: string | Promise } + ): TransactionRequest { + return super.getDeployTransaction(_factory, _WETH, overrides || {}); + } + override attach(address: string): UniswapV2Router02 { + return super.attach(address) as UniswapV2Router02; + } + override connect(signer: Signer): UniswapV2Router02__factory { + return super.connect(signer) as UniswapV2Router02__factory; + } + + static readonly bytecode = _bytecode; + static readonly abi = _abi; + static createInterface(): UniswapV2Router02Interface { + return new utils.Interface(_abi) as UniswapV2Router02Interface; + } + static connect( + address: string, + signerOrProvider: Signer | Provider + ): UniswapV2Router02 { + return new Contract(address, _abi, signerOrProvider) as UniswapV2Router02; + } +} diff --git a/packages/interfaces/typechain-types/factories/@uniswap/v2-periphery/contracts/index.ts b/packages/interfaces/typechain-types/factories/@uniswap/v2-periphery/contracts/index.ts new file mode 100644 index 00000000..1e34f5fd --- /dev/null +++ b/packages/interfaces/typechain-types/factories/@uniswap/v2-periphery/contracts/index.ts @@ -0,0 +1,5 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +export * as interfaces from "./interfaces"; +export { UniswapV2Router02__factory } from "./UniswapV2Router02__factory"; diff --git a/packages/interfaces/typechain-types/factories/@uniswap/v2-periphery/contracts/interfaces/IERC20__factory.ts b/packages/interfaces/typechain-types/factories/@uniswap/v2-periphery/contracts/interfaces/IERC20__factory.ts new file mode 100644 index 00000000..e85c7bd7 --- /dev/null +++ b/packages/interfaces/typechain-types/factories/@uniswap/v2-periphery/contracts/interfaces/IERC20__factory.ts @@ -0,0 +1,245 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ + +import { Contract, Signer, utils } from "ethers"; +import type { Provider } from "@ethersproject/providers"; +import type { + IERC20, + IERC20Interface, +} from "../../../../../@uniswap/v2-periphery/contracts/interfaces/IERC20"; + +const _abi = [ + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "owner", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "spender", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "value", + type: "uint256", + }, + ], + name: "Approval", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "from", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "to", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "value", + type: "uint256", + }, + ], + name: "Transfer", + type: "event", + }, + { + inputs: [ + { + internalType: "address", + name: "owner", + type: "address", + }, + { + internalType: "address", + name: "spender", + type: "address", + }, + ], + name: "allowance", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "spender", + type: "address", + }, + { + internalType: "uint256", + name: "value", + type: "uint256", + }, + ], + name: "approve", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "owner", + type: "address", + }, + ], + name: "balanceOf", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "decimals", + outputs: [ + { + internalType: "uint8", + name: "", + type: "uint8", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "name", + outputs: [ + { + internalType: "string", + name: "", + type: "string", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "symbol", + outputs: [ + { + internalType: "string", + name: "", + type: "string", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "totalSupply", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "to", + type: "address", + }, + { + internalType: "uint256", + name: "value", + type: "uint256", + }, + ], + name: "transfer", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "from", + type: "address", + }, + { + internalType: "address", + name: "to", + type: "address", + }, + { + internalType: "uint256", + name: "value", + type: "uint256", + }, + ], + name: "transferFrom", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, +]; + +export class IERC20__factory { + static readonly abi = _abi; + static createInterface(): IERC20Interface { + return new utils.Interface(_abi) as IERC20Interface; + } + static connect(address: string, signerOrProvider: Signer | Provider): IERC20 { + return new Contract(address, _abi, signerOrProvider) as IERC20; + } +} diff --git a/packages/interfaces/typechain-types/factories/@uniswap/v2-periphery/contracts/interfaces/IUniswapV2Router01__factory.ts b/packages/interfaces/typechain-types/factories/@uniswap/v2-periphery/contracts/interfaces/IUniswapV2Router01__factory.ts new file mode 100644 index 00000000..f95f12d9 --- /dev/null +++ b/packages/interfaces/typechain-types/factories/@uniswap/v2-periphery/contracts/interfaces/IUniswapV2Router01__factory.ts @@ -0,0 +1,775 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ + +import { Contract, Signer, utils } from "ethers"; +import type { Provider } from "@ethersproject/providers"; +import type { + IUniswapV2Router01, + IUniswapV2Router01Interface, +} from "../../../../../@uniswap/v2-periphery/contracts/interfaces/IUniswapV2Router01"; + +const _abi = [ + { + inputs: [], + name: "WETH", + outputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + stateMutability: "pure", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "tokenA", + type: "address", + }, + { + internalType: "address", + name: "tokenB", + type: "address", + }, + { + internalType: "uint256", + name: "amountADesired", + type: "uint256", + }, + { + internalType: "uint256", + name: "amountBDesired", + type: "uint256", + }, + { + internalType: "uint256", + name: "amountAMin", + type: "uint256", + }, + { + internalType: "uint256", + name: "amountBMin", + type: "uint256", + }, + { + internalType: "address", + name: "to", + type: "address", + }, + { + internalType: "uint256", + name: "deadline", + type: "uint256", + }, + ], + name: "addLiquidity", + outputs: [ + { + internalType: "uint256", + name: "amountA", + type: "uint256", + }, + { + internalType: "uint256", + name: "amountB", + type: "uint256", + }, + { + internalType: "uint256", + name: "liquidity", + type: "uint256", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "token", + type: "address", + }, + { + internalType: "uint256", + name: "amountTokenDesired", + type: "uint256", + }, + { + internalType: "uint256", + name: "amountTokenMin", + type: "uint256", + }, + { + internalType: "uint256", + name: "amountETHMin", + type: "uint256", + }, + { + internalType: "address", + name: "to", + type: "address", + }, + { + internalType: "uint256", + name: "deadline", + type: "uint256", + }, + ], + name: "addLiquidityETH", + outputs: [ + { + internalType: "uint256", + name: "amountToken", + type: "uint256", + }, + { + internalType: "uint256", + name: "amountETH", + type: "uint256", + }, + { + internalType: "uint256", + name: "liquidity", + type: "uint256", + }, + ], + stateMutability: "payable", + type: "function", + }, + { + inputs: [], + name: "factory", + outputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + stateMutability: "pure", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "amountOut", + type: "uint256", + }, + { + internalType: "uint256", + name: "reserveIn", + type: "uint256", + }, + { + internalType: "uint256", + name: "reserveOut", + type: "uint256", + }, + ], + name: "getAmountIn", + outputs: [ + { + internalType: "uint256", + name: "amountIn", + type: "uint256", + }, + ], + stateMutability: "pure", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "amountIn", + type: "uint256", + }, + { + internalType: "uint256", + name: "reserveIn", + type: "uint256", + }, + { + internalType: "uint256", + name: "reserveOut", + type: "uint256", + }, + ], + name: "getAmountOut", + outputs: [ + { + internalType: "uint256", + name: "amountOut", + type: "uint256", + }, + ], + stateMutability: "pure", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "amountOut", + type: "uint256", + }, + { + internalType: "address[]", + name: "path", + type: "address[]", + }, + ], + name: "getAmountsIn", + outputs: [ + { + internalType: "uint256[]", + name: "amounts", + type: "uint256[]", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "amountIn", + type: "uint256", + }, + { + internalType: "address[]", + name: "path", + type: "address[]", + }, + ], + name: "getAmountsOut", + outputs: [ + { + internalType: "uint256[]", + name: "amounts", + type: "uint256[]", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "amountA", + type: "uint256", + }, + { + internalType: "uint256", + name: "reserveA", + type: "uint256", + }, + { + internalType: "uint256", + name: "reserveB", + type: "uint256", + }, + ], + name: "quote", + outputs: [ + { + internalType: "uint256", + name: "amountB", + type: "uint256", + }, + ], + stateMutability: "pure", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "tokenA", + type: "address", + }, + { + internalType: "address", + name: "tokenB", + type: "address", + }, + { + internalType: "uint256", + name: "liquidity", + type: "uint256", + }, + { + internalType: "uint256", + name: "amountAMin", + type: "uint256", + }, + { + internalType: "uint256", + name: "amountBMin", + type: "uint256", + }, + { + internalType: "address", + name: "to", + type: "address", + }, + { + internalType: "uint256", + name: "deadline", + type: "uint256", + }, + ], + name: "removeLiquidity", + outputs: [ + { + internalType: "uint256", + name: "amountA", + type: "uint256", + }, + { + internalType: "uint256", + name: "amountB", + type: "uint256", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "token", + type: "address", + }, + { + internalType: "uint256", + name: "liquidity", + type: "uint256", + }, + { + internalType: "uint256", + name: "amountTokenMin", + type: "uint256", + }, + { + internalType: "uint256", + name: "amountETHMin", + type: "uint256", + }, + { + internalType: "address", + name: "to", + type: "address", + }, + { + internalType: "uint256", + name: "deadline", + type: "uint256", + }, + ], + name: "removeLiquidityETH", + outputs: [ + { + internalType: "uint256", + name: "amountToken", + type: "uint256", + }, + { + internalType: "uint256", + name: "amountETH", + type: "uint256", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "token", + type: "address", + }, + { + internalType: "uint256", + name: "liquidity", + type: "uint256", + }, + { + internalType: "uint256", + name: "amountTokenMin", + type: "uint256", + }, + { + internalType: "uint256", + name: "amountETHMin", + type: "uint256", + }, + { + internalType: "address", + name: "to", + type: "address", + }, + { + internalType: "uint256", + name: "deadline", + type: "uint256", + }, + { + internalType: "bool", + name: "approveMax", + type: "bool", + }, + { + internalType: "uint8", + name: "v", + type: "uint8", + }, + { + internalType: "bytes32", + name: "r", + type: "bytes32", + }, + { + internalType: "bytes32", + name: "s", + type: "bytes32", + }, + ], + name: "removeLiquidityETHWithPermit", + outputs: [ + { + internalType: "uint256", + name: "amountToken", + type: "uint256", + }, + { + internalType: "uint256", + name: "amountETH", + type: "uint256", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "tokenA", + type: "address", + }, + { + internalType: "address", + name: "tokenB", + type: "address", + }, + { + internalType: "uint256", + name: "liquidity", + type: "uint256", + }, + { + internalType: "uint256", + name: "amountAMin", + type: "uint256", + }, + { + internalType: "uint256", + name: "amountBMin", + type: "uint256", + }, + { + internalType: "address", + name: "to", + type: "address", + }, + { + internalType: "uint256", + name: "deadline", + type: "uint256", + }, + { + internalType: "bool", + name: "approveMax", + type: "bool", + }, + { + internalType: "uint8", + name: "v", + type: "uint8", + }, + { + internalType: "bytes32", + name: "r", + type: "bytes32", + }, + { + internalType: "bytes32", + name: "s", + type: "bytes32", + }, + ], + name: "removeLiquidityWithPermit", + outputs: [ + { + internalType: "uint256", + name: "amountA", + type: "uint256", + }, + { + internalType: "uint256", + name: "amountB", + type: "uint256", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "amountOut", + type: "uint256", + }, + { + internalType: "address[]", + name: "path", + type: "address[]", + }, + { + internalType: "address", + name: "to", + type: "address", + }, + { + internalType: "uint256", + name: "deadline", + type: "uint256", + }, + ], + name: "swapETHForExactTokens", + outputs: [ + { + internalType: "uint256[]", + name: "amounts", + type: "uint256[]", + }, + ], + stateMutability: "payable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "amountOutMin", + type: "uint256", + }, + { + internalType: "address[]", + name: "path", + type: "address[]", + }, + { + internalType: "address", + name: "to", + type: "address", + }, + { + internalType: "uint256", + name: "deadline", + type: "uint256", + }, + ], + name: "swapExactETHForTokens", + outputs: [ + { + internalType: "uint256[]", + name: "amounts", + type: "uint256[]", + }, + ], + stateMutability: "payable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "amountIn", + type: "uint256", + }, + { + internalType: "uint256", + name: "amountOutMin", + type: "uint256", + }, + { + internalType: "address[]", + name: "path", + type: "address[]", + }, + { + internalType: "address", + name: "to", + type: "address", + }, + { + internalType: "uint256", + name: "deadline", + type: "uint256", + }, + ], + name: "swapExactTokensForETH", + outputs: [ + { + internalType: "uint256[]", + name: "amounts", + type: "uint256[]", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "amountIn", + type: "uint256", + }, + { + internalType: "uint256", + name: "amountOutMin", + type: "uint256", + }, + { + internalType: "address[]", + name: "path", + type: "address[]", + }, + { + internalType: "address", + name: "to", + type: "address", + }, + { + internalType: "uint256", + name: "deadline", + type: "uint256", + }, + ], + name: "swapExactTokensForTokens", + outputs: [ + { + internalType: "uint256[]", + name: "amounts", + type: "uint256[]", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "amountOut", + type: "uint256", + }, + { + internalType: "uint256", + name: "amountInMax", + type: "uint256", + }, + { + internalType: "address[]", + name: "path", + type: "address[]", + }, + { + internalType: "address", + name: "to", + type: "address", + }, + { + internalType: "uint256", + name: "deadline", + type: "uint256", + }, + ], + name: "swapTokensForExactETH", + outputs: [ + { + internalType: "uint256[]", + name: "amounts", + type: "uint256[]", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "amountOut", + type: "uint256", + }, + { + internalType: "uint256", + name: "amountInMax", + type: "uint256", + }, + { + internalType: "address[]", + name: "path", + type: "address[]", + }, + { + internalType: "address", + name: "to", + type: "address", + }, + { + internalType: "uint256", + name: "deadline", + type: "uint256", + }, + ], + name: "swapTokensForExactTokens", + outputs: [ + { + internalType: "uint256[]", + name: "amounts", + type: "uint256[]", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, +]; + +export class IUniswapV2Router01__factory { + static readonly abi = _abi; + static createInterface(): IUniswapV2Router01Interface { + return new utils.Interface(_abi) as IUniswapV2Router01Interface; + } + static connect( + address: string, + signerOrProvider: Signer | Provider + ): IUniswapV2Router01 { + return new Contract(address, _abi, signerOrProvider) as IUniswapV2Router01; + } +} diff --git a/packages/interfaces/typechain-types/factories/@uniswap/v2-periphery/contracts/interfaces/IUniswapV2Router02__factory.ts b/packages/interfaces/typechain-types/factories/@uniswap/v2-periphery/contracts/interfaces/IUniswapV2Router02__factory.ts new file mode 100644 index 00000000..f9cbe21d --- /dev/null +++ b/packages/interfaces/typechain-types/factories/@uniswap/v2-periphery/contracts/interfaces/IUniswapV2Router02__factory.ts @@ -0,0 +1,977 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ + +import { Contract, Signer, utils } from "ethers"; +import type { Provider } from "@ethersproject/providers"; +import type { + IUniswapV2Router02, + IUniswapV2Router02Interface, +} from "../../../../../@uniswap/v2-periphery/contracts/interfaces/IUniswapV2Router02"; + +const _abi = [ + { + inputs: [], + name: "WETH", + outputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + stateMutability: "pure", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "tokenA", + type: "address", + }, + { + internalType: "address", + name: "tokenB", + type: "address", + }, + { + internalType: "uint256", + name: "amountADesired", + type: "uint256", + }, + { + internalType: "uint256", + name: "amountBDesired", + type: "uint256", + }, + { + internalType: "uint256", + name: "amountAMin", + type: "uint256", + }, + { + internalType: "uint256", + name: "amountBMin", + type: "uint256", + }, + { + internalType: "address", + name: "to", + type: "address", + }, + { + internalType: "uint256", + name: "deadline", + type: "uint256", + }, + ], + name: "addLiquidity", + outputs: [ + { + internalType: "uint256", + name: "amountA", + type: "uint256", + }, + { + internalType: "uint256", + name: "amountB", + type: "uint256", + }, + { + internalType: "uint256", + name: "liquidity", + type: "uint256", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "token", + type: "address", + }, + { + internalType: "uint256", + name: "amountTokenDesired", + type: "uint256", + }, + { + internalType: "uint256", + name: "amountTokenMin", + type: "uint256", + }, + { + internalType: "uint256", + name: "amountETHMin", + type: "uint256", + }, + { + internalType: "address", + name: "to", + type: "address", + }, + { + internalType: "uint256", + name: "deadline", + type: "uint256", + }, + ], + name: "addLiquidityETH", + outputs: [ + { + internalType: "uint256", + name: "amountToken", + type: "uint256", + }, + { + internalType: "uint256", + name: "amountETH", + type: "uint256", + }, + { + internalType: "uint256", + name: "liquidity", + type: "uint256", + }, + ], + stateMutability: "payable", + type: "function", + }, + { + inputs: [], + name: "factory", + outputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + stateMutability: "pure", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "amountOut", + type: "uint256", + }, + { + internalType: "uint256", + name: "reserveIn", + type: "uint256", + }, + { + internalType: "uint256", + name: "reserveOut", + type: "uint256", + }, + ], + name: "getAmountIn", + outputs: [ + { + internalType: "uint256", + name: "amountIn", + type: "uint256", + }, + ], + stateMutability: "pure", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "amountIn", + type: "uint256", + }, + { + internalType: "uint256", + name: "reserveIn", + type: "uint256", + }, + { + internalType: "uint256", + name: "reserveOut", + type: "uint256", + }, + ], + name: "getAmountOut", + outputs: [ + { + internalType: "uint256", + name: "amountOut", + type: "uint256", + }, + ], + stateMutability: "pure", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "amountOut", + type: "uint256", + }, + { + internalType: "address[]", + name: "path", + type: "address[]", + }, + ], + name: "getAmountsIn", + outputs: [ + { + internalType: "uint256[]", + name: "amounts", + type: "uint256[]", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "amountIn", + type: "uint256", + }, + { + internalType: "address[]", + name: "path", + type: "address[]", + }, + ], + name: "getAmountsOut", + outputs: [ + { + internalType: "uint256[]", + name: "amounts", + type: "uint256[]", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "amountA", + type: "uint256", + }, + { + internalType: "uint256", + name: "reserveA", + type: "uint256", + }, + { + internalType: "uint256", + name: "reserveB", + type: "uint256", + }, + ], + name: "quote", + outputs: [ + { + internalType: "uint256", + name: "amountB", + type: "uint256", + }, + ], + stateMutability: "pure", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "tokenA", + type: "address", + }, + { + internalType: "address", + name: "tokenB", + type: "address", + }, + { + internalType: "uint256", + name: "liquidity", + type: "uint256", + }, + { + internalType: "uint256", + name: "amountAMin", + type: "uint256", + }, + { + internalType: "uint256", + name: "amountBMin", + type: "uint256", + }, + { + internalType: "address", + name: "to", + type: "address", + }, + { + internalType: "uint256", + name: "deadline", + type: "uint256", + }, + ], + name: "removeLiquidity", + outputs: [ + { + internalType: "uint256", + name: "amountA", + type: "uint256", + }, + { + internalType: "uint256", + name: "amountB", + type: "uint256", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "token", + type: "address", + }, + { + internalType: "uint256", + name: "liquidity", + type: "uint256", + }, + { + internalType: "uint256", + name: "amountTokenMin", + type: "uint256", + }, + { + internalType: "uint256", + name: "amountETHMin", + type: "uint256", + }, + { + internalType: "address", + name: "to", + type: "address", + }, + { + internalType: "uint256", + name: "deadline", + type: "uint256", + }, + ], + name: "removeLiquidityETH", + outputs: [ + { + internalType: "uint256", + name: "amountToken", + type: "uint256", + }, + { + internalType: "uint256", + name: "amountETH", + type: "uint256", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "token", + type: "address", + }, + { + internalType: "uint256", + name: "liquidity", + type: "uint256", + }, + { + internalType: "uint256", + name: "amountTokenMin", + type: "uint256", + }, + { + internalType: "uint256", + name: "amountETHMin", + type: "uint256", + }, + { + internalType: "address", + name: "to", + type: "address", + }, + { + internalType: "uint256", + name: "deadline", + type: "uint256", + }, + ], + name: "removeLiquidityETHSupportingFeeOnTransferTokens", + outputs: [ + { + internalType: "uint256", + name: "amountETH", + type: "uint256", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "token", + type: "address", + }, + { + internalType: "uint256", + name: "liquidity", + type: "uint256", + }, + { + internalType: "uint256", + name: "amountTokenMin", + type: "uint256", + }, + { + internalType: "uint256", + name: "amountETHMin", + type: "uint256", + }, + { + internalType: "address", + name: "to", + type: "address", + }, + { + internalType: "uint256", + name: "deadline", + type: "uint256", + }, + { + internalType: "bool", + name: "approveMax", + type: "bool", + }, + { + internalType: "uint8", + name: "v", + type: "uint8", + }, + { + internalType: "bytes32", + name: "r", + type: "bytes32", + }, + { + internalType: "bytes32", + name: "s", + type: "bytes32", + }, + ], + name: "removeLiquidityETHWithPermit", + outputs: [ + { + internalType: "uint256", + name: "amountToken", + type: "uint256", + }, + { + internalType: "uint256", + name: "amountETH", + type: "uint256", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "token", + type: "address", + }, + { + internalType: "uint256", + name: "liquidity", + type: "uint256", + }, + { + internalType: "uint256", + name: "amountTokenMin", + type: "uint256", + }, + { + internalType: "uint256", + name: "amountETHMin", + type: "uint256", + }, + { + internalType: "address", + name: "to", + type: "address", + }, + { + internalType: "uint256", + name: "deadline", + type: "uint256", + }, + { + internalType: "bool", + name: "approveMax", + type: "bool", + }, + { + internalType: "uint8", + name: "v", + type: "uint8", + }, + { + internalType: "bytes32", + name: "r", + type: "bytes32", + }, + { + internalType: "bytes32", + name: "s", + type: "bytes32", + }, + ], + name: "removeLiquidityETHWithPermitSupportingFeeOnTransferTokens", + outputs: [ + { + internalType: "uint256", + name: "amountETH", + type: "uint256", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "tokenA", + type: "address", + }, + { + internalType: "address", + name: "tokenB", + type: "address", + }, + { + internalType: "uint256", + name: "liquidity", + type: "uint256", + }, + { + internalType: "uint256", + name: "amountAMin", + type: "uint256", + }, + { + internalType: "uint256", + name: "amountBMin", + type: "uint256", + }, + { + internalType: "address", + name: "to", + type: "address", + }, + { + internalType: "uint256", + name: "deadline", + type: "uint256", + }, + { + internalType: "bool", + name: "approveMax", + type: "bool", + }, + { + internalType: "uint8", + name: "v", + type: "uint8", + }, + { + internalType: "bytes32", + name: "r", + type: "bytes32", + }, + { + internalType: "bytes32", + name: "s", + type: "bytes32", + }, + ], + name: "removeLiquidityWithPermit", + outputs: [ + { + internalType: "uint256", + name: "amountA", + type: "uint256", + }, + { + internalType: "uint256", + name: "amountB", + type: "uint256", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "amountOut", + type: "uint256", + }, + { + internalType: "address[]", + name: "path", + type: "address[]", + }, + { + internalType: "address", + name: "to", + type: "address", + }, + { + internalType: "uint256", + name: "deadline", + type: "uint256", + }, + ], + name: "swapETHForExactTokens", + outputs: [ + { + internalType: "uint256[]", + name: "amounts", + type: "uint256[]", + }, + ], + stateMutability: "payable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "amountOutMin", + type: "uint256", + }, + { + internalType: "address[]", + name: "path", + type: "address[]", + }, + { + internalType: "address", + name: "to", + type: "address", + }, + { + internalType: "uint256", + name: "deadline", + type: "uint256", + }, + ], + name: "swapExactETHForTokens", + outputs: [ + { + internalType: "uint256[]", + name: "amounts", + type: "uint256[]", + }, + ], + stateMutability: "payable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "amountOutMin", + type: "uint256", + }, + { + internalType: "address[]", + name: "path", + type: "address[]", + }, + { + internalType: "address", + name: "to", + type: "address", + }, + { + internalType: "uint256", + name: "deadline", + type: "uint256", + }, + ], + name: "swapExactETHForTokensSupportingFeeOnTransferTokens", + outputs: [], + stateMutability: "payable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "amountIn", + type: "uint256", + }, + { + internalType: "uint256", + name: "amountOutMin", + type: "uint256", + }, + { + internalType: "address[]", + name: "path", + type: "address[]", + }, + { + internalType: "address", + name: "to", + type: "address", + }, + { + internalType: "uint256", + name: "deadline", + type: "uint256", + }, + ], + name: "swapExactTokensForETH", + outputs: [ + { + internalType: "uint256[]", + name: "amounts", + type: "uint256[]", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "amountIn", + type: "uint256", + }, + { + internalType: "uint256", + name: "amountOutMin", + type: "uint256", + }, + { + internalType: "address[]", + name: "path", + type: "address[]", + }, + { + internalType: "address", + name: "to", + type: "address", + }, + { + internalType: "uint256", + name: "deadline", + type: "uint256", + }, + ], + name: "swapExactTokensForETHSupportingFeeOnTransferTokens", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "amountIn", + type: "uint256", + }, + { + internalType: "uint256", + name: "amountOutMin", + type: "uint256", + }, + { + internalType: "address[]", + name: "path", + type: "address[]", + }, + { + internalType: "address", + name: "to", + type: "address", + }, + { + internalType: "uint256", + name: "deadline", + type: "uint256", + }, + ], + name: "swapExactTokensForTokens", + outputs: [ + { + internalType: "uint256[]", + name: "amounts", + type: "uint256[]", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "amountIn", + type: "uint256", + }, + { + internalType: "uint256", + name: "amountOutMin", + type: "uint256", + }, + { + internalType: "address[]", + name: "path", + type: "address[]", + }, + { + internalType: "address", + name: "to", + type: "address", + }, + { + internalType: "uint256", + name: "deadline", + type: "uint256", + }, + ], + name: "swapExactTokensForTokensSupportingFeeOnTransferTokens", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "amountOut", + type: "uint256", + }, + { + internalType: "uint256", + name: "amountInMax", + type: "uint256", + }, + { + internalType: "address[]", + name: "path", + type: "address[]", + }, + { + internalType: "address", + name: "to", + type: "address", + }, + { + internalType: "uint256", + name: "deadline", + type: "uint256", + }, + ], + name: "swapTokensForExactETH", + outputs: [ + { + internalType: "uint256[]", + name: "amounts", + type: "uint256[]", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "amountOut", + type: "uint256", + }, + { + internalType: "uint256", + name: "amountInMax", + type: "uint256", + }, + { + internalType: "address[]", + name: "path", + type: "address[]", + }, + { + internalType: "address", + name: "to", + type: "address", + }, + { + internalType: "uint256", + name: "deadline", + type: "uint256", + }, + ], + name: "swapTokensForExactTokens", + outputs: [ + { + internalType: "uint256[]", + name: "amounts", + type: "uint256[]", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, +]; + +export class IUniswapV2Router02__factory { + static readonly abi = _abi; + static createInterface(): IUniswapV2Router02Interface { + return new utils.Interface(_abi) as IUniswapV2Router02Interface; + } + static connect( + address: string, + signerOrProvider: Signer | Provider + ): IUniswapV2Router02 { + return new Contract(address, _abi, signerOrProvider) as IUniswapV2Router02; + } +} diff --git a/packages/interfaces/typechain-types/factories/@uniswap/v2-periphery/contracts/interfaces/IWETH__factory.ts b/packages/interfaces/typechain-types/factories/@uniswap/v2-periphery/contracts/interfaces/IWETH__factory.ts new file mode 100644 index 00000000..4f033f64 --- /dev/null +++ b/packages/interfaces/typechain-types/factories/@uniswap/v2-periphery/contracts/interfaces/IWETH__factory.ts @@ -0,0 +1,67 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ + +import { Contract, Signer, utils } from "ethers"; +import type { Provider } from "@ethersproject/providers"; +import type { + IWETH, + IWETHInterface, +} from "../../../../../@uniswap/v2-periphery/contracts/interfaces/IWETH"; + +const _abi = [ + { + inputs: [], + name: "deposit", + outputs: [], + stateMutability: "payable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "to", + type: "address", + }, + { + internalType: "uint256", + name: "value", + type: "uint256", + }, + ], + name: "transfer", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + name: "withdraw", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, +]; + +export class IWETH__factory { + static readonly abi = _abi; + static createInterface(): IWETHInterface { + return new utils.Interface(_abi) as IWETHInterface; + } + static connect(address: string, signerOrProvider: Signer | Provider): IWETH { + return new Contract(address, _abi, signerOrProvider) as IWETH; + } +} diff --git a/packages/interfaces/typechain-types/factories/@uniswap/v2-periphery/contracts/interfaces/index.ts b/packages/interfaces/typechain-types/factories/@uniswap/v2-periphery/contracts/interfaces/index.ts new file mode 100644 index 00000000..f8c8fbd3 --- /dev/null +++ b/packages/interfaces/typechain-types/factories/@uniswap/v2-periphery/contracts/interfaces/index.ts @@ -0,0 +1,7 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +export { IERC20__factory } from "./IERC20__factory"; +export { IUniswapV2Router01__factory } from "./IUniswapV2Router01__factory"; +export { IUniswapV2Router02__factory } from "./IUniswapV2Router02__factory"; +export { IWETH__factory } from "./IWETH__factory"; diff --git a/packages/interfaces/typechain-types/factories/@uniswap/v2-periphery/index.ts b/packages/interfaces/typechain-types/factories/@uniswap/v2-periphery/index.ts new file mode 100644 index 00000000..6397da09 --- /dev/null +++ b/packages/interfaces/typechain-types/factories/@uniswap/v2-periphery/index.ts @@ -0,0 +1,4 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +export * as contracts from "./contracts"; diff --git a/packages/interfaces/typechain-types/factories/@uniswap/v3-core/contracts/index.ts b/packages/interfaces/typechain-types/factories/@uniswap/v3-core/contracts/index.ts new file mode 100644 index 00000000..1d3444d5 --- /dev/null +++ b/packages/interfaces/typechain-types/factories/@uniswap/v3-core/contracts/index.ts @@ -0,0 +1,4 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +export * as interfaces from "./interfaces"; diff --git a/packages/interfaces/typechain-types/factories/@uniswap/v3-core/contracts/interfaces/callback/IUniswapV3SwapCallback__factory.ts b/packages/interfaces/typechain-types/factories/@uniswap/v3-core/contracts/interfaces/callback/IUniswapV3SwapCallback__factory.ts new file mode 100644 index 00000000..a0c1048a --- /dev/null +++ b/packages/interfaces/typechain-types/factories/@uniswap/v3-core/contracts/interfaces/callback/IUniswapV3SwapCallback__factory.ts @@ -0,0 +1,53 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ + +import { Contract, Signer, utils } from "ethers"; +import type { Provider } from "@ethersproject/providers"; +import type { + IUniswapV3SwapCallback, + IUniswapV3SwapCallbackInterface, +} from "../../../../../../@uniswap/v3-core/contracts/interfaces/callback/IUniswapV3SwapCallback"; + +const _abi = [ + { + inputs: [ + { + internalType: "int256", + name: "amount0Delta", + type: "int256", + }, + { + internalType: "int256", + name: "amount1Delta", + type: "int256", + }, + { + internalType: "bytes", + name: "data", + type: "bytes", + }, + ], + name: "uniswapV3SwapCallback", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, +]; + +export class IUniswapV3SwapCallback__factory { + static readonly abi = _abi; + static createInterface(): IUniswapV3SwapCallbackInterface { + return new utils.Interface(_abi) as IUniswapV3SwapCallbackInterface; + } + static connect( + address: string, + signerOrProvider: Signer | Provider + ): IUniswapV3SwapCallback { + return new Contract( + address, + _abi, + signerOrProvider + ) as IUniswapV3SwapCallback; + } +} diff --git a/packages/interfaces/typechain-types/factories/@uniswap/v3-core/contracts/interfaces/callback/index.ts b/packages/interfaces/typechain-types/factories/@uniswap/v3-core/contracts/interfaces/callback/index.ts new file mode 100644 index 00000000..0c401bd0 --- /dev/null +++ b/packages/interfaces/typechain-types/factories/@uniswap/v3-core/contracts/interfaces/callback/index.ts @@ -0,0 +1,4 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +export { IUniswapV3SwapCallback__factory } from "./IUniswapV3SwapCallback__factory"; diff --git a/packages/interfaces/typechain-types/factories/@uniswap/v3-core/contracts/interfaces/index.ts b/packages/interfaces/typechain-types/factories/@uniswap/v3-core/contracts/interfaces/index.ts new file mode 100644 index 00000000..01db08ef --- /dev/null +++ b/packages/interfaces/typechain-types/factories/@uniswap/v3-core/contracts/interfaces/index.ts @@ -0,0 +1,4 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +export * as callback from "./callback"; diff --git a/packages/interfaces/typechain-types/factories/@uniswap/v3-core/index.ts b/packages/interfaces/typechain-types/factories/@uniswap/v3-core/index.ts new file mode 100644 index 00000000..6397da09 --- /dev/null +++ b/packages/interfaces/typechain-types/factories/@uniswap/v3-core/index.ts @@ -0,0 +1,4 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +export * as contracts from "./contracts"; diff --git a/packages/interfaces/typechain-types/factories/@uniswap/v3-periphery/contracts/index.ts b/packages/interfaces/typechain-types/factories/@uniswap/v3-periphery/contracts/index.ts new file mode 100644 index 00000000..1d3444d5 --- /dev/null +++ b/packages/interfaces/typechain-types/factories/@uniswap/v3-periphery/contracts/index.ts @@ -0,0 +1,4 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +export * as interfaces from "./interfaces"; diff --git a/packages/interfaces/typechain-types/factories/@uniswap/v3-periphery/contracts/interfaces/IQuoter__factory.ts b/packages/interfaces/typechain-types/factories/@uniswap/v3-periphery/contracts/interfaces/IQuoter__factory.ts new file mode 100644 index 00000000..4690d4bb --- /dev/null +++ b/packages/interfaces/typechain-types/factories/@uniswap/v3-periphery/contracts/interfaces/IQuoter__factory.ts @@ -0,0 +1,152 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ + +import { Contract, Signer, utils } from "ethers"; +import type { Provider } from "@ethersproject/providers"; +import type { + IQuoter, + IQuoterInterface, +} from "../../../../../@uniswap/v3-periphery/contracts/interfaces/IQuoter"; + +const _abi = [ + { + inputs: [ + { + internalType: "bytes", + name: "path", + type: "bytes", + }, + { + internalType: "uint256", + name: "amountIn", + type: "uint256", + }, + ], + name: "quoteExactInput", + outputs: [ + { + internalType: "uint256", + name: "amountOut", + type: "uint256", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "tokenIn", + type: "address", + }, + { + internalType: "address", + name: "tokenOut", + type: "address", + }, + { + internalType: "uint24", + name: "fee", + type: "uint24", + }, + { + internalType: "uint256", + name: "amountIn", + type: "uint256", + }, + { + internalType: "uint160", + name: "sqrtPriceLimitX96", + type: "uint160", + }, + ], + name: "quoteExactInputSingle", + outputs: [ + { + internalType: "uint256", + name: "amountOut", + type: "uint256", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes", + name: "path", + type: "bytes", + }, + { + internalType: "uint256", + name: "amountOut", + type: "uint256", + }, + ], + name: "quoteExactOutput", + outputs: [ + { + internalType: "uint256", + name: "amountIn", + type: "uint256", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "tokenIn", + type: "address", + }, + { + internalType: "address", + name: "tokenOut", + type: "address", + }, + { + internalType: "uint24", + name: "fee", + type: "uint24", + }, + { + internalType: "uint256", + name: "amountOut", + type: "uint256", + }, + { + internalType: "uint160", + name: "sqrtPriceLimitX96", + type: "uint160", + }, + ], + name: "quoteExactOutputSingle", + outputs: [ + { + internalType: "uint256", + name: "amountIn", + type: "uint256", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, +]; + +export class IQuoter__factory { + static readonly abi = _abi; + static createInterface(): IQuoterInterface { + return new utils.Interface(_abi) as IQuoterInterface; + } + static connect( + address: string, + signerOrProvider: Signer | Provider + ): IQuoter { + return new Contract(address, _abi, signerOrProvider) as IQuoter; + } +} diff --git a/packages/interfaces/typechain-types/factories/@uniswap/v3-periphery/contracts/interfaces/ISwapRouter__factory.ts b/packages/interfaces/typechain-types/factories/@uniswap/v3-periphery/contracts/interfaces/ISwapRouter__factory.ts new file mode 100644 index 00000000..8fa4e417 --- /dev/null +++ b/packages/interfaces/typechain-types/factories/@uniswap/v3-periphery/contracts/interfaces/ISwapRouter__factory.ts @@ -0,0 +1,263 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ + +import { Contract, Signer, utils } from "ethers"; +import type { Provider } from "@ethersproject/providers"; +import type { + ISwapRouter, + ISwapRouterInterface, +} from "../../../../../@uniswap/v3-periphery/contracts/interfaces/ISwapRouter"; + +const _abi = [ + { + inputs: [ + { + components: [ + { + internalType: "bytes", + name: "path", + type: "bytes", + }, + { + internalType: "address", + name: "recipient", + type: "address", + }, + { + internalType: "uint256", + name: "deadline", + type: "uint256", + }, + { + internalType: "uint256", + name: "amountIn", + type: "uint256", + }, + { + internalType: "uint256", + name: "amountOutMinimum", + type: "uint256", + }, + ], + internalType: "struct ISwapRouter.ExactInputParams", + name: "params", + type: "tuple", + }, + ], + name: "exactInput", + outputs: [ + { + internalType: "uint256", + name: "amountOut", + type: "uint256", + }, + ], + stateMutability: "payable", + type: "function", + }, + { + inputs: [ + { + components: [ + { + internalType: "address", + name: "tokenIn", + type: "address", + }, + { + internalType: "address", + name: "tokenOut", + type: "address", + }, + { + internalType: "uint24", + name: "fee", + type: "uint24", + }, + { + internalType: "address", + name: "recipient", + type: "address", + }, + { + internalType: "uint256", + name: "deadline", + type: "uint256", + }, + { + internalType: "uint256", + name: "amountIn", + type: "uint256", + }, + { + internalType: "uint256", + name: "amountOutMinimum", + type: "uint256", + }, + { + internalType: "uint160", + name: "sqrtPriceLimitX96", + type: "uint160", + }, + ], + internalType: "struct ISwapRouter.ExactInputSingleParams", + name: "params", + type: "tuple", + }, + ], + name: "exactInputSingle", + outputs: [ + { + internalType: "uint256", + name: "amountOut", + type: "uint256", + }, + ], + stateMutability: "payable", + type: "function", + }, + { + inputs: [ + { + components: [ + { + internalType: "bytes", + name: "path", + type: "bytes", + }, + { + internalType: "address", + name: "recipient", + type: "address", + }, + { + internalType: "uint256", + name: "deadline", + type: "uint256", + }, + { + internalType: "uint256", + name: "amountOut", + type: "uint256", + }, + { + internalType: "uint256", + name: "amountInMaximum", + type: "uint256", + }, + ], + internalType: "struct ISwapRouter.ExactOutputParams", + name: "params", + type: "tuple", + }, + ], + name: "exactOutput", + outputs: [ + { + internalType: "uint256", + name: "amountIn", + type: "uint256", + }, + ], + stateMutability: "payable", + type: "function", + }, + { + inputs: [ + { + components: [ + { + internalType: "address", + name: "tokenIn", + type: "address", + }, + { + internalType: "address", + name: "tokenOut", + type: "address", + }, + { + internalType: "uint24", + name: "fee", + type: "uint24", + }, + { + internalType: "address", + name: "recipient", + type: "address", + }, + { + internalType: "uint256", + name: "deadline", + type: "uint256", + }, + { + internalType: "uint256", + name: "amountOut", + type: "uint256", + }, + { + internalType: "uint256", + name: "amountInMaximum", + type: "uint256", + }, + { + internalType: "uint160", + name: "sqrtPriceLimitX96", + type: "uint160", + }, + ], + internalType: "struct ISwapRouter.ExactOutputSingleParams", + name: "params", + type: "tuple", + }, + ], + name: "exactOutputSingle", + outputs: [ + { + internalType: "uint256", + name: "amountIn", + type: "uint256", + }, + ], + stateMutability: "payable", + type: "function", + }, + { + inputs: [ + { + internalType: "int256", + name: "amount0Delta", + type: "int256", + }, + { + internalType: "int256", + name: "amount1Delta", + type: "int256", + }, + { + internalType: "bytes", + name: "data", + type: "bytes", + }, + ], + name: "uniswapV3SwapCallback", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, +]; + +export class ISwapRouter__factory { + static readonly abi = _abi; + static createInterface(): ISwapRouterInterface { + return new utils.Interface(_abi) as ISwapRouterInterface; + } + static connect( + address: string, + signerOrProvider: Signer | Provider + ): ISwapRouter { + return new Contract(address, _abi, signerOrProvider) as ISwapRouter; + } +} diff --git a/packages/interfaces/typechain-types/factories/@uniswap/v3-periphery/contracts/interfaces/index.ts b/packages/interfaces/typechain-types/factories/@uniswap/v3-periphery/contracts/interfaces/index.ts new file mode 100644 index 00000000..0ab8d07a --- /dev/null +++ b/packages/interfaces/typechain-types/factories/@uniswap/v3-periphery/contracts/interfaces/index.ts @@ -0,0 +1,5 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +export { IQuoter__factory } from "./IQuoter__factory"; +export { ISwapRouter__factory } from "./ISwapRouter__factory"; diff --git a/packages/interfaces/typechain-types/factories/@uniswap/v3-periphery/index.ts b/packages/interfaces/typechain-types/factories/@uniswap/v3-periphery/index.ts new file mode 100644 index 00000000..6397da09 --- /dev/null +++ b/packages/interfaces/typechain-types/factories/@uniswap/v3-periphery/index.ts @@ -0,0 +1,4 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +export * as contracts from "./contracts"; diff --git a/packages/interfaces/typechain-types/factories/contracts/ImmutableCreate2Factory__factory.ts b/packages/interfaces/typechain-types/factories/contracts/ImmutableCreate2Factory__factory.ts new file mode 100644 index 00000000..6e99592e --- /dev/null +++ b/packages/interfaces/typechain-types/factories/contracts/ImmutableCreate2Factory__factory.ts @@ -0,0 +1,154 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import { Signer, utils, Contract, ContractFactory, Overrides } from "ethers"; +import type { Provider, TransactionRequest } from "@ethersproject/providers"; +import type { + ImmutableCreate2Factory, + ImmutableCreate2FactoryInterface, +} from "../../contracts/ImmutableCreate2Factory"; + +const _abi = [ + { + constant: true, + inputs: [ + { + name: "deploymentAddress", + type: "address", + }, + ], + name: "hasBeenDeployed", + outputs: [ + { + name: "", + type: "bool", + }, + ], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: false, + inputs: [ + { + name: "salt", + type: "bytes32", + }, + { + name: "initializationCode", + type: "bytes", + }, + ], + name: "safeCreate2", + outputs: [ + { + name: "deploymentAddress", + type: "address", + }, + ], + payable: true, + stateMutability: "payable", + type: "function", + }, + { + constant: true, + inputs: [ + { + name: "salt", + type: "bytes32", + }, + { + name: "initCode", + type: "bytes", + }, + ], + name: "findCreate2Address", + outputs: [ + { + name: "deploymentAddress", + type: "address", + }, + ], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: true, + inputs: [ + { + name: "salt", + type: "bytes32", + }, + { + name: "initCodeHash", + type: "bytes32", + }, + ], + name: "findCreate2AddressViaHash", + outputs: [ + { + name: "deploymentAddress", + type: "address", + }, + ], + payable: false, + stateMutability: "view", + type: "function", + }, +]; + +const _bytecode = + "0x608060405234801561001057600080fd5b506109d0806100206000396000f3fe60806040526004361061003f5760003560e01c806308508b8f1461004457806364e03087146100ad57806385cf97ab14610170578063a49a7c9014610240575b600080fd5b34801561005057600080fd5b506100936004803603602081101561006757600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506102c5565b604051808215151515815260200191505060405180910390f35b61012e600480360360408110156100c357600080fd5b8101908080359060200190929190803590602001906401000000008111156100ea57600080fd5b8201836020820111156100fc57600080fd5b8035906020019184600183028401116401000000008311171561011e57600080fd5b909192939192939050505061031a565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561017c57600080fd5b506101fe6004803603604081101561019357600080fd5b8101908080359060200190929190803590602001906401000000008111156101ba57600080fd5b8201836020820111156101cc57600080fd5b803590602001918460018302840111640100000000831117156101ee57600080fd5b90919293919293905050506106b5565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561024c57600080fd5b506102836004803603604081101561026357600080fd5b8101908080359060200190929190803590602001909291905050506107db565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b60008060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff169050919050565b6000833373ffffffffffffffffffffffffffffffffffffffff168160601c73ffffffffffffffffffffffffffffffffffffffff16148061037b5750600060601b6bffffffffffffffffffffffff1916816bffffffffffffffffffffffff1916145b6103d0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260458152602001806109116045913960600191505060405180910390fd5b606084848080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f82011690508083019250505050505050905060003087836040516020018082805190602001908083835b602083106104545780518252602082019150602081019050602083039250610431565b6001836020036101000a0380198251168184511680821785525050505050509050019150506040516020818303038152906040528051906020012060405160200180807fff000000000000000000000000000000000000000000000000000000000000008152506001018473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1660601b815260140183815260200182815260200193505050506040516020818303038152906040528051906020012060001c90506000808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16156105c1576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252603f8152602001806108d2603f913960400191505060405180910390fd5b81602001825188818334f5955050508073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1614610654576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260468152602001806109566046913960600191505060405180910390fd5b60016000808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055505050509392505050565b6000308484846040516020018083838082843780830192505050925050506040516020818303038152906040528051906020012060405160200180807fff000000000000000000000000000000000000000000000000000000000000008152506001018473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1660601b815260140183815260200182815260200193505050506040516020818303038152906040528051906020012060001c90506000808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16156107d357600090506107d4565b5b9392505050565b600030838360405160200180807fff000000000000000000000000000000000000000000000000000000000000008152506001018473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1660601b815260140183815260200182815260200193505050506040516020818303038152906040528051906020012060001c90506000808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16156108ca57600090506108cb565b5b9291505056fe496e76616c696420636f6e7472616374206372656174696f6e202d20636f6e74726163742068617320616c7265616479206265656e206465706c6f7965642e496e76616c69642073616c74202d206669727374203230206279746573206f66207468652073616c74206d757374206d617463682063616c6c696e6720616464726573732e4661696c656420746f206465706c6f7920636f6e7472616374207573696e672070726f76696465642073616c7420616e6420696e697469616c697a6174696f6e20636f64652ea265627a7a72305820d7c139ad04a8d13985b5e2d67c67413e545e678b3fc89b6305c26e51dee238a764736f6c634300050a0032"; + +type ImmutableCreate2FactoryConstructorParams = + | [signer?: Signer] + | ConstructorParameters; + +const isSuperArgs = ( + xs: ImmutableCreate2FactoryConstructorParams +): xs is ConstructorParameters => xs.length > 1; + +export class ImmutableCreate2Factory__factory extends ContractFactory { + constructor(...args: ImmutableCreate2FactoryConstructorParams) { + if (isSuperArgs(args)) { + super(...args); + } else { + super(_abi, _bytecode, args[0]); + } + } + + override deploy( + overrides?: Overrides & { from?: string | Promise } + ): Promise { + return super.deploy(overrides || {}) as Promise; + } + override getDeployTransaction( + overrides?: Overrides & { from?: string | Promise } + ): TransactionRequest { + return super.getDeployTransaction(overrides || {}); + } + override attach(address: string): ImmutableCreate2Factory { + return super.attach(address) as ImmutableCreate2Factory; + } + override connect(signer: Signer): ImmutableCreate2Factory__factory { + return super.connect(signer) as ImmutableCreate2Factory__factory; + } + + static readonly bytecode = _bytecode; + static readonly abi = _abi; + static createInterface(): ImmutableCreate2FactoryInterface { + return new utils.Interface(_abi) as ImmutableCreate2FactoryInterface; + } + static connect( + address: string, + signerOrProvider: Signer | Provider + ): ImmutableCreate2Factory { + return new Contract( + address, + _abi, + signerOrProvider + ) as ImmutableCreate2Factory; + } +} diff --git a/packages/interfaces/typechain-types/factories/contracts/Zeta.eth.sol/ZetaEth__factory.ts b/packages/interfaces/typechain-types/factories/contracts/Zeta.eth.sol/ZetaEth__factory.ts new file mode 100644 index 00000000..2a2dda9a --- /dev/null +++ b/packages/interfaces/typechain-types/factories/contracts/Zeta.eth.sol/ZetaEth__factory.ts @@ -0,0 +1,352 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import { + Signer, + utils, + Contract, + ContractFactory, + BigNumberish, + Overrides, +} from "ethers"; +import type { Provider, TransactionRequest } from "@ethersproject/providers"; +import type { + ZetaEth, + ZetaEthInterface, +} from "../../../contracts/Zeta.eth.sol/ZetaEth"; + +const _abi = [ + { + inputs: [ + { + internalType: "uint256", + name: "initialSupply", + type: "uint256", + }, + ], + stateMutability: "nonpayable", + type: "constructor", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "owner", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "spender", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "value", + type: "uint256", + }, + ], + name: "Approval", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "from", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "to", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "value", + type: "uint256", + }, + ], + name: "Transfer", + type: "event", + }, + { + inputs: [ + { + internalType: "address", + name: "owner", + type: "address", + }, + { + internalType: "address", + name: "spender", + type: "address", + }, + ], + name: "allowance", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "spender", + type: "address", + }, + { + internalType: "uint256", + name: "amount", + type: "uint256", + }, + ], + name: "approve", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "account", + type: "address", + }, + ], + name: "balanceOf", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "decimals", + outputs: [ + { + internalType: "uint8", + name: "", + type: "uint8", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "spender", + type: "address", + }, + { + internalType: "uint256", + name: "subtractedValue", + type: "uint256", + }, + ], + name: "decreaseAllowance", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "spender", + type: "address", + }, + { + internalType: "uint256", + name: "addedValue", + type: "uint256", + }, + ], + name: "increaseAllowance", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "name", + outputs: [ + { + internalType: "string", + name: "", + type: "string", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "symbol", + outputs: [ + { + internalType: "string", + name: "", + type: "string", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "totalSupply", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "to", + type: "address", + }, + { + internalType: "uint256", + name: "amount", + type: "uint256", + }, + ], + name: "transfer", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "from", + type: "address", + }, + { + internalType: "address", + name: "to", + type: "address", + }, + { + internalType: "uint256", + name: "amount", + type: "uint256", + }, + ], + name: "transferFrom", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, +]; + +const _bytecode = + "0x60806040523480156200001157600080fd5b50604051620019eb380380620019eb833981810160405281019062000037919062000370565b6040518060400160405280600481526020017f5a657461000000000000000000000000000000000000000000000000000000008152506040518060400160405280600481526020017f5a455441000000000000000000000000000000000000000000000000000000008152508160039080519060200190620000bb929190620002a9565b508060049080519060200190620000d4929190620002a9565b5050506200011633620000ec6200011d60201b60201c565b60ff16600a620000fd9190620004e2565b836200010a91906200061f565b6200012660201b60201c565b5062000773565b60006012905090565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16141562000199576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016200019090620003da565b60405180910390fd5b620001ad600083836200029f60201b60201c565b8060026000828254620001c191906200042a565b92505081905550806000808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282546200021891906200042a565b925050819055508173ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040516200027f9190620003fc565b60405180910390a36200029b60008383620002a460201b60201c565b5050565b505050565b505050565b828054620002b7906200068a565b90600052602060002090601f016020900481019282620002db576000855562000327565b82601f10620002f657805160ff191683800117855562000327565b8280016001018555821562000327579182015b828111156200032657825182559160200191906001019062000309565b5b5090506200033691906200033a565b5090565b5b80821115620003555760008160009055506001016200033b565b5090565b6000815190506200036a8162000759565b92915050565b6000602082840312156200038957620003886200071e565b5b6000620003998482850162000359565b91505092915050565b6000620003b1601f8362000419565b9150620003be8262000730565b602082019050919050565b620003d48162000680565b82525050565b60006020820190508181036000830152620003f581620003a2565b9050919050565b6000602082019050620004136000830184620003c9565b92915050565b600082825260208201905092915050565b6000620004378262000680565b9150620004448362000680565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff038211156200047c576200047b620006c0565b5b828201905092915050565b6000808291508390505b6001851115620004d957808604811115620004b157620004b0620006c0565b5b6001851615620004c15780820291505b8081029050620004d18562000723565b945062000491565b94509492505050565b6000620004ef8262000680565b9150620004fc8362000680565b92506200052b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff848462000533565b905092915050565b60008262000545576001905062000618565b8162000555576000905062000618565b81600181146200056e57600281146200057957620005af565b600191505062000618565b60ff8411156200058e576200058d620006c0565b5b8360020a915084821115620005a857620005a7620006c0565b5b5062000618565b5060208310610133831016604e8410600b8410161715620005e95782820a905083811115620005e357620005e2620006c0565b5b62000618565b620005f8848484600162000487565b92509050818404811115620006125762000611620006c0565b5b81810290505b9392505050565b60006200062c8262000680565b9150620006398362000680565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0483118215151615620006755762000674620006c0565b5b828202905092915050565b6000819050919050565b60006002820490506001821680620006a357607f821691505b60208210811415620006ba57620006b9620006ef565b5b50919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b600080fd5b60008160011c9050919050565b7f45524332303a206d696e7420746f20746865207a65726f206164647265737300600082015250565b620007648162000680565b81146200077057600080fd5b50565b61126880620007836000396000f3fe608060405234801561001057600080fd5b50600436106100a95760003560e01c80633950935111610071578063395093511461016857806370a082311461019857806395d89b41146101c8578063a457c2d7146101e6578063a9059cbb14610216578063dd62ed3e14610246576100a9565b806306fdde03146100ae578063095ea7b3146100cc57806318160ddd146100fc57806323b872dd1461011a578063313ce5671461014a575b600080fd5b6100b6610276565b6040516100c39190610d29565b60405180910390f35b6100e660048036038101906100e19190610b73565b610308565b6040516100f39190610d0e565b60405180910390f35b61010461032b565b6040516101119190610e2b565b60405180910390f35b610134600480360381019061012f9190610b20565b610335565b6040516101419190610d0e565b60405180910390f35b610152610364565b60405161015f9190610e46565b60405180910390f35b610182600480360381019061017d9190610b73565b61036d565b60405161018f9190610d0e565b60405180910390f35b6101b260048036038101906101ad9190610ab3565b6103a4565b6040516101bf9190610e2b565b60405180910390f35b6101d06103ec565b6040516101dd9190610d29565b60405180910390f35b61020060048036038101906101fb9190610b73565b61047e565b60405161020d9190610d0e565b60405180910390f35b610230600480360381019061022b9190610b73565b6104f5565b60405161023d9190610d0e565b60405180910390f35b610260600480360381019061025b9190610ae0565b610518565b60405161026d9190610e2b565b60405180910390f35b60606003805461028590610f5b565b80601f01602080910402602001604051908101604052809291908181526020018280546102b190610f5b565b80156102fe5780601f106102d3576101008083540402835291602001916102fe565b820191906000526020600020905b8154815290600101906020018083116102e157829003601f168201915b5050505050905090565b60008061031361059f565b90506103208185856105a7565b600191505092915050565b6000600254905090565b60008061034061059f565b905061034d858285610772565b6103588585856107fe565b60019150509392505050565b60006012905090565b60008061037861059f565b905061039981858561038a8589610518565b6103949190610e7d565b6105a7565b600191505092915050565b60008060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b6060600480546103fb90610f5b565b80601f016020809104026020016040519081016040528092919081815260200182805461042790610f5b565b80156104745780601f1061044957610100808354040283529160200191610474565b820191906000526020600020905b81548152906001019060200180831161045757829003601f168201915b5050505050905090565b60008061048961059f565b905060006104978286610518565b9050838110156104dc576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016104d390610e0b565b60405180910390fd5b6104e982868684036105a7565b60019250505092915050565b60008061050061059f565b905061050d8185856107fe565b600191505092915050565b6000600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415610617576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161060e90610deb565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415610687576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161067e90610d6b565b60405180910390fd5b80600160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925836040516107659190610e2b565b60405180910390a3505050565b600061077e8484610518565b90507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff81146107f857818110156107ea576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016107e190610d8b565b60405180910390fd5b6107f784848484036105a7565b5b50505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16141561086e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161086590610dcb565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614156108de576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016108d590610d4b565b60405180910390fd5b6108e9838383610a7f565b60008060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205490508181101561096f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161096690610dab565b60405180910390fd5b8181036000808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550816000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254610a029190610e7d565b925050819055508273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef84604051610a669190610e2b565b60405180910390a3610a79848484610a84565b50505050565b505050565b505050565b600081359050610a9881611204565b92915050565b600081359050610aad8161121b565b92915050565b600060208284031215610ac957610ac8610feb565b5b6000610ad784828501610a89565b91505092915050565b60008060408385031215610af757610af6610feb565b5b6000610b0585828601610a89565b9250506020610b1685828601610a89565b9150509250929050565b600080600060608486031215610b3957610b38610feb565b5b6000610b4786828701610a89565b9350506020610b5886828701610a89565b9250506040610b6986828701610a9e565b9150509250925092565b60008060408385031215610b8a57610b89610feb565b5b6000610b9885828601610a89565b9250506020610ba985828601610a9e565b9150509250929050565b610bbc81610ee5565b82525050565b6000610bcd82610e61565b610bd78185610e6c565b9350610be7818560208601610f28565b610bf081610ff0565b840191505092915050565b6000610c08602383610e6c565b9150610c1382611001565b604082019050919050565b6000610c2b602283610e6c565b9150610c3682611050565b604082019050919050565b6000610c4e601d83610e6c565b9150610c598261109f565b602082019050919050565b6000610c71602683610e6c565b9150610c7c826110c8565b604082019050919050565b6000610c94602583610e6c565b9150610c9f82611117565b604082019050919050565b6000610cb7602483610e6c565b9150610cc282611166565b604082019050919050565b6000610cda602583610e6c565b9150610ce5826111b5565b604082019050919050565b610cf981610f11565b82525050565b610d0881610f1b565b82525050565b6000602082019050610d236000830184610bb3565b92915050565b60006020820190508181036000830152610d438184610bc2565b905092915050565b60006020820190508181036000830152610d6481610bfb565b9050919050565b60006020820190508181036000830152610d8481610c1e565b9050919050565b60006020820190508181036000830152610da481610c41565b9050919050565b60006020820190508181036000830152610dc481610c64565b9050919050565b60006020820190508181036000830152610de481610c87565b9050919050565b60006020820190508181036000830152610e0481610caa565b9050919050565b60006020820190508181036000830152610e2481610ccd565b9050919050565b6000602082019050610e406000830184610cf0565b92915050565b6000602082019050610e5b6000830184610cff565b92915050565b600081519050919050565b600082825260208201905092915050565b6000610e8882610f11565b9150610e9383610f11565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff03821115610ec857610ec7610f8d565b5b828201905092915050565b6000610ede82610ef1565b9050919050565b60008115159050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b600060ff82169050919050565b60005b83811015610f46578082015181840152602081019050610f2b565b83811115610f55576000848401525b50505050565b60006002820490506001821680610f7357607f821691505b60208210811415610f8757610f86610fbc565b5b50919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b600080fd5b6000601f19601f8301169050919050565b7f45524332303a207472616e7366657220746f20746865207a65726f206164647260008201527f6573730000000000000000000000000000000000000000000000000000000000602082015250565b7f45524332303a20617070726f766520746f20746865207a65726f20616464726560008201527f7373000000000000000000000000000000000000000000000000000000000000602082015250565b7f45524332303a20696e73756666696369656e7420616c6c6f77616e6365000000600082015250565b7f45524332303a207472616e7366657220616d6f756e742065786365656473206260008201527f616c616e63650000000000000000000000000000000000000000000000000000602082015250565b7f45524332303a207472616e736665722066726f6d20746865207a65726f20616460008201527f6472657373000000000000000000000000000000000000000000000000000000602082015250565b7f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460008201527f7265737300000000000000000000000000000000000000000000000000000000602082015250565b7f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f7760008201527f207a65726f000000000000000000000000000000000000000000000000000000602082015250565b61120d81610ed3565b811461121857600080fd5b50565b61122481610f11565b811461122f57600080fd5b5056fea26469706673582212209ae0cd235a6e914c58a7438ba7a501a39e146954d201dff4f02d4bdd3c3e329b64736f6c63430008070033"; + +type ZetaEthConstructorParams = + | [signer?: Signer] + | ConstructorParameters; + +const isSuperArgs = ( + xs: ZetaEthConstructorParams +): xs is ConstructorParameters => xs.length > 1; + +export class ZetaEth__factory extends ContractFactory { + constructor(...args: ZetaEthConstructorParams) { + if (isSuperArgs(args)) { + super(...args); + } else { + super(_abi, _bytecode, args[0]); + } + } + + override deploy( + initialSupply: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise { + return super.deploy(initialSupply, overrides || {}) as Promise; + } + override getDeployTransaction( + initialSupply: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): TransactionRequest { + return super.getDeployTransaction(initialSupply, overrides || {}); + } + override attach(address: string): ZetaEth { + return super.attach(address) as ZetaEth; + } + override connect(signer: Signer): ZetaEth__factory { + return super.connect(signer) as ZetaEth__factory; + } + + static readonly bytecode = _bytecode; + static readonly abi = _abi; + static createInterface(): ZetaEthInterface { + return new utils.Interface(_abi) as ZetaEthInterface; + } + static connect( + address: string, + signerOrProvider: Signer | Provider + ): ZetaEth { + return new Contract(address, _abi, signerOrProvider) as ZetaEth; + } +} diff --git a/packages/interfaces/typechain-types/factories/contracts/Zeta.eth.sol/index.ts b/packages/interfaces/typechain-types/factories/contracts/Zeta.eth.sol/index.ts new file mode 100644 index 00000000..b1334223 --- /dev/null +++ b/packages/interfaces/typechain-types/factories/contracts/Zeta.eth.sol/index.ts @@ -0,0 +1,4 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +export { ZetaEth__factory } from "./ZetaEth__factory"; diff --git a/packages/interfaces/typechain-types/factories/contracts/Zeta.non-eth.sol/ZetaNonEth__factory.ts b/packages/interfaces/typechain-types/factories/contracts/Zeta.non-eth.sol/ZetaNonEth__factory.ts new file mode 100644 index 00000000..371d991b --- /dev/null +++ b/packages/interfaces/typechain-types/factories/contracts/Zeta.non-eth.sol/ZetaNonEth__factory.ts @@ -0,0 +1,576 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import { Signer, utils, Contract, ContractFactory, Overrides } from "ethers"; +import type { Provider, TransactionRequest } from "@ethersproject/providers"; +import type { + ZetaNonEth, + ZetaNonEthInterface, +} from "../../../contracts/Zeta.non-eth.sol/ZetaNonEth"; + +const _abi = [ + { + inputs: [ + { + internalType: "address", + name: "tssAddress_", + type: "address", + }, + { + internalType: "address", + name: "tssAddressUpdater_", + type: "address", + }, + ], + stateMutability: "nonpayable", + type: "constructor", + }, + { + inputs: [ + { + internalType: "address", + name: "caller", + type: "address", + }, + ], + name: "CallerIsNotConnector", + type: "error", + }, + { + inputs: [ + { + internalType: "address", + name: "caller", + type: "address", + }, + ], + name: "CallerIsNotTss", + type: "error", + }, + { + inputs: [ + { + internalType: "address", + name: "caller", + type: "address", + }, + ], + name: "CallerIsNotTssOrUpdater", + type: "error", + }, + { + inputs: [ + { + internalType: "address", + name: "caller", + type: "address", + }, + ], + name: "CallerIsNotTssUpdater", + type: "error", + }, + { + inputs: [], + name: "InvalidAddress", + type: "error", + }, + { + inputs: [], + name: "ZetaTransferError", + type: "error", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "owner", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "spender", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "value", + type: "uint256", + }, + ], + name: "Approval", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "burnee", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "amount", + type: "uint256", + }, + ], + name: "Burnt", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "mintee", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "amount", + type: "uint256", + }, + { + indexed: true, + internalType: "bytes32", + name: "internalSendHash", + type: "bytes32", + }, + ], + name: "Minted", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "from", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "to", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "value", + type: "uint256", + }, + ], + name: "Transfer", + type: "event", + }, + { + inputs: [ + { + internalType: "address", + name: "owner", + type: "address", + }, + { + internalType: "address", + name: "spender", + type: "address", + }, + ], + name: "allowance", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "spender", + type: "address", + }, + { + internalType: "uint256", + name: "amount", + type: "uint256", + }, + ], + name: "approve", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "account", + type: "address", + }, + ], + name: "balanceOf", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "amount", + type: "uint256", + }, + ], + name: "burn", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "account", + type: "address", + }, + { + internalType: "uint256", + name: "amount", + type: "uint256", + }, + ], + name: "burnFrom", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "connectorAddress", + outputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "decimals", + outputs: [ + { + internalType: "uint8", + name: "", + type: "uint8", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "spender", + type: "address", + }, + { + internalType: "uint256", + name: "subtractedValue", + type: "uint256", + }, + ], + name: "decreaseAllowance", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "spender", + type: "address", + }, + { + internalType: "uint256", + name: "addedValue", + type: "uint256", + }, + ], + name: "increaseAllowance", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "mintee", + type: "address", + }, + { + internalType: "uint256", + name: "value", + type: "uint256", + }, + { + internalType: "bytes32", + name: "internalSendHash", + type: "bytes32", + }, + ], + name: "mint", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "name", + outputs: [ + { + internalType: "string", + name: "", + type: "string", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "renounceTssAddressUpdater", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "symbol", + outputs: [ + { + internalType: "string", + name: "", + type: "string", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "totalSupply", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "to", + type: "address", + }, + { + internalType: "uint256", + name: "amount", + type: "uint256", + }, + ], + name: "transfer", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "from", + type: "address", + }, + { + internalType: "address", + name: "to", + type: "address", + }, + { + internalType: "uint256", + name: "amount", + type: "uint256", + }, + ], + name: "transferFrom", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "tssAddress", + outputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "tssAddressUpdater", + outputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "tssAddress_", + type: "address", + }, + { + internalType: "address", + name: "connectorAddress_", + type: "address", + }, + ], + name: "updateTssAndConnectorAddresses", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, +]; + +const _bytecode = + "0x60806040523480156200001157600080fd5b506040516200237c3803806200237c8339818101604052810190620000379190620002c8565b6040518060400160405280600481526020017f5a657461000000000000000000000000000000000000000000000000000000008152506040518060400160405280600481526020017f5a455441000000000000000000000000000000000000000000000000000000008152508160039080519060200190620000bb92919062000201565b508060049080519060200190620000d492919062000201565b505050600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614806200013f5750600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16145b1562000177576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b81600660006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555080600760006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505050620003c7565b8280546200020f9062000343565b90600052602060002090601f0160209004810192826200023357600085556200027f565b82601f106200024e57805160ff19168380011785556200027f565b828001600101855582156200027f579182015b828111156200027e57825182559160200191906001019062000261565b5b5090506200028e919062000292565b5090565b5b80821115620002ad57600081600090555060010162000293565b5090565b600081519050620002c281620003ad565b92915050565b60008060408385031215620002e257620002e1620003a8565b5b6000620002f285828601620002b1565b92505060206200030585828601620002b1565b9150509250929050565b60006200031c8262000323565b9050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600060028204905060018216806200035c57607f821691505b6020821081141562000373576200037262000379565b5b50919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b600080fd5b620003b8816200030f565b8114620003c457600080fd5b50565b611fa580620003d76000396000f3fe608060405234801561001057600080fd5b50600436106101215760003560e01c806342966c68116100ad57806395d89b411161007157806395d89b41146102f6578063a457c2d714610314578063a9059cbb14610344578063bff9662a14610374578063dd62ed3e1461039257610121565b806342966c68146102665780635b1125911461028257806370a08231146102a0578063779e3b63146102d057806379cc6790146102da57610121565b80631e458bee116100f45780631e458bee146101ae57806323b872dd146101ca578063313ce567146101fa578063328a01d014610218578063395093511461023657610121565b806306fdde0314610126578063095ea7b31461014457806315d57fd41461017457806318160ddd14610190575b600080fd5b61012e6103c2565b60405161013b91906118ea565b60405180910390f35b61015e60048036038101906101599190611621565b610454565b60405161016b91906118cf565b60405180910390f35b61018e6004803603810190610189919061158e565b610477565b005b610198610689565b6040516101a59190611a4c565b60405180910390f35b6101c860048036038101906101c39190611661565b610693565b005b6101e460048036038101906101df91906115ce565b610783565b6040516101f191906118cf565b60405180910390f35b6102026107b2565b60405161020f9190611a67565b60405180910390f35b6102206107bb565b60405161022d91906118b4565b60405180910390f35b610250600480360381019061024b9190611621565b6107e1565b60405161025d91906118cf565b60405180910390f35b610280600480360381019061027b91906116b4565b610818565b005b61028a61082c565b60405161029791906118b4565b60405180910390f35b6102ba60048036038101906102b59190611561565b610852565b6040516102c79190611a4c565b60405180910390f35b6102d861089a565b005b6102f460048036038101906102ef9190611621565b610a1a565b005b6102fe610b08565b60405161030b91906118ea565b60405180910390f35b61032e60048036038101906103299190611621565b610b9a565b60405161033b91906118cf565b60405180910390f35b61035e60048036038101906103599190611621565b610c11565b60405161036b91906118cf565b60405180910390f35b61037c610c34565b60405161038991906118b4565b60405180910390f35b6103ac60048036038101906103a7919061158e565b610c5a565b6040516103b99190611a4c565b60405180910390f35b6060600380546103d190611bba565b80601f01602080910402602001604051908101604052809291908181526020018280546103fd90611bba565b801561044a5780601f1061041f5761010080835404028352916020019161044a565b820191906000526020600020905b81548152906001019060200180831161042d57829003601f168201915b5050505050905090565b60008061045f610ce1565b905061046c818585610ce9565b600191505092915050565b600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141580156105235750600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614155b1561056557336040517fcdfcef9700000000000000000000000000000000000000000000000000000000815260040161055c91906118b4565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614806105cc5750600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16145b15610603576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b81600660006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555080600560006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505050565b6000600254905090565b600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461072557336040517f3fe32fba00000000000000000000000000000000000000000000000000000000815260040161071c91906118b4565b60405180910390fd5b61072f8383610eb4565b808373ffffffffffffffffffffffffffffffffffffffff167fc263b302aec62d29105026245f19e16f8e0137066ccd4a8bd941f716bd4096bb846040516107769190611a4c565b60405180910390a3505050565b60008061078e610ce1565b905061079b858285611014565b6107a68585856110a0565b60019150509392505050565b60006012905090565b600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000806107ec610ce1565b905061080d8185856107fe8589610c5a565b6108089190611a9e565b610ce9565b600191505092915050565b610829610823610ce1565b82611321565b50565b600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60008060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461092c57336040517fe700765e00000000000000000000000000000000000000000000000000000000815260040161092391906118b4565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff16600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614156109b5576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16600760006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610aac57336040517f3fe32fba000000000000000000000000000000000000000000000000000000008152600401610aa391906118b4565b60405180910390fd5b610ab682826114f8565b8173ffffffffffffffffffffffffffffffffffffffff167f919f7e2092ffcc9d09f599be18d8152860b0c054df788a33bc549cdd9d0f15b182604051610afc9190611a4c565b60405180910390a25050565b606060048054610b1790611bba565b80601f0160208091040260200160405190810160405280929190818152602001828054610b4390611bba565b8015610b905780601f10610b6557610100808354040283529160200191610b90565b820191906000526020600020905b815481529060010190602001808311610b7357829003601f168201915b5050505050905090565b600080610ba5610ce1565b90506000610bb38286610c5a565b905083811015610bf8576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610bef90611a0c565b60405180910390fd5b610c058286868403610ce9565b60019250505092915050565b600080610c1c610ce1565b9050610c298185856110a0565b600191505092915050565b600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415610d59576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610d50906119ec565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415610dc9576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610dc09061194c565b60405180910390fd5b80600160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92583604051610ea79190611a4c565b60405180910390a3505050565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415610f24576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610f1b90611a2c565b60405180910390fd5b610f3060008383611518565b8060026000828254610f429190611a9e565b92505081905550806000808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254610f979190611a9e565b925050819055508173ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef83604051610ffc9190611a4c565b60405180910390a36110106000838361151d565b5050565b60006110208484610c5a565b90507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff811461109a578181101561108c576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016110839061196c565b60405180910390fd5b6110998484848403610ce9565b5b50505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415611110576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611107906119cc565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611180576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016111779061190c565b60405180910390fd5b61118b838383611518565b60008060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905081811015611211576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016112089061198c565b60405180910390fd5b8181036000808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550816000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282546112a49190611a9e565b925050819055508273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040516113089190611a4c565b60405180910390a361131b84848461151d565b50505050565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611391576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611388906119ac565b60405180910390fd5b61139d82600083611518565b60008060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905081811015611423576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161141a9061192c565b60405180910390fd5b8181036000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550816002600082825461147a9190611af4565b92505081905550600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040516114df9190611a4c565b60405180910390a36114f38360008461151d565b505050565b61150a82611504610ce1565b83611014565b6115148282611321565b5050565b505050565b505050565b60008135905061153181611f2a565b92915050565b60008135905061154681611f41565b92915050565b60008135905061155b81611f58565b92915050565b60006020828403121561157757611576611c4a565b5b600061158584828501611522565b91505092915050565b600080604083850312156115a5576115a4611c4a565b5b60006115b385828601611522565b92505060206115c485828601611522565b9150509250929050565b6000806000606084860312156115e7576115e6611c4a565b5b60006115f586828701611522565b935050602061160686828701611522565b92505060406116178682870161154c565b9150509250925092565b6000806040838503121561163857611637611c4a565b5b600061164685828601611522565b92505060206116578582860161154c565b9150509250929050565b60008060006060848603121561167a57611679611c4a565b5b600061168886828701611522565b93505060206116998682870161154c565b92505060406116aa86828701611537565b9150509250925092565b6000602082840312156116ca576116c9611c4a565b5b60006116d88482850161154c565b91505092915050565b6116ea81611b28565b82525050565b6116f981611b3a565b82525050565b600061170a82611a82565b6117148185611a8d565b9350611724818560208601611b87565b61172d81611c4f565b840191505092915050565b6000611745602383611a8d565b915061175082611c60565b604082019050919050565b6000611768602283611a8d565b915061177382611caf565b604082019050919050565b600061178b602283611a8d565b915061179682611cfe565b604082019050919050565b60006117ae601d83611a8d565b91506117b982611d4d565b602082019050919050565b60006117d1602683611a8d565b91506117dc82611d76565b604082019050919050565b60006117f4602183611a8d565b91506117ff82611dc5565b604082019050919050565b6000611817602583611a8d565b915061182282611e14565b604082019050919050565b600061183a602483611a8d565b915061184582611e63565b604082019050919050565b600061185d602583611a8d565b915061186882611eb2565b604082019050919050565b6000611880601f83611a8d565b915061188b82611f01565b602082019050919050565b61189f81611b70565b82525050565b6118ae81611b7a565b82525050565b60006020820190506118c960008301846116e1565b92915050565b60006020820190506118e460008301846116f0565b92915050565b6000602082019050818103600083015261190481846116ff565b905092915050565b6000602082019050818103600083015261192581611738565b9050919050565b600060208201905081810360008301526119458161175b565b9050919050565b600060208201905081810360008301526119658161177e565b9050919050565b60006020820190508181036000830152611985816117a1565b9050919050565b600060208201905081810360008301526119a5816117c4565b9050919050565b600060208201905081810360008301526119c5816117e7565b9050919050565b600060208201905081810360008301526119e58161180a565b9050919050565b60006020820190508181036000830152611a058161182d565b9050919050565b60006020820190508181036000830152611a2581611850565b9050919050565b60006020820190508181036000830152611a4581611873565b9050919050565b6000602082019050611a616000830184611896565b92915050565b6000602082019050611a7c60008301846118a5565b92915050565b600081519050919050565b600082825260208201905092915050565b6000611aa982611b70565b9150611ab483611b70565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff03821115611ae957611ae8611bec565b5b828201905092915050565b6000611aff82611b70565b9150611b0a83611b70565b925082821015611b1d57611b1c611bec565b5b828203905092915050565b6000611b3382611b50565b9050919050565b60008115159050919050565b6000819050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b600060ff82169050919050565b60005b83811015611ba5578082015181840152602081019050611b8a565b83811115611bb4576000848401525b50505050565b60006002820490506001821680611bd257607f821691505b60208210811415611be657611be5611c1b565b5b50919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b600080fd5b6000601f19601f8301169050919050565b7f45524332303a207472616e7366657220746f20746865207a65726f206164647260008201527f6573730000000000000000000000000000000000000000000000000000000000602082015250565b7f45524332303a206275726e20616d6f756e7420657863656564732062616c616e60008201527f6365000000000000000000000000000000000000000000000000000000000000602082015250565b7f45524332303a20617070726f766520746f20746865207a65726f20616464726560008201527f7373000000000000000000000000000000000000000000000000000000000000602082015250565b7f45524332303a20696e73756666696369656e7420616c6c6f77616e6365000000600082015250565b7f45524332303a207472616e7366657220616d6f756e742065786365656473206260008201527f616c616e63650000000000000000000000000000000000000000000000000000602082015250565b7f45524332303a206275726e2066726f6d20746865207a65726f2061646472657360008201527f7300000000000000000000000000000000000000000000000000000000000000602082015250565b7f45524332303a207472616e736665722066726f6d20746865207a65726f20616460008201527f6472657373000000000000000000000000000000000000000000000000000000602082015250565b7f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460008201527f7265737300000000000000000000000000000000000000000000000000000000602082015250565b7f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f7760008201527f207a65726f000000000000000000000000000000000000000000000000000000602082015250565b7f45524332303a206d696e7420746f20746865207a65726f206164647265737300600082015250565b611f3381611b28565b8114611f3e57600080fd5b50565b611f4a81611b46565b8114611f5557600080fd5b50565b611f6181611b70565b8114611f6c57600080fd5b5056fea264697066735822122008f6e523d84c166be747205bdbde5d8ba13c478304202ab40df209426973ae7564736f6c63430008070033"; + +type ZetaNonEthConstructorParams = + | [signer?: Signer] + | ConstructorParameters; + +const isSuperArgs = ( + xs: ZetaNonEthConstructorParams +): xs is ConstructorParameters => xs.length > 1; + +export class ZetaNonEth__factory extends ContractFactory { + constructor(...args: ZetaNonEthConstructorParams) { + if (isSuperArgs(args)) { + super(...args); + } else { + super(_abi, _bytecode, args[0]); + } + } + + override deploy( + tssAddress_: string, + tssAddressUpdater_: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise { + return super.deploy( + tssAddress_, + tssAddressUpdater_, + overrides || {} + ) as Promise; + } + override getDeployTransaction( + tssAddress_: string, + tssAddressUpdater_: string, + overrides?: Overrides & { from?: string | Promise } + ): TransactionRequest { + return super.getDeployTransaction( + tssAddress_, + tssAddressUpdater_, + overrides || {} + ); + } + override attach(address: string): ZetaNonEth { + return super.attach(address) as ZetaNonEth; + } + override connect(signer: Signer): ZetaNonEth__factory { + return super.connect(signer) as ZetaNonEth__factory; + } + + static readonly bytecode = _bytecode; + static readonly abi = _abi; + static createInterface(): ZetaNonEthInterface { + return new utils.Interface(_abi) as ZetaNonEthInterface; + } + static connect( + address: string, + signerOrProvider: Signer | Provider + ): ZetaNonEth { + return new Contract(address, _abi, signerOrProvider) as ZetaNonEth; + } +} diff --git a/packages/interfaces/typechain-types/factories/contracts/Zeta.non-eth.sol/index.ts b/packages/interfaces/typechain-types/factories/contracts/Zeta.non-eth.sol/index.ts new file mode 100644 index 00000000..3f68b234 --- /dev/null +++ b/packages/interfaces/typechain-types/factories/contracts/Zeta.non-eth.sol/index.ts @@ -0,0 +1,4 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +export { ZetaNonEth__factory } from "./ZetaNonEth__factory"; diff --git a/packages/interfaces/typechain-types/factories/contracts/ZetaConnector.base.sol/ZetaConnectorBase__factory.ts b/packages/interfaces/typechain-types/factories/contracts/ZetaConnector.base.sol/ZetaConnectorBase__factory.ts new file mode 100644 index 00000000..5ce9f984 --- /dev/null +++ b/packages/interfaces/typechain-types/factories/contracts/ZetaConnector.base.sol/ZetaConnectorBase__factory.ts @@ -0,0 +1,622 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import { Signer, utils, Contract, ContractFactory, Overrides } from "ethers"; +import type { Provider, TransactionRequest } from "@ethersproject/providers"; +import type { + ZetaConnectorBase, + ZetaConnectorBaseInterface, +} from "../../../contracts/ZetaConnector.base.sol/ZetaConnectorBase"; + +const _abi = [ + { + inputs: [ + { + internalType: "address", + name: "zetaToken_", + type: "address", + }, + { + internalType: "address", + name: "tssAddress_", + type: "address", + }, + { + internalType: "address", + name: "tssAddressUpdater_", + type: "address", + }, + { + internalType: "address", + name: "pauserAddress_", + type: "address", + }, + ], + stateMutability: "nonpayable", + type: "constructor", + }, + { + inputs: [ + { + internalType: "address", + name: "caller", + type: "address", + }, + ], + name: "CallerIsNotPauser", + type: "error", + }, + { + inputs: [ + { + internalType: "address", + name: "caller", + type: "address", + }, + ], + name: "CallerIsNotTss", + type: "error", + }, + { + inputs: [ + { + internalType: "address", + name: "caller", + type: "address", + }, + ], + name: "CallerIsNotTssOrUpdater", + type: "error", + }, + { + inputs: [ + { + internalType: "address", + name: "caller", + type: "address", + }, + ], + name: "CallerIsNotTssUpdater", + type: "error", + }, + { + inputs: [ + { + internalType: "uint256", + name: "maxSupply", + type: "uint256", + }, + ], + name: "ExceedsMaxSupply", + type: "error", + }, + { + inputs: [], + name: "InvalidAddress", + type: "error", + }, + { + inputs: [], + name: "ZetaTransferError", + type: "error", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "address", + name: "account", + type: "address", + }, + ], + name: "Paused", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "address", + name: "updaterAddress", + type: "address", + }, + { + indexed: false, + internalType: "address", + name: "newTssAddress", + type: "address", + }, + ], + name: "PauserAddressUpdated", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "address", + name: "zetaTxSenderAddress", + type: "address", + }, + { + indexed: false, + internalType: "address", + name: "newTssAddress", + type: "address", + }, + ], + name: "TSSAddressUpdated", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "address", + name: "account", + type: "address", + }, + ], + name: "Unpaused", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "bytes", + name: "zetaTxSenderAddress", + type: "bytes", + }, + { + indexed: true, + internalType: "uint256", + name: "sourceChainId", + type: "uint256", + }, + { + indexed: true, + internalType: "address", + name: "destinationAddress", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "zetaValueAndGas", + type: "uint256", + }, + { + indexed: false, + internalType: "bytes", + name: "message", + type: "bytes", + }, + { + indexed: true, + internalType: "bytes32", + name: "internalSendHash", + type: "bytes32", + }, + ], + name: "ZetaReceived", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "address", + name: "zetaTxSenderAddress", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "sourceChainId", + type: "uint256", + }, + { + indexed: true, + internalType: "uint256", + name: "destinationChainId", + type: "uint256", + }, + { + indexed: true, + internalType: "bytes", + name: "destinationAddress", + type: "bytes", + }, + { + indexed: false, + internalType: "uint256", + name: "zetaValueAndGas", + type: "uint256", + }, + { + indexed: false, + internalType: "bytes", + name: "message", + type: "bytes", + }, + { + indexed: true, + internalType: "bytes32", + name: "internalSendHash", + type: "bytes32", + }, + ], + name: "ZetaReverted", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "address", + name: "sourceTxOriginAddress", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "zetaTxSenderAddress", + type: "address", + }, + { + indexed: true, + internalType: "uint256", + name: "destinationChainId", + type: "uint256", + }, + { + indexed: true, + internalType: "bytes", + name: "destinationAddress", + type: "bytes", + }, + { + indexed: false, + internalType: "uint256", + name: "zetaValueAndGas", + type: "uint256", + }, + { + indexed: false, + internalType: "uint256", + name: "destinationGasLimit", + type: "uint256", + }, + { + indexed: false, + internalType: "bytes", + name: "message", + type: "bytes", + }, + { + indexed: false, + internalType: "bytes", + name: "zetaParams", + type: "bytes", + }, + ], + name: "ZetaSent", + type: "event", + }, + { + inputs: [ + { + internalType: "bytes", + name: "zetaTxSenderAddress", + type: "bytes", + }, + { + internalType: "uint256", + name: "sourceChainId", + type: "uint256", + }, + { + internalType: "address", + name: "destinationAddress", + type: "address", + }, + { + internalType: "uint256", + name: "zetaValueAndGas", + type: "uint256", + }, + { + internalType: "bytes", + name: "message", + type: "bytes", + }, + { + internalType: "bytes32", + name: "internalSendHash", + type: "bytes32", + }, + ], + name: "onReceive", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "zetaTxSenderAddress", + type: "address", + }, + { + internalType: "uint256", + name: "sourceChainId", + type: "uint256", + }, + { + internalType: "bytes", + name: "destinationAddress", + type: "bytes", + }, + { + internalType: "uint256", + name: "destinationChainId", + type: "uint256", + }, + { + internalType: "uint256", + name: "zetaValueAndGas", + type: "uint256", + }, + { + internalType: "bytes", + name: "message", + type: "bytes", + }, + { + internalType: "bytes32", + name: "internalSendHash", + type: "bytes32", + }, + ], + name: "onRevert", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "pause", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "paused", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "pauserAddress", + outputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "renounceTssAddressUpdater", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + components: [ + { + internalType: "uint256", + name: "destinationChainId", + type: "uint256", + }, + { + internalType: "bytes", + name: "destinationAddress", + type: "bytes", + }, + { + internalType: "uint256", + name: "destinationGasLimit", + type: "uint256", + }, + { + internalType: "bytes", + name: "message", + type: "bytes", + }, + { + internalType: "uint256", + name: "zetaValueAndGas", + type: "uint256", + }, + { + internalType: "bytes", + name: "zetaParams", + type: "bytes", + }, + ], + internalType: "struct ZetaInterfaces.SendInput", + name: "input", + type: "tuple", + }, + ], + name: "send", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "tssAddress", + outputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "tssAddressUpdater", + outputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "unpause", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "pauserAddress_", + type: "address", + }, + ], + name: "updatePauserAddress", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "tssAddress_", + type: "address", + }, + ], + name: "updateTssAddress", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "zetaToken", + outputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, +]; + +const _bytecode = + "0x60a06040523480156200001157600080fd5b50604051620012af380380620012af83398181016040528101906200003791906200027c565b60008060006101000a81548160ff021916908315150217905550600073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff161480620000b95750600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16145b80620000f15750600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16145b80620001295750600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16145b1562000161576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8373ffffffffffffffffffffffffffffffffffffffff1660808173ffffffffffffffffffffffffffffffffffffffff1660601b8152505082600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555081600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555080600060016101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505050505062000341565b600081519050620002768162000327565b92915050565b6000806000806080858703121562000299576200029862000322565b5b6000620002a98782880162000265565b9450506020620002bc8782880162000265565b9350506040620002cf8782880162000265565b9250506060620002e28782880162000265565b91505092959194509250565b6000620002fb8262000302565b9050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600080fd5b6200033281620002ee565b81146200033e57600080fd5b50565b60805160601c610f4f6200036060003960006102160152610f4f6000f3fe608060405234801561001057600080fd5b50600436106100cf5760003560e01c80636128480f1161008c5780639122c344116100665780639122c344146101a2578063942a5e16146101be578063ec026901146101da578063f7fb869b146101f6576100cf565b80636128480f14610172578063779e3b631461018e5780638456cb5914610198576100cf565b806321e093b1146100d457806329dd214d146100f2578063328a01d01461010e5780633f4ba83a1461012c5780635b112591146101365780635c975abb14610154575b600080fd5b6100dc610214565b6040516100e99190610d62565b60405180910390f35b61010c60048036038101906101079190610be6565b610238565b005b610116610242565b6040516101239190610d62565b60405180910390f35b610134610268565b005b61013e610304565b60405161014b9190610d62565b60405180910390f35b61015c61032a565b6040516101699190610da6565b60405180910390f35b61018c60048036038101906101879190610ad7565b610340565b005b6101966104b6565b005b6101a0610636565b005b6101bc60048036038101906101b79190610ad7565b6106d2565b005b6101d860048036038101906101d39190610b04565b6108a4565b005b6101f460048036038101906101ef9190610cb5565b6108af565b005b6101fe6108b2565b60405161020b9190610d62565b60405180910390f35b7f000000000000000000000000000000000000000000000000000000000000000081565b5050505050505050565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146102fa57336040517f4677a0d30000000000000000000000000000000000000000000000000000000081526004016102f19190610d62565b60405180910390fd5b6103026108d8565b565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60008060009054906101000a900460ff16905090565b600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146103d257336040517f4677a0d30000000000000000000000000000000000000000000000000000000081526004016103c99190610d62565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415610439576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b80600060016101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055507fd41d83655d484bdf299598751c371b2d92088667266fe3774b25a97bdd5d039733826040516104ab929190610d7d565b60405180910390a150565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461054857336040517fe700765e00000000000000000000000000000000000000000000000000000000815260040161053f9190610d62565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff16600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614156105d1576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146106c857336040517f4677a0d30000000000000000000000000000000000000000000000000000000081526004016106bf9190610d62565b60405180910390fd5b6106d0610979565b565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415801561077e5750600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614155b156107c057336040517fcdfcef970000000000000000000000000000000000000000000000000000000081526004016107b79190610d62565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415610827576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b80600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055507fe79965b5c67dcfb2cf5fe152715e4a7256cee62a3d5dd8484fd8a8539eb8beff3382604051610899929190610d7d565b60405180910390a150565b505050505050505050565b50565b600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6108e061032a565b61091f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161091690610dc1565b60405180910390fd5b60008060006101000a81548160ff0219169083151502179055507f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa610962610a1b565b60405161096f9190610d62565b60405180910390a1565b61098161032a565b156109c1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016109b890610de1565b60405180910390fd5b60016000806101000a81548160ff0219169083151502179055507f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258610a04610a1b565b604051610a119190610d62565b60405180910390a1565b600033905090565b600081359050610a3281610ed4565b92915050565b600081359050610a4781610eeb565b92915050565b60008083601f840112610a6357610a62610e69565b5b8235905067ffffffffffffffff811115610a8057610a7f610e64565b5b602083019150836001820283011115610a9c57610a9b610e73565b5b9250929050565b600060c08284031215610ab957610ab8610e6e565b5b81905092915050565b600081359050610ad181610f02565b92915050565b600060208284031215610aed57610aec610e7d565b5b6000610afb84828501610a23565b91505092915050565b600080600080600080600080600060e08a8c031215610b2657610b25610e7d565b5b6000610b348c828d01610a23565b9950506020610b458c828d01610ac2565b98505060408a013567ffffffffffffffff811115610b6657610b65610e78565b5b610b728c828d01610a4d565b97509750506060610b858c828d01610ac2565b9550506080610b968c828d01610ac2565b94505060a08a013567ffffffffffffffff811115610bb757610bb6610e78565b5b610bc38c828d01610a4d565b935093505060c0610bd68c828d01610a38565b9150509295985092959850929598565b60008060008060008060008060c0898b031215610c0657610c05610e7d565b5b600089013567ffffffffffffffff811115610c2457610c23610e78565b5b610c308b828c01610a4d565b98509850506020610c438b828c01610ac2565b9650506040610c548b828c01610a23565b9550506060610c658b828c01610ac2565b945050608089013567ffffffffffffffff811115610c8657610c85610e78565b5b610c928b828c01610a4d565b935093505060a0610ca58b828c01610a38565b9150509295985092959890939650565b600060208284031215610ccb57610cca610e7d565b5b600082013567ffffffffffffffff811115610ce957610ce8610e78565b5b610cf584828501610aa3565b91505092915050565b610d0781610e12565b82525050565b610d1681610e24565b82525050565b6000610d29601483610e01565b9150610d3482610e82565b602082019050919050565b6000610d4c601083610e01565b9150610d5782610eab565b602082019050919050565b6000602082019050610d776000830184610cfe565b92915050565b6000604082019050610d926000830185610cfe565b610d9f6020830184610cfe565b9392505050565b6000602082019050610dbb6000830184610d0d565b92915050565b60006020820190508181036000830152610dda81610d1c565b9050919050565b60006020820190508181036000830152610dfa81610d3f565b9050919050565b600082825260208201905092915050565b6000610e1d82610e3a565b9050919050565b60008115159050919050565b6000819050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b7f5061757361626c653a206e6f7420706175736564000000000000000000000000600082015250565b7f5061757361626c653a2070617573656400000000000000000000000000000000600082015250565b610edd81610e12565b8114610ee857600080fd5b50565b610ef481610e30565b8114610eff57600080fd5b50565b610f0b81610e5a565b8114610f1657600080fd5b5056fea2646970667358221220de903853a44092e97d56ad3b39809eeb20167189f834139b7847d3eaa0565a7664736f6c63430008070033"; + +type ZetaConnectorBaseConstructorParams = + | [signer?: Signer] + | ConstructorParameters; + +const isSuperArgs = ( + xs: ZetaConnectorBaseConstructorParams +): xs is ConstructorParameters => xs.length > 1; + +export class ZetaConnectorBase__factory extends ContractFactory { + constructor(...args: ZetaConnectorBaseConstructorParams) { + if (isSuperArgs(args)) { + super(...args); + } else { + super(_abi, _bytecode, args[0]); + } + } + + override deploy( + zetaToken_: string, + tssAddress_: string, + tssAddressUpdater_: string, + pauserAddress_: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise { + return super.deploy( + zetaToken_, + tssAddress_, + tssAddressUpdater_, + pauserAddress_, + overrides || {} + ) as Promise; + } + override getDeployTransaction( + zetaToken_: string, + tssAddress_: string, + tssAddressUpdater_: string, + pauserAddress_: string, + overrides?: Overrides & { from?: string | Promise } + ): TransactionRequest { + return super.getDeployTransaction( + zetaToken_, + tssAddress_, + tssAddressUpdater_, + pauserAddress_, + overrides || {} + ); + } + override attach(address: string): ZetaConnectorBase { + return super.attach(address) as ZetaConnectorBase; + } + override connect(signer: Signer): ZetaConnectorBase__factory { + return super.connect(signer) as ZetaConnectorBase__factory; + } + + static readonly bytecode = _bytecode; + static readonly abi = _abi; + static createInterface(): ZetaConnectorBaseInterface { + return new utils.Interface(_abi) as ZetaConnectorBaseInterface; + } + static connect( + address: string, + signerOrProvider: Signer | Provider + ): ZetaConnectorBase { + return new Contract(address, _abi, signerOrProvider) as ZetaConnectorBase; + } +} diff --git a/packages/interfaces/typechain-types/factories/contracts/ZetaConnector.base.sol/index.ts b/packages/interfaces/typechain-types/factories/contracts/ZetaConnector.base.sol/index.ts new file mode 100644 index 00000000..8144ec28 --- /dev/null +++ b/packages/interfaces/typechain-types/factories/contracts/ZetaConnector.base.sol/index.ts @@ -0,0 +1,4 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +export { ZetaConnectorBase__factory } from "./ZetaConnectorBase__factory"; diff --git a/packages/interfaces/typechain-types/factories/contracts/ZetaConnector.eth.sol/ZetaConnectorEth__factory.ts b/packages/interfaces/typechain-types/factories/contracts/ZetaConnector.eth.sol/ZetaConnectorEth__factory.ts new file mode 100644 index 00000000..2a7d5d6b --- /dev/null +++ b/packages/interfaces/typechain-types/factories/contracts/ZetaConnector.eth.sol/ZetaConnectorEth__factory.ts @@ -0,0 +1,635 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import { Signer, utils, Contract, ContractFactory, Overrides } from "ethers"; +import type { Provider, TransactionRequest } from "@ethersproject/providers"; +import type { + ZetaConnectorEth, + ZetaConnectorEthInterface, +} from "../../../contracts/ZetaConnector.eth.sol/ZetaConnectorEth"; + +const _abi = [ + { + inputs: [ + { + internalType: "address", + name: "zetaToken_", + type: "address", + }, + { + internalType: "address", + name: "tssAddress_", + type: "address", + }, + { + internalType: "address", + name: "tssAddressUpdater_", + type: "address", + }, + { + internalType: "address", + name: "pauserAddress_", + type: "address", + }, + ], + stateMutability: "nonpayable", + type: "constructor", + }, + { + inputs: [ + { + internalType: "address", + name: "caller", + type: "address", + }, + ], + name: "CallerIsNotPauser", + type: "error", + }, + { + inputs: [ + { + internalType: "address", + name: "caller", + type: "address", + }, + ], + name: "CallerIsNotTss", + type: "error", + }, + { + inputs: [ + { + internalType: "address", + name: "caller", + type: "address", + }, + ], + name: "CallerIsNotTssOrUpdater", + type: "error", + }, + { + inputs: [ + { + internalType: "address", + name: "caller", + type: "address", + }, + ], + name: "CallerIsNotTssUpdater", + type: "error", + }, + { + inputs: [ + { + internalType: "uint256", + name: "maxSupply", + type: "uint256", + }, + ], + name: "ExceedsMaxSupply", + type: "error", + }, + { + inputs: [], + name: "InvalidAddress", + type: "error", + }, + { + inputs: [], + name: "ZetaTransferError", + type: "error", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "address", + name: "account", + type: "address", + }, + ], + name: "Paused", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "address", + name: "updaterAddress", + type: "address", + }, + { + indexed: false, + internalType: "address", + name: "newTssAddress", + type: "address", + }, + ], + name: "PauserAddressUpdated", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "address", + name: "zetaTxSenderAddress", + type: "address", + }, + { + indexed: false, + internalType: "address", + name: "newTssAddress", + type: "address", + }, + ], + name: "TSSAddressUpdated", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "address", + name: "account", + type: "address", + }, + ], + name: "Unpaused", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "bytes", + name: "zetaTxSenderAddress", + type: "bytes", + }, + { + indexed: true, + internalType: "uint256", + name: "sourceChainId", + type: "uint256", + }, + { + indexed: true, + internalType: "address", + name: "destinationAddress", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "zetaValueAndGas", + type: "uint256", + }, + { + indexed: false, + internalType: "bytes", + name: "message", + type: "bytes", + }, + { + indexed: true, + internalType: "bytes32", + name: "internalSendHash", + type: "bytes32", + }, + ], + name: "ZetaReceived", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "address", + name: "zetaTxSenderAddress", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "sourceChainId", + type: "uint256", + }, + { + indexed: true, + internalType: "uint256", + name: "destinationChainId", + type: "uint256", + }, + { + indexed: true, + internalType: "bytes", + name: "destinationAddress", + type: "bytes", + }, + { + indexed: false, + internalType: "uint256", + name: "zetaValueAndGas", + type: "uint256", + }, + { + indexed: false, + internalType: "bytes", + name: "message", + type: "bytes", + }, + { + indexed: true, + internalType: "bytes32", + name: "internalSendHash", + type: "bytes32", + }, + ], + name: "ZetaReverted", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "address", + name: "sourceTxOriginAddress", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "zetaTxSenderAddress", + type: "address", + }, + { + indexed: true, + internalType: "uint256", + name: "destinationChainId", + type: "uint256", + }, + { + indexed: true, + internalType: "bytes", + name: "destinationAddress", + type: "bytes", + }, + { + indexed: false, + internalType: "uint256", + name: "zetaValueAndGas", + type: "uint256", + }, + { + indexed: false, + internalType: "uint256", + name: "destinationGasLimit", + type: "uint256", + }, + { + indexed: false, + internalType: "bytes", + name: "message", + type: "bytes", + }, + { + indexed: false, + internalType: "bytes", + name: "zetaParams", + type: "bytes", + }, + ], + name: "ZetaSent", + type: "event", + }, + { + inputs: [], + name: "getLockedAmount", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes", + name: "zetaTxSenderAddress", + type: "bytes", + }, + { + internalType: "uint256", + name: "sourceChainId", + type: "uint256", + }, + { + internalType: "address", + name: "destinationAddress", + type: "address", + }, + { + internalType: "uint256", + name: "zetaValueAndGas", + type: "uint256", + }, + { + internalType: "bytes", + name: "message", + type: "bytes", + }, + { + internalType: "bytes32", + name: "internalSendHash", + type: "bytes32", + }, + ], + name: "onReceive", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "zetaTxSenderAddress", + type: "address", + }, + { + internalType: "uint256", + name: "sourceChainId", + type: "uint256", + }, + { + internalType: "bytes", + name: "destinationAddress", + type: "bytes", + }, + { + internalType: "uint256", + name: "destinationChainId", + type: "uint256", + }, + { + internalType: "uint256", + name: "zetaValueAndGas", + type: "uint256", + }, + { + internalType: "bytes", + name: "message", + type: "bytes", + }, + { + internalType: "bytes32", + name: "internalSendHash", + type: "bytes32", + }, + ], + name: "onRevert", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "pause", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "paused", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "pauserAddress", + outputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "renounceTssAddressUpdater", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + components: [ + { + internalType: "uint256", + name: "destinationChainId", + type: "uint256", + }, + { + internalType: "bytes", + name: "destinationAddress", + type: "bytes", + }, + { + internalType: "uint256", + name: "destinationGasLimit", + type: "uint256", + }, + { + internalType: "bytes", + name: "message", + type: "bytes", + }, + { + internalType: "uint256", + name: "zetaValueAndGas", + type: "uint256", + }, + { + internalType: "bytes", + name: "zetaParams", + type: "bytes", + }, + ], + internalType: "struct ZetaInterfaces.SendInput", + name: "input", + type: "tuple", + }, + ], + name: "send", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "tssAddress", + outputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "tssAddressUpdater", + outputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "unpause", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "pauserAddress_", + type: "address", + }, + ], + name: "updatePauserAddress", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "tssAddress_", + type: "address", + }, + ], + name: "updateTssAddress", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "zetaToken", + outputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, +]; + +const _bytecode = + "0x60a06040523480156200001157600080fd5b506040516200218238038062002182833981810160405281019062000037919062000284565b8383838360008060006101000a81548160ff021916908315150217905550600073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff161480620000bd5750600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16145b80620000f55750600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16145b806200012d5750600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16145b1562000165576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8373ffffffffffffffffffffffffffffffffffffffff1660808173ffffffffffffffffffffffffffffffffffffffff1660601b8152505082600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555081600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555080600060016101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550505050505050505062000349565b6000815190506200027e816200032f565b92915050565b60008060008060808587031215620002a157620002a06200032a565b5b6000620002b1878288016200026d565b9450506020620002c4878288016200026d565b9350506040620002d7878288016200026d565b9250506060620002ea878288016200026d565b91505092959194509250565b600062000303826200030a565b9050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600080fd5b6200033a81620002f6565b81146200034657600080fd5b50565b60805160601c611dfe620003846000396000818161024f01528181610275015281816103ff01528181610dc201526110990152611dfe6000f3fe608060405234801561001057600080fd5b50600436106100ea5760003560e01c80636128480f1161008c5780639122c344116100665780639122c344146101db578063942a5e16146101f7578063ec02690114610213578063f7fb869b1461022f576100ea565b80636128480f146101ab578063779e3b63146101c75780638456cb59146101d1576100ea565b8063328a01d0116100c8578063328a01d0146101475780633f4ba83a146101655780635b1125911461016f5780635c975abb1461018d576100ea565b806321e093b1146100ef578063252bc8861461010d57806329dd214d1461012b575b600080fd5b6100f761024d565b6040516101049190611942565b60405180910390f35b610115610271565b6040516101229190611b81565b60405180910390f35b610145600480360381019061014091906115bb565b610321565b005b61014f610682565b60405161015c9190611942565b60405180910390f35b61016d6106a8565b005b610177610744565b6040516101849190611942565b60405180910390f35b61019561076a565b6040516101a29190611a99565b60405180910390f35b6101c560048036038101906101c0919061147f565b610780565b005b6101cf6108f6565b005b6101d9610a76565b005b6101f560048036038101906101f0919061147f565b610b12565b005b610211600480360381019061020c91906114ac565b610ce4565b005b61022d6004803603810190610228919061168a565b61104d565b005b610237611230565b6040516102449190611942565b60405180910390f35b7f000000000000000000000000000000000000000000000000000000000000000081565b60007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b81526004016102cc9190611942565b60206040518083038186803b1580156102e457600080fd5b505afa1580156102f8573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061031c91906116d3565b905090565b61032961076a565b15610369576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161036090611b1d565b60405180910390fd5b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146103fb57336040517fff70ace20000000000000000000000000000000000000000000000000000000081526004016103f29190611942565b60405180910390fd5b60007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663a9059cbb87876040518363ffffffff1660e01b81526004016104589291906119bd565b602060405180830381600087803b15801561047257600080fd5b505af1158015610486573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104aa919061158e565b9050806104e3576040517f20878f6200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600084849050111561061f578573ffffffffffffffffffffffffffffffffffffffff16633749c51a6040518060a001604052808c8c8080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f8201169050808301925050505050505081526020018a81526020018973ffffffffffffffffffffffffffffffffffffffff16815260200188815260200187878080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050508152506040518263ffffffff1660e01b81526004016105ec9190611b3d565b600060405180830381600087803b15801561060657600080fd5b505af115801561061a573d6000803e3d6000fd5b505050505b818673ffffffffffffffffffffffffffffffffffffffff16887ff1302855733b40d8acb467ee990b6d56c05c80e28ebcabfa6e6f3f57cb50d6988c8c8a8a8a60405161066f959493929190611ab4565b60405180910390a4505050505050505050565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461073a57336040517f4677a0d30000000000000000000000000000000000000000000000000000000081526004016107319190611942565b60405180910390fd5b610742611256565b565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60008060009054906101000a900460ff16905090565b600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461081257336040517f4677a0d30000000000000000000000000000000000000000000000000000000081526004016108099190611942565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415610879576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b80600060016101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055507fd41d83655d484bdf299598751c371b2d92088667266fe3774b25a97bdd5d039733826040516108eb92919061195d565b60405180910390a150565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461098857336040517fe700765e00000000000000000000000000000000000000000000000000000000815260040161097f9190611942565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff16600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161415610a11576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610b0857336040517f4677a0d3000000000000000000000000000000000000000000000000000000008152600401610aff9190611942565b60405180910390fd5b610b106112f7565b565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614158015610bbe5750600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614155b15610c0057336040517fcdfcef97000000000000000000000000000000000000000000000000000000008152600401610bf79190611942565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415610c67576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b80600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055507fe79965b5c67dcfb2cf5fe152715e4a7256cee62a3d5dd8484fd8a8539eb8beff3382604051610cd992919061195d565b60405180910390a150565b610cec61076a565b15610d2c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610d2390611b1d565b60405180910390fd5b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610dbe57336040517fff70ace2000000000000000000000000000000000000000000000000000000008152600401610db59190611942565b60405180910390fd5b60007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663a9059cbb8b876040518363ffffffff1660e01b8152600401610e1b9291906119bd565b602060405180830381600087803b158015610e3557600080fd5b505af1158015610e49573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e6d919061158e565b905080610ea6576040517f20878f6200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000848490501115610fe8578973ffffffffffffffffffffffffffffffffffffffff16633ff0693c6040518060c001604052808d73ffffffffffffffffffffffffffffffffffffffff1681526020018c81526020018b8b8080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f82011690508083019250505050505050815260200189815260200188815260200187878080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050508152506040518263ffffffff1660e01b8152600401610fb59190611b5f565b600060405180830381600087803b158015610fcf57600080fd5b505af1158015610fe3573d6000803e3d6000fd5b505050505b818888604051610ff9929190611929565b6040518091039020877f521fb0b407c2eb9b1375530e9b9a569889992140a688bc076aa72c1712012c888d8d8a8a8a6040516110399594939291906119e6565b60405180910390a450505050505050505050565b61105561076a565b15611095576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161108c90611b1d565b60405180910390fd5b60007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166323b872dd333085608001356040518463ffffffff1660e01b81526004016110f893929190611986565b602060405180830381600087803b15801561111257600080fd5b505af1158015611126573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061114a919061158e565b905080611183576040517f20878f6200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8180602001906111939190611b9c565b6040516111a1929190611929565b604051809103902082600001353373ffffffffffffffffffffffffffffffffffffffff167f7ec1c94701e09b1652f3e1d307e60c4b9ebf99aff8c2079fd1d8c585e031c4e432866080013587604001358880606001906112019190611b9c565b8a8060a001906112119190611b9c565b6040516112249796959493929190611a34565b60405180910390a45050565b600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b61125e61076a565b61129d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161129490611afd565b60405180910390fd5b60008060006101000a81548160ff0219169083151502179055507f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa6112e0611399565b6040516112ed9190611942565b60405180910390a1565b6112ff61076a565b1561133f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161133690611b1d565b60405180910390fd5b60016000806101000a81548160ff0219169083151502179055507f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258611382611399565b60405161138f9190611942565b60405180910390a1565b600033905090565b6000813590506113b081611d6c565b92915050565b6000815190506113c581611d83565b92915050565b6000813590506113da81611d9a565b92915050565b60008083601f8401126113f6576113f5611ce1565b5b8235905067ffffffffffffffff81111561141357611412611cdc565b5b60208301915083600182028301111561142f5761142e611cf5565b5b9250929050565b600060c0828403121561144c5761144b611ceb565b5b81905092915050565b60008135905061146481611db1565b92915050565b60008151905061147981611db1565b92915050565b60006020828403121561149557611494611d04565b5b60006114a3848285016113a1565b91505092915050565b600080600080600080600080600060e08a8c0312156114ce576114cd611d04565b5b60006114dc8c828d016113a1565b99505060206114ed8c828d01611455565b98505060408a013567ffffffffffffffff81111561150e5761150d611cff565b5b61151a8c828d016113e0565b9750975050606061152d8c828d01611455565b955050608061153e8c828d01611455565b94505060a08a013567ffffffffffffffff81111561155f5761155e611cff565b5b61156b8c828d016113e0565b935093505060c061157e8c828d016113cb565b9150509295985092959850929598565b6000602082840312156115a4576115a3611d04565b5b60006115b2848285016113b6565b91505092915050565b60008060008060008060008060c0898b0312156115db576115da611d04565b5b600089013567ffffffffffffffff8111156115f9576115f8611cff565b5b6116058b828c016113e0565b985098505060206116188b828c01611455565b96505060406116298b828c016113a1565b955050606061163a8b828c01611455565b945050608089013567ffffffffffffffff81111561165b5761165a611cff565b5b6116678b828c016113e0565b935093505060a061167a8b828c016113cb565b9150509295985092959890939650565b6000602082840312156116a05761169f611d04565b5b600082013567ffffffffffffffff8111156116be576116bd611cff565b5b6116ca84828501611436565b91505092915050565b6000602082840312156116e9576116e8611d04565b5b60006116f78482850161146a565b91505092915050565b61170981611c48565b82525050565b61171881611c48565b82525050565b61172781611c5a565b82525050565b60006117398385611c1b565b9350611746838584611c9a565b61174f83611d09565b840190509392505050565b60006117668385611c2c565b9350611773838584611c9a565b82840190509392505050565b600061178a82611bff565b6117948185611c0a565b93506117a4818560208601611ca9565b6117ad81611d09565b840191505092915050565b60006117c5601483611c37565b91506117d082611d1a565b602082019050919050565b60006117e8601083611c37565b91506117f382611d43565b602082019050919050565b600060a083016000830151848203600086015261181b828261177f565b9150506020830151611830602086018261190b565b5060408301516118436040860182611700565b506060830151611856606086018261190b565b506080830151848203608086015261186e828261177f565b9150508091505092915050565b600060c0830160008301516118936000860182611700565b5060208301516118a6602086018261190b565b50604083015184820360408601526118be828261177f565b91505060608301516118d3606086018261190b565b5060808301516118e6608086018261190b565b5060a083015184820360a08601526118fe828261177f565b9150508091505092915050565b61191481611c90565b82525050565b61192381611c90565b82525050565b600061193682848661175a565b91508190509392505050565b6000602082019050611957600083018461170f565b92915050565b6000604082019050611972600083018561170f565b61197f602083018461170f565b9392505050565b600060608201905061199b600083018661170f565b6119a8602083018561170f565b6119b5604083018461191a565b949350505050565b60006040820190506119d2600083018561170f565b6119df602083018461191a565b9392505050565b60006080820190506119fb600083018861170f565b611a08602083018761191a565b611a15604083018661191a565b8181036060830152611a2881848661172d565b90509695505050505050565b600060a082019050611a49600083018a61170f565b611a56602083018961191a565b611a63604083018861191a565b8181036060830152611a7681868861172d565b90508181036080830152611a8b81848661172d565b905098975050505050505050565b6000602082019050611aae600083018461171e565b92915050565b60006060820190508181036000830152611acf81878961172d565b9050611ade602083018661191a565b8181036040830152611af181848661172d565b90509695505050505050565b60006020820190508181036000830152611b16816117b8565b9050919050565b60006020820190508181036000830152611b36816117db565b9050919050565b60006020820190508181036000830152611b5781846117fe565b905092915050565b60006020820190508181036000830152611b79818461187b565b905092915050565b6000602082019050611b96600083018461191a565b92915050565b60008083356001602003843603038112611bb957611bb8611cf0565b5b80840192508235915067ffffffffffffffff821115611bdb57611bda611ce6565b5b602083019250600182023603831315611bf757611bf6611cfa565b5b509250929050565b600081519050919050565b600082825260208201905092915050565b600082825260208201905092915050565b600081905092915050565b600082825260208201905092915050565b6000611c5382611c70565b9050919050565b60008115159050919050565b6000819050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b82818337600083830152505050565b60005b83811015611cc7578082015181840152602081019050611cac565b83811115611cd6576000848401525b50505050565b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f5061757361626c653a206e6f7420706175736564000000000000000000000000600082015250565b7f5061757361626c653a2070617573656400000000000000000000000000000000600082015250565b611d7581611c48565b8114611d8057600080fd5b50565b611d8c81611c5a565b8114611d9757600080fd5b50565b611da381611c66565b8114611dae57600080fd5b50565b611dba81611c90565b8114611dc557600080fd5b5056fea2646970667358221220975e723ecb3cbe569f7876443db8c400c50e76f676a32036a85432c8ee756ba464736f6c63430008070033"; + +type ZetaConnectorEthConstructorParams = + | [signer?: Signer] + | ConstructorParameters; + +const isSuperArgs = ( + xs: ZetaConnectorEthConstructorParams +): xs is ConstructorParameters => xs.length > 1; + +export class ZetaConnectorEth__factory extends ContractFactory { + constructor(...args: ZetaConnectorEthConstructorParams) { + if (isSuperArgs(args)) { + super(...args); + } else { + super(_abi, _bytecode, args[0]); + } + } + + override deploy( + zetaToken_: string, + tssAddress_: string, + tssAddressUpdater_: string, + pauserAddress_: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise { + return super.deploy( + zetaToken_, + tssAddress_, + tssAddressUpdater_, + pauserAddress_, + overrides || {} + ) as Promise; + } + override getDeployTransaction( + zetaToken_: string, + tssAddress_: string, + tssAddressUpdater_: string, + pauserAddress_: string, + overrides?: Overrides & { from?: string | Promise } + ): TransactionRequest { + return super.getDeployTransaction( + zetaToken_, + tssAddress_, + tssAddressUpdater_, + pauserAddress_, + overrides || {} + ); + } + override attach(address: string): ZetaConnectorEth { + return super.attach(address) as ZetaConnectorEth; + } + override connect(signer: Signer): ZetaConnectorEth__factory { + return super.connect(signer) as ZetaConnectorEth__factory; + } + + static readonly bytecode = _bytecode; + static readonly abi = _abi; + static createInterface(): ZetaConnectorEthInterface { + return new utils.Interface(_abi) as ZetaConnectorEthInterface; + } + static connect( + address: string, + signerOrProvider: Signer | Provider + ): ZetaConnectorEth { + return new Contract(address, _abi, signerOrProvider) as ZetaConnectorEth; + } +} diff --git a/packages/interfaces/typechain-types/factories/contracts/ZetaConnector.eth.sol/index.ts b/packages/interfaces/typechain-types/factories/contracts/ZetaConnector.eth.sol/index.ts new file mode 100644 index 00000000..324f47bd --- /dev/null +++ b/packages/interfaces/typechain-types/factories/contracts/ZetaConnector.eth.sol/index.ts @@ -0,0 +1,4 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +export { ZetaConnectorEth__factory } from "./ZetaConnectorEth__factory"; diff --git a/packages/interfaces/typechain-types/factories/contracts/ZetaConnector.non-eth.sol/ZetaConnectorNonEth__factory.ts b/packages/interfaces/typechain-types/factories/contracts/ZetaConnector.non-eth.sol/ZetaConnectorNonEth__factory.ts new file mode 100644 index 00000000..fba134a2 --- /dev/null +++ b/packages/interfaces/typechain-types/factories/contracts/ZetaConnector.non-eth.sol/ZetaConnectorNonEth__factory.ts @@ -0,0 +1,661 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import { Signer, utils, Contract, ContractFactory, Overrides } from "ethers"; +import type { Provider, TransactionRequest } from "@ethersproject/providers"; +import type { + ZetaConnectorNonEth, + ZetaConnectorNonEthInterface, +} from "../../../contracts/ZetaConnector.non-eth.sol/ZetaConnectorNonEth"; + +const _abi = [ + { + inputs: [ + { + internalType: "address", + name: "zetaTokenAddress_", + type: "address", + }, + { + internalType: "address", + name: "tssAddress_", + type: "address", + }, + { + internalType: "address", + name: "tssAddressUpdater_", + type: "address", + }, + { + internalType: "address", + name: "pauserAddress_", + type: "address", + }, + ], + stateMutability: "nonpayable", + type: "constructor", + }, + { + inputs: [ + { + internalType: "address", + name: "caller", + type: "address", + }, + ], + name: "CallerIsNotPauser", + type: "error", + }, + { + inputs: [ + { + internalType: "address", + name: "caller", + type: "address", + }, + ], + name: "CallerIsNotTss", + type: "error", + }, + { + inputs: [ + { + internalType: "address", + name: "caller", + type: "address", + }, + ], + name: "CallerIsNotTssOrUpdater", + type: "error", + }, + { + inputs: [ + { + internalType: "address", + name: "caller", + type: "address", + }, + ], + name: "CallerIsNotTssUpdater", + type: "error", + }, + { + inputs: [ + { + internalType: "uint256", + name: "maxSupply", + type: "uint256", + }, + ], + name: "ExceedsMaxSupply", + type: "error", + }, + { + inputs: [], + name: "InvalidAddress", + type: "error", + }, + { + inputs: [], + name: "ZetaTransferError", + type: "error", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "address", + name: "account", + type: "address", + }, + ], + name: "Paused", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "address", + name: "updaterAddress", + type: "address", + }, + { + indexed: false, + internalType: "address", + name: "newTssAddress", + type: "address", + }, + ], + name: "PauserAddressUpdated", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "address", + name: "zetaTxSenderAddress", + type: "address", + }, + { + indexed: false, + internalType: "address", + name: "newTssAddress", + type: "address", + }, + ], + name: "TSSAddressUpdated", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "address", + name: "account", + type: "address", + }, + ], + name: "Unpaused", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "bytes", + name: "zetaTxSenderAddress", + type: "bytes", + }, + { + indexed: true, + internalType: "uint256", + name: "sourceChainId", + type: "uint256", + }, + { + indexed: true, + internalType: "address", + name: "destinationAddress", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "zetaValueAndGas", + type: "uint256", + }, + { + indexed: false, + internalType: "bytes", + name: "message", + type: "bytes", + }, + { + indexed: true, + internalType: "bytes32", + name: "internalSendHash", + type: "bytes32", + }, + ], + name: "ZetaReceived", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "address", + name: "zetaTxSenderAddress", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "sourceChainId", + type: "uint256", + }, + { + indexed: true, + internalType: "uint256", + name: "destinationChainId", + type: "uint256", + }, + { + indexed: true, + internalType: "bytes", + name: "destinationAddress", + type: "bytes", + }, + { + indexed: false, + internalType: "uint256", + name: "zetaValueAndGas", + type: "uint256", + }, + { + indexed: false, + internalType: "bytes", + name: "message", + type: "bytes", + }, + { + indexed: true, + internalType: "bytes32", + name: "internalSendHash", + type: "bytes32", + }, + ], + name: "ZetaReverted", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "address", + name: "sourceTxOriginAddress", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "zetaTxSenderAddress", + type: "address", + }, + { + indexed: true, + internalType: "uint256", + name: "destinationChainId", + type: "uint256", + }, + { + indexed: true, + internalType: "bytes", + name: "destinationAddress", + type: "bytes", + }, + { + indexed: false, + internalType: "uint256", + name: "zetaValueAndGas", + type: "uint256", + }, + { + indexed: false, + internalType: "uint256", + name: "destinationGasLimit", + type: "uint256", + }, + { + indexed: false, + internalType: "bytes", + name: "message", + type: "bytes", + }, + { + indexed: false, + internalType: "bytes", + name: "zetaParams", + type: "bytes", + }, + ], + name: "ZetaSent", + type: "event", + }, + { + inputs: [], + name: "getLockedAmount", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "maxSupply", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes", + name: "zetaTxSenderAddress", + type: "bytes", + }, + { + internalType: "uint256", + name: "sourceChainId", + type: "uint256", + }, + { + internalType: "address", + name: "destinationAddress", + type: "address", + }, + { + internalType: "uint256", + name: "zetaValueAndGas", + type: "uint256", + }, + { + internalType: "bytes", + name: "message", + type: "bytes", + }, + { + internalType: "bytes32", + name: "internalSendHash", + type: "bytes32", + }, + ], + name: "onReceive", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "zetaTxSenderAddress", + type: "address", + }, + { + internalType: "uint256", + name: "sourceChainId", + type: "uint256", + }, + { + internalType: "bytes", + name: "destinationAddress", + type: "bytes", + }, + { + internalType: "uint256", + name: "destinationChainId", + type: "uint256", + }, + { + internalType: "uint256", + name: "zetaValueAndGas", + type: "uint256", + }, + { + internalType: "bytes", + name: "message", + type: "bytes", + }, + { + internalType: "bytes32", + name: "internalSendHash", + type: "bytes32", + }, + ], + name: "onRevert", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "pause", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "paused", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "pauserAddress", + outputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "renounceTssAddressUpdater", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + components: [ + { + internalType: "uint256", + name: "destinationChainId", + type: "uint256", + }, + { + internalType: "bytes", + name: "destinationAddress", + type: "bytes", + }, + { + internalType: "uint256", + name: "destinationGasLimit", + type: "uint256", + }, + { + internalType: "bytes", + name: "message", + type: "bytes", + }, + { + internalType: "uint256", + name: "zetaValueAndGas", + type: "uint256", + }, + { + internalType: "bytes", + name: "zetaParams", + type: "bytes", + }, + ], + internalType: "struct ZetaInterfaces.SendInput", + name: "input", + type: "tuple", + }, + ], + name: "send", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "maxSupply_", + type: "uint256", + }, + ], + name: "setMaxSupply", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "tssAddress", + outputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "tssAddressUpdater", + outputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "unpause", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "pauserAddress_", + type: "address", + }, + ], + name: "updatePauserAddress", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "tssAddress_", + type: "address", + }, + ], + name: "updateTssAddress", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "zetaToken", + outputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, +]; + +const _bytecode = + "0x60a06040527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6003553480156200003557600080fd5b50604051620023de380380620023de83398181016040528101906200005b9190620002a8565b8383838360008060006101000a81548160ff021916908315150217905550600073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff161480620000e15750600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16145b80620001195750600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16145b80620001515750600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16145b1562000189576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8373ffffffffffffffffffffffffffffffffffffffff1660808173ffffffffffffffffffffffffffffffffffffffff1660601b8152505082600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555081600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555080600060016101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050505050505050506200036d565b600081519050620002a28162000353565b92915050565b60008060008060808587031215620002c557620002c46200034e565b5b6000620002d58782880162000291565b9450506020620002e88782880162000291565b9350506040620002fb8782880162000291565b92505060606200030e8782880162000291565b91505092959194509250565b600062000327826200032e565b9050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600080fd5b6200035e816200031a565b81146200036a57600080fd5b50565b60805160601c612028620003b66000396000818161029f015281816102c5015281816104500152818161053e01528181610f460152818161103401526112b701526120286000f3fe608060405234801561001057600080fd5b50600436106101005760003560e01c80636f8b44b011610097578063942a5e1611610066578063942a5e1614610229578063d5abeb0114610245578063ec02690114610263578063f7fb869b1461027f57610100565b80636f8b44b0146101dd578063779e3b63146101f95780638456cb59146102035780639122c3441461020d57610100565b80633f4ba83a116100d35780633f4ba83a1461017b5780635b112591146101855780635c975abb146101a35780636128480f146101c157610100565b806321e093b114610105578063252bc8861461012357806329dd214d14610141578063328a01d01461015d575b600080fd5b61010d61029d565b60405161011a9190611afe565b60405180910390f35b61012b6102c1565b6040516101389190611d3d565b60405180910390f35b61015b6004803603810190610156919061173b565b610371565b005b610165610769565b6040516101729190611afe565b60405180910390f35b61018361078f565b005b61018d61082b565b60405161019a9190611afe565b60405180910390f35b6101ab610851565b6040516101b89190611c55565b60405180910390f35b6101db60048036038101906101d6919061162c565b610867565b005b6101f760048036038101906101f29190611853565b6109dd565b005b610201610a79565b005b61020b610bf9565b005b6102276004803603810190610222919061162c565b610c95565b005b610243600480360381019061023e9190611659565b610e67565b005b61024d611267565b60405161025a9190611d3d565b60405180910390f35b61027d6004803603810190610278919061180a565b61126d565b005b6102876113f2565b6040516102949190611afe565b60405180910390f35b7f000000000000000000000000000000000000000000000000000000000000000081565b60007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b815260040161031c9190611afe565b60206040518083038186803b15801561033457600080fd5b505afa158015610348573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061036c9190611880565b905090565b610379610851565b156103b9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016103b090611cd9565b60405180910390fd5b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461044b57336040517fff70ace20000000000000000000000000000000000000000000000000000000081526004016104429190611afe565b60405180910390fd5b6003547f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166318160ddd6040518163ffffffff1660e01b815260040160206040518083038186803b1580156104b457600080fd5b505afa1580156104c8573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104ec9190611880565b856104f79190611e04565b111561053c576003546040517f3d3dbc830000000000000000000000000000000000000000000000000000000081526004016105339190611d3d565b60405180910390fd5b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16631e458bee8686846040518463ffffffff1660e01b815260040161059993929190611b6b565b600060405180830381600087803b1580156105b357600080fd5b505af11580156105c7573d6000803e3d6000fd5b505050506000838390501115610707578473ffffffffffffffffffffffffffffffffffffffff16633749c51a6040518060a001604052808b8b8080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f8201169050808301925050505050505081526020018981526020018873ffffffffffffffffffffffffffffffffffffffff16815260200187815260200186868080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050508152506040518263ffffffff1660e01b81526004016106d49190611cf9565b600060405180830381600087803b1580156106ee57600080fd5b505af1158015610702573d6000803e3d6000fd5b505050505b808573ffffffffffffffffffffffffffffffffffffffff16877ff1302855733b40d8acb467ee990b6d56c05c80e28ebcabfa6e6f3f57cb50d6988b8b898989604051610757959493929190611c70565b60405180910390a45050505050505050565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461082157336040517f4677a0d30000000000000000000000000000000000000000000000000000000081526004016108189190611afe565b60405180910390fd5b610829611418565b565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60008060009054906101000a900460ff16905090565b600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146108f957336040517f4677a0d30000000000000000000000000000000000000000000000000000000081526004016108f09190611afe565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415610960576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b80600060016101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055507fd41d83655d484bdf299598751c371b2d92088667266fe3774b25a97bdd5d039733826040516109d2929190611b19565b60405180910390a150565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610a6f57336040517fff70ace2000000000000000000000000000000000000000000000000000000008152600401610a669190611afe565b60405180910390fd5b8060038190555050565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610b0b57336040517fe700765e000000000000000000000000000000000000000000000000000000008152600401610b029190611afe565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff16600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161415610b94576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610c8b57336040517f4677a0d3000000000000000000000000000000000000000000000000000000008152600401610c829190611afe565b60405180910390fd5b610c936114b9565b565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614158015610d415750600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614155b15610d8357336040517fcdfcef97000000000000000000000000000000000000000000000000000000008152600401610d7a9190611afe565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415610dea576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b80600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055507fe79965b5c67dcfb2cf5fe152715e4a7256cee62a3d5dd8484fd8a8539eb8beff3382604051610e5c929190611b19565b60405180910390a150565b610e6f610851565b15610eaf576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610ea690611cd9565b60405180910390fd5b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610f4157336040517fff70ace2000000000000000000000000000000000000000000000000000000008152600401610f389190611afe565b60405180910390fd5b6003547f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166318160ddd6040518163ffffffff1660e01b815260040160206040518083038186803b158015610faa57600080fd5b505afa158015610fbe573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610fe29190611880565b85610fed9190611e04565b1115611032576003546040517f3d3dbc830000000000000000000000000000000000000000000000000000000081526004016110299190611d3d565b60405180910390fd5b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16631e458bee8a86846040518463ffffffff1660e01b815260040161108f93929190611b6b565b600060405180830381600087803b1580156110a957600080fd5b505af11580156110bd573d6000803e3d6000fd5b505050506000838390501115611203578873ffffffffffffffffffffffffffffffffffffffff16633ff0693c6040518060c001604052808c73ffffffffffffffffffffffffffffffffffffffff1681526020018b81526020018a8a8080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f82011690508083019250505050505050815260200188815260200187815260200186868080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050508152506040518263ffffffff1660e01b81526004016111d09190611d1b565b600060405180830381600087803b1580156111ea57600080fd5b505af11580156111fe573d6000803e3d6000fd5b505050505b808787604051611214929190611ae5565b6040518091039020867f521fb0b407c2eb9b1375530e9b9a569889992140a688bc076aa72c1712012c888c8c898989604051611254959493929190611ba2565b60405180910390a4505050505050505050565b60035481565b611275610851565b156112b5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016112ac90611cd9565b60405180910390fd5b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166379cc67903383608001356040518363ffffffff1660e01b8152600401611314929190611b42565b600060405180830381600087803b15801561132e57600080fd5b505af1158015611342573d6000803e3d6000fd5b505050508080602001906113569190611d58565b604051611364929190611ae5565b604051809103902081600001353373ffffffffffffffffffffffffffffffffffffffff167f7ec1c94701e09b1652f3e1d307e60c4b9ebf99aff8c2079fd1d8c585e031c4e432856080013586604001358780606001906113c49190611d58565b898060a001906113d49190611d58565b6040516113e79796959493929190611bf0565b60405180910390a450565b600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b611420610851565b61145f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161145690611cb9565b60405180910390fd5b60008060006101000a81548160ff0219169083151502179055507f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa6114a261155b565b6040516114af9190611afe565b60405180910390a1565b6114c1610851565b15611501576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016114f890611cd9565b60405180910390fd5b60016000806101000a81548160ff0219169083151502179055507f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a25861154461155b565b6040516115519190611afe565b60405180910390a1565b600033905090565b60008135905061157281611fad565b92915050565b60008135905061158781611fc4565b92915050565b60008083601f8401126115a3576115a2611f22565b5b8235905067ffffffffffffffff8111156115c0576115bf611f1d565b5b6020830191508360018202830111156115dc576115db611f36565b5b9250929050565b600060c082840312156115f9576115f8611f2c565b5b81905092915050565b60008135905061161181611fdb565b92915050565b60008151905061162681611fdb565b92915050565b60006020828403121561164257611641611f45565b5b600061165084828501611563565b91505092915050565b600080600080600080600080600060e08a8c03121561167b5761167a611f45565b5b60006116898c828d01611563565b995050602061169a8c828d01611602565b98505060408a013567ffffffffffffffff8111156116bb576116ba611f40565b5b6116c78c828d0161158d565b975097505060606116da8c828d01611602565b95505060806116eb8c828d01611602565b94505060a08a013567ffffffffffffffff81111561170c5761170b611f40565b5b6117188c828d0161158d565b935093505060c061172b8c828d01611578565b9150509295985092959850929598565b60008060008060008060008060c0898b03121561175b5761175a611f45565b5b600089013567ffffffffffffffff81111561177957611778611f40565b5b6117858b828c0161158d565b985098505060206117988b828c01611602565b96505060406117a98b828c01611563565b95505060606117ba8b828c01611602565b945050608089013567ffffffffffffffff8111156117db576117da611f40565b5b6117e78b828c0161158d565b935093505060a06117fa8b828c01611578565b9150509295985092959890939650565b6000602082840312156118205761181f611f45565b5b600082013567ffffffffffffffff81111561183e5761183d611f40565b5b61184a848285016115e3565b91505092915050565b60006020828403121561186957611868611f45565b5b600061187784828501611602565b91505092915050565b60006020828403121561189657611895611f45565b5b60006118a484828501611617565b91505092915050565b6118b681611e5a565b82525050565b6118c581611e5a565b82525050565b6118d481611e6c565b82525050565b6118e381611e78565b82525050565b60006118f58385611dd7565b9350611902838584611eac565b61190b83611f4a565b840190509392505050565b60006119228385611de8565b935061192f838584611eac565b82840190509392505050565b600061194682611dbb565b6119508185611dc6565b9350611960818560208601611ebb565b61196981611f4a565b840191505092915050565b6000611981601483611df3565b915061198c82611f5b565b602082019050919050565b60006119a4601083611df3565b91506119af82611f84565b602082019050919050565b600060a08301600083015184820360008601526119d7828261193b565b91505060208301516119ec6020860182611ac7565b5060408301516119ff60408601826118ad565b506060830151611a126060860182611ac7565b5060808301518482036080860152611a2a828261193b565b9150508091505092915050565b600060c083016000830151611a4f60008601826118ad565b506020830151611a626020860182611ac7565b5060408301518482036040860152611a7a828261193b565b9150506060830151611a8f6060860182611ac7565b506080830151611aa26080860182611ac7565b5060a083015184820360a0860152611aba828261193b565b9150508091505092915050565b611ad081611ea2565b82525050565b611adf81611ea2565b82525050565b6000611af2828486611916565b91508190509392505050565b6000602082019050611b1360008301846118bc565b92915050565b6000604082019050611b2e60008301856118bc565b611b3b60208301846118bc565b9392505050565b6000604082019050611b5760008301856118bc565b611b646020830184611ad6565b9392505050565b6000606082019050611b8060008301866118bc565b611b8d6020830185611ad6565b611b9a60408301846118da565b949350505050565b6000608082019050611bb760008301886118bc565b611bc46020830187611ad6565b611bd16040830186611ad6565b8181036060830152611be48184866118e9565b90509695505050505050565b600060a082019050611c05600083018a6118bc565b611c126020830189611ad6565b611c1f6040830188611ad6565b8181036060830152611c328186886118e9565b90508181036080830152611c478184866118e9565b905098975050505050505050565b6000602082019050611c6a60008301846118cb565b92915050565b60006060820190508181036000830152611c8b8187896118e9565b9050611c9a6020830186611ad6565b8181036040830152611cad8184866118e9565b90509695505050505050565b60006020820190508181036000830152611cd281611974565b9050919050565b60006020820190508181036000830152611cf281611997565b9050919050565b60006020820190508181036000830152611d1381846119ba565b905092915050565b60006020820190508181036000830152611d358184611a37565b905092915050565b6000602082019050611d526000830184611ad6565b92915050565b60008083356001602003843603038112611d7557611d74611f31565b5b80840192508235915067ffffffffffffffff821115611d9757611d96611f27565b5b602083019250600182023603831315611db357611db2611f3b565b5b509250929050565b600081519050919050565b600082825260208201905092915050565b600082825260208201905092915050565b600081905092915050565b600082825260208201905092915050565b6000611e0f82611ea2565b9150611e1a83611ea2565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff03821115611e4f57611e4e611eee565b5b828201905092915050565b6000611e6582611e82565b9050919050565b60008115159050919050565b6000819050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b82818337600083830152505050565b60005b83811015611ed9578082015181840152602081019050611ebe565b83811115611ee8576000848401525b50505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f5061757361626c653a206e6f7420706175736564000000000000000000000000600082015250565b7f5061757361626c653a2070617573656400000000000000000000000000000000600082015250565b611fb681611e5a565b8114611fc157600080fd5b50565b611fcd81611e78565b8114611fd857600080fd5b50565b611fe481611ea2565b8114611fef57600080fd5b5056fea26469706673582212205b21f22833e2b941d724fc36923e9abf6f76b204decd0f3a183afd758d1ea51c64736f6c63430008070033"; + +type ZetaConnectorNonEthConstructorParams = + | [signer?: Signer] + | ConstructorParameters; + +const isSuperArgs = ( + xs: ZetaConnectorNonEthConstructorParams +): xs is ConstructorParameters => xs.length > 1; + +export class ZetaConnectorNonEth__factory extends ContractFactory { + constructor(...args: ZetaConnectorNonEthConstructorParams) { + if (isSuperArgs(args)) { + super(...args); + } else { + super(_abi, _bytecode, args[0]); + } + } + + override deploy( + zetaTokenAddress_: string, + tssAddress_: string, + tssAddressUpdater_: string, + pauserAddress_: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise { + return super.deploy( + zetaTokenAddress_, + tssAddress_, + tssAddressUpdater_, + pauserAddress_, + overrides || {} + ) as Promise; + } + override getDeployTransaction( + zetaTokenAddress_: string, + tssAddress_: string, + tssAddressUpdater_: string, + pauserAddress_: string, + overrides?: Overrides & { from?: string | Promise } + ): TransactionRequest { + return super.getDeployTransaction( + zetaTokenAddress_, + tssAddress_, + tssAddressUpdater_, + pauserAddress_, + overrides || {} + ); + } + override attach(address: string): ZetaConnectorNonEth { + return super.attach(address) as ZetaConnectorNonEth; + } + override connect(signer: Signer): ZetaConnectorNonEth__factory { + return super.connect(signer) as ZetaConnectorNonEth__factory; + } + + static readonly bytecode = _bytecode; + static readonly abi = _abi; + static createInterface(): ZetaConnectorNonEthInterface { + return new utils.Interface(_abi) as ZetaConnectorNonEthInterface; + } + static connect( + address: string, + signerOrProvider: Signer | Provider + ): ZetaConnectorNonEth { + return new Contract(address, _abi, signerOrProvider) as ZetaConnectorNonEth; + } +} diff --git a/packages/interfaces/typechain-types/factories/contracts/ZetaConnector.non-eth.sol/index.ts b/packages/interfaces/typechain-types/factories/contracts/ZetaConnector.non-eth.sol/index.ts new file mode 100644 index 00000000..ab63c271 --- /dev/null +++ b/packages/interfaces/typechain-types/factories/contracts/ZetaConnector.non-eth.sol/index.ts @@ -0,0 +1,4 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +export { ZetaConnectorNonEth__factory } from "./ZetaConnectorNonEth__factory"; diff --git a/packages/interfaces/typechain-types/factories/contracts/ZetaInteractor__factory.ts b/packages/interfaces/typechain-types/factories/contracts/ZetaInteractor__factory.ts new file mode 100644 index 00000000..ad56afeb --- /dev/null +++ b/packages/interfaces/typechain-types/factories/contracts/ZetaInteractor__factory.ts @@ -0,0 +1,154 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ + +import { Contract, Signer, utils } from "ethers"; +import type { Provider } from "@ethersproject/providers"; +import type { + ZetaInteractor, + ZetaInteractorInterface, +} from "../../contracts/ZetaInteractor"; + +const _abi = [ + { + inputs: [ + { + internalType: "address", + name: "caller", + type: "address", + }, + ], + name: "InvalidCaller", + type: "error", + }, + { + inputs: [], + name: "InvalidDestinationChainId", + type: "error", + }, + { + inputs: [], + name: "InvalidZetaMessageCall", + type: "error", + }, + { + inputs: [], + name: "InvalidZetaRevertCall", + type: "error", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "previousOwner", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "newOwner", + type: "address", + }, + ], + name: "OwnershipTransferred", + type: "event", + }, + { + inputs: [], + name: "connector", + outputs: [ + { + internalType: "contract ZetaConnector", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + name: "interactorsByChainId", + outputs: [ + { + internalType: "bytes", + name: "", + type: "bytes", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "owner", + outputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "renounceOwnership", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "destinationChainId", + type: "uint256", + }, + { + internalType: "bytes", + name: "contractAddress", + type: "bytes", + }, + ], + name: "setInteractorByChainId", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "newOwner", + type: "address", + }, + ], + name: "transferOwnership", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, +]; + +export class ZetaInteractor__factory { + static readonly abi = _abi; + static createInterface(): ZetaInteractorInterface { + return new utils.Interface(_abi) as ZetaInteractorInterface; + } + static connect( + address: string, + signerOrProvider: Signer | Provider + ): ZetaInteractor { + return new Contract(address, _abi, signerOrProvider) as ZetaInteractor; + } +} diff --git a/packages/interfaces/typechain-types/factories/contracts/ZetaTokenConsumerUniV2.strategy.sol/ZetaTokenConsumerUniV2Errors__factory.ts b/packages/interfaces/typechain-types/factories/contracts/ZetaTokenConsumerUniV2.strategy.sol/ZetaTokenConsumerUniV2Errors__factory.ts new file mode 100644 index 00000000..eea9a796 --- /dev/null +++ b/packages/interfaces/typechain-types/factories/contracts/ZetaTokenConsumerUniV2.strategy.sol/ZetaTokenConsumerUniV2Errors__factory.ts @@ -0,0 +1,40 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ + +import { Contract, Signer, utils } from "ethers"; +import type { Provider } from "@ethersproject/providers"; +import type { + ZetaTokenConsumerUniV2Errors, + ZetaTokenConsumerUniV2ErrorsInterface, +} from "../../../contracts/ZetaTokenConsumerUniV2.strategy.sol/ZetaTokenConsumerUniV2Errors"; + +const _abi = [ + { + inputs: [], + name: "InputCantBeZero", + type: "error", + }, + { + inputs: [], + name: "InvalidAddress", + type: "error", + }, +]; + +export class ZetaTokenConsumerUniV2Errors__factory { + static readonly abi = _abi; + static createInterface(): ZetaTokenConsumerUniV2ErrorsInterface { + return new utils.Interface(_abi) as ZetaTokenConsumerUniV2ErrorsInterface; + } + static connect( + address: string, + signerOrProvider: Signer | Provider + ): ZetaTokenConsumerUniV2Errors { + return new Contract( + address, + _abi, + signerOrProvider + ) as ZetaTokenConsumerUniV2Errors; + } +} diff --git a/packages/interfaces/typechain-types/factories/contracts/ZetaTokenConsumerUniV2.strategy.sol/ZetaTokenConsumerUniV2__factory.ts b/packages/interfaces/typechain-types/factories/contracts/ZetaTokenConsumerUniV2.strategy.sol/ZetaTokenConsumerUniV2__factory.ts new file mode 100644 index 00000000..1b38a725 --- /dev/null +++ b/packages/interfaces/typechain-types/factories/contracts/ZetaTokenConsumerUniV2.strategy.sol/ZetaTokenConsumerUniV2__factory.ts @@ -0,0 +1,326 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import { Signer, utils, Contract, ContractFactory, Overrides } from "ethers"; +import type { Provider, TransactionRequest } from "@ethersproject/providers"; +import type { + ZetaTokenConsumerUniV2, + ZetaTokenConsumerUniV2Interface, +} from "../../../contracts/ZetaTokenConsumerUniV2.strategy.sol/ZetaTokenConsumerUniV2"; + +const _abi = [ + { + inputs: [ + { + internalType: "address", + name: "zetaToken_", + type: "address", + }, + { + internalType: "address", + name: "uniswapV2Router_", + type: "address", + }, + ], + stateMutability: "nonpayable", + type: "constructor", + }, + { + inputs: [], + name: "InputCantBeZero", + type: "error", + }, + { + inputs: [], + name: "InvalidAddress", + type: "error", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "uint256", + name: "amountIn", + type: "uint256", + }, + { + indexed: false, + internalType: "uint256", + name: "amountOut", + type: "uint256", + }, + ], + name: "EthExchangedForZeta", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "address", + name: "token", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "amountIn", + type: "uint256", + }, + { + indexed: false, + internalType: "uint256", + name: "amountOut", + type: "uint256", + }, + ], + name: "TokenExchangedForZeta", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "uint256", + name: "amountIn", + type: "uint256", + }, + { + indexed: false, + internalType: "uint256", + name: "amountOut", + type: "uint256", + }, + ], + name: "ZetaExchangedForEth", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "address", + name: "token", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "amountIn", + type: "uint256", + }, + { + indexed: false, + internalType: "uint256", + name: "amountOut", + type: "uint256", + }, + ], + name: "ZetaExchangedForToken", + type: "event", + }, + { + inputs: [ + { + internalType: "address", + name: "destinationAddress", + type: "address", + }, + { + internalType: "uint256", + name: "minAmountOut", + type: "uint256", + }, + { + internalType: "uint256", + name: "zetaTokenAmount", + type: "uint256", + }, + ], + name: "getEthFromZeta", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "destinationAddress", + type: "address", + }, + { + internalType: "uint256", + name: "minAmountOut", + type: "uint256", + }, + { + internalType: "address", + name: "outputToken", + type: "address", + }, + { + internalType: "uint256", + name: "zetaTokenAmount", + type: "uint256", + }, + ], + name: "getTokenFromZeta", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "destinationAddress", + type: "address", + }, + { + internalType: "uint256", + name: "minAmountOut", + type: "uint256", + }, + ], + name: "getZetaFromEth", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "payable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "destinationAddress", + type: "address", + }, + { + internalType: "uint256", + name: "minAmountOut", + type: "uint256", + }, + { + internalType: "address", + name: "inputToken", + type: "address", + }, + { + internalType: "uint256", + name: "inputTokenAmount", + type: "uint256", + }, + ], + name: "getZetaFromToken", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "zetaToken", + outputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, +]; + +const _bytecode = + "0x60e06040523480156200001157600080fd5b50604051620026aa380380620026aa83398181016040528101906200003791906200024e565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614806200009f5750600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16145b15620000d7576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8173ffffffffffffffffffffffffffffffffffffffff1660a08173ffffffffffffffffffffffffffffffffffffffff1660601b815250508073ffffffffffffffffffffffffffffffffffffffff1660c08173ffffffffffffffffffffffffffffffffffffffff1660601b815250508073ffffffffffffffffffffffffffffffffffffffff1663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b1580156200018c57600080fd5b505afa158015620001a1573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620001c791906200021c565b73ffffffffffffffffffffffffffffffffffffffff1660808173ffffffffffffffffffffffffffffffffffffffff1660601b815250505050620002e8565b6000815190506200021681620002ce565b92915050565b600060208284031215620002355762000234620002c9565b5b6000620002458482850162000205565b91505092915050565b60008060408385031215620002685762000267620002c9565b5b6000620002788582860162000205565b92505060206200028b8582860162000205565b9150509250929050565b6000620002a282620002a9565b9050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600080fd5b620002d98162000295565b8114620002e557600080fd5b50565b60805160601c60a05160601c60c05160601c6122e8620003c26000396000818161033401528181610598015281816108e101528181610b0f01528181610ca501528181610f0701526112700152600081816102c30152818161046a015281816106f10152818161086f01528181610ac501528181610b3101528181610bc501528181610ebd01528181610f29015281816110110152611140015260008181610254015281816105e2015281816106820152818161080001528181610c3401528181610f710152818161108001526111af01526122e86000f3fe60806040526004361061004a5760003560e01c8063013b2ff81461004f57806321e093b11461007f5780632405620a146100aa57806354c49a2a146100e7578063a53fb10b14610124575b600080fd5b610069600480360381019061006491906118ff565b610161565b6040516100769190611dc9565b60405180910390f35b34801561008b57600080fd5b50610094610468565b6040516100a19190611c4c565b60405180910390f35b3480156100b657600080fd5b506100d160048036038101906100cc919061193f565b61048c565b6040516100de9190611dc9565b60405180910390f35b3480156100f357600080fd5b5061010e600480360381019061010991906119a6565b610a1a565b60405161011b9190611dc9565b60405180910390f35b34801561013057600080fd5b5061014b6004803603810190610146919061193f565b610ddb565b6040516101589190611dc9565b60405180910390f35b60008073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614156101c9576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000341415610204576040517fb813f54900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000600267ffffffffffffffff81111561022157610220612103565b5b60405190808252806020026020018201604052801561024f5781602001602082028036833780820191505090505b5090507f000000000000000000000000000000000000000000000000000000000000000081600081518110610287576102866120d4565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff16815250507f0000000000000000000000000000000000000000000000000000000000000000816001815181106102f6576102f56120d4565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff168152505060007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16637ff36ab53486858960c84261037f9190611f6f565b6040518663ffffffff1660e01b815260040161039e9493929190611de4565b6000604051808303818588803b1580156103b757600080fd5b505af11580156103cb573d6000803e3d6000fd5b50505050506040513d6000823e3d601f19601f820116820180604052508101906103f591906119f9565b9050600081600184516104089190611fc5565b81518110610419576104186120d4565b5b602002602001015190507f87890b0a30955b1db16cc894fbe24779ae05d9f337bfe8b6dfc0809b5bf9da113482604051610454929190611e30565b60405180910390a180935050505092915050565b7f000000000000000000000000000000000000000000000000000000000000000081565b60008073ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff1614806104f45750600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16145b1561052b576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000821415610566576040517fb813f54900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6105933330848673ffffffffffffffffffffffffffffffffffffffff166113a9909392919063ffffffff16565b6105de7f0000000000000000000000000000000000000000000000000000000000000000838573ffffffffffffffffffffffffffffffffffffffff166114329092919063ffffffff16565b60607f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff16141561076357600267ffffffffffffffff81111561064f5761064e612103565b5b60405190808252806020026020018201604052801561067d5781602001602082028036833780820191505090505b5090507f0000000000000000000000000000000000000000000000000000000000000000816000815181106106b5576106b46120d4565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff16815250507f000000000000000000000000000000000000000000000000000000000000000081600181518110610724576107236120d4565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff16815250506108dd565b600367ffffffffffffffff81111561077e5761077d612103565b5b6040519080825280602002602001820160405280156107ac5781602001602082028036833780820191505090505b50905083816000815181106107c4576107c36120d4565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff16815250507f000000000000000000000000000000000000000000000000000000000000000081600181518110610833576108326120d4565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff16815250507f0000000000000000000000000000000000000000000000000000000000000000816002815181106108a2576108a16120d4565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff16815250505b60007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166338ed17398588858b60c84261092c9190611f6f565b6040518663ffffffff1660e01b815260040161094c959493929190611e59565b600060405180830381600087803b15801561096657600080fd5b505af115801561097a573d6000803e3d6000fd5b505050506040513d6000823e3d601f19601f820116820180604052508101906109a391906119f9565b9050600081600184516109b69190611fc5565b815181106109c7576109c66120d4565b5b602002602001015190507f017190d3d99ee6d8dd0604ef1e71ff9802810c6485f57c9b2ed6169848dd119f868683604051610a0493929190611cf0565b60405180910390a1809350505050949350505050565b60008073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff161415610a82576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000821415610abd576040517fb813f54900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610b0a3330847f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166113a9909392919063ffffffff16565b610b757f0000000000000000000000000000000000000000000000000000000000000000837f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166114329092919063ffffffff16565b6000600267ffffffffffffffff811115610b9257610b91612103565b5b604051908082528060200260200182016040528015610bc05781602001602082028036833780820191505090505b5090507f000000000000000000000000000000000000000000000000000000000000000081600081518110610bf857610bf76120d4565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff16815250507f000000000000000000000000000000000000000000000000000000000000000081600181518110610c6757610c666120d4565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff168152505060007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166318cbafe58587858a60c842610cf09190611f6f565b6040518663ffffffff1660e01b8152600401610d10959493929190611e59565b600060405180830381600087803b158015610d2a57600080fd5b505af1158015610d3e573d6000803e3d6000fd5b505050506040513d6000823e3d601f19601f82011682018060405250810190610d6791906119f9565b905060008160018451610d7a9190611fc5565b81518110610d8b57610d8a6120d4565b5b602002602001015190507f74e171117e91660f493740924d8bad0caf48dc4fbccb767fb05935397a2c17ae8582604051610dc6929190611e30565b60405180910390a18093505050509392505050565b60008073ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff161480610e435750600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16145b15610e7a576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000821415610eb5576040517fb813f54900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610f023330847f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166113a9909392919063ffffffff16565b610f6d7f0000000000000000000000000000000000000000000000000000000000000000837f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166114329092919063ffffffff16565b60607f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1614156110f257600267ffffffffffffffff811115610fde57610fdd612103565b5b60405190808252806020026020018201604052801561100c5781602001602082028036833780820191505090505b5090507f000000000000000000000000000000000000000000000000000000000000000081600081518110611044576110436120d4565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff16815250507f0000000000000000000000000000000000000000000000000000000000000000816001815181106110b3576110b26120d4565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff168152505061126c565b600367ffffffffffffffff81111561110d5761110c612103565b5b60405190808252806020026020018201604052801561113b5781602001602082028036833780820191505090505b5090507f000000000000000000000000000000000000000000000000000000000000000081600081518110611173576111726120d4565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff16815250507f0000000000000000000000000000000000000000000000000000000000000000816001815181106111e2576111e16120d4565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff16815250508381600281518110611231576112306120d4565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff16815250505b60007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166338ed17398588858b60c8426112bb9190611f6f565b6040518663ffffffff1660e01b81526004016112db959493929190611e59565b600060405180830381600087803b1580156112f557600080fd5b505af1158015611309573d6000803e3d6000fd5b505050506040513d6000823e3d601f19601f8201168201806040525081019061133291906119f9565b9050600081600184516113459190611fc5565b81518110611356576113556120d4565b5b602002602001015190507f0a7cb8f6e1d29e616c1209a3f418c17b3a9137005377f6dd072217b1ede2573b86868360405161139393929190611cf0565b60405180910390a1809350505050949350505050565b61142c846323b872dd60e01b8585856040516024016113ca93929190611c90565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050611590565b50505050565b60008114806114cb575060008373ffffffffffffffffffffffffffffffffffffffff1663dd62ed3e30856040518363ffffffff1660e01b8152600401611479929190611c67565b60206040518083038186803b15801561149157600080fd5b505afa1580156114a5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114c99190611a6f565b145b61150a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161150190611da9565b60405180910390fd5b61158b8363095ea7b360e01b8484604051602401611529929190611cc7565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050611590565b505050565b60006115f2826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c65648152508573ffffffffffffffffffffffffffffffffffffffff166116579092919063ffffffff16565b905060008151111561165257808060200190518101906116129190611a42565b611651576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161164890611d89565b60405180910390fd5b5b505050565b6060611666848460008561166f565b90509392505050565b6060824710156116b4576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016116ab90611d49565b60405180910390fd5b6116bd85611783565b6116fc576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016116f390611d69565b60405180910390fd5b6000808673ffffffffffffffffffffffffffffffffffffffff1685876040516117259190611c35565b60006040518083038185875af1925050503d8060008114611762576040519150601f19603f3d011682016040523d82523d6000602084013e611767565b606091505b50915091506117778282866117a6565b92505050949350505050565b6000808273ffffffffffffffffffffffffffffffffffffffff163b119050919050565b606083156117b657829050611806565b6000835111156117c95782518084602001fd5b816040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016117fd9190611d27565b60405180910390fd5b9392505050565b600061182061181b84611ed8565b611eb3565b9050808382526020820190508285602086028201111561184357611842612137565b5b60005b85811015611873578161185988826118ea565b845260208401935060208301925050600181019050611846565b5050509392505050565b60008135905061188c8161226d565b92915050565b600082601f8301126118a7576118a6612132565b5b81516118b784826020860161180d565b91505092915050565b6000815190506118cf81612284565b92915050565b6000813590506118e48161229b565b92915050565b6000815190506118f98161229b565b92915050565b6000806040838503121561191657611915612141565b5b60006119248582860161187d565b9250506020611935858286016118d5565b9150509250929050565b6000806000806080858703121561195957611958612141565b5b60006119678782880161187d565b9450506020611978878288016118d5565b93505060406119898782880161187d565b925050606061199a878288016118d5565b91505092959194509250565b6000806000606084860312156119bf576119be612141565b5b60006119cd8682870161187d565b93505060206119de868287016118d5565b92505060406119ef868287016118d5565b9150509250925092565b600060208284031215611a0f57611a0e612141565b5b600082015167ffffffffffffffff811115611a2d57611a2c61213c565b5b611a3984828501611892565b91505092915050565b600060208284031215611a5857611a57612141565b5b6000611a66848285016118c0565b91505092915050565b600060208284031215611a8557611a84612141565b5b6000611a93848285016118ea565b91505092915050565b6000611aa88383611ab4565b60208301905092915050565b611abd81611ff9565b82525050565b611acc81611ff9565b82525050565b6000611add82611f14565b611ae78185611f42565b9350611af283611f04565b8060005b83811015611b23578151611b0a8882611a9c565b9750611b1583611f35565b925050600181019050611af6565b5085935050505092915050565b6000611b3b82611f1f565b611b458185611f53565b9350611b55818560208601612041565b80840191505092915050565b6000611b6c82611f2a565b611b768185611f5e565b9350611b86818560208601612041565b611b8f81612146565b840191505092915050565b6000611ba7602683611f5e565b9150611bb282612157565b604082019050919050565b6000611bca601d83611f5e565b9150611bd5826121a6565b602082019050919050565b6000611bed602a83611f5e565b9150611bf8826121cf565b604082019050919050565b6000611c10603683611f5e565b9150611c1b8261221e565b604082019050919050565b611c2f81612037565b82525050565b6000611c418284611b30565b915081905092915050565b6000602082019050611c616000830184611ac3565b92915050565b6000604082019050611c7c6000830185611ac3565b611c896020830184611ac3565b9392505050565b6000606082019050611ca56000830186611ac3565b611cb26020830185611ac3565b611cbf6040830184611c26565b949350505050565b6000604082019050611cdc6000830185611ac3565b611ce96020830184611c26565b9392505050565b6000606082019050611d056000830186611ac3565b611d126020830185611c26565b611d1f6040830184611c26565b949350505050565b60006020820190508181036000830152611d418184611b61565b905092915050565b60006020820190508181036000830152611d6281611b9a565b9050919050565b60006020820190508181036000830152611d8281611bbd565b9050919050565b60006020820190508181036000830152611da281611be0565b9050919050565b60006020820190508181036000830152611dc281611c03565b9050919050565b6000602082019050611dde6000830184611c26565b92915050565b6000608082019050611df96000830187611c26565b8181036020830152611e0b8186611ad2565b9050611e1a6040830185611ac3565b611e276060830184611c26565b95945050505050565b6000604082019050611e456000830185611c26565b611e526020830184611c26565b9392505050565b600060a082019050611e6e6000830188611c26565b611e7b6020830187611c26565b8181036040830152611e8d8186611ad2565b9050611e9c6060830185611ac3565b611ea96080830184611c26565b9695505050505050565b6000611ebd611ece565b9050611ec98282612074565b919050565b6000604051905090565b600067ffffffffffffffff821115611ef357611ef2612103565b5b602082029050602081019050919050565b6000819050602082019050919050565b600081519050919050565b600081519050919050565b600081519050919050565b6000602082019050919050565b600082825260208201905092915050565b600081905092915050565b600082825260208201905092915050565b6000611f7a82612037565b9150611f8583612037565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff03821115611fba57611fb96120a5565b5b828201905092915050565b6000611fd082612037565b9150611fdb83612037565b925082821015611fee57611fed6120a5565b5b828203905092915050565b600061200482612017565b9050919050565b60008115159050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b60005b8381101561205f578082015181840152602081019050612044565b8381111561206e576000848401525b50505050565b61207d82612146565b810181811067ffffffffffffffff8211171561209c5761209b612103565b5b80604052505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600080fd5b600080fd5b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f416464726573733a20696e73756666696369656e742062616c616e636520666f60008201527f722063616c6c0000000000000000000000000000000000000000000000000000602082015250565b7f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000600082015250565b7f5361666545524332303a204552433230206f7065726174696f6e20646964206e60008201527f6f74207375636365656400000000000000000000000000000000000000000000602082015250565b7f5361666545524332303a20617070726f76652066726f6d206e6f6e2d7a65726f60008201527f20746f206e6f6e2d7a65726f20616c6c6f77616e636500000000000000000000602082015250565b61227681611ff9565b811461228157600080fd5b50565b61228d8161200b565b811461229857600080fd5b50565b6122a481612037565b81146122af57600080fd5b5056fea2646970667358221220a945636c0113c2f45785c144cf4f77a46ac7759fe082ff70c8e23dc5ce90498364736f6c63430008070033"; + +type ZetaTokenConsumerUniV2ConstructorParams = + | [signer?: Signer] + | ConstructorParameters; + +const isSuperArgs = ( + xs: ZetaTokenConsumerUniV2ConstructorParams +): xs is ConstructorParameters => xs.length > 1; + +export class ZetaTokenConsumerUniV2__factory extends ContractFactory { + constructor(...args: ZetaTokenConsumerUniV2ConstructorParams) { + if (isSuperArgs(args)) { + super(...args); + } else { + super(_abi, _bytecode, args[0]); + } + } + + override deploy( + zetaToken_: string, + uniswapV2Router_: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise { + return super.deploy( + zetaToken_, + uniswapV2Router_, + overrides || {} + ) as Promise; + } + override getDeployTransaction( + zetaToken_: string, + uniswapV2Router_: string, + overrides?: Overrides & { from?: string | Promise } + ): TransactionRequest { + return super.getDeployTransaction( + zetaToken_, + uniswapV2Router_, + overrides || {} + ); + } + override attach(address: string): ZetaTokenConsumerUniV2 { + return super.attach(address) as ZetaTokenConsumerUniV2; + } + override connect(signer: Signer): ZetaTokenConsumerUniV2__factory { + return super.connect(signer) as ZetaTokenConsumerUniV2__factory; + } + + static readonly bytecode = _bytecode; + static readonly abi = _abi; + static createInterface(): ZetaTokenConsumerUniV2Interface { + return new utils.Interface(_abi) as ZetaTokenConsumerUniV2Interface; + } + static connect( + address: string, + signerOrProvider: Signer | Provider + ): ZetaTokenConsumerUniV2 { + return new Contract( + address, + _abi, + signerOrProvider + ) as ZetaTokenConsumerUniV2; + } +} diff --git a/packages/interfaces/typechain-types/factories/contracts/ZetaTokenConsumerUniV2.strategy.sol/index.ts b/packages/interfaces/typechain-types/factories/contracts/ZetaTokenConsumerUniV2.strategy.sol/index.ts new file mode 100644 index 00000000..bff48c49 --- /dev/null +++ b/packages/interfaces/typechain-types/factories/contracts/ZetaTokenConsumerUniV2.strategy.sol/index.ts @@ -0,0 +1,5 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +export { ZetaTokenConsumerUniV2__factory } from "./ZetaTokenConsumerUniV2__factory"; +export { ZetaTokenConsumerUniV2Errors__factory } from "./ZetaTokenConsumerUniV2Errors__factory"; diff --git a/packages/interfaces/typechain-types/factories/contracts/ZetaTokenConsumerUniV3.strategy.sol/WETH9__factory.ts b/packages/interfaces/typechain-types/factories/contracts/ZetaTokenConsumerUniV3.strategy.sol/WETH9__factory.ts new file mode 100644 index 00000000..f902674d --- /dev/null +++ b/packages/interfaces/typechain-types/factories/contracts/ZetaTokenConsumerUniV3.strategy.sol/WETH9__factory.ts @@ -0,0 +1,36 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ + +import { Contract, Signer, utils } from "ethers"; +import type { Provider } from "@ethersproject/providers"; +import type { + WETH9, + WETH9Interface, +} from "../../../contracts/ZetaTokenConsumerUniV3.strategy.sol/WETH9"; + +const _abi = [ + { + inputs: [ + { + internalType: "uint256", + name: "wad", + type: "uint256", + }, + ], + name: "withdraw", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, +]; + +export class WETH9__factory { + static readonly abi = _abi; + static createInterface(): WETH9Interface { + return new utils.Interface(_abi) as WETH9Interface; + } + static connect(address: string, signerOrProvider: Signer | Provider): WETH9 { + return new Contract(address, _abi, signerOrProvider) as WETH9; + } +} diff --git a/packages/interfaces/typechain-types/factories/contracts/ZetaTokenConsumerUniV3.strategy.sol/ZetaTokenConsumerUniV3Errors__factory.ts b/packages/interfaces/typechain-types/factories/contracts/ZetaTokenConsumerUniV3.strategy.sol/ZetaTokenConsumerUniV3Errors__factory.ts new file mode 100644 index 00000000..f1e9450a --- /dev/null +++ b/packages/interfaces/typechain-types/factories/contracts/ZetaTokenConsumerUniV3.strategy.sol/ZetaTokenConsumerUniV3Errors__factory.ts @@ -0,0 +1,50 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ + +import { Contract, Signer, utils } from "ethers"; +import type { Provider } from "@ethersproject/providers"; +import type { + ZetaTokenConsumerUniV3Errors, + ZetaTokenConsumerUniV3ErrorsInterface, +} from "../../../contracts/ZetaTokenConsumerUniV3.strategy.sol/ZetaTokenConsumerUniV3Errors"; + +const _abi = [ + { + inputs: [], + name: "ErrorSendingETH", + type: "error", + }, + { + inputs: [], + name: "InputCantBeZero", + type: "error", + }, + { + inputs: [], + name: "InvalidAddress", + type: "error", + }, + { + inputs: [], + name: "ReentrancyError", + type: "error", + }, +]; + +export class ZetaTokenConsumerUniV3Errors__factory { + static readonly abi = _abi; + static createInterface(): ZetaTokenConsumerUniV3ErrorsInterface { + return new utils.Interface(_abi) as ZetaTokenConsumerUniV3ErrorsInterface; + } + static connect( + address: string, + signerOrProvider: Signer | Provider + ): ZetaTokenConsumerUniV3Errors { + return new Contract( + address, + _abi, + signerOrProvider + ) as ZetaTokenConsumerUniV3Errors; + } +} diff --git a/packages/interfaces/typechain-types/factories/contracts/ZetaTokenConsumerUniV3.strategy.sol/ZetaTokenConsumerUniV3__factory.ts b/packages/interfaces/typechain-types/factories/contracts/ZetaTokenConsumerUniV3.strategy.sol/ZetaTokenConsumerUniV3__factory.ts new file mode 100644 index 00000000..a0f0c6c9 --- /dev/null +++ b/packages/interfaces/typechain-types/factories/contracts/ZetaTokenConsumerUniV3.strategy.sol/ZetaTokenConsumerUniV3__factory.ts @@ -0,0 +1,435 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import { + Signer, + utils, + Contract, + ContractFactory, + BigNumberish, + Overrides, +} from "ethers"; +import type { Provider, TransactionRequest } from "@ethersproject/providers"; +import type { + ZetaTokenConsumerUniV3, + ZetaTokenConsumerUniV3Interface, +} from "../../../contracts/ZetaTokenConsumerUniV3.strategy.sol/ZetaTokenConsumerUniV3"; + +const _abi = [ + { + inputs: [ + { + internalType: "address", + name: "zetaToken_", + type: "address", + }, + { + internalType: "address", + name: "uniswapV3Router_", + type: "address", + }, + { + internalType: "address", + name: "quoter_", + type: "address", + }, + { + internalType: "address", + name: "WETH9Address_", + type: "address", + }, + { + internalType: "uint24", + name: "zetaPoolFee_", + type: "uint24", + }, + { + internalType: "uint24", + name: "tokenPoolFee_", + type: "uint24", + }, + ], + stateMutability: "nonpayable", + type: "constructor", + }, + { + inputs: [], + name: "ErrorSendingETH", + type: "error", + }, + { + inputs: [], + name: "InputCantBeZero", + type: "error", + }, + { + inputs: [], + name: "InvalidAddress", + type: "error", + }, + { + inputs: [], + name: "ReentrancyError", + type: "error", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "uint256", + name: "amountIn", + type: "uint256", + }, + { + indexed: false, + internalType: "uint256", + name: "amountOut", + type: "uint256", + }, + ], + name: "EthExchangedForZeta", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "address", + name: "token", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "amountIn", + type: "uint256", + }, + { + indexed: false, + internalType: "uint256", + name: "amountOut", + type: "uint256", + }, + ], + name: "TokenExchangedForZeta", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "uint256", + name: "amountIn", + type: "uint256", + }, + { + indexed: false, + internalType: "uint256", + name: "amountOut", + type: "uint256", + }, + ], + name: "ZetaExchangedForEth", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "address", + name: "token", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "amountIn", + type: "uint256", + }, + { + indexed: false, + internalType: "uint256", + name: "amountOut", + type: "uint256", + }, + ], + name: "ZetaExchangedForToken", + type: "event", + }, + { + inputs: [ + { + internalType: "address", + name: "destinationAddress", + type: "address", + }, + { + internalType: "uint256", + name: "minAmountOut", + type: "uint256", + }, + { + internalType: "uint256", + name: "zetaTokenAmount", + type: "uint256", + }, + ], + name: "getEthFromZeta", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "destinationAddress", + type: "address", + }, + { + internalType: "uint256", + name: "minAmountOut", + type: "uint256", + }, + { + internalType: "address", + name: "outputToken", + type: "address", + }, + { + internalType: "uint256", + name: "zetaTokenAmount", + type: "uint256", + }, + ], + name: "getTokenFromZeta", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "destinationAddress", + type: "address", + }, + { + internalType: "uint256", + name: "minAmountOut", + type: "uint256", + }, + ], + name: "getZetaFromEth", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "payable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "destinationAddress", + type: "address", + }, + { + internalType: "uint256", + name: "minAmountOut", + type: "uint256", + }, + { + internalType: "address", + name: "inputToken", + type: "address", + }, + { + internalType: "uint256", + name: "inputTokenAmount", + type: "uint256", + }, + ], + name: "getZetaFromToken", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "quoter", + outputs: [ + { + internalType: "contract IQuoter", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "tokenPoolFee", + outputs: [ + { + internalType: "uint24", + name: "", + type: "uint24", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "uniswapV3Router", + outputs: [ + { + internalType: "contract ISwapRouter", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "zetaPoolFee", + outputs: [ + { + internalType: "uint24", + name: "", + type: "uint24", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "zetaToken", + outputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + stateMutability: "payable", + type: "receive", + }, +]; + +const _bytecode = + "0x6101406040523480156200001257600080fd5b50604051620025af380380620025af83398181016040528101906200003891906200028a565b600073ffffffffffffffffffffffffffffffffffffffff168673ffffffffffffffffffffffffffffffffffffffff161480620000a05750600073ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff16145b80620000d85750600073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff16145b80620001105750600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16145b1562000148576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8573ffffffffffffffffffffffffffffffffffffffff1660e08173ffffffffffffffffffffffffffffffffffffffff1660601b815250508473ffffffffffffffffffffffffffffffffffffffff166101008173ffffffffffffffffffffffffffffffffffffffff1660601b815250508373ffffffffffffffffffffffffffffffffffffffff166101208173ffffffffffffffffffffffffffffffffffffffff1660601b815250508273ffffffffffffffffffffffffffffffffffffffff1660c08173ffffffffffffffffffffffffffffffffffffffff1660601b815250508162ffffff1660808162ffffff1660e81b815250508062ffffff1660a08162ffffff1660e81b81525050505050505050620003a2565b6000815190506200026d816200036e565b92915050565b600081519050620002848162000388565b92915050565b60008060008060008060c08789031215620002aa57620002a962000369565b5b6000620002ba89828a016200025c565b9650506020620002cd89828a016200025c565b9550506040620002e089828a016200025c565b9450506060620002f389828a016200025c565b93505060806200030689828a0162000273565b92505060a06200031989828a0162000273565b9150509295509295509295565b600062000333826200033a565b9050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600062ffffff82169050919050565b600080fd5b620003798162000326565b81146200038557600080fd5b50565b62000393816200035a565b81146200039f57600080fd5b50565b60805160e81c60a05160e81c60c05160601c60e05160601c6101005160601c6101205160601c6120fc620004b360003960006111400152600081816104030152818161062301528181610761015281816108560152818161099101528181610b0301528181610ed30152611031015260008181610343015281816104f5015281816106dc01528181610947015281816109b301528181610a0701528181610e8901528181610ef50152610f480152600081816103070152818161069a01528181610a4301528181610bb00152610f8a01526000818161067901528181610d240152610fab01526000818161037f015281816106bb0152818161087a01528181610a7f0152610f6901526120fc6000f3fe60806040526004361061008a5760003560e01c80633cbd7005116100595780633cbd70051461015957806354c49a2a146101845780635d9dfdde146101c1578063a53fb10b146101ec578063c6bbd5a71461022957610091565b8063013b2ff81461009657806321e093b1146100c65780632405620a146100f15780632c76d7a61461012e57610091565b3661009157005b600080fd5b6100b060048036038101906100ab919061161a565b610254565b6040516100bd9190611d24565b60405180910390f35b3480156100d257600080fd5b506100db6104f3565b6040516100e89190611b18565b60405180910390f35b3480156100fd57600080fd5b506101186004803603810190610113919061165a565b610517565b6040516101259190611d24565b60405180910390f35b34801561013a57600080fd5b50610143610854565b6040516101509190611c0e565b60405180910390f35b34801561016557600080fd5b5061016e610878565b60405161017b9190611d09565b60405180910390f35b34801561019057600080fd5b506101ab60048036038101906101a691906116c1565b61089c565b6040516101b89190611d24565b60405180910390f35b3480156101cd57600080fd5b506101d6610d22565b6040516101e39190611d09565b60405180910390f35b3480156101f857600080fd5b50610213600480360381019061020e919061165a565b610d46565b6040516102209190611d24565b60405180910390f35b34801561023557600080fd5b5061023e61113e565b60405161024b9190611bf3565b60405180910390f35b60008073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614156102bc576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60003414156102f7576040517fb813f54900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60006040518061010001604052807f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1681526020017f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1681526020017f000000000000000000000000000000000000000000000000000000000000000062ffffff1681526020018573ffffffffffffffffffffffffffffffffffffffff16815260200160c8426103d19190611dab565b8152602001348152602001848152602001600073ffffffffffffffffffffffffffffffffffffffff16815250905060007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663414bf38934846040518363ffffffff1660e01b815260040161045b9190611ced565b6020604051808303818588803b15801561047457600080fd5b505af1158015610488573d6000803e3d6000fd5b50505050506040513d601f19601f820116820180604052508101906104ad9190611741565b90507f87890b0a30955b1db16cc894fbe24779ae05d9f337bfe8b6dfc0809b5bf9da1134826040516104e0929190611d3f565b60405180910390a1809250505092915050565b7f000000000000000000000000000000000000000000000000000000000000000081565b60008073ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff16148061057f5750600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16145b156105b6576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008214156105f1576040517fb813f54900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61061e3330848673ffffffffffffffffffffffffffffffffffffffff16611162909392919063ffffffff16565b6106697f0000000000000000000000000000000000000000000000000000000000000000838573ffffffffffffffffffffffffffffffffffffffff166111eb9092919063ffffffff16565b60006040518060a00160405280857f00000000000000000000000000000000000000000000000000000000000000007f00000000000000000000000000000000000000000000000000000000000000007f00000000000000000000000000000000000000000000000000000000000000007f000000000000000000000000000000000000000000000000000000000000000060405160200161070f959493929190611a8d565b60405160208183030381529060405281526020018773ffffffffffffffffffffffffffffffffffffffff16815260200160c84261074c9190611dab565b815260200184815260200186815250905060007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663c04b8d59836040518263ffffffff1660e01b81526004016107b89190611ccb565b602060405180830381600087803b1580156107d257600080fd5b505af11580156107e6573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061080a9190611741565b90507f017190d3d99ee6d8dd0604ef1e71ff9802810c6485f57c9b2ed6169848dd119f85858360405161083f93929190611bbc565b60405180910390a18092505050949350505050565b7f000000000000000000000000000000000000000000000000000000000000000081565b7f000000000000000000000000000000000000000000000000000000000000000081565b60008073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff161415610904576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600082141561093f576040517fb813f54900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61098c3330847f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16611162909392919063ffffffff16565b6109f77f0000000000000000000000000000000000000000000000000000000000000000837f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166111eb9092919063ffffffff16565b60006040518061010001604052807f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1681526020017f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1681526020017f000000000000000000000000000000000000000000000000000000000000000062ffffff1681526020013073ffffffffffffffffffffffffffffffffffffffff16815260200160c842610ad19190611dab565b8152602001848152602001858152602001600073ffffffffffffffffffffffffffffffffffffffff16815250905060007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663414bf389836040518263ffffffff1660e01b8152600401610b5a9190611ced565b602060405180830381600087803b158015610b7457600080fd5b505af1158015610b88573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610bac9190611741565b90507f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16632e1a7d4d826040518263ffffffff1660e01b8152600401610c079190611d24565b600060405180830381600087803b158015610c2157600080fd5b505af1158015610c35573d6000803e3d6000fd5b505050507f74e171117e91660f493740924d8bad0caf48dc4fbccb767fb05935397a2c17ae8482604051610c6a929190611d3f565b60405180910390a160008673ffffffffffffffffffffffffffffffffffffffff1682604051610c9890611b03565b60006040518083038185875af1925050503d8060008114610cd5576040519150601f19603f3d011682016040523d82523d6000602084013e610cda565b606091505b5050905080610d15576040517f3794aeaf00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8193505050509392505050565b7f000000000000000000000000000000000000000000000000000000000000000081565b60008060009054906101000a900460ff1615610d8e576040517f29f745a700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60016000806101000a81548160ff021916908315150217905550600073ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff161480610e0f5750600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16145b15610e46576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000821415610e81576040517fb813f54900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610ece3330847f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16611162909392919063ffffffff16565b610f397f0000000000000000000000000000000000000000000000000000000000000000837f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166111eb9092919063ffffffff16565b60006040518060a001604052807f00000000000000000000000000000000000000000000000000000000000000007f00000000000000000000000000000000000000000000000000000000000000007f00000000000000000000000000000000000000000000000000000000000000007f000000000000000000000000000000000000000000000000000000000000000089604051602001610fdf959493929190611a8d565b60405160208183030381529060405281526020018773ffffffffffffffffffffffffffffffffffffffff16815260200160c84261101c9190611dab565b815260200184815260200186815250905060007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663c04b8d59836040518263ffffffff1660e01b81526004016110889190611ccb565b602060405180830381600087803b1580156110a257600080fd5b505af11580156110b6573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110da9190611741565b90507f0a7cb8f6e1d29e616c1209a3f418c17b3a9137005377f6dd072217b1ede2573b85858360405161110f93929190611bbc565b60405180910390a1809250505060008060006101000a81548160ff021916908315150217905550949350505050565b7f000000000000000000000000000000000000000000000000000000000000000081565b6111e5846323b872dd60e01b85858560405160240161118393929190611b5c565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050611349565b50505050565b6000811480611284575060008373ffffffffffffffffffffffffffffffffffffffff1663dd62ed3e30856040518363ffffffff1660e01b8152600401611232929190611b33565b60206040518083038186803b15801561124a57600080fd5b505afa15801561125e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112829190611741565b145b6112c3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016112ba90611cab565b60405180910390fd5b6113448363095ea7b360e01b84846040516024016112e2929190611b93565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050611349565b505050565b60006113ab826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c65648152508573ffffffffffffffffffffffffffffffffffffffff166114109092919063ffffffff16565b905060008151111561140b57808060200190518101906113cb9190611714565b61140a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161140190611c8b565b60405180910390fd5b5b505050565b606061141f8484600085611428565b90509392505050565b60608247101561146d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161146490611c4b565b60405180910390fd5b6114768561153c565b6114b5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016114ac90611c6b565b60405180910390fd5b6000808673ffffffffffffffffffffffffffffffffffffffff1685876040516114de9190611aec565b60006040518083038185875af1925050503d806000811461151b576040519150601f19603f3d011682016040523d82523d6000602084013e611520565b606091505b509150915061153082828661155f565b92505050949350505050565b6000808273ffffffffffffffffffffffffffffffffffffffff163b119050919050565b6060831561156f578290506115bf565b6000835111156115825782518084602001fd5b816040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016115b69190611c29565b60405180910390fd5b9392505050565b6000813590506115d581612081565b92915050565b6000815190506115ea81612098565b92915050565b6000813590506115ff816120af565b92915050565b600081519050611614816120af565b92915050565b6000806040838503121561163157611630611f38565b5b600061163f858286016115c6565b9250506020611650858286016115f0565b9150509250929050565b6000806000806080858703121561167457611673611f38565b5b6000611682878288016115c6565b9450506020611693878288016115f0565b93505060406116a4878288016115c6565b92505060606116b5878288016115f0565b91505092959194509250565b6000806000606084860312156116da576116d9611f38565b5b60006116e8868287016115c6565b93505060206116f9868287016115f0565b925050604061170a868287016115f0565b9150509250925092565b60006020828403121561172a57611729611f38565b5b6000611738848285016115db565b91505092915050565b60006020828403121561175757611756611f38565b5b600061176584828501611605565b91505092915050565b61177781611e01565b82525050565b61178681611e01565b82525050565b61179d61179882611e01565b611ed3565b82525050565b60006117ae82611d68565b6117b88185611d7e565b93506117c8818560208601611ea0565b6117d181611f3d565b840191505092915050565b60006117e782611d68565b6117f18185611d8f565b9350611801818560208601611ea0565b80840191505092915050565b61181681611e58565b82525050565b61182581611e6a565b82525050565b600061183682611d73565b6118408185611d9a565b9350611850818560208601611ea0565b61185981611f3d565b840191505092915050565b6000611871602683611d9a565b915061187c82611f68565b604082019050919050565b6000611894600083611d8f565b915061189f82611fb7565b600082019050919050565b60006118b7601d83611d9a565b91506118c282611fba565b602082019050919050565b60006118da602a83611d9a565b91506118e582611fe3565b604082019050919050565b60006118fd603683611d9a565b915061190882612032565b604082019050919050565b600060a083016000830151848203600086015261193082826117a3565b9150506020830151611945602086018261176e565b5060408301516119586040860182611a6f565b50606083015161196b6060860182611a6f565b50608083015161197e6080860182611a6f565b508091505092915050565b610100820160008201516119a0600085018261176e565b5060208201516119b3602085018261176e565b5060408201516119c66040850182611a3a565b5060608201516119d9606085018261176e565b5060808201516119ec6080850182611a6f565b5060a08201516119ff60a0850182611a6f565b5060c0820151611a1260c0850182611a6f565b5060e0820151611a2560e0850182611a2b565b50505050565b611a3481611e1f565b82525050565b611a4381611e3f565b82525050565b611a5281611e3f565b82525050565b611a69611a6482611e3f565b611ef7565b82525050565b611a7881611e4e565b82525050565b611a8781611e4e565b82525050565b6000611a99828861178c565b601482019150611aa98287611a58565b600382019150611ab9828661178c565b601482019150611ac98285611a58565b600382019150611ad9828461178c565b6014820191508190509695505050505050565b6000611af882846117dc565b915081905092915050565b6000611b0e82611887565b9150819050919050565b6000602082019050611b2d600083018461177d565b92915050565b6000604082019050611b48600083018561177d565b611b55602083018461177d565b9392505050565b6000606082019050611b71600083018661177d565b611b7e602083018561177d565b611b8b6040830184611a7e565b949350505050565b6000604082019050611ba8600083018561177d565b611bb56020830184611a7e565b9392505050565b6000606082019050611bd1600083018661177d565b611bde6020830185611a7e565b611beb6040830184611a7e565b949350505050565b6000602082019050611c08600083018461180d565b92915050565b6000602082019050611c23600083018461181c565b92915050565b60006020820190508181036000830152611c43818461182b565b905092915050565b60006020820190508181036000830152611c6481611864565b9050919050565b60006020820190508181036000830152611c84816118aa565b9050919050565b60006020820190508181036000830152611ca4816118cd565b9050919050565b60006020820190508181036000830152611cc4816118f0565b9050919050565b60006020820190508181036000830152611ce58184611913565b905092915050565b600061010082019050611d036000830184611989565b92915050565b6000602082019050611d1e6000830184611a49565b92915050565b6000602082019050611d396000830184611a7e565b92915050565b6000604082019050611d546000830185611a7e565b611d616020830184611a7e565b9392505050565b600081519050919050565b600081519050919050565b600082825260208201905092915050565b600081905092915050565b600082825260208201905092915050565b6000611db682611e4e565b9150611dc183611e4e565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff03821115611df657611df5611f09565b5b828201905092915050565b6000611e0c82611e1f565b9050919050565b60008115159050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600062ffffff82169050919050565b6000819050919050565b6000611e6382611e7c565b9050919050565b6000611e7582611e7c565b9050919050565b6000611e8782611e8e565b9050919050565b6000611e9982611e1f565b9050919050565b60005b83811015611ebe578082015181840152602081019050611ea3565b83811115611ecd576000848401525b50505050565b6000611ede82611ee5565b9050919050565b6000611ef082611f5b565b9050919050565b6000611f0282611f4e565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b600080fd5b6000601f19601f8301169050919050565b60008160e81b9050919050565b60008160601b9050919050565b7f416464726573733a20696e73756666696369656e742062616c616e636520666f60008201527f722063616c6c0000000000000000000000000000000000000000000000000000602082015250565b50565b7f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000600082015250565b7f5361666545524332303a204552433230206f7065726174696f6e20646964206e60008201527f6f74207375636365656400000000000000000000000000000000000000000000602082015250565b7f5361666545524332303a20617070726f76652066726f6d206e6f6e2d7a65726f60008201527f20746f206e6f6e2d7a65726f20616c6c6f77616e636500000000000000000000602082015250565b61208a81611e01565b811461209557600080fd5b50565b6120a181611e13565b81146120ac57600080fd5b50565b6120b881611e4e565b81146120c357600080fd5b5056fea2646970667358221220bbd48d1862206b4a9735481938fe5084525307c377e3f16b30446631777ac5e764736f6c63430008070033"; + +type ZetaTokenConsumerUniV3ConstructorParams = + | [signer?: Signer] + | ConstructorParameters; + +const isSuperArgs = ( + xs: ZetaTokenConsumerUniV3ConstructorParams +): xs is ConstructorParameters => xs.length > 1; + +export class ZetaTokenConsumerUniV3__factory extends ContractFactory { + constructor(...args: ZetaTokenConsumerUniV3ConstructorParams) { + if (isSuperArgs(args)) { + super(...args); + } else { + super(_abi, _bytecode, args[0]); + } + } + + override deploy( + zetaToken_: string, + uniswapV3Router_: string, + quoter_: string, + WETH9Address_: string, + zetaPoolFee_: BigNumberish, + tokenPoolFee_: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise { + return super.deploy( + zetaToken_, + uniswapV3Router_, + quoter_, + WETH9Address_, + zetaPoolFee_, + tokenPoolFee_, + overrides || {} + ) as Promise; + } + override getDeployTransaction( + zetaToken_: string, + uniswapV3Router_: string, + quoter_: string, + WETH9Address_: string, + zetaPoolFee_: BigNumberish, + tokenPoolFee_: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): TransactionRequest { + return super.getDeployTransaction( + zetaToken_, + uniswapV3Router_, + quoter_, + WETH9Address_, + zetaPoolFee_, + tokenPoolFee_, + overrides || {} + ); + } + override attach(address: string): ZetaTokenConsumerUniV3 { + return super.attach(address) as ZetaTokenConsumerUniV3; + } + override connect(signer: Signer): ZetaTokenConsumerUniV3__factory { + return super.connect(signer) as ZetaTokenConsumerUniV3__factory; + } + + static readonly bytecode = _bytecode; + static readonly abi = _abi; + static createInterface(): ZetaTokenConsumerUniV3Interface { + return new utils.Interface(_abi) as ZetaTokenConsumerUniV3Interface; + } + static connect( + address: string, + signerOrProvider: Signer | Provider + ): ZetaTokenConsumerUniV3 { + return new Contract( + address, + _abi, + signerOrProvider + ) as ZetaTokenConsumerUniV3; + } +} diff --git a/packages/interfaces/typechain-types/factories/contracts/ZetaTokenConsumerUniV3.strategy.sol/index.ts b/packages/interfaces/typechain-types/factories/contracts/ZetaTokenConsumerUniV3.strategy.sol/index.ts new file mode 100644 index 00000000..ed161d53 --- /dev/null +++ b/packages/interfaces/typechain-types/factories/contracts/ZetaTokenConsumerUniV3.strategy.sol/index.ts @@ -0,0 +1,6 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +export { WETH9__factory } from "./WETH9__factory"; +export { ZetaTokenConsumerUniV3__factory } from "./ZetaTokenConsumerUniV3__factory"; +export { ZetaTokenConsumerUniV3Errors__factory } from "./ZetaTokenConsumerUniV3Errors__factory"; diff --git a/packages/interfaces/typechain-types/factories/contracts/index.ts b/packages/interfaces/typechain-types/factories/contracts/index.ts new file mode 100644 index 00000000..7584b68e --- /dev/null +++ b/packages/interfaces/typechain-types/factories/contracts/index.ts @@ -0,0 +1,14 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +export * as zetaEthSol from "./Zeta.eth.sol"; +export * as zetaNonEthSol from "./Zeta.non-eth.sol"; +export * as zetaConnectorBaseSol from "./ZetaConnector.base.sol"; +export * as zetaConnectorEthSol from "./ZetaConnector.eth.sol"; +export * as zetaConnectorNonEthSol from "./ZetaConnector.non-eth.sol"; +export * as zetaTokenConsumerUniV2StrategySol from "./ZetaTokenConsumerUniV2.strategy.sol"; +export * as zetaTokenConsumerUniV3StrategySol from "./ZetaTokenConsumerUniV3.strategy.sol"; +export * as interfaces from "./interfaces"; +export * as testing from "./testing"; +export { ImmutableCreate2Factory__factory } from "./ImmutableCreate2Factory__factory"; +export { ZetaInteractor__factory } from "./ZetaInteractor__factory"; diff --git a/packages/interfaces/typechain-types/factories/contracts/interfaces/ConnectorErrors__factory.ts b/packages/interfaces/typechain-types/factories/contracts/interfaces/ConnectorErrors__factory.ts new file mode 100644 index 00000000..6594e084 --- /dev/null +++ b/packages/interfaces/typechain-types/factories/contracts/interfaces/ConnectorErrors__factory.ts @@ -0,0 +1,91 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ + +import { Contract, Signer, utils } from "ethers"; +import type { Provider } from "@ethersproject/providers"; +import type { + ConnectorErrors, + ConnectorErrorsInterface, +} from "../../../contracts/interfaces/ConnectorErrors"; + +const _abi = [ + { + inputs: [ + { + internalType: "address", + name: "caller", + type: "address", + }, + ], + name: "CallerIsNotPauser", + type: "error", + }, + { + inputs: [ + { + internalType: "address", + name: "caller", + type: "address", + }, + ], + name: "CallerIsNotTss", + type: "error", + }, + { + inputs: [ + { + internalType: "address", + name: "caller", + type: "address", + }, + ], + name: "CallerIsNotTssOrUpdater", + type: "error", + }, + { + inputs: [ + { + internalType: "address", + name: "caller", + type: "address", + }, + ], + name: "CallerIsNotTssUpdater", + type: "error", + }, + { + inputs: [ + { + internalType: "uint256", + name: "maxSupply", + type: "uint256", + }, + ], + name: "ExceedsMaxSupply", + type: "error", + }, + { + inputs: [], + name: "InvalidAddress", + type: "error", + }, + { + inputs: [], + name: "ZetaTransferError", + type: "error", + }, +]; + +export class ConnectorErrors__factory { + static readonly abi = _abi; + static createInterface(): ConnectorErrorsInterface { + return new utils.Interface(_abi) as ConnectorErrorsInterface; + } + static connect( + address: string, + signerOrProvider: Signer | Provider + ): ConnectorErrors { + return new Contract(address, _abi, signerOrProvider) as ConnectorErrors; + } +} diff --git a/packages/interfaces/typechain-types/factories/contracts/interfaces/ZetaErrors__factory.ts b/packages/interfaces/typechain-types/factories/contracts/interfaces/ZetaErrors__factory.ts new file mode 100644 index 00000000..5f13d747 --- /dev/null +++ b/packages/interfaces/typechain-types/factories/contracts/interfaces/ZetaErrors__factory.ts @@ -0,0 +1,80 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ + +import { Contract, Signer, utils } from "ethers"; +import type { Provider } from "@ethersproject/providers"; +import type { + ZetaErrors, + ZetaErrorsInterface, +} from "../../../contracts/interfaces/ZetaErrors"; + +const _abi = [ + { + inputs: [ + { + internalType: "address", + name: "caller", + type: "address", + }, + ], + name: "CallerIsNotConnector", + type: "error", + }, + { + inputs: [ + { + internalType: "address", + name: "caller", + type: "address", + }, + ], + name: "CallerIsNotTss", + type: "error", + }, + { + inputs: [ + { + internalType: "address", + name: "caller", + type: "address", + }, + ], + name: "CallerIsNotTssOrUpdater", + type: "error", + }, + { + inputs: [ + { + internalType: "address", + name: "caller", + type: "address", + }, + ], + name: "CallerIsNotTssUpdater", + type: "error", + }, + { + inputs: [], + name: "InvalidAddress", + type: "error", + }, + { + inputs: [], + name: "ZetaTransferError", + type: "error", + }, +]; + +export class ZetaErrors__factory { + static readonly abi = _abi; + static createInterface(): ZetaErrorsInterface { + return new utils.Interface(_abi) as ZetaErrorsInterface; + } + static connect( + address: string, + signerOrProvider: Signer | Provider + ): ZetaErrors { + return new Contract(address, _abi, signerOrProvider) as ZetaErrors; + } +} diff --git a/packages/interfaces/typechain-types/factories/contracts/interfaces/ZetaInteractorErrors__factory.ts b/packages/interfaces/typechain-types/factories/contracts/interfaces/ZetaInteractorErrors__factory.ts new file mode 100644 index 00000000..cbeed5bc --- /dev/null +++ b/packages/interfaces/typechain-types/factories/contracts/interfaces/ZetaInteractorErrors__factory.ts @@ -0,0 +1,56 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ + +import { Contract, Signer, utils } from "ethers"; +import type { Provider } from "@ethersproject/providers"; +import type { + ZetaInteractorErrors, + ZetaInteractorErrorsInterface, +} from "../../../contracts/interfaces/ZetaInteractorErrors"; + +const _abi = [ + { + inputs: [ + { + internalType: "address", + name: "caller", + type: "address", + }, + ], + name: "InvalidCaller", + type: "error", + }, + { + inputs: [], + name: "InvalidDestinationChainId", + type: "error", + }, + { + inputs: [], + name: "InvalidZetaMessageCall", + type: "error", + }, + { + inputs: [], + name: "InvalidZetaRevertCall", + type: "error", + }, +]; + +export class ZetaInteractorErrors__factory { + static readonly abi = _abi; + static createInterface(): ZetaInteractorErrorsInterface { + return new utils.Interface(_abi) as ZetaInteractorErrorsInterface; + } + static connect( + address: string, + signerOrProvider: Signer | Provider + ): ZetaInteractorErrors { + return new Contract( + address, + _abi, + signerOrProvider + ) as ZetaInteractorErrors; + } +} diff --git a/packages/interfaces/typechain-types/factories/contracts/interfaces/ZetaInterfaces.sol/ZetaConnector__factory.ts b/packages/interfaces/typechain-types/factories/contracts/interfaces/ZetaInterfaces.sol/ZetaConnector__factory.ts new file mode 100644 index 00000000..465d2798 --- /dev/null +++ b/packages/interfaces/typechain-types/factories/contracts/interfaces/ZetaInterfaces.sol/ZetaConnector__factory.ts @@ -0,0 +1,71 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ + +import { Contract, Signer, utils } from "ethers"; +import type { Provider } from "@ethersproject/providers"; +import type { + ZetaConnector, + ZetaConnectorInterface, +} from "../../../../contracts/interfaces/ZetaInterfaces.sol/ZetaConnector"; + +const _abi = [ + { + inputs: [ + { + components: [ + { + internalType: "uint256", + name: "destinationChainId", + type: "uint256", + }, + { + internalType: "bytes", + name: "destinationAddress", + type: "bytes", + }, + { + internalType: "uint256", + name: "destinationGasLimit", + type: "uint256", + }, + { + internalType: "bytes", + name: "message", + type: "bytes", + }, + { + internalType: "uint256", + name: "zetaValueAndGas", + type: "uint256", + }, + { + internalType: "bytes", + name: "zetaParams", + type: "bytes", + }, + ], + internalType: "struct ZetaInterfaces.SendInput", + name: "input", + type: "tuple", + }, + ], + name: "send", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, +]; + +export class ZetaConnector__factory { + static readonly abi = _abi; + static createInterface(): ZetaConnectorInterface { + return new utils.Interface(_abi) as ZetaConnectorInterface; + } + static connect( + address: string, + signerOrProvider: Signer | Provider + ): ZetaConnector { + return new Contract(address, _abi, signerOrProvider) as ZetaConnector; + } +} diff --git a/packages/interfaces/typechain-types/factories/contracts/interfaces/ZetaInterfaces.sol/ZetaReceiver__factory.ts b/packages/interfaces/typechain-types/factories/contracts/interfaces/ZetaInterfaces.sol/ZetaReceiver__factory.ts new file mode 100644 index 00000000..8728bc4b --- /dev/null +++ b/packages/interfaces/typechain-types/factories/contracts/interfaces/ZetaInterfaces.sol/ZetaReceiver__factory.ts @@ -0,0 +1,111 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ + +import { Contract, Signer, utils } from "ethers"; +import type { Provider } from "@ethersproject/providers"; +import type { + ZetaReceiver, + ZetaReceiverInterface, +} from "../../../../contracts/interfaces/ZetaInterfaces.sol/ZetaReceiver"; + +const _abi = [ + { + inputs: [ + { + components: [ + { + internalType: "bytes", + name: "zetaTxSenderAddress", + type: "bytes", + }, + { + internalType: "uint256", + name: "sourceChainId", + type: "uint256", + }, + { + internalType: "address", + name: "destinationAddress", + type: "address", + }, + { + internalType: "uint256", + name: "zetaValueAndGas", + type: "uint256", + }, + { + internalType: "bytes", + name: "message", + type: "bytes", + }, + ], + internalType: "struct ZetaInterfaces.ZetaMessage", + name: "zetaMessage", + type: "tuple", + }, + ], + name: "onZetaMessage", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + components: [ + { + internalType: "address", + name: "zetaTxSenderAddress", + type: "address", + }, + { + internalType: "uint256", + name: "sourceChainId", + type: "uint256", + }, + { + internalType: "bytes", + name: "destinationAddress", + type: "bytes", + }, + { + internalType: "uint256", + name: "destinationChainId", + type: "uint256", + }, + { + internalType: "uint256", + name: "zetaValueAndGas", + type: "uint256", + }, + { + internalType: "bytes", + name: "message", + type: "bytes", + }, + ], + internalType: "struct ZetaInterfaces.ZetaRevert", + name: "zetaRevert", + type: "tuple", + }, + ], + name: "onZetaRevert", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, +]; + +export class ZetaReceiver__factory { + static readonly abi = _abi; + static createInterface(): ZetaReceiverInterface { + return new utils.Interface(_abi) as ZetaReceiverInterface; + } + static connect( + address: string, + signerOrProvider: Signer | Provider + ): ZetaReceiver { + return new Contract(address, _abi, signerOrProvider) as ZetaReceiver; + } +} diff --git a/packages/interfaces/typechain-types/factories/contracts/interfaces/ZetaInterfaces.sol/ZetaTokenConsumer__factory.ts b/packages/interfaces/typechain-types/factories/contracts/interfaces/ZetaInterfaces.sol/ZetaTokenConsumer__factory.ts new file mode 100644 index 00000000..f325f41a --- /dev/null +++ b/packages/interfaces/typechain-types/factories/contracts/interfaces/ZetaInterfaces.sol/ZetaTokenConsumer__factory.ts @@ -0,0 +1,235 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ + +import { Contract, Signer, utils } from "ethers"; +import type { Provider } from "@ethersproject/providers"; +import type { + ZetaTokenConsumer, + ZetaTokenConsumerInterface, +} from "../../../../contracts/interfaces/ZetaInterfaces.sol/ZetaTokenConsumer"; + +const _abi = [ + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "uint256", + name: "amountIn", + type: "uint256", + }, + { + indexed: false, + internalType: "uint256", + name: "amountOut", + type: "uint256", + }, + ], + name: "EthExchangedForZeta", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "address", + name: "token", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "amountIn", + type: "uint256", + }, + { + indexed: false, + internalType: "uint256", + name: "amountOut", + type: "uint256", + }, + ], + name: "TokenExchangedForZeta", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "uint256", + name: "amountIn", + type: "uint256", + }, + { + indexed: false, + internalType: "uint256", + name: "amountOut", + type: "uint256", + }, + ], + name: "ZetaExchangedForEth", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "address", + name: "token", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "amountIn", + type: "uint256", + }, + { + indexed: false, + internalType: "uint256", + name: "amountOut", + type: "uint256", + }, + ], + name: "ZetaExchangedForToken", + type: "event", + }, + { + inputs: [ + { + internalType: "address", + name: "destinationAddress", + type: "address", + }, + { + internalType: "uint256", + name: "minAmountOut", + type: "uint256", + }, + { + internalType: "uint256", + name: "zetaTokenAmount", + type: "uint256", + }, + ], + name: "getEthFromZeta", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "destinationAddress", + type: "address", + }, + { + internalType: "uint256", + name: "minAmountOut", + type: "uint256", + }, + { + internalType: "address", + name: "outputToken", + type: "address", + }, + { + internalType: "uint256", + name: "zetaTokenAmount", + type: "uint256", + }, + ], + name: "getTokenFromZeta", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "destinationAddress", + type: "address", + }, + { + internalType: "uint256", + name: "minAmountOut", + type: "uint256", + }, + ], + name: "getZetaFromEth", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "payable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "destinationAddress", + type: "address", + }, + { + internalType: "uint256", + name: "minAmountOut", + type: "uint256", + }, + { + internalType: "address", + name: "inputToken", + type: "address", + }, + { + internalType: "uint256", + name: "inputTokenAmount", + type: "uint256", + }, + ], + name: "getZetaFromToken", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, +]; + +export class ZetaTokenConsumer__factory { + static readonly abi = _abi; + static createInterface(): ZetaTokenConsumerInterface { + return new utils.Interface(_abi) as ZetaTokenConsumerInterface; + } + static connect( + address: string, + signerOrProvider: Signer | Provider + ): ZetaTokenConsumer { + return new Contract(address, _abi, signerOrProvider) as ZetaTokenConsumer; + } +} diff --git a/packages/interfaces/typechain-types/factories/contracts/interfaces/ZetaInterfaces.sol/index.ts b/packages/interfaces/typechain-types/factories/contracts/interfaces/ZetaInterfaces.sol/index.ts new file mode 100644 index 00000000..09fee2da --- /dev/null +++ b/packages/interfaces/typechain-types/factories/contracts/interfaces/ZetaInterfaces.sol/index.ts @@ -0,0 +1,6 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +export { ZetaConnector__factory } from "./ZetaConnector__factory"; +export { ZetaReceiver__factory } from "./ZetaReceiver__factory"; +export { ZetaTokenConsumer__factory } from "./ZetaTokenConsumer__factory"; diff --git a/packages/interfaces/typechain-types/factories/contracts/interfaces/ZetaNonEthInterface__factory.ts b/packages/interfaces/typechain-types/factories/contracts/interfaces/ZetaNonEthInterface__factory.ts new file mode 100644 index 00000000..366b8ca3 --- /dev/null +++ b/packages/interfaces/typechain-types/factories/contracts/interfaces/ZetaNonEthInterface__factory.ts @@ -0,0 +1,250 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ + +import { Contract, Signer, utils } from "ethers"; +import type { Provider } from "@ethersproject/providers"; +import type { + ZetaNonEthInterface, + ZetaNonEthInterfaceInterface, +} from "../../../contracts/interfaces/ZetaNonEthInterface"; + +const _abi = [ + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "owner", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "spender", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "value", + type: "uint256", + }, + ], + name: "Approval", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "from", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "to", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "value", + type: "uint256", + }, + ], + name: "Transfer", + type: "event", + }, + { + inputs: [ + { + internalType: "address", + name: "owner", + type: "address", + }, + { + internalType: "address", + name: "spender", + type: "address", + }, + ], + name: "allowance", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "spender", + type: "address", + }, + { + internalType: "uint256", + name: "amount", + type: "uint256", + }, + ], + name: "approve", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "account", + type: "address", + }, + ], + name: "balanceOf", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "account", + type: "address", + }, + { + internalType: "uint256", + name: "amount", + type: "uint256", + }, + ], + name: "burnFrom", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "mintee", + type: "address", + }, + { + internalType: "uint256", + name: "value", + type: "uint256", + }, + { + internalType: "bytes32", + name: "internalSendHash", + type: "bytes32", + }, + ], + name: "mint", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "totalSupply", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "to", + type: "address", + }, + { + internalType: "uint256", + name: "amount", + type: "uint256", + }, + ], + name: "transfer", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "from", + type: "address", + }, + { + internalType: "address", + name: "to", + type: "address", + }, + { + internalType: "uint256", + name: "amount", + type: "uint256", + }, + ], + name: "transferFrom", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, +]; + +export class ZetaNonEthInterface__factory { + static readonly abi = _abi; + static createInterface(): ZetaNonEthInterfaceInterface { + return new utils.Interface(_abi) as ZetaNonEthInterfaceInterface; + } + static connect( + address: string, + signerOrProvider: Signer | Provider + ): ZetaNonEthInterface { + return new Contract(address, _abi, signerOrProvider) as ZetaNonEthInterface; + } +} diff --git a/packages/interfaces/typechain-types/factories/contracts/interfaces/index.ts b/packages/interfaces/typechain-types/factories/contracts/interfaces/index.ts new file mode 100644 index 00000000..4ca02cf7 --- /dev/null +++ b/packages/interfaces/typechain-types/factories/contracts/interfaces/index.ts @@ -0,0 +1,8 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +export * as zetaInterfacesSol from "./ZetaInterfaces.sol"; +export { ConnectorErrors__factory } from "./ConnectorErrors__factory"; +export { ZetaErrors__factory } from "./ZetaErrors__factory"; +export { ZetaInteractorErrors__factory } from "./ZetaInteractorErrors__factory"; +export { ZetaNonEthInterface__factory } from "./ZetaNonEthInterface__factory"; diff --git a/packages/interfaces/typechain-types/factories/contracts/testing/TestUniswapV3Contracts.sol/INonfungiblePositionManager__factory.ts b/packages/interfaces/typechain-types/factories/contracts/testing/TestUniswapV3Contracts.sol/INonfungiblePositionManager__factory.ts new file mode 100644 index 00000000..bf097a3f --- /dev/null +++ b/packages/interfaces/typechain-types/factories/contracts/testing/TestUniswapV3Contracts.sol/INonfungiblePositionManager__factory.ts @@ -0,0 +1,461 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ + +import { Contract, Signer, utils } from "ethers"; +import type { Provider } from "@ethersproject/providers"; +import type { + INonfungiblePositionManager, + INonfungiblePositionManagerInterface, +} from "../../../../contracts/testing/TestUniswapV3Contracts.sol/INonfungiblePositionManager"; + +const _abi = [ + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "uint256", + name: "tokenId", + type: "uint256", + }, + { + indexed: false, + internalType: "address", + name: "recipient", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "amount0", + type: "uint256", + }, + { + indexed: false, + internalType: "uint256", + name: "amount1", + type: "uint256", + }, + ], + name: "Collect", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "uint256", + name: "tokenId", + type: "uint256", + }, + { + indexed: false, + internalType: "uint128", + name: "liquidity", + type: "uint128", + }, + { + indexed: false, + internalType: "uint256", + name: "amount0", + type: "uint256", + }, + { + indexed: false, + internalType: "uint256", + name: "amount1", + type: "uint256", + }, + ], + name: "DecreaseLiquidity", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "uint256", + name: "tokenId", + type: "uint256", + }, + { + indexed: false, + internalType: "uint128", + name: "liquidity", + type: "uint128", + }, + { + indexed: false, + internalType: "uint256", + name: "amount0", + type: "uint256", + }, + { + indexed: false, + internalType: "uint256", + name: "amount1", + type: "uint256", + }, + ], + name: "IncreaseLiquidity", + type: "event", + }, + { + inputs: [ + { + internalType: "uint256", + name: "tokenId", + type: "uint256", + }, + ], + name: "burn", + outputs: [], + stateMutability: "payable", + type: "function", + }, + { + inputs: [ + { + components: [ + { + internalType: "uint256", + name: "tokenId", + type: "uint256", + }, + { + internalType: "address", + name: "recipient", + type: "address", + }, + { + internalType: "uint128", + name: "amount0Max", + type: "uint128", + }, + { + internalType: "uint128", + name: "amount1Max", + type: "uint128", + }, + ], + internalType: "struct INonfungiblePositionManager.CollectParams", + name: "params", + type: "tuple", + }, + ], + name: "collect", + outputs: [ + { + internalType: "uint256", + name: "amount0", + type: "uint256", + }, + { + internalType: "uint256", + name: "amount1", + type: "uint256", + }, + ], + stateMutability: "payable", + type: "function", + }, + { + inputs: [ + { + components: [ + { + internalType: "uint256", + name: "tokenId", + type: "uint256", + }, + { + internalType: "uint128", + name: "liquidity", + type: "uint128", + }, + { + internalType: "uint256", + name: "amount0Min", + type: "uint256", + }, + { + internalType: "uint256", + name: "amount1Min", + type: "uint256", + }, + { + internalType: "uint256", + name: "deadline", + type: "uint256", + }, + ], + internalType: + "struct INonfungiblePositionManager.DecreaseLiquidityParams", + name: "params", + type: "tuple", + }, + ], + name: "decreaseLiquidity", + outputs: [ + { + internalType: "uint256", + name: "amount0", + type: "uint256", + }, + { + internalType: "uint256", + name: "amount1", + type: "uint256", + }, + ], + stateMutability: "payable", + type: "function", + }, + { + inputs: [ + { + components: [ + { + internalType: "uint256", + name: "tokenId", + type: "uint256", + }, + { + internalType: "uint256", + name: "amount0Desired", + type: "uint256", + }, + { + internalType: "uint256", + name: "amount1Desired", + type: "uint256", + }, + { + internalType: "uint256", + name: "amount0Min", + type: "uint256", + }, + { + internalType: "uint256", + name: "amount1Min", + type: "uint256", + }, + { + internalType: "uint256", + name: "deadline", + type: "uint256", + }, + ], + internalType: + "struct INonfungiblePositionManager.IncreaseLiquidityParams", + name: "params", + type: "tuple", + }, + ], + name: "increaseLiquidity", + outputs: [ + { + internalType: "uint128", + name: "liquidity", + type: "uint128", + }, + { + internalType: "uint256", + name: "amount0", + type: "uint256", + }, + { + internalType: "uint256", + name: "amount1", + type: "uint256", + }, + ], + stateMutability: "payable", + type: "function", + }, + { + inputs: [ + { + components: [ + { + internalType: "address", + name: "token0", + type: "address", + }, + { + internalType: "address", + name: "token1", + type: "address", + }, + { + internalType: "uint24", + name: "fee", + type: "uint24", + }, + { + internalType: "int24", + name: "tickLower", + type: "int24", + }, + { + internalType: "int24", + name: "tickUpper", + type: "int24", + }, + { + internalType: "uint256", + name: "amount0Desired", + type: "uint256", + }, + { + internalType: "uint256", + name: "amount1Desired", + type: "uint256", + }, + { + internalType: "uint256", + name: "amount0Min", + type: "uint256", + }, + { + internalType: "uint256", + name: "amount1Min", + type: "uint256", + }, + { + internalType: "address", + name: "recipient", + type: "address", + }, + { + internalType: "uint256", + name: "deadline", + type: "uint256", + }, + ], + internalType: "struct INonfungiblePositionManager.MintParams", + name: "params", + type: "tuple", + }, + ], + name: "mint", + outputs: [ + { + internalType: "uint256", + name: "tokenId", + type: "uint256", + }, + { + internalType: "uint128", + name: "liquidity", + type: "uint128", + }, + { + internalType: "uint256", + name: "amount0", + type: "uint256", + }, + { + internalType: "uint256", + name: "amount1", + type: "uint256", + }, + ], + stateMutability: "payable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "tokenId", + type: "uint256", + }, + ], + name: "positions", + outputs: [ + { + internalType: "uint96", + name: "nonce", + type: "uint96", + }, + { + internalType: "address", + name: "operator", + type: "address", + }, + { + internalType: "address", + name: "token0", + type: "address", + }, + { + internalType: "address", + name: "token1", + type: "address", + }, + { + internalType: "uint24", + name: "fee", + type: "uint24", + }, + { + internalType: "int24", + name: "tickLower", + type: "int24", + }, + { + internalType: "int24", + name: "tickUpper", + type: "int24", + }, + { + internalType: "uint128", + name: "liquidity", + type: "uint128", + }, + { + internalType: "uint256", + name: "feeGrowthInside0LastX128", + type: "uint256", + }, + { + internalType: "uint256", + name: "feeGrowthInside1LastX128", + type: "uint256", + }, + { + internalType: "uint128", + name: "tokensOwed0", + type: "uint128", + }, + { + internalType: "uint128", + name: "tokensOwed1", + type: "uint128", + }, + ], + stateMutability: "view", + type: "function", + }, +]; + +export class INonfungiblePositionManager__factory { + static readonly abi = _abi; + static createInterface(): INonfungiblePositionManagerInterface { + return new utils.Interface(_abi) as INonfungiblePositionManagerInterface; + } + static connect( + address: string, + signerOrProvider: Signer | Provider + ): INonfungiblePositionManager { + return new Contract( + address, + _abi, + signerOrProvider + ) as INonfungiblePositionManager; + } +} diff --git a/packages/interfaces/typechain-types/factories/contracts/testing/TestUniswapV3Contracts.sol/IPoolInitializer__factory.ts b/packages/interfaces/typechain-types/factories/contracts/testing/TestUniswapV3Contracts.sol/IPoolInitializer__factory.ts new file mode 100644 index 00000000..9081a53e --- /dev/null +++ b/packages/interfaces/typechain-types/factories/contracts/testing/TestUniswapV3Contracts.sol/IPoolInitializer__factory.ts @@ -0,0 +1,60 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ + +import { Contract, Signer, utils } from "ethers"; +import type { Provider } from "@ethersproject/providers"; +import type { + IPoolInitializer, + IPoolInitializerInterface, +} from "../../../../contracts/testing/TestUniswapV3Contracts.sol/IPoolInitializer"; + +const _abi = [ + { + inputs: [ + { + internalType: "address", + name: "token0", + type: "address", + }, + { + internalType: "address", + name: "token1", + type: "address", + }, + { + internalType: "uint24", + name: "fee", + type: "uint24", + }, + { + internalType: "uint160", + name: "sqrtPriceX96", + type: "uint160", + }, + ], + name: "createAndInitializePoolIfNecessary", + outputs: [ + { + internalType: "address", + name: "pool", + type: "address", + }, + ], + stateMutability: "payable", + type: "function", + }, +]; + +export class IPoolInitializer__factory { + static readonly abi = _abi; + static createInterface(): IPoolInitializerInterface { + return new utils.Interface(_abi) as IPoolInitializerInterface; + } + static connect( + address: string, + signerOrProvider: Signer | Provider + ): IPoolInitializer { + return new Contract(address, _abi, signerOrProvider) as IPoolInitializer; + } +} diff --git a/packages/interfaces/typechain-types/factories/contracts/testing/TestUniswapV3Contracts.sol/index.ts b/packages/interfaces/typechain-types/factories/contracts/testing/TestUniswapV3Contracts.sol/index.ts new file mode 100644 index 00000000..9db2e56f --- /dev/null +++ b/packages/interfaces/typechain-types/factories/contracts/testing/TestUniswapV3Contracts.sol/index.ts @@ -0,0 +1,5 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +export { INonfungiblePositionManager__factory } from "./INonfungiblePositionManager__factory"; +export { IPoolInitializer__factory } from "./IPoolInitializer__factory"; diff --git a/packages/interfaces/typechain-types/factories/contracts/testing/ZetaInteractorMock__factory.ts b/packages/interfaces/typechain-types/factories/contracts/testing/ZetaInteractorMock__factory.ts new file mode 100644 index 00000000..74e00f03 --- /dev/null +++ b/packages/interfaces/typechain-types/factories/contracts/testing/ZetaInteractorMock__factory.ts @@ -0,0 +1,291 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import { Signer, utils, Contract, ContractFactory, Overrides } from "ethers"; +import type { Provider, TransactionRequest } from "@ethersproject/providers"; +import type { + ZetaInteractorMock, + ZetaInteractorMockInterface, +} from "../../../contracts/testing/ZetaInteractorMock"; + +const _abi = [ + { + inputs: [ + { + internalType: "address", + name: "zetaConnectorAddress", + type: "address", + }, + ], + stateMutability: "nonpayable", + type: "constructor", + }, + { + inputs: [ + { + internalType: "address", + name: "caller", + type: "address", + }, + ], + name: "InvalidCaller", + type: "error", + }, + { + inputs: [], + name: "InvalidDestinationChainId", + type: "error", + }, + { + inputs: [], + name: "InvalidZetaMessageCall", + type: "error", + }, + { + inputs: [], + name: "InvalidZetaRevertCall", + type: "error", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "previousOwner", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "newOwner", + type: "address", + }, + ], + name: "OwnershipTransferred", + type: "event", + }, + { + inputs: [], + name: "connector", + outputs: [ + { + internalType: "contract ZetaConnector", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + name: "interactorsByChainId", + outputs: [ + { + internalType: "bytes", + name: "", + type: "bytes", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + components: [ + { + internalType: "bytes", + name: "zetaTxSenderAddress", + type: "bytes", + }, + { + internalType: "uint256", + name: "sourceChainId", + type: "uint256", + }, + { + internalType: "address", + name: "destinationAddress", + type: "address", + }, + { + internalType: "uint256", + name: "zetaValueAndGas", + type: "uint256", + }, + { + internalType: "bytes", + name: "message", + type: "bytes", + }, + ], + internalType: "struct ZetaInterfaces.ZetaMessage", + name: "zetaMessage", + type: "tuple", + }, + ], + name: "onZetaMessage", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + components: [ + { + internalType: "address", + name: "zetaTxSenderAddress", + type: "address", + }, + { + internalType: "uint256", + name: "sourceChainId", + type: "uint256", + }, + { + internalType: "bytes", + name: "destinationAddress", + type: "bytes", + }, + { + internalType: "uint256", + name: "destinationChainId", + type: "uint256", + }, + { + internalType: "uint256", + name: "zetaValueAndGas", + type: "uint256", + }, + { + internalType: "bytes", + name: "message", + type: "bytes", + }, + ], + internalType: "struct ZetaInterfaces.ZetaRevert", + name: "zetaRevert", + type: "tuple", + }, + ], + name: "onZetaRevert", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "owner", + outputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "renounceOwnership", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "destinationChainId", + type: "uint256", + }, + { + internalType: "bytes", + name: "contractAddress", + type: "bytes", + }, + ], + name: "setInteractorByChainId", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "newOwner", + type: "address", + }, + ], + name: "transferOwnership", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, +]; + +const _bytecode = + "0x60c06040523480156200001157600080fd5b506040516200112538038062001125833981810160405281019062000037919062000182565b80620000586200004c6200009f60201b60201c565b620000a760201b60201c565b46608081815250508073ffffffffffffffffffffffffffffffffffffffff1660a08173ffffffffffffffffffffffffffffffffffffffff1660601b81525050505062000207565b600033905090565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050816000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b6000815190506200017c81620001ed565b92915050565b6000602082840312156200019b576200019a620001e8565b5b6000620001ab848285016200016b565b91505092915050565b6000620001c182620001c8565b9050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600080fd5b620001f881620001b4565b81146200020457600080fd5b50565b60805160a05160601c610eee62000237600039600081816104b801526105fd0152600061032b0152610eee6000f3fe608060405234801561001057600080fd5b50600436106100885760003560e01c8063715018a61161005b578063715018a61461011157806383f3084f1461011b5780638da5cb5b14610139578063f2fde38b1461015757610088565b80632618143f1461008d5780633749c51a146100bd5780633ff0693c146100d95780634fd3f7d7146100f5575b600080fd5b6100a760048036038101906100a29190610979565b610173565b6040516100b49190610b92565b60405180910390f35b6100d760048036038101906100d291906108e7565b610213565b005b6100f360048036038101906100ee9190610930565b6102a9565b005b61010f600480360381019061010a91906109a6565b61038a565b005b61011961042e565b005b6101236104b6565b6040516101309190610bb4565b60405180910390f35b6101416104da565b60405161014e9190610b77565b60405180910390f35b610171600480360381019061016c91906108ba565b610503565b005b6001602052806000526040600020600091509050805461019290610d73565b80601f01602080910402602001604051908101604052809291908181526020018280546101be90610d73565b801561020b5780601f106101e05761010080835404028352916020019161020b565b820191906000526020600020905b8154815290600101906020018083116101ee57829003601f168201915b505050505081565b8061021c6105fb565b60016000826020013581526020019081526020016000206040516102409190610b60565b60405180910390208180600001906102589190610c0f565b604051610266929190610b47565b6040518091039020146102a5576040517fb473eb0a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5050565b806102b26105fb565b3073ffffffffffffffffffffffffffffffffffffffff168160000160208101906102dc91906108ba565b73ffffffffffffffffffffffffffffffffffffffff1614610329576040517fc03e9c3f00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b7f0000000000000000000000000000000000000000000000000000000000000000816020013514610386576040517fc03e9c3f00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5050565b61039261068d565b73ffffffffffffffffffffffffffffffffffffffff166103b06104da565b73ffffffffffffffffffffffffffffffffffffffff1614610406576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016103fd90610bef565b60405180910390fd5b8181600160008681526020019081526020016000209190610428929190610759565b50505050565b61043661068d565b73ffffffffffffffffffffffffffffffffffffffff166104546104da565b73ffffffffffffffffffffffffffffffffffffffff16146104aa576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016104a190610bef565b60405180910390fd5b6104b46000610695565b565b7f000000000000000000000000000000000000000000000000000000000000000081565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b61050b61068d565b73ffffffffffffffffffffffffffffffffffffffff166105296104da565b73ffffffffffffffffffffffffffffffffffffffff161461057f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161057690610bef565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614156105ef576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016105e690610bcf565b60405180910390fd5b6105f881610695565b50565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461068b57336040517fcbd9d2e00000000000000000000000000000000000000000000000000000000081526004016106829190610b77565b60405180910390fd5b565b600033905090565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050816000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b82805461076590610d73565b90600052602060002090601f01602090048101928261078757600085556107ce565b82601f106107a057803560ff19168380011785556107ce565b828001600101855582156107ce579182015b828111156107cd5782358255916020019190600101906107b2565b5b5090506107db91906107df565b5090565b5b808211156107f85760008160009055506001016107e0565b5090565b60008135905061080b81610e8a565b92915050565b60008083601f84011261082757610826610dd9565b5b8235905067ffffffffffffffff81111561084457610843610dd4565b5b6020830191508360018202830111156108605761085f610ded565b5b9250929050565b600060a0828403121561087d5761087c610de3565b5b81905092915050565b600060c0828403121561089c5761089b610de3565b5b81905092915050565b6000813590506108b481610ea1565b92915050565b6000602082840312156108d0576108cf610dfc565b5b60006108de848285016107fc565b91505092915050565b6000602082840312156108fd576108fc610dfc565b5b600082013567ffffffffffffffff81111561091b5761091a610df7565b5b61092784828501610867565b91505092915050565b60006020828403121561094657610945610dfc565b5b600082013567ffffffffffffffff81111561096457610963610df7565b5b61097084828501610886565b91505092915050565b60006020828403121561098f5761098e610dfc565b5b600061099d848285016108a5565b91505092915050565b6000806000604084860312156109bf576109be610dfc565b5b60006109cd868287016108a5565b935050602084013567ffffffffffffffff8111156109ee576109ed610df7565b5b6109fa86828701610811565b92509250509250925092565b610a0f81610cbf565b82525050565b6000610a218385610ca3565b9350610a2e838584610d31565b82840190509392505050565b6000610a4582610c87565b610a4f8185610c92565b9350610a5f818560208601610d40565b610a6881610e01565b840191505092915050565b60008154610a8081610d73565b610a8a8186610ca3565b94506001821660008114610aa55760018114610ab657610ae9565b60ff19831686528186019350610ae9565b610abf85610c72565b60005b83811015610ae157815481890152600182019150602081019050610ac2565b838801955050505b50505092915050565b610afb81610cfb565b82525050565b6000610b0e602683610cae565b9150610b1982610e12565b604082019050919050565b6000610b31602083610cae565b9150610b3c82610e61565b602082019050919050565b6000610b54828486610a15565b91508190509392505050565b6000610b6c8284610a73565b915081905092915050565b6000602082019050610b8c6000830184610a06565b92915050565b60006020820190508181036000830152610bac8184610a3a565b905092915050565b6000602082019050610bc96000830184610af2565b92915050565b60006020820190508181036000830152610be881610b01565b9050919050565b60006020820190508181036000830152610c0881610b24565b9050919050565b60008083356001602003843603038112610c2c57610c2b610de8565b5b80840192508235915067ffffffffffffffff821115610c4e57610c4d610dde565b5b602083019250600182023603831315610c6a57610c69610df2565b5b509250929050565b60008190508160005260206000209050919050565b600081519050919050565b600082825260208201905092915050565b600081905092915050565b600082825260208201905092915050565b6000610cca82610cd1565b9050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b6000610d0682610d0d565b9050919050565b6000610d1882610d1f565b9050919050565b6000610d2a82610cd1565b9050919050565b82818337600083830152505050565b60005b83811015610d5e578082015181840152602081019050610d43565b83811115610d6d576000848401525b50505050565b60006002820490506001821680610d8b57607f821691505b60208210811415610d9f57610d9e610da5565b5b50919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160008201527f6464726573730000000000000000000000000000000000000000000000000000602082015250565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b610e9381610cbf565b8114610e9e57600080fd5b50565b610eaa81610cf1565b8114610eb557600080fd5b5056fea26469706673582212201411c4944e65f81c694af754f849d763a989f7c3c4b701aac94b0833e83f62b664736f6c63430008070033"; + +type ZetaInteractorMockConstructorParams = + | [signer?: Signer] + | ConstructorParameters; + +const isSuperArgs = ( + xs: ZetaInteractorMockConstructorParams +): xs is ConstructorParameters => xs.length > 1; + +export class ZetaInteractorMock__factory extends ContractFactory { + constructor(...args: ZetaInteractorMockConstructorParams) { + if (isSuperArgs(args)) { + super(...args); + } else { + super(_abi, _bytecode, args[0]); + } + } + + override deploy( + zetaConnectorAddress: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise { + return super.deploy( + zetaConnectorAddress, + overrides || {} + ) as Promise; + } + override getDeployTransaction( + zetaConnectorAddress: string, + overrides?: Overrides & { from?: string | Promise } + ): TransactionRequest { + return super.getDeployTransaction(zetaConnectorAddress, overrides || {}); + } + override attach(address: string): ZetaInteractorMock { + return super.attach(address) as ZetaInteractorMock; + } + override connect(signer: Signer): ZetaInteractorMock__factory { + return super.connect(signer) as ZetaInteractorMock__factory; + } + + static readonly bytecode = _bytecode; + static readonly abi = _abi; + static createInterface(): ZetaInteractorMockInterface { + return new utils.Interface(_abi) as ZetaInteractorMockInterface; + } + static connect( + address: string, + signerOrProvider: Signer | Provider + ): ZetaInteractorMock { + return new Contract(address, _abi, signerOrProvider) as ZetaInteractorMock; + } +} diff --git a/packages/interfaces/typechain-types/factories/contracts/testing/ZetaReceiverMock__factory.ts b/packages/interfaces/typechain-types/factories/contracts/testing/ZetaReceiverMock__factory.ts new file mode 100644 index 00000000..027c8d79 --- /dev/null +++ b/packages/interfaces/typechain-types/factories/contracts/testing/ZetaReceiverMock__factory.ts @@ -0,0 +1,173 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import { Signer, utils, Contract, ContractFactory, Overrides } from "ethers"; +import type { Provider, TransactionRequest } from "@ethersproject/providers"; +import type { + ZetaReceiverMock, + ZetaReceiverMockInterface, +} from "../../../contracts/testing/ZetaReceiverMock"; + +const _abi = [ + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "address", + name: "destinationAddress", + type: "address", + }, + ], + name: "MockOnZetaMessage", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "address", + name: "zetaTxSenderAddress", + type: "address", + }, + ], + name: "MockOnZetaRevert", + type: "event", + }, + { + inputs: [ + { + components: [ + { + internalType: "bytes", + name: "zetaTxSenderAddress", + type: "bytes", + }, + { + internalType: "uint256", + name: "sourceChainId", + type: "uint256", + }, + { + internalType: "address", + name: "destinationAddress", + type: "address", + }, + { + internalType: "uint256", + name: "zetaValueAndGas", + type: "uint256", + }, + { + internalType: "bytes", + name: "message", + type: "bytes", + }, + ], + internalType: "struct ZetaInterfaces.ZetaMessage", + name: "zetaMessage", + type: "tuple", + }, + ], + name: "onZetaMessage", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + components: [ + { + internalType: "address", + name: "zetaTxSenderAddress", + type: "address", + }, + { + internalType: "uint256", + name: "sourceChainId", + type: "uint256", + }, + { + internalType: "bytes", + name: "destinationAddress", + type: "bytes", + }, + { + internalType: "uint256", + name: "destinationChainId", + type: "uint256", + }, + { + internalType: "uint256", + name: "zetaValueAndGas", + type: "uint256", + }, + { + internalType: "bytes", + name: "message", + type: "bytes", + }, + ], + internalType: "struct ZetaInterfaces.ZetaRevert", + name: "zetaRevert", + type: "tuple", + }, + ], + name: "onZetaRevert", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, +]; + +const _bytecode = + "0x608060405234801561001057600080fd5b506102d5806100206000396000f3fe608060405234801561001057600080fd5b50600436106100365760003560e01c80633749c51a1461003b5780633ff0693c14610057575b600080fd5b6100556004803603810190610050919061018b565b610073565b005b610071600480360381019061006c91906101d4565b6100bf565b005b7f72a301dee3abcbe15615f3e253229bf4b4f508460603d674991c9a777b833c6e8160400160208101906100a7919061015e565b6040516100b4919061022c565b60405180910390a150565b7f53bd04e26f94f13ff43da96839541821041c309c6f624712192cbe3a2d133cc48160000160208101906100f3919061015e565b604051610100919061022c565b60405180910390a150565b60008135905061011a81610288565b92915050565b600060a0828403121561013657610135610279565b5b81905092915050565b600060c0828403121561015557610154610279565b5b81905092915050565b60006020828403121561017457610173610283565b5b60006101828482850161010b565b91505092915050565b6000602082840312156101a1576101a0610283565b5b600082013567ffffffffffffffff8111156101bf576101be61027e565b5b6101cb84828501610120565b91505092915050565b6000602082840312156101ea576101e9610283565b5b600082013567ffffffffffffffff8111156102085761020761027e565b5b6102148482850161013f565b91505092915050565b61022681610247565b82525050565b6000602082019050610241600083018461021d565b92915050565b600061025282610259565b9050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600080fd5b600080fd5b600080fd5b61029181610247565b811461029c57600080fd5b5056fea2646970667358221220d1b60770b2d262931f3d7b6d53cd5f22b109db1486d0c8448bd985887ef13d1e64736f6c63430008070033"; + +type ZetaReceiverMockConstructorParams = + | [signer?: Signer] + | ConstructorParameters; + +const isSuperArgs = ( + xs: ZetaReceiverMockConstructorParams +): xs is ConstructorParameters => xs.length > 1; + +export class ZetaReceiverMock__factory extends ContractFactory { + constructor(...args: ZetaReceiverMockConstructorParams) { + if (isSuperArgs(args)) { + super(...args); + } else { + super(_abi, _bytecode, args[0]); + } + } + + override deploy( + overrides?: Overrides & { from?: string | Promise } + ): Promise { + return super.deploy(overrides || {}) as Promise; + } + override getDeployTransaction( + overrides?: Overrides & { from?: string | Promise } + ): TransactionRequest { + return super.getDeployTransaction(overrides || {}); + } + override attach(address: string): ZetaReceiverMock { + return super.attach(address) as ZetaReceiverMock; + } + override connect(signer: Signer): ZetaReceiverMock__factory { + return super.connect(signer) as ZetaReceiverMock__factory; + } + + static readonly bytecode = _bytecode; + static readonly abi = _abi; + static createInterface(): ZetaReceiverMockInterface { + return new utils.Interface(_abi) as ZetaReceiverMockInterface; + } + static connect( + address: string, + signerOrProvider: Signer | Provider + ): ZetaReceiverMock { + return new Contract(address, _abi, signerOrProvider) as ZetaReceiverMock; + } +} diff --git a/packages/interfaces/typechain-types/factories/contracts/testing/index.ts b/packages/interfaces/typechain-types/factories/contracts/testing/index.ts new file mode 100644 index 00000000..32ab8513 --- /dev/null +++ b/packages/interfaces/typechain-types/factories/contracts/testing/index.ts @@ -0,0 +1,6 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +export * as testUniswapV3ContractsSol from "./TestUniswapV3Contracts.sol"; +export { ZetaInteractorMock__factory } from "./ZetaInteractorMock__factory"; +export { ZetaReceiverMock__factory } from "./ZetaReceiverMock__factory"; diff --git a/packages/interfaces/typechain-types/factories/index.ts b/packages/interfaces/typechain-types/factories/index.ts new file mode 100644 index 00000000..3eb87854 --- /dev/null +++ b/packages/interfaces/typechain-types/factories/index.ts @@ -0,0 +1,6 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +export * as openzeppelin from "./@openzeppelin"; +export * as uniswap from "./@uniswap"; +export * as contracts from "./contracts"; diff --git a/packages/interfaces/typechain-types/hardhat.d.ts b/packages/interfaces/typechain-types/hardhat.d.ts new file mode 100644 index 00000000..776a3f6e --- /dev/null +++ b/packages/interfaces/typechain-types/hardhat.d.ts @@ -0,0 +1,384 @@ +/* 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: "Ownable", + signerOrOptions?: ethers.Signer | FactoryOptions + ): Promise; + getContractFactory( + name: "Pausable", + signerOrOptions?: ethers.Signer | FactoryOptions + ): Promise; + getContractFactory( + name: "ERC20", + signerOrOptions?: ethers.Signer | FactoryOptions + ): Promise; + getContractFactory( + name: "ERC20Burnable", + signerOrOptions?: ethers.Signer | FactoryOptions + ): Promise; + getContractFactory( + name: "IERC20Metadata", + signerOrOptions?: ethers.Signer | FactoryOptions + ): Promise; + getContractFactory( + name: "IERC20", + signerOrOptions?: ethers.Signer | FactoryOptions + ): Promise; + getContractFactory( + name: "IUniswapV2Factory", + signerOrOptions?: ethers.Signer | FactoryOptions + ): Promise; + getContractFactory( + name: "IUniswapV2Pair", + signerOrOptions?: ethers.Signer | FactoryOptions + ): Promise; + getContractFactory( + name: "IERC20", + signerOrOptions?: ethers.Signer | FactoryOptions + ): Promise; + getContractFactory( + name: "IUniswapV2Router01", + signerOrOptions?: ethers.Signer | FactoryOptions + ): Promise; + getContractFactory( + name: "IUniswapV2Router02", + signerOrOptions?: ethers.Signer | FactoryOptions + ): Promise; + getContractFactory( + name: "IWETH", + signerOrOptions?: ethers.Signer | FactoryOptions + ): Promise; + getContractFactory( + name: "UniswapV2Router02", + signerOrOptions?: ethers.Signer | FactoryOptions + ): Promise; + getContractFactory( + name: "IUniswapV3SwapCallback", + signerOrOptions?: ethers.Signer | FactoryOptions + ): Promise; + getContractFactory( + name: "IQuoter", + signerOrOptions?: ethers.Signer | FactoryOptions + ): Promise; + getContractFactory( + name: "ISwapRouter", + signerOrOptions?: ethers.Signer | FactoryOptions + ): Promise; + getContractFactory( + name: "ImmutableCreate2Factory", + signerOrOptions?: ethers.Signer | FactoryOptions + ): Promise; + getContractFactory( + name: "ConnectorErrors", + signerOrOptions?: ethers.Signer | FactoryOptions + ): Promise; + getContractFactory( + name: "ZetaErrors", + signerOrOptions?: ethers.Signer | FactoryOptions + ): Promise; + getContractFactory( + name: "ZetaInteractorErrors", + signerOrOptions?: ethers.Signer | FactoryOptions + ): Promise; + getContractFactory( + name: "ZetaConnector", + signerOrOptions?: ethers.Signer | FactoryOptions + ): Promise; + getContractFactory( + name: "ZetaReceiver", + signerOrOptions?: ethers.Signer | FactoryOptions + ): Promise; + getContractFactory( + name: "ZetaTokenConsumer", + signerOrOptions?: ethers.Signer | FactoryOptions + ): Promise; + getContractFactory( + name: "ZetaNonEthInterface", + signerOrOptions?: ethers.Signer | FactoryOptions + ): Promise; + getContractFactory( + name: "INonfungiblePositionManager", + signerOrOptions?: ethers.Signer | FactoryOptions + ): Promise; + getContractFactory( + name: "IPoolInitializer", + signerOrOptions?: ethers.Signer | FactoryOptions + ): Promise; + getContractFactory( + name: "ZetaInteractorMock", + signerOrOptions?: ethers.Signer | FactoryOptions + ): Promise; + getContractFactory( + name: "ZetaReceiverMock", + signerOrOptions?: ethers.Signer | FactoryOptions + ): Promise; + getContractFactory( + name: "ZetaEth", + signerOrOptions?: ethers.Signer | FactoryOptions + ): Promise; + getContractFactory( + name: "ZetaNonEth", + signerOrOptions?: ethers.Signer | FactoryOptions + ): Promise; + getContractFactory( + name: "ZetaConnectorBase", + signerOrOptions?: ethers.Signer | FactoryOptions + ): Promise; + getContractFactory( + name: "ZetaConnectorEth", + signerOrOptions?: ethers.Signer | FactoryOptions + ): Promise; + getContractFactory( + name: "ZetaConnectorNonEth", + signerOrOptions?: ethers.Signer | FactoryOptions + ): Promise; + getContractFactory( + name: "ZetaInteractor", + signerOrOptions?: ethers.Signer | FactoryOptions + ): Promise; + getContractFactory( + name: "ZetaTokenConsumerUniV2", + signerOrOptions?: ethers.Signer | FactoryOptions + ): Promise; + getContractFactory( + name: "ZetaTokenConsumerUniV2Errors", + signerOrOptions?: ethers.Signer | FactoryOptions + ): Promise; + getContractFactory( + name: "WETH9", + signerOrOptions?: ethers.Signer | FactoryOptions + ): Promise; + getContractFactory( + name: "ZetaTokenConsumerUniV3", + signerOrOptions?: ethers.Signer | FactoryOptions + ): Promise; + getContractFactory( + name: "ZetaTokenConsumerUniV3Errors", + signerOrOptions?: ethers.Signer | FactoryOptions + ): Promise; + + getContractAt( + name: "Ownable", + address: string, + signer?: ethers.Signer + ): Promise; + getContractAt( + name: "Pausable", + address: string, + signer?: ethers.Signer + ): Promise; + getContractAt( + name: "ERC20", + address: string, + signer?: ethers.Signer + ): Promise; + getContractAt( + name: "ERC20Burnable", + address: string, + signer?: ethers.Signer + ): Promise; + getContractAt( + name: "IERC20Metadata", + address: string, + signer?: ethers.Signer + ): Promise; + getContractAt( + name: "IERC20", + address: string, + signer?: ethers.Signer + ): Promise; + getContractAt( + name: "IUniswapV2Factory", + address: string, + signer?: ethers.Signer + ): Promise; + getContractAt( + name: "IUniswapV2Pair", + address: string, + signer?: ethers.Signer + ): Promise; + getContractAt( + name: "IERC20", + address: string, + signer?: ethers.Signer + ): Promise; + getContractAt( + name: "IUniswapV2Router01", + address: string, + signer?: ethers.Signer + ): Promise; + getContractAt( + name: "IUniswapV2Router02", + address: string, + signer?: ethers.Signer + ): Promise; + getContractAt( + name: "IWETH", + address: string, + signer?: ethers.Signer + ): Promise; + getContractAt( + name: "UniswapV2Router02", + address: string, + signer?: ethers.Signer + ): Promise; + getContractAt( + name: "IUniswapV3SwapCallback", + address: string, + signer?: ethers.Signer + ): Promise; + getContractAt( + name: "IQuoter", + address: string, + signer?: ethers.Signer + ): Promise; + getContractAt( + name: "ISwapRouter", + address: string, + signer?: ethers.Signer + ): Promise; + getContractAt( + name: "ImmutableCreate2Factory", + address: string, + signer?: ethers.Signer + ): Promise; + getContractAt( + name: "ConnectorErrors", + address: string, + signer?: ethers.Signer + ): Promise; + getContractAt( + name: "ZetaErrors", + address: string, + signer?: ethers.Signer + ): Promise; + getContractAt( + name: "ZetaInteractorErrors", + address: string, + signer?: ethers.Signer + ): Promise; + getContractAt( + name: "ZetaConnector", + address: string, + signer?: ethers.Signer + ): Promise; + getContractAt( + name: "ZetaReceiver", + address: string, + signer?: ethers.Signer + ): Promise; + getContractAt( + name: "ZetaTokenConsumer", + address: string, + signer?: ethers.Signer + ): Promise; + getContractAt( + name: "ZetaNonEthInterface", + address: string, + signer?: ethers.Signer + ): Promise; + getContractAt( + name: "INonfungiblePositionManager", + address: string, + signer?: ethers.Signer + ): Promise; + getContractAt( + name: "IPoolInitializer", + address: string, + signer?: ethers.Signer + ): Promise; + getContractAt( + name: "ZetaInteractorMock", + address: string, + signer?: ethers.Signer + ): Promise; + getContractAt( + name: "ZetaReceiverMock", + address: string, + signer?: ethers.Signer + ): Promise; + getContractAt( + name: "ZetaEth", + address: string, + signer?: ethers.Signer + ): Promise; + getContractAt( + name: "ZetaNonEth", + address: string, + signer?: ethers.Signer + ): Promise; + getContractAt( + name: "ZetaConnectorBase", + address: string, + signer?: ethers.Signer + ): Promise; + getContractAt( + name: "ZetaConnectorEth", + address: string, + signer?: ethers.Signer + ): Promise; + getContractAt( + name: "ZetaConnectorNonEth", + address: string, + signer?: ethers.Signer + ): Promise; + getContractAt( + name: "ZetaInteractor", + address: string, + signer?: ethers.Signer + ): Promise; + getContractAt( + name: "ZetaTokenConsumerUniV2", + address: string, + signer?: ethers.Signer + ): Promise; + getContractAt( + name: "ZetaTokenConsumerUniV2Errors", + address: string, + signer?: ethers.Signer + ): Promise; + getContractAt( + name: "WETH9", + address: string, + signer?: ethers.Signer + ): Promise; + getContractAt( + name: "ZetaTokenConsumerUniV3", + address: string, + signer?: ethers.Signer + ): Promise; + getContractAt( + name: "ZetaTokenConsumerUniV3Errors", + 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/interfaces/typechain-types/index.ts b/packages/interfaces/typechain-types/index.ts new file mode 100644 index 00000000..125404cd --- /dev/null +++ b/packages/interfaces/typechain-types/index.ts @@ -0,0 +1,86 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import type * as openzeppelin from "./@openzeppelin"; +export type { openzeppelin }; +import type * as uniswap from "./@uniswap"; +export type { uniswap }; +import type * as contracts from "./contracts"; +export type { contracts }; +export * as factories from "./factories"; +export type { Ownable } from "./@openzeppelin/contracts/access/Ownable"; +export { Ownable__factory } from "./factories/@openzeppelin/contracts/access/Ownable__factory"; +export type { Pausable } from "./@openzeppelin/contracts/security/Pausable"; +export { Pausable__factory } from "./factories/@openzeppelin/contracts/security/Pausable__factory"; +export type { ERC20 } from "./@openzeppelin/contracts/token/ERC20/ERC20"; +export { ERC20__factory } from "./factories/@openzeppelin/contracts/token/ERC20/ERC20__factory"; +export type { ERC20Burnable } from "./@openzeppelin/contracts/token/ERC20/extensions/ERC20Burnable"; +export { ERC20Burnable__factory } from "./factories/@openzeppelin/contracts/token/ERC20/extensions/ERC20Burnable__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 { IERC20 } from "./@openzeppelin/contracts/token/ERC20/IERC20"; +export { IERC20__factory } from "./factories/@openzeppelin/contracts/token/ERC20/IERC20__factory"; +export type { IUniswapV2Factory } from "./@uniswap/v2-core/contracts/interfaces/IUniswapV2Factory"; +export { IUniswapV2Factory__factory } from "./factories/@uniswap/v2-core/contracts/interfaces/IUniswapV2Factory__factory"; +export type { IUniswapV2Pair } from "./@uniswap/v2-core/contracts/interfaces/IUniswapV2Pair"; +export { IUniswapV2Pair__factory } from "./factories/@uniswap/v2-core/contracts/interfaces/IUniswapV2Pair__factory"; +export type { IUniswapV2Router01 } from "./@uniswap/v2-periphery/contracts/interfaces/IUniswapV2Router01"; +export { IUniswapV2Router01__factory } from "./factories/@uniswap/v2-periphery/contracts/interfaces/IUniswapV2Router01__factory"; +export type { IUniswapV2Router02 } from "./@uniswap/v2-periphery/contracts/interfaces/IUniswapV2Router02"; +export { IUniswapV2Router02__factory } from "./factories/@uniswap/v2-periphery/contracts/interfaces/IUniswapV2Router02__factory"; +export type { IWETH } from "./@uniswap/v2-periphery/contracts/interfaces/IWETH"; +export { IWETH__factory } from "./factories/@uniswap/v2-periphery/contracts/interfaces/IWETH__factory"; +export type { UniswapV2Router02 } from "./@uniswap/v2-periphery/contracts/UniswapV2Router02"; +export { UniswapV2Router02__factory } from "./factories/@uniswap/v2-periphery/contracts/UniswapV2Router02__factory"; +export type { IUniswapV3SwapCallback } from "./@uniswap/v3-core/contracts/interfaces/callback/IUniswapV3SwapCallback"; +export { IUniswapV3SwapCallback__factory } from "./factories/@uniswap/v3-core/contracts/interfaces/callback/IUniswapV3SwapCallback__factory"; +export type { IQuoter } from "./@uniswap/v3-periphery/contracts/interfaces/IQuoter"; +export { IQuoter__factory } from "./factories/@uniswap/v3-periphery/contracts/interfaces/IQuoter__factory"; +export type { ISwapRouter } from "./@uniswap/v3-periphery/contracts/interfaces/ISwapRouter"; +export { ISwapRouter__factory } from "./factories/@uniswap/v3-periphery/contracts/interfaces/ISwapRouter__factory"; +export type { ImmutableCreate2Factory } from "./contracts/ImmutableCreate2Factory"; +export { ImmutableCreate2Factory__factory } from "./factories/contracts/ImmutableCreate2Factory__factory"; +export type { ConnectorErrors } from "./contracts/interfaces/ConnectorErrors"; +export { ConnectorErrors__factory } from "./factories/contracts/interfaces/ConnectorErrors__factory"; +export type { ZetaErrors } from "./contracts/interfaces/ZetaErrors"; +export { ZetaErrors__factory } from "./factories/contracts/interfaces/ZetaErrors__factory"; +export type { ZetaInteractorErrors } from "./contracts/interfaces/ZetaInteractorErrors"; +export { ZetaInteractorErrors__factory } from "./factories/contracts/interfaces/ZetaInteractorErrors__factory"; +export type { ZetaConnector } from "./contracts/interfaces/ZetaInterfaces.sol/ZetaConnector"; +export { ZetaConnector__factory } from "./factories/contracts/interfaces/ZetaInterfaces.sol/ZetaConnector__factory"; +export type { ZetaReceiver } from "./contracts/interfaces/ZetaInterfaces.sol/ZetaReceiver"; +export { ZetaReceiver__factory } from "./factories/contracts/interfaces/ZetaInterfaces.sol/ZetaReceiver__factory"; +export type { ZetaTokenConsumer } from "./contracts/interfaces/ZetaInterfaces.sol/ZetaTokenConsumer"; +export { ZetaTokenConsumer__factory } from "./factories/contracts/interfaces/ZetaInterfaces.sol/ZetaTokenConsumer__factory"; +export type { ZetaNonEthInterface } from "./contracts/interfaces/ZetaNonEthInterface"; +export { ZetaNonEthInterface__factory } from "./factories/contracts/interfaces/ZetaNonEthInterface__factory"; +export type { INonfungiblePositionManager } from "./contracts/testing/TestUniswapV3Contracts.sol/INonfungiblePositionManager"; +export { INonfungiblePositionManager__factory } from "./factories/contracts/testing/TestUniswapV3Contracts.sol/INonfungiblePositionManager__factory"; +export type { IPoolInitializer } from "./contracts/testing/TestUniswapV3Contracts.sol/IPoolInitializer"; +export { IPoolInitializer__factory } from "./factories/contracts/testing/TestUniswapV3Contracts.sol/IPoolInitializer__factory"; +export type { ZetaInteractorMock } from "./contracts/testing/ZetaInteractorMock"; +export { ZetaInteractorMock__factory } from "./factories/contracts/testing/ZetaInteractorMock__factory"; +export type { ZetaReceiverMock } from "./contracts/testing/ZetaReceiverMock"; +export { ZetaReceiverMock__factory } from "./factories/contracts/testing/ZetaReceiverMock__factory"; +export type { ZetaEth } from "./contracts/Zeta.eth.sol/ZetaEth"; +export { ZetaEth__factory } from "./factories/contracts/Zeta.eth.sol/ZetaEth__factory"; +export type { ZetaNonEth } from "./contracts/Zeta.non-eth.sol/ZetaNonEth"; +export { ZetaNonEth__factory } from "./factories/contracts/Zeta.non-eth.sol/ZetaNonEth__factory"; +export type { ZetaConnectorBase } from "./contracts/ZetaConnector.base.sol/ZetaConnectorBase"; +export { ZetaConnectorBase__factory } from "./factories/contracts/ZetaConnector.base.sol/ZetaConnectorBase__factory"; +export type { ZetaConnectorEth } from "./contracts/ZetaConnector.eth.sol/ZetaConnectorEth"; +export { ZetaConnectorEth__factory } from "./factories/contracts/ZetaConnector.eth.sol/ZetaConnectorEth__factory"; +export type { ZetaConnectorNonEth } from "./contracts/ZetaConnector.non-eth.sol/ZetaConnectorNonEth"; +export { ZetaConnectorNonEth__factory } from "./factories/contracts/ZetaConnector.non-eth.sol/ZetaConnectorNonEth__factory"; +export type { ZetaInteractor } from "./contracts/ZetaInteractor"; +export { ZetaInteractor__factory } from "./factories/contracts/ZetaInteractor__factory"; +export type { ZetaTokenConsumerUniV2 } from "./contracts/ZetaTokenConsumerUniV2.strategy.sol/ZetaTokenConsumerUniV2"; +export { ZetaTokenConsumerUniV2__factory } from "./factories/contracts/ZetaTokenConsumerUniV2.strategy.sol/ZetaTokenConsumerUniV2__factory"; +export type { ZetaTokenConsumerUniV2Errors } from "./contracts/ZetaTokenConsumerUniV2.strategy.sol/ZetaTokenConsumerUniV2Errors"; +export { ZetaTokenConsumerUniV2Errors__factory } from "./factories/contracts/ZetaTokenConsumerUniV2.strategy.sol/ZetaTokenConsumerUniV2Errors__factory"; +export type { WETH9 } from "./contracts/ZetaTokenConsumerUniV3.strategy.sol/WETH9"; +export { WETH9__factory } from "./factories/contracts/ZetaTokenConsumerUniV3.strategy.sol/WETH9__factory"; +export type { ZetaTokenConsumerUniV3 } from "./contracts/ZetaTokenConsumerUniV3.strategy.sol/ZetaTokenConsumerUniV3"; +export { ZetaTokenConsumerUniV3__factory } from "./factories/contracts/ZetaTokenConsumerUniV3.strategy.sol/ZetaTokenConsumerUniV3__factory"; +export type { ZetaTokenConsumerUniV3Errors } from "./contracts/ZetaTokenConsumerUniV3.strategy.sol/ZetaTokenConsumerUniV3Errors"; +export { ZetaTokenConsumerUniV3Errors__factory } from "./factories/contracts/ZetaTokenConsumerUniV3.strategy.sol/ZetaTokenConsumerUniV3Errors__factory"; diff --git a/packages/protocol-contracts/hardhat.config.ts b/packages/protocol-contracts/hardhat.config.ts index 65f14a7d..a16a8956 100644 --- a/packages/protocol-contracts/hardhat.config.ts +++ b/packages/protocol-contracts/hardhat.config.ts @@ -2,8 +2,9 @@ import "@nomiclabs/hardhat-waffle"; import "@nomiclabs/hardhat-etherscan"; import "@typechain/hardhat"; import "tsconfig-paths/register"; +import "hardhat-abi-exporter"; -import { getHardhatConfigNetworks, getHardhatConfigScanners } from "@zetachain/addresses/networks"; +import { getHardhatConfigNetworks, getHardhatConfigScanners } from "@zetachain/addresses-tools/networks"; import * as dotenv from "dotenv"; import type { HardhatUserConfig } from "hardhat/types"; @@ -13,6 +14,13 @@ const PRIVATE_KEYS = process.env.PRIVATE_KEY !== undefined ? [`0x${process.env.PRIVATE_KEY}`, `0x${process.env.TSS_PRIVATE_KEY}`] : []; const config: HardhatUserConfig = { + abiExporter: [ + { + format: "json", + path: "../interfaces/abi/json", + runOnCompile: true, + }, + ], etherscan: { ...getHardhatConfigScanners(), }, @@ -27,6 +35,10 @@ const config: HardhatUserConfig = { { version: "0.8.7" }, ], }, + typechain: { + alwaysGenerateOverloads: false, + outDir: "../interfaces/typechain-types", + }, }; export default config; diff --git a/packages/protocol-contracts/lib/ImmutableCreate2Factory/ImmutableCreate2Factory.helpers.ts b/packages/protocol-contracts/lib/ImmutableCreate2Factory/ImmutableCreate2Factory.helpers.ts index 19fd3fd0..efb3aa38 100644 --- a/packages/protocol-contracts/lib/ImmutableCreate2Factory/ImmutableCreate2Factory.helpers.ts +++ b/packages/protocol-contracts/lib/ImmutableCreate2Factory/ImmutableCreate2Factory.helpers.ts @@ -1,9 +1,8 @@ import { Provider, TransactionReceipt } from "@ethersproject/providers"; +import { ImmutableCreate2Factory__factory } from "@zetachain/interfaces/typechain-types"; import assert from "assert"; import { ethers, Signer } from "ethers"; -import { ImmutableCreate2Factory__factory } from "../../typechain-types"; - export const buildBytecode = (constructorTypes: any[], constructorArgs: any[], contractBytecode: string) => `${contractBytecode}${encodeParams(constructorTypes, constructorArgs).slice(2)}`; diff --git a/packages/protocol-contracts/lib/contracts.helpers.ts b/packages/protocol-contracts/lib/contracts.helpers.ts index 9f449539..e86c473f 100644 --- a/packages/protocol-contracts/lib/contracts.helpers.ts +++ b/packages/protocol-contracts/lib/contracts.helpers.ts @@ -1,6 +1,3 @@ -import { BaseContract, ContractFactory } from "ethers"; -import { ethers } from "hardhat"; - import { ImmutableCreate2Factory, ImmutableCreate2Factory__factory, @@ -22,7 +19,9 @@ import { ZetaTokenConsumerUniV2__factory as ZetaTokenConsumerUniV2Factory, ZetaTokenConsumerUniV3, ZetaTokenConsumerUniV3__factory as ZetaTokenConsumerUniV3Factory, -} from "../typechain-types"; +} from "@zetachain/interfaces/typechain-types"; +import { BaseContract, ContractFactory } from "ethers"; +import { ethers } from "hardhat"; export const isEthNetworkName = (networkName: string) => networkName === "eth-localnet" || networkName === "goerli" || networkName === "eth-mainnet"; diff --git a/packages/protocol-contracts/package.json b/packages/protocol-contracts/package.json index 078df6fb..66600b45 100644 --- a/packages/protocol-contracts/package.json +++ b/packages/protocol-contracts/package.json @@ -24,6 +24,10 @@ "verify": "npx hardhat run scripts/verify-contracts.ts" }, "devDependencies": { + "@zetachain/addresses": "workspace:^", + "@zetachain/addresses-tools": "workspace:^", + "@zetachain/interfaces": "workspace:^", + "hardhat-abi-exporter": "^2.10.0", "tsconfig-paths": "^3.14.1" }, "dependencies": { diff --git a/packages/protocol-contracts/scripts/deploy-immutable-create2-factory.ts b/packages/protocol-contracts/scripts/deploy-immutable-create2-factory.ts index e834232e..fd16b288 100644 --- a/packages/protocol-contracts/scripts/deploy-immutable-create2-factory.ts +++ b/packages/protocol-contracts/scripts/deploy-immutable-create2-factory.ts @@ -1,4 +1,5 @@ -import { isNetworkName, saveAddress } from "@zetachain/addresses"; +import { isNetworkName } from "@zetachain/addresses"; +import { saveAddress } from "@zetachain/addresses-tools"; import { network } from "hardhat"; import { deployImmutableCreate2Factory as deploy } from "../lib/contracts.helpers"; diff --git a/packages/protocol-contracts/scripts/deploy-zeta-connector.ts b/packages/protocol-contracts/scripts/deploy-zeta-connector.ts index e7b8d2bd..25e01d18 100644 --- a/packages/protocol-contracts/scripts/deploy-zeta-connector.ts +++ b/packages/protocol-contracts/scripts/deploy-zeta-connector.ts @@ -1,4 +1,5 @@ -import { getAddress, isNetworkName, saveAddress } from "@zetachain/addresses"; +import { getAddress, isNetworkName } from "@zetachain/addresses"; +import { saveAddress } from "@zetachain/addresses-tools"; import { Contract } from "ethers"; import { network } from "hardhat"; diff --git a/packages/protocol-contracts/scripts/deploy-zeta-token.ts b/packages/protocol-contracts/scripts/deploy-zeta-token.ts index f13fe653..f0da9c24 100644 --- a/packages/protocol-contracts/scripts/deploy-zeta-token.ts +++ b/packages/protocol-contracts/scripts/deploy-zeta-token.ts @@ -1,4 +1,5 @@ -import { getAddress, isNetworkName, saveAddress } from "@zetachain/addresses"; +import { getAddress, isNetworkName } from "@zetachain/addresses"; +import { saveAddress } from "@zetachain/addresses-tools"; import { Contract } from "ethers"; import { network } from "hardhat"; diff --git a/packages/protocol-contracts/scripts/deploy.ts b/packages/protocol-contracts/scripts/deploy.ts index b51a0cb7..5193f051 100644 --- a/packages/protocol-contracts/scripts/deploy.ts +++ b/packages/protocol-contracts/scripts/deploy.ts @@ -1,4 +1,5 @@ -import { isLocalNetworkName, saveAddress } from "@zetachain/addresses"; +import { isLocalNetworkName } from "@zetachain/addresses"; +import { saveAddress } from "@zetachain/addresses-tools"; import { ethers, network } from "hardhat"; import { isEthNetworkName } from "../lib/contracts.helpers"; diff --git a/packages/protocol-contracts/scripts/set-zeta-token-addresses.ts b/packages/protocol-contracts/scripts/set-zeta-token-addresses.ts index fb543c10..713e879e 100644 --- a/packages/protocol-contracts/scripts/set-zeta-token-addresses.ts +++ b/packages/protocol-contracts/scripts/set-zeta-token-addresses.ts @@ -1,8 +1,7 @@ import { getAddress, isNetworkName } from "@zetachain/addresses"; +import { ZetaNonEth__factory as ZetaNonEthFactory } from "@zetachain/interfaces/typechain-types"; import { ethers, network } from "hardhat"; -import { ZetaNonEth__factory as ZetaNonEthFactory } from "../typechain-types"; - export async function setZetaAddresses() { if (!isNetworkName(network.name)) { throw new Error(`network.name: ${network.name} isn't supported.`); diff --git a/packages/protocol-contracts/scripts/test-zeta-send.ts b/packages/protocol-contracts/scripts/test-zeta-send.ts index 74fc2305..ce7ff7a0 100644 --- a/packages/protocol-contracts/scripts/test-zeta-send.ts +++ b/packages/protocol-contracts/scripts/test-zeta-send.ts @@ -1,9 +1,8 @@ import { getAddress, getChainId } from "@zetachain/addresses"; +import { ZetaConnectorEth__factory as ZetaConnectorEthFactory } from "@zetachain/interfaces/typechain-types"; import { AbiCoder } from "ethers/lib/utils"; import { ethers } from "hardhat"; -import { ZetaConnectorEth__factory as ZetaConnectorEthFactory } from "../typechain-types"; - const encoder = new AbiCoder(); async function main() { diff --git a/packages/protocol-contracts/scripts/token-approval.ts b/packages/protocol-contracts/scripts/token-approval.ts index 245f4525..b28467dd 100644 --- a/packages/protocol-contracts/scripts/token-approval.ts +++ b/packages/protocol-contracts/scripts/token-approval.ts @@ -2,7 +2,6 @@ import { getAddress, isNetworkName } from "@zetachain/addresses"; import { ethers, network } from "hardhat"; import { getZetaFactoryEth, getZetaFactoryNonEth, isEthNetworkName } from "../lib/contracts.helpers"; -import { ZetaEth__factory as ZetaEthFactory, ZetaNonEth__factory as ZetaNonEthFactory } from "../typechain-types"; const approvalAmount = ethers.utils.parseEther("10000000.0"); diff --git a/packages/protocol-contracts/scripts/update-tss-address.ts b/packages/protocol-contracts/scripts/update-tss-address.ts index c59a6666..5b72d543 100644 --- a/packages/protocol-contracts/scripts/update-tss-address.ts +++ b/packages/protocol-contracts/scripts/update-tss-address.ts @@ -1,4 +1,5 @@ -import { getAddress, isNetworkName, saveAddress } from "@zetachain/addresses"; +import { getAddress, isNetworkName } from "@zetachain/addresses"; +import { saveAddress } from "@zetachain/addresses-tools"; import { ethers, network } from "hardhat"; import { getZetaConnectorEth, getZetaConnectorNonEth, isEthNetworkName } from "../lib/contracts.helpers"; diff --git a/packages/protocol-contracts/test/ImmutableCreate2Factory.spec.ts b/packages/protocol-contracts/test/ImmutableCreate2Factory.spec.ts index f547eda1..ce95647b 100644 --- a/packages/protocol-contracts/test/ImmutableCreate2Factory.spec.ts +++ b/packages/protocol-contracts/test/ImmutableCreate2Factory.spec.ts @@ -1,4 +1,10 @@ import { SignerWithAddress } from "@nomiclabs/hardhat-ethers/signers"; +import { + IERC20__factory, + ImmutableCreate2Factory, + ImmutableCreate2Factory__factory, + ZetaEth__factory, +} from "@zetachain/interfaces/typechain-types"; import chai, { expect } from "chai"; import { parseEther } from "ethers/lib/utils"; import { ethers } from "hardhat"; @@ -10,12 +16,6 @@ import { isDeployed, saltToHex, } from "../lib/ImmutableCreate2Factory/ImmutableCreate2Factory.helpers"; -import { - IERC20__factory, - ImmutableCreate2Factory, - ImmutableCreate2Factory__factory, - ZetaEth__factory, -} from "../typechain-types"; chai.should(); diff --git a/packages/protocol-contracts/test/Zeta.non-eth.spec.ts b/packages/protocol-contracts/test/Zeta.non-eth.spec.ts index 36e962e9..5d5729d1 100644 --- a/packages/protocol-contracts/test/Zeta.non-eth.spec.ts +++ b/packages/protocol-contracts/test/Zeta.non-eth.spec.ts @@ -1,10 +1,10 @@ import { SignerWithAddress } from "@nomiclabs/hardhat-ethers/signers"; +import { ZetaConnectorNonEth, ZetaNonEth, ZetaReceiverMock } from "@zetachain/interfaces/typechain-types"; import { expect } from "chai"; import { parseEther } from "ethers/lib/utils"; import { ethers } from "hardhat"; import { deployZetaConnectorNonEth, deployZetaNonEth, deployZetaReceiverMock } from "../lib/contracts.helpers"; -import { ZetaConnectorNonEth, ZetaNonEth, ZetaReceiverMock } from "../typechain-types"; describe("ZetaNonEth tests", () => { let zetaTokenNonEthContract: ZetaNonEth; diff --git a/packages/protocol-contracts/test/ZetaConnector.spec.ts b/packages/protocol-contracts/test/ZetaConnector.spec.ts index b79ecf0b..237f6142 100644 --- a/packages/protocol-contracts/test/ZetaConnector.spec.ts +++ b/packages/protocol-contracts/test/ZetaConnector.spec.ts @@ -1,4 +1,12 @@ import { SignerWithAddress } from "@nomiclabs/hardhat-ethers/signers"; +import { + ZetaConnectorBase, + ZetaConnectorEth, + ZetaConnectorNonEth, + ZetaEth, + ZetaNonEth, + ZetaReceiverMock, +} from "@zetachain/interfaces/typechain-types"; import { expect } from "chai"; import { parseEther } from "ethers/lib/utils"; import { ethers } from "hardhat"; @@ -11,14 +19,6 @@ import { deployZetaNonEth, deployZetaReceiverMock, } from "../lib/contracts.helpers"; -import { - ZetaConnectorBase, - ZetaConnectorEth, - ZetaConnectorNonEth, - ZetaEth, - ZetaNonEth, - ZetaReceiverMock, -} from "../typechain-types"; describe("ZetaConnector tests", () => { let zetaTokenEthContract: ZetaEth; diff --git a/packages/protocol-contracts/test/ZetaInteractor.spec.ts b/packages/protocol-contracts/test/ZetaInteractor.spec.ts index 3732d516..73b24f87 100644 --- a/packages/protocol-contracts/test/ZetaInteractor.spec.ts +++ b/packages/protocol-contracts/test/ZetaInteractor.spec.ts @@ -1,9 +1,9 @@ import { SignerWithAddress } from "@nomiclabs/hardhat-ethers/signers"; +import { ZetaInteractorMock } from "@zetachain/interfaces/typechain-types"; import chai, { expect } from "chai"; import { ethers } from "hardhat"; import { getZetaInteractorMock } from "../lib/contracts.helpers"; -import { ZetaInteractorMock } from "../typechain-types"; import { getCustomErrorMessage } from "./test.helpers"; chai.should(); diff --git a/packages/protocol-contracts/test/ZetaTokenConsumer.spec.ts b/packages/protocol-contracts/test/ZetaTokenConsumer.spec.ts index f7539487..f2d6293c 100644 --- a/packages/protocol-contracts/test/ZetaTokenConsumer.spec.ts +++ b/packages/protocol-contracts/test/ZetaTokenConsumer.spec.ts @@ -2,15 +2,6 @@ import { MaxUint256 } from "@ethersproject/constants"; import { parseEther, parseUnits } from "@ethersproject/units"; import { SignerWithAddress } from "@nomiclabs/hardhat-ethers/signers"; import { getAddress } from "@zetachain/addresses"; -import chai, { expect } from "chai"; -import { BigNumber } from "ethers"; -import { ethers } from "hardhat"; - -import { - deployZetaNonEth, - getZetaTokenConsumerUniV2Strategy, - getZetaTokenConsumerUniV3Strategy, -} from "../lib/contracts.helpers"; import { IERC20, IERC20__factory, @@ -21,7 +12,16 @@ import { ZetaTokenConsumer, ZetaTokenConsumerUniV2, ZetaTokenConsumerUniV3, -} from "../typechain-types"; +} from "@zetachain/interfaces/typechain-types"; +import chai, { expect } from "chai"; +import { BigNumber } from "ethers"; +import { ethers } from "hardhat"; + +import { + deployZetaNonEth, + getZetaTokenConsumerUniV2Strategy, + getZetaTokenConsumerUniV3Strategy, +} from "../lib/contracts.helpers"; import { parseZetaConsumerLog } from "./test.helpers"; chai.should(); diff --git a/packages/protocol-contracts/test/test.helpers.ts b/packages/protocol-contracts/test/test.helpers.ts index 95e59d97..7ffe5ea1 100644 --- a/packages/protocol-contracts/test/test.helpers.ts +++ b/packages/protocol-contracts/test/test.helpers.ts @@ -1,7 +1,6 @@ +import { ZetaTokenConsumer__factory } from "@zetachain/interfaces/typechain-types"; import { BigNumber, ContractReceipt } from "ethers"; -import { ZetaTokenConsumer__factory } from "../typechain-types"; - type CustomErrorParamType = BigNumber | number | string; export const getCustomErrorMessage = (errorMethod: string, params?: [CustomErrorParamType]) => { const stringParams = params diff --git a/packages/protocol-contracts/tsconfig.json b/packages/protocol-contracts/tsconfig.json index 19f84c0b..d2b12130 100644 --- a/packages/protocol-contracts/tsconfig.json +++ b/packages/protocol-contracts/tsconfig.json @@ -7,7 +7,10 @@ "baseUrl": ".", "paths": { "@zetachain/addresses/*": ["../addresses/src/*"], - "@zetachain/addresses": ["../addresses/src/index.ts"] + "@zetachain/addresses": ["../addresses/src/index.ts"], + "@zetachain/addresses-tools/*": ["../addresses-tools/src/*"], + "@zetachain/addresses-tools": ["../addresses-tools/src/index.ts"], + "@zetachain/interfaces/*": ["../interfaces/*"] } - }, + } } diff --git a/yarn.lock b/yarn.lock index 35c1127f..4cc2b689 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2429,6 +2429,14 @@ __metadata: languageName: node linkType: hard +"@zetachain/addresses-tools@workspace:^, @zetachain/addresses-tools@workspace:packages/addresses-tools": + version: 0.0.0-use.local + resolution: "@zetachain/addresses-tools@workspace:packages/addresses-tools" + dependencies: + "@zetachain/addresses": "workspace:^" + languageName: unknown + linkType: soft + "@zetachain/addresses@workspace:^, @zetachain/addresses@workspace:packages/addresses": version: 0.0.0-use.local resolution: "@zetachain/addresses@workspace:packages/addresses" @@ -2443,6 +2451,7 @@ __metadata: "@openzeppelin/contracts": 4.6.0 "@uniswap/v2-periphery": 1.1.0-beta.0 "@zetachain/addresses": "workspace:^" + "@zetachain/addresses-tools": "workspace:^" "@zetachain/protocol-contracts": "workspace:^" ethers: 5.6.8 hardhat-gas-reporter: ^1.0.8 @@ -2451,6 +2460,12 @@ __metadata: languageName: unknown linkType: soft +"@zetachain/interfaces@workspace:^, @zetachain/interfaces@workspace:packages/interfaces": + version: 0.0.0-use.local + resolution: "@zetachain/interfaces@workspace:packages/interfaces" + languageName: unknown + linkType: soft + "@zetachain/protocol-contracts@workspace:^, @zetachain/protocol-contracts@workspace:packages/protocol-contracts": version: 0.0.0-use.local resolution: "@zetachain/protocol-contracts@workspace:packages/protocol-contracts" @@ -2458,7 +2473,11 @@ __metadata: "@openzeppelin/contracts": 4.6.0 "@uniswap/v2-periphery": 1.1.0-beta.0 "@uniswap/v3-periphery": 1.1.0 + "@zetachain/addresses": "workspace:^" + "@zetachain/addresses-tools": "workspace:^" + "@zetachain/interfaces": "workspace:^" ethers: 5.6.8 + hardhat-abi-exporter: ^2.10.0 tsconfig-paths: ^3.14.1 languageName: unknown linkType: soft @@ -2692,7 +2711,7 @@ __metadata: languageName: node linkType: hard -"ansi-colors@npm:^4.1.3": +"ansi-colors@npm:^4.1.0, ansi-colors@npm:^4.1.3": version: 4.1.3 resolution: "ansi-colors@npm:4.1.3" checksum: a9c2ec842038a1fabc7db9ece7d3177e2fe1c5dc6f0c51ecfbf5f39911427b89c00b5dc6b8bd95f82a26e9b16aaae2e83d45f060e98070ce4d1333038edceb0e @@ -5282,6 +5301,20 @@ __metadata: languageName: node linkType: hard +"delete-empty@npm:^3.0.0": + version: 3.0.0 + resolution: "delete-empty@npm:3.0.0" + dependencies: + ansi-colors: ^4.1.0 + minimist: ^1.2.0 + path-starts-with: ^2.0.0 + rimraf: ^2.6.2 + bin: + delete-empty: bin/cli.js + checksum: 1e2b030346683f49b12460b91d7e1793fc61e9aa0be152a1b31317363632e92426be270f8d635b89d3915ae7da753dcfa6e3bd200f62edf21eaa876ef4443fd2 + languageName: node + linkType: hard + "depd@npm:2.0.0": version: 2.0.0 resolution: "depd@npm:2.0.0" @@ -7882,6 +7915,18 @@ __metadata: languageName: node linkType: hard +"hardhat-abi-exporter@npm:^2.10.0": + version: 2.10.0 + resolution: "hardhat-abi-exporter@npm:2.10.0" + dependencies: + "@ethersproject/abi": ^5.5.0 + delete-empty: ^3.0.0 + peerDependencies: + hardhat: ^2.0.0 + checksum: 9f32e097b256ea8308d9e738594c88895db387f17b6f92924bad7de2f3209ca26754a8519940578622f9e8df7e19bd1e4e47058c0cef8d100d4ad2977650f5e7 + languageName: node + linkType: hard + "hardhat-gas-reporter@npm:^1.0.8": version: 1.0.8 resolution: "hardhat-gas-reporter@npm:1.0.8" @@ -11421,6 +11466,13 @@ __metadata: languageName: node linkType: hard +"path-starts-with@npm:^2.0.0": + version: 2.0.0 + resolution: "path-starts-with@npm:2.0.0" + checksum: c780e5feb53f37a0cc78c446181aac2d1e4554e5693bbc4ad03c99157b9411ade26a3503dcd5b3b8f0fd56d36daa60ce5a8c24d66b54a400c812fe11eb5bcab9 + languageName: node + linkType: hard + "path-to-regexp@npm:0.1.7": version: 0.1.7 resolution: "path-to-regexp@npm:0.1.7" @@ -12435,7 +12487,7 @@ __metadata: languageName: node linkType: hard -"rimraf@npm:^2.2.8, rimraf@npm:^2.6.3": +"rimraf@npm:^2.2.8, rimraf@npm:^2.6.2, rimraf@npm:^2.6.3": version: 2.7.1 resolution: "rimraf@npm:2.7.1" dependencies: From ff13a115e2572ccb19a6b25a16a01080a474c4bf Mon Sep 17 00:00:00 2001 From: Andres Martin Aiello <50411235+andresaiello@users.noreply.github.com> Date: Thu, 4 Aug 2022 16:20:47 -0300 Subject: [PATCH 034/115] Redeploy Connector and Zeta token (#34) * Redeploy Connector and Zeta token * refactor * add comment * add a const * Redeploy example contracts (#35) * Redeploy example contracts * update addr * rebase from main * point to interfaces * more updates * more * deploy connector * restore getScanVariable * examples deplyed * update comment * remove comments --- .../addresses-tools/src/addresses.helpers.ts | 20 +++++ packages/addresses/src/addresses.athens.json | 36 ++++----- packages/example-contracts/.env.example | 3 + .../shared/ImmutableCreate2Factory.sol | 8 ++ packages/example-contracts/hardhat.config.ts | 8 +- .../MultiChainValue.helpers.ts | 3 +- .../shared/ImmutableCreate2Factory.helpers.ts | 75 +++++++++++++++++++ .../lib/shared/deploy.helpers.ts | 3 +- .../lib/shared/network.constants.ts | 2 + packages/example-contracts/package.json | 1 + .../deterministic-deploy.ts | 58 ++++++++++++++ .../multi-chain-swap/deterministic-deploy.ts | 58 ++++++++++++++ .../multi-chain-value/deterministic-deploy.ts | 55 ++++++++++++++ .../test/CrossChainMessage.spec.ts | 2 +- .../test/MultiChainValue.spec.ts | 3 +- packages/example-contracts/tsconfig.json | 3 +- .../ZetaConnectorBase.json | 12 +-- .../ZetaConnectorEth.json | 12 +-- .../ZetaConnectorNonEth.json | 12 +-- .../ZetaInterfaces.sol/ZetaReceiver.json | 4 +- .../ZetaInteractorMock.json | 4 +- .../ZetaReceiverMock.json | 4 +- .../ZetaConnectorBase.ts | 40 +++++----- .../ZetaConnector.eth.sol/ZetaConnectorEth.ts | 40 +++++----- .../ZetaConnectorNonEth.ts | 40 +++++----- .../ZetaInterfaces.sol/ZetaReceiver.ts | 8 +- .../contracts/testing/ZetaInteractorMock.ts | 8 +- .../contracts/testing/ZetaReceiverMock.ts | 8 +- .../ZetaConnectorBase__factory.ts | 14 ++-- .../ZetaConnectorEth__factory.ts | 14 ++-- .../ZetaConnectorNonEth__factory.ts | 14 ++-- .../ZetaTokenConsumerUniV2__factory.ts | 2 +- .../ZetaTokenConsumerUniV3__factory.ts | 2 +- .../ZetaReceiver__factory.ts | 4 +- .../testing/ZetaInteractorMock__factory.ts | 6 +- .../testing/ZetaReceiverMock__factory.ts | 6 +- packages/protocol-contracts/.env.example | 3 + .../ImmutableCreate2Factory.helpers.ts | 4 - .../lib/contracts.constants.ts | 12 +++ .../deterministic-deploy-zeta-connector.ts | 62 +++++++++++++++ .../deterministic-deploy-zeta-consumer.ts | 54 +++++++++++++ .../deterministic-deploy-zeta-token.ts | 68 +++++++++++++++++ .../scripts/deterministic-deploy.helpers.ts | 42 +++++++++++ .../deterministic-get-salt-zeta-connector.ts | 43 +++++++++++ .../deterministic-get-salt-zeta-token.ts | 45 +++++++++++ .../test/ImmutableCreate2Factory.spec.ts | 3 +- yarn.lock | 1 + 47 files changed, 771 insertions(+), 158 deletions(-) create mode 100644 packages/example-contracts/contracts/shared/ImmutableCreate2Factory.sol create mode 100644 packages/example-contracts/lib/shared/ImmutableCreate2Factory.helpers.ts create mode 100644 packages/example-contracts/scripts/cross-chain-warriors/deterministic-deploy.ts create mode 100644 packages/example-contracts/scripts/multi-chain-swap/deterministic-deploy.ts create mode 100644 packages/example-contracts/scripts/multi-chain-value/deterministic-deploy.ts create mode 100644 packages/protocol-contracts/scripts/deterministic-deploy-zeta-connector.ts create mode 100644 packages/protocol-contracts/scripts/deterministic-deploy-zeta-consumer.ts create mode 100644 packages/protocol-contracts/scripts/deterministic-deploy-zeta-token.ts create mode 100644 packages/protocol-contracts/scripts/deterministic-deploy.helpers.ts create mode 100644 packages/protocol-contracts/scripts/deterministic-get-salt-zeta-connector.ts create mode 100644 packages/protocol-contracts/scripts/deterministic-get-salt-zeta-token.ts diff --git a/packages/addresses-tools/src/addresses.helpers.ts b/packages/addresses-tools/src/addresses.helpers.ts index e49913d7..bef782ee 100644 --- a/packages/addresses-tools/src/addresses.helpers.ts +++ b/packages/addresses-tools/src/addresses.helpers.ts @@ -33,6 +33,26 @@ const PUBLIC_PKG = "addresses"; const dirname = __dirname.replace(LOCAL_PKG, PUBLIC_PKG); +export const getScanVariable = ({ customNetworkName }: { customNetworkName?: string } = {}): string => { + const networkName = customNetworkName || network.name; + if (!isNetworkName(networkName)) throw new Error(); + dotenv.config(); + + const v = { + "bsc-localnet": "", + "bsc-testnet": process.env.BSCSCAN_API_KEY || "", + "eth-localnet": "", + "eth-mainnet": process.env.ETHERSCAN_API_KEY || "", + goerli: process.env.ETHERSCAN_API_KEY || "", + hardhat: "", + "polygon-localnet": "", + "polygon-mumbai": process.env.POLYGONSCAN_API_KEY || "", + ropsten: process.env.ETHERSCAN_API_KEY || "", + }; + + return v[networkName]; +}; + export const getExplorerUrl = ({ customNetworkName }: { customNetworkName?: string } = {}): string => { const networkName = customNetworkName || network.name; if (!isNetworkName(networkName)) throw new Error(); diff --git a/packages/addresses/src/addresses.athens.json b/packages/addresses/src/addresses.athens.json index b5387158..444dd417 100644 --- a/packages/addresses/src/addresses.athens.json +++ b/packages/addresses/src/addresses.athens.json @@ -1,11 +1,11 @@ { "bsc-testnet": { - "connector": "0x202aed942eb71203741eced2913a29C695a7c7F6", + "connector": "0x000054d3A0Bc83Ec7808F52fCdC28A96c89F6C5c", "crossChainCounter": "", - "crossChainNft": "0xa9016FB99846314E0f96f657E5271cFD7919a244", + "crossChainNft": "0xF7f6534C8f70f6001Fc267b55abfAA8B8a41Ea2e", "dai": "", - "multiChainSwap": "0xD4fAa6BAbBb97E0BDF755D396af48CB66eBa736c", - "multiChainValue": "0x8f56b3e5b0D4bC33E7E52eC55271e73ece6024c6", + "multiChainSwap": "0xa0b5cbdc4d14c4f4d36483ec0de310919f3b2d90", + "multiChainValue": "0x54284C0b4948FE2F93D3a0Dc17fA3587b16eE19F", "tss": "0x61141bce5352fc9b5ff648468676e356518d86ab", "tssUpdater": "0x7274d1d5dddef36aac53dd45b93487ce01ef0a55", "uniswapV2Router02": "0x9Ac64Cc6e4415144C455BD8E4837Fea55603e5c3", @@ -14,17 +14,17 @@ "uniswapV3Router": "", "usdc": "", "weth9": "", - "zetaToken": "0xad7d0795ffdf21f20c89240D540487B1445c7D03", - "zetaTokenConsumerUniV2": "", + "zetaToken": "0x000080383847bd75f91c168269aa74004877592f", + "zetaTokenConsumerUniV2": "0xa67b03930eb53d0462dCc0835e97964C062042fb", "immutableCreate2Factory": "0x095a03c6a68137fE9a566bBc3e552F299d8b886d" }, "goerli": { - "connector": "0x0B16Fc7e2D627d82255ba21e53Cf6c11B5186046", + "connector": "0x00007d0BA516a2bA02D77907d3a1348C1187Ae62", "crossChainCounter": "", - "crossChainNft": "0xe08f1d23a68231543a595391D82c39BbaFc22470", + "crossChainNft": "0xfE9eb065cab82421D06C8eD41c31Beb473a5Fa7e", "dai": "", - "multiChainSwap": "0xDB6D960642ea523549Ad108F495c89cfE5E51668", - "multiChainValue": "0x0EaA929a2874183e2324Bb2745F812c942b00F60", + "multiChainSwap": "0x805fE47D1FE7d86496753bB4B36206953c1ae660", + "multiChainValue": "0x31F884940B3876290A16B183b841bbE7E4965743", "tss": "0x61141bce5352fc9b5ff648468676e356518d86ab", "tssUpdater": "0x7274d1d5dddef36aac53dd45b93487ce01ef0a55", "uniswapV2Router02": "0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D", @@ -33,30 +33,30 @@ "uniswapV3Router": "", "usdc": "", "weth9": "", - "zetaToken": "0x011a76081989aDA18d0a16bf3fee2C6c3BD07B07", - "zetaTokenConsumerUniV2": "", + "zetaToken": "0xCc7bb2D219A0FC08033E130629C2B854b7bA9195", + "zetaTokenConsumerUniV2": "0xDDB1C86c69f258F6d33377a8725404E4393326bB", "immutableCreate2Factory": "0x095a03c6a68137fE9a566bBc3e552F299d8b886d" }, "polygon-mumbai": { - "connector": "0xa5467B39Ad9f51DEb6b30Abfa9828531dCBA99A9", + "connector": "0x000054d3A0Bc83Ec7808F52fCdC28A96c89F6C5c", "crossChainCounter": "", "crossChainNft": "", "dai": "", "multiChainValue": "0xb3021F5603291895b0Df5fC6276cda33a0B90fa6", "tss": "0x61141bce5352fc9b5ff648468676e356518d86ab", "tssUpdater": "0x7274d1d5dddef36aac53dd45b93487ce01ef0a55", - "uniswapV2Router02": "", + "uniswapV2Router02": "0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D", "uniswapV3NftManager": "", "uniswapV3Quoter": "", "uniswapV3Router": "", "usdc": "", "weth9": "", - "zetaToken": "0x84383be9B3Eda50ABD5899936D4963505d449de2", + "zetaToken": "0x000080383847bd75f91c168269aa74004877592f", "zetaTokenConsumerUniV2": "", "immutableCreate2Factory": "0x095a03c6a68137fE9a566bBc3e552F299d8b886d" }, "ropsten": { - "connector": "0x91Ea4f79D39DA890B03E965111953d0494936072", + "connector": "0x000054d3A0Bc83Ec7808F52fCdC28A96c89F6C5c", "crossChainCounter": "", "crossChainNft": "", "dai": "", @@ -69,8 +69,8 @@ "uniswapV3Router": "", "usdc": "", "weth9": "", - "zetaToken": "0x3357A3bd90A001282bA2152D6c0a2372c8E0e28E", - "zetaTokenConsumerUniV2": "", + "zetaToken": "0x000080383847bd75f91c168269aa74004877592f", + "zetaTokenConsumerUniV2": "0x197bC8e7e813DfB95dEf0DAA44399648bC86f329", "immutableCreate2Factory": "0x095a03c6a68137fE9a566bBc3e552F299d8b886d" } } \ No newline at end of file diff --git a/packages/example-contracts/.env.example b/packages/example-contracts/.env.example index 1a0f5a59..008f7836 100644 --- a/packages/example-contracts/.env.example +++ b/packages/example-contracts/.env.example @@ -12,3 +12,6 @@ POYLGONSCAN_API_KEY=<...> # BSC BSCSCAN_API_KEY=<...> + +# Deployer address. This is needed to calculate salt in deterministic deployments +DEPLOYER_ADDRESS= diff --git a/packages/example-contracts/contracts/shared/ImmutableCreate2Factory.sol b/packages/example-contracts/contracts/shared/ImmutableCreate2Factory.sol new file mode 100644 index 00000000..9e47166d --- /dev/null +++ b/packages/example-contracts/contracts/shared/ImmutableCreate2Factory.sol @@ -0,0 +1,8 @@ +// SPDX-License-Identifier: MIT +pragma solidity 0.5.10; + +/** + * @dev Contracts that need to be compiled for testing purposes + */ + +import "@zetachain/protocol-contracts/contracts/ImmutableCreate2Factory.sol"; diff --git a/packages/example-contracts/hardhat.config.ts b/packages/example-contracts/hardhat.config.ts index c45fbd42..53562131 100644 --- a/packages/example-contracts/hardhat.config.ts +++ b/packages/example-contracts/hardhat.config.ts @@ -5,7 +5,7 @@ import "hardhat-gas-reporter"; import "solidity-coverage"; import "tsconfig-paths/register"; -import { getHardhatConfigNetworks, getHardhatConfigScanners } from "@zetachain/addresses/networks"; +import { getHardhatConfigNetworks, getHardhatConfigScanners } from "@zetachain/addresses-tools/src/networks"; import * as dotenv from "dotenv"; import type { HardhatUserConfig } from "hardhat/types"; @@ -25,7 +25,11 @@ const config: HardhatUserConfig = { ...getHardhatConfigNetworks(PRIVATE_KEYS), }, solidity: { - compilers: [{ version: "0.6.6" /** For uniswap v2 */ }, { version: "0.8.7" }], + compilers: [ + { version: "0.5.10" /** For create2 factory */ }, + { version: "0.6.6" /** For uniswap v2 */ }, + { version: "0.8.7" }, + ], settings: { /** * @see {@link https://smock.readthedocs.io/en/latest/getting-started.html} diff --git a/packages/example-contracts/lib/multi-chain-value/MultiChainValue.helpers.ts b/packages/example-contracts/lib/multi-chain-value/MultiChainValue.helpers.ts index bd1f9960..3776ab28 100644 --- a/packages/example-contracts/lib/multi-chain-value/MultiChainValue.helpers.ts +++ b/packages/example-contracts/lib/multi-chain-value/MultiChainValue.helpers.ts @@ -1,4 +1,5 @@ import { getAddress } from "@zetachain/addresses"; +import { ZetaEth, ZetaEth__factory as ZetaEthFactory } from "@zetachain/interfaces/typechain-types"; import assert from "assert"; import { ethers, network } from "hardhat"; @@ -10,8 +11,6 @@ import { MultiChainValueMock__factory as MultiChainValueMockFactory, ZetaConnectorMockValue, ZetaConnectorMockValue__factory as ZetaConnectorMockValueFactory, - ZetaEth, - ZetaEth__factory as ZetaEthFactory, } from "../../typechain-types"; /** diff --git a/packages/example-contracts/lib/shared/ImmutableCreate2Factory.helpers.ts b/packages/example-contracts/lib/shared/ImmutableCreate2Factory.helpers.ts new file mode 100644 index 00000000..e180e84f --- /dev/null +++ b/packages/example-contracts/lib/shared/ImmutableCreate2Factory.helpers.ts @@ -0,0 +1,75 @@ +import { Provider, TransactionReceipt } from "@ethersproject/providers"; +import { ImmutableCreate2Factory__factory } from "@zetachain/interfaces/typechain-types"; +import { ethers, Signer } from "ethers"; + +export const buildBytecode = (constructorTypes: any[], constructorArgs: any[], contractBytecode: string) => + `${contractBytecode}${encodeParams(constructorTypes, constructorArgs).slice(2)}`; + +export const buildCreate2Address = (saltHex: string, byteCode: string, factoryAddress: string) => { + const payload = ethers.utils.keccak256( + `0x${["ff", factoryAddress, saltHex, ethers.utils.keccak256(byteCode)].map((x) => x.replace(/0x/, "")).join("")}` + ); + + return `0x${payload.slice(-40)}`.toLowerCase(); +}; + +export const numberToUint256 = (value: number) => { + const hex = value.toString(16); + return `0x${"0".repeat(64 - hex.length)}${hex}`; +}; + +export const saltToHex = (salt: string, signerAddress: string) => { + let salthex = ethers.utils.formatBytes32String(salt); + return `${signerAddress}${salthex.slice(2)}`.substring(0, salthex.length); +}; + +export const encodeParam = (dataType: any, data: any) => { + const abiCoder = ethers.utils.defaultAbiCoder; + return abiCoder.encode([dataType], [data]); +}; + +export const encodeParams = (dataTypes: any[], data: any[]) => { + const abiCoder = ethers.utils.defaultAbiCoder; + return abiCoder.encode(dataTypes, data); +}; + +export async function deployContractToAddress({ + factoryAddress, + salt, + contractBytecode, + constructorTypes = [] as string[], + constructorArgs = [] as any[], + signer, +}: { + constructorArgs?: any[]; + constructorTypes?: string[]; + contractBytecode: string; + factoryAddress: string; + salt: string; + signer: Signer; +}) { + const factory = ImmutableCreate2Factory__factory.connect(factoryAddress, signer); + + const bytecode = buildBytecode(constructorTypes, constructorArgs, contractBytecode); + + const computedAddr = await factory.findCreate2Address(salt, bytecode); + + const tx = await factory.safeCreate2(salt, bytecode, { + gasLimit: 6000000, + }); + const result = await tx.wait(); + + return { + address: computedAddr as string, + receipt: result as TransactionReceipt, + txHash: result.transactionHash as string, + }; +} + +/** + * Determines if there's a contract deployed on the provided address. + */ +export async function isDeployed(address: string, provider: Provider) { + const code = await provider.getCode(address); + return code.slice(2).length > 0; +} diff --git a/packages/example-contracts/lib/shared/deploy.helpers.ts b/packages/example-contracts/lib/shared/deploy.helpers.ts index aef2132d..e1cc9778 100644 --- a/packages/example-contracts/lib/shared/deploy.helpers.ts +++ b/packages/example-contracts/lib/shared/deploy.helpers.ts @@ -1,4 +1,5 @@ -import { getAddress, getScanVariable, NetworkName, ZetaAddress, ZetaNetworkName } from "@zetachain/addresses"; +import { getAddress, NetworkName, ZetaAddress, ZetaNetworkName } from "@zetachain/addresses"; +import { getScanVariable } from "@zetachain/addresses-tools"; import { execSync } from "child_process"; import { BaseContract, ContractFactory } from "ethers"; import { ethers } from "hardhat"; diff --git a/packages/example-contracts/lib/shared/network.constants.ts b/packages/example-contracts/lib/shared/network.constants.ts index f452ff62..c9567edd 100644 --- a/packages/example-contracts/lib/shared/network.constants.ts +++ b/packages/example-contracts/lib/shared/network.constants.ts @@ -67,6 +67,8 @@ export const networkVariables: Record = { }; export const isNetworkName = (str: string): str is NetworkName => str in networkVariables; +export const isEthNetworkName = (networkName: string) => + networkName === "eth-localnet" || networkName === "goerli" || networkName === "eth-mainnet"; export type AddressConstants = Partial< Record< diff --git a/packages/example-contracts/package.json b/packages/example-contracts/package.json index 2c55c1eb..84984bbd 100644 --- a/packages/example-contracts/package.json +++ b/packages/example-contracts/package.json @@ -34,6 +34,7 @@ "@uniswap/v2-periphery": "1.1.0-beta.0", "@zetachain/addresses": "workspace:^", "@zetachain/addresses-tools": "workspace:^", + "@zetachain/interfaces": "workspace:^", "@zetachain/protocol-contracts": "workspace:^", "ethers": "5.6.8" } diff --git a/packages/example-contracts/scripts/cross-chain-warriors/deterministic-deploy.ts b/packages/example-contracts/scripts/cross-chain-warriors/deterministic-deploy.ts new file mode 100644 index 00000000..b4207774 --- /dev/null +++ b/packages/example-contracts/scripts/cross-chain-warriors/deterministic-deploy.ts @@ -0,0 +1,58 @@ +import { getAddress, isNetworkName } from "@zetachain/addresses"; +import { saveAddress } from "@zetachain/addresses-tools"; +import { BigNumber } from "ethers"; +import { ethers, network } from "hardhat"; + +import { deployContractToAddress, saltToHex } from "../../lib/shared/ImmutableCreate2Factory.helpers"; +import { isEthNetworkName } from "../../lib/shared/network.constants"; +import { CrossChainWarriors__factory } from "../../typechain-types"; + +const DEPLOYER_ADDRESS = process.env.DEPLOYER_ADDRESS ?? ""; +const SALT_NUMBER = "0"; + +export async function deterministicDeployCrossChainNft() { + if (!isNetworkName(network.name)) { + throw new Error(`network.name: ${network.name} isn't supported.`); + } + + const accounts = await ethers.getSigners(); + const [signer] = accounts; + + const saltNumber = SALT_NUMBER; + const saltStr = BigNumber.from(saltNumber).toHexString(); + + const connector = getAddress("connector"); + const zetaToken = getAddress("zetaToken"); + const zetaTokenConsumerUniV2 = getAddress("zetaTokenConsumerUniV2"); + + const immutableCreate2Factory = getAddress("immutableCreate2Factory"); + + const salthex = saltToHex(saltStr, DEPLOYER_ADDRESS); + + const useEven = isEthNetworkName(network.name); + const constructorTypes = ["address", "address", "address", "bool"]; + const constructorArgs = [connector, zetaToken, zetaTokenConsumerUniV2, useEven]; + + const contractBytecode = CrossChainWarriors__factory.bytecode; + + const { address } = await deployContractToAddress({ + constructorArgs, + constructorTypes, + contractBytecode, + factoryAddress: immutableCreate2Factory, + salt: salthex, + signer, + }); + + saveAddress("crossChainNft", address); + console.log("Deployed crossChainNft. Address:", address); +} + +if (!process.env.EXECUTE_PROGRAMMATICALLY) { + deterministicDeployCrossChainNft() + .then(() => process.exit(0)) + .catch((error) => { + console.error(error); + process.exit(1); + }); +} diff --git a/packages/example-contracts/scripts/multi-chain-swap/deterministic-deploy.ts b/packages/example-contracts/scripts/multi-chain-swap/deterministic-deploy.ts new file mode 100644 index 00000000..d3f549a4 --- /dev/null +++ b/packages/example-contracts/scripts/multi-chain-swap/deterministic-deploy.ts @@ -0,0 +1,58 @@ +import { getAddress, isNetworkName } from "@zetachain/addresses"; +import { saveAddress } from "@zetachain/addresses-tools"; +import { BigNumber } from "ethers"; +import { ethers, network } from "hardhat"; + +import { deployContractToAddress, saltToHex } from "../../lib/shared/ImmutableCreate2Factory.helpers"; +import { isEthNetworkName } from "../../lib/shared/network.constants"; +import { MultiChainSwapBase__factory } from "../../typechain-types"; +import { setMultiChainSwapCrossChainData } from "./set-cross-chain-data"; + +const DEPLOYER_ADDRESS = process.env.DEPLOYER_ADDRESS ?? ""; +const SALT_NUMBER = "0"; + +export async function deterministicDeployMultiChainSwap() { + if (!isNetworkName(network.name)) { + throw new Error(`network.name: ${network.name} isn't supported.`); + } + + const accounts = await ethers.getSigners(); + const [signer] = accounts; + + const saltNumber = SALT_NUMBER; + const saltStr = BigNumber.from(saltNumber).toHexString(); + + const connector = getAddress("connector"); + const zetaToken = getAddress("zetaToken"); + const uniswapV2Router02 = getAddress("uniswapV2Router02"); + + const immutableCreate2Factory = getAddress("immutableCreate2Factory"); + + const salthex = saltToHex(saltStr, DEPLOYER_ADDRESS); + + const constructorTypes = ["address", "address", "address"]; + const constructorArgs = [connector, zetaToken, uniswapV2Router02]; + + const contractBytecode = MultiChainSwapBase__factory.bytecode; + + const { address } = await deployContractToAddress({ + constructorArgs, + constructorTypes, + contractBytecode, + factoryAddress: immutableCreate2Factory, + salt: salthex, + signer, + }); + + saveAddress("multiChainSwap", address); + console.log("Deployed MultiChainSwap. Address:", address); +} + +if (!process.env.EXECUTE_PROGRAMMATICALLY) { + deterministicDeployMultiChainSwap() + .then(() => process.exit(0)) + .catch((error) => { + console.error(error); + process.exit(1); + }); +} diff --git a/packages/example-contracts/scripts/multi-chain-value/deterministic-deploy.ts b/packages/example-contracts/scripts/multi-chain-value/deterministic-deploy.ts new file mode 100644 index 00000000..4b39431e --- /dev/null +++ b/packages/example-contracts/scripts/multi-chain-value/deterministic-deploy.ts @@ -0,0 +1,55 @@ +import { getAddress, isNetworkName } from "@zetachain/addresses"; +import { saveAddress } from "@zetachain/addresses-tools"; +import { BigNumber } from "ethers"; +import { ethers, network } from "hardhat"; + +import { deployContractToAddress, saltToHex } from "../../lib/shared/ImmutableCreate2Factory.helpers"; +import { MultiChainValue__factory } from "../typechain-types"; + +const DEPLOYER_ADDRESS = process.env.DEPLOYER_ADDRESS ?? ""; +const SALT_NUMBER = "0"; + +export async function deterministicDeployMultiChainValue() { + if (!isNetworkName(network.name)) { + throw new Error(`network.name: ${network.name} isn't supported.`); + } + + const accounts = await ethers.getSigners(); + const [signer] = accounts; + + const saltNumber = SALT_NUMBER; + const saltStr = BigNumber.from(saltNumber).toHexString(); + + const connector = getAddress("connector"); + const zetaToken = getAddress("zetaToken"); + + const immutableCreate2Factory = getAddress("immutableCreate2Factory"); + + const salthex = saltToHex(saltStr, DEPLOYER_ADDRESS); + + const constructorTypes = ["address", "address"]; + const constructorArgs = [connector, zetaToken]; + + const contractBytecode = MultiChainValue__factory.bytecode; + + const { address } = await deployContractToAddress({ + constructorArgs, + constructorTypes, + contractBytecode, + factoryAddress: immutableCreate2Factory, + salt: salthex, + signer, + }); + + saveAddress("multiChainValue", address); + console.log("Deployed multiChainValue. Address:", address); +} + +if (!process.env.EXECUTE_PROGRAMMATICALLY) { + deterministicDeployMultiChainValue() + .then(() => process.exit(0)) + .catch((error) => { + console.error(error); + process.exit(1); + }); +} diff --git a/packages/example-contracts/test/CrossChainMessage.spec.ts b/packages/example-contracts/test/CrossChainMessage.spec.ts index ba408e41..af7fcb1b 100644 --- a/packages/example-contracts/test/CrossChainMessage.spec.ts +++ b/packages/example-contracts/test/CrossChainMessage.spec.ts @@ -1,5 +1,6 @@ import { SignerWithAddress } from "@nomiclabs/hardhat-ethers/signers"; import { getAddress } from "@zetachain/addresses"; +import { ZetaTokenConsumerUniV2 } from "@zetachain/interfaces/typechain-types"; import { expect } from "chai"; import { parseEther } from "ethers/lib/utils"; import { ethers } from "hardhat"; @@ -10,7 +11,6 @@ import { } from "../lib/cross-chain-message/CrossChainMessage.helpers"; import { deployZetaTokenConsumerUniV2, getZetaMock } from "../lib/shared/deploy.helpers"; import { CrossChainMessage, CrossChainMessageConnector, ZetaEthMock } from "../typechain-types"; -import { ZetaTokenConsumerUniV2 } from "../typechain-types/@zetachain/protocol-contracts/contracts/ZetaTokenConsumerUniV2.strategy.sol"; import { addZetaEthLiquidityTest } from "./test.helpers"; describe("CrossChainMessage tests", () => { diff --git a/packages/example-contracts/test/MultiChainValue.spec.ts b/packages/example-contracts/test/MultiChainValue.spec.ts index 7af7cf2b..744a7934 100644 --- a/packages/example-contracts/test/MultiChainValue.spec.ts +++ b/packages/example-contracts/test/MultiChainValue.spec.ts @@ -1,4 +1,5 @@ import { SignerWithAddress } from "@nomiclabs/hardhat-ethers/signers"; +import { ZetaEth } from "@zetachain/interfaces/typechain-types"; import { expect } from "chai"; import { ethers } from "hardhat"; @@ -7,7 +8,7 @@ import { deployZetaConnectorMock, deployZetaEthMock, } from "../lib/multi-chain-value/MultiChainValue.helpers"; -import { MultiChainValueMock, ZetaConnectorMockValue, ZetaEth } from "../typechain-types"; +import { MultiChainValueMock, ZetaConnectorMockValue } from "../typechain-types"; describe("MultiChainValue tests", () => { let multiChainValueContractA: MultiChainValueMock; diff --git a/packages/example-contracts/tsconfig.json b/packages/example-contracts/tsconfig.json index 31d7bc8d..355cfda5 100644 --- a/packages/example-contracts/tsconfig.json +++ b/packages/example-contracts/tsconfig.json @@ -7,7 +7,8 @@ "baseUrl": ".", "paths": { "@zetachain/addresses": ["../addresses/src/index"], - "@zetachain/addresses/*": ["../addresses/src/*"] + "@zetachain/addresses/*": ["../addresses/src/*"], + "@zetachain/interfaces": ["../interfaces/src/index"] } } } diff --git a/packages/interfaces/abi/json/contracts/ZetaConnector.base.sol/ZetaConnectorBase.json b/packages/interfaces/abi/json/contracts/ZetaConnector.base.sol/ZetaConnectorBase.json index 06b8dda3..293a1a02 100644 --- a/packages/interfaces/abi/json/contracts/ZetaConnector.base.sol/ZetaConnectorBase.json +++ b/packages/interfaces/abi/json/contracts/ZetaConnector.base.sol/ZetaConnectorBase.json @@ -178,7 +178,7 @@ { "indexed": false, "internalType": "uint256", - "name": "zetaValueAndGas", + "name": "zetaValue", "type": "uint256" }, { @@ -219,7 +219,7 @@ "type": "uint256" }, { - "indexed": true, + "indexed": false, "internalType": "bytes", "name": "destinationAddress", "type": "bytes" @@ -227,7 +227,7 @@ { "indexed": false, "internalType": "uint256", - "name": "zetaValueAndGas", + "name": "remainingZetaValue", "type": "uint256" }, { @@ -268,7 +268,7 @@ "type": "uint256" }, { - "indexed": true, + "indexed": false, "internalType": "bytes", "name": "destinationAddress", "type": "bytes" @@ -320,7 +320,7 @@ }, { "internalType": "uint256", - "name": "zetaValueAndGas", + "name": "zetaValue", "type": "uint256" }, { @@ -363,7 +363,7 @@ }, { "internalType": "uint256", - "name": "zetaValueAndGas", + "name": "remainingZetaValue", "type": "uint256" }, { diff --git a/packages/interfaces/abi/json/contracts/ZetaConnector.eth.sol/ZetaConnectorEth.json b/packages/interfaces/abi/json/contracts/ZetaConnector.eth.sol/ZetaConnectorEth.json index a7c081a5..21407229 100644 --- a/packages/interfaces/abi/json/contracts/ZetaConnector.eth.sol/ZetaConnectorEth.json +++ b/packages/interfaces/abi/json/contracts/ZetaConnector.eth.sol/ZetaConnectorEth.json @@ -178,7 +178,7 @@ { "indexed": false, "internalType": "uint256", - "name": "zetaValueAndGas", + "name": "zetaValue", "type": "uint256" }, { @@ -219,7 +219,7 @@ "type": "uint256" }, { - "indexed": true, + "indexed": false, "internalType": "bytes", "name": "destinationAddress", "type": "bytes" @@ -227,7 +227,7 @@ { "indexed": false, "internalType": "uint256", - "name": "zetaValueAndGas", + "name": "remainingZetaValue", "type": "uint256" }, { @@ -268,7 +268,7 @@ "type": "uint256" }, { - "indexed": true, + "indexed": false, "internalType": "bytes", "name": "destinationAddress", "type": "bytes" @@ -333,7 +333,7 @@ }, { "internalType": "uint256", - "name": "zetaValueAndGas", + "name": "zetaValue", "type": "uint256" }, { @@ -376,7 +376,7 @@ }, { "internalType": "uint256", - "name": "zetaValueAndGas", + "name": "remainingZetaValue", "type": "uint256" }, { diff --git a/packages/interfaces/abi/json/contracts/ZetaConnector.non-eth.sol/ZetaConnectorNonEth.json b/packages/interfaces/abi/json/contracts/ZetaConnector.non-eth.sol/ZetaConnectorNonEth.json index 1facd746..76732951 100644 --- a/packages/interfaces/abi/json/contracts/ZetaConnector.non-eth.sol/ZetaConnectorNonEth.json +++ b/packages/interfaces/abi/json/contracts/ZetaConnector.non-eth.sol/ZetaConnectorNonEth.json @@ -178,7 +178,7 @@ { "indexed": false, "internalType": "uint256", - "name": "zetaValueAndGas", + "name": "zetaValue", "type": "uint256" }, { @@ -219,7 +219,7 @@ "type": "uint256" }, { - "indexed": true, + "indexed": false, "internalType": "bytes", "name": "destinationAddress", "type": "bytes" @@ -227,7 +227,7 @@ { "indexed": false, "internalType": "uint256", - "name": "zetaValueAndGas", + "name": "remainingZetaValue", "type": "uint256" }, { @@ -268,7 +268,7 @@ "type": "uint256" }, { - "indexed": true, + "indexed": false, "internalType": "bytes", "name": "destinationAddress", "type": "bytes" @@ -346,7 +346,7 @@ }, { "internalType": "uint256", - "name": "zetaValueAndGas", + "name": "zetaValue", "type": "uint256" }, { @@ -389,7 +389,7 @@ }, { "internalType": "uint256", - "name": "zetaValueAndGas", + "name": "remainingZetaValue", "type": "uint256" }, { diff --git a/packages/interfaces/abi/json/contracts/interfaces/ZetaInterfaces.sol/ZetaReceiver.json b/packages/interfaces/abi/json/contracts/interfaces/ZetaInterfaces.sol/ZetaReceiver.json index fff85f22..e70181e3 100644 --- a/packages/interfaces/abi/json/contracts/interfaces/ZetaInterfaces.sol/ZetaReceiver.json +++ b/packages/interfaces/abi/json/contracts/interfaces/ZetaInterfaces.sol/ZetaReceiver.json @@ -20,7 +20,7 @@ }, { "internalType": "uint256", - "name": "zetaValueAndGas", + "name": "zetaValue", "type": "uint256" }, { @@ -65,7 +65,7 @@ }, { "internalType": "uint256", - "name": "zetaValueAndGas", + "name": "remainingZetaValue", "type": "uint256" }, { diff --git a/packages/interfaces/abi/json/contracts/testing/ZetaInteractorMock.sol/ZetaInteractorMock.json b/packages/interfaces/abi/json/contracts/testing/ZetaInteractorMock.sol/ZetaInteractorMock.json index aeaa964c..54f52536 100644 --- a/packages/interfaces/abi/json/contracts/testing/ZetaInteractorMock.sol/ZetaInteractorMock.json +++ b/packages/interfaces/abi/json/contracts/testing/ZetaInteractorMock.sol/ZetaInteractorMock.json @@ -108,7 +108,7 @@ }, { "internalType": "uint256", - "name": "zetaValueAndGas", + "name": "zetaValue", "type": "uint256" }, { @@ -153,7 +153,7 @@ }, { "internalType": "uint256", - "name": "zetaValueAndGas", + "name": "remainingZetaValue", "type": "uint256" }, { diff --git a/packages/interfaces/abi/json/contracts/testing/ZetaReceiverMock.sol/ZetaReceiverMock.json b/packages/interfaces/abi/json/contracts/testing/ZetaReceiverMock.sol/ZetaReceiverMock.json index 41efc9a5..8b4a33ae 100644 --- a/packages/interfaces/abi/json/contracts/testing/ZetaReceiverMock.sol/ZetaReceiverMock.json +++ b/packages/interfaces/abi/json/contracts/testing/ZetaReceiverMock.sol/ZetaReceiverMock.json @@ -46,7 +46,7 @@ }, { "internalType": "uint256", - "name": "zetaValueAndGas", + "name": "zetaValue", "type": "uint256" }, { @@ -91,7 +91,7 @@ }, { "internalType": "uint256", - "name": "zetaValueAndGas", + "name": "remainingZetaValue", "type": "uint256" }, { diff --git a/packages/interfaces/typechain-types/contracts/ZetaConnector.base.sol/ZetaConnectorBase.ts b/packages/interfaces/typechain-types/contracts/ZetaConnector.base.sol/ZetaConnectorBase.ts index 92562636..f7bc219d 100644 --- a/packages/interfaces/typechain-types/contracts/ZetaConnector.base.sol/ZetaConnectorBase.ts +++ b/packages/interfaces/typechain-types/contracts/ZetaConnector.base.sol/ZetaConnectorBase.ts @@ -233,7 +233,7 @@ export interface ZetaReceivedEventObject { zetaTxSenderAddress: string; sourceChainId: BigNumber; destinationAddress: string; - zetaValueAndGas: BigNumber; + zetaValue: BigNumber; message: string; internalSendHash: string; } @@ -249,7 +249,7 @@ export interface ZetaRevertedEventObject { sourceChainId: BigNumber; destinationChainId: BigNumber; destinationAddress: string; - zetaValueAndGas: BigNumber; + remainingZetaValue: BigNumber; message: string; internalSendHash: string; } @@ -308,7 +308,7 @@ export interface ZetaConnectorBase extends BaseContract { zetaTxSenderAddress: BytesLike, sourceChainId: BigNumberish, destinationAddress: string, - zetaValueAndGas: BigNumberish, + zetaValue: BigNumberish, message: BytesLike, internalSendHash: BytesLike, overrides?: Overrides & { from?: string | Promise } @@ -319,7 +319,7 @@ export interface ZetaConnectorBase extends BaseContract { sourceChainId: BigNumberish, destinationAddress: BytesLike, destinationChainId: BigNumberish, - zetaValueAndGas: BigNumberish, + remainingZetaValue: BigNumberish, message: BytesLike, internalSendHash: BytesLike, overrides?: Overrides & { from?: string | Promise } @@ -367,7 +367,7 @@ export interface ZetaConnectorBase extends BaseContract { zetaTxSenderAddress: BytesLike, sourceChainId: BigNumberish, destinationAddress: string, - zetaValueAndGas: BigNumberish, + zetaValue: BigNumberish, message: BytesLike, internalSendHash: BytesLike, overrides?: Overrides & { from?: string | Promise } @@ -378,7 +378,7 @@ export interface ZetaConnectorBase extends BaseContract { sourceChainId: BigNumberish, destinationAddress: BytesLike, destinationChainId: BigNumberish, - zetaValueAndGas: BigNumberish, + remainingZetaValue: BigNumberish, message: BytesLike, internalSendHash: BytesLike, overrides?: Overrides & { from?: string | Promise } @@ -426,7 +426,7 @@ export interface ZetaConnectorBase extends BaseContract { zetaTxSenderAddress: BytesLike, sourceChainId: BigNumberish, destinationAddress: string, - zetaValueAndGas: BigNumberish, + zetaValue: BigNumberish, message: BytesLike, internalSendHash: BytesLike, overrides?: CallOverrides @@ -437,7 +437,7 @@ export interface ZetaConnectorBase extends BaseContract { sourceChainId: BigNumberish, destinationAddress: BytesLike, destinationChainId: BigNumberish, - zetaValueAndGas: BigNumberish, + remainingZetaValue: BigNumberish, message: BytesLike, internalSendHash: BytesLike, overrides?: CallOverrides @@ -504,7 +504,7 @@ export interface ZetaConnectorBase extends BaseContract { zetaTxSenderAddress?: null, sourceChainId?: BigNumberish | null, destinationAddress?: string | null, - zetaValueAndGas?: null, + zetaValue?: null, message?: null, internalSendHash?: BytesLike | null ): ZetaReceivedEventFilter; @@ -512,7 +512,7 @@ export interface ZetaConnectorBase extends BaseContract { zetaTxSenderAddress?: null, sourceChainId?: BigNumberish | null, destinationAddress?: string | null, - zetaValueAndGas?: null, + zetaValue?: null, message?: null, internalSendHash?: BytesLike | null ): ZetaReceivedEventFilter; @@ -521,8 +521,8 @@ export interface ZetaConnectorBase extends BaseContract { zetaTxSenderAddress?: null, sourceChainId?: null, destinationChainId?: BigNumberish | null, - destinationAddress?: BytesLike | null, - zetaValueAndGas?: null, + destinationAddress?: null, + remainingZetaValue?: null, message?: null, internalSendHash?: BytesLike | null ): ZetaRevertedEventFilter; @@ -530,8 +530,8 @@ export interface ZetaConnectorBase extends BaseContract { zetaTxSenderAddress?: null, sourceChainId?: null, destinationChainId?: BigNumberish | null, - destinationAddress?: BytesLike | null, - zetaValueAndGas?: null, + destinationAddress?: null, + remainingZetaValue?: null, message?: null, internalSendHash?: BytesLike | null ): ZetaRevertedEventFilter; @@ -540,7 +540,7 @@ export interface ZetaConnectorBase extends BaseContract { sourceTxOriginAddress?: null, zetaTxSenderAddress?: string | null, destinationChainId?: BigNumberish | null, - destinationAddress?: BytesLike | null, + destinationAddress?: null, zetaValueAndGas?: null, destinationGasLimit?: null, message?: null, @@ -550,7 +550,7 @@ export interface ZetaConnectorBase extends BaseContract { sourceTxOriginAddress?: null, zetaTxSenderAddress?: string | null, destinationChainId?: BigNumberish | null, - destinationAddress?: BytesLike | null, + destinationAddress?: null, zetaValueAndGas?: null, destinationGasLimit?: null, message?: null, @@ -563,7 +563,7 @@ export interface ZetaConnectorBase extends BaseContract { zetaTxSenderAddress: BytesLike, sourceChainId: BigNumberish, destinationAddress: string, - zetaValueAndGas: BigNumberish, + zetaValue: BigNumberish, message: BytesLike, internalSendHash: BytesLike, overrides?: Overrides & { from?: string | Promise } @@ -574,7 +574,7 @@ export interface ZetaConnectorBase extends BaseContract { sourceChainId: BigNumberish, destinationAddress: BytesLike, destinationChainId: BigNumberish, - zetaValueAndGas: BigNumberish, + remainingZetaValue: BigNumberish, message: BytesLike, internalSendHash: BytesLike, overrides?: Overrides & { from?: string | Promise } @@ -623,7 +623,7 @@ export interface ZetaConnectorBase extends BaseContract { zetaTxSenderAddress: BytesLike, sourceChainId: BigNumberish, destinationAddress: string, - zetaValueAndGas: BigNumberish, + zetaValue: BigNumberish, message: BytesLike, internalSendHash: BytesLike, overrides?: Overrides & { from?: string | Promise } @@ -634,7 +634,7 @@ export interface ZetaConnectorBase extends BaseContract { sourceChainId: BigNumberish, destinationAddress: BytesLike, destinationChainId: BigNumberish, - zetaValueAndGas: BigNumberish, + remainingZetaValue: BigNumberish, message: BytesLike, internalSendHash: BytesLike, overrides?: Overrides & { from?: string | Promise } diff --git a/packages/interfaces/typechain-types/contracts/ZetaConnector.eth.sol/ZetaConnectorEth.ts b/packages/interfaces/typechain-types/contracts/ZetaConnector.eth.sol/ZetaConnectorEth.ts index 660ee13f..08a64ec0 100644 --- a/packages/interfaces/typechain-types/contracts/ZetaConnector.eth.sol/ZetaConnectorEth.ts +++ b/packages/interfaces/typechain-types/contracts/ZetaConnector.eth.sol/ZetaConnectorEth.ts @@ -243,7 +243,7 @@ export interface ZetaReceivedEventObject { zetaTxSenderAddress: string; sourceChainId: BigNumber; destinationAddress: string; - zetaValueAndGas: BigNumber; + zetaValue: BigNumber; message: string; internalSendHash: string; } @@ -259,7 +259,7 @@ export interface ZetaRevertedEventObject { sourceChainId: BigNumber; destinationChainId: BigNumber; destinationAddress: string; - zetaValueAndGas: BigNumber; + remainingZetaValue: BigNumber; message: string; internalSendHash: string; } @@ -320,7 +320,7 @@ export interface ZetaConnectorEth extends BaseContract { zetaTxSenderAddress: BytesLike, sourceChainId: BigNumberish, destinationAddress: string, - zetaValueAndGas: BigNumberish, + zetaValue: BigNumberish, message: BytesLike, internalSendHash: BytesLike, overrides?: Overrides & { from?: string | Promise } @@ -331,7 +331,7 @@ export interface ZetaConnectorEth extends BaseContract { sourceChainId: BigNumberish, destinationAddress: BytesLike, destinationChainId: BigNumberish, - zetaValueAndGas: BigNumberish, + remainingZetaValue: BigNumberish, message: BytesLike, internalSendHash: BytesLike, overrides?: Overrides & { from?: string | Promise } @@ -381,7 +381,7 @@ export interface ZetaConnectorEth extends BaseContract { zetaTxSenderAddress: BytesLike, sourceChainId: BigNumberish, destinationAddress: string, - zetaValueAndGas: BigNumberish, + zetaValue: BigNumberish, message: BytesLike, internalSendHash: BytesLike, overrides?: Overrides & { from?: string | Promise } @@ -392,7 +392,7 @@ export interface ZetaConnectorEth extends BaseContract { sourceChainId: BigNumberish, destinationAddress: BytesLike, destinationChainId: BigNumberish, - zetaValueAndGas: BigNumberish, + remainingZetaValue: BigNumberish, message: BytesLike, internalSendHash: BytesLike, overrides?: Overrides & { from?: string | Promise } @@ -442,7 +442,7 @@ export interface ZetaConnectorEth extends BaseContract { zetaTxSenderAddress: BytesLike, sourceChainId: BigNumberish, destinationAddress: string, - zetaValueAndGas: BigNumberish, + zetaValue: BigNumberish, message: BytesLike, internalSendHash: BytesLike, overrides?: CallOverrides @@ -453,7 +453,7 @@ export interface ZetaConnectorEth extends BaseContract { sourceChainId: BigNumberish, destinationAddress: BytesLike, destinationChainId: BigNumberish, - zetaValueAndGas: BigNumberish, + remainingZetaValue: BigNumberish, message: BytesLike, internalSendHash: BytesLike, overrides?: CallOverrides @@ -520,7 +520,7 @@ export interface ZetaConnectorEth extends BaseContract { zetaTxSenderAddress?: null, sourceChainId?: BigNumberish | null, destinationAddress?: string | null, - zetaValueAndGas?: null, + zetaValue?: null, message?: null, internalSendHash?: BytesLike | null ): ZetaReceivedEventFilter; @@ -528,7 +528,7 @@ export interface ZetaConnectorEth extends BaseContract { zetaTxSenderAddress?: null, sourceChainId?: BigNumberish | null, destinationAddress?: string | null, - zetaValueAndGas?: null, + zetaValue?: null, message?: null, internalSendHash?: BytesLike | null ): ZetaReceivedEventFilter; @@ -537,8 +537,8 @@ export interface ZetaConnectorEth extends BaseContract { zetaTxSenderAddress?: null, sourceChainId?: null, destinationChainId?: BigNumberish | null, - destinationAddress?: BytesLike | null, - zetaValueAndGas?: null, + destinationAddress?: null, + remainingZetaValue?: null, message?: null, internalSendHash?: BytesLike | null ): ZetaRevertedEventFilter; @@ -546,8 +546,8 @@ export interface ZetaConnectorEth extends BaseContract { zetaTxSenderAddress?: null, sourceChainId?: null, destinationChainId?: BigNumberish | null, - destinationAddress?: BytesLike | null, - zetaValueAndGas?: null, + destinationAddress?: null, + remainingZetaValue?: null, message?: null, internalSendHash?: BytesLike | null ): ZetaRevertedEventFilter; @@ -556,7 +556,7 @@ export interface ZetaConnectorEth extends BaseContract { sourceTxOriginAddress?: null, zetaTxSenderAddress?: string | null, destinationChainId?: BigNumberish | null, - destinationAddress?: BytesLike | null, + destinationAddress?: null, zetaValueAndGas?: null, destinationGasLimit?: null, message?: null, @@ -566,7 +566,7 @@ export interface ZetaConnectorEth extends BaseContract { sourceTxOriginAddress?: null, zetaTxSenderAddress?: string | null, destinationChainId?: BigNumberish | null, - destinationAddress?: BytesLike | null, + destinationAddress?: null, zetaValueAndGas?: null, destinationGasLimit?: null, message?: null, @@ -581,7 +581,7 @@ export interface ZetaConnectorEth extends BaseContract { zetaTxSenderAddress: BytesLike, sourceChainId: BigNumberish, destinationAddress: string, - zetaValueAndGas: BigNumberish, + zetaValue: BigNumberish, message: BytesLike, internalSendHash: BytesLike, overrides?: Overrides & { from?: string | Promise } @@ -592,7 +592,7 @@ export interface ZetaConnectorEth extends BaseContract { sourceChainId: BigNumberish, destinationAddress: BytesLike, destinationChainId: BigNumberish, - zetaValueAndGas: BigNumberish, + remainingZetaValue: BigNumberish, message: BytesLike, internalSendHash: BytesLike, overrides?: Overrides & { from?: string | Promise } @@ -643,7 +643,7 @@ export interface ZetaConnectorEth extends BaseContract { zetaTxSenderAddress: BytesLike, sourceChainId: BigNumberish, destinationAddress: string, - zetaValueAndGas: BigNumberish, + zetaValue: BigNumberish, message: BytesLike, internalSendHash: BytesLike, overrides?: Overrides & { from?: string | Promise } @@ -654,7 +654,7 @@ export interface ZetaConnectorEth extends BaseContract { sourceChainId: BigNumberish, destinationAddress: BytesLike, destinationChainId: BigNumberish, - zetaValueAndGas: BigNumberish, + remainingZetaValue: BigNumberish, message: BytesLike, internalSendHash: BytesLike, overrides?: Overrides & { from?: string | Promise } diff --git a/packages/interfaces/typechain-types/contracts/ZetaConnector.non-eth.sol/ZetaConnectorNonEth.ts b/packages/interfaces/typechain-types/contracts/ZetaConnector.non-eth.sol/ZetaConnectorNonEth.ts index ca8b9ead..e92e3501 100644 --- a/packages/interfaces/typechain-types/contracts/ZetaConnector.non-eth.sol/ZetaConnectorNonEth.ts +++ b/packages/interfaces/typechain-types/contracts/ZetaConnector.non-eth.sol/ZetaConnectorNonEth.ts @@ -257,7 +257,7 @@ export interface ZetaReceivedEventObject { zetaTxSenderAddress: string; sourceChainId: BigNumber; destinationAddress: string; - zetaValueAndGas: BigNumber; + zetaValue: BigNumber; message: string; internalSendHash: string; } @@ -273,7 +273,7 @@ export interface ZetaRevertedEventObject { sourceChainId: BigNumber; destinationChainId: BigNumber; destinationAddress: string; - zetaValueAndGas: BigNumber; + remainingZetaValue: BigNumber; message: string; internalSendHash: string; } @@ -336,7 +336,7 @@ export interface ZetaConnectorNonEth extends BaseContract { zetaTxSenderAddress: BytesLike, sourceChainId: BigNumberish, destinationAddress: string, - zetaValueAndGas: BigNumberish, + zetaValue: BigNumberish, message: BytesLike, internalSendHash: BytesLike, overrides?: Overrides & { from?: string | Promise } @@ -347,7 +347,7 @@ export interface ZetaConnectorNonEth extends BaseContract { sourceChainId: BigNumberish, destinationAddress: BytesLike, destinationChainId: BigNumberish, - zetaValueAndGas: BigNumberish, + remainingZetaValue: BigNumberish, message: BytesLike, internalSendHash: BytesLike, overrides?: Overrides & { from?: string | Promise } @@ -404,7 +404,7 @@ export interface ZetaConnectorNonEth extends BaseContract { zetaTxSenderAddress: BytesLike, sourceChainId: BigNumberish, destinationAddress: string, - zetaValueAndGas: BigNumberish, + zetaValue: BigNumberish, message: BytesLike, internalSendHash: BytesLike, overrides?: Overrides & { from?: string | Promise } @@ -415,7 +415,7 @@ export interface ZetaConnectorNonEth extends BaseContract { sourceChainId: BigNumberish, destinationAddress: BytesLike, destinationChainId: BigNumberish, - zetaValueAndGas: BigNumberish, + remainingZetaValue: BigNumberish, message: BytesLike, internalSendHash: BytesLike, overrides?: Overrides & { from?: string | Promise } @@ -472,7 +472,7 @@ export interface ZetaConnectorNonEth extends BaseContract { zetaTxSenderAddress: BytesLike, sourceChainId: BigNumberish, destinationAddress: string, - zetaValueAndGas: BigNumberish, + zetaValue: BigNumberish, message: BytesLike, internalSendHash: BytesLike, overrides?: CallOverrides @@ -483,7 +483,7 @@ export interface ZetaConnectorNonEth extends BaseContract { sourceChainId: BigNumberish, destinationAddress: BytesLike, destinationChainId: BigNumberish, - zetaValueAndGas: BigNumberish, + remainingZetaValue: BigNumberish, message: BytesLike, internalSendHash: BytesLike, overrides?: CallOverrides @@ -555,7 +555,7 @@ export interface ZetaConnectorNonEth extends BaseContract { zetaTxSenderAddress?: null, sourceChainId?: BigNumberish | null, destinationAddress?: string | null, - zetaValueAndGas?: null, + zetaValue?: null, message?: null, internalSendHash?: BytesLike | null ): ZetaReceivedEventFilter; @@ -563,7 +563,7 @@ export interface ZetaConnectorNonEth extends BaseContract { zetaTxSenderAddress?: null, sourceChainId?: BigNumberish | null, destinationAddress?: string | null, - zetaValueAndGas?: null, + zetaValue?: null, message?: null, internalSendHash?: BytesLike | null ): ZetaReceivedEventFilter; @@ -572,8 +572,8 @@ export interface ZetaConnectorNonEth extends BaseContract { zetaTxSenderAddress?: null, sourceChainId?: null, destinationChainId?: BigNumberish | null, - destinationAddress?: BytesLike | null, - zetaValueAndGas?: null, + destinationAddress?: null, + remainingZetaValue?: null, message?: null, internalSendHash?: BytesLike | null ): ZetaRevertedEventFilter; @@ -581,8 +581,8 @@ export interface ZetaConnectorNonEth extends BaseContract { zetaTxSenderAddress?: null, sourceChainId?: null, destinationChainId?: BigNumberish | null, - destinationAddress?: BytesLike | null, - zetaValueAndGas?: null, + destinationAddress?: null, + remainingZetaValue?: null, message?: null, internalSendHash?: BytesLike | null ): ZetaRevertedEventFilter; @@ -591,7 +591,7 @@ export interface ZetaConnectorNonEth extends BaseContract { sourceTxOriginAddress?: null, zetaTxSenderAddress?: string | null, destinationChainId?: BigNumberish | null, - destinationAddress?: BytesLike | null, + destinationAddress?: null, zetaValueAndGas?: null, destinationGasLimit?: null, message?: null, @@ -601,7 +601,7 @@ export interface ZetaConnectorNonEth extends BaseContract { sourceTxOriginAddress?: null, zetaTxSenderAddress?: string | null, destinationChainId?: BigNumberish | null, - destinationAddress?: BytesLike | null, + destinationAddress?: null, zetaValueAndGas?: null, destinationGasLimit?: null, message?: null, @@ -618,7 +618,7 @@ export interface ZetaConnectorNonEth extends BaseContract { zetaTxSenderAddress: BytesLike, sourceChainId: BigNumberish, destinationAddress: string, - zetaValueAndGas: BigNumberish, + zetaValue: BigNumberish, message: BytesLike, internalSendHash: BytesLike, overrides?: Overrides & { from?: string | Promise } @@ -629,7 +629,7 @@ export interface ZetaConnectorNonEth extends BaseContract { sourceChainId: BigNumberish, destinationAddress: BytesLike, destinationChainId: BigNumberish, - zetaValueAndGas: BigNumberish, + remainingZetaValue: BigNumberish, message: BytesLike, internalSendHash: BytesLike, overrides?: Overrides & { from?: string | Promise } @@ -687,7 +687,7 @@ export interface ZetaConnectorNonEth extends BaseContract { zetaTxSenderAddress: BytesLike, sourceChainId: BigNumberish, destinationAddress: string, - zetaValueAndGas: BigNumberish, + zetaValue: BigNumberish, message: BytesLike, internalSendHash: BytesLike, overrides?: Overrides & { from?: string | Promise } @@ -698,7 +698,7 @@ export interface ZetaConnectorNonEth extends BaseContract { sourceChainId: BigNumberish, destinationAddress: BytesLike, destinationChainId: BigNumberish, - zetaValueAndGas: BigNumberish, + remainingZetaValue: BigNumberish, message: BytesLike, internalSendHash: BytesLike, overrides?: Overrides & { from?: string | Promise } diff --git a/packages/interfaces/typechain-types/contracts/interfaces/ZetaInterfaces.sol/ZetaReceiver.ts b/packages/interfaces/typechain-types/contracts/interfaces/ZetaInterfaces.sol/ZetaReceiver.ts index 9ce3e26d..22572650 100644 --- a/packages/interfaces/typechain-types/contracts/interfaces/ZetaInterfaces.sol/ZetaReceiver.ts +++ b/packages/interfaces/typechain-types/contracts/interfaces/ZetaInterfaces.sol/ZetaReceiver.ts @@ -27,7 +27,7 @@ export declare namespace ZetaInterfaces { zetaTxSenderAddress: BytesLike; sourceChainId: BigNumberish; destinationAddress: string; - zetaValueAndGas: BigNumberish; + zetaValue: BigNumberish; message: BytesLike; }; @@ -41,7 +41,7 @@ export declare namespace ZetaInterfaces { zetaTxSenderAddress: string; sourceChainId: BigNumber; destinationAddress: string; - zetaValueAndGas: BigNumber; + zetaValue: BigNumber; message: string; }; @@ -50,7 +50,7 @@ export declare namespace ZetaInterfaces { sourceChainId: BigNumberish; destinationAddress: BytesLike; destinationChainId: BigNumberish; - zetaValueAndGas: BigNumberish; + remainingZetaValue: BigNumberish; message: BytesLike; }; @@ -66,7 +66,7 @@ export declare namespace ZetaInterfaces { sourceChainId: BigNumber; destinationAddress: string; destinationChainId: BigNumber; - zetaValueAndGas: BigNumber; + remainingZetaValue: BigNumber; message: string; }; } diff --git a/packages/interfaces/typechain-types/contracts/testing/ZetaInteractorMock.ts b/packages/interfaces/typechain-types/contracts/testing/ZetaInteractorMock.ts index 2b8b35fc..dc4021a7 100644 --- a/packages/interfaces/typechain-types/contracts/testing/ZetaInteractorMock.ts +++ b/packages/interfaces/typechain-types/contracts/testing/ZetaInteractorMock.ts @@ -31,7 +31,7 @@ export declare namespace ZetaInterfaces { zetaTxSenderAddress: BytesLike; sourceChainId: BigNumberish; destinationAddress: string; - zetaValueAndGas: BigNumberish; + zetaValue: BigNumberish; message: BytesLike; }; @@ -45,7 +45,7 @@ export declare namespace ZetaInterfaces { zetaTxSenderAddress: string; sourceChainId: BigNumber; destinationAddress: string; - zetaValueAndGas: BigNumber; + zetaValue: BigNumber; message: string; }; @@ -54,7 +54,7 @@ export declare namespace ZetaInterfaces { sourceChainId: BigNumberish; destinationAddress: BytesLike; destinationChainId: BigNumberish; - zetaValueAndGas: BigNumberish; + remainingZetaValue: BigNumberish; message: BytesLike; }; @@ -70,7 +70,7 @@ export declare namespace ZetaInterfaces { sourceChainId: BigNumber; destinationAddress: string; destinationChainId: BigNumber; - zetaValueAndGas: BigNumber; + remainingZetaValue: BigNumber; message: string; }; } diff --git a/packages/interfaces/typechain-types/contracts/testing/ZetaReceiverMock.ts b/packages/interfaces/typechain-types/contracts/testing/ZetaReceiverMock.ts index 48c44347..eb8bd238 100644 --- a/packages/interfaces/typechain-types/contracts/testing/ZetaReceiverMock.ts +++ b/packages/interfaces/typechain-types/contracts/testing/ZetaReceiverMock.ts @@ -31,7 +31,7 @@ export declare namespace ZetaInterfaces { zetaTxSenderAddress: BytesLike; sourceChainId: BigNumberish; destinationAddress: string; - zetaValueAndGas: BigNumberish; + zetaValue: BigNumberish; message: BytesLike; }; @@ -45,7 +45,7 @@ export declare namespace ZetaInterfaces { zetaTxSenderAddress: string; sourceChainId: BigNumber; destinationAddress: string; - zetaValueAndGas: BigNumber; + zetaValue: BigNumber; message: string; }; @@ -54,7 +54,7 @@ export declare namespace ZetaInterfaces { sourceChainId: BigNumberish; destinationAddress: BytesLike; destinationChainId: BigNumberish; - zetaValueAndGas: BigNumberish; + remainingZetaValue: BigNumberish; message: BytesLike; }; @@ -70,7 +70,7 @@ export declare namespace ZetaInterfaces { sourceChainId: BigNumber; destinationAddress: string; destinationChainId: BigNumber; - zetaValueAndGas: BigNumber; + remainingZetaValue: BigNumber; message: string; }; } diff --git a/packages/interfaces/typechain-types/factories/contracts/ZetaConnector.base.sol/ZetaConnectorBase__factory.ts b/packages/interfaces/typechain-types/factories/contracts/ZetaConnector.base.sol/ZetaConnectorBase__factory.ts index 5ce9f984..c2c85112 100644 --- a/packages/interfaces/typechain-types/factories/contracts/ZetaConnector.base.sol/ZetaConnectorBase__factory.ts +++ b/packages/interfaces/typechain-types/factories/contracts/ZetaConnector.base.sol/ZetaConnectorBase__factory.ts @@ -188,7 +188,7 @@ const _abi = [ { indexed: false, internalType: "uint256", - name: "zetaValueAndGas", + name: "zetaValue", type: "uint256", }, { @@ -229,7 +229,7 @@ const _abi = [ type: "uint256", }, { - indexed: true, + indexed: false, internalType: "bytes", name: "destinationAddress", type: "bytes", @@ -237,7 +237,7 @@ const _abi = [ { indexed: false, internalType: "uint256", - name: "zetaValueAndGas", + name: "remainingZetaValue", type: "uint256", }, { @@ -278,7 +278,7 @@ const _abi = [ type: "uint256", }, { - indexed: true, + indexed: false, internalType: "bytes", name: "destinationAddress", type: "bytes", @@ -330,7 +330,7 @@ const _abi = [ }, { internalType: "uint256", - name: "zetaValueAndGas", + name: "zetaValue", type: "uint256", }, { @@ -373,7 +373,7 @@ const _abi = [ }, { internalType: "uint256", - name: "zetaValueAndGas", + name: "remainingZetaValue", type: "uint256", }, { @@ -552,7 +552,7 @@ const _abi = [ ]; const _bytecode = - "0x60a06040523480156200001157600080fd5b50604051620012af380380620012af83398181016040528101906200003791906200027c565b60008060006101000a81548160ff021916908315150217905550600073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff161480620000b95750600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16145b80620000f15750600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16145b80620001295750600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16145b1562000161576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8373ffffffffffffffffffffffffffffffffffffffff1660808173ffffffffffffffffffffffffffffffffffffffff1660601b8152505082600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555081600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555080600060016101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505050505062000341565b600081519050620002768162000327565b92915050565b6000806000806080858703121562000299576200029862000322565b5b6000620002a98782880162000265565b9450506020620002bc8782880162000265565b9350506040620002cf8782880162000265565b9250506060620002e28782880162000265565b91505092959194509250565b6000620002fb8262000302565b9050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600080fd5b6200033281620002ee565b81146200033e57600080fd5b50565b60805160601c610f4f6200036060003960006102160152610f4f6000f3fe608060405234801561001057600080fd5b50600436106100cf5760003560e01c80636128480f1161008c5780639122c344116100665780639122c344146101a2578063942a5e16146101be578063ec026901146101da578063f7fb869b146101f6576100cf565b80636128480f14610172578063779e3b631461018e5780638456cb5914610198576100cf565b806321e093b1146100d457806329dd214d146100f2578063328a01d01461010e5780633f4ba83a1461012c5780635b112591146101365780635c975abb14610154575b600080fd5b6100dc610214565b6040516100e99190610d62565b60405180910390f35b61010c60048036038101906101079190610be6565b610238565b005b610116610242565b6040516101239190610d62565b60405180910390f35b610134610268565b005b61013e610304565b60405161014b9190610d62565b60405180910390f35b61015c61032a565b6040516101699190610da6565b60405180910390f35b61018c60048036038101906101879190610ad7565b610340565b005b6101966104b6565b005b6101a0610636565b005b6101bc60048036038101906101b79190610ad7565b6106d2565b005b6101d860048036038101906101d39190610b04565b6108a4565b005b6101f460048036038101906101ef9190610cb5565b6108af565b005b6101fe6108b2565b60405161020b9190610d62565b60405180910390f35b7f000000000000000000000000000000000000000000000000000000000000000081565b5050505050505050565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146102fa57336040517f4677a0d30000000000000000000000000000000000000000000000000000000081526004016102f19190610d62565b60405180910390fd5b6103026108d8565b565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60008060009054906101000a900460ff16905090565b600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146103d257336040517f4677a0d30000000000000000000000000000000000000000000000000000000081526004016103c99190610d62565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415610439576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b80600060016101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055507fd41d83655d484bdf299598751c371b2d92088667266fe3774b25a97bdd5d039733826040516104ab929190610d7d565b60405180910390a150565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461054857336040517fe700765e00000000000000000000000000000000000000000000000000000000815260040161053f9190610d62565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff16600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614156105d1576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146106c857336040517f4677a0d30000000000000000000000000000000000000000000000000000000081526004016106bf9190610d62565b60405180910390fd5b6106d0610979565b565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415801561077e5750600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614155b156107c057336040517fcdfcef970000000000000000000000000000000000000000000000000000000081526004016107b79190610d62565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415610827576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b80600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055507fe79965b5c67dcfb2cf5fe152715e4a7256cee62a3d5dd8484fd8a8539eb8beff3382604051610899929190610d7d565b60405180910390a150565b505050505050505050565b50565b600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6108e061032a565b61091f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161091690610dc1565b60405180910390fd5b60008060006101000a81548160ff0219169083151502179055507f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa610962610a1b565b60405161096f9190610d62565b60405180910390a1565b61098161032a565b156109c1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016109b890610de1565b60405180910390fd5b60016000806101000a81548160ff0219169083151502179055507f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258610a04610a1b565b604051610a119190610d62565b60405180910390a1565b600033905090565b600081359050610a3281610ed4565b92915050565b600081359050610a4781610eeb565b92915050565b60008083601f840112610a6357610a62610e69565b5b8235905067ffffffffffffffff811115610a8057610a7f610e64565b5b602083019150836001820283011115610a9c57610a9b610e73565b5b9250929050565b600060c08284031215610ab957610ab8610e6e565b5b81905092915050565b600081359050610ad181610f02565b92915050565b600060208284031215610aed57610aec610e7d565b5b6000610afb84828501610a23565b91505092915050565b600080600080600080600080600060e08a8c031215610b2657610b25610e7d565b5b6000610b348c828d01610a23565b9950506020610b458c828d01610ac2565b98505060408a013567ffffffffffffffff811115610b6657610b65610e78565b5b610b728c828d01610a4d565b97509750506060610b858c828d01610ac2565b9550506080610b968c828d01610ac2565b94505060a08a013567ffffffffffffffff811115610bb757610bb6610e78565b5b610bc38c828d01610a4d565b935093505060c0610bd68c828d01610a38565b9150509295985092959850929598565b60008060008060008060008060c0898b031215610c0657610c05610e7d565b5b600089013567ffffffffffffffff811115610c2457610c23610e78565b5b610c308b828c01610a4d565b98509850506020610c438b828c01610ac2565b9650506040610c548b828c01610a23565b9550506060610c658b828c01610ac2565b945050608089013567ffffffffffffffff811115610c8657610c85610e78565b5b610c928b828c01610a4d565b935093505060a0610ca58b828c01610a38565b9150509295985092959890939650565b600060208284031215610ccb57610cca610e7d565b5b600082013567ffffffffffffffff811115610ce957610ce8610e78565b5b610cf584828501610aa3565b91505092915050565b610d0781610e12565b82525050565b610d1681610e24565b82525050565b6000610d29601483610e01565b9150610d3482610e82565b602082019050919050565b6000610d4c601083610e01565b9150610d5782610eab565b602082019050919050565b6000602082019050610d776000830184610cfe565b92915050565b6000604082019050610d926000830185610cfe565b610d9f6020830184610cfe565b9392505050565b6000602082019050610dbb6000830184610d0d565b92915050565b60006020820190508181036000830152610dda81610d1c565b9050919050565b60006020820190508181036000830152610dfa81610d3f565b9050919050565b600082825260208201905092915050565b6000610e1d82610e3a565b9050919050565b60008115159050919050565b6000819050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b7f5061757361626c653a206e6f7420706175736564000000000000000000000000600082015250565b7f5061757361626c653a2070617573656400000000000000000000000000000000600082015250565b610edd81610e12565b8114610ee857600080fd5b50565b610ef481610e30565b8114610eff57600080fd5b50565b610f0b81610e5a565b8114610f1657600080fd5b5056fea2646970667358221220de903853a44092e97d56ad3b39809eeb20167189f834139b7847d3eaa0565a7664736f6c63430008070033"; + "0x60a06040523480156200001157600080fd5b50604051620012af380380620012af83398181016040528101906200003791906200027c565b60008060006101000a81548160ff021916908315150217905550600073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff161480620000b95750600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16145b80620000f15750600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16145b80620001295750600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16145b1562000161576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8373ffffffffffffffffffffffffffffffffffffffff1660808173ffffffffffffffffffffffffffffffffffffffff1660601b8152505082600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555081600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555080600060016101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505050505062000341565b600081519050620002768162000327565b92915050565b6000806000806080858703121562000299576200029862000322565b5b6000620002a98782880162000265565b9450506020620002bc8782880162000265565b9350506040620002cf8782880162000265565b9250506060620002e28782880162000265565b91505092959194509250565b6000620002fb8262000302565b9050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600080fd5b6200033281620002ee565b81146200033e57600080fd5b50565b60805160601c610f4f6200036060003960006102160152610f4f6000f3fe608060405234801561001057600080fd5b50600436106100cf5760003560e01c80636128480f1161008c5780639122c344116100665780639122c344146101a2578063942a5e16146101be578063ec026901146101da578063f7fb869b146101f6576100cf565b80636128480f14610172578063779e3b631461018e5780638456cb5914610198576100cf565b806321e093b1146100d457806329dd214d146100f2578063328a01d01461010e5780633f4ba83a1461012c5780635b112591146101365780635c975abb14610154575b600080fd5b6100dc610214565b6040516100e99190610d62565b60405180910390f35b61010c60048036038101906101079190610be6565b610238565b005b610116610242565b6040516101239190610d62565b60405180910390f35b610134610268565b005b61013e610304565b60405161014b9190610d62565b60405180910390f35b61015c61032a565b6040516101699190610da6565b60405180910390f35b61018c60048036038101906101879190610ad7565b610340565b005b6101966104b6565b005b6101a0610636565b005b6101bc60048036038101906101b79190610ad7565b6106d2565b005b6101d860048036038101906101d39190610b04565b6108a4565b005b6101f460048036038101906101ef9190610cb5565b6108af565b005b6101fe6108b2565b60405161020b9190610d62565b60405180910390f35b7f000000000000000000000000000000000000000000000000000000000000000081565b5050505050505050565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146102fa57336040517f4677a0d30000000000000000000000000000000000000000000000000000000081526004016102f19190610d62565b60405180910390fd5b6103026108d8565b565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60008060009054906101000a900460ff16905090565b600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146103d257336040517f4677a0d30000000000000000000000000000000000000000000000000000000081526004016103c99190610d62565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415610439576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b80600060016101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055507fd41d83655d484bdf299598751c371b2d92088667266fe3774b25a97bdd5d039733826040516104ab929190610d7d565b60405180910390a150565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461054857336040517fe700765e00000000000000000000000000000000000000000000000000000000815260040161053f9190610d62565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff16600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614156105d1576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146106c857336040517f4677a0d30000000000000000000000000000000000000000000000000000000081526004016106bf9190610d62565b60405180910390fd5b6106d0610979565b565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415801561077e5750600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614155b156107c057336040517fcdfcef970000000000000000000000000000000000000000000000000000000081526004016107b79190610d62565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415610827576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b80600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055507fe79965b5c67dcfb2cf5fe152715e4a7256cee62a3d5dd8484fd8a8539eb8beff3382604051610899929190610d7d565b60405180910390a150565b505050505050505050565b50565b600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6108e061032a565b61091f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161091690610dc1565b60405180910390fd5b60008060006101000a81548160ff0219169083151502179055507f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa610962610a1b565b60405161096f9190610d62565b60405180910390a1565b61098161032a565b156109c1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016109b890610de1565b60405180910390fd5b60016000806101000a81548160ff0219169083151502179055507f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258610a04610a1b565b604051610a119190610d62565b60405180910390a1565b600033905090565b600081359050610a3281610ed4565b92915050565b600081359050610a4781610eeb565b92915050565b60008083601f840112610a6357610a62610e69565b5b8235905067ffffffffffffffff811115610a8057610a7f610e64565b5b602083019150836001820283011115610a9c57610a9b610e73565b5b9250929050565b600060c08284031215610ab957610ab8610e6e565b5b81905092915050565b600081359050610ad181610f02565b92915050565b600060208284031215610aed57610aec610e7d565b5b6000610afb84828501610a23565b91505092915050565b600080600080600080600080600060e08a8c031215610b2657610b25610e7d565b5b6000610b348c828d01610a23565b9950506020610b458c828d01610ac2565b98505060408a013567ffffffffffffffff811115610b6657610b65610e78565b5b610b728c828d01610a4d565b97509750506060610b858c828d01610ac2565b9550506080610b968c828d01610ac2565b94505060a08a013567ffffffffffffffff811115610bb757610bb6610e78565b5b610bc38c828d01610a4d565b935093505060c0610bd68c828d01610a38565b9150509295985092959850929598565b60008060008060008060008060c0898b031215610c0657610c05610e7d565b5b600089013567ffffffffffffffff811115610c2457610c23610e78565b5b610c308b828c01610a4d565b98509850506020610c438b828c01610ac2565b9650506040610c548b828c01610a23565b9550506060610c658b828c01610ac2565b945050608089013567ffffffffffffffff811115610c8657610c85610e78565b5b610c928b828c01610a4d565b935093505060a0610ca58b828c01610a38565b9150509295985092959890939650565b600060208284031215610ccb57610cca610e7d565b5b600082013567ffffffffffffffff811115610ce957610ce8610e78565b5b610cf584828501610aa3565b91505092915050565b610d0781610e12565b82525050565b610d1681610e24565b82525050565b6000610d29601483610e01565b9150610d3482610e82565b602082019050919050565b6000610d4c601083610e01565b9150610d5782610eab565b602082019050919050565b6000602082019050610d776000830184610cfe565b92915050565b6000604082019050610d926000830185610cfe565b610d9f6020830184610cfe565b9392505050565b6000602082019050610dbb6000830184610d0d565b92915050565b60006020820190508181036000830152610dda81610d1c565b9050919050565b60006020820190508181036000830152610dfa81610d3f565b9050919050565b600082825260208201905092915050565b6000610e1d82610e3a565b9050919050565b60008115159050919050565b6000819050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b7f5061757361626c653a206e6f7420706175736564000000000000000000000000600082015250565b7f5061757361626c653a2070617573656400000000000000000000000000000000600082015250565b610edd81610e12565b8114610ee857600080fd5b50565b610ef481610e30565b8114610eff57600080fd5b50565b610f0b81610e5a565b8114610f1657600080fd5b5056fea2646970667358221220f8353bbbdfd6d1446a66c5c6a27dd64c79c8a5fc510d61067e05b53214042b0f64736f6c63430008070033"; type ZetaConnectorBaseConstructorParams = | [signer?: Signer] diff --git a/packages/interfaces/typechain-types/factories/contracts/ZetaConnector.eth.sol/ZetaConnectorEth__factory.ts b/packages/interfaces/typechain-types/factories/contracts/ZetaConnector.eth.sol/ZetaConnectorEth__factory.ts index 2a7d5d6b..317a8240 100644 --- a/packages/interfaces/typechain-types/factories/contracts/ZetaConnector.eth.sol/ZetaConnectorEth__factory.ts +++ b/packages/interfaces/typechain-types/factories/contracts/ZetaConnector.eth.sol/ZetaConnectorEth__factory.ts @@ -188,7 +188,7 @@ const _abi = [ { indexed: false, internalType: "uint256", - name: "zetaValueAndGas", + name: "zetaValue", type: "uint256", }, { @@ -229,7 +229,7 @@ const _abi = [ type: "uint256", }, { - indexed: true, + indexed: false, internalType: "bytes", name: "destinationAddress", type: "bytes", @@ -237,7 +237,7 @@ const _abi = [ { indexed: false, internalType: "uint256", - name: "zetaValueAndGas", + name: "remainingZetaValue", type: "uint256", }, { @@ -278,7 +278,7 @@ const _abi = [ type: "uint256", }, { - indexed: true, + indexed: false, internalType: "bytes", name: "destinationAddress", type: "bytes", @@ -343,7 +343,7 @@ const _abi = [ }, { internalType: "uint256", - name: "zetaValueAndGas", + name: "zetaValue", type: "uint256", }, { @@ -386,7 +386,7 @@ const _abi = [ }, { internalType: "uint256", - name: "zetaValueAndGas", + name: "remainingZetaValue", type: "uint256", }, { @@ -565,7 +565,7 @@ const _abi = [ ]; const _bytecode = - "0x60a06040523480156200001157600080fd5b506040516200218238038062002182833981810160405281019062000037919062000284565b8383838360008060006101000a81548160ff021916908315150217905550600073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff161480620000bd5750600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16145b80620000f55750600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16145b806200012d5750600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16145b1562000165576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8373ffffffffffffffffffffffffffffffffffffffff1660808173ffffffffffffffffffffffffffffffffffffffff1660601b8152505082600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555081600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555080600060016101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550505050505050505062000349565b6000815190506200027e816200032f565b92915050565b60008060008060808587031215620002a157620002a06200032a565b5b6000620002b1878288016200026d565b9450506020620002c4878288016200026d565b9350506040620002d7878288016200026d565b9250506060620002ea878288016200026d565b91505092959194509250565b600062000303826200030a565b9050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600080fd5b6200033a81620002f6565b81146200034657600080fd5b50565b60805160601c611dfe620003846000396000818161024f01528181610275015281816103ff01528181610dc201526110990152611dfe6000f3fe608060405234801561001057600080fd5b50600436106100ea5760003560e01c80636128480f1161008c5780639122c344116100665780639122c344146101db578063942a5e16146101f7578063ec02690114610213578063f7fb869b1461022f576100ea565b80636128480f146101ab578063779e3b63146101c75780638456cb59146101d1576100ea565b8063328a01d0116100c8578063328a01d0146101475780633f4ba83a146101655780635b1125911461016f5780635c975abb1461018d576100ea565b806321e093b1146100ef578063252bc8861461010d57806329dd214d1461012b575b600080fd5b6100f761024d565b6040516101049190611942565b60405180910390f35b610115610271565b6040516101229190611b81565b60405180910390f35b610145600480360381019061014091906115bb565b610321565b005b61014f610682565b60405161015c9190611942565b60405180910390f35b61016d6106a8565b005b610177610744565b6040516101849190611942565b60405180910390f35b61019561076a565b6040516101a29190611a99565b60405180910390f35b6101c560048036038101906101c0919061147f565b610780565b005b6101cf6108f6565b005b6101d9610a76565b005b6101f560048036038101906101f0919061147f565b610b12565b005b610211600480360381019061020c91906114ac565b610ce4565b005b61022d6004803603810190610228919061168a565b61104d565b005b610237611230565b6040516102449190611942565b60405180910390f35b7f000000000000000000000000000000000000000000000000000000000000000081565b60007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b81526004016102cc9190611942565b60206040518083038186803b1580156102e457600080fd5b505afa1580156102f8573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061031c91906116d3565b905090565b61032961076a565b15610369576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161036090611b1d565b60405180910390fd5b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146103fb57336040517fff70ace20000000000000000000000000000000000000000000000000000000081526004016103f29190611942565b60405180910390fd5b60007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663a9059cbb87876040518363ffffffff1660e01b81526004016104589291906119bd565b602060405180830381600087803b15801561047257600080fd5b505af1158015610486573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104aa919061158e565b9050806104e3576040517f20878f6200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600084849050111561061f578573ffffffffffffffffffffffffffffffffffffffff16633749c51a6040518060a001604052808c8c8080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f8201169050808301925050505050505081526020018a81526020018973ffffffffffffffffffffffffffffffffffffffff16815260200188815260200187878080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050508152506040518263ffffffff1660e01b81526004016105ec9190611b3d565b600060405180830381600087803b15801561060657600080fd5b505af115801561061a573d6000803e3d6000fd5b505050505b818673ffffffffffffffffffffffffffffffffffffffff16887ff1302855733b40d8acb467ee990b6d56c05c80e28ebcabfa6e6f3f57cb50d6988c8c8a8a8a60405161066f959493929190611ab4565b60405180910390a4505050505050505050565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461073a57336040517f4677a0d30000000000000000000000000000000000000000000000000000000081526004016107319190611942565b60405180910390fd5b610742611256565b565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60008060009054906101000a900460ff16905090565b600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461081257336040517f4677a0d30000000000000000000000000000000000000000000000000000000081526004016108099190611942565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415610879576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b80600060016101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055507fd41d83655d484bdf299598751c371b2d92088667266fe3774b25a97bdd5d039733826040516108eb92919061195d565b60405180910390a150565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461098857336040517fe700765e00000000000000000000000000000000000000000000000000000000815260040161097f9190611942565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff16600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161415610a11576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610b0857336040517f4677a0d3000000000000000000000000000000000000000000000000000000008152600401610aff9190611942565b60405180910390fd5b610b106112f7565b565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614158015610bbe5750600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614155b15610c0057336040517fcdfcef97000000000000000000000000000000000000000000000000000000008152600401610bf79190611942565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415610c67576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b80600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055507fe79965b5c67dcfb2cf5fe152715e4a7256cee62a3d5dd8484fd8a8539eb8beff3382604051610cd992919061195d565b60405180910390a150565b610cec61076a565b15610d2c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610d2390611b1d565b60405180910390fd5b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610dbe57336040517fff70ace2000000000000000000000000000000000000000000000000000000008152600401610db59190611942565b60405180910390fd5b60007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663a9059cbb8b876040518363ffffffff1660e01b8152600401610e1b9291906119bd565b602060405180830381600087803b158015610e3557600080fd5b505af1158015610e49573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e6d919061158e565b905080610ea6576040517f20878f6200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000848490501115610fe8578973ffffffffffffffffffffffffffffffffffffffff16633ff0693c6040518060c001604052808d73ffffffffffffffffffffffffffffffffffffffff1681526020018c81526020018b8b8080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f82011690508083019250505050505050815260200189815260200188815260200187878080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050508152506040518263ffffffff1660e01b8152600401610fb59190611b5f565b600060405180830381600087803b158015610fcf57600080fd5b505af1158015610fe3573d6000803e3d6000fd5b505050505b818888604051610ff9929190611929565b6040518091039020877f521fb0b407c2eb9b1375530e9b9a569889992140a688bc076aa72c1712012c888d8d8a8a8a6040516110399594939291906119e6565b60405180910390a450505050505050505050565b61105561076a565b15611095576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161108c90611b1d565b60405180910390fd5b60007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166323b872dd333085608001356040518463ffffffff1660e01b81526004016110f893929190611986565b602060405180830381600087803b15801561111257600080fd5b505af1158015611126573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061114a919061158e565b905080611183576040517f20878f6200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8180602001906111939190611b9c565b6040516111a1929190611929565b604051809103902082600001353373ffffffffffffffffffffffffffffffffffffffff167f7ec1c94701e09b1652f3e1d307e60c4b9ebf99aff8c2079fd1d8c585e031c4e432866080013587604001358880606001906112019190611b9c565b8a8060a001906112119190611b9c565b6040516112249796959493929190611a34565b60405180910390a45050565b600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b61125e61076a565b61129d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161129490611afd565b60405180910390fd5b60008060006101000a81548160ff0219169083151502179055507f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa6112e0611399565b6040516112ed9190611942565b60405180910390a1565b6112ff61076a565b1561133f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161133690611b1d565b60405180910390fd5b60016000806101000a81548160ff0219169083151502179055507f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258611382611399565b60405161138f9190611942565b60405180910390a1565b600033905090565b6000813590506113b081611d6c565b92915050565b6000815190506113c581611d83565b92915050565b6000813590506113da81611d9a565b92915050565b60008083601f8401126113f6576113f5611ce1565b5b8235905067ffffffffffffffff81111561141357611412611cdc565b5b60208301915083600182028301111561142f5761142e611cf5565b5b9250929050565b600060c0828403121561144c5761144b611ceb565b5b81905092915050565b60008135905061146481611db1565b92915050565b60008151905061147981611db1565b92915050565b60006020828403121561149557611494611d04565b5b60006114a3848285016113a1565b91505092915050565b600080600080600080600080600060e08a8c0312156114ce576114cd611d04565b5b60006114dc8c828d016113a1565b99505060206114ed8c828d01611455565b98505060408a013567ffffffffffffffff81111561150e5761150d611cff565b5b61151a8c828d016113e0565b9750975050606061152d8c828d01611455565b955050608061153e8c828d01611455565b94505060a08a013567ffffffffffffffff81111561155f5761155e611cff565b5b61156b8c828d016113e0565b935093505060c061157e8c828d016113cb565b9150509295985092959850929598565b6000602082840312156115a4576115a3611d04565b5b60006115b2848285016113b6565b91505092915050565b60008060008060008060008060c0898b0312156115db576115da611d04565b5b600089013567ffffffffffffffff8111156115f9576115f8611cff565b5b6116058b828c016113e0565b985098505060206116188b828c01611455565b96505060406116298b828c016113a1565b955050606061163a8b828c01611455565b945050608089013567ffffffffffffffff81111561165b5761165a611cff565b5b6116678b828c016113e0565b935093505060a061167a8b828c016113cb565b9150509295985092959890939650565b6000602082840312156116a05761169f611d04565b5b600082013567ffffffffffffffff8111156116be576116bd611cff565b5b6116ca84828501611436565b91505092915050565b6000602082840312156116e9576116e8611d04565b5b60006116f78482850161146a565b91505092915050565b61170981611c48565b82525050565b61171881611c48565b82525050565b61172781611c5a565b82525050565b60006117398385611c1b565b9350611746838584611c9a565b61174f83611d09565b840190509392505050565b60006117668385611c2c565b9350611773838584611c9a565b82840190509392505050565b600061178a82611bff565b6117948185611c0a565b93506117a4818560208601611ca9565b6117ad81611d09565b840191505092915050565b60006117c5601483611c37565b91506117d082611d1a565b602082019050919050565b60006117e8601083611c37565b91506117f382611d43565b602082019050919050565b600060a083016000830151848203600086015261181b828261177f565b9150506020830151611830602086018261190b565b5060408301516118436040860182611700565b506060830151611856606086018261190b565b506080830151848203608086015261186e828261177f565b9150508091505092915050565b600060c0830160008301516118936000860182611700565b5060208301516118a6602086018261190b565b50604083015184820360408601526118be828261177f565b91505060608301516118d3606086018261190b565b5060808301516118e6608086018261190b565b5060a083015184820360a08601526118fe828261177f565b9150508091505092915050565b61191481611c90565b82525050565b61192381611c90565b82525050565b600061193682848661175a565b91508190509392505050565b6000602082019050611957600083018461170f565b92915050565b6000604082019050611972600083018561170f565b61197f602083018461170f565b9392505050565b600060608201905061199b600083018661170f565b6119a8602083018561170f565b6119b5604083018461191a565b949350505050565b60006040820190506119d2600083018561170f565b6119df602083018461191a565b9392505050565b60006080820190506119fb600083018861170f565b611a08602083018761191a565b611a15604083018661191a565b8181036060830152611a2881848661172d565b90509695505050505050565b600060a082019050611a49600083018a61170f565b611a56602083018961191a565b611a63604083018861191a565b8181036060830152611a7681868861172d565b90508181036080830152611a8b81848661172d565b905098975050505050505050565b6000602082019050611aae600083018461171e565b92915050565b60006060820190508181036000830152611acf81878961172d565b9050611ade602083018661191a565b8181036040830152611af181848661172d565b90509695505050505050565b60006020820190508181036000830152611b16816117b8565b9050919050565b60006020820190508181036000830152611b36816117db565b9050919050565b60006020820190508181036000830152611b5781846117fe565b905092915050565b60006020820190508181036000830152611b79818461187b565b905092915050565b6000602082019050611b96600083018461191a565b92915050565b60008083356001602003843603038112611bb957611bb8611cf0565b5b80840192508235915067ffffffffffffffff821115611bdb57611bda611ce6565b5b602083019250600182023603831315611bf757611bf6611cfa565b5b509250929050565b600081519050919050565b600082825260208201905092915050565b600082825260208201905092915050565b600081905092915050565b600082825260208201905092915050565b6000611c5382611c70565b9050919050565b60008115159050919050565b6000819050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b82818337600083830152505050565b60005b83811015611cc7578082015181840152602081019050611cac565b83811115611cd6576000848401525b50505050565b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f5061757361626c653a206e6f7420706175736564000000000000000000000000600082015250565b7f5061757361626c653a2070617573656400000000000000000000000000000000600082015250565b611d7581611c48565b8114611d8057600080fd5b50565b611d8c81611c5a565b8114611d9757600080fd5b50565b611da381611c66565b8114611dae57600080fd5b50565b611dba81611c90565b8114611dc557600080fd5b5056fea2646970667358221220975e723ecb3cbe569f7876443db8c400c50e76f676a32036a85432c8ee756ba464736f6c63430008070033"; + "0x60a06040523480156200001157600080fd5b506040516200213f3803806200213f833981810160405281019062000037919062000284565b8383838360008060006101000a81548160ff021916908315150217905550600073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff161480620000bd5750600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16145b80620000f55750600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16145b806200012d5750600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16145b1562000165576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8373ffffffffffffffffffffffffffffffffffffffff1660808173ffffffffffffffffffffffffffffffffffffffff1660601b8152505082600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555081600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555080600060016101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550505050505050505062000349565b6000815190506200027e816200032f565b92915050565b60008060008060808587031215620002a157620002a06200032a565b5b6000620002b1878288016200026d565b9450506020620002c4878288016200026d565b9350506040620002d7878288016200026d565b9250506060620002ea878288016200026d565b91505092959194509250565b600062000303826200030a565b9050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600080fd5b6200033a81620002f6565b81146200034657600080fd5b50565b60805160601c611dbb620003846000396000818161024f01528181610275015281816103ff01528181610dc201526110850152611dbb6000f3fe608060405234801561001057600080fd5b50600436106100ea5760003560e01c80636128480f1161008c5780639122c344116100665780639122c344146101db578063942a5e16146101f7578063ec02690114610213578063f7fb869b1461022f576100ea565b80636128480f146101ab578063779e3b63146101c75780638456cb59146101d1576100ea565b8063328a01d0116100c8578063328a01d0146101475780633f4ba83a146101655780635b1125911461016f5780635c975abb1461018d576100ea565b806321e093b1146100ef578063252bc8861461010d57806329dd214d1461012b575b600080fd5b6100f761024d565b60405161010491906118dc565b60405180910390f35b610115610271565b6040516101229190611b49565b60405180910390f35b61014560048036038101906101409190611593565b610321565b005b61014f610682565b60405161015c91906118dc565b60405180910390f35b61016d6106a8565b005b610177610744565b60405161018491906118dc565b60405180910390f35b61019561076a565b6040516101a29190611a61565b60405180910390f35b6101c560048036038101906101c09190611457565b610780565b005b6101cf6108f6565b005b6101d9610a76565b005b6101f560048036038101906101f09190611457565b610b12565b005b610211600480360381019061020c9190611484565b610ce4565b005b61022d60048036038101906102289190611662565b611039565b005b610237611208565b60405161024491906118dc565b60405180910390f35b7f000000000000000000000000000000000000000000000000000000000000000081565b60007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b81526004016102cc91906118dc565b60206040518083038186803b1580156102e457600080fd5b505afa1580156102f8573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061031c91906116ab565b905090565b61032961076a565b15610369576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161036090611ae5565b60405180910390fd5b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146103fb57336040517fff70ace20000000000000000000000000000000000000000000000000000000081526004016103f291906118dc565b60405180910390fd5b60007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663a9059cbb87876040518363ffffffff1660e01b81526004016104589291906119d3565b602060405180830381600087803b15801561047257600080fd5b505af1158015610486573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104aa9190611566565b9050806104e3576040517f20878f6200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600084849050111561061f578573ffffffffffffffffffffffffffffffffffffffff16633749c51a6040518060a001604052808c8c8080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f8201169050808301925050505050505081526020018a81526020018973ffffffffffffffffffffffffffffffffffffffff16815260200188815260200187878080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050508152506040518263ffffffff1660e01b81526004016105ec9190611b05565b600060405180830381600087803b15801561060657600080fd5b505af115801561061a573d6000803e3d6000fd5b505050505b818673ffffffffffffffffffffffffffffffffffffffff16887ff1302855733b40d8acb467ee990b6d56c05c80e28ebcabfa6e6f3f57cb50d6988c8c8a8a8a60405161066f959493929190611a7c565b60405180910390a4505050505050505050565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461073a57336040517f4677a0d300000000000000000000000000000000000000000000000000000000815260040161073191906118dc565b60405180910390fd5b61074261122e565b565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60008060009054906101000a900460ff16905090565b600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461081257336040517f4677a0d300000000000000000000000000000000000000000000000000000000815260040161080991906118dc565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415610879576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b80600060016101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055507fd41d83655d484bdf299598751c371b2d92088667266fe3774b25a97bdd5d039733826040516108eb9291906118f7565b60405180910390a150565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461098857336040517fe700765e00000000000000000000000000000000000000000000000000000000815260040161097f91906118dc565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff16600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161415610a11576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610b0857336040517f4677a0d3000000000000000000000000000000000000000000000000000000008152600401610aff91906118dc565b60405180910390fd5b610b106112cf565b565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614158015610bbe5750600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614155b15610c0057336040517fcdfcef97000000000000000000000000000000000000000000000000000000008152600401610bf791906118dc565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415610c67576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b80600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055507fe79965b5c67dcfb2cf5fe152715e4a7256cee62a3d5dd8484fd8a8539eb8beff3382604051610cd99291906118f7565b60405180910390a150565b610cec61076a565b15610d2c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610d2390611ae5565b60405180910390fd5b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610dbe57336040517fff70ace2000000000000000000000000000000000000000000000000000000008152600401610db591906118dc565b60405180910390fd5b60007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663a9059cbb8b876040518363ffffffff1660e01b8152600401610e1b9291906119d3565b602060405180830381600087803b158015610e3557600080fd5b505af1158015610e49573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e6d9190611566565b905080610ea6576040517f20878f6200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000848490501115610fe8578973ffffffffffffffffffffffffffffffffffffffff16633ff0693c6040518060c001604052808d73ffffffffffffffffffffffffffffffffffffffff1681526020018c81526020018b8b8080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f82011690508083019250505050505050815260200189815260200188815260200187878080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050508152506040518263ffffffff1660e01b8152600401610fb59190611b27565b600060405180830381600087803b158015610fcf57600080fd5b505af1158015610fe3573d6000803e3d6000fd5b505050505b81867f521fb0b407c2eb9b1375530e9b9a569889992140a688bc076aa72c1712012c888c8c8c8c8b8b8b60405161102597969594939291906119fc565b60405180910390a350505050505050505050565b61104161076a565b15611081576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161107890611ae5565b60405180910390fd5b60007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166323b872dd333085608001356040518463ffffffff1660e01b81526004016110e493929190611920565b602060405180830381600087803b1580156110fe57600080fd5b505af1158015611112573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111369190611566565b90508061116f576040517f20878f6200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b81600001353373ffffffffffffffffffffffffffffffffffffffff167f7ec1c94701e09b1652f3e1d307e60c4b9ebf99aff8c2079fd1d8c585e031c4e4328580602001906111bd9190611b64565b876080013588604001358980606001906111d79190611b64565b8b8060a001906111e79190611b64565b6040516111fc99989796959493929190611957565b60405180910390a35050565b600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b61123661076a565b611275576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161126c90611ac5565b60405180910390fd5b60008060006101000a81548160ff0219169083151502179055507f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa6112b8611371565b6040516112c591906118dc565b60405180910390a1565b6112d761076a565b15611317576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161130e90611ae5565b60405180910390fd5b60016000806101000a81548160ff0219169083151502179055507f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a25861135a611371565b60405161136791906118dc565b60405180910390a1565b600033905090565b60008135905061138881611d29565b92915050565b60008151905061139d81611d40565b92915050565b6000813590506113b281611d57565b92915050565b60008083601f8401126113ce576113cd611c9e565b5b8235905067ffffffffffffffff8111156113eb576113ea611c99565b5b60208301915083600182028301111561140757611406611cb2565b5b9250929050565b600060c0828403121561142457611423611ca8565b5b81905092915050565b60008135905061143c81611d6e565b92915050565b60008151905061145181611d6e565b92915050565b60006020828403121561146d5761146c611cc1565b5b600061147b84828501611379565b91505092915050565b600080600080600080600080600060e08a8c0312156114a6576114a5611cc1565b5b60006114b48c828d01611379565b99505060206114c58c828d0161142d565b98505060408a013567ffffffffffffffff8111156114e6576114e5611cbc565b5b6114f28c828d016113b8565b975097505060606115058c828d0161142d565b95505060806115168c828d0161142d565b94505060a08a013567ffffffffffffffff81111561153757611536611cbc565b5b6115438c828d016113b8565b935093505060c06115568c828d016113a3565b9150509295985092959850929598565b60006020828403121561157c5761157b611cc1565b5b600061158a8482850161138e565b91505092915050565b60008060008060008060008060c0898b0312156115b3576115b2611cc1565b5b600089013567ffffffffffffffff8111156115d1576115d0611cbc565b5b6115dd8b828c016113b8565b985098505060206115f08b828c0161142d565b96505060406116018b828c01611379565b95505060606116128b828c0161142d565b945050608089013567ffffffffffffffff81111561163357611632611cbc565b5b61163f8b828c016113b8565b935093505060a06116528b828c016113a3565b9150509295985092959890939650565b60006020828403121561167857611677611cc1565b5b600082013567ffffffffffffffff81111561169657611695611cbc565b5b6116a28482850161140e565b91505092915050565b6000602082840312156116c1576116c0611cc1565b5b60006116cf84828501611442565b91505092915050565b6116e181611c05565b82525050565b6116f081611c05565b82525050565b6116ff81611c17565b82525050565b60006117118385611be3565b935061171e838584611c57565b61172783611cc6565b840190509392505050565b600061173d82611bc7565b6117478185611bd2565b9350611757818560208601611c66565b61176081611cc6565b840191505092915050565b6000611778601483611bf4565b915061178382611cd7565b602082019050919050565b600061179b601083611bf4565b91506117a682611d00565b602082019050919050565b600060a08301600083015184820360008601526117ce8282611732565b91505060208301516117e360208601826118be565b5060408301516117f660408601826116d8565b50606083015161180960608601826118be565b50608083015184820360808601526118218282611732565b9150508091505092915050565b600060c08301600083015161184660008601826116d8565b50602083015161185960208601826118be565b50604083015184820360408601526118718282611732565b915050606083015161188660608601826118be565b50608083015161189960808601826118be565b5060a083015184820360a08601526118b18282611732565b9150508091505092915050565b6118c781611c4d565b82525050565b6118d681611c4d565b82525050565b60006020820190506118f160008301846116e7565b92915050565b600060408201905061190c60008301856116e7565b61191960208301846116e7565b9392505050565b600060608201905061193560008301866116e7565b61194260208301856116e7565b61194f60408301846118cd565b949350505050565b600060c08201905061196c600083018c6116e7565b818103602083015261197f818a8c611705565b905061198e60408301896118cd565b61199b60608301886118cd565b81810360808301526119ae818688611705565b905081810360a08301526119c3818486611705565b90509a9950505050505050505050565b60006040820190506119e860008301856116e7565b6119f560208301846118cd565b9392505050565b600060a082019050611a11600083018a6116e7565b611a1e60208301896118cd565b8181036040830152611a31818789611705565b9050611a4060608301866118cd565b8181036080830152611a53818486611705565b905098975050505050505050565b6000602082019050611a7660008301846116f6565b92915050565b60006060820190508181036000830152611a97818789611705565b9050611aa660208301866118cd565b8181036040830152611ab9818486611705565b90509695505050505050565b60006020820190508181036000830152611ade8161176b565b9050919050565b60006020820190508181036000830152611afe8161178e565b9050919050565b60006020820190508181036000830152611b1f81846117b1565b905092915050565b60006020820190508181036000830152611b41818461182e565b905092915050565b6000602082019050611b5e60008301846118cd565b92915050565b60008083356001602003843603038112611b8157611b80611cad565b5b80840192508235915067ffffffffffffffff821115611ba357611ba2611ca3565b5b602083019250600182023603831315611bbf57611bbe611cb7565b5b509250929050565b600081519050919050565b600082825260208201905092915050565b600082825260208201905092915050565b600082825260208201905092915050565b6000611c1082611c2d565b9050919050565b60008115159050919050565b6000819050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b82818337600083830152505050565b60005b83811015611c84578082015181840152602081019050611c69565b83811115611c93576000848401525b50505050565b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f5061757361626c653a206e6f7420706175736564000000000000000000000000600082015250565b7f5061757361626c653a2070617573656400000000000000000000000000000000600082015250565b611d3281611c05565b8114611d3d57600080fd5b50565b611d4981611c17565b8114611d5457600080fd5b50565b611d6081611c23565b8114611d6b57600080fd5b50565b611d7781611c4d565b8114611d8257600080fd5b5056fea26469706673582212206faf10d466cdd32bc304b84630ab2180a500405477f269295b2e779ca6055f0264736f6c63430008070033"; type ZetaConnectorEthConstructorParams = | [signer?: Signer] diff --git a/packages/interfaces/typechain-types/factories/contracts/ZetaConnector.non-eth.sol/ZetaConnectorNonEth__factory.ts b/packages/interfaces/typechain-types/factories/contracts/ZetaConnector.non-eth.sol/ZetaConnectorNonEth__factory.ts index fba134a2..b37aa9ff 100644 --- a/packages/interfaces/typechain-types/factories/contracts/ZetaConnector.non-eth.sol/ZetaConnectorNonEth__factory.ts +++ b/packages/interfaces/typechain-types/factories/contracts/ZetaConnector.non-eth.sol/ZetaConnectorNonEth__factory.ts @@ -188,7 +188,7 @@ const _abi = [ { indexed: false, internalType: "uint256", - name: "zetaValueAndGas", + name: "zetaValue", type: "uint256", }, { @@ -229,7 +229,7 @@ const _abi = [ type: "uint256", }, { - indexed: true, + indexed: false, internalType: "bytes", name: "destinationAddress", type: "bytes", @@ -237,7 +237,7 @@ const _abi = [ { indexed: false, internalType: "uint256", - name: "zetaValueAndGas", + name: "remainingZetaValue", type: "uint256", }, { @@ -278,7 +278,7 @@ const _abi = [ type: "uint256", }, { - indexed: true, + indexed: false, internalType: "bytes", name: "destinationAddress", type: "bytes", @@ -356,7 +356,7 @@ const _abi = [ }, { internalType: "uint256", - name: "zetaValueAndGas", + name: "zetaValue", type: "uint256", }, { @@ -399,7 +399,7 @@ const _abi = [ }, { internalType: "uint256", - name: "zetaValueAndGas", + name: "remainingZetaValue", type: "uint256", }, { @@ -591,7 +591,7 @@ const _abi = [ ]; const _bytecode = - "0x60a06040527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6003553480156200003557600080fd5b50604051620023de380380620023de83398181016040528101906200005b9190620002a8565b8383838360008060006101000a81548160ff021916908315150217905550600073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff161480620000e15750600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16145b80620001195750600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16145b80620001515750600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16145b1562000189576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8373ffffffffffffffffffffffffffffffffffffffff1660808173ffffffffffffffffffffffffffffffffffffffff1660601b8152505082600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555081600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555080600060016101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050505050505050506200036d565b600081519050620002a28162000353565b92915050565b60008060008060808587031215620002c557620002c46200034e565b5b6000620002d58782880162000291565b9450506020620002e88782880162000291565b9350506040620002fb8782880162000291565b92505060606200030e8782880162000291565b91505092959194509250565b600062000327826200032e565b9050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600080fd5b6200035e816200031a565b81146200036a57600080fd5b50565b60805160601c612028620003b66000396000818161029f015281816102c5015281816104500152818161053e01528181610f460152818161103401526112b701526120286000f3fe608060405234801561001057600080fd5b50600436106101005760003560e01c80636f8b44b011610097578063942a5e1611610066578063942a5e1614610229578063d5abeb0114610245578063ec02690114610263578063f7fb869b1461027f57610100565b80636f8b44b0146101dd578063779e3b63146101f95780638456cb59146102035780639122c3441461020d57610100565b80633f4ba83a116100d35780633f4ba83a1461017b5780635b112591146101855780635c975abb146101a35780636128480f146101c157610100565b806321e093b114610105578063252bc8861461012357806329dd214d14610141578063328a01d01461015d575b600080fd5b61010d61029d565b60405161011a9190611afe565b60405180910390f35b61012b6102c1565b6040516101389190611d3d565b60405180910390f35b61015b6004803603810190610156919061173b565b610371565b005b610165610769565b6040516101729190611afe565b60405180910390f35b61018361078f565b005b61018d61082b565b60405161019a9190611afe565b60405180910390f35b6101ab610851565b6040516101b89190611c55565b60405180910390f35b6101db60048036038101906101d6919061162c565b610867565b005b6101f760048036038101906101f29190611853565b6109dd565b005b610201610a79565b005b61020b610bf9565b005b6102276004803603810190610222919061162c565b610c95565b005b610243600480360381019061023e9190611659565b610e67565b005b61024d611267565b60405161025a9190611d3d565b60405180910390f35b61027d6004803603810190610278919061180a565b61126d565b005b6102876113f2565b6040516102949190611afe565b60405180910390f35b7f000000000000000000000000000000000000000000000000000000000000000081565b60007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b815260040161031c9190611afe565b60206040518083038186803b15801561033457600080fd5b505afa158015610348573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061036c9190611880565b905090565b610379610851565b156103b9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016103b090611cd9565b60405180910390fd5b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461044b57336040517fff70ace20000000000000000000000000000000000000000000000000000000081526004016104429190611afe565b60405180910390fd5b6003547f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166318160ddd6040518163ffffffff1660e01b815260040160206040518083038186803b1580156104b457600080fd5b505afa1580156104c8573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104ec9190611880565b856104f79190611e04565b111561053c576003546040517f3d3dbc830000000000000000000000000000000000000000000000000000000081526004016105339190611d3d565b60405180910390fd5b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16631e458bee8686846040518463ffffffff1660e01b815260040161059993929190611b6b565b600060405180830381600087803b1580156105b357600080fd5b505af11580156105c7573d6000803e3d6000fd5b505050506000838390501115610707578473ffffffffffffffffffffffffffffffffffffffff16633749c51a6040518060a001604052808b8b8080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f8201169050808301925050505050505081526020018981526020018873ffffffffffffffffffffffffffffffffffffffff16815260200187815260200186868080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050508152506040518263ffffffff1660e01b81526004016106d49190611cf9565b600060405180830381600087803b1580156106ee57600080fd5b505af1158015610702573d6000803e3d6000fd5b505050505b808573ffffffffffffffffffffffffffffffffffffffff16877ff1302855733b40d8acb467ee990b6d56c05c80e28ebcabfa6e6f3f57cb50d6988b8b898989604051610757959493929190611c70565b60405180910390a45050505050505050565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461082157336040517f4677a0d30000000000000000000000000000000000000000000000000000000081526004016108189190611afe565b60405180910390fd5b610829611418565b565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60008060009054906101000a900460ff16905090565b600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146108f957336040517f4677a0d30000000000000000000000000000000000000000000000000000000081526004016108f09190611afe565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415610960576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b80600060016101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055507fd41d83655d484bdf299598751c371b2d92088667266fe3774b25a97bdd5d039733826040516109d2929190611b19565b60405180910390a150565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610a6f57336040517fff70ace2000000000000000000000000000000000000000000000000000000008152600401610a669190611afe565b60405180910390fd5b8060038190555050565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610b0b57336040517fe700765e000000000000000000000000000000000000000000000000000000008152600401610b029190611afe565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff16600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161415610b94576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610c8b57336040517f4677a0d3000000000000000000000000000000000000000000000000000000008152600401610c829190611afe565b60405180910390fd5b610c936114b9565b565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614158015610d415750600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614155b15610d8357336040517fcdfcef97000000000000000000000000000000000000000000000000000000008152600401610d7a9190611afe565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415610dea576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b80600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055507fe79965b5c67dcfb2cf5fe152715e4a7256cee62a3d5dd8484fd8a8539eb8beff3382604051610e5c929190611b19565b60405180910390a150565b610e6f610851565b15610eaf576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610ea690611cd9565b60405180910390fd5b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610f4157336040517fff70ace2000000000000000000000000000000000000000000000000000000008152600401610f389190611afe565b60405180910390fd5b6003547f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166318160ddd6040518163ffffffff1660e01b815260040160206040518083038186803b158015610faa57600080fd5b505afa158015610fbe573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610fe29190611880565b85610fed9190611e04565b1115611032576003546040517f3d3dbc830000000000000000000000000000000000000000000000000000000081526004016110299190611d3d565b60405180910390fd5b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16631e458bee8a86846040518463ffffffff1660e01b815260040161108f93929190611b6b565b600060405180830381600087803b1580156110a957600080fd5b505af11580156110bd573d6000803e3d6000fd5b505050506000838390501115611203578873ffffffffffffffffffffffffffffffffffffffff16633ff0693c6040518060c001604052808c73ffffffffffffffffffffffffffffffffffffffff1681526020018b81526020018a8a8080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f82011690508083019250505050505050815260200188815260200187815260200186868080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050508152506040518263ffffffff1660e01b81526004016111d09190611d1b565b600060405180830381600087803b1580156111ea57600080fd5b505af11580156111fe573d6000803e3d6000fd5b505050505b808787604051611214929190611ae5565b6040518091039020867f521fb0b407c2eb9b1375530e9b9a569889992140a688bc076aa72c1712012c888c8c898989604051611254959493929190611ba2565b60405180910390a4505050505050505050565b60035481565b611275610851565b156112b5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016112ac90611cd9565b60405180910390fd5b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166379cc67903383608001356040518363ffffffff1660e01b8152600401611314929190611b42565b600060405180830381600087803b15801561132e57600080fd5b505af1158015611342573d6000803e3d6000fd5b505050508080602001906113569190611d58565b604051611364929190611ae5565b604051809103902081600001353373ffffffffffffffffffffffffffffffffffffffff167f7ec1c94701e09b1652f3e1d307e60c4b9ebf99aff8c2079fd1d8c585e031c4e432856080013586604001358780606001906113c49190611d58565b898060a001906113d49190611d58565b6040516113e79796959493929190611bf0565b60405180910390a450565b600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b611420610851565b61145f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161145690611cb9565b60405180910390fd5b60008060006101000a81548160ff0219169083151502179055507f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa6114a261155b565b6040516114af9190611afe565b60405180910390a1565b6114c1610851565b15611501576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016114f890611cd9565b60405180910390fd5b60016000806101000a81548160ff0219169083151502179055507f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a25861154461155b565b6040516115519190611afe565b60405180910390a1565b600033905090565b60008135905061157281611fad565b92915050565b60008135905061158781611fc4565b92915050565b60008083601f8401126115a3576115a2611f22565b5b8235905067ffffffffffffffff8111156115c0576115bf611f1d565b5b6020830191508360018202830111156115dc576115db611f36565b5b9250929050565b600060c082840312156115f9576115f8611f2c565b5b81905092915050565b60008135905061161181611fdb565b92915050565b60008151905061162681611fdb565b92915050565b60006020828403121561164257611641611f45565b5b600061165084828501611563565b91505092915050565b600080600080600080600080600060e08a8c03121561167b5761167a611f45565b5b60006116898c828d01611563565b995050602061169a8c828d01611602565b98505060408a013567ffffffffffffffff8111156116bb576116ba611f40565b5b6116c78c828d0161158d565b975097505060606116da8c828d01611602565b95505060806116eb8c828d01611602565b94505060a08a013567ffffffffffffffff81111561170c5761170b611f40565b5b6117188c828d0161158d565b935093505060c061172b8c828d01611578565b9150509295985092959850929598565b60008060008060008060008060c0898b03121561175b5761175a611f45565b5b600089013567ffffffffffffffff81111561177957611778611f40565b5b6117858b828c0161158d565b985098505060206117988b828c01611602565b96505060406117a98b828c01611563565b95505060606117ba8b828c01611602565b945050608089013567ffffffffffffffff8111156117db576117da611f40565b5b6117e78b828c0161158d565b935093505060a06117fa8b828c01611578565b9150509295985092959890939650565b6000602082840312156118205761181f611f45565b5b600082013567ffffffffffffffff81111561183e5761183d611f40565b5b61184a848285016115e3565b91505092915050565b60006020828403121561186957611868611f45565b5b600061187784828501611602565b91505092915050565b60006020828403121561189657611895611f45565b5b60006118a484828501611617565b91505092915050565b6118b681611e5a565b82525050565b6118c581611e5a565b82525050565b6118d481611e6c565b82525050565b6118e381611e78565b82525050565b60006118f58385611dd7565b9350611902838584611eac565b61190b83611f4a565b840190509392505050565b60006119228385611de8565b935061192f838584611eac565b82840190509392505050565b600061194682611dbb565b6119508185611dc6565b9350611960818560208601611ebb565b61196981611f4a565b840191505092915050565b6000611981601483611df3565b915061198c82611f5b565b602082019050919050565b60006119a4601083611df3565b91506119af82611f84565b602082019050919050565b600060a08301600083015184820360008601526119d7828261193b565b91505060208301516119ec6020860182611ac7565b5060408301516119ff60408601826118ad565b506060830151611a126060860182611ac7565b5060808301518482036080860152611a2a828261193b565b9150508091505092915050565b600060c083016000830151611a4f60008601826118ad565b506020830151611a626020860182611ac7565b5060408301518482036040860152611a7a828261193b565b9150506060830151611a8f6060860182611ac7565b506080830151611aa26080860182611ac7565b5060a083015184820360a0860152611aba828261193b565b9150508091505092915050565b611ad081611ea2565b82525050565b611adf81611ea2565b82525050565b6000611af2828486611916565b91508190509392505050565b6000602082019050611b1360008301846118bc565b92915050565b6000604082019050611b2e60008301856118bc565b611b3b60208301846118bc565b9392505050565b6000604082019050611b5760008301856118bc565b611b646020830184611ad6565b9392505050565b6000606082019050611b8060008301866118bc565b611b8d6020830185611ad6565b611b9a60408301846118da565b949350505050565b6000608082019050611bb760008301886118bc565b611bc46020830187611ad6565b611bd16040830186611ad6565b8181036060830152611be48184866118e9565b90509695505050505050565b600060a082019050611c05600083018a6118bc565b611c126020830189611ad6565b611c1f6040830188611ad6565b8181036060830152611c328186886118e9565b90508181036080830152611c478184866118e9565b905098975050505050505050565b6000602082019050611c6a60008301846118cb565b92915050565b60006060820190508181036000830152611c8b8187896118e9565b9050611c9a6020830186611ad6565b8181036040830152611cad8184866118e9565b90509695505050505050565b60006020820190508181036000830152611cd281611974565b9050919050565b60006020820190508181036000830152611cf281611997565b9050919050565b60006020820190508181036000830152611d1381846119ba565b905092915050565b60006020820190508181036000830152611d358184611a37565b905092915050565b6000602082019050611d526000830184611ad6565b92915050565b60008083356001602003843603038112611d7557611d74611f31565b5b80840192508235915067ffffffffffffffff821115611d9757611d96611f27565b5b602083019250600182023603831315611db357611db2611f3b565b5b509250929050565b600081519050919050565b600082825260208201905092915050565b600082825260208201905092915050565b600081905092915050565b600082825260208201905092915050565b6000611e0f82611ea2565b9150611e1a83611ea2565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff03821115611e4f57611e4e611eee565b5b828201905092915050565b6000611e6582611e82565b9050919050565b60008115159050919050565b6000819050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b82818337600083830152505050565b60005b83811015611ed9578082015181840152602081019050611ebe565b83811115611ee8576000848401525b50505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f5061757361626c653a206e6f7420706175736564000000000000000000000000600082015250565b7f5061757361626c653a2070617573656400000000000000000000000000000000600082015250565b611fb681611e5a565b8114611fc157600080fd5b50565b611fcd81611e78565b8114611fd857600080fd5b50565b611fe481611ea2565b8114611fef57600080fd5b5056fea26469706673582212205b21f22833e2b941d724fc36923e9abf6f76b204decd0f3a183afd758d1ea51c64736f6c63430008070033"; + "0x60a06040527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6003553480156200003557600080fd5b506040516200239b3803806200239b83398181016040528101906200005b9190620002a8565b8383838360008060006101000a81548160ff021916908315150217905550600073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff161480620000e15750600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16145b80620001195750600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16145b80620001515750600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16145b1562000189576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8373ffffffffffffffffffffffffffffffffffffffff1660808173ffffffffffffffffffffffffffffffffffffffff1660601b8152505082600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555081600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555080600060016101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050505050505050506200036d565b600081519050620002a28162000353565b92915050565b60008060008060808587031215620002c557620002c46200034e565b5b6000620002d58782880162000291565b9450506020620002e88782880162000291565b9350506040620002fb8782880162000291565b92505060606200030e8782880162000291565b91505092959194509250565b600062000327826200032e565b9050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600080fd5b6200035e816200031a565b81146200036a57600080fd5b50565b60805160601c611fe5620003b66000396000818161029f015281816102c5015281816104500152818161053e01528181610f460152818161103401526112a30152611fe56000f3fe608060405234801561001057600080fd5b50600436106101005760003560e01c80636f8b44b011610097578063942a5e1611610066578063942a5e1614610229578063d5abeb0114610245578063ec02690114610263578063f7fb869b1461027f57610100565b80636f8b44b0146101dd578063779e3b63146101f95780638456cb59146102035780639122c3441461020d57610100565b80633f4ba83a116100d35780633f4ba83a1461017b5780635b112591146101855780635c975abb146101a35780636128480f146101c157610100565b806321e093b114610105578063252bc8861461012357806329dd214d14610141578063328a01d01461015d575b600080fd5b61010d61029d565b60405161011a9190611a98565b60405180910390f35b61012b6102c1565b6040516101389190611d05565b60405180910390f35b61015b60048036038101906101569190611713565b610371565b005b610165610769565b6040516101729190611a98565b60405180910390f35b61018361078f565b005b61018d61082b565b60405161019a9190611a98565b60405180910390f35b6101ab610851565b6040516101b89190611c1d565b60405180910390f35b6101db60048036038101906101d69190611604565b610867565b005b6101f760048036038101906101f2919061182b565b6109dd565b005b610201610a79565b005b61020b610bf9565b005b61022760048036038101906102229190611604565b610c95565b005b610243600480360381019061023e9190611631565b610e67565b005b61024d611253565b60405161025a9190611d05565b60405180910390f35b61027d600480360381019061027891906117e2565b611259565b005b6102876113ca565b6040516102949190611a98565b60405180910390f35b7f000000000000000000000000000000000000000000000000000000000000000081565b60007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b815260040161031c9190611a98565b60206040518083038186803b15801561033457600080fd5b505afa158015610348573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061036c9190611858565b905090565b610379610851565b156103b9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016103b090611ca1565b60405180910390fd5b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461044b57336040517fff70ace20000000000000000000000000000000000000000000000000000000081526004016104429190611a98565b60405180910390fd5b6003547f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166318160ddd6040518163ffffffff1660e01b815260040160206040518083038186803b1580156104b457600080fd5b505afa1580156104c8573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104ec9190611858565b856104f79190611dc1565b111561053c576003546040517f3d3dbc830000000000000000000000000000000000000000000000000000000081526004016105339190611d05565b60405180910390fd5b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16631e458bee8686846040518463ffffffff1660e01b815260040161059993929190611b81565b600060405180830381600087803b1580156105b357600080fd5b505af11580156105c7573d6000803e3d6000fd5b505050506000838390501115610707578473ffffffffffffffffffffffffffffffffffffffff16633749c51a6040518060a001604052808b8b8080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f8201169050808301925050505050505081526020018981526020018873ffffffffffffffffffffffffffffffffffffffff16815260200187815260200186868080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050508152506040518263ffffffff1660e01b81526004016106d49190611cc1565b600060405180830381600087803b1580156106ee57600080fd5b505af1158015610702573d6000803e3d6000fd5b505050505b808573ffffffffffffffffffffffffffffffffffffffff16877ff1302855733b40d8acb467ee990b6d56c05c80e28ebcabfa6e6f3f57cb50d6988b8b898989604051610757959493929190611c38565b60405180910390a45050505050505050565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461082157336040517f4677a0d30000000000000000000000000000000000000000000000000000000081526004016108189190611a98565b60405180910390fd5b6108296113f0565b565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60008060009054906101000a900460ff16905090565b600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146108f957336040517f4677a0d30000000000000000000000000000000000000000000000000000000081526004016108f09190611a98565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415610960576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b80600060016101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055507fd41d83655d484bdf299598751c371b2d92088667266fe3774b25a97bdd5d039733826040516109d2929190611ab3565b60405180910390a150565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610a6f57336040517fff70ace2000000000000000000000000000000000000000000000000000000008152600401610a669190611a98565b60405180910390fd5b8060038190555050565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610b0b57336040517fe700765e000000000000000000000000000000000000000000000000000000008152600401610b029190611a98565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff16600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161415610b94576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610c8b57336040517f4677a0d3000000000000000000000000000000000000000000000000000000008152600401610c829190611a98565b60405180910390fd5b610c93611491565b565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614158015610d415750600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614155b15610d8357336040517fcdfcef97000000000000000000000000000000000000000000000000000000008152600401610d7a9190611a98565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415610dea576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b80600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055507fe79965b5c67dcfb2cf5fe152715e4a7256cee62a3d5dd8484fd8a8539eb8beff3382604051610e5c929190611ab3565b60405180910390a150565b610e6f610851565b15610eaf576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610ea690611ca1565b60405180910390fd5b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610f4157336040517fff70ace2000000000000000000000000000000000000000000000000000000008152600401610f389190611a98565b60405180910390fd5b6003547f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166318160ddd6040518163ffffffff1660e01b815260040160206040518083038186803b158015610faa57600080fd5b505afa158015610fbe573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610fe29190611858565b85610fed9190611dc1565b1115611032576003546040517f3d3dbc830000000000000000000000000000000000000000000000000000000081526004016110299190611d05565b60405180910390fd5b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16631e458bee8a86846040518463ffffffff1660e01b815260040161108f93929190611b81565b600060405180830381600087803b1580156110a957600080fd5b505af11580156110bd573d6000803e3d6000fd5b505050506000838390501115611203578873ffffffffffffffffffffffffffffffffffffffff16633ff0693c6040518060c001604052808c73ffffffffffffffffffffffffffffffffffffffff1681526020018b81526020018a8a8080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f82011690508083019250505050505050815260200188815260200187815260200186868080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050508152506040518263ffffffff1660e01b81526004016111d09190611ce3565b600060405180830381600087803b1580156111ea57600080fd5b505af11580156111fe573d6000803e3d6000fd5b505050505b80857f521fb0b407c2eb9b1375530e9b9a569889992140a688bc076aa72c1712012c888b8b8b8b8a8a8a6040516112409796959493929190611bb8565b60405180910390a3505050505050505050565b60035481565b611261610851565b156112a1576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161129890611ca1565b60405180910390fd5b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166379cc67903383608001356040518363ffffffff1660e01b8152600401611300929190611b58565b600060405180830381600087803b15801561131a57600080fd5b505af115801561132e573d6000803e3d6000fd5b5050505080600001353373ffffffffffffffffffffffffffffffffffffffff167f7ec1c94701e09b1652f3e1d307e60c4b9ebf99aff8c2079fd1d8c585e031c4e4328480602001906113809190611d20565b8660800135876040013588806060019061139a9190611d20565b8a8060a001906113aa9190611d20565b6040516113bf99989796959493929190611adc565b60405180910390a350565b600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6113f8610851565b611437576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161142e90611c81565b60405180910390fd5b60008060006101000a81548160ff0219169083151502179055507f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa61147a611533565b6040516114879190611a98565b60405180910390a1565b611499610851565b156114d9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016114d090611ca1565b60405180910390fd5b60016000806101000a81548160ff0219169083151502179055507f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a25861151c611533565b6040516115299190611a98565b60405180910390a1565b600033905090565b60008135905061154a81611f6a565b92915050565b60008135905061155f81611f81565b92915050565b60008083601f84011261157b5761157a611edf565b5b8235905067ffffffffffffffff81111561159857611597611eda565b5b6020830191508360018202830111156115b4576115b3611ef3565b5b9250929050565b600060c082840312156115d1576115d0611ee9565b5b81905092915050565b6000813590506115e981611f98565b92915050565b6000815190506115fe81611f98565b92915050565b60006020828403121561161a57611619611f02565b5b60006116288482850161153b565b91505092915050565b600080600080600080600080600060e08a8c03121561165357611652611f02565b5b60006116618c828d0161153b565b99505060206116728c828d016115da565b98505060408a013567ffffffffffffffff81111561169357611692611efd565b5b61169f8c828d01611565565b975097505060606116b28c828d016115da565b95505060806116c38c828d016115da565b94505060a08a013567ffffffffffffffff8111156116e4576116e3611efd565b5b6116f08c828d01611565565b935093505060c06117038c828d01611550565b9150509295985092959850929598565b60008060008060008060008060c0898b03121561173357611732611f02565b5b600089013567ffffffffffffffff81111561175157611750611efd565b5b61175d8b828c01611565565b985098505060206117708b828c016115da565b96505060406117818b828c0161153b565b95505060606117928b828c016115da565b945050608089013567ffffffffffffffff8111156117b3576117b2611efd565b5b6117bf8b828c01611565565b935093505060a06117d28b828c01611550565b9150509295985092959890939650565b6000602082840312156117f8576117f7611f02565b5b600082013567ffffffffffffffff81111561181657611815611efd565b5b611822848285016115bb565b91505092915050565b60006020828403121561184157611840611f02565b5b600061184f848285016115da565b91505092915050565b60006020828403121561186e5761186d611f02565b5b600061187c848285016115ef565b91505092915050565b61188e81611e17565b82525050565b61189d81611e17565b82525050565b6118ac81611e29565b82525050565b6118bb81611e35565b82525050565b60006118cd8385611d9f565b93506118da838584611e69565b6118e383611f07565b840190509392505050565b60006118f982611d83565b6119038185611d8e565b9350611913818560208601611e78565b61191c81611f07565b840191505092915050565b6000611934601483611db0565b915061193f82611f18565b602082019050919050565b6000611957601083611db0565b915061196282611f41565b602082019050919050565b600060a083016000830151848203600086015261198a82826118ee565b915050602083015161199f6020860182611a7a565b5060408301516119b26040860182611885565b5060608301516119c56060860182611a7a565b50608083015184820360808601526119dd82826118ee565b9150508091505092915050565b600060c083016000830151611a026000860182611885565b506020830151611a156020860182611a7a565b5060408301518482036040860152611a2d82826118ee565b9150506060830151611a426060860182611a7a565b506080830151611a556080860182611a7a565b5060a083015184820360a0860152611a6d82826118ee565b9150508091505092915050565b611a8381611e5f565b82525050565b611a9281611e5f565b82525050565b6000602082019050611aad6000830184611894565b92915050565b6000604082019050611ac86000830185611894565b611ad56020830184611894565b9392505050565b600060c082019050611af1600083018c611894565b8181036020830152611b04818a8c6118c1565b9050611b136040830189611a89565b611b206060830188611a89565b8181036080830152611b338186886118c1565b905081810360a0830152611b488184866118c1565b90509a9950505050505050505050565b6000604082019050611b6d6000830185611894565b611b7a6020830184611a89565b9392505050565b6000606082019050611b966000830186611894565b611ba36020830185611a89565b611bb060408301846118b2565b949350505050565b600060a082019050611bcd600083018a611894565b611bda6020830189611a89565b8181036040830152611bed8187896118c1565b9050611bfc6060830186611a89565b8181036080830152611c0f8184866118c1565b905098975050505050505050565b6000602082019050611c3260008301846118a3565b92915050565b60006060820190508181036000830152611c538187896118c1565b9050611c626020830186611a89565b8181036040830152611c758184866118c1565b90509695505050505050565b60006020820190508181036000830152611c9a81611927565b9050919050565b60006020820190508181036000830152611cba8161194a565b9050919050565b60006020820190508181036000830152611cdb818461196d565b905092915050565b60006020820190508181036000830152611cfd81846119ea565b905092915050565b6000602082019050611d1a6000830184611a89565b92915050565b60008083356001602003843603038112611d3d57611d3c611eee565b5b80840192508235915067ffffffffffffffff821115611d5f57611d5e611ee4565b5b602083019250600182023603831315611d7b57611d7a611ef8565b5b509250929050565b600081519050919050565b600082825260208201905092915050565b600082825260208201905092915050565b600082825260208201905092915050565b6000611dcc82611e5f565b9150611dd783611e5f565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff03821115611e0c57611e0b611eab565b5b828201905092915050565b6000611e2282611e3f565b9050919050565b60008115159050919050565b6000819050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b82818337600083830152505050565b60005b83811015611e96578082015181840152602081019050611e7b565b83811115611ea5576000848401525b50505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f5061757361626c653a206e6f7420706175736564000000000000000000000000600082015250565b7f5061757361626c653a2070617573656400000000000000000000000000000000600082015250565b611f7381611e17565b8114611f7e57600080fd5b50565b611f8a81611e35565b8114611f9557600080fd5b50565b611fa181611e5f565b8114611fac57600080fd5b5056fea264697066735822122026e075a0329747f85269f5d9d020ef49f1b1599f4c1ed2ca912d2621aec8339c64736f6c63430008070033"; type ZetaConnectorNonEthConstructorParams = | [signer?: Signer] diff --git a/packages/interfaces/typechain-types/factories/contracts/ZetaTokenConsumerUniV2.strategy.sol/ZetaTokenConsumerUniV2__factory.ts b/packages/interfaces/typechain-types/factories/contracts/ZetaTokenConsumerUniV2.strategy.sol/ZetaTokenConsumerUniV2__factory.ts index 1b38a725..ef82d476 100644 --- a/packages/interfaces/typechain-types/factories/contracts/ZetaTokenConsumerUniV2.strategy.sol/ZetaTokenConsumerUniV2__factory.ts +++ b/packages/interfaces/typechain-types/factories/contracts/ZetaTokenConsumerUniV2.strategy.sol/ZetaTokenConsumerUniV2__factory.ts @@ -260,7 +260,7 @@ const _abi = [ ]; const _bytecode = - "0x60e06040523480156200001157600080fd5b50604051620026aa380380620026aa83398181016040528101906200003791906200024e565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614806200009f5750600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16145b15620000d7576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8173ffffffffffffffffffffffffffffffffffffffff1660a08173ffffffffffffffffffffffffffffffffffffffff1660601b815250508073ffffffffffffffffffffffffffffffffffffffff1660c08173ffffffffffffffffffffffffffffffffffffffff1660601b815250508073ffffffffffffffffffffffffffffffffffffffff1663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b1580156200018c57600080fd5b505afa158015620001a1573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620001c791906200021c565b73ffffffffffffffffffffffffffffffffffffffff1660808173ffffffffffffffffffffffffffffffffffffffff1660601b815250505050620002e8565b6000815190506200021681620002ce565b92915050565b600060208284031215620002355762000234620002c9565b5b6000620002458482850162000205565b91505092915050565b60008060408385031215620002685762000267620002c9565b5b6000620002788582860162000205565b92505060206200028b8582860162000205565b9150509250929050565b6000620002a282620002a9565b9050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600080fd5b620002d98162000295565b8114620002e557600080fd5b50565b60805160601c60a05160601c60c05160601c6122e8620003c26000396000818161033401528181610598015281816108e101528181610b0f01528181610ca501528181610f0701526112700152600081816102c30152818161046a015281816106f10152818161086f01528181610ac501528181610b3101528181610bc501528181610ebd01528181610f29015281816110110152611140015260008181610254015281816105e2015281816106820152818161080001528181610c3401528181610f710152818161108001526111af01526122e86000f3fe60806040526004361061004a5760003560e01c8063013b2ff81461004f57806321e093b11461007f5780632405620a146100aa57806354c49a2a146100e7578063a53fb10b14610124575b600080fd5b610069600480360381019061006491906118ff565b610161565b6040516100769190611dc9565b60405180910390f35b34801561008b57600080fd5b50610094610468565b6040516100a19190611c4c565b60405180910390f35b3480156100b657600080fd5b506100d160048036038101906100cc919061193f565b61048c565b6040516100de9190611dc9565b60405180910390f35b3480156100f357600080fd5b5061010e600480360381019061010991906119a6565b610a1a565b60405161011b9190611dc9565b60405180910390f35b34801561013057600080fd5b5061014b6004803603810190610146919061193f565b610ddb565b6040516101589190611dc9565b60405180910390f35b60008073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614156101c9576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000341415610204576040517fb813f54900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000600267ffffffffffffffff81111561022157610220612103565b5b60405190808252806020026020018201604052801561024f5781602001602082028036833780820191505090505b5090507f000000000000000000000000000000000000000000000000000000000000000081600081518110610287576102866120d4565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff16815250507f0000000000000000000000000000000000000000000000000000000000000000816001815181106102f6576102f56120d4565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff168152505060007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16637ff36ab53486858960c84261037f9190611f6f565b6040518663ffffffff1660e01b815260040161039e9493929190611de4565b6000604051808303818588803b1580156103b757600080fd5b505af11580156103cb573d6000803e3d6000fd5b50505050506040513d6000823e3d601f19601f820116820180604052508101906103f591906119f9565b9050600081600184516104089190611fc5565b81518110610419576104186120d4565b5b602002602001015190507f87890b0a30955b1db16cc894fbe24779ae05d9f337bfe8b6dfc0809b5bf9da113482604051610454929190611e30565b60405180910390a180935050505092915050565b7f000000000000000000000000000000000000000000000000000000000000000081565b60008073ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff1614806104f45750600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16145b1561052b576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000821415610566576040517fb813f54900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6105933330848673ffffffffffffffffffffffffffffffffffffffff166113a9909392919063ffffffff16565b6105de7f0000000000000000000000000000000000000000000000000000000000000000838573ffffffffffffffffffffffffffffffffffffffff166114329092919063ffffffff16565b60607f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff16141561076357600267ffffffffffffffff81111561064f5761064e612103565b5b60405190808252806020026020018201604052801561067d5781602001602082028036833780820191505090505b5090507f0000000000000000000000000000000000000000000000000000000000000000816000815181106106b5576106b46120d4565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff16815250507f000000000000000000000000000000000000000000000000000000000000000081600181518110610724576107236120d4565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff16815250506108dd565b600367ffffffffffffffff81111561077e5761077d612103565b5b6040519080825280602002602001820160405280156107ac5781602001602082028036833780820191505090505b50905083816000815181106107c4576107c36120d4565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff16815250507f000000000000000000000000000000000000000000000000000000000000000081600181518110610833576108326120d4565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff16815250507f0000000000000000000000000000000000000000000000000000000000000000816002815181106108a2576108a16120d4565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff16815250505b60007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166338ed17398588858b60c84261092c9190611f6f565b6040518663ffffffff1660e01b815260040161094c959493929190611e59565b600060405180830381600087803b15801561096657600080fd5b505af115801561097a573d6000803e3d6000fd5b505050506040513d6000823e3d601f19601f820116820180604052508101906109a391906119f9565b9050600081600184516109b69190611fc5565b815181106109c7576109c66120d4565b5b602002602001015190507f017190d3d99ee6d8dd0604ef1e71ff9802810c6485f57c9b2ed6169848dd119f868683604051610a0493929190611cf0565b60405180910390a1809350505050949350505050565b60008073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff161415610a82576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000821415610abd576040517fb813f54900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610b0a3330847f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166113a9909392919063ffffffff16565b610b757f0000000000000000000000000000000000000000000000000000000000000000837f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166114329092919063ffffffff16565b6000600267ffffffffffffffff811115610b9257610b91612103565b5b604051908082528060200260200182016040528015610bc05781602001602082028036833780820191505090505b5090507f000000000000000000000000000000000000000000000000000000000000000081600081518110610bf857610bf76120d4565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff16815250507f000000000000000000000000000000000000000000000000000000000000000081600181518110610c6757610c666120d4565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff168152505060007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166318cbafe58587858a60c842610cf09190611f6f565b6040518663ffffffff1660e01b8152600401610d10959493929190611e59565b600060405180830381600087803b158015610d2a57600080fd5b505af1158015610d3e573d6000803e3d6000fd5b505050506040513d6000823e3d601f19601f82011682018060405250810190610d6791906119f9565b905060008160018451610d7a9190611fc5565b81518110610d8b57610d8a6120d4565b5b602002602001015190507f74e171117e91660f493740924d8bad0caf48dc4fbccb767fb05935397a2c17ae8582604051610dc6929190611e30565b60405180910390a18093505050509392505050565b60008073ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff161480610e435750600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16145b15610e7a576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000821415610eb5576040517fb813f54900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610f023330847f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166113a9909392919063ffffffff16565b610f6d7f0000000000000000000000000000000000000000000000000000000000000000837f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166114329092919063ffffffff16565b60607f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1614156110f257600267ffffffffffffffff811115610fde57610fdd612103565b5b60405190808252806020026020018201604052801561100c5781602001602082028036833780820191505090505b5090507f000000000000000000000000000000000000000000000000000000000000000081600081518110611044576110436120d4565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff16815250507f0000000000000000000000000000000000000000000000000000000000000000816001815181106110b3576110b26120d4565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff168152505061126c565b600367ffffffffffffffff81111561110d5761110c612103565b5b60405190808252806020026020018201604052801561113b5781602001602082028036833780820191505090505b5090507f000000000000000000000000000000000000000000000000000000000000000081600081518110611173576111726120d4565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff16815250507f0000000000000000000000000000000000000000000000000000000000000000816001815181106111e2576111e16120d4565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff16815250508381600281518110611231576112306120d4565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff16815250505b60007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166338ed17398588858b60c8426112bb9190611f6f565b6040518663ffffffff1660e01b81526004016112db959493929190611e59565b600060405180830381600087803b1580156112f557600080fd5b505af1158015611309573d6000803e3d6000fd5b505050506040513d6000823e3d601f19601f8201168201806040525081019061133291906119f9565b9050600081600184516113459190611fc5565b81518110611356576113556120d4565b5b602002602001015190507f0a7cb8f6e1d29e616c1209a3f418c17b3a9137005377f6dd072217b1ede2573b86868360405161139393929190611cf0565b60405180910390a1809350505050949350505050565b61142c846323b872dd60e01b8585856040516024016113ca93929190611c90565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050611590565b50505050565b60008114806114cb575060008373ffffffffffffffffffffffffffffffffffffffff1663dd62ed3e30856040518363ffffffff1660e01b8152600401611479929190611c67565b60206040518083038186803b15801561149157600080fd5b505afa1580156114a5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114c99190611a6f565b145b61150a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161150190611da9565b60405180910390fd5b61158b8363095ea7b360e01b8484604051602401611529929190611cc7565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050611590565b505050565b60006115f2826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c65648152508573ffffffffffffffffffffffffffffffffffffffff166116579092919063ffffffff16565b905060008151111561165257808060200190518101906116129190611a42565b611651576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161164890611d89565b60405180910390fd5b5b505050565b6060611666848460008561166f565b90509392505050565b6060824710156116b4576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016116ab90611d49565b60405180910390fd5b6116bd85611783565b6116fc576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016116f390611d69565b60405180910390fd5b6000808673ffffffffffffffffffffffffffffffffffffffff1685876040516117259190611c35565b60006040518083038185875af1925050503d8060008114611762576040519150601f19603f3d011682016040523d82523d6000602084013e611767565b606091505b50915091506117778282866117a6565b92505050949350505050565b6000808273ffffffffffffffffffffffffffffffffffffffff163b119050919050565b606083156117b657829050611806565b6000835111156117c95782518084602001fd5b816040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016117fd9190611d27565b60405180910390fd5b9392505050565b600061182061181b84611ed8565b611eb3565b9050808382526020820190508285602086028201111561184357611842612137565b5b60005b85811015611873578161185988826118ea565b845260208401935060208301925050600181019050611846565b5050509392505050565b60008135905061188c8161226d565b92915050565b600082601f8301126118a7576118a6612132565b5b81516118b784826020860161180d565b91505092915050565b6000815190506118cf81612284565b92915050565b6000813590506118e48161229b565b92915050565b6000815190506118f98161229b565b92915050565b6000806040838503121561191657611915612141565b5b60006119248582860161187d565b9250506020611935858286016118d5565b9150509250929050565b6000806000806080858703121561195957611958612141565b5b60006119678782880161187d565b9450506020611978878288016118d5565b93505060406119898782880161187d565b925050606061199a878288016118d5565b91505092959194509250565b6000806000606084860312156119bf576119be612141565b5b60006119cd8682870161187d565b93505060206119de868287016118d5565b92505060406119ef868287016118d5565b9150509250925092565b600060208284031215611a0f57611a0e612141565b5b600082015167ffffffffffffffff811115611a2d57611a2c61213c565b5b611a3984828501611892565b91505092915050565b600060208284031215611a5857611a57612141565b5b6000611a66848285016118c0565b91505092915050565b600060208284031215611a8557611a84612141565b5b6000611a93848285016118ea565b91505092915050565b6000611aa88383611ab4565b60208301905092915050565b611abd81611ff9565b82525050565b611acc81611ff9565b82525050565b6000611add82611f14565b611ae78185611f42565b9350611af283611f04565b8060005b83811015611b23578151611b0a8882611a9c565b9750611b1583611f35565b925050600181019050611af6565b5085935050505092915050565b6000611b3b82611f1f565b611b458185611f53565b9350611b55818560208601612041565b80840191505092915050565b6000611b6c82611f2a565b611b768185611f5e565b9350611b86818560208601612041565b611b8f81612146565b840191505092915050565b6000611ba7602683611f5e565b9150611bb282612157565b604082019050919050565b6000611bca601d83611f5e565b9150611bd5826121a6565b602082019050919050565b6000611bed602a83611f5e565b9150611bf8826121cf565b604082019050919050565b6000611c10603683611f5e565b9150611c1b8261221e565b604082019050919050565b611c2f81612037565b82525050565b6000611c418284611b30565b915081905092915050565b6000602082019050611c616000830184611ac3565b92915050565b6000604082019050611c7c6000830185611ac3565b611c896020830184611ac3565b9392505050565b6000606082019050611ca56000830186611ac3565b611cb26020830185611ac3565b611cbf6040830184611c26565b949350505050565b6000604082019050611cdc6000830185611ac3565b611ce96020830184611c26565b9392505050565b6000606082019050611d056000830186611ac3565b611d126020830185611c26565b611d1f6040830184611c26565b949350505050565b60006020820190508181036000830152611d418184611b61565b905092915050565b60006020820190508181036000830152611d6281611b9a565b9050919050565b60006020820190508181036000830152611d8281611bbd565b9050919050565b60006020820190508181036000830152611da281611be0565b9050919050565b60006020820190508181036000830152611dc281611c03565b9050919050565b6000602082019050611dde6000830184611c26565b92915050565b6000608082019050611df96000830187611c26565b8181036020830152611e0b8186611ad2565b9050611e1a6040830185611ac3565b611e276060830184611c26565b95945050505050565b6000604082019050611e456000830185611c26565b611e526020830184611c26565b9392505050565b600060a082019050611e6e6000830188611c26565b611e7b6020830187611c26565b8181036040830152611e8d8186611ad2565b9050611e9c6060830185611ac3565b611ea96080830184611c26565b9695505050505050565b6000611ebd611ece565b9050611ec98282612074565b919050565b6000604051905090565b600067ffffffffffffffff821115611ef357611ef2612103565b5b602082029050602081019050919050565b6000819050602082019050919050565b600081519050919050565b600081519050919050565b600081519050919050565b6000602082019050919050565b600082825260208201905092915050565b600081905092915050565b600082825260208201905092915050565b6000611f7a82612037565b9150611f8583612037565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff03821115611fba57611fb96120a5565b5b828201905092915050565b6000611fd082612037565b9150611fdb83612037565b925082821015611fee57611fed6120a5565b5b828203905092915050565b600061200482612017565b9050919050565b60008115159050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b60005b8381101561205f578082015181840152602081019050612044565b8381111561206e576000848401525b50505050565b61207d82612146565b810181811067ffffffffffffffff8211171561209c5761209b612103565b5b80604052505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600080fd5b600080fd5b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f416464726573733a20696e73756666696369656e742062616c616e636520666f60008201527f722063616c6c0000000000000000000000000000000000000000000000000000602082015250565b7f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000600082015250565b7f5361666545524332303a204552433230206f7065726174696f6e20646964206e60008201527f6f74207375636365656400000000000000000000000000000000000000000000602082015250565b7f5361666545524332303a20617070726f76652066726f6d206e6f6e2d7a65726f60008201527f20746f206e6f6e2d7a65726f20616c6c6f77616e636500000000000000000000602082015250565b61227681611ff9565b811461228157600080fd5b50565b61228d8161200b565b811461229857600080fd5b50565b6122a481612037565b81146122af57600080fd5b5056fea2646970667358221220a945636c0113c2f45785c144cf4f77a46ac7759fe082ff70c8e23dc5ce90498364736f6c63430008070033"; + "0x60e06040523480156200001157600080fd5b50604051620026aa380380620026aa83398181016040528101906200003791906200024e565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614806200009f5750600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16145b15620000d7576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8173ffffffffffffffffffffffffffffffffffffffff1660a08173ffffffffffffffffffffffffffffffffffffffff1660601b815250508073ffffffffffffffffffffffffffffffffffffffff1660c08173ffffffffffffffffffffffffffffffffffffffff1660601b815250508073ffffffffffffffffffffffffffffffffffffffff1663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b1580156200018c57600080fd5b505afa158015620001a1573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620001c791906200021c565b73ffffffffffffffffffffffffffffffffffffffff1660808173ffffffffffffffffffffffffffffffffffffffff1660601b815250505050620002e8565b6000815190506200021681620002ce565b92915050565b600060208284031215620002355762000234620002c9565b5b6000620002458482850162000205565b91505092915050565b60008060408385031215620002685762000267620002c9565b5b6000620002788582860162000205565b92505060206200028b8582860162000205565b9150509250929050565b6000620002a282620002a9565b9050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600080fd5b620002d98162000295565b8114620002e557600080fd5b50565b60805160601c60a05160601c60c05160601c6122e8620003c26000396000818161033401528181610598015281816108e101528181610b0f01528181610ca501528181610f0701526112700152600081816102c30152818161046a015281816106f10152818161086f01528181610ac501528181610b3101528181610bc501528181610ebd01528181610f29015281816110110152611140015260008181610254015281816105e2015281816106820152818161080001528181610c3401528181610f710152818161108001526111af01526122e86000f3fe60806040526004361061004a5760003560e01c8063013b2ff81461004f57806321e093b11461007f5780632405620a146100aa57806354c49a2a146100e7578063a53fb10b14610124575b600080fd5b610069600480360381019061006491906118ff565b610161565b6040516100769190611dc9565b60405180910390f35b34801561008b57600080fd5b50610094610468565b6040516100a19190611c4c565b60405180910390f35b3480156100b657600080fd5b506100d160048036038101906100cc919061193f565b61048c565b6040516100de9190611dc9565b60405180910390f35b3480156100f357600080fd5b5061010e600480360381019061010991906119a6565b610a1a565b60405161011b9190611dc9565b60405180910390f35b34801561013057600080fd5b5061014b6004803603810190610146919061193f565b610ddb565b6040516101589190611dc9565b60405180910390f35b60008073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614156101c9576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000341415610204576040517fb813f54900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000600267ffffffffffffffff81111561022157610220612103565b5b60405190808252806020026020018201604052801561024f5781602001602082028036833780820191505090505b5090507f000000000000000000000000000000000000000000000000000000000000000081600081518110610287576102866120d4565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff16815250507f0000000000000000000000000000000000000000000000000000000000000000816001815181106102f6576102f56120d4565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff168152505060007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16637ff36ab53486858960c84261037f9190611f6f565b6040518663ffffffff1660e01b815260040161039e9493929190611de4565b6000604051808303818588803b1580156103b757600080fd5b505af11580156103cb573d6000803e3d6000fd5b50505050506040513d6000823e3d601f19601f820116820180604052508101906103f591906119f9565b9050600081600184516104089190611fc5565b81518110610419576104186120d4565b5b602002602001015190507f87890b0a30955b1db16cc894fbe24779ae05d9f337bfe8b6dfc0809b5bf9da113482604051610454929190611e30565b60405180910390a180935050505092915050565b7f000000000000000000000000000000000000000000000000000000000000000081565b60008073ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff1614806104f45750600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16145b1561052b576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000821415610566576040517fb813f54900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6105933330848673ffffffffffffffffffffffffffffffffffffffff166113a9909392919063ffffffff16565b6105de7f0000000000000000000000000000000000000000000000000000000000000000838573ffffffffffffffffffffffffffffffffffffffff166114329092919063ffffffff16565b60607f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff16141561076357600267ffffffffffffffff81111561064f5761064e612103565b5b60405190808252806020026020018201604052801561067d5781602001602082028036833780820191505090505b5090507f0000000000000000000000000000000000000000000000000000000000000000816000815181106106b5576106b46120d4565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff16815250507f000000000000000000000000000000000000000000000000000000000000000081600181518110610724576107236120d4565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff16815250506108dd565b600367ffffffffffffffff81111561077e5761077d612103565b5b6040519080825280602002602001820160405280156107ac5781602001602082028036833780820191505090505b50905083816000815181106107c4576107c36120d4565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff16815250507f000000000000000000000000000000000000000000000000000000000000000081600181518110610833576108326120d4565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff16815250507f0000000000000000000000000000000000000000000000000000000000000000816002815181106108a2576108a16120d4565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff16815250505b60007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166338ed17398588858b60c84261092c9190611f6f565b6040518663ffffffff1660e01b815260040161094c959493929190611e59565b600060405180830381600087803b15801561096657600080fd5b505af115801561097a573d6000803e3d6000fd5b505050506040513d6000823e3d601f19601f820116820180604052508101906109a391906119f9565b9050600081600184516109b69190611fc5565b815181106109c7576109c66120d4565b5b602002602001015190507f017190d3d99ee6d8dd0604ef1e71ff9802810c6485f57c9b2ed6169848dd119f868683604051610a0493929190611cf0565b60405180910390a1809350505050949350505050565b60008073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff161415610a82576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000821415610abd576040517fb813f54900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610b0a3330847f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166113a9909392919063ffffffff16565b610b757f0000000000000000000000000000000000000000000000000000000000000000837f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166114329092919063ffffffff16565b6000600267ffffffffffffffff811115610b9257610b91612103565b5b604051908082528060200260200182016040528015610bc05781602001602082028036833780820191505090505b5090507f000000000000000000000000000000000000000000000000000000000000000081600081518110610bf857610bf76120d4565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff16815250507f000000000000000000000000000000000000000000000000000000000000000081600181518110610c6757610c666120d4565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff168152505060007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166318cbafe58587858a60c842610cf09190611f6f565b6040518663ffffffff1660e01b8152600401610d10959493929190611e59565b600060405180830381600087803b158015610d2a57600080fd5b505af1158015610d3e573d6000803e3d6000fd5b505050506040513d6000823e3d601f19601f82011682018060405250810190610d6791906119f9565b905060008160018451610d7a9190611fc5565b81518110610d8b57610d8a6120d4565b5b602002602001015190507f74e171117e91660f493740924d8bad0caf48dc4fbccb767fb05935397a2c17ae8582604051610dc6929190611e30565b60405180910390a18093505050509392505050565b60008073ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff161480610e435750600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16145b15610e7a576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000821415610eb5576040517fb813f54900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610f023330847f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166113a9909392919063ffffffff16565b610f6d7f0000000000000000000000000000000000000000000000000000000000000000837f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166114329092919063ffffffff16565b60607f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1614156110f257600267ffffffffffffffff811115610fde57610fdd612103565b5b60405190808252806020026020018201604052801561100c5781602001602082028036833780820191505090505b5090507f000000000000000000000000000000000000000000000000000000000000000081600081518110611044576110436120d4565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff16815250507f0000000000000000000000000000000000000000000000000000000000000000816001815181106110b3576110b26120d4565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff168152505061126c565b600367ffffffffffffffff81111561110d5761110c612103565b5b60405190808252806020026020018201604052801561113b5781602001602082028036833780820191505090505b5090507f000000000000000000000000000000000000000000000000000000000000000081600081518110611173576111726120d4565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff16815250507f0000000000000000000000000000000000000000000000000000000000000000816001815181106111e2576111e16120d4565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff16815250508381600281518110611231576112306120d4565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff16815250505b60007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166338ed17398588858b60c8426112bb9190611f6f565b6040518663ffffffff1660e01b81526004016112db959493929190611e59565b600060405180830381600087803b1580156112f557600080fd5b505af1158015611309573d6000803e3d6000fd5b505050506040513d6000823e3d601f19601f8201168201806040525081019061133291906119f9565b9050600081600184516113459190611fc5565b81518110611356576113556120d4565b5b602002602001015190507f0a7cb8f6e1d29e616c1209a3f418c17b3a9137005377f6dd072217b1ede2573b86868360405161139393929190611cf0565b60405180910390a1809350505050949350505050565b61142c846323b872dd60e01b8585856040516024016113ca93929190611c90565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050611590565b50505050565b60008114806114cb575060008373ffffffffffffffffffffffffffffffffffffffff1663dd62ed3e30856040518363ffffffff1660e01b8152600401611479929190611c67565b60206040518083038186803b15801561149157600080fd5b505afa1580156114a5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114c99190611a6f565b145b61150a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161150190611da9565b60405180910390fd5b61158b8363095ea7b360e01b8484604051602401611529929190611cc7565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050611590565b505050565b60006115f2826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c65648152508573ffffffffffffffffffffffffffffffffffffffff166116579092919063ffffffff16565b905060008151111561165257808060200190518101906116129190611a42565b611651576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161164890611d89565b60405180910390fd5b5b505050565b6060611666848460008561166f565b90509392505050565b6060824710156116b4576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016116ab90611d49565b60405180910390fd5b6116bd85611783565b6116fc576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016116f390611d69565b60405180910390fd5b6000808673ffffffffffffffffffffffffffffffffffffffff1685876040516117259190611c35565b60006040518083038185875af1925050503d8060008114611762576040519150601f19603f3d011682016040523d82523d6000602084013e611767565b606091505b50915091506117778282866117a6565b92505050949350505050565b6000808273ffffffffffffffffffffffffffffffffffffffff163b119050919050565b606083156117b657829050611806565b6000835111156117c95782518084602001fd5b816040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016117fd9190611d27565b60405180910390fd5b9392505050565b600061182061181b84611ed8565b611eb3565b9050808382526020820190508285602086028201111561184357611842612137565b5b60005b85811015611873578161185988826118ea565b845260208401935060208301925050600181019050611846565b5050509392505050565b60008135905061188c8161226d565b92915050565b600082601f8301126118a7576118a6612132565b5b81516118b784826020860161180d565b91505092915050565b6000815190506118cf81612284565b92915050565b6000813590506118e48161229b565b92915050565b6000815190506118f98161229b565b92915050565b6000806040838503121561191657611915612141565b5b60006119248582860161187d565b9250506020611935858286016118d5565b9150509250929050565b6000806000806080858703121561195957611958612141565b5b60006119678782880161187d565b9450506020611978878288016118d5565b93505060406119898782880161187d565b925050606061199a878288016118d5565b91505092959194509250565b6000806000606084860312156119bf576119be612141565b5b60006119cd8682870161187d565b93505060206119de868287016118d5565b92505060406119ef868287016118d5565b9150509250925092565b600060208284031215611a0f57611a0e612141565b5b600082015167ffffffffffffffff811115611a2d57611a2c61213c565b5b611a3984828501611892565b91505092915050565b600060208284031215611a5857611a57612141565b5b6000611a66848285016118c0565b91505092915050565b600060208284031215611a8557611a84612141565b5b6000611a93848285016118ea565b91505092915050565b6000611aa88383611ab4565b60208301905092915050565b611abd81611ff9565b82525050565b611acc81611ff9565b82525050565b6000611add82611f14565b611ae78185611f42565b9350611af283611f04565b8060005b83811015611b23578151611b0a8882611a9c565b9750611b1583611f35565b925050600181019050611af6565b5085935050505092915050565b6000611b3b82611f1f565b611b458185611f53565b9350611b55818560208601612041565b80840191505092915050565b6000611b6c82611f2a565b611b768185611f5e565b9350611b86818560208601612041565b611b8f81612146565b840191505092915050565b6000611ba7602683611f5e565b9150611bb282612157565b604082019050919050565b6000611bca601d83611f5e565b9150611bd5826121a6565b602082019050919050565b6000611bed602a83611f5e565b9150611bf8826121cf565b604082019050919050565b6000611c10603683611f5e565b9150611c1b8261221e565b604082019050919050565b611c2f81612037565b82525050565b6000611c418284611b30565b915081905092915050565b6000602082019050611c616000830184611ac3565b92915050565b6000604082019050611c7c6000830185611ac3565b611c896020830184611ac3565b9392505050565b6000606082019050611ca56000830186611ac3565b611cb26020830185611ac3565b611cbf6040830184611c26565b949350505050565b6000604082019050611cdc6000830185611ac3565b611ce96020830184611c26565b9392505050565b6000606082019050611d056000830186611ac3565b611d126020830185611c26565b611d1f6040830184611c26565b949350505050565b60006020820190508181036000830152611d418184611b61565b905092915050565b60006020820190508181036000830152611d6281611b9a565b9050919050565b60006020820190508181036000830152611d8281611bbd565b9050919050565b60006020820190508181036000830152611da281611be0565b9050919050565b60006020820190508181036000830152611dc281611c03565b9050919050565b6000602082019050611dde6000830184611c26565b92915050565b6000608082019050611df96000830187611c26565b8181036020830152611e0b8186611ad2565b9050611e1a6040830185611ac3565b611e276060830184611c26565b95945050505050565b6000604082019050611e456000830185611c26565b611e526020830184611c26565b9392505050565b600060a082019050611e6e6000830188611c26565b611e7b6020830187611c26565b8181036040830152611e8d8186611ad2565b9050611e9c6060830185611ac3565b611ea96080830184611c26565b9695505050505050565b6000611ebd611ece565b9050611ec98282612074565b919050565b6000604051905090565b600067ffffffffffffffff821115611ef357611ef2612103565b5b602082029050602081019050919050565b6000819050602082019050919050565b600081519050919050565b600081519050919050565b600081519050919050565b6000602082019050919050565b600082825260208201905092915050565b600081905092915050565b600082825260208201905092915050565b6000611f7a82612037565b9150611f8583612037565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff03821115611fba57611fb96120a5565b5b828201905092915050565b6000611fd082612037565b9150611fdb83612037565b925082821015611fee57611fed6120a5565b5b828203905092915050565b600061200482612017565b9050919050565b60008115159050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b60005b8381101561205f578082015181840152602081019050612044565b8381111561206e576000848401525b50505050565b61207d82612146565b810181811067ffffffffffffffff8211171561209c5761209b612103565b5b80604052505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600080fd5b600080fd5b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f416464726573733a20696e73756666696369656e742062616c616e636520666f60008201527f722063616c6c0000000000000000000000000000000000000000000000000000602082015250565b7f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000600082015250565b7f5361666545524332303a204552433230206f7065726174696f6e20646964206e60008201527f6f74207375636365656400000000000000000000000000000000000000000000602082015250565b7f5361666545524332303a20617070726f76652066726f6d206e6f6e2d7a65726f60008201527f20746f206e6f6e2d7a65726f20616c6c6f77616e636500000000000000000000602082015250565b61227681611ff9565b811461228157600080fd5b50565b61228d8161200b565b811461229857600080fd5b50565b6122a481612037565b81146122af57600080fd5b5056fea26469706673582212209d0e3cafa4547673e4834e1381def595dd0be20bbbac9eb70f3c9b961a8cdbca64736f6c63430008070033"; type ZetaTokenConsumerUniV2ConstructorParams = | [signer?: Signer] diff --git a/packages/interfaces/typechain-types/factories/contracts/ZetaTokenConsumerUniV3.strategy.sol/ZetaTokenConsumerUniV3__factory.ts b/packages/interfaces/typechain-types/factories/contracts/ZetaTokenConsumerUniV3.strategy.sol/ZetaTokenConsumerUniV3__factory.ts index a0f0c6c9..9bb84583 100644 --- a/packages/interfaces/typechain-types/factories/contracts/ZetaTokenConsumerUniV3.strategy.sol/ZetaTokenConsumerUniV3__factory.ts +++ b/packages/interfaces/typechain-types/factories/contracts/ZetaTokenConsumerUniV3.strategy.sol/ZetaTokenConsumerUniV3__factory.ts @@ -353,7 +353,7 @@ const _abi = [ ]; const _bytecode = - "0x6101406040523480156200001257600080fd5b50604051620025af380380620025af83398181016040528101906200003891906200028a565b600073ffffffffffffffffffffffffffffffffffffffff168673ffffffffffffffffffffffffffffffffffffffff161480620000a05750600073ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff16145b80620000d85750600073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff16145b80620001105750600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16145b1562000148576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8573ffffffffffffffffffffffffffffffffffffffff1660e08173ffffffffffffffffffffffffffffffffffffffff1660601b815250508473ffffffffffffffffffffffffffffffffffffffff166101008173ffffffffffffffffffffffffffffffffffffffff1660601b815250508373ffffffffffffffffffffffffffffffffffffffff166101208173ffffffffffffffffffffffffffffffffffffffff1660601b815250508273ffffffffffffffffffffffffffffffffffffffff1660c08173ffffffffffffffffffffffffffffffffffffffff1660601b815250508162ffffff1660808162ffffff1660e81b815250508062ffffff1660a08162ffffff1660e81b81525050505050505050620003a2565b6000815190506200026d816200036e565b92915050565b600081519050620002848162000388565b92915050565b60008060008060008060c08789031215620002aa57620002a962000369565b5b6000620002ba89828a016200025c565b9650506020620002cd89828a016200025c565b9550506040620002e089828a016200025c565b9450506060620002f389828a016200025c565b93505060806200030689828a0162000273565b92505060a06200031989828a0162000273565b9150509295509295509295565b600062000333826200033a565b9050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600062ffffff82169050919050565b600080fd5b620003798162000326565b81146200038557600080fd5b50565b62000393816200035a565b81146200039f57600080fd5b50565b60805160e81c60a05160e81c60c05160601c60e05160601c6101005160601c6101205160601c6120fc620004b360003960006111400152600081816104030152818161062301528181610761015281816108560152818161099101528181610b0301528181610ed30152611031015260008181610343015281816104f5015281816106dc01528181610947015281816109b301528181610a0701528181610e8901528181610ef50152610f480152600081816103070152818161069a01528181610a4301528181610bb00152610f8a01526000818161067901528181610d240152610fab01526000818161037f015281816106bb0152818161087a01528181610a7f0152610f6901526120fc6000f3fe60806040526004361061008a5760003560e01c80633cbd7005116100595780633cbd70051461015957806354c49a2a146101845780635d9dfdde146101c1578063a53fb10b146101ec578063c6bbd5a71461022957610091565b8063013b2ff81461009657806321e093b1146100c65780632405620a146100f15780632c76d7a61461012e57610091565b3661009157005b600080fd5b6100b060048036038101906100ab919061161a565b610254565b6040516100bd9190611d24565b60405180910390f35b3480156100d257600080fd5b506100db6104f3565b6040516100e89190611b18565b60405180910390f35b3480156100fd57600080fd5b506101186004803603810190610113919061165a565b610517565b6040516101259190611d24565b60405180910390f35b34801561013a57600080fd5b50610143610854565b6040516101509190611c0e565b60405180910390f35b34801561016557600080fd5b5061016e610878565b60405161017b9190611d09565b60405180910390f35b34801561019057600080fd5b506101ab60048036038101906101a691906116c1565b61089c565b6040516101b89190611d24565b60405180910390f35b3480156101cd57600080fd5b506101d6610d22565b6040516101e39190611d09565b60405180910390f35b3480156101f857600080fd5b50610213600480360381019061020e919061165a565b610d46565b6040516102209190611d24565b60405180910390f35b34801561023557600080fd5b5061023e61113e565b60405161024b9190611bf3565b60405180910390f35b60008073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614156102bc576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60003414156102f7576040517fb813f54900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60006040518061010001604052807f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1681526020017f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1681526020017f000000000000000000000000000000000000000000000000000000000000000062ffffff1681526020018573ffffffffffffffffffffffffffffffffffffffff16815260200160c8426103d19190611dab565b8152602001348152602001848152602001600073ffffffffffffffffffffffffffffffffffffffff16815250905060007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663414bf38934846040518363ffffffff1660e01b815260040161045b9190611ced565b6020604051808303818588803b15801561047457600080fd5b505af1158015610488573d6000803e3d6000fd5b50505050506040513d601f19601f820116820180604052508101906104ad9190611741565b90507f87890b0a30955b1db16cc894fbe24779ae05d9f337bfe8b6dfc0809b5bf9da1134826040516104e0929190611d3f565b60405180910390a1809250505092915050565b7f000000000000000000000000000000000000000000000000000000000000000081565b60008073ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff16148061057f5750600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16145b156105b6576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008214156105f1576040517fb813f54900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61061e3330848673ffffffffffffffffffffffffffffffffffffffff16611162909392919063ffffffff16565b6106697f0000000000000000000000000000000000000000000000000000000000000000838573ffffffffffffffffffffffffffffffffffffffff166111eb9092919063ffffffff16565b60006040518060a00160405280857f00000000000000000000000000000000000000000000000000000000000000007f00000000000000000000000000000000000000000000000000000000000000007f00000000000000000000000000000000000000000000000000000000000000007f000000000000000000000000000000000000000000000000000000000000000060405160200161070f959493929190611a8d565b60405160208183030381529060405281526020018773ffffffffffffffffffffffffffffffffffffffff16815260200160c84261074c9190611dab565b815260200184815260200186815250905060007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663c04b8d59836040518263ffffffff1660e01b81526004016107b89190611ccb565b602060405180830381600087803b1580156107d257600080fd5b505af11580156107e6573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061080a9190611741565b90507f017190d3d99ee6d8dd0604ef1e71ff9802810c6485f57c9b2ed6169848dd119f85858360405161083f93929190611bbc565b60405180910390a18092505050949350505050565b7f000000000000000000000000000000000000000000000000000000000000000081565b7f000000000000000000000000000000000000000000000000000000000000000081565b60008073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff161415610904576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600082141561093f576040517fb813f54900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61098c3330847f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16611162909392919063ffffffff16565b6109f77f0000000000000000000000000000000000000000000000000000000000000000837f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166111eb9092919063ffffffff16565b60006040518061010001604052807f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1681526020017f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1681526020017f000000000000000000000000000000000000000000000000000000000000000062ffffff1681526020013073ffffffffffffffffffffffffffffffffffffffff16815260200160c842610ad19190611dab565b8152602001848152602001858152602001600073ffffffffffffffffffffffffffffffffffffffff16815250905060007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663414bf389836040518263ffffffff1660e01b8152600401610b5a9190611ced565b602060405180830381600087803b158015610b7457600080fd5b505af1158015610b88573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610bac9190611741565b90507f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16632e1a7d4d826040518263ffffffff1660e01b8152600401610c079190611d24565b600060405180830381600087803b158015610c2157600080fd5b505af1158015610c35573d6000803e3d6000fd5b505050507f74e171117e91660f493740924d8bad0caf48dc4fbccb767fb05935397a2c17ae8482604051610c6a929190611d3f565b60405180910390a160008673ffffffffffffffffffffffffffffffffffffffff1682604051610c9890611b03565b60006040518083038185875af1925050503d8060008114610cd5576040519150601f19603f3d011682016040523d82523d6000602084013e610cda565b606091505b5050905080610d15576040517f3794aeaf00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8193505050509392505050565b7f000000000000000000000000000000000000000000000000000000000000000081565b60008060009054906101000a900460ff1615610d8e576040517f29f745a700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60016000806101000a81548160ff021916908315150217905550600073ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff161480610e0f5750600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16145b15610e46576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000821415610e81576040517fb813f54900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610ece3330847f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16611162909392919063ffffffff16565b610f397f0000000000000000000000000000000000000000000000000000000000000000837f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166111eb9092919063ffffffff16565b60006040518060a001604052807f00000000000000000000000000000000000000000000000000000000000000007f00000000000000000000000000000000000000000000000000000000000000007f00000000000000000000000000000000000000000000000000000000000000007f000000000000000000000000000000000000000000000000000000000000000089604051602001610fdf959493929190611a8d565b60405160208183030381529060405281526020018773ffffffffffffffffffffffffffffffffffffffff16815260200160c84261101c9190611dab565b815260200184815260200186815250905060007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663c04b8d59836040518263ffffffff1660e01b81526004016110889190611ccb565b602060405180830381600087803b1580156110a257600080fd5b505af11580156110b6573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110da9190611741565b90507f0a7cb8f6e1d29e616c1209a3f418c17b3a9137005377f6dd072217b1ede2573b85858360405161110f93929190611bbc565b60405180910390a1809250505060008060006101000a81548160ff021916908315150217905550949350505050565b7f000000000000000000000000000000000000000000000000000000000000000081565b6111e5846323b872dd60e01b85858560405160240161118393929190611b5c565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050611349565b50505050565b6000811480611284575060008373ffffffffffffffffffffffffffffffffffffffff1663dd62ed3e30856040518363ffffffff1660e01b8152600401611232929190611b33565b60206040518083038186803b15801561124a57600080fd5b505afa15801561125e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112829190611741565b145b6112c3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016112ba90611cab565b60405180910390fd5b6113448363095ea7b360e01b84846040516024016112e2929190611b93565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050611349565b505050565b60006113ab826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c65648152508573ffffffffffffffffffffffffffffffffffffffff166114109092919063ffffffff16565b905060008151111561140b57808060200190518101906113cb9190611714565b61140a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161140190611c8b565b60405180910390fd5b5b505050565b606061141f8484600085611428565b90509392505050565b60608247101561146d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161146490611c4b565b60405180910390fd5b6114768561153c565b6114b5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016114ac90611c6b565b60405180910390fd5b6000808673ffffffffffffffffffffffffffffffffffffffff1685876040516114de9190611aec565b60006040518083038185875af1925050503d806000811461151b576040519150601f19603f3d011682016040523d82523d6000602084013e611520565b606091505b509150915061153082828661155f565b92505050949350505050565b6000808273ffffffffffffffffffffffffffffffffffffffff163b119050919050565b6060831561156f578290506115bf565b6000835111156115825782518084602001fd5b816040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016115b69190611c29565b60405180910390fd5b9392505050565b6000813590506115d581612081565b92915050565b6000815190506115ea81612098565b92915050565b6000813590506115ff816120af565b92915050565b600081519050611614816120af565b92915050565b6000806040838503121561163157611630611f38565b5b600061163f858286016115c6565b9250506020611650858286016115f0565b9150509250929050565b6000806000806080858703121561167457611673611f38565b5b6000611682878288016115c6565b9450506020611693878288016115f0565b93505060406116a4878288016115c6565b92505060606116b5878288016115f0565b91505092959194509250565b6000806000606084860312156116da576116d9611f38565b5b60006116e8868287016115c6565b93505060206116f9868287016115f0565b925050604061170a868287016115f0565b9150509250925092565b60006020828403121561172a57611729611f38565b5b6000611738848285016115db565b91505092915050565b60006020828403121561175757611756611f38565b5b600061176584828501611605565b91505092915050565b61177781611e01565b82525050565b61178681611e01565b82525050565b61179d61179882611e01565b611ed3565b82525050565b60006117ae82611d68565b6117b88185611d7e565b93506117c8818560208601611ea0565b6117d181611f3d565b840191505092915050565b60006117e782611d68565b6117f18185611d8f565b9350611801818560208601611ea0565b80840191505092915050565b61181681611e58565b82525050565b61182581611e6a565b82525050565b600061183682611d73565b6118408185611d9a565b9350611850818560208601611ea0565b61185981611f3d565b840191505092915050565b6000611871602683611d9a565b915061187c82611f68565b604082019050919050565b6000611894600083611d8f565b915061189f82611fb7565b600082019050919050565b60006118b7601d83611d9a565b91506118c282611fba565b602082019050919050565b60006118da602a83611d9a565b91506118e582611fe3565b604082019050919050565b60006118fd603683611d9a565b915061190882612032565b604082019050919050565b600060a083016000830151848203600086015261193082826117a3565b9150506020830151611945602086018261176e565b5060408301516119586040860182611a6f565b50606083015161196b6060860182611a6f565b50608083015161197e6080860182611a6f565b508091505092915050565b610100820160008201516119a0600085018261176e565b5060208201516119b3602085018261176e565b5060408201516119c66040850182611a3a565b5060608201516119d9606085018261176e565b5060808201516119ec6080850182611a6f565b5060a08201516119ff60a0850182611a6f565b5060c0820151611a1260c0850182611a6f565b5060e0820151611a2560e0850182611a2b565b50505050565b611a3481611e1f565b82525050565b611a4381611e3f565b82525050565b611a5281611e3f565b82525050565b611a69611a6482611e3f565b611ef7565b82525050565b611a7881611e4e565b82525050565b611a8781611e4e565b82525050565b6000611a99828861178c565b601482019150611aa98287611a58565b600382019150611ab9828661178c565b601482019150611ac98285611a58565b600382019150611ad9828461178c565b6014820191508190509695505050505050565b6000611af882846117dc565b915081905092915050565b6000611b0e82611887565b9150819050919050565b6000602082019050611b2d600083018461177d565b92915050565b6000604082019050611b48600083018561177d565b611b55602083018461177d565b9392505050565b6000606082019050611b71600083018661177d565b611b7e602083018561177d565b611b8b6040830184611a7e565b949350505050565b6000604082019050611ba8600083018561177d565b611bb56020830184611a7e565b9392505050565b6000606082019050611bd1600083018661177d565b611bde6020830185611a7e565b611beb6040830184611a7e565b949350505050565b6000602082019050611c08600083018461180d565b92915050565b6000602082019050611c23600083018461181c565b92915050565b60006020820190508181036000830152611c43818461182b565b905092915050565b60006020820190508181036000830152611c6481611864565b9050919050565b60006020820190508181036000830152611c84816118aa565b9050919050565b60006020820190508181036000830152611ca4816118cd565b9050919050565b60006020820190508181036000830152611cc4816118f0565b9050919050565b60006020820190508181036000830152611ce58184611913565b905092915050565b600061010082019050611d036000830184611989565b92915050565b6000602082019050611d1e6000830184611a49565b92915050565b6000602082019050611d396000830184611a7e565b92915050565b6000604082019050611d546000830185611a7e565b611d616020830184611a7e565b9392505050565b600081519050919050565b600081519050919050565b600082825260208201905092915050565b600081905092915050565b600082825260208201905092915050565b6000611db682611e4e565b9150611dc183611e4e565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff03821115611df657611df5611f09565b5b828201905092915050565b6000611e0c82611e1f565b9050919050565b60008115159050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600062ffffff82169050919050565b6000819050919050565b6000611e6382611e7c565b9050919050565b6000611e7582611e7c565b9050919050565b6000611e8782611e8e565b9050919050565b6000611e9982611e1f565b9050919050565b60005b83811015611ebe578082015181840152602081019050611ea3565b83811115611ecd576000848401525b50505050565b6000611ede82611ee5565b9050919050565b6000611ef082611f5b565b9050919050565b6000611f0282611f4e565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b600080fd5b6000601f19601f8301169050919050565b60008160e81b9050919050565b60008160601b9050919050565b7f416464726573733a20696e73756666696369656e742062616c616e636520666f60008201527f722063616c6c0000000000000000000000000000000000000000000000000000602082015250565b50565b7f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000600082015250565b7f5361666545524332303a204552433230206f7065726174696f6e20646964206e60008201527f6f74207375636365656400000000000000000000000000000000000000000000602082015250565b7f5361666545524332303a20617070726f76652066726f6d206e6f6e2d7a65726f60008201527f20746f206e6f6e2d7a65726f20616c6c6f77616e636500000000000000000000602082015250565b61208a81611e01565b811461209557600080fd5b50565b6120a181611e13565b81146120ac57600080fd5b50565b6120b881611e4e565b81146120c357600080fd5b5056fea2646970667358221220bbd48d1862206b4a9735481938fe5084525307c377e3f16b30446631777ac5e764736f6c63430008070033"; + "0x6101406040523480156200001257600080fd5b50604051620025af380380620025af83398181016040528101906200003891906200028a565b600073ffffffffffffffffffffffffffffffffffffffff168673ffffffffffffffffffffffffffffffffffffffff161480620000a05750600073ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff16145b80620000d85750600073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff16145b80620001105750600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16145b1562000148576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8573ffffffffffffffffffffffffffffffffffffffff1660e08173ffffffffffffffffffffffffffffffffffffffff1660601b815250508473ffffffffffffffffffffffffffffffffffffffff166101008173ffffffffffffffffffffffffffffffffffffffff1660601b815250508373ffffffffffffffffffffffffffffffffffffffff166101208173ffffffffffffffffffffffffffffffffffffffff1660601b815250508273ffffffffffffffffffffffffffffffffffffffff1660c08173ffffffffffffffffffffffffffffffffffffffff1660601b815250508162ffffff1660808162ffffff1660e81b815250508062ffffff1660a08162ffffff1660e81b81525050505050505050620003a2565b6000815190506200026d816200036e565b92915050565b600081519050620002848162000388565b92915050565b60008060008060008060c08789031215620002aa57620002a962000369565b5b6000620002ba89828a016200025c565b9650506020620002cd89828a016200025c565b9550506040620002e089828a016200025c565b9450506060620002f389828a016200025c565b93505060806200030689828a0162000273565b92505060a06200031989828a0162000273565b9150509295509295509295565b600062000333826200033a565b9050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600062ffffff82169050919050565b600080fd5b620003798162000326565b81146200038557600080fd5b50565b62000393816200035a565b81146200039f57600080fd5b50565b60805160e81c60a05160e81c60c05160601c60e05160601c6101005160601c6101205160601c6120fc620004b360003960006111400152600081816104030152818161062301528181610761015281816108560152818161099101528181610b0301528181610ed30152611031015260008181610343015281816104f5015281816106dc01528181610947015281816109b301528181610a0701528181610e8901528181610ef50152610f480152600081816103070152818161069a01528181610a4301528181610bb00152610f8a01526000818161067901528181610d240152610fab01526000818161037f015281816106bb0152818161087a01528181610a7f0152610f6901526120fc6000f3fe60806040526004361061008a5760003560e01c80633cbd7005116100595780633cbd70051461015957806354c49a2a146101845780635d9dfdde146101c1578063a53fb10b146101ec578063c6bbd5a71461022957610091565b8063013b2ff81461009657806321e093b1146100c65780632405620a146100f15780632c76d7a61461012e57610091565b3661009157005b600080fd5b6100b060048036038101906100ab919061161a565b610254565b6040516100bd9190611d24565b60405180910390f35b3480156100d257600080fd5b506100db6104f3565b6040516100e89190611b18565b60405180910390f35b3480156100fd57600080fd5b506101186004803603810190610113919061165a565b610517565b6040516101259190611d24565b60405180910390f35b34801561013a57600080fd5b50610143610854565b6040516101509190611c0e565b60405180910390f35b34801561016557600080fd5b5061016e610878565b60405161017b9190611d09565b60405180910390f35b34801561019057600080fd5b506101ab60048036038101906101a691906116c1565b61089c565b6040516101b89190611d24565b60405180910390f35b3480156101cd57600080fd5b506101d6610d22565b6040516101e39190611d09565b60405180910390f35b3480156101f857600080fd5b50610213600480360381019061020e919061165a565b610d46565b6040516102209190611d24565b60405180910390f35b34801561023557600080fd5b5061023e61113e565b60405161024b9190611bf3565b60405180910390f35b60008073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614156102bc576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60003414156102f7576040517fb813f54900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60006040518061010001604052807f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1681526020017f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1681526020017f000000000000000000000000000000000000000000000000000000000000000062ffffff1681526020018573ffffffffffffffffffffffffffffffffffffffff16815260200160c8426103d19190611dab565b8152602001348152602001848152602001600073ffffffffffffffffffffffffffffffffffffffff16815250905060007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663414bf38934846040518363ffffffff1660e01b815260040161045b9190611ced565b6020604051808303818588803b15801561047457600080fd5b505af1158015610488573d6000803e3d6000fd5b50505050506040513d601f19601f820116820180604052508101906104ad9190611741565b90507f87890b0a30955b1db16cc894fbe24779ae05d9f337bfe8b6dfc0809b5bf9da1134826040516104e0929190611d3f565b60405180910390a1809250505092915050565b7f000000000000000000000000000000000000000000000000000000000000000081565b60008073ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff16148061057f5750600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16145b156105b6576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008214156105f1576040517fb813f54900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61061e3330848673ffffffffffffffffffffffffffffffffffffffff16611162909392919063ffffffff16565b6106697f0000000000000000000000000000000000000000000000000000000000000000838573ffffffffffffffffffffffffffffffffffffffff166111eb9092919063ffffffff16565b60006040518060a00160405280857f00000000000000000000000000000000000000000000000000000000000000007f00000000000000000000000000000000000000000000000000000000000000007f00000000000000000000000000000000000000000000000000000000000000007f000000000000000000000000000000000000000000000000000000000000000060405160200161070f959493929190611a8d565b60405160208183030381529060405281526020018773ffffffffffffffffffffffffffffffffffffffff16815260200160c84261074c9190611dab565b815260200184815260200186815250905060007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663c04b8d59836040518263ffffffff1660e01b81526004016107b89190611ccb565b602060405180830381600087803b1580156107d257600080fd5b505af11580156107e6573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061080a9190611741565b90507f017190d3d99ee6d8dd0604ef1e71ff9802810c6485f57c9b2ed6169848dd119f85858360405161083f93929190611bbc565b60405180910390a18092505050949350505050565b7f000000000000000000000000000000000000000000000000000000000000000081565b7f000000000000000000000000000000000000000000000000000000000000000081565b60008073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff161415610904576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600082141561093f576040517fb813f54900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61098c3330847f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16611162909392919063ffffffff16565b6109f77f0000000000000000000000000000000000000000000000000000000000000000837f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166111eb9092919063ffffffff16565b60006040518061010001604052807f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1681526020017f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1681526020017f000000000000000000000000000000000000000000000000000000000000000062ffffff1681526020013073ffffffffffffffffffffffffffffffffffffffff16815260200160c842610ad19190611dab565b8152602001848152602001858152602001600073ffffffffffffffffffffffffffffffffffffffff16815250905060007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663414bf389836040518263ffffffff1660e01b8152600401610b5a9190611ced565b602060405180830381600087803b158015610b7457600080fd5b505af1158015610b88573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610bac9190611741565b90507f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16632e1a7d4d826040518263ffffffff1660e01b8152600401610c079190611d24565b600060405180830381600087803b158015610c2157600080fd5b505af1158015610c35573d6000803e3d6000fd5b505050507f74e171117e91660f493740924d8bad0caf48dc4fbccb767fb05935397a2c17ae8482604051610c6a929190611d3f565b60405180910390a160008673ffffffffffffffffffffffffffffffffffffffff1682604051610c9890611b03565b60006040518083038185875af1925050503d8060008114610cd5576040519150601f19603f3d011682016040523d82523d6000602084013e610cda565b606091505b5050905080610d15576040517f3794aeaf00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8193505050509392505050565b7f000000000000000000000000000000000000000000000000000000000000000081565b60008060009054906101000a900460ff1615610d8e576040517f29f745a700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60016000806101000a81548160ff021916908315150217905550600073ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff161480610e0f5750600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16145b15610e46576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000821415610e81576040517fb813f54900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610ece3330847f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16611162909392919063ffffffff16565b610f397f0000000000000000000000000000000000000000000000000000000000000000837f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166111eb9092919063ffffffff16565b60006040518060a001604052807f00000000000000000000000000000000000000000000000000000000000000007f00000000000000000000000000000000000000000000000000000000000000007f00000000000000000000000000000000000000000000000000000000000000007f000000000000000000000000000000000000000000000000000000000000000089604051602001610fdf959493929190611a8d565b60405160208183030381529060405281526020018773ffffffffffffffffffffffffffffffffffffffff16815260200160c84261101c9190611dab565b815260200184815260200186815250905060007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663c04b8d59836040518263ffffffff1660e01b81526004016110889190611ccb565b602060405180830381600087803b1580156110a257600080fd5b505af11580156110b6573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110da9190611741565b90507f0a7cb8f6e1d29e616c1209a3f418c17b3a9137005377f6dd072217b1ede2573b85858360405161110f93929190611bbc565b60405180910390a1809250505060008060006101000a81548160ff021916908315150217905550949350505050565b7f000000000000000000000000000000000000000000000000000000000000000081565b6111e5846323b872dd60e01b85858560405160240161118393929190611b5c565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050611349565b50505050565b6000811480611284575060008373ffffffffffffffffffffffffffffffffffffffff1663dd62ed3e30856040518363ffffffff1660e01b8152600401611232929190611b33565b60206040518083038186803b15801561124a57600080fd5b505afa15801561125e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112829190611741565b145b6112c3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016112ba90611cab565b60405180910390fd5b6113448363095ea7b360e01b84846040516024016112e2929190611b93565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050611349565b505050565b60006113ab826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c65648152508573ffffffffffffffffffffffffffffffffffffffff166114109092919063ffffffff16565b905060008151111561140b57808060200190518101906113cb9190611714565b61140a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161140190611c8b565b60405180910390fd5b5b505050565b606061141f8484600085611428565b90509392505050565b60608247101561146d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161146490611c4b565b60405180910390fd5b6114768561153c565b6114b5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016114ac90611c6b565b60405180910390fd5b6000808673ffffffffffffffffffffffffffffffffffffffff1685876040516114de9190611aec565b60006040518083038185875af1925050503d806000811461151b576040519150601f19603f3d011682016040523d82523d6000602084013e611520565b606091505b509150915061153082828661155f565b92505050949350505050565b6000808273ffffffffffffffffffffffffffffffffffffffff163b119050919050565b6060831561156f578290506115bf565b6000835111156115825782518084602001fd5b816040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016115b69190611c29565b60405180910390fd5b9392505050565b6000813590506115d581612081565b92915050565b6000815190506115ea81612098565b92915050565b6000813590506115ff816120af565b92915050565b600081519050611614816120af565b92915050565b6000806040838503121561163157611630611f38565b5b600061163f858286016115c6565b9250506020611650858286016115f0565b9150509250929050565b6000806000806080858703121561167457611673611f38565b5b6000611682878288016115c6565b9450506020611693878288016115f0565b93505060406116a4878288016115c6565b92505060606116b5878288016115f0565b91505092959194509250565b6000806000606084860312156116da576116d9611f38565b5b60006116e8868287016115c6565b93505060206116f9868287016115f0565b925050604061170a868287016115f0565b9150509250925092565b60006020828403121561172a57611729611f38565b5b6000611738848285016115db565b91505092915050565b60006020828403121561175757611756611f38565b5b600061176584828501611605565b91505092915050565b61177781611e01565b82525050565b61178681611e01565b82525050565b61179d61179882611e01565b611ed3565b82525050565b60006117ae82611d68565b6117b88185611d7e565b93506117c8818560208601611ea0565b6117d181611f3d565b840191505092915050565b60006117e782611d68565b6117f18185611d8f565b9350611801818560208601611ea0565b80840191505092915050565b61181681611e58565b82525050565b61182581611e6a565b82525050565b600061183682611d73565b6118408185611d9a565b9350611850818560208601611ea0565b61185981611f3d565b840191505092915050565b6000611871602683611d9a565b915061187c82611f68565b604082019050919050565b6000611894600083611d8f565b915061189f82611fb7565b600082019050919050565b60006118b7601d83611d9a565b91506118c282611fba565b602082019050919050565b60006118da602a83611d9a565b91506118e582611fe3565b604082019050919050565b60006118fd603683611d9a565b915061190882612032565b604082019050919050565b600060a083016000830151848203600086015261193082826117a3565b9150506020830151611945602086018261176e565b5060408301516119586040860182611a6f565b50606083015161196b6060860182611a6f565b50608083015161197e6080860182611a6f565b508091505092915050565b610100820160008201516119a0600085018261176e565b5060208201516119b3602085018261176e565b5060408201516119c66040850182611a3a565b5060608201516119d9606085018261176e565b5060808201516119ec6080850182611a6f565b5060a08201516119ff60a0850182611a6f565b5060c0820151611a1260c0850182611a6f565b5060e0820151611a2560e0850182611a2b565b50505050565b611a3481611e1f565b82525050565b611a4381611e3f565b82525050565b611a5281611e3f565b82525050565b611a69611a6482611e3f565b611ef7565b82525050565b611a7881611e4e565b82525050565b611a8781611e4e565b82525050565b6000611a99828861178c565b601482019150611aa98287611a58565b600382019150611ab9828661178c565b601482019150611ac98285611a58565b600382019150611ad9828461178c565b6014820191508190509695505050505050565b6000611af882846117dc565b915081905092915050565b6000611b0e82611887565b9150819050919050565b6000602082019050611b2d600083018461177d565b92915050565b6000604082019050611b48600083018561177d565b611b55602083018461177d565b9392505050565b6000606082019050611b71600083018661177d565b611b7e602083018561177d565b611b8b6040830184611a7e565b949350505050565b6000604082019050611ba8600083018561177d565b611bb56020830184611a7e565b9392505050565b6000606082019050611bd1600083018661177d565b611bde6020830185611a7e565b611beb6040830184611a7e565b949350505050565b6000602082019050611c08600083018461180d565b92915050565b6000602082019050611c23600083018461181c565b92915050565b60006020820190508181036000830152611c43818461182b565b905092915050565b60006020820190508181036000830152611c6481611864565b9050919050565b60006020820190508181036000830152611c84816118aa565b9050919050565b60006020820190508181036000830152611ca4816118cd565b9050919050565b60006020820190508181036000830152611cc4816118f0565b9050919050565b60006020820190508181036000830152611ce58184611913565b905092915050565b600061010082019050611d036000830184611989565b92915050565b6000602082019050611d1e6000830184611a49565b92915050565b6000602082019050611d396000830184611a7e565b92915050565b6000604082019050611d546000830185611a7e565b611d616020830184611a7e565b9392505050565b600081519050919050565b600081519050919050565b600082825260208201905092915050565b600081905092915050565b600082825260208201905092915050565b6000611db682611e4e565b9150611dc183611e4e565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff03821115611df657611df5611f09565b5b828201905092915050565b6000611e0c82611e1f565b9050919050565b60008115159050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600062ffffff82169050919050565b6000819050919050565b6000611e6382611e7c565b9050919050565b6000611e7582611e7c565b9050919050565b6000611e8782611e8e565b9050919050565b6000611e9982611e1f565b9050919050565b60005b83811015611ebe578082015181840152602081019050611ea3565b83811115611ecd576000848401525b50505050565b6000611ede82611ee5565b9050919050565b6000611ef082611f5b565b9050919050565b6000611f0282611f4e565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b600080fd5b6000601f19601f8301169050919050565b60008160e81b9050919050565b60008160601b9050919050565b7f416464726573733a20696e73756666696369656e742062616c616e636520666f60008201527f722063616c6c0000000000000000000000000000000000000000000000000000602082015250565b50565b7f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000600082015250565b7f5361666545524332303a204552433230206f7065726174696f6e20646964206e60008201527f6f74207375636365656400000000000000000000000000000000000000000000602082015250565b7f5361666545524332303a20617070726f76652066726f6d206e6f6e2d7a65726f60008201527f20746f206e6f6e2d7a65726f20616c6c6f77616e636500000000000000000000602082015250565b61208a81611e01565b811461209557600080fd5b50565b6120a181611e13565b81146120ac57600080fd5b50565b6120b881611e4e565b81146120c357600080fd5b5056fea264697066735822122028effbcd83dac6e039c3988574ddee3db7f7c68ef58a7545ca1c974c999d8a4d64736f6c63430008070033"; type ZetaTokenConsumerUniV3ConstructorParams = | [signer?: Signer] diff --git a/packages/interfaces/typechain-types/factories/contracts/interfaces/ZetaInterfaces.sol/ZetaReceiver__factory.ts b/packages/interfaces/typechain-types/factories/contracts/interfaces/ZetaInterfaces.sol/ZetaReceiver__factory.ts index 8728bc4b..174e14a4 100644 --- a/packages/interfaces/typechain-types/factories/contracts/interfaces/ZetaInterfaces.sol/ZetaReceiver__factory.ts +++ b/packages/interfaces/typechain-types/factories/contracts/interfaces/ZetaInterfaces.sol/ZetaReceiver__factory.ts @@ -31,7 +31,7 @@ const _abi = [ }, { internalType: "uint256", - name: "zetaValueAndGas", + name: "zetaValue", type: "uint256", }, { @@ -76,7 +76,7 @@ const _abi = [ }, { internalType: "uint256", - name: "zetaValueAndGas", + name: "remainingZetaValue", type: "uint256", }, { diff --git a/packages/interfaces/typechain-types/factories/contracts/testing/ZetaInteractorMock__factory.ts b/packages/interfaces/typechain-types/factories/contracts/testing/ZetaInteractorMock__factory.ts index 74e00f03..a9079319 100644 --- a/packages/interfaces/typechain-types/factories/contracts/testing/ZetaInteractorMock__factory.ts +++ b/packages/interfaces/typechain-types/factories/contracts/testing/ZetaInteractorMock__factory.ts @@ -118,7 +118,7 @@ const _abi = [ }, { internalType: "uint256", - name: "zetaValueAndGas", + name: "zetaValue", type: "uint256", }, { @@ -163,7 +163,7 @@ const _abi = [ }, { internalType: "uint256", - name: "zetaValueAndGas", + name: "remainingZetaValue", type: "uint256", }, { @@ -236,7 +236,7 @@ const _abi = [ ]; const _bytecode = - "0x60c06040523480156200001157600080fd5b506040516200112538038062001125833981810160405281019062000037919062000182565b80620000586200004c6200009f60201b60201c565b620000a760201b60201c565b46608081815250508073ffffffffffffffffffffffffffffffffffffffff1660a08173ffffffffffffffffffffffffffffffffffffffff1660601b81525050505062000207565b600033905090565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050816000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b6000815190506200017c81620001ed565b92915050565b6000602082840312156200019b576200019a620001e8565b5b6000620001ab848285016200016b565b91505092915050565b6000620001c182620001c8565b9050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600080fd5b620001f881620001b4565b81146200020457600080fd5b50565b60805160a05160601c610eee62000237600039600081816104b801526105fd0152600061032b0152610eee6000f3fe608060405234801561001057600080fd5b50600436106100885760003560e01c8063715018a61161005b578063715018a61461011157806383f3084f1461011b5780638da5cb5b14610139578063f2fde38b1461015757610088565b80632618143f1461008d5780633749c51a146100bd5780633ff0693c146100d95780634fd3f7d7146100f5575b600080fd5b6100a760048036038101906100a29190610979565b610173565b6040516100b49190610b92565b60405180910390f35b6100d760048036038101906100d291906108e7565b610213565b005b6100f360048036038101906100ee9190610930565b6102a9565b005b61010f600480360381019061010a91906109a6565b61038a565b005b61011961042e565b005b6101236104b6565b6040516101309190610bb4565b60405180910390f35b6101416104da565b60405161014e9190610b77565b60405180910390f35b610171600480360381019061016c91906108ba565b610503565b005b6001602052806000526040600020600091509050805461019290610d73565b80601f01602080910402602001604051908101604052809291908181526020018280546101be90610d73565b801561020b5780601f106101e05761010080835404028352916020019161020b565b820191906000526020600020905b8154815290600101906020018083116101ee57829003601f168201915b505050505081565b8061021c6105fb565b60016000826020013581526020019081526020016000206040516102409190610b60565b60405180910390208180600001906102589190610c0f565b604051610266929190610b47565b6040518091039020146102a5576040517fb473eb0a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5050565b806102b26105fb565b3073ffffffffffffffffffffffffffffffffffffffff168160000160208101906102dc91906108ba565b73ffffffffffffffffffffffffffffffffffffffff1614610329576040517fc03e9c3f00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b7f0000000000000000000000000000000000000000000000000000000000000000816020013514610386576040517fc03e9c3f00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5050565b61039261068d565b73ffffffffffffffffffffffffffffffffffffffff166103b06104da565b73ffffffffffffffffffffffffffffffffffffffff1614610406576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016103fd90610bef565b60405180910390fd5b8181600160008681526020019081526020016000209190610428929190610759565b50505050565b61043661068d565b73ffffffffffffffffffffffffffffffffffffffff166104546104da565b73ffffffffffffffffffffffffffffffffffffffff16146104aa576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016104a190610bef565b60405180910390fd5b6104b46000610695565b565b7f000000000000000000000000000000000000000000000000000000000000000081565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b61050b61068d565b73ffffffffffffffffffffffffffffffffffffffff166105296104da565b73ffffffffffffffffffffffffffffffffffffffff161461057f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161057690610bef565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614156105ef576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016105e690610bcf565b60405180910390fd5b6105f881610695565b50565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461068b57336040517fcbd9d2e00000000000000000000000000000000000000000000000000000000081526004016106829190610b77565b60405180910390fd5b565b600033905090565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050816000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b82805461076590610d73565b90600052602060002090601f01602090048101928261078757600085556107ce565b82601f106107a057803560ff19168380011785556107ce565b828001600101855582156107ce579182015b828111156107cd5782358255916020019190600101906107b2565b5b5090506107db91906107df565b5090565b5b808211156107f85760008160009055506001016107e0565b5090565b60008135905061080b81610e8a565b92915050565b60008083601f84011261082757610826610dd9565b5b8235905067ffffffffffffffff81111561084457610843610dd4565b5b6020830191508360018202830111156108605761085f610ded565b5b9250929050565b600060a0828403121561087d5761087c610de3565b5b81905092915050565b600060c0828403121561089c5761089b610de3565b5b81905092915050565b6000813590506108b481610ea1565b92915050565b6000602082840312156108d0576108cf610dfc565b5b60006108de848285016107fc565b91505092915050565b6000602082840312156108fd576108fc610dfc565b5b600082013567ffffffffffffffff81111561091b5761091a610df7565b5b61092784828501610867565b91505092915050565b60006020828403121561094657610945610dfc565b5b600082013567ffffffffffffffff81111561096457610963610df7565b5b61097084828501610886565b91505092915050565b60006020828403121561098f5761098e610dfc565b5b600061099d848285016108a5565b91505092915050565b6000806000604084860312156109bf576109be610dfc565b5b60006109cd868287016108a5565b935050602084013567ffffffffffffffff8111156109ee576109ed610df7565b5b6109fa86828701610811565b92509250509250925092565b610a0f81610cbf565b82525050565b6000610a218385610ca3565b9350610a2e838584610d31565b82840190509392505050565b6000610a4582610c87565b610a4f8185610c92565b9350610a5f818560208601610d40565b610a6881610e01565b840191505092915050565b60008154610a8081610d73565b610a8a8186610ca3565b94506001821660008114610aa55760018114610ab657610ae9565b60ff19831686528186019350610ae9565b610abf85610c72565b60005b83811015610ae157815481890152600182019150602081019050610ac2565b838801955050505b50505092915050565b610afb81610cfb565b82525050565b6000610b0e602683610cae565b9150610b1982610e12565b604082019050919050565b6000610b31602083610cae565b9150610b3c82610e61565b602082019050919050565b6000610b54828486610a15565b91508190509392505050565b6000610b6c8284610a73565b915081905092915050565b6000602082019050610b8c6000830184610a06565b92915050565b60006020820190508181036000830152610bac8184610a3a565b905092915050565b6000602082019050610bc96000830184610af2565b92915050565b60006020820190508181036000830152610be881610b01565b9050919050565b60006020820190508181036000830152610c0881610b24565b9050919050565b60008083356001602003843603038112610c2c57610c2b610de8565b5b80840192508235915067ffffffffffffffff821115610c4e57610c4d610dde565b5b602083019250600182023603831315610c6a57610c69610df2565b5b509250929050565b60008190508160005260206000209050919050565b600081519050919050565b600082825260208201905092915050565b600081905092915050565b600082825260208201905092915050565b6000610cca82610cd1565b9050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b6000610d0682610d0d565b9050919050565b6000610d1882610d1f565b9050919050565b6000610d2a82610cd1565b9050919050565b82818337600083830152505050565b60005b83811015610d5e578082015181840152602081019050610d43565b83811115610d6d576000848401525b50505050565b60006002820490506001821680610d8b57607f821691505b60208210811415610d9f57610d9e610da5565b5b50919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160008201527f6464726573730000000000000000000000000000000000000000000000000000602082015250565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b610e9381610cbf565b8114610e9e57600080fd5b50565b610eaa81610cf1565b8114610eb557600080fd5b5056fea26469706673582212201411c4944e65f81c694af754f849d763a989f7c3c4b701aac94b0833e83f62b664736f6c63430008070033"; + "0x60c06040523480156200001157600080fd5b506040516200112538038062001125833981810160405281019062000037919062000182565b80620000586200004c6200009f60201b60201c565b620000a760201b60201c565b46608081815250508073ffffffffffffffffffffffffffffffffffffffff1660a08173ffffffffffffffffffffffffffffffffffffffff1660601b81525050505062000207565b600033905090565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050816000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b6000815190506200017c81620001ed565b92915050565b6000602082840312156200019b576200019a620001e8565b5b6000620001ab848285016200016b565b91505092915050565b6000620001c182620001c8565b9050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600080fd5b620001f881620001b4565b81146200020457600080fd5b50565b60805160a05160601c610eee62000237600039600081816104b801526105fd0152600061032b0152610eee6000f3fe608060405234801561001057600080fd5b50600436106100885760003560e01c8063715018a61161005b578063715018a61461011157806383f3084f1461011b5780638da5cb5b14610139578063f2fde38b1461015757610088565b80632618143f1461008d5780633749c51a146100bd5780633ff0693c146100d95780634fd3f7d7146100f5575b600080fd5b6100a760048036038101906100a29190610979565b610173565b6040516100b49190610b92565b60405180910390f35b6100d760048036038101906100d291906108e7565b610213565b005b6100f360048036038101906100ee9190610930565b6102a9565b005b61010f600480360381019061010a91906109a6565b61038a565b005b61011961042e565b005b6101236104b6565b6040516101309190610bb4565b60405180910390f35b6101416104da565b60405161014e9190610b77565b60405180910390f35b610171600480360381019061016c91906108ba565b610503565b005b6001602052806000526040600020600091509050805461019290610d73565b80601f01602080910402602001604051908101604052809291908181526020018280546101be90610d73565b801561020b5780601f106101e05761010080835404028352916020019161020b565b820191906000526020600020905b8154815290600101906020018083116101ee57829003601f168201915b505050505081565b8061021c6105fb565b60016000826020013581526020019081526020016000206040516102409190610b60565b60405180910390208180600001906102589190610c0f565b604051610266929190610b47565b6040518091039020146102a5576040517fb473eb0a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5050565b806102b26105fb565b3073ffffffffffffffffffffffffffffffffffffffff168160000160208101906102dc91906108ba565b73ffffffffffffffffffffffffffffffffffffffff1614610329576040517fc03e9c3f00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b7f0000000000000000000000000000000000000000000000000000000000000000816020013514610386576040517fc03e9c3f00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5050565b61039261068d565b73ffffffffffffffffffffffffffffffffffffffff166103b06104da565b73ffffffffffffffffffffffffffffffffffffffff1614610406576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016103fd90610bef565b60405180910390fd5b8181600160008681526020019081526020016000209190610428929190610759565b50505050565b61043661068d565b73ffffffffffffffffffffffffffffffffffffffff166104546104da565b73ffffffffffffffffffffffffffffffffffffffff16146104aa576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016104a190610bef565b60405180910390fd5b6104b46000610695565b565b7f000000000000000000000000000000000000000000000000000000000000000081565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b61050b61068d565b73ffffffffffffffffffffffffffffffffffffffff166105296104da565b73ffffffffffffffffffffffffffffffffffffffff161461057f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161057690610bef565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614156105ef576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016105e690610bcf565b60405180910390fd5b6105f881610695565b50565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461068b57336040517fcbd9d2e00000000000000000000000000000000000000000000000000000000081526004016106829190610b77565b60405180910390fd5b565b600033905090565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050816000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b82805461076590610d73565b90600052602060002090601f01602090048101928261078757600085556107ce565b82601f106107a057803560ff19168380011785556107ce565b828001600101855582156107ce579182015b828111156107cd5782358255916020019190600101906107b2565b5b5090506107db91906107df565b5090565b5b808211156107f85760008160009055506001016107e0565b5090565b60008135905061080b81610e8a565b92915050565b60008083601f84011261082757610826610dd9565b5b8235905067ffffffffffffffff81111561084457610843610dd4565b5b6020830191508360018202830111156108605761085f610ded565b5b9250929050565b600060a0828403121561087d5761087c610de3565b5b81905092915050565b600060c0828403121561089c5761089b610de3565b5b81905092915050565b6000813590506108b481610ea1565b92915050565b6000602082840312156108d0576108cf610dfc565b5b60006108de848285016107fc565b91505092915050565b6000602082840312156108fd576108fc610dfc565b5b600082013567ffffffffffffffff81111561091b5761091a610df7565b5b61092784828501610867565b91505092915050565b60006020828403121561094657610945610dfc565b5b600082013567ffffffffffffffff81111561096457610963610df7565b5b61097084828501610886565b91505092915050565b60006020828403121561098f5761098e610dfc565b5b600061099d848285016108a5565b91505092915050565b6000806000604084860312156109bf576109be610dfc565b5b60006109cd868287016108a5565b935050602084013567ffffffffffffffff8111156109ee576109ed610df7565b5b6109fa86828701610811565b92509250509250925092565b610a0f81610cbf565b82525050565b6000610a218385610ca3565b9350610a2e838584610d31565b82840190509392505050565b6000610a4582610c87565b610a4f8185610c92565b9350610a5f818560208601610d40565b610a6881610e01565b840191505092915050565b60008154610a8081610d73565b610a8a8186610ca3565b94506001821660008114610aa55760018114610ab657610ae9565b60ff19831686528186019350610ae9565b610abf85610c72565b60005b83811015610ae157815481890152600182019150602081019050610ac2565b838801955050505b50505092915050565b610afb81610cfb565b82525050565b6000610b0e602683610cae565b9150610b1982610e12565b604082019050919050565b6000610b31602083610cae565b9150610b3c82610e61565b602082019050919050565b6000610b54828486610a15565b91508190509392505050565b6000610b6c8284610a73565b915081905092915050565b6000602082019050610b8c6000830184610a06565b92915050565b60006020820190508181036000830152610bac8184610a3a565b905092915050565b6000602082019050610bc96000830184610af2565b92915050565b60006020820190508181036000830152610be881610b01565b9050919050565b60006020820190508181036000830152610c0881610b24565b9050919050565b60008083356001602003843603038112610c2c57610c2b610de8565b5b80840192508235915067ffffffffffffffff821115610c4e57610c4d610dde565b5b602083019250600182023603831315610c6a57610c69610df2565b5b509250929050565b60008190508160005260206000209050919050565b600081519050919050565b600082825260208201905092915050565b600081905092915050565b600082825260208201905092915050565b6000610cca82610cd1565b9050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b6000610d0682610d0d565b9050919050565b6000610d1882610d1f565b9050919050565b6000610d2a82610cd1565b9050919050565b82818337600083830152505050565b60005b83811015610d5e578082015181840152602081019050610d43565b83811115610d6d576000848401525b50505050565b60006002820490506001821680610d8b57607f821691505b60208210811415610d9f57610d9e610da5565b5b50919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160008201527f6464726573730000000000000000000000000000000000000000000000000000602082015250565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b610e9381610cbf565b8114610e9e57600080fd5b50565b610eaa81610cf1565b8114610eb557600080fd5b5056fea264697066735822122028d663348b87973bc380b1f3d98c4ef89817d84be8e00d9c2b177f549b9b710064736f6c63430008070033"; type ZetaInteractorMockConstructorParams = | [signer?: Signer] diff --git a/packages/interfaces/typechain-types/factories/contracts/testing/ZetaReceiverMock__factory.ts b/packages/interfaces/typechain-types/factories/contracts/testing/ZetaReceiverMock__factory.ts index 027c8d79..c576a897 100644 --- a/packages/interfaces/typechain-types/factories/contracts/testing/ZetaReceiverMock__factory.ts +++ b/packages/interfaces/typechain-types/factories/contracts/testing/ZetaReceiverMock__factory.ts @@ -56,7 +56,7 @@ const _abi = [ }, { internalType: "uint256", - name: "zetaValueAndGas", + name: "zetaValue", type: "uint256", }, { @@ -101,7 +101,7 @@ const _abi = [ }, { internalType: "uint256", - name: "zetaValueAndGas", + name: "remainingZetaValue", type: "uint256", }, { @@ -123,7 +123,7 @@ const _abi = [ ]; const _bytecode = - "0x608060405234801561001057600080fd5b506102d5806100206000396000f3fe608060405234801561001057600080fd5b50600436106100365760003560e01c80633749c51a1461003b5780633ff0693c14610057575b600080fd5b6100556004803603810190610050919061018b565b610073565b005b610071600480360381019061006c91906101d4565b6100bf565b005b7f72a301dee3abcbe15615f3e253229bf4b4f508460603d674991c9a777b833c6e8160400160208101906100a7919061015e565b6040516100b4919061022c565b60405180910390a150565b7f53bd04e26f94f13ff43da96839541821041c309c6f624712192cbe3a2d133cc48160000160208101906100f3919061015e565b604051610100919061022c565b60405180910390a150565b60008135905061011a81610288565b92915050565b600060a0828403121561013657610135610279565b5b81905092915050565b600060c0828403121561015557610154610279565b5b81905092915050565b60006020828403121561017457610173610283565b5b60006101828482850161010b565b91505092915050565b6000602082840312156101a1576101a0610283565b5b600082013567ffffffffffffffff8111156101bf576101be61027e565b5b6101cb84828501610120565b91505092915050565b6000602082840312156101ea576101e9610283565b5b600082013567ffffffffffffffff8111156102085761020761027e565b5b6102148482850161013f565b91505092915050565b61022681610247565b82525050565b6000602082019050610241600083018461021d565b92915050565b600061025282610259565b9050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600080fd5b600080fd5b600080fd5b61029181610247565b811461029c57600080fd5b5056fea2646970667358221220d1b60770b2d262931f3d7b6d53cd5f22b109db1486d0c8448bd985887ef13d1e64736f6c63430008070033"; + "0x608060405234801561001057600080fd5b506102d5806100206000396000f3fe608060405234801561001057600080fd5b50600436106100365760003560e01c80633749c51a1461003b5780633ff0693c14610057575b600080fd5b6100556004803603810190610050919061018b565b610073565b005b610071600480360381019061006c91906101d4565b6100bf565b005b7f72a301dee3abcbe15615f3e253229bf4b4f508460603d674991c9a777b833c6e8160400160208101906100a7919061015e565b6040516100b4919061022c565b60405180910390a150565b7f53bd04e26f94f13ff43da96839541821041c309c6f624712192cbe3a2d133cc48160000160208101906100f3919061015e565b604051610100919061022c565b60405180910390a150565b60008135905061011a81610288565b92915050565b600060a0828403121561013657610135610279565b5b81905092915050565b600060c0828403121561015557610154610279565b5b81905092915050565b60006020828403121561017457610173610283565b5b60006101828482850161010b565b91505092915050565b6000602082840312156101a1576101a0610283565b5b600082013567ffffffffffffffff8111156101bf576101be61027e565b5b6101cb84828501610120565b91505092915050565b6000602082840312156101ea576101e9610283565b5b600082013567ffffffffffffffff8111156102085761020761027e565b5b6102148482850161013f565b91505092915050565b61022681610247565b82525050565b6000602082019050610241600083018461021d565b92915050565b600061025282610259565b9050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600080fd5b600080fd5b600080fd5b61029181610247565b811461029c57600080fd5b5056fea264697066735822122006f6a029b94ae14786eef98c35ac2ac751827442e3de0bc5d526a58c71a198c264736f6c63430008070033"; type ZetaReceiverMockConstructorParams = | [signer?: Signer] diff --git a/packages/protocol-contracts/.env.example b/packages/protocol-contracts/.env.example index 1ebf3512..a7a45554 100644 --- a/packages/protocol-contracts/.env.example +++ b/packages/protocol-contracts/.env.example @@ -12,3 +12,6 @@ POYLGONSCAN_API_KEY= # BSC BSCSCAN_API_KEY= + +# Deployer address. This is needed to calculate salt in deterministic deployments +DEPLOYER_ADDRESS= \ No newline at end of file diff --git a/packages/protocol-contracts/lib/ImmutableCreate2Factory/ImmutableCreate2Factory.helpers.ts b/packages/protocol-contracts/lib/ImmutableCreate2Factory/ImmutableCreate2Factory.helpers.ts index efb3aa38..98e9f50c 100644 --- a/packages/protocol-contracts/lib/ImmutableCreate2Factory/ImmutableCreate2Factory.helpers.ts +++ b/packages/protocol-contracts/lib/ImmutableCreate2Factory/ImmutableCreate2Factory.helpers.ts @@ -60,10 +60,6 @@ export async function deployContractToAddress({ }); const result = await tx.wait(); - const addr = result.logs[0].address; - - assert.strictEqual(addr, computedAddr); - return { address: computedAddr as string, receipt: result as TransactionReceipt, diff --git a/packages/protocol-contracts/lib/contracts.constants.ts b/packages/protocol-contracts/lib/contracts.constants.ts index ce9e7983..a773fdd1 100644 --- a/packages/protocol-contracts/lib/contracts.constants.ts +++ b/packages/protocol-contracts/lib/contracts.constants.ts @@ -1 +1,13 @@ export const ZETA_INITIAL_SUPPLY = 2_100_000_000; + +export const MAX_ETH_ADDRESS = "0xffffffffffffffffffffffffffffffffffffffff"; + +// dev: this values should be calculated using get-salt script +export const ZETA_TOKEN_SALT_NUMBER_ETH = "38208"; +export const ZETA_TOKEN_SALT_NUMBER_NON_ETH = "29411"; + +// dev: this values should be calculated using get-salt script +export const ZETA_CONNECTOR_SALT_NUMBER_ETH = "62538"; +export const ZETA_CONNECTOR_SALT_NUMBER_NON_ETH = "4945"; + +export const ZETA_CONSUMER_SALT_NUMBER = "0"; diff --git a/packages/protocol-contracts/scripts/deterministic-deploy-zeta-connector.ts b/packages/protocol-contracts/scripts/deterministic-deploy-zeta-connector.ts new file mode 100644 index 00000000..3e414b57 --- /dev/null +++ b/packages/protocol-contracts/scripts/deterministic-deploy-zeta-connector.ts @@ -0,0 +1,62 @@ +import { getAddress, isNetworkName } from "@zetachain/addresses"; +import { saveAddress } from "@zetachain/addresses-tools"; +import { ZetaConnectorEth__factory, ZetaConnectorNonEth__factory } from "@zetachain/interfaces/typechain-types"; +import { BigNumber } from "ethers"; +import { ethers, network } from "hardhat"; + +import { ZETA_CONNECTOR_SALT_NUMBER_ETH, ZETA_CONNECTOR_SALT_NUMBER_NON_ETH } from "../lib/contracts.constants"; +import { isEthNetworkName } from "../lib/contracts.helpers"; +import { deployContractToAddress, saltToHex } from "../lib/ImmutableCreate2Factory/ImmutableCreate2Factory.helpers"; + +const DEPLOYER_ADDRESS = process.env.DEPLOYER_ADDRESS ?? ""; + +export async function deterministicDeployZetaConnector() { + if (!isNetworkName(network.name)) { + throw new Error(`network.name: ${network.name} isn't supported.`); + } + + const accounts = await ethers.getSigners(); + const [signer] = accounts; + + const saltNumber = isEthNetworkName(network.name) + ? ZETA_CONNECTOR_SALT_NUMBER_ETH + : ZETA_CONNECTOR_SALT_NUMBER_NON_ETH; + const saltStr = BigNumber.from(saltNumber).toHexString(); + + const zetaToken = getAddress("zetaToken"); + const tss = getAddress("tss"); + const tssUpdater = getAddress("tssUpdater"); + const immutableCreate2Factory = getAddress("immutableCreate2Factory"); + + const salthex = saltToHex(saltStr, DEPLOYER_ADDRESS); + const constructorTypes = ["address", "address", "address", "address"]; + const constructorArgs = [zetaToken, tss, tssUpdater, tssUpdater]; + + let contractBytecode; + if (isEthNetworkName(network.name)) { + contractBytecode = ZetaConnectorEth__factory.bytecode; + } else { + contractBytecode = ZetaConnectorNonEth__factory.bytecode; + } + + const { address } = await deployContractToAddress({ + constructorArgs, + constructorTypes, + contractBytecode, + factoryAddress: immutableCreate2Factory, + salt: salthex, + signer, + }); + + saveAddress("connector", address); + console.log("Deployed ZetaConnector. Address:", address); +} + +if (!process.env.EXECUTE_PROGRAMMATICALLY) { + deterministicDeployZetaConnector() + .then(() => process.exit(0)) + .catch((error) => { + console.error(error); + process.exit(1); + }); +} diff --git a/packages/protocol-contracts/scripts/deterministic-deploy-zeta-consumer.ts b/packages/protocol-contracts/scripts/deterministic-deploy-zeta-consumer.ts new file mode 100644 index 00000000..1675c737 --- /dev/null +++ b/packages/protocol-contracts/scripts/deterministic-deploy-zeta-consumer.ts @@ -0,0 +1,54 @@ +import { getAddress, isNetworkName } from "@zetachain/addresses"; +import { saveAddress } from "@zetachain/addresses-tools"; +import { ZetaTokenConsumerUniV2__factory } from "@zetachain/interfaces/typechain-types"; +import { BigNumber } from "ethers"; +import { ethers, network } from "hardhat"; + +import { ZETA_CONSUMER_SALT_NUMBER } from "../lib/contracts.constants"; +import { deployContractToAddress, saltToHex } from "../lib/ImmutableCreate2Factory/ImmutableCreate2Factory.helpers"; + +const DEPLOYER_ADDRESS = process.env.DEPLOYER_ADDRESS ?? ""; + +export async function deterministicDeployZetaConsumer() { + if (!isNetworkName(network.name)) { + throw new Error(`network.name: ${network.name} isn't supported.`); + } + + const accounts = await ethers.getSigners(); + const [signer] = accounts; + + const saltNumber = ZETA_CONSUMER_SALT_NUMBER; + const saltStr = BigNumber.from(saltNumber).toHexString(); + + const zetaToken = getAddress("zetaToken"); + const uniswapV2Router02 = getAddress("uniswapV2Router02"); + + const immutableCreate2Factory = getAddress("immutableCreate2Factory"); + + const salthex = saltToHex(saltStr, DEPLOYER_ADDRESS); + const constructorTypes = ["address", "address"]; + const constructorArgs = [zetaToken, uniswapV2Router02]; + + const contractBytecode = ZetaTokenConsumerUniV2__factory.bytecode; + + const { address } = await deployContractToAddress({ + constructorArgs, + constructorTypes, + contractBytecode, + factoryAddress: immutableCreate2Factory, + salt: salthex, + signer, + }); + + saveAddress("zetaTokenConsumerUniV2", address); + console.log("Deployed ZetaConsumer. Address:", address); +} + +if (!process.env.EXECUTE_PROGRAMMATICALLY) { + deterministicDeployZetaConsumer() + .then(() => process.exit(0)) + .catch((error) => { + console.error(error); + process.exit(1); + }); +} diff --git a/packages/protocol-contracts/scripts/deterministic-deploy-zeta-token.ts b/packages/protocol-contracts/scripts/deterministic-deploy-zeta-token.ts new file mode 100644 index 00000000..d48c29ca --- /dev/null +++ b/packages/protocol-contracts/scripts/deterministic-deploy-zeta-token.ts @@ -0,0 +1,68 @@ +import { getAddress, isNetworkName } from "@zetachain/addresses"; +import { saveAddress } from "@zetachain/addresses-tools"; +import { ZetaEth__factory, ZetaNonEth__factory } from "@zetachain/interfaces/typechain-types"; +import { BigNumber } from "ethers"; +import { ethers, network } from "hardhat"; + +import { + ZETA_INITIAL_SUPPLY, + ZETA_TOKEN_SALT_NUMBER_ETH, + ZETA_TOKEN_SALT_NUMBER_NON_ETH, +} from "../lib/contracts.constants"; +import { isEthNetworkName } from "../lib/contracts.helpers"; +import { deployContractToAddress, saltToHex } from "../lib/ImmutableCreate2Factory/ImmutableCreate2Factory.helpers"; + +const DEPLOYER_ADDRESS = process.env.DEPLOYER_ADDRESS ?? ""; + +export async function deterministicDeployZetaToken() { + if (!isNetworkName(network.name)) { + throw new Error(`network.name: ${network.name} isn't supported.`); + } + + const accounts = await ethers.getSigners(); + const [signer] = accounts; + + const saltNumber = isEthNetworkName(network.name) ? ZETA_TOKEN_SALT_NUMBER_ETH : ZETA_TOKEN_SALT_NUMBER_NON_ETH; + const saltStr = BigNumber.from(saltNumber).toHexString(); + + const tss = getAddress("tss"); + const tssUpdater = getAddress("tssUpdater"); + const immutableCreate2Factory = getAddress("immutableCreate2Factory"); + + const salthex = saltToHex(saltStr, DEPLOYER_ADDRESS); + + let constructorTypes; + let constructorArgs; + let contractBytecode; + + if (isEthNetworkName(network.name)) { + constructorTypes = ["uint256"]; + constructorArgs = [ZETA_INITIAL_SUPPLY.toString()]; + contractBytecode = ZetaEth__factory.bytecode; + } else { + constructorTypes = ["address", "address"]; + constructorArgs = [tss, tssUpdater]; + contractBytecode = ZetaNonEth__factory.bytecode; + } + + const { address } = await deployContractToAddress({ + constructorArgs, + constructorTypes, + contractBytecode, + factoryAddress: immutableCreate2Factory, + salt: salthex, + signer, + }); + + saveAddress("zetaToken", address); + console.log("Deployed zetaToken. Address:", address); +} + +if (!process.env.EXECUTE_PROGRAMMATICALLY) { + deterministicDeployZetaToken() + .then(() => process.exit(0)) + .catch((error) => { + console.error(error); + process.exit(1); + }); +} diff --git a/packages/protocol-contracts/scripts/deterministic-deploy.helpers.ts b/packages/protocol-contracts/scripts/deterministic-deploy.helpers.ts new file mode 100644 index 00000000..d6526c52 --- /dev/null +++ b/packages/protocol-contracts/scripts/deterministic-deploy.helpers.ts @@ -0,0 +1,42 @@ +import { getAddress } from "@zetachain/addresses"; +import { BigNumber } from "ethers"; + +import { MAX_ETH_ADDRESS } from "../lib/contracts.constants"; +import { + buildBytecode, + buildCreate2Address, + saltToHex, +} from "../lib/ImmutableCreate2Factory/ImmutableCreate2Factory.helpers"; + +export const calculateBestSalt = async ( + maxIterations: BigNumber, + deployerAddress: string, + constructorTypes: string[], + constructorArgs: string[], + contractBytecode: string +) => { + const immutableCreate2Factory = getAddress("immutableCreate2Factory"); + + let minAddress = MAX_ETH_ADDRESS; + let minAddressSalt = ""; + let minIndex = BigNumber.from(0); + + for (let i = BigNumber.from(0); i.lt(maxIterations); i = i.add(BigNumber.from(1))) { + const saltStr = i.toHexString(); + const salthex = saltToHex(saltStr, deployerAddress); + + const bytecode = buildBytecode(constructorTypes, constructorArgs, contractBytecode); + const expectedAddress = buildCreate2Address(salthex, bytecode, immutableCreate2Factory); + if (expectedAddress < minAddress) { + minAddress = expectedAddress; + minAddressSalt = saltStr; + minIndex = i; + console.log(minAddress, minAddressSalt, i.toString()); + } + if (i.mod(10000).isZero()) { + console.log("step", i.toString()); + } + } + + console.log(minAddress, minAddressSalt, minIndex.toString()); +}; diff --git a/packages/protocol-contracts/scripts/deterministic-get-salt-zeta-connector.ts b/packages/protocol-contracts/scripts/deterministic-get-salt-zeta-connector.ts new file mode 100644 index 00000000..5207415d --- /dev/null +++ b/packages/protocol-contracts/scripts/deterministic-get-salt-zeta-connector.ts @@ -0,0 +1,43 @@ +import { getAddress, isNetworkName } from "@zetachain/addresses"; +import { ZetaConnectorEth__factory, ZetaConnectorNonEth__factory } from "@zetachain/interfaces/typechain-types"; +import { BigNumber } from "ethers"; +import { network } from "hardhat"; + +import { isEthNetworkName } from "../lib/contracts.helpers"; +import { calculateBestSalt } from "./deterministic-deploy.helpers"; + +const MAX_ITERATIONS = BigNumber.from(100000); +const DEPLOYER_ADDRESS = process.env.DEPLOYER_ADDRESS ?? ""; + +export async function deterministicDeployGetSaltZetaConnector() { + if (!isNetworkName(network.name)) { + throw new Error(`network.name: ${network.name} isn't supported.`); + } + + const zetaToken = getAddress("zetaToken"); + const tss = getAddress("tss"); + const tssUpdater = getAddress("tssUpdater"); + + // @todo: decide which address use as pauser + const constructorTypes = ["address", "address", "address", "address"]; + const constructorArgs = [zetaToken, tss, tssUpdater, tssUpdater]; + + let contractBytecode; + + if (isEthNetworkName(network.name)) { + contractBytecode = ZetaConnectorEth__factory.bytecode; + } else { + contractBytecode = ZetaConnectorNonEth__factory.bytecode; + } + + calculateBestSalt(MAX_ITERATIONS, DEPLOYER_ADDRESS, constructorTypes, constructorArgs, contractBytecode); +} + +if (!process.env.EXECUTE_PROGRAMMATICALLY) { + deterministicDeployGetSaltZetaConnector() + .then(() => process.exit(0)) + .catch((error) => { + console.error(error); + process.exit(1); + }); +} diff --git a/packages/protocol-contracts/scripts/deterministic-get-salt-zeta-token.ts b/packages/protocol-contracts/scripts/deterministic-get-salt-zeta-token.ts new file mode 100644 index 00000000..c6542d19 --- /dev/null +++ b/packages/protocol-contracts/scripts/deterministic-get-salt-zeta-token.ts @@ -0,0 +1,45 @@ +import { getAddress, isNetworkName } from "@zetachain/addresses"; +import { ZetaEth__factory, ZetaNonEth__factory } from "@zetachain/interfaces/typechain-types"; +import { BigNumber } from "ethers"; +import { network } from "hardhat"; + +import { ZETA_INITIAL_SUPPLY } from "../lib/contracts.constants"; +import { isEthNetworkName } from "../lib/contracts.helpers"; +import { calculateBestSalt } from "./deterministic-deploy.helpers"; + +const MAX_ITERATIONS = BigNumber.from(100000); +const DEPLOYER_ADDRESS = process.env.DEPLOYER_ADDRESS ?? ""; + +export async function deterministicDeployGetSaltZetaToken() { + if (!isNetworkName(network.name)) { + throw new Error(`network.name: ${network.name} isn't supported.`); + } + + const tss = getAddress("tss"); + const tssUpdater = getAddress("tssUpdater"); + + let constructorTypes; + let constructorArgs; + let contractBytecode; + + if (isEthNetworkName(network.name)) { + constructorTypes = ["uint256"]; + constructorArgs = [ZETA_INITIAL_SUPPLY.toString()]; + contractBytecode = ZetaEth__factory.bytecode; + } else { + constructorTypes = ["address", "address"]; + constructorArgs = [tss, tssUpdater]; + contractBytecode = ZetaNonEth__factory.bytecode; + } + + calculateBestSalt(MAX_ITERATIONS, DEPLOYER_ADDRESS, constructorTypes, constructorArgs, contractBytecode); +} + +if (!process.env.EXECUTE_PROGRAMMATICALLY) { + deterministicDeployGetSaltZetaToken() + .then(() => process.exit(0)) + .catch((error) => { + console.error(error); + process.exit(1); + }); +} diff --git a/packages/protocol-contracts/test/ImmutableCreate2Factory.spec.ts b/packages/protocol-contracts/test/ImmutableCreate2Factory.spec.ts index ce95647b..f3225399 100644 --- a/packages/protocol-contracts/test/ImmutableCreate2Factory.spec.ts +++ b/packages/protocol-contracts/test/ImmutableCreate2Factory.spec.ts @@ -9,6 +9,7 @@ import chai, { expect } from "chai"; import { parseEther } from "ethers/lib/utils"; import { ethers } from "hardhat"; +import { MAX_ETH_ADDRESS } from "../lib/contracts.constants"; import { buildBytecode, buildCreate2Address, @@ -68,7 +69,7 @@ describe("Deterministic deployment tests", () => { it("Should deploy with leading zeros", async () => { let saltStr = "0"; - let minAddress = "0xfffffffffff"; + let minAddress = MAX_ETH_ADDRESS; let minAddressSalt = ""; for (let i = 0; i < 300; i++) { const salthex = saltToHex(saltStr, signer.address); diff --git a/yarn.lock b/yarn.lock index 4cc2b689..5f5a602f 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2452,6 +2452,7 @@ __metadata: "@uniswap/v2-periphery": 1.1.0-beta.0 "@zetachain/addresses": "workspace:^" "@zetachain/addresses-tools": "workspace:^" + "@zetachain/interfaces": "workspace:^" "@zetachain/protocol-contracts": "workspace:^" ethers: 5.6.8 hardhat-gas-reporter: ^1.0.8 From 1c03730be80c47f0f35bad5a9618a33da6770b73 Mon Sep 17 00:00:00 2001 From: Andres Martin Aiello <50411235+andresaiello@users.noreply.github.com> Date: Tue, 9 Aug 2022 11:15:56 -0300 Subject: [PATCH 035/115] Update npm address pkg (#41) --- packages/addresses/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/addresses/package.json b/packages/addresses/package.json index f108ef00..b6b22216 100644 --- a/packages/addresses/package.json +++ b/packages/addresses/package.json @@ -1,6 +1,6 @@ { "name": "@zetachain/addresses", - "version": "0.0.3", + "version": "0.0.4", "license": "MIT", "author": "zetachain", "publishConfig": { From cc3bbc1444640310506b7ac12c16e5f24de5fd12 Mon Sep 17 00:00:00 2001 From: Andres Martin Aiello <50411235+andresaiello@users.noreply.github.com> Date: Thu, 1 Sep 2022 15:36:29 -0300 Subject: [PATCH 036/115] Add klaytn to supported networks (#45) --- .../addresses-tools/src/addresses.helpers.ts | 26 ++++++++------- packages/addresses-tools/src/networks.ts | 14 ++++++++ packages/addresses/src/addresses.helpers.ts | 23 +++++++------ .../lib/shared/network.constants.ts | 32 +++++++++++++------ 4 files changed, 64 insertions(+), 31 deletions(-) diff --git a/packages/addresses-tools/src/addresses.helpers.ts b/packages/addresses-tools/src/addresses.helpers.ts index bef782ee..217266e8 100644 --- a/packages/addresses-tools/src/addresses.helpers.ts +++ b/packages/addresses-tools/src/addresses.helpers.ts @@ -19,7 +19,7 @@ import { ZetaLocalNetworkName, ZetaMainnetNetworkName, ZetaNetworkName, - ZetaTestnetNetworkName, + ZetaTestnetNetworkName } from "@zetachain/addresses"; import dotenv from "dotenv"; import { readdirSync, readFileSync, writeFileSync } from "fs"; @@ -45,9 +45,11 @@ export const getScanVariable = ({ customNetworkName }: { customNetworkName?: str "eth-mainnet": process.env.ETHERSCAN_API_KEY || "", goerli: process.env.ETHERSCAN_API_KEY || "", hardhat: "", + "klaytn-baobab": "", + "klaytn-cypress": "", "polygon-localnet": "", "polygon-mumbai": process.env.POLYGONSCAN_API_KEY || "", - ropsten: process.env.ETHERSCAN_API_KEY || "", + ropsten: process.env.ETHERSCAN_API_KEY || "" }; return v[networkName]; @@ -65,9 +67,11 @@ export const getExplorerUrl = ({ customNetworkName }: { customNetworkName?: stri "eth-mainnet": "https://etherscan.io/", goerli: "https://goerli.etherscan.io/", hardhat: "", + "klaytn-baobab": "https://baobab.scope.klaytn.com/", + "klaytn-cypress": "https://scope.klaytn.com/", "polygon-localnet": "", "polygon-mumbai": "https://mumbai.polygonscan.com/", - ropsten: "https://ropsten.etherscan.io/", + ropsten: "https://ropsten.etherscan.io/" }; return v[networkName]; @@ -135,12 +139,12 @@ export const addNewAddress = (addressName: string, addressValue: string = "") => const addressesDirname = join(dirname, `./`); const addressesFiles = readdirSync(addressesDirname); - addressesFiles.forEach((addressesFilename) => { + addressesFiles.forEach(addressesFilename => { const addressPath = join(addressesDirname, addressesFilename); const addressesByNetwork = JSON.parse(readFileSync(addressPath, "utf8")); - Object.keys(addressesByNetwork).forEach((network) => { + Object.keys(addressesByNetwork).forEach(network => { if (!isNetworkName(network)) return; addressesByNetwork[network][addressName] = addressValue; @@ -163,7 +167,7 @@ export const addNewNetwork = (newNetworkName: string, addTo: ZetaNetworkName[]) const addressesDirname = join(dirname, `./`); const addressesFiles = readdirSync(addressesDirname); - addressesFiles.forEach((addressFilename) => { + addressesFiles.forEach(addressFilename => { const addressesFilePath = join(addressesDirname, addressFilename); /** * Gets the Zeta network name using the filename, e.g.: addresses.athens.json -> athens @@ -188,7 +192,7 @@ export const addNewNetwork = (newNetworkName: string, addTo: ZetaNetworkName[]) fileNetworks[newNetworkName] = deepCloneSerializable(fileNetworks[randomNetworkName]); const emptyNewNetworkAddresses = () => { - Object.keys(fileNetworks[newNetworkName]).forEach((addressName) => { + Object.keys(fileNetworks[newNetworkName]).forEach(addressName => { fileNetworks[newNetworkName][addressName] = ""; }); }; @@ -213,21 +217,21 @@ export const addNewNetwork = (newNetworkName: string, addTo: ZetaNetworkName[]) export const getLocalnetListFromFile = async (): Promise> => { const troy = await require("./addresses.troy.json"); return { - troy: troy as LocalnetAddressGroup, + troy: troy as LocalnetAddressGroup }; }; export const getTestnetListFromFile = async (): Promise> => { const athens = await require("./addresses.athens.json"); return { - athens: athens as TestnetAddressGroup, + athens: athens as TestnetAddressGroup }; }; export const getMainnetListFromFile = async (): Promise> => { const mainnet = await require("./addresses.mainnet.json"); return { - mainnet: mainnet as MainnetAddressGroup, + mainnet: mainnet as MainnetAddressGroup }; }; @@ -235,7 +239,7 @@ export const loadAddressFromFile = async ( address: ZetaAddress, { customNetworkName, - customZetaNetwork, + customZetaNetwork }: { customNetworkName?: NetworkName; customZetaNetwork?: ZetaNetworkName } = {} ): Promise => { const { name: _networkName } = network; diff --git a/packages/addresses-tools/src/networks.ts b/packages/addresses-tools/src/networks.ts index 1810f8ae..a1c1f2e2 100644 --- a/packages/addresses-tools/src/networks.ts +++ b/packages/addresses-tools/src/networks.ts @@ -34,6 +34,20 @@ export const getHardhatConfigNetworks = (PRIVATE_KEYS: string[]): NetworksUserCo url: `https://eth-mainnet.alchemyapi.io/v2/${process.env.ALCHEMY_API_KEY}`, }, }, + "klaytn-baobab": { + accounts: PRIVATE_KEYS, + chainId: 1001, + gas: 2100000, + gasPrice: 8000000000, + url: "https://api.baobab.klaytn.net:8651" + }, + "klaytn-cypress": { + accounts: PRIVATE_KEYS, + chainId: 8217, + gas: 2100000, + gasPrice: 8000000000, + url: "https://scope.klaytn.com/" + }, "polygon-localnet": { gas: 5000000, gasPrice: 80000000000, diff --git a/packages/addresses/src/addresses.helpers.ts b/packages/addresses/src/addresses.helpers.ts index 725dac23..66af2063 100644 --- a/packages/addresses/src/addresses.helpers.ts +++ b/packages/addresses/src/addresses.helpers.ts @@ -43,7 +43,7 @@ const zetaAddresses: Record = { usdc: true, weth9: true, zetaToken: true, - zetaTokenConsumerUniV2: true, + zetaTokenConsumerUniV2: true }; export const isZetaAddress = (a: string | undefined): a is ZetaAddress => Boolean(zetaAddresses[a as ZetaAddress]); @@ -64,42 +64,43 @@ export const isZetaLocalnet = (networkName: string | undefined): networkName is networkName === "troy"; export const getLocalnetList = (): Record => ({ - troy: troy as LocalnetAddressGroup, + troy: troy as LocalnetAddressGroup }); /** * @description Testnet */ -export type TestnetNetworkName = "bsc-testnet" | "goerli" | "polygon-mumbai" | "ropsten"; +export type TestnetNetworkName = "bsc-testnet" | "goerli" | "klaytn-baobab" | "polygon-mumbai" | "ropsten"; export type ZetaTestnetNetworkName = "athens"; export type TestnetAddressGroup = Record; export const isTestnetNetworkName = (networkName: string): networkName is TestnetNetworkName => networkName === "goerli" || networkName === "bsc-testnet" || networkName === "polygon-mumbai" || - networkName === "ropsten"; + networkName === "ropsten" || + networkName === "klaytn-baobab"; export const isZetaTestnet = (networkName: string | undefined): networkName is ZetaTestnetNetworkName => networkName === "athens"; export const getTestnetList = (): Record => ({ - athens: athens as TestnetAddressGroup, + athens: athens as TestnetAddressGroup }); /** * @description Mainnet */ -export type MainnetNetworkName = "eth-mainnet"; +export type MainnetNetworkName = "eth-mainnet" | "klaytn-cypress"; export type ZetaMainnetNetworkName = "mainnet"; export type MainnetAddressGroup = Record; export const isMainnetNetworkName = (networkName: string): networkName is MainnetNetworkName => - networkName === "eth-mainnet"; + networkName === "eth-mainnet" || networkName === "klaytn-cypress"; export const isZetaMainnet = (networkName: string | undefined): networkName is ZetaMainnetNetworkName => networkName === "mainnet"; export const getMainnetList = (): Record => ({ - mainnet: mainnet as MainnetAddressGroup, + mainnet: mainnet as MainnetAddressGroup }); /** @@ -117,9 +118,11 @@ export const getChainId = (networkName: NetworkName) => { "eth-mainnet": 1, goerli: 5, hardhat: 1337, + "klaytn-baobab": 1001, + "klaytn-cypress": 8217, "polygon-localnet": 80001, "polygon-mumbai": 80001, - ropsten: 3, + ropsten: 3 }; return chainIds[networkName]; @@ -139,7 +142,7 @@ export const getAddress = ( address: ZetaAddress, { customNetworkName, - customZetaNetwork, + customZetaNetwork }: { customNetworkName?: NetworkName; customZetaNetwork?: ZetaNetworkName } = {} ): string => { const { name: _networkName } = network; diff --git a/packages/example-contracts/lib/shared/network.constants.ts b/packages/example-contracts/lib/shared/network.constants.ts index c9567edd..1d15dc90 100644 --- a/packages/example-contracts/lib/shared/network.constants.ts +++ b/packages/example-contracts/lib/shared/network.constants.ts @@ -14,56 +14,68 @@ export const networkVariables: Record = { chainId: 0, connectorAddress: "", crossChainId: 0, - crossChainName: "", + crossChainName: "" }, "bsc-testnet": { chainId: 97, connectorAddress: "0xE626402550fB921E4a47c11568F89dF3496fbEF0", crossChainId: 5, - crossChainName: "goerli", + crossChainName: "goerli" }, "eth-localnet": { chainId: 0, connectorAddress: "", crossChainId: 0, - crossChainName: "", + crossChainName: "" }, "eth-mainnet": { chainId: 0, connectorAddress: "", crossChainId: 0, - crossChainName: "", + crossChainName: "" }, goerli: { chainId: 5, connectorAddress: "0x68Bc806414e743D88436AEB771Be387A55B4df70", crossChainId: 97, - crossChainName: "bsc-testnet", + crossChainName: "bsc-testnet" }, hardhat: { chainId: 0, connectorAddress: "", crossChainId: 0, - crossChainName: "", + crossChainName: "" + }, + "klaytn-baobab": { + chainId: 0, + connectorAddress: "", + crossChainId: 0, + crossChainName: "" + }, + "klaytn-cypress": { + chainId: 0, + connectorAddress: "", + crossChainId: 0, + crossChainName: "" }, "polygon-localnet": { chainId: 0, connectorAddress: "", crossChainId: 0, - crossChainName: "", + crossChainName: "" }, "polygon-mumbai": { chainId: 0, connectorAddress: "", crossChainId: 0, - crossChainName: "", + crossChainName: "" }, ropsten: { chainId: 0, connectorAddress: "", crossChainId: 0, - crossChainName: "", - }, + crossChainName: "" + } }; export const isNetworkName = (str: string): str is NetworkName => str in networkVariables; From fbc563d6109e9fc7a3acd26a4d280becd6cd44a6 Mon Sep 17 00:00:00 2001 From: Andres Martin Aiello <50411235+andresaiello@users.noreply.github.com> Date: Wed, 7 Sep 2022 12:54:53 -0300 Subject: [PATCH 037/115] Fix npm packages to be used externally (#47) * Fix npm packages to be used in external * add babel and type files * update readme file * Update packages/addresses/README.md Co-authored-by: Lucas * Update packages/addresses/README.md Co-authored-by: Lucas * update readme * move to vite * update version * Update packages/addresses/.npmignore Co-authored-by: Lucas * Update packages/addresses/.npmignore Co-authored-by: Lucas * Update packages/addresses/tsconfig.json Co-authored-by: Lucas * update errors * Update packages/addresses/package.json Co-authored-by: Lucas Co-authored-by: Lucas --- packages/addresses/.npmignore | 24 + packages/addresses/README.md | 23 + packages/addresses/hardhat.config.ts | 5 - packages/addresses/package.json | 22 +- packages/addresses/src/addresses.helpers.ts | 54 +- packages/addresses/tsconfig.json | 15 + packages/addresses/vite.config.js | 20 + .../CrossChainWarriors.helpers.ts | 8 +- .../MultiChainValue.helpers.ts | 8 +- .../lib/shared/address.helpers.ts | 23 + .../lib/shared/deploy.helpers.ts | 19 +- .../scripts/add-liquidity-uniswap-v2.ts | 8 +- .../deterministic-deploy.ts | 7 +- .../set-cross-chain-data.ts | 6 +- .../cross-chain-warriors/verify-contract.ts | 6 +- .../deploy-multi-chain-swap.ts | 7 +- .../multi-chain-swap/deterministic-deploy.ts | 7 +- .../multi-chain-swap/do-cross-chain-swap.ts | 9 +- .../multi-chain-swap/set-cross-chain-data.ts | 9 +- .../multi-chain-swap/verify-contract.ts | 7 +- .../scripts/multi-chain-value/deploy.ts | 13 +- .../multi-chain-value/deterministic-deploy.ts | 7 +- .../scripts/multi-chain-value/send-value.ts | 5 +- .../multi-chain-value/verify-contract.ts | 7 +- .../test/CrossChainMessage.spec.ts | 14 +- .../test/CrossChainWarriors.spec.ts | 18 +- .../test/MultiChainSwap.spec.ts | 50 +- .../example-contracts/test/test.helpers.ts | 14 +- .../protocol-contracts/lib/address.helpers.ts | 23 + .../scripts/deploy-zeta-connector.ts | 9 +- .../scripts/deploy-zeta-token.ts | 9 +- .../deterministic-deploy-zeta-connector.ts | 7 +- .../deterministic-deploy-zeta-consumer.ts | 7 +- .../deterministic-deploy-zeta-token.ts | 9 +- .../scripts/deterministic-deploy.helpers.ts | 4 +- .../deterministic-get-salt-zeta-connector.ts | 5 +- .../deterministic-get-salt-zeta-token.ts | 5 +- .../scripts/send-tss-gas.ts | 8 +- .../scripts/set-zeta-token-addresses.ts | 6 +- .../scripts/test-zeta-send.ts | 8 +- .../scripts/token-approval.ts | 5 +- .../scripts/update-tss-address.ts | 5 +- .../scripts/verify-contracts.ts | 12 +- .../test/ZetaTokenConsumer.spec.ts | 40 +- yarn.lock | 646 +++++++++++++++++- 45 files changed, 1007 insertions(+), 216 deletions(-) create mode 100644 packages/addresses/.npmignore delete mode 100644 packages/addresses/hardhat.config.ts create mode 100644 packages/addresses/tsconfig.json create mode 100644 packages/addresses/vite.config.js create mode 100644 packages/example-contracts/lib/shared/address.helpers.ts create mode 100644 packages/protocol-contracts/lib/address.helpers.ts diff --git a/packages/addresses/.npmignore b/packages/addresses/.npmignore new file mode 100644 index 00000000..25f62ead --- /dev/null +++ b/packages/addresses/.npmignore @@ -0,0 +1,24 @@ +# source code +src +index.html + +# compiler +tsconfig.json + +# files +*.log +cypress.json +*.code-workspace + +# tests +test + +# lint +.eslintrc.js +.prettierrc + +# IDE - VSCode +.vscode + +# git +.git \ No newline at end of file diff --git a/packages/addresses/README.md b/packages/addresses/README.md index 8a9d13a1..8a0e5cae 100644 --- a/packages/addresses/README.md +++ b/packages/addresses/README.md @@ -1,3 +1,26 @@ # ZetaChain addresses This package includes the addresses and networks to use Zetachain. + +## Usage + +```js +import { getAddress } from "@zetachain/addresses"; + +const address = getAddress({ address: "zetaToken", networkName: "goerli", zetaNetwork:"athens" }); +``` + +## API + + +| Method | Description | +| :---- | ------ | +| isTestnetNetworkName = (networkName: string): networkName is TestnetNetworkName | Returns true if it's a valid Testnet name | +| isZetaTestnet = (networkName: string): networkName is ZetaTestnetNetworkName | Returns true if it's a valid ZetaTestnet name | +| isMainnetNetworkName = (networkName: string): networkName is MainnetNetworkName | Returns true if it's a valid Mainnet name | +| isNetworkName = (networkName: string): networkName is NetworkName | Returns true if it's a valid network name | +| isZetaNetworkName = (networkName: string): networkName is ZetaNetworkName | Returns true if it's a valid Zeta network name | +| type ZetaAddress | Valid values for ZetaAddress | +| getAddress = ({ address: ZetaAddress; networkName: string; zetaNetwork: string; }): string | Returns the address of a valid ZetaAddress | + +``` \ No newline at end of file diff --git a/packages/addresses/hardhat.config.ts b/packages/addresses/hardhat.config.ts deleted file mode 100644 index a3b8359f..00000000 --- a/packages/addresses/hardhat.config.ts +++ /dev/null @@ -1,5 +0,0 @@ -import { HardhatUserConfig } from "hardhat/types"; - -const config: HardhatUserConfig = {}; - -export default config; diff --git a/packages/addresses/package.json b/packages/addresses/package.json index b6b22216..728c5a71 100644 --- a/packages/addresses/package.json +++ b/packages/addresses/package.json @@ -1,14 +1,30 @@ { "name": "@zetachain/addresses", - "version": "0.0.4", + "version": "0.0.8", "license": "MIT", "author": "zetachain", "publishConfig": { "access": "public", "registry": "https://registry.npmjs.org/" }, - "main": "src/index.ts", + "main": "./dist/zetachain-addresses.umd.js", + "module": "./dist/zetachain-addresses.mjs", + "types": "./dist/index.d.ts", + "files": [ + "dist" + ], + "exports": { + ".": { + "import": "./dist/zetachain-addresses.mjs", + "require": "./dist/zetachain-addresses.umd.js" + } + }, "scripts": { - "tsc:watch": "npx tsc --watch" + "tsc:watch": "npx tsc --watch", + "prepublishOnly": "vite build" + }, + "devDependencies": { + "vite": "^3.1.0", + "vite-plugin-dts": "^1.4.1" } } diff --git a/packages/addresses/src/addresses.helpers.ts b/packages/addresses/src/addresses.helpers.ts index 66af2063..7efc4a44 100644 --- a/packages/addresses/src/addresses.helpers.ts +++ b/packages/addresses/src/addresses.helpers.ts @@ -1,5 +1,3 @@ -import { network } from "hardhat"; - import athens from "./addresses.athens.json"; import mainnet from "./addresses.mainnet.json"; import troy from "./addresses.troy.json"; @@ -134,38 +132,34 @@ export const isNetworkName = (str: string): str is NetworkName => export const isZetaNetworkName = (str: string): str is ZetaNetworkName => isZetaLocalnet(str) || isZetaTestnet(str) || isZetaMainnet(str); -const MissingZetaNetworkError = new Error( - "ZETA_NETWORK is not defined, please set the environment variable (e.g.: ZETA_NETWORK=athens )" -); - -export const getAddress = ( - address: ZetaAddress, - { - customNetworkName, - customZetaNetwork - }: { customNetworkName?: NetworkName; customZetaNetwork?: ZetaNetworkName } = {} -): string => { - const { name: _networkName } = network; - const networkName = customNetworkName || _networkName; - - const { ZETA_NETWORK: _ZETA_NETWORK } = process.env; - const ZETA_NETWORK = customZetaNetwork || _ZETA_NETWORK; - - if (!ZETA_NETWORK) throw MissingZetaNetworkError; - - console.log(`Getting ${address} address from ${ZETA_NETWORK}: ${networkName}.`); - - if (isZetaLocalnet(ZETA_NETWORK) && isLocalNetworkName(networkName)) { - return getLocalnetList()[ZETA_NETWORK][networkName][address]; +const getInvalidNetworkError = (network: string, isZeta: boolean) => + new Error(`Network: ${network} is invalid${isZeta ? " ZetaNetwork" : ""}, please provide a valid value`); + +export const getAddress = ({ + address, + networkName, + zetaNetwork +}: { + address: ZetaAddress; + networkName: string; + zetaNetwork: string; +}): string => { + if (!isNetworkName(networkName)) throw getInvalidNetworkError(networkName, false); + if (!isZetaNetworkName(zetaNetwork)) throw getInvalidNetworkError(networkName, true); + + console.log(`Getting ${address} address from ${zetaNetwork}: ${networkName}.`); + + if (isZetaLocalnet(zetaNetwork) && isLocalNetworkName(networkName)) { + return getLocalnetList()[zetaNetwork][networkName][address]; } - if (isZetaTestnet(ZETA_NETWORK) && isTestnetNetworkName(networkName)) { - return getTestnetList()[ZETA_NETWORK][networkName][address]; + if (isZetaTestnet(zetaNetwork) && isTestnetNetworkName(networkName)) { + return getTestnetList()[zetaNetwork][networkName][address]; } - if (isZetaMainnet(ZETA_NETWORK) && isMainnetNetworkName(networkName)) { - return getMainnetList()[ZETA_NETWORK][networkName][address]; + if (isZetaMainnet(zetaNetwork) && isMainnetNetworkName(networkName)) { + return getMainnetList()[zetaNetwork][networkName][address]; } - throw new Error(`Invalid ZETA_NETWORK + network combination ${ZETA_NETWORK} ${networkName}.`); + throw new Error(`Invalid ZETA_NETWORK + network combination ${zetaNetwork} ${networkName}.`); }; diff --git a/packages/addresses/tsconfig.json b/packages/addresses/tsconfig.json new file mode 100644 index 00000000..f063f923 --- /dev/null +++ b/packages/addresses/tsconfig.json @@ -0,0 +1,15 @@ +{ + "compilerOptions": { + "typeRoots": ["@types", "./node_modules/@types"], + "target": "es6", + "noImplicitAny": true, + "moduleResolution": "node", + "sourceMap": false, + "outDir": "dist", + "esModuleInterop": true, + "baseUrl": "./", + "declaration": true, + "module": "commonjs", + "resolveJsonModule": true, + } +} diff --git a/packages/addresses/vite.config.js b/packages/addresses/vite.config.js new file mode 100644 index 00000000..2b07be2d --- /dev/null +++ b/packages/addresses/vite.config.js @@ -0,0 +1,20 @@ +// vite.config.js +import { resolve } from "path"; +import { defineConfig } from "vite"; +import dts from "vite-plugin-dts"; + +export default defineConfig({ + build: { + lib: { + entry: resolve(__dirname, "./src/index.ts"), + // the proper extensions will be added + fileName: "zetachain-addresses", + name: "ZetachainAddresses" + } + }, + plugins: [ + dts({ + insertTypesEntry: true + }) + ] +}); diff --git a/packages/example-contracts/lib/cross-chain-warriors/CrossChainWarriors.helpers.ts b/packages/example-contracts/lib/cross-chain-warriors/CrossChainWarriors.helpers.ts index 991276be..fecdd595 100644 --- a/packages/example-contracts/lib/cross-chain-warriors/CrossChainWarriors.helpers.ts +++ b/packages/example-contracts/lib/cross-chain-warriors/CrossChainWarriors.helpers.ts @@ -1,4 +1,3 @@ -import { getAddress } from "@zetachain/addresses"; import assert from "assert"; import { ContractFactory } from "ethers"; import { ethers, network } from "hardhat"; @@ -9,8 +8,9 @@ import { CrossChainWarriorsMock, CrossChainWarriorsMock__factory as CrossChainWarriorsMockFactory, CrossChainWarriorsZetaConnectorMock, - CrossChainWarriorsZetaConnectorMock__factory as CrossChainWarriorsZetaConnectorMockFactory, + CrossChainWarriorsZetaConnectorMock__factory as CrossChainWarriorsZetaConnectorMockFactory } from "../../typechain-types"; +import { getAddress } from "../shared/address.helpers"; import { isNetworkName } from "../shared/network.constants"; export type GetContractParams = @@ -30,7 +30,7 @@ export const deployCrossChainWarriorsMock = async ({ customUseEven, zetaConnectorMockAddress, zetaTokenMockAddress, - zetaTokenConsumerAddress, + zetaTokenConsumerAddress }: { customUseEven: boolean; zetaConnectorMockAddress: string; @@ -61,7 +61,7 @@ export const getCrossChainWarriorsArgs = (): [string, string, string, boolean] = getAddress("connector"), getAddress("zetaToken"), getAddress("zetaTokenConsumerUniV2"), - network.name === "goerli", + network.name === "goerli" ]; export const getCrossChainWarriors = async (existingContractAddress?: string) => { diff --git a/packages/example-contracts/lib/multi-chain-value/MultiChainValue.helpers.ts b/packages/example-contracts/lib/multi-chain-value/MultiChainValue.helpers.ts index 3776ab28..43daf6f9 100644 --- a/packages/example-contracts/lib/multi-chain-value/MultiChainValue.helpers.ts +++ b/packages/example-contracts/lib/multi-chain-value/MultiChainValue.helpers.ts @@ -1,4 +1,3 @@ -import { getAddress } from "@zetachain/addresses"; import { ZetaEth, ZetaEth__factory as ZetaEthFactory } from "@zetachain/interfaces/typechain-types"; import assert from "assert"; import { ethers, network } from "hardhat"; @@ -10,15 +9,16 @@ import { MultiChainValueMock, MultiChainValueMock__factory as MultiChainValueMockFactory, ZetaConnectorMockValue, - ZetaConnectorMockValue__factory as ZetaConnectorMockValueFactory, + ZetaConnectorMockValue__factory as ZetaConnectorMockValueFactory } from "../../typechain-types"; +import { getAddress } from "../shared/address.helpers"; /** * @description only for testing or local environment */ export const deployMultiChainValueMock = async ({ zetaConnectorMockAddress, - zetaTokenMockAddress, + zetaTokenMockAddress }: { zetaConnectorMockAddress: string; zetaTokenMockAddress: string; @@ -44,7 +44,7 @@ export const getMultiChainValue = (existingContractAddress?: string) => contractName: "MultiChainValue", ...(existingContractAddress ? { existingContractAddress } - : { deployParams: [getAddress("connector"), getAddress("zetaToken")] }), + : { deployParams: [getAddress("connector"), getAddress("zetaToken")] }) }); export const deployZetaConnectorMock = async () => { diff --git a/packages/example-contracts/lib/shared/address.helpers.ts b/packages/example-contracts/lib/shared/address.helpers.ts new file mode 100644 index 00000000..d6c498f2 --- /dev/null +++ b/packages/example-contracts/lib/shared/address.helpers.ts @@ -0,0 +1,23 @@ +import { getAddress as getAddressLib, NetworkName, ZetaAddress, ZetaNetworkName } from "@zetachain/addresses"; +import { network } from "hardhat"; + +const MissingZetaNetworkError = new Error( + "ZETA_NETWORK is not defined, please set the environment variable (e.g.: ZETA_NETWORK=athens )" +); + +export const getAddress = ( + address: ZetaAddress, + { + customNetworkName, + customZetaNetwork + }: { customNetworkName?: NetworkName; customZetaNetwork?: ZetaNetworkName } = {} +): string => { + const { name: _networkName } = network; + const networkName = customNetworkName || _networkName; + + const { ZETA_NETWORK: _ZETA_NETWORK } = process.env; + const zetaNetwork = customZetaNetwork || _ZETA_NETWORK; + + if (!zetaNetwork) throw MissingZetaNetworkError; + return getAddressLib({ address, networkName, zetaNetwork }); +}; diff --git a/packages/example-contracts/lib/shared/deploy.helpers.ts b/packages/example-contracts/lib/shared/deploy.helpers.ts index e1cc9778..7e78ddf2 100644 --- a/packages/example-contracts/lib/shared/deploy.helpers.ts +++ b/packages/example-contracts/lib/shared/deploy.helpers.ts @@ -1,4 +1,4 @@ -import { getAddress, NetworkName, ZetaAddress, ZetaNetworkName } from "@zetachain/addresses"; +import { NetworkName, ZetaAddress, ZetaNetworkName } from "@zetachain/addresses"; import { getScanVariable } from "@zetachain/addresses-tools"; import { execSync } from "child_process"; import { BaseContract, ContractFactory } from "ethers"; @@ -12,8 +12,9 @@ import { ZetaEthMock, ZetaEthMock__factory as ZetaEthMockFactory, ZetaTokenConsumerUniV2, - ZetaTokenConsumerUniV2__factory, + ZetaTokenConsumerUniV2__factory } from "../../typechain-types"; +import { getAddress } from "../shared/address.helpers"; export type GetContractParams = | { @@ -28,7 +29,7 @@ export type GetContractParams = export const getContract = async ({ contractName, deployParams, - existingContractAddress, + existingContractAddress }: GetContractParams & { contractName: string }): Promise => { const ContractFactory = (await ethers.getContractFactory(contractName)) as Factory; @@ -47,13 +48,13 @@ export const getContract = async getContract({ contractName: "ERC20", - ...(existingContractAddress ? { existingContractAddress } : { deployParams: ["ERC20Mock", "ERC20Mock"] }), + ...(existingContractAddress ? { existingContractAddress } : { deployParams: ["ERC20Mock", "ERC20Mock"] }) }); export const getZetaMock = async () => getContract({ contractName: "ZetaEthMock", - deployParams: ["10000000"], + deployParams: ["10000000"] }); export const getNow = async () => { @@ -66,15 +67,15 @@ export const getUniswapV2Router02 = async () => contractName: "UniswapV2Router02", existingContractAddress: getAddress("uniswapV2Router02", { customNetworkName: "eth-mainnet", - customZetaNetwork: "mainnet", - }), + customZetaNetwork: "mainnet" + }) }); export const verifyContract = ( addressName: ZetaAddress, { customNetworkName, - customZetaNetwork, + customZetaNetwork }: { customNetworkName?: NetworkName; customZetaNetwork?: ZetaNetworkName } = {} ) => { const ZETA_NETWORK = process.env.ZETA_NETWORK || customZetaNetwork; @@ -91,5 +92,5 @@ export const verifyContract = ( export const deployZetaTokenConsumerUniV2 = async (zetaToken_: string, uniswapV2Router_: string) => getContract({ contractName: "ZetaTokenConsumerUniV2", - ...{ deployParams: [zetaToken_, uniswapV2Router_] }, + ...{ deployParams: [zetaToken_, uniswapV2Router_] } }); diff --git a/packages/example-contracts/scripts/add-liquidity-uniswap-v2.ts b/packages/example-contracts/scripts/add-liquidity-uniswap-v2.ts index 136fabc8..668b423e 100644 --- a/packages/example-contracts/scripts/add-liquidity-uniswap-v2.ts +++ b/packages/example-contracts/scripts/add-liquidity-uniswap-v2.ts @@ -1,10 +1,10 @@ import { MaxUint256 } from "@ethersproject/constants"; import { parseUnits } from "@ethersproject/units"; import { SignerWithAddress } from "@nomiclabs/hardhat-ethers/signers"; -import { getAddress } from "@zetachain/addresses"; import { BigNumber } from "ethers"; import { ethers } from "hardhat"; +import { getAddress } from "../lib/shared/address.helpers"; import { getContract } from "../lib/shared/deploy.helpers"; import { ERC20__factory, @@ -12,7 +12,7 @@ import { IUniswapV2Pair__factory, IUniswapV2Router02, UniswapV2Router02, - UniswapV2Router02__factory, + UniswapV2Router02__factory } from "../typechain-types"; const UNISWAP_FACTORY_ADDRESS = "0xb7926c0430afb07aa7defde6da862ae0bde767bc"; @@ -88,7 +88,7 @@ const estimateEthForZeta = async ( export const getUniswapV2Router02 = async () => getContract({ contractName: "UniswapV2Router02", - existingContractAddress: getAddress("uniswapV2Router02"), + existingContractAddress: getAddress("uniswapV2Router02") }); async function main() { @@ -108,7 +108,7 @@ async function main() { main() .then(() => process.exit(0)) - .catch((error) => { + .catch(error => { console.error(error); process.exit(1); }); diff --git a/packages/example-contracts/scripts/cross-chain-warriors/deterministic-deploy.ts b/packages/example-contracts/scripts/cross-chain-warriors/deterministic-deploy.ts index b4207774..ccb4a045 100644 --- a/packages/example-contracts/scripts/cross-chain-warriors/deterministic-deploy.ts +++ b/packages/example-contracts/scripts/cross-chain-warriors/deterministic-deploy.ts @@ -1,8 +1,9 @@ -import { getAddress, isNetworkName } from "@zetachain/addresses"; +import { isNetworkName } from "@zetachain/addresses"; import { saveAddress } from "@zetachain/addresses-tools"; import { BigNumber } from "ethers"; import { ethers, network } from "hardhat"; +import { getAddress } from "../../lib/shared/address.helpers"; import { deployContractToAddress, saltToHex } from "../../lib/shared/ImmutableCreate2Factory.helpers"; import { isEthNetworkName } from "../../lib/shared/network.constants"; import { CrossChainWarriors__factory } from "../../typechain-types"; @@ -41,7 +42,7 @@ export async function deterministicDeployCrossChainNft() { contractBytecode, factoryAddress: immutableCreate2Factory, salt: salthex, - signer, + signer }); saveAddress("crossChainNft", address); @@ -51,7 +52,7 @@ export async function deterministicDeployCrossChainNft() { if (!process.env.EXECUTE_PROGRAMMATICALLY) { deterministicDeployCrossChainNft() .then(() => process.exit(0)) - .catch((error) => { + .catch(error => { console.error(error); process.exit(1); }); diff --git a/packages/example-contracts/scripts/cross-chain-warriors/set-cross-chain-data.ts b/packages/example-contracts/scripts/cross-chain-warriors/set-cross-chain-data.ts index 5a3759c9..fa10c9de 100644 --- a/packages/example-contracts/scripts/cross-chain-warriors/set-cross-chain-data.ts +++ b/packages/example-contracts/scripts/cross-chain-warriors/set-cross-chain-data.ts @@ -1,7 +1,7 @@ -import { getAddress } from "@zetachain/addresses"; import { ethers, network } from "hardhat"; import { getCrossChainWarriors } from "../../lib/cross-chain-warriors/CrossChainWarriors.helpers"; +import { getAddress } from "../../lib/shared/address.helpers"; import { isNetworkName, networkVariables } from "../../lib/shared/network.constants"; async function main() { @@ -16,7 +16,7 @@ async function main() { if (_networkVariables.crossChainName === "") throw new Error("Invalid crossChainName"); const crossChainAddress = getAddress("crossChainNft", { - customNetworkName: _networkVariables.crossChainName, + customNetworkName: _networkVariables.crossChainName }); const encodedCrossChainAddress = ethers.utils.solidityPack(["address"], [crossChainAddress]); @@ -28,7 +28,7 @@ async function main() { ).wait(); } -main().catch((error) => { +main().catch(error => { console.error(error); process.exit(1); }); diff --git a/packages/example-contracts/scripts/cross-chain-warriors/verify-contract.ts b/packages/example-contracts/scripts/cross-chain-warriors/verify-contract.ts index 9dda0f43..2c33ee86 100644 --- a/packages/example-contracts/scripts/cross-chain-warriors/verify-contract.ts +++ b/packages/example-contracts/scripts/cross-chain-warriors/verify-contract.ts @@ -1,18 +1,18 @@ -import { getAddress } from "@zetachain/addresses"; import hardhat from "hardhat"; import { getCrossChainWarriorsArgs } from "../../lib/cross-chain-warriors/CrossChainWarriors.helpers"; +import { getAddress } from "../../lib/shared/address.helpers"; async function main() { await hardhat.run("verify:verify", { address: getAddress("crossChainNft"), - constructorArguments: getCrossChainWarriorsArgs(), + constructorArguments: getCrossChainWarriorsArgs() }); } main() .then(() => process.exit(0)) - .catch((error) => { + .catch(error => { console.error(error); process.exit(1); }); diff --git a/packages/example-contracts/scripts/multi-chain-swap/deploy-multi-chain-swap.ts b/packages/example-contracts/scripts/multi-chain-swap/deploy-multi-chain-swap.ts index e2e3fa74..a6304a49 100644 --- a/packages/example-contracts/scripts/multi-chain-swap/deploy-multi-chain-swap.ts +++ b/packages/example-contracts/scripts/multi-chain-swap/deploy-multi-chain-swap.ts @@ -1,21 +1,22 @@ -import { getAddress, isNetworkName } from "@zetachain/addresses"; +import { isNetworkName } from "@zetachain/addresses"; import { saveAddress } from "@zetachain/addresses-tools"; import { network } from "hardhat"; import { getMultiChainSwapBase } from "../../lib/multi-chain-swap/MultiChainSwap.helpers"; +import { getAddress } from "../../lib/shared/address.helpers"; export async function deployMultiChainSwap() { if (!isNetworkName(network.name) || !network.name) throw new Error("Invalid network name"); const multiChainSwapContract = await getMultiChainSwapBase({ - deployParams: [getAddress("connector"), getAddress("zetaToken"), getAddress("uniswapV2Router02")], + deployParams: [getAddress("connector"), getAddress("zetaToken"), getAddress("uniswapV2Router02")] }); saveAddress("multiChainSwap", multiChainSwapContract.address); } if (!process.env.EXECUTE_PROGRAMMATICALLY) { - deployMultiChainSwap().catch((error) => { + deployMultiChainSwap().catch(error => { console.error(error); process.exit(1); }); diff --git a/packages/example-contracts/scripts/multi-chain-swap/deterministic-deploy.ts b/packages/example-contracts/scripts/multi-chain-swap/deterministic-deploy.ts index d3f549a4..e0548606 100644 --- a/packages/example-contracts/scripts/multi-chain-swap/deterministic-deploy.ts +++ b/packages/example-contracts/scripts/multi-chain-swap/deterministic-deploy.ts @@ -1,8 +1,9 @@ -import { getAddress, isNetworkName } from "@zetachain/addresses"; +import { isNetworkName } from "@zetachain/addresses"; import { saveAddress } from "@zetachain/addresses-tools"; import { BigNumber } from "ethers"; import { ethers, network } from "hardhat"; +import { getAddress } from "../../lib/shared/address.helpers"; import { deployContractToAddress, saltToHex } from "../../lib/shared/ImmutableCreate2Factory.helpers"; import { isEthNetworkName } from "../../lib/shared/network.constants"; import { MultiChainSwapBase__factory } from "../../typechain-types"; @@ -41,7 +42,7 @@ export async function deterministicDeployMultiChainSwap() { contractBytecode, factoryAddress: immutableCreate2Factory, salt: salthex, - signer, + signer }); saveAddress("multiChainSwap", address); @@ -51,7 +52,7 @@ export async function deterministicDeployMultiChainSwap() { if (!process.env.EXECUTE_PROGRAMMATICALLY) { deterministicDeployMultiChainSwap() .then(() => process.exit(0)) - .catch((error) => { + .catch(error => { console.error(error); process.exit(1); }); diff --git a/packages/example-contracts/scripts/multi-chain-swap/do-cross-chain-swap.ts b/packages/example-contracts/scripts/multi-chain-swap/do-cross-chain-swap.ts index 792403ca..2216292e 100644 --- a/packages/example-contracts/scripts/multi-chain-swap/do-cross-chain-swap.ts +++ b/packages/example-contracts/scripts/multi-chain-swap/do-cross-chain-swap.ts @@ -1,8 +1,9 @@ -import { getAddress, isNetworkName } from "@zetachain/addresses"; +import { isNetworkName } from "@zetachain/addresses"; import { parseUnits } from "ethers/lib/utils"; import { ethers, network } from "hardhat"; import { getMultiChainSwapBase } from "../../lib/multi-chain-swap/MultiChainSwap.helpers"; +import { getAddress } from "../../lib/shared/address.helpers"; import { networkVariables } from "../../lib/shared/network.constants"; export async function doCrossChainSwap() { @@ -13,7 +14,7 @@ export async function doCrossChainSwap() { if (!_networkVariables.crossChainName) throw new Error("Invalid crossChainName"); const multiChainSwapContract = await getMultiChainSwapBase({ - existingContractAddress: getAddress("multiChainSwap"), + existingContractAddress: getAddress("multiChainSwap") }); const [account1] = await ethers.getSigners(); @@ -27,14 +28,14 @@ export async function doCrossChainSwap() { _networkVariables.crossChainId, 1_000_000, { - value: parseUnits("1"), + value: parseUnits("1") } ) ).wait(); } if (!process.env.EXECUTE_PROGRAMMATICALLY) { - doCrossChainSwap().catch((error) => { + doCrossChainSwap().catch(error => { console.error(error); process.exit(1); }); diff --git a/packages/example-contracts/scripts/multi-chain-swap/set-cross-chain-data.ts b/packages/example-contracts/scripts/multi-chain-swap/set-cross-chain-data.ts index 0f34912c..0e7aeeb2 100644 --- a/packages/example-contracts/scripts/multi-chain-swap/set-cross-chain-data.ts +++ b/packages/example-contracts/scripts/multi-chain-swap/set-cross-chain-data.ts @@ -1,7 +1,8 @@ -import { getAddress, isNetworkName } from "@zetachain/addresses"; +import { isNetworkName } from "@zetachain/addresses"; import { ethers, network } from "hardhat"; import { getMultiChainSwapBase } from "../../lib/multi-chain-swap/MultiChainSwap.helpers"; +import { getAddress } from "../../lib/shared/address.helpers"; import { networkVariables } from "../../lib/shared/network.constants"; export async function setMultiChainSwapCrossChainData() { @@ -14,11 +15,11 @@ export async function setMultiChainSwapCrossChainData() { const crossChainMultiChainSwapAddress = getAddress("multiChainSwap"); const crossChainMultiChainSwapContract = await getMultiChainSwapBase({ - existingContractAddress: crossChainMultiChainSwapAddress, + existingContractAddress: crossChainMultiChainSwapAddress }); const crossChainAddress = getAddress("multiChainSwap", { - customNetworkName: _networkVariables.crossChainName, + customNetworkName: _networkVariables.crossChainName }); const encodedCrossChainAddress = ethers.utils.solidityPack(["address"], [crossChainAddress]); @@ -39,7 +40,7 @@ export async function setMultiChainSwapCrossChainData() { } if (!process.env.EXECUTE_PROGRAMMATICALLY) { - setMultiChainSwapCrossChainData().catch((error) => { + setMultiChainSwapCrossChainData().catch(error => { console.error(error); process.exit(1); }); diff --git a/packages/example-contracts/scripts/multi-chain-swap/verify-contract.ts b/packages/example-contracts/scripts/multi-chain-swap/verify-contract.ts index 0768eae7..0db23288 100644 --- a/packages/example-contracts/scripts/multi-chain-swap/verify-contract.ts +++ b/packages/example-contracts/scripts/multi-chain-swap/verify-contract.ts @@ -1,16 +1,17 @@ -import { getAddress } from "@zetachain/addresses"; import hardhat from "hardhat"; +import { getAddress } from "../../lib/shared/address.helpers"; + async function main() { await hardhat.run("verify:verify", { address: getAddress("multiChainSwap"), - constructorArguments: [getAddress("connector"), getAddress("zetaToken"), getAddress("uniswapV2Router02")], + constructorArguments: [getAddress("connector"), getAddress("zetaToken"), getAddress("uniswapV2Router02")] }); } main() .then(() => process.exit(0)) - .catch((error) => { + .catch(error => { console.error(error); process.exit(1); }); diff --git a/packages/example-contracts/scripts/multi-chain-value/deploy.ts b/packages/example-contracts/scripts/multi-chain-value/deploy.ts index ee1c8ce0..fa8c33eb 100644 --- a/packages/example-contracts/scripts/multi-chain-value/deploy.ts +++ b/packages/example-contracts/scripts/multi-chain-value/deploy.ts @@ -1,8 +1,9 @@ -import { getAddress, getChainId, isNetworkName, isZetaTestnet } from "@zetachain/addresses"; +import { getChainId, isNetworkName, isZetaTestnet } from "@zetachain/addresses"; import { saveAddress } from "@zetachain/addresses-tools"; import { network } from "hardhat"; import { getMultiChainValue } from "../../lib/multi-chain-value/MultiChainValue.helpers"; +import { getAddress } from "../../lib/shared/address.helpers"; const networkName = network.name; const { ZETA_NETWORK } = process.env; @@ -16,28 +17,28 @@ async function main() { networkName !== "goerli" && (await (await multiChainValueContract.addAvailableChainId(getChainId("goerli"))) .wait() - .catch((e) => console.error(e))); + .catch(e => console.error(e))); networkName !== "polygon-mumbai" && (await (await multiChainValueContract.addAvailableChainId(getChainId("polygon-mumbai"))) .wait() - .catch((e) => console.error(e))); + .catch(e => console.error(e))); networkName !== "bsc-testnet" && (await (await multiChainValueContract.addAvailableChainId(getChainId("bsc-testnet"))) .wait() - .catch((e) => console.error(e))); + .catch(e => console.error(e))); networkName !== "ropsten" && (await (await multiChainValueContract.addAvailableChainId(getChainId("ropsten"))) .wait() - .catch((e) => console.error(e))); + .catch(e => console.error(e))); } saveAddress("multiChainValue", multiChainValueContract.address); } -main().catch((error) => { +main().catch(error => { console.error(error); process.exit(1); }); diff --git a/packages/example-contracts/scripts/multi-chain-value/deterministic-deploy.ts b/packages/example-contracts/scripts/multi-chain-value/deterministic-deploy.ts index 4b39431e..3e6e4e9a 100644 --- a/packages/example-contracts/scripts/multi-chain-value/deterministic-deploy.ts +++ b/packages/example-contracts/scripts/multi-chain-value/deterministic-deploy.ts @@ -1,8 +1,9 @@ -import { getAddress, isNetworkName } from "@zetachain/addresses"; +import { isNetworkName } from "@zetachain/addresses"; import { saveAddress } from "@zetachain/addresses-tools"; import { BigNumber } from "ethers"; import { ethers, network } from "hardhat"; +import { getAddress } from "../../lib/shared/address.helpers"; import { deployContractToAddress, saltToHex } from "../../lib/shared/ImmutableCreate2Factory.helpers"; import { MultiChainValue__factory } from "../typechain-types"; @@ -38,7 +39,7 @@ export async function deterministicDeployMultiChainValue() { contractBytecode, factoryAddress: immutableCreate2Factory, salt: salthex, - signer, + signer }); saveAddress("multiChainValue", address); @@ -48,7 +49,7 @@ export async function deterministicDeployMultiChainValue() { if (!process.env.EXECUTE_PROGRAMMATICALLY) { deterministicDeployMultiChainValue() .then(() => process.exit(0)) - .catch((error) => { + .catch(error => { console.error(error); process.exit(1); }); diff --git a/packages/example-contracts/scripts/multi-chain-value/send-value.ts b/packages/example-contracts/scripts/multi-chain-value/send-value.ts index 48b5ac35..adee82fe 100644 --- a/packages/example-contracts/scripts/multi-chain-value/send-value.ts +++ b/packages/example-contracts/scripts/multi-chain-value/send-value.ts @@ -1,8 +1,9 @@ -import { getAddress, getChainId, isNetworkName, isZetaTestnet } from "@zetachain/addresses"; +import { getChainId, isNetworkName, isZetaTestnet } from "@zetachain/addresses"; import { parseEther } from "ethers/lib/utils"; import { ethers, network } from "hardhat"; import { getMultiChainValue } from "../../lib/multi-chain-value/MultiChainValue.helpers"; +import { getAddress } from "../../lib/shared/address.helpers"; import { getErc20 } from "../../lib/shared/deploy.helpers"; const networkName = network.name; @@ -57,7 +58,7 @@ async function main() { } } -main().catch((error) => { +main().catch(error => { console.error(error); process.exit(1); }); diff --git a/packages/example-contracts/scripts/multi-chain-value/verify-contract.ts b/packages/example-contracts/scripts/multi-chain-value/verify-contract.ts index 4d3b0da1..6b16b1c5 100644 --- a/packages/example-contracts/scripts/multi-chain-value/verify-contract.ts +++ b/packages/example-contracts/scripts/multi-chain-value/verify-contract.ts @@ -1,17 +1,18 @@ -import { getAddress } from "@zetachain/addresses"; import hardhat from "hardhat"; +import { getAddress } from "../../lib/shared/address.helpers"; + async function main() { await hardhat.run("verify:verify", { address: getAddress("multiChainValue"), constructorArguments: [getAddress("connector"), getAddress("zetaToken")], - contract: "contracts/multi-chain-value/MultiChainValue.sol:MultiChainValue", + contract: "contracts/multi-chain-value/MultiChainValue.sol:MultiChainValue" }); } main() .then(() => process.exit(0)) - .catch((error) => { + .catch(error => { console.error(error); process.exit(1); }); diff --git a/packages/example-contracts/test/CrossChainMessage.spec.ts b/packages/example-contracts/test/CrossChainMessage.spec.ts index af7fcb1b..c794ec76 100644 --- a/packages/example-contracts/test/CrossChainMessage.spec.ts +++ b/packages/example-contracts/test/CrossChainMessage.spec.ts @@ -1,5 +1,4 @@ import { SignerWithAddress } from "@nomiclabs/hardhat-ethers/signers"; -import { getAddress } from "@zetachain/addresses"; import { ZetaTokenConsumerUniV2 } from "@zetachain/interfaces/typechain-types"; import { expect } from "chai"; import { parseEther } from "ethers/lib/utils"; @@ -7,8 +6,9 @@ import { ethers } from "hardhat"; import { deployCrossChainMessageMock, - deployZetaConnectorMock, + deployZetaConnectorMock } from "../lib/cross-chain-message/CrossChainMessage.helpers"; +import { getAddress } from "../lib/shared/address.helpers"; import { deployZetaTokenConsumerUniV2, getZetaMock } from "../lib/shared/deploy.helpers"; import { CrossChainMessage, CrossChainMessageConnector, ZetaEthMock } from "../typechain-types"; import { addZetaEthLiquidityTest } from "./test.helpers"; @@ -41,7 +41,7 @@ describe("CrossChainMessage tests", () => { const uniswapRouterAddr = getAddress("uniswapV2Router02", { customNetworkName: "eth-mainnet", - customZetaNetwork: "mainnet", + customZetaNetwork: "mainnet" }); await addZetaEthLiquidityTest(zetaEthTokenMockContract.address, parseEther("200000"), parseEther("100"), deployer); @@ -54,13 +54,13 @@ describe("CrossChainMessage tests", () => { crossChainMessageContractChainA = await deployCrossChainMessageMock({ zetaConnectorMockAddress: zetaConnectorMockContract.address, zetaTokenConsumerAddress: zetaTokenConsumerUniV2.address, - zetaTokenMockAddress: zetaEthTokenMockContract.address, + zetaTokenMockAddress: zetaEthTokenMockContract.address }); crossChainMessageContractChainB = await deployCrossChainMessageMock({ zetaConnectorMockAddress: zetaConnectorMockContract.address, zetaTokenConsumerAddress: zetaTokenConsumerUniV2.address, - zetaTokenMockAddress: zetaEthTokenMockContract.address, + zetaTokenMockAddress: zetaEthTokenMockContract.address }); await crossChainMessageContractChainB.setInteractorByChainId( @@ -79,7 +79,7 @@ describe("CrossChainMessage tests", () => { const unsetContract = await deployCrossChainMessageMock({ zetaConnectorMockAddress: zetaConnectorMockContract.address, zetaTokenConsumerAddress: zetaTokenConsumerUniV2.address, - zetaTokenMockAddress: zetaEthTokenMockContract.address, + zetaTokenMockAddress: zetaEthTokenMockContract.address }); await expect(unsetContract.sendHelloWorld(chainAId)).to.be.revertedWith("InvalidDestinationChainId()"); @@ -99,7 +99,7 @@ describe("CrossChainMessage tests", () => { message: encoder.encode(["address", "string"], [deployerAddress, SAMPLE_TEXT]), sourceChainId: 1, zetaTxSenderAddress: ethers.utils.solidityPack(["address"], [crossChainMessageContractChainA.address]), - zetaValue: 0, + zetaValue: 0 }) ).to.be.revertedWith(`InvalidCaller("${deployer.address}")`); }); diff --git a/packages/example-contracts/test/CrossChainWarriors.spec.ts b/packages/example-contracts/test/CrossChainWarriors.spec.ts index 99817bc7..cd6f6e0f 100644 --- a/packages/example-contracts/test/CrossChainWarriors.spec.ts +++ b/packages/example-contracts/test/CrossChainWarriors.spec.ts @@ -1,13 +1,13 @@ import { SignerWithAddress } from "@nomiclabs/hardhat-ethers/signers"; -import { getAddress } from "@zetachain/addresses"; import { expect } from "chai"; import { parseEther } from "ethers/lib/utils"; import { ethers } from "hardhat"; import { deployCrossChainWarriorsMock, - deployZetaConnectorMock, + deployZetaConnectorMock } from "../lib/cross-chain-warriors/CrossChainWarriors.helpers"; +import { getAddress } from "../lib/shared/address.helpers"; import { deployZetaTokenConsumerUniV2, getZetaMock } from "../lib/shared/deploy.helpers"; import { CrossChainWarriorsMock, CrossChainWarriorsZetaConnectorMock, ZetaEthMock } from "../typechain-types"; import { ZetaTokenConsumerUniV2 } from "../typechain-types/@zetachain/protocol-contracts/contracts/ZetaTokenConsumerUniV2.strategy.sol"; @@ -42,7 +42,7 @@ describe("CrossChainWarriors tests", () => { const uniswapRouterAddr = getAddress("uniswapV2Router02", { customNetworkName: "eth-mainnet", - customZetaNetwork: "mainnet", + customZetaNetwork: "mainnet" }); await addZetaEthLiquidityTest(zetaEthTokenMockContract.address, parseEther("200000"), parseEther("100"), deployer); @@ -56,14 +56,14 @@ describe("CrossChainWarriors tests", () => { customUseEven: false, zetaConnectorMockAddress: zetaConnectorMockContract.address, zetaTokenConsumerAddress: zetaTokenConsumerUniV2.address, - zetaTokenMockAddress: zetaEthTokenMockContract.address, + zetaTokenMockAddress: zetaEthTokenMockContract.address }); crossChainWarriorsContractChainB = await deployCrossChainWarriorsMock({ customUseEven: true, zetaConnectorMockAddress: zetaConnectorMockContract.address, zetaTokenConsumerAddress: zetaTokenConsumerUniV2.address, - zetaTokenMockAddress: zetaEthTokenMockContract.address, + zetaTokenMockAddress: zetaEthTokenMockContract.address }); await crossChainWarriorsContractChainB.setInteractorByChainId( @@ -138,7 +138,7 @@ describe("CrossChainWarriors tests", () => { await ( await crossChainWarriorsContractChainA.crossChainTransfer(chainBId, account1Address, id, { - value: parseEther("1"), + value: parseEther("1") }) ).wait(); @@ -154,7 +154,7 @@ describe("CrossChainWarriors tests", () => { await ( await crossChainWarriorsContractChainA.crossChainTransfer(chainBId, account1Address, id, { - value: parseEther("1"), + value: parseEther("1") }) ).wait(); @@ -170,7 +170,7 @@ describe("CrossChainWarriors tests", () => { message: encoder.encode(["address"], [deployerAddress]), sourceChainId: 1, zetaTxSenderAddress: ethers.utils.solidityPack(["address"], [crossChainWarriorsContractChainA.address]), - zetaValue: 0, + zetaValue: 0 }) ).to.be.revertedWith(`InvalidCaller("${deployer.address}")`); }); @@ -274,7 +274,7 @@ describe("CrossChainWarriors tests", () => { await ( await crossChainWarriorsContractChainA.crossChainTransfer(chainBId, deployerAddress, nftId, { - value: parseEther("1"), + value: parseEther("1") }) ).wait(); diff --git a/packages/example-contracts/test/MultiChainSwap.spec.ts b/packages/example-contracts/test/MultiChainSwap.spec.ts index e4314bbf..3143a65f 100644 --- a/packages/example-contracts/test/MultiChainSwap.spec.ts +++ b/packages/example-contracts/test/MultiChainSwap.spec.ts @@ -3,11 +3,11 @@ import { BigNumber } from "@ethersproject/bignumber"; import { AddressZero, MaxUint256 } from "@ethersproject/constants"; import { parseEther, parseUnits } from "@ethersproject/units"; import { SignerWithAddress } from "@nomiclabs/hardhat-ethers/signers"; -import { getAddress } from "@zetachain/addresses"; import chai, { expect } from "chai"; import { ethers } from "hardhat"; import { getMultiChainSwapBase, getMultiChainSwapZetaConnector } from "../lib/multi-chain-swap/MultiChainSwap.helpers"; +import { getAddress } from "../lib/shared/address.helpers"; import { getNow, getZetaMock } from "../lib/shared/deploy.helpers"; import { ERC20__factory, @@ -15,7 +15,7 @@ import { IUniswapV2Router02, MultiChainSwapBase, MultiChainSwapZetaConnector, - UniswapV2Router02__factory, + UniswapV2Router02__factory } from "../typechain-types"; import { USDC_ADDR } from "./MultiChainSwap.constants"; import { getCustomErrorMessage, parseUniswapLog, parseZetaLog } from "./test.helpers"; @@ -85,7 +85,7 @@ describe("MultiChainSwap tests", () => { beforeEach(async () => { const uniswapRouterAddr = getAddress("uniswapV2Router02", { customNetworkName: "eth-mainnet", - customZetaNetwork: "mainnet", + customZetaNetwork: "mainnet" }); accounts = await ethers.getSigners(); [deployer, account1] = accounts; @@ -102,16 +102,16 @@ describe("MultiChainSwap tests", () => { USDCTokenContract = ERC20Factory.attach(USDC_ADDR); multiChainSwapContractA = await getMultiChainSwapBase({ - deployParams: [zetaConnectorMock.address, zetaTokenMock.address, uniswapRouterAddr], + deployParams: [zetaConnectorMock.address, zetaTokenMock.address, uniswapRouterAddr] }); multiChainSwapContractB = await getMultiChainSwapBase({ - deployParams: [zetaConnectorMock.address, zetaTokenMock.address, uniswapRouterAddr], + deployParams: [zetaConnectorMock.address, zetaTokenMock.address, uniswapRouterAddr] }); zetaConnectorSmock = await smock.fake("MultiChainSwapZetaConnector"); multiChainSwapContractWithSmock = await getMultiChainSwapBase({ - deployParams: [zetaConnectorSmock.address, zetaTokenMock.address, uniswapRouterAddr], + deployParams: [zetaConnectorSmock.address, zetaTokenMock.address, uniswapRouterAddr] }); const encodedCrossChainAddressB = ethers.utils.solidityPack(["address"], [multiChainSwapContractB.address]); @@ -136,7 +136,7 @@ describe("MultiChainSwap tests", () => { 10, MaxUint256, { - value: parseUnits("1"), + value: parseUnits("1") } ) ).to.be.revertedWith(getCustomErrorMessage("InvalidDestinationChainId")); @@ -199,7 +199,7 @@ describe("MultiChainSwap tests", () => { const result = await tx2.wait(); const eventNames = parseUniswapLog(result.logs); - expect(eventNames.filter((e) => e === "Swap")).to.have.lengthOf(0); + expect(eventNames.filter(e => e === "Swap")).to.have.lengthOf(0); }); it("Should trade the input token for Zeta", async () => { @@ -229,7 +229,7 @@ describe("MultiChainSwap tests", () => { const result = await tx2.wait(); const eventNames = parseUniswapLog(result.logs); - expect(eventNames.filter((e) => e === "Swap")).to.have.lengthOf(2); + expect(eventNames.filter(e => e === "Swap")).to.have.lengthOf(2); }); it("Should trade zeta for the output token", async () => { @@ -259,7 +259,7 @@ describe("MultiChainSwap tests", () => { const result = await tx2.wait(); const eventNames = parseUniswapLog(result.logs); - expect(eventNames.filter((e) => e === "Swap")).to.have.lengthOf(2); + expect(eventNames.filter(e => e === "Swap")).to.have.lengthOf(2); }); it("Should trade input token for zeta and zeta for the output token", async () => { @@ -289,7 +289,7 @@ describe("MultiChainSwap tests", () => { const result = await tx2.wait(); const eventNames = parseUniswapLog(result.logs); - expect(eventNames.filter((e) => e === "Swap")).to.have.lengthOf(4); + expect(eventNames.filter(e => e === "Swap")).to.have.lengthOf(4); }); it("Should call connector.send", async () => { @@ -349,7 +349,7 @@ describe("MultiChainSwap tests", () => { const result = await tx2.wait(); const eventNames = parseZetaLog(result.logs); - expect(eventNames.filter((e) => e === "Swapped")).to.have.lengthOf(1); + expect(eventNames.filter(e => e === "Swapped")).to.have.lengthOf(1); }); it("Should revert if the destinationChainId is not in the storage", async () => { @@ -406,7 +406,7 @@ describe("MultiChainSwap tests", () => { message: encoder.encode(["address"], [multiChainSwapContractA.address]), sourceChainId: chainBId, zetaTxSenderAddress: ethers.utils.solidityPack(["address"], [multiChainSwapContractA.address]), - zetaValue: 0, + zetaValue: 0 }) ).to.be.revertedWith(getCustomErrorMessage("InvalidCaller", [deployer.address])); }); @@ -433,7 +433,7 @@ describe("MultiChainSwap tests", () => { message: encoder.encode(["address"], [multiChainSwapContractA.address]), remainingZetaValue: 0, sourceChainId: chainAId, - zetaTxSenderAddress: deployer.address, + zetaTxSenderAddress: deployer.address }) ).to.be.revertedWith(getCustomErrorMessage("InvalidCaller", [deployer.address])); }); @@ -458,7 +458,7 @@ describe("MultiChainSwap tests", () => { multiChainSwapContractA.address, true, 0, - false, + false ] ); @@ -498,7 +498,7 @@ describe("MultiChainSwap tests", () => { multiChainSwapContractA.address, true, 0, - false, + false ] ); @@ -517,7 +517,10 @@ describe("MultiChainSwap tests", () => { const originAddressFinalUSDCBalance = await USDCTokenContract.balanceOf(deployer.address); expect(originAddressFinalUSDCBalance).to.be.lt(originAddressInitialUSDCBalance.add(ZETA_USDC_PRICE)); expect(originAddressFinalUSDCBalance).to.be.gt( - originAddressInitialUSDCBalance.add(ZETA_USDC_PRICE).mul(995).div(1000) + originAddressInitialUSDCBalance + .add(ZETA_USDC_PRICE) + .mul(995) + .div(1000) ); }); @@ -541,7 +544,7 @@ describe("MultiChainSwap tests", () => { multiChainSwapContractA.address, true, 0, - true, + true ] ); @@ -559,7 +562,12 @@ describe("MultiChainSwap tests", () => { const originAddressFinalETHBalance = await ethers.provider.getBalance(deployer.address); expect(originAddressFinalETHBalance).to.be.gt(originAddressInitialETHBalance.add("1")); - expect(originAddressFinalETHBalance).to.be.lt(originAddressInitialETHBalance.add("1").mul(1005).div(1000)); + expect(originAddressFinalETHBalance).to.be.lt( + originAddressInitialETHBalance + .add("1") + .mul(1005) + .div(1000) + ); }); it("Should emit a RevertedSwap event", async () => { @@ -582,7 +590,7 @@ describe("MultiChainSwap tests", () => { multiChainSwapContractA.address, true, 0, - true, + true ] ); @@ -598,7 +606,7 @@ describe("MultiChainSwap tests", () => { const result = await tx2.wait(); const eventNames = parseZetaLog(result.logs); - expect(eventNames.filter((e) => e === "RevertedSwap")).to.have.lengthOf(1); + expect(eventNames.filter(e => e === "RevertedSwap")).to.have.lengthOf(1); }); }); }); diff --git a/packages/example-contracts/test/test.helpers.ts b/packages/example-contracts/test/test.helpers.ts index b4dbcf4e..b9711ee2 100644 --- a/packages/example-contracts/test/test.helpers.ts +++ b/packages/example-contracts/test/test.helpers.ts @@ -1,14 +1,14 @@ import { MaxUint256 } from "@ethersproject/constants"; import { SignerWithAddress } from "@nomiclabs/hardhat-ethers/signers"; -import { getAddress } from "@zetachain/addresses"; import { BigNumber, ContractReceipt } from "ethers"; +import { getAddress } from "../lib/shared/address.helpers"; import { getNow } from "../lib/shared/deploy.helpers"; import { ERC20__factory, IUniswapV2Pair__factory, MultiChainSwapBase__factory, - UniswapV2Router02__factory, + UniswapV2Router02__factory } from "../typechain-types"; export const getMintTokenId = (mintTx: ContractReceipt) => mintTx.events?.[0].args?.tokenId; @@ -16,12 +16,12 @@ export const getMintTokenId = (mintTx: ContractReceipt) => mintTx.events?.[0].ar export const parseUniswapLog = (logs: ContractReceipt["logs"]) => { const iface = IUniswapV2Pair__factory.createInterface(); - const eventNames = logs.map((log) => { + const eventNames = logs.map(log => { try { const parsedLog = iface.parseLog(log); return parsedLog.name; - } catch (e: any) { + } catch (e) { return "NO_UNI_LOG"; } }); @@ -32,12 +32,12 @@ export const parseUniswapLog = (logs: ContractReceipt["logs"]) => { export const parseZetaLog = (logs: ContractReceipt["logs"]) => { const iface = MultiChainSwapBase__factory.createInterface(); - const eventNames = logs.map((log) => { + const eventNames = logs.map(log => { try { const parsedLog = iface.parseLog(log); return parsedLog.name; - } catch (e: any) { + } catch (e) { return "NO_ZETA_LOG"; } }); @@ -69,7 +69,7 @@ export const addZetaEthLiquidityTest = async ( ) => { const uniswapRouterAddr = getAddress("uniswapV2Router02", { customNetworkName: "eth-mainnet", - customZetaNetwork: "mainnet", + customZetaNetwork: "mainnet" }); const uniswapRouter = UniswapV2Router02__factory.connect(uniswapRouterAddr, deployer); diff --git a/packages/protocol-contracts/lib/address.helpers.ts b/packages/protocol-contracts/lib/address.helpers.ts new file mode 100644 index 00000000..d6c498f2 --- /dev/null +++ b/packages/protocol-contracts/lib/address.helpers.ts @@ -0,0 +1,23 @@ +import { getAddress as getAddressLib, NetworkName, ZetaAddress, ZetaNetworkName } from "@zetachain/addresses"; +import { network } from "hardhat"; + +const MissingZetaNetworkError = new Error( + "ZETA_NETWORK is not defined, please set the environment variable (e.g.: ZETA_NETWORK=athens )" +); + +export const getAddress = ( + address: ZetaAddress, + { + customNetworkName, + customZetaNetwork + }: { customNetworkName?: NetworkName; customZetaNetwork?: ZetaNetworkName } = {} +): string => { + const { name: _networkName } = network; + const networkName = customNetworkName || _networkName; + + const { ZETA_NETWORK: _ZETA_NETWORK } = process.env; + const zetaNetwork = customZetaNetwork || _ZETA_NETWORK; + + if (!zetaNetwork) throw MissingZetaNetworkError; + return getAddressLib({ address, networkName, zetaNetwork }); +}; diff --git a/packages/protocol-contracts/scripts/deploy-zeta-connector.ts b/packages/protocol-contracts/scripts/deploy-zeta-connector.ts index 25e01d18..7fcfd71d 100644 --- a/packages/protocol-contracts/scripts/deploy-zeta-connector.ts +++ b/packages/protocol-contracts/scripts/deploy-zeta-connector.ts @@ -1,8 +1,9 @@ -import { getAddress, isNetworkName } from "@zetachain/addresses"; +import { isNetworkName } from "@zetachain/addresses"; import { saveAddress } from "@zetachain/addresses-tools"; import { Contract } from "ethers"; import { network } from "hardhat"; +import { getAddress } from "../lib/address.helpers"; import { deployZetaConnectorEth, deployZetaConnectorNonEth, isEthNetworkName } from "../lib/contracts.helpers"; export async function deployZetaConnector() { @@ -15,11 +16,11 @@ export async function deployZetaConnector() { if (isEthNetworkName(network.name)) { contract = await deployZetaConnectorEth({ - args: [getAddress("zetaToken"), getAddress("tss"), getAddress("tssUpdater")], + args: [getAddress("zetaToken"), getAddress("tss"), getAddress("tssUpdater")] }); } else { contract = await deployZetaConnectorNonEth({ - args: [getAddress("zetaToken"), getAddress("tss"), getAddress("tssUpdater")], + args: [getAddress("zetaToken"), getAddress("tss"), getAddress("tssUpdater")] }); } @@ -30,7 +31,7 @@ export async function deployZetaConnector() { if (!process.env.EXECUTE_PROGRAMMATICALLY) { deployZetaConnector() .then(() => process.exit(0)) - .catch((error) => { + .catch(error => { console.error(error); process.exit(1); }); diff --git a/packages/protocol-contracts/scripts/deploy-zeta-token.ts b/packages/protocol-contracts/scripts/deploy-zeta-token.ts index f0da9c24..c3e19697 100644 --- a/packages/protocol-contracts/scripts/deploy-zeta-token.ts +++ b/packages/protocol-contracts/scripts/deploy-zeta-token.ts @@ -1,8 +1,9 @@ -import { getAddress, isNetworkName } from "@zetachain/addresses"; +import { isNetworkName } from "@zetachain/addresses"; import { saveAddress } from "@zetachain/addresses-tools"; import { Contract } from "ethers"; import { network } from "hardhat"; +import { getAddress } from "../lib/address.helpers"; import { ZETA_INITIAL_SUPPLY } from "../lib/contracts.constants"; import { deployZetaEth, deployZetaNonEth, isEthNetworkName } from "../lib/contracts.helpers"; @@ -15,11 +16,11 @@ export async function deployZetaToken() { if (isEthNetworkName(network.name)) { contract = await deployZetaEth({ - args: [ZETA_INITIAL_SUPPLY], + args: [ZETA_INITIAL_SUPPLY] }); } else { contract = await deployZetaNonEth({ - args: [getAddress("tss"), getAddress("tssUpdater")], + args: [getAddress("tss"), getAddress("tssUpdater")] }); } @@ -30,7 +31,7 @@ export async function deployZetaToken() { if (!process.env.EXECUTE_PROGRAMMATICALLY) { deployZetaToken() .then(() => process.exit(0)) - .catch((error) => { + .catch(error => { console.error(error); process.exit(1); }); diff --git a/packages/protocol-contracts/scripts/deterministic-deploy-zeta-connector.ts b/packages/protocol-contracts/scripts/deterministic-deploy-zeta-connector.ts index 3e414b57..54f7ad72 100644 --- a/packages/protocol-contracts/scripts/deterministic-deploy-zeta-connector.ts +++ b/packages/protocol-contracts/scripts/deterministic-deploy-zeta-connector.ts @@ -1,9 +1,10 @@ -import { getAddress, isNetworkName } from "@zetachain/addresses"; +import { isNetworkName } from "@zetachain/addresses"; import { saveAddress } from "@zetachain/addresses-tools"; import { ZetaConnectorEth__factory, ZetaConnectorNonEth__factory } from "@zetachain/interfaces/typechain-types"; import { BigNumber } from "ethers"; import { ethers, network } from "hardhat"; +import { getAddress } from "../lib/address.helpers"; import { ZETA_CONNECTOR_SALT_NUMBER_ETH, ZETA_CONNECTOR_SALT_NUMBER_NON_ETH } from "../lib/contracts.constants"; import { isEthNetworkName } from "../lib/contracts.helpers"; import { deployContractToAddress, saltToHex } from "../lib/ImmutableCreate2Factory/ImmutableCreate2Factory.helpers"; @@ -45,7 +46,7 @@ export async function deterministicDeployZetaConnector() { contractBytecode, factoryAddress: immutableCreate2Factory, salt: salthex, - signer, + signer }); saveAddress("connector", address); @@ -55,7 +56,7 @@ export async function deterministicDeployZetaConnector() { if (!process.env.EXECUTE_PROGRAMMATICALLY) { deterministicDeployZetaConnector() .then(() => process.exit(0)) - .catch((error) => { + .catch(error => { console.error(error); process.exit(1); }); diff --git a/packages/protocol-contracts/scripts/deterministic-deploy-zeta-consumer.ts b/packages/protocol-contracts/scripts/deterministic-deploy-zeta-consumer.ts index 1675c737..7df82fc6 100644 --- a/packages/protocol-contracts/scripts/deterministic-deploy-zeta-consumer.ts +++ b/packages/protocol-contracts/scripts/deterministic-deploy-zeta-consumer.ts @@ -1,9 +1,10 @@ -import { getAddress, isNetworkName } from "@zetachain/addresses"; +import { isNetworkName } from "@zetachain/addresses"; import { saveAddress } from "@zetachain/addresses-tools"; import { ZetaTokenConsumerUniV2__factory } from "@zetachain/interfaces/typechain-types"; import { BigNumber } from "ethers"; import { ethers, network } from "hardhat"; +import { getAddress } from "../lib/address.helpers"; import { ZETA_CONSUMER_SALT_NUMBER } from "../lib/contracts.constants"; import { deployContractToAddress, saltToHex } from "../lib/ImmutableCreate2Factory/ImmutableCreate2Factory.helpers"; @@ -37,7 +38,7 @@ export async function deterministicDeployZetaConsumer() { contractBytecode, factoryAddress: immutableCreate2Factory, salt: salthex, - signer, + signer }); saveAddress("zetaTokenConsumerUniV2", address); @@ -47,7 +48,7 @@ export async function deterministicDeployZetaConsumer() { if (!process.env.EXECUTE_PROGRAMMATICALLY) { deterministicDeployZetaConsumer() .then(() => process.exit(0)) - .catch((error) => { + .catch(error => { console.error(error); process.exit(1); }); diff --git a/packages/protocol-contracts/scripts/deterministic-deploy-zeta-token.ts b/packages/protocol-contracts/scripts/deterministic-deploy-zeta-token.ts index d48c29ca..c29a9e1d 100644 --- a/packages/protocol-contracts/scripts/deterministic-deploy-zeta-token.ts +++ b/packages/protocol-contracts/scripts/deterministic-deploy-zeta-token.ts @@ -1,13 +1,14 @@ -import { getAddress, isNetworkName } from "@zetachain/addresses"; +import { isNetworkName } from "@zetachain/addresses"; import { saveAddress } from "@zetachain/addresses-tools"; import { ZetaEth__factory, ZetaNonEth__factory } from "@zetachain/interfaces/typechain-types"; import { BigNumber } from "ethers"; import { ethers, network } from "hardhat"; +import { getAddress } from "../lib/address.helpers"; import { ZETA_INITIAL_SUPPLY, ZETA_TOKEN_SALT_NUMBER_ETH, - ZETA_TOKEN_SALT_NUMBER_NON_ETH, + ZETA_TOKEN_SALT_NUMBER_NON_ETH } from "../lib/contracts.constants"; import { isEthNetworkName } from "../lib/contracts.helpers"; import { deployContractToAddress, saltToHex } from "../lib/ImmutableCreate2Factory/ImmutableCreate2Factory.helpers"; @@ -51,7 +52,7 @@ export async function deterministicDeployZetaToken() { contractBytecode, factoryAddress: immutableCreate2Factory, salt: salthex, - signer, + signer }); saveAddress("zetaToken", address); @@ -61,7 +62,7 @@ export async function deterministicDeployZetaToken() { if (!process.env.EXECUTE_PROGRAMMATICALLY) { deterministicDeployZetaToken() .then(() => process.exit(0)) - .catch((error) => { + .catch(error => { console.error(error); process.exit(1); }); diff --git a/packages/protocol-contracts/scripts/deterministic-deploy.helpers.ts b/packages/protocol-contracts/scripts/deterministic-deploy.helpers.ts index d6526c52..e41ae279 100644 --- a/packages/protocol-contracts/scripts/deterministic-deploy.helpers.ts +++ b/packages/protocol-contracts/scripts/deterministic-deploy.helpers.ts @@ -1,11 +1,11 @@ -import { getAddress } from "@zetachain/addresses"; import { BigNumber } from "ethers"; +import { getAddress } from "../lib/address.helpers"; import { MAX_ETH_ADDRESS } from "../lib/contracts.constants"; import { buildBytecode, buildCreate2Address, - saltToHex, + saltToHex } from "../lib/ImmutableCreate2Factory/ImmutableCreate2Factory.helpers"; export const calculateBestSalt = async ( diff --git a/packages/protocol-contracts/scripts/deterministic-get-salt-zeta-connector.ts b/packages/protocol-contracts/scripts/deterministic-get-salt-zeta-connector.ts index 5207415d..a437800c 100644 --- a/packages/protocol-contracts/scripts/deterministic-get-salt-zeta-connector.ts +++ b/packages/protocol-contracts/scripts/deterministic-get-salt-zeta-connector.ts @@ -1,8 +1,9 @@ -import { getAddress, isNetworkName } from "@zetachain/addresses"; +import { isNetworkName } from "@zetachain/addresses"; import { ZetaConnectorEth__factory, ZetaConnectorNonEth__factory } from "@zetachain/interfaces/typechain-types"; import { BigNumber } from "ethers"; import { network } from "hardhat"; +import { getAddress } from "../lib/address.helpers"; import { isEthNetworkName } from "../lib/contracts.helpers"; import { calculateBestSalt } from "./deterministic-deploy.helpers"; @@ -36,7 +37,7 @@ export async function deterministicDeployGetSaltZetaConnector() { if (!process.env.EXECUTE_PROGRAMMATICALLY) { deterministicDeployGetSaltZetaConnector() .then(() => process.exit(0)) - .catch((error) => { + .catch(error => { console.error(error); process.exit(1); }); diff --git a/packages/protocol-contracts/scripts/deterministic-get-salt-zeta-token.ts b/packages/protocol-contracts/scripts/deterministic-get-salt-zeta-token.ts index c6542d19..337455bf 100644 --- a/packages/protocol-contracts/scripts/deterministic-get-salt-zeta-token.ts +++ b/packages/protocol-contracts/scripts/deterministic-get-salt-zeta-token.ts @@ -1,8 +1,9 @@ -import { getAddress, isNetworkName } from "@zetachain/addresses"; +import { isNetworkName } from "@zetachain/addresses"; import { ZetaEth__factory, ZetaNonEth__factory } from "@zetachain/interfaces/typechain-types"; import { BigNumber } from "ethers"; import { network } from "hardhat"; +import { getAddress } from "../lib/address.helpers"; import { ZETA_INITIAL_SUPPLY } from "../lib/contracts.constants"; import { isEthNetworkName } from "../lib/contracts.helpers"; import { calculateBestSalt } from "./deterministic-deploy.helpers"; @@ -38,7 +39,7 @@ export async function deterministicDeployGetSaltZetaToken() { if (!process.env.EXECUTE_PROGRAMMATICALLY) { deterministicDeployGetSaltZetaToken() .then(() => process.exit(0)) - .catch((error) => { + .catch(error => { console.error(error); process.exit(1); }); diff --git a/packages/protocol-contracts/scripts/send-tss-gas.ts b/packages/protocol-contracts/scripts/send-tss-gas.ts index 55b61c71..8f83fd37 100644 --- a/packages/protocol-contracts/scripts/send-tss-gas.ts +++ b/packages/protocol-contracts/scripts/send-tss-gas.ts @@ -1,6 +1,8 @@ -import { getAddress, isNetworkName } from "@zetachain/addresses"; +import { isNetworkName } from "@zetachain/addresses"; import { ethers, network } from "hardhat"; +import { getAddress } from "../lib/address.helpers"; + async function sendGas() { if (!isNetworkName(network.name)) { throw new Error(`network.name: ${network.name} isn't supported.`); @@ -10,7 +12,7 @@ async function sendGas() { const sendGasTx = { from: signer.address, to: getAddress("tss"), - value: ethers.utils.parseEther("1.0"), + value: ethers.utils.parseEther("1.0") }; await signer.sendTransaction(sendGasTx); console.log(`Sent 1.0 Ether from ${signer.address} to TSS address (${getAddress("tss")}).`); @@ -18,7 +20,7 @@ async function sendGas() { sendGas() .then(() => process.exit(0)) - .catch((error) => { + .catch(error => { console.error(error); process.exit(1); }); diff --git a/packages/protocol-contracts/scripts/set-zeta-token-addresses.ts b/packages/protocol-contracts/scripts/set-zeta-token-addresses.ts index 713e879e..5cbbeb86 100644 --- a/packages/protocol-contracts/scripts/set-zeta-token-addresses.ts +++ b/packages/protocol-contracts/scripts/set-zeta-token-addresses.ts @@ -1,7 +1,9 @@ -import { getAddress, isNetworkName } from "@zetachain/addresses"; +import { isNetworkName } from "@zetachain/addresses"; import { ZetaNonEth__factory as ZetaNonEthFactory } from "@zetachain/interfaces/typechain-types"; import { ethers, network } from "hardhat"; +import { getAddress } from "../lib/address.helpers"; + export async function setZetaAddresses() { if (!isNetworkName(network.name)) { throw new Error(`network.name: ${network.name} isn't supported.`); @@ -21,7 +23,7 @@ export async function setZetaAddresses() { if (!process.env.EXECUTE_PROGRAMMATICALLY) { setZetaAddresses() .then(() => process.exit(0)) - .catch((error) => { + .catch(error => { console.error(error); process.exit(1); }); diff --git a/packages/protocol-contracts/scripts/test-zeta-send.ts b/packages/protocol-contracts/scripts/test-zeta-send.ts index ce7ff7a0..8829a112 100644 --- a/packages/protocol-contracts/scripts/test-zeta-send.ts +++ b/packages/protocol-contracts/scripts/test-zeta-send.ts @@ -1,8 +1,10 @@ -import { getAddress, getChainId } from "@zetachain/addresses"; +import { getChainId } from "@zetachain/addresses"; import { ZetaConnectorEth__factory as ZetaConnectorEthFactory } from "@zetachain/interfaces/typechain-types"; import { AbiCoder } from "ethers/lib/utils"; import { ethers } from "hardhat"; +import { getAddress } from "../lib/address.helpers"; + const encoder = new AbiCoder(); async function main() { @@ -18,7 +20,7 @@ async function main() { destinationGasLimit: 1_000_000, message: encoder.encode(["address"], ["0x09b80BEcBe709Dd354b1363727514309d1Ac3C7b"]), zetaParams: [], - zetaValueAndGas: 0, + zetaValueAndGas: 0 }) ).wait(); console.log("Sent"); @@ -26,7 +28,7 @@ async function main() { main() .then(() => process.exit(0)) - .catch((error) => { + .catch(error => { console.error(error); process.exit(1); }); diff --git a/packages/protocol-contracts/scripts/token-approval.ts b/packages/protocol-contracts/scripts/token-approval.ts index b28467dd..8242d484 100644 --- a/packages/protocol-contracts/scripts/token-approval.ts +++ b/packages/protocol-contracts/scripts/token-approval.ts @@ -1,6 +1,7 @@ -import { getAddress, isNetworkName } from "@zetachain/addresses"; +import { isNetworkName } from "@zetachain/addresses"; import { ethers, network } from "hardhat"; +import { getAddress } from "../lib/address.helpers"; import { getZetaFactoryEth, getZetaFactoryNonEth, isEthNetworkName } from "../lib/contracts.helpers"; const approvalAmount = ethers.utils.parseEther("10000000.0"); @@ -25,7 +26,7 @@ export async function setTokenApproval() { setTokenApproval() .then(() => process.exit(0)) - .catch((error) => { + .catch(error => { console.error(error); process.exit(1); }); diff --git a/packages/protocol-contracts/scripts/update-tss-address.ts b/packages/protocol-contracts/scripts/update-tss-address.ts index 5b72d543..0332975e 100644 --- a/packages/protocol-contracts/scripts/update-tss-address.ts +++ b/packages/protocol-contracts/scripts/update-tss-address.ts @@ -1,7 +1,8 @@ -import { getAddress, isNetworkName } from "@zetachain/addresses"; +import { isNetworkName } from "@zetachain/addresses"; import { saveAddress } from "@zetachain/addresses-tools"; import { ethers, network } from "hardhat"; +import { getAddress } from "../lib/address.helpers"; import { getZetaConnectorEth, getZetaConnectorNonEth, isEthNetworkName } from "../lib/contracts.helpers"; async function sendGas() { @@ -34,7 +35,7 @@ async function sendGas() { sendGas() .then(() => process.exit(0)) - .catch((error) => { + .catch(error => { console.error(error); process.exit(1); }); diff --git a/packages/protocol-contracts/scripts/verify-contracts.ts b/packages/protocol-contracts/scripts/verify-contracts.ts index f3939404..632d0f59 100644 --- a/packages/protocol-contracts/scripts/verify-contracts.ts +++ b/packages/protocol-contracts/scripts/verify-contracts.ts @@ -1,6 +1,6 @@ -import { getAddress } from "@zetachain/addresses"; import hardhat, { network } from "hardhat"; +import { getAddress } from "../lib/address.helpers"; import { ZETA_INITIAL_SUPPLY } from "../lib/contracts.constants"; import { isEthNetworkName } from "../lib/contracts.helpers"; @@ -16,7 +16,7 @@ async function main() { .run("verify:verify", { address: getAddress("zetaToken"), constructorArguments: [ZETA_INITIAL_SUPPLY], - contract: "contracts/evm/Zeta.eth.sol:ZetaEth", + contract: "contracts/evm/Zeta.eth.sol:ZetaEth" }) .catch(handleCatch); @@ -24,14 +24,14 @@ async function main() { .run("verify:verify", { address: getAddress("connector"), constructorArguments: [getAddress("zetaToken"), getAddress("tss"), getAddress("tssUpdater")], - contract: "contracts/evm/ZetaConnector.eth.sol:ZetaConnectorEth", + contract: "contracts/evm/ZetaConnector.eth.sol:ZetaConnectorEth" }) .catch(handleCatch); } else { await hardhat .run("verify:verify", { address: getAddress("zetaToken"), - constructorArguments: [getAddress("tss"), getAddress("tssUpdater")], + constructorArguments: [getAddress("tss"), getAddress("tssUpdater")] }) .catch(handleCatch); @@ -39,7 +39,7 @@ async function main() { .run("verify:verify", { address: getAddress("connector"), constructorArguments: [getAddress("zetaToken"), getAddress("tss"), getAddress("tssUpdater")], - contract: "contracts/evm/ZetaConnector.non-eth.sol:ZetaConnectorNonEth", + contract: "contracts/evm/ZetaConnector.non-eth.sol:ZetaConnectorNonEth" }) .catch(handleCatch); } @@ -47,7 +47,7 @@ async function main() { main() .then(() => process.exit(0)) - .catch((error) => { + .catch(error => { console.error(error); process.exit(1); }); diff --git a/packages/protocol-contracts/test/ZetaTokenConsumer.spec.ts b/packages/protocol-contracts/test/ZetaTokenConsumer.spec.ts index f2d6293c..258ae669 100644 --- a/packages/protocol-contracts/test/ZetaTokenConsumer.spec.ts +++ b/packages/protocol-contracts/test/ZetaTokenConsumer.spec.ts @@ -1,7 +1,6 @@ import { MaxUint256 } from "@ethersproject/constants"; import { parseEther, parseUnits } from "@ethersproject/units"; import { SignerWithAddress } from "@nomiclabs/hardhat-ethers/signers"; -import { getAddress } from "@zetachain/addresses"; import { IERC20, IERC20__factory, @@ -11,16 +10,17 @@ import { UniswapV2Router02__factory, ZetaTokenConsumer, ZetaTokenConsumerUniV2, - ZetaTokenConsumerUniV3, + ZetaTokenConsumerUniV3 } from "@zetachain/interfaces/typechain-types"; import chai, { expect } from "chai"; import { BigNumber } from "ethers"; import { ethers } from "hardhat"; +import { getAddress } from "../lib/address.helpers"; import { deployZetaNonEth, getZetaTokenConsumerUniV2Strategy, - getZetaTokenConsumerUniV3Strategy, + getZetaTokenConsumerUniV3Strategy } from "../lib/contracts.helpers"; import { parseZetaConsumerLog } from "./test.helpers"; @@ -64,17 +64,17 @@ describe("ZetaTokenConsumer tests", () => { const createPoolV3 = async (signer: SignerWithAddress, tokenAddress: string) => { const DAI = getAddress("dai", { customNetworkName: "eth-mainnet", - customZetaNetwork: "mainnet", + customZetaNetwork: "mainnet" }); const UNI_NFT_MANAGER_V3 = getAddress("uniswapV3NftManager", { customNetworkName: "eth-mainnet", - customZetaNetwork: "mainnet", + customZetaNetwork: "mainnet" }); const USDC = getAddress("usdc", { customNetworkName: "eth-mainnet", - customZetaNetwork: "mainnet", + customZetaNetwork: "mainnet" }); await swapToken(signer, DAI, parseUnits("10000", 18)); @@ -109,7 +109,7 @@ describe("ZetaTokenConsumer tests", () => { tickLower: 193, tickUpper: 194, token0: USDC, - token1: DAI, + token1: DAI }; const tx4 = await uniswapRouter.mint(params); @@ -121,37 +121,37 @@ describe("ZetaTokenConsumer tests", () => { [tssUpdater, tssSigner, randomSigner] = accounts; zetaTokenNonEth = await deployZetaNonEth({ - args: [tssSigner.address, tssUpdater.address], + args: [tssSigner.address, tssUpdater.address] }); uniswapV2RouterAddr = getAddress("uniswapV2Router02", { customNetworkName: "eth-mainnet", - customZetaNetwork: "mainnet", + customZetaNetwork: "mainnet" }); const DAI = getAddress("dai", { customNetworkName: "eth-mainnet", - customZetaNetwork: "mainnet", + customZetaNetwork: "mainnet" }); const UNI_QUOTER_V3 = getAddress("uniswapV3Quoter", { customNetworkName: "eth-mainnet", - customZetaNetwork: "mainnet", + customZetaNetwork: "mainnet" }); const UNI_ROUTER_V3 = getAddress("uniswapV3Router", { customNetworkName: "eth-mainnet", - customZetaNetwork: "mainnet", + customZetaNetwork: "mainnet" }); const WETH9 = getAddress("weth9", { customNetworkName: "eth-mainnet", - customZetaNetwork: "mainnet", + customZetaNetwork: "mainnet" }); USDCAddr = getAddress("usdc", { customNetworkName: "eth-mainnet", - customZetaNetwork: "mainnet", + customZetaNetwork: "mainnet" }); // For testing purposes we use an existing uni v3 pool @@ -164,12 +164,12 @@ describe("ZetaTokenConsumer tests", () => { zetaTokenNonEth = IERC20__factory.connect(zetaTokenNonEthAddress, tssSigner); zetaTokenConsumerUniV2 = await getZetaTokenConsumerUniV2Strategy({ - deployParams: [zetaTokenNonEthAddress, uniswapV2RouterAddr], + deployParams: [zetaTokenNonEthAddress, uniswapV2RouterAddr] }); uniswapV3RouterAddr = UNI_ROUTER_V3; zetaTokenConsumerUniV3 = await getZetaTokenConsumerUniV3Strategy({ - deployParams: [zetaTokenNonEthAddress, uniswapV3RouterAddr, UNI_QUOTER_V3, WETH9, 3000, 3000], + deployParams: [zetaTokenNonEthAddress, uniswapV3RouterAddr, UNI_QUOTER_V3, WETH9, 3000, 3000] }); }); @@ -180,7 +180,7 @@ describe("ZetaTokenConsumer tests", () => { const result = await tx.wait(); const eventNames = parseZetaConsumerLog(result.logs); - expect(eventNames.filter((e) => e === "EthExchangedForZeta")).to.have.lengthOf(1); + expect(eventNames.filter(e => e === "EthExchangedForZeta")).to.have.lengthOf(1); const finalZetaBalance = await zetaTokenNonEth.balanceOf(randomSigner.address); expect(finalZetaBalance).to.be.gt(initialZetaBalance); @@ -210,7 +210,7 @@ describe("ZetaTokenConsumer tests", () => { const result = await tx2.wait(); const eventNames = parseZetaConsumerLog(result.logs); - expect(eventNames.filter((e) => e === "TokenExchangedForZeta")).to.have.lengthOf(1); + expect(eventNames.filter(e => e === "TokenExchangedForZeta")).to.have.lengthOf(1); const finalZetaBalance = await zetaTokenNonEth.balanceOf(randomSigner.address); expect(finalZetaBalance).to.be.gt(initialZetaBalance); @@ -237,7 +237,7 @@ describe("ZetaTokenConsumer tests", () => { const result = await tx2.wait(); const eventNames = parseZetaConsumerLog(result.logs); - expect(eventNames.filter((e) => e === "ZetaExchangedForEth")).to.have.lengthOf(1); + expect(eventNames.filter(e => e === "ZetaExchangedForEth")).to.have.lengthOf(1); const finalEthBalance = await ethers.provider.getBalance(randomSigner.address); expect(finalEthBalance).to.be.gt(initialEthBalance); @@ -267,7 +267,7 @@ describe("ZetaTokenConsumer tests", () => { const result = await tx2.wait(); const eventNames = parseZetaConsumerLog(result.logs); - expect(eventNames.filter((e) => e === "ZetaExchangedForToken")).to.have.lengthOf(1); + expect(eventNames.filter(e => e === "ZetaExchangedForToken")).to.have.lengthOf(1); const finalTokenBalance = await USDCContract.balanceOf(randomSigner.address); expect(finalTokenBalance).to.be.gt(initialTokenBalance); diff --git a/yarn.lock b/yarn.lock index 5f5a602f..b13b4dfe 100644 --- a/yarn.lock +++ b/yarn.lock @@ -326,6 +326,13 @@ __metadata: languageName: node linkType: hard +"@esbuild/linux-loong64@npm:0.15.7": + version: 0.15.7 + resolution: "@esbuild/linux-loong64@npm:0.15.7" + conditions: os=linux & cpu=loong64 + languageName: node + linkType: hard + "@eslint/eslintrc@npm:^1.2.1": version: 1.2.1 resolution: "@eslint/eslintrc@npm:1.2.1" @@ -1405,6 +1412,58 @@ __metadata: languageName: node linkType: hard +"@microsoft/api-extractor-model@npm:7.24.0": + version: 7.24.0 + resolution: "@microsoft/api-extractor-model@npm:7.24.0" + dependencies: + "@microsoft/tsdoc": 0.14.1 + "@microsoft/tsdoc-config": ~0.16.1 + "@rushstack/node-core-library": 3.51.1 + checksum: d683ca227ed79f0bd8725caba190bb281b1f2088602268cbecd5d8dd690c601034c447a35e22f63866f79544f9648bc46631e0d724c3e54bc7438591e1f4312f + languageName: node + linkType: hard + +"@microsoft/api-extractor@npm:^7.20.0": + version: 7.30.0 + resolution: "@microsoft/api-extractor@npm:7.30.0" + dependencies: + "@microsoft/api-extractor-model": 7.24.0 + "@microsoft/tsdoc": 0.14.1 + "@microsoft/tsdoc-config": ~0.16.1 + "@rushstack/node-core-library": 3.51.1 + "@rushstack/rig-package": 0.3.14 + "@rushstack/ts-command-line": 4.12.2 + colors: ~1.2.1 + lodash: ~4.17.15 + resolve: ~1.17.0 + semver: ~7.3.0 + source-map: ~0.6.1 + typescript: ~4.7.4 + bin: + api-extractor: bin/api-extractor + checksum: e53ec885d0c645a7202d2e5849bb4a62dbdbb894c66cc21b118e74a043bb0a121fa7f846d08ab4924cb7a5c8eb5cef244d9ba55758718f6670f27604a1894a16 + languageName: node + linkType: hard + +"@microsoft/tsdoc-config@npm:~0.16.1": + version: 0.16.1 + resolution: "@microsoft/tsdoc-config@npm:0.16.1" + dependencies: + "@microsoft/tsdoc": 0.14.1 + ajv: ~6.12.6 + jju: ~1.4.0 + resolve: ~1.19.0 + checksum: 2b2121803caf6584fe0264ad16f8fa10de68438c0b82bd25f918606052af5312050f38b6abd4bcf3d40f120713aab144762a7a280fa22dd12e5571cd08e348e1 + languageName: node + linkType: hard + +"@microsoft/tsdoc@npm:0.14.1": + version: 0.14.1 + resolution: "@microsoft/tsdoc@npm:0.14.1" + checksum: e4ad038ccff2cd96e0d53ee42e2136f0f5a925b16cfda14261f1c2eb55ba0088a0e3b08ff819b476ddc69b2242a391925fab7f6ae2afabb19b96f87e19c114fc + languageName: node + linkType: hard + "@noble/hashes@npm:1.0.0, @noble/hashes@npm:~1.0.0": version: 1.0.0 resolution: "@noble/hashes@npm:1.0.0" @@ -1590,6 +1649,44 @@ __metadata: languageName: node linkType: hard +"@rushstack/node-core-library@npm:3.51.1, @rushstack/node-core-library@npm:^3.45.1": + version: 3.51.1 + resolution: "@rushstack/node-core-library@npm:3.51.1" + dependencies: + "@types/node": 12.20.24 + colors: ~1.2.1 + fs-extra: ~7.0.1 + import-lazy: ~4.0.0 + jju: ~1.4.0 + resolve: ~1.17.0 + semver: ~7.3.0 + z-schema: ~5.0.2 + checksum: 92f7e39f03f4931a7007b4a79427d82bfe078146133a138219205abf873607898f7667fa368e3cb28c93bb1a2b9dc70ddaf2d316bc47a9a17b591d69d1025068 + languageName: node + linkType: hard + +"@rushstack/rig-package@npm:0.3.14": + version: 0.3.14 + resolution: "@rushstack/rig-package@npm:0.3.14" + dependencies: + resolve: ~1.17.0 + strip-json-comments: ~3.1.1 + checksum: 3e9c6bdfc79b4a408fbb3248593fe34e23164c4997c68b6cb905ad4a38f53ac628f90fc715c9225348cba1cf0af410bfa55ed5a58c833aa53fdde6cf4a2e0a33 + languageName: node + linkType: hard + +"@rushstack/ts-command-line@npm:4.12.2": + version: 4.12.2 + resolution: "@rushstack/ts-command-line@npm:4.12.2" + dependencies: + "@types/argparse": 1.0.38 + argparse: ~1.0.9 + colors: ~1.2.1 + string-argv: ~0.3.1 + checksum: 6ee016c7dcdc9c55cfaea5b71d8b34d942404764de72a51f2f4d50d4db51f1cc5e0df496de6b96eb9f086ab500f366f63afc33699adecf601f02bfe9a4d157f6 + languageName: node + linkType: hard + "@scure/base@npm:~1.0.0": version: 1.0.0 resolution: "@scure/base@npm:1.0.0" @@ -1761,6 +1858,18 @@ __metadata: languageName: node linkType: hard +"@ts-morph/common@npm:~0.13.0": + version: 0.13.0 + resolution: "@ts-morph/common@npm:0.13.0" + dependencies: + fast-glob: ^3.2.11 + minimatch: ^5.0.1 + mkdirp: ^1.0.4 + path-browserify: ^1.0.1 + checksum: 88b3d4b82dc6aca12741e55c6bf037f2243d14f4b9c42bbe28ed4a773ae9cd8d3ca6a6f9f827b5830c188037b0781d881a002ddb73e094fa5d5ff2a3352dc842 + languageName: node + linkType: hard + "@tsconfig/node10@npm:^1.0.7": version: 1.0.9 resolution: "@tsconfig/node10@npm:1.0.9" @@ -1842,6 +1951,13 @@ __metadata: languageName: node linkType: hard +"@types/argparse@npm:1.0.38": + version: 1.0.38 + resolution: "@types/argparse@npm:1.0.38" + checksum: 26ed7e3f1e3595efdb883a852f5205f971b798e4c28b7e30a32c5298eee596e8b45834ce831f014d250b9730819ab05acff5b31229666d3af4ba465b4697d0eb + languageName: node + linkType: hard + "@types/bn.js@npm:*, @types/bn.js@npm:^5.1.0": version: 5.1.0 resolution: "@types/bn.js@npm:5.1.0" @@ -2016,6 +2132,13 @@ __metadata: languageName: node linkType: hard +"@types/node@npm:12.20.24": + version: 12.20.24 + resolution: "@types/node@npm:12.20.24" + checksum: e7a13460e2f5b0b5a32c0f3af7daf1a05201552a66d542d3cc3b1ea8b52d4730250f9eb1961d755e31cfe5d03c78340911a6242657a0a9a17d6f7e341fc9f366 + languageName: node + linkType: hard + "@types/node@npm:^10.0.3": version: 10.17.60 resolution: "@types/node@npm:10.17.60" @@ -2440,6 +2563,9 @@ __metadata: "@zetachain/addresses@workspace:^, @zetachain/addresses@workspace:packages/addresses": version: 0.0.0-use.local resolution: "@zetachain/addresses@workspace:packages/addresses" + dependencies: + vite: ^3.1.0 + vite-plugin-dts: ^1.4.1 languageName: unknown linkType: soft @@ -2679,7 +2805,7 @@ __metadata: languageName: node linkType: hard -"ajv@npm:^6.10.0, ajv@npm:^6.12.3, ajv@npm:^6.12.4": +"ajv@npm:^6.10.0, ajv@npm:^6.12.3, ajv@npm:^6.12.4, ajv@npm:~6.12.6": version: 6.12.6 resolution: "ajv@npm:6.12.6" dependencies: @@ -2822,7 +2948,7 @@ __metadata: languageName: node linkType: hard -"argparse@npm:^1.0.7": +"argparse@npm:^1.0.7, argparse@npm:~1.0.9": version: 1.0.10 resolution: "argparse@npm:1.0.10" dependencies: @@ -3950,6 +4076,15 @@ __metadata: languageName: node linkType: hard +"brace-expansion@npm:^2.0.1": + version: 2.0.1 + resolution: "brace-expansion@npm:2.0.1" + dependencies: + balanced-match: ^1.0.0 + checksum: a61e7cd2e8a8505e9f0036b3b6108ba5e926b4b55089eeb5550cd04a471fe216c96d4fe7e4c7f995c728c554ae20ddfc4244cad10aef255e72b62930afd233d1 + languageName: node + linkType: hard + "braces@npm:^2.3.1": version: 2.3.2 resolution: "braces@npm:2.3.2" @@ -4618,6 +4753,13 @@ __metadata: languageName: node linkType: hard +"code-block-writer@npm:^11.0.0": + version: 11.0.3 + resolution: "code-block-writer@npm:11.0.3" + checksum: f0a2605f19963d7087267c9b0fd0b05a6638a50e7b29b70f97aa01a514f59475b0626f8aa092188df853ee6d96745426dfa132d6a677795df462c6ce32c21639 + languageName: node + linkType: hard + "code-point-at@npm:^1.0.0": version: 1.1.0 resolution: "code-point-at@npm:1.1.0" @@ -4683,6 +4825,13 @@ __metadata: languageName: node linkType: hard +"colors@npm:~1.2.1": + version: 1.2.5 + resolution: "colors@npm:1.2.5" + checksum: b6e23de735f68b72d5cdf6fd854ca43d1b66d82dcf54bda0b788083b910164a040f2c4edf23c670d36a7a2d8f1b7d6e62e3292703e4642691e6ccaa1c62d8f74 + languageName: node + linkType: hard + "combined-stream@npm:^1.0.6, combined-stream@npm:^1.0.8, combined-stream@npm:~1.0.6": version: 1.0.8 resolution: "combined-stream@npm:1.0.8" @@ -4743,6 +4892,13 @@ __metadata: languageName: node linkType: hard +"commander@npm:^2.20.3": + version: 2.20.3 + resolution: "commander@npm:2.20.3" + checksum: ab8c07884e42c3a8dbc5dd9592c606176c7eb5c1ca5ff274bcf907039b2c41de3626f684ea75ccf4d361ba004bbaff1f577d5384c155f3871e456bdf27becf9e + languageName: node + linkType: hard + "component-emitter@npm:^1.2.1": version: 1.3.0 resolution: "component-emitter@npm:1.3.0" @@ -5742,6 +5898,220 @@ __metadata: languageName: node linkType: hard +"esbuild-android-64@npm:0.15.7": + version: 0.15.7 + resolution: "esbuild-android-64@npm:0.15.7" + conditions: os=android & cpu=x64 + languageName: node + linkType: hard + +"esbuild-android-arm64@npm:0.15.7": + version: 0.15.7 + resolution: "esbuild-android-arm64@npm:0.15.7" + conditions: os=android & cpu=arm64 + languageName: node + linkType: hard + +"esbuild-darwin-64@npm:0.15.7": + version: 0.15.7 + resolution: "esbuild-darwin-64@npm:0.15.7" + conditions: os=darwin & cpu=x64 + languageName: node + linkType: hard + +"esbuild-darwin-arm64@npm:0.15.7": + version: 0.15.7 + resolution: "esbuild-darwin-arm64@npm:0.15.7" + conditions: os=darwin & cpu=arm64 + languageName: node + linkType: hard + +"esbuild-freebsd-64@npm:0.15.7": + version: 0.15.7 + resolution: "esbuild-freebsd-64@npm:0.15.7" + conditions: os=freebsd & cpu=x64 + languageName: node + linkType: hard + +"esbuild-freebsd-arm64@npm:0.15.7": + version: 0.15.7 + resolution: "esbuild-freebsd-arm64@npm:0.15.7" + conditions: os=freebsd & cpu=arm64 + languageName: node + linkType: hard + +"esbuild-linux-32@npm:0.15.7": + version: 0.15.7 + resolution: "esbuild-linux-32@npm:0.15.7" + conditions: os=linux & cpu=ia32 + languageName: node + linkType: hard + +"esbuild-linux-64@npm:0.15.7": + version: 0.15.7 + resolution: "esbuild-linux-64@npm:0.15.7" + conditions: os=linux & cpu=x64 + languageName: node + linkType: hard + +"esbuild-linux-arm64@npm:0.15.7": + version: 0.15.7 + resolution: "esbuild-linux-arm64@npm:0.15.7" + conditions: os=linux & cpu=arm64 + languageName: node + linkType: hard + +"esbuild-linux-arm@npm:0.15.7": + version: 0.15.7 + resolution: "esbuild-linux-arm@npm:0.15.7" + conditions: os=linux & cpu=arm + languageName: node + linkType: hard + +"esbuild-linux-mips64le@npm:0.15.7": + version: 0.15.7 + resolution: "esbuild-linux-mips64le@npm:0.15.7" + conditions: os=linux & cpu=mips64el + languageName: node + linkType: hard + +"esbuild-linux-ppc64le@npm:0.15.7": + version: 0.15.7 + resolution: "esbuild-linux-ppc64le@npm:0.15.7" + conditions: os=linux & cpu=ppc64 + languageName: node + linkType: hard + +"esbuild-linux-riscv64@npm:0.15.7": + version: 0.15.7 + resolution: "esbuild-linux-riscv64@npm:0.15.7" + conditions: os=linux & cpu=riscv64 + languageName: node + linkType: hard + +"esbuild-linux-s390x@npm:0.15.7": + version: 0.15.7 + resolution: "esbuild-linux-s390x@npm:0.15.7" + conditions: os=linux & cpu=s390x + languageName: node + linkType: hard + +"esbuild-netbsd-64@npm:0.15.7": + version: 0.15.7 + resolution: "esbuild-netbsd-64@npm:0.15.7" + conditions: os=netbsd & cpu=x64 + languageName: node + linkType: hard + +"esbuild-openbsd-64@npm:0.15.7": + version: 0.15.7 + resolution: "esbuild-openbsd-64@npm:0.15.7" + conditions: os=openbsd & cpu=x64 + languageName: node + linkType: hard + +"esbuild-sunos-64@npm:0.15.7": + version: 0.15.7 + resolution: "esbuild-sunos-64@npm:0.15.7" + conditions: os=sunos & cpu=x64 + languageName: node + linkType: hard + +"esbuild-windows-32@npm:0.15.7": + version: 0.15.7 + resolution: "esbuild-windows-32@npm:0.15.7" + conditions: os=win32 & cpu=ia32 + languageName: node + linkType: hard + +"esbuild-windows-64@npm:0.15.7": + version: 0.15.7 + resolution: "esbuild-windows-64@npm:0.15.7" + conditions: os=win32 & cpu=x64 + languageName: node + linkType: hard + +"esbuild-windows-arm64@npm:0.15.7": + version: 0.15.7 + resolution: "esbuild-windows-arm64@npm:0.15.7" + conditions: os=win32 & cpu=arm64 + languageName: node + linkType: hard + +"esbuild@npm:^0.15.6": + version: 0.15.7 + resolution: "esbuild@npm:0.15.7" + dependencies: + "@esbuild/linux-loong64": 0.15.7 + esbuild-android-64: 0.15.7 + esbuild-android-arm64: 0.15.7 + esbuild-darwin-64: 0.15.7 + esbuild-darwin-arm64: 0.15.7 + esbuild-freebsd-64: 0.15.7 + esbuild-freebsd-arm64: 0.15.7 + esbuild-linux-32: 0.15.7 + esbuild-linux-64: 0.15.7 + esbuild-linux-arm: 0.15.7 + esbuild-linux-arm64: 0.15.7 + esbuild-linux-mips64le: 0.15.7 + esbuild-linux-ppc64le: 0.15.7 + esbuild-linux-riscv64: 0.15.7 + esbuild-linux-s390x: 0.15.7 + esbuild-netbsd-64: 0.15.7 + esbuild-openbsd-64: 0.15.7 + esbuild-sunos-64: 0.15.7 + esbuild-windows-32: 0.15.7 + esbuild-windows-64: 0.15.7 + esbuild-windows-arm64: 0.15.7 + dependenciesMeta: + "@esbuild/linux-loong64": + optional: true + esbuild-android-64: + optional: true + esbuild-android-arm64: + optional: true + esbuild-darwin-64: + optional: true + esbuild-darwin-arm64: + optional: true + esbuild-freebsd-64: + optional: true + esbuild-freebsd-arm64: + optional: true + esbuild-linux-32: + optional: true + esbuild-linux-64: + optional: true + esbuild-linux-arm: + optional: true + esbuild-linux-arm64: + optional: true + esbuild-linux-mips64le: + optional: true + esbuild-linux-ppc64le: + optional: true + esbuild-linux-riscv64: + optional: true + esbuild-linux-s390x: + optional: true + esbuild-netbsd-64: + optional: true + esbuild-openbsd-64: + optional: true + esbuild-sunos-64: + optional: true + esbuild-windows-32: + optional: true + esbuild-windows-64: + optional: true + esbuild-windows-arm64: + optional: true + bin: + esbuild: bin/esbuild + checksum: 54ddaa6cf96798d817861b4f68cb8d176075dc09b6e0ed511c57e5db6fd86d2c673ac2ec631ad9b11678d58ad4a77cd6b7a3853b9c6eac29b7f5c6d38e42f92e + languageName: node + linkType: hard + "escalade@npm:^3.1.1": version: 3.1.1 resolution: "escalade@npm:3.1.1" @@ -6985,7 +7355,7 @@ __metadata: languageName: node linkType: hard -"fast-glob@npm:^3.0.3, fast-glob@npm:^3.2.9": +"fast-glob@npm:^3.0.3, fast-glob@npm:^3.2.11, fast-glob@npm:^3.2.9": version: 3.2.11 resolution: "fast-glob@npm:3.2.11" dependencies: @@ -7354,6 +7724,17 @@ __metadata: languageName: node linkType: hard +"fs-extra@npm:^10.0.1": + version: 10.1.0 + resolution: "fs-extra@npm:10.1.0" + dependencies: + graceful-fs: ^4.2.0 + jsonfile: ^6.0.1 + universalify: ^2.0.0 + checksum: dc94ab37096f813cc3ca12f0f1b5ad6744dfed9ed21e953d72530d103cea193c2f81584a39e9dee1bea36de5ee66805678c0dddc048e8af1427ac19c00fffc50 + languageName: node + linkType: hard + "fs-extra@npm:^4.0.2, fs-extra@npm:^4.0.3": version: 4.0.3 resolution: "fs-extra@npm:4.0.3" @@ -7365,7 +7746,7 @@ __metadata: languageName: node linkType: hard -"fs-extra@npm:^7.0.0, fs-extra@npm:^7.0.1": +"fs-extra@npm:^7.0.0, fs-extra@npm:^7.0.1, fs-extra@npm:~7.0.1": version: 7.0.1 resolution: "fs-extra@npm:7.0.1" dependencies: @@ -8408,6 +8789,13 @@ __metadata: languageName: node linkType: hard +"import-lazy@npm:~4.0.0": + version: 4.0.0 + resolution: "import-lazy@npm:4.0.0" + checksum: 22f5e51702134aef78890156738454f620e5fe7044b204ebc057c614888a1dd6fdf2ede0fdcca44d5c173fd64f65c985f19a51775b06967ef58cc3d26898df07 + languageName: node + linkType: hard + "imurmurhash@npm:^0.1.4": version: 0.1.4 resolution: "imurmurhash@npm:0.1.4" @@ -8639,6 +9027,15 @@ __metadata: languageName: node linkType: hard +"is-core-module@npm:^2.1.0, is-core-module@npm:^2.9.0": + version: 2.10.0 + resolution: "is-core-module@npm:2.10.0" + dependencies: + has: ^1.0.3 + checksum: 0f3f77811f430af3256fa7bbc806f9639534b140f8ee69476f632c3e1eb4e28a38be0b9d1b8ecf596179c841b53576129279df95e7051d694dac4ceb6f967593 + languageName: node + linkType: hard + "is-core-module@npm:^2.8.1": version: 2.8.1 resolution: "is-core-module@npm:2.8.1" @@ -9054,6 +9451,13 @@ __metadata: languageName: node linkType: hard +"jju@npm:~1.4.0": + version: 1.4.0 + resolution: "jju@npm:1.4.0" + checksum: 3790481bd2b7827dd6336e6e3dc2dcc6d425679ba7ebde7b679f61dceb4457ea0cda330972494de608571f4973c6dfb5f70fab6f3c5037dbab19ac449a60424f + languageName: node + linkType: hard + "js-sha3@npm:0.5.7, js-sha3@npm:^0.5.7": version: 0.5.7 resolution: "js-sha3@npm:0.5.7" @@ -9767,6 +10171,13 @@ __metadata: languageName: node linkType: hard +"lodash.get@npm:^4.4.2": + version: 4.4.2 + resolution: "lodash.get@npm:4.4.2" + checksum: e403047ddb03181c9d0e92df9556570e2b67e0f0a930fcbbbd779370972368f5568e914f913e93f3b08f6d492abc71e14d4e9b7a18916c31fa04bd2306efe545 + languageName: node + linkType: hard + "lodash.isequal@npm:^4.5.0": version: 4.5.0 resolution: "lodash.isequal@npm:4.5.0" @@ -9802,7 +10213,7 @@ __metadata: languageName: node linkType: hard -"lodash@npm:^4.17.11, lodash@npm:^4.17.14, lodash@npm:^4.17.15, lodash@npm:^4.17.19, lodash@npm:^4.17.21, lodash@npm:^4.17.4": +"lodash@npm:^4.17.11, lodash@npm:^4.17.14, lodash@npm:^4.17.15, lodash@npm:^4.17.19, lodash@npm:^4.17.21, lodash@npm:^4.17.4, lodash@npm:~4.17.15": version: 4.17.21 resolution: "lodash@npm:4.17.21" checksum: eb835a2e51d381e561e508ce932ea50a8e5a68f4ebdd771ea240d3048244a8d13658acbd502cd4829768c56f2e16bdd4340b9ea141297d472517b83868e677f7 @@ -10307,6 +10718,15 @@ __metadata: languageName: node linkType: hard +"minimatch@npm:^5.0.1": + version: 5.1.0 + resolution: "minimatch@npm:5.1.0" + dependencies: + brace-expansion: ^2.0.1 + checksum: 15ce53d31a06361e8b7a629501b5c75491bc2b59712d53e802b1987121d91b433d73fcc5be92974fde66b2b51d8fb28d75a9ae900d249feb792bb1ba2a4f0a90 + languageName: node + linkType: hard + "minimist-options@npm:^4.0.2": version: 4.1.0 resolution: "minimist-options@npm:4.1.0" @@ -10667,6 +11087,15 @@ __metadata: languageName: node linkType: hard +"nanoid@npm:^3.3.4": + version: 3.3.4 + resolution: "nanoid@npm:3.3.4" + bin: + nanoid: bin/nanoid.cjs + checksum: 2fddd6dee994b7676f008d3ffa4ab16035a754f4bb586c61df5a22cf8c8c94017aadd360368f47d653829e0569a92b129979152ff97af23a558331e47e37cd9c + languageName: node + linkType: hard + "nanomatch@npm:^1.2.9": version: 1.2.13 resolution: "nanomatch@npm:1.2.13" @@ -11409,7 +11838,7 @@ __metadata: languageName: node linkType: hard -"path-browserify@npm:^1.0.0": +"path-browserify@npm:^1.0.0, path-browserify@npm:^1.0.1": version: 1.0.1 resolution: "path-browserify@npm:1.0.1" checksum: c6d7fa376423fe35b95b2d67990060c3ee304fc815ff0a2dc1c6c3cfaff2bd0d572ee67e18f19d0ea3bbe32e8add2a05021132ac40509416459fffee35200699 @@ -11526,6 +11955,13 @@ __metadata: languageName: node linkType: hard +"picocolors@npm:^1.0.0": + version: 1.0.0 + resolution: "picocolors@npm:1.0.0" + checksum: a2e8092dd86c8396bdba9f2b5481032848525b3dc295ce9b57896f931e63fc16f79805144321f72976383fc249584672a75cc18d6777c6b757603f372f745981 + languageName: node + linkType: hard + "picomatch@npm:^2.0.4, picomatch@npm:^2.2.1, picomatch@npm:^2.3.1": version: 2.3.1 resolution: "picomatch@npm:2.3.1" @@ -11579,6 +12015,17 @@ __metadata: languageName: node linkType: hard +"postcss@npm:^8.4.16": + version: 8.4.16 + resolution: "postcss@npm:8.4.16" + dependencies: + nanoid: ^3.3.4 + picocolors: ^1.0.0 + source-map-js: ^1.0.2 + checksum: 10eee25efd77868036403858577da0cefaf2e0905feeaba5770d5438ccdddba3d01cba8063e96b8aac4c6daa0ed413dd5ae0554a433a3c4db38df1d134cffc1f + languageName: node + linkType: hard + "postinstall-postinstall@npm:^2.1.0": version: 2.1.0 resolution: "postinstall-postinstall@npm:2.1.0" @@ -12388,7 +12835,7 @@ __metadata: languageName: node linkType: hard -"resolve@npm:1.17.0": +"resolve@npm:1.17.0, resolve@npm:~1.17.0": version: 1.17.0 resolution: "resolve@npm:1.17.0" dependencies: @@ -12410,6 +12857,29 @@ __metadata: languageName: node linkType: hard +"resolve@npm:^1.22.1": + version: 1.22.1 + resolution: "resolve@npm:1.22.1" + dependencies: + is-core-module: ^2.9.0 + path-parse: ^1.0.7 + supports-preserve-symlinks-flag: ^1.0.0 + bin: + resolve: bin/resolve + checksum: 07af5fc1e81aa1d866cbc9e9460fbb67318a10fa3c4deadc35c3ad8a898ee9a71a86a65e4755ac3195e0ea0cfbe201eb323ebe655ce90526fd61917313a34e4e + languageName: node + linkType: hard + +"resolve@npm:~1.19.0": + version: 1.19.0 + resolution: "resolve@npm:1.19.0" + dependencies: + is-core-module: ^2.1.0 + path-parse: ^1.0.6 + checksum: a05b356e47b85ad3613d9e2a39a824f3c27f4fcad9c9ff6c7cc71a2e314c5904a90ab37481ad0069d03cab9eaaac6eb68aca1bc3355fdb05f1045cd50e2aacea + languageName: node + linkType: hard + "resolve@patch:resolve@1.1.x#~builtin": version: 1.1.7 resolution: "resolve@patch:resolve@npm%3A1.1.7#~builtin::version=1.1.7&hash=07638b" @@ -12417,7 +12887,7 @@ __metadata: languageName: node linkType: hard -"resolve@patch:resolve@1.17.0#~builtin": +"resolve@patch:resolve@1.17.0#~builtin, resolve@patch:resolve@~1.17.0#~builtin": version: 1.17.0 resolution: "resolve@patch:resolve@npm%3A1.17.0#~builtin::version=1.17.0&hash=07638b" dependencies: @@ -12439,6 +12909,29 @@ __metadata: languageName: node linkType: hard +"resolve@patch:resolve@^1.22.1#~builtin": + version: 1.22.1 + resolution: "resolve@patch:resolve@npm%3A1.22.1#~builtin::version=1.22.1&hash=07638b" + dependencies: + is-core-module: ^2.9.0 + path-parse: ^1.0.7 + supports-preserve-symlinks-flag: ^1.0.0 + bin: + resolve: bin/resolve + checksum: 5656f4d0bedcf8eb52685c1abdf8fbe73a1603bb1160a24d716e27a57f6cecbe2432ff9c89c2bd57542c3a7b9d14b1882b73bfe2e9d7849c9a4c0b8b39f02b8b + languageName: node + linkType: hard + +"resolve@patch:resolve@~1.19.0#~builtin": + version: 1.19.0 + resolution: "resolve@patch:resolve@npm%3A1.19.0#~builtin::version=1.19.0&hash=07638b" + dependencies: + is-core-module: ^2.1.0 + path-parse: ^1.0.6 + checksum: 2443b94d347e6946c87c85faf13071f605e609e0b54784829b0ed2b917d050bfc1cbaf4ecc6453f224cfa7d0c5dcd97cbb273454cd210bee68e4af15c1a5abc9 + languageName: node + linkType: hard + "responselike@npm:^1.0.2": version: 1.0.2 resolution: "responselike@npm:1.0.2" @@ -12531,6 +13024,20 @@ __metadata: languageName: node linkType: hard +"rollup@npm:~2.78.0": + version: 2.78.1 + resolution: "rollup@npm:2.78.1" + dependencies: + fsevents: ~2.3.2 + dependenciesMeta: + fsevents: + optional: true + bin: + rollup: dist/bin/rollup + checksum: 9034814383ca5bdb4bea6d499270aeb31cdb0bb884f81b0c6a1d19c63cc973f040e6ee09b7af8a7169dd231c090f4b44ef8b99c4bfdf884aceeb3dcefb8cfa14 + languageName: node + linkType: hard + "run-async@npm:^2.4.0": version: 2.4.1 resolution: "run-async@npm:2.4.1" @@ -12728,7 +13235,7 @@ __metadata: languageName: node linkType: hard -"semver@npm:^7.3.7": +"semver@npm:^7.3.7, semver@npm:~7.3.0": version: 7.3.7 resolution: "semver@npm:7.3.7" dependencies: @@ -13134,6 +13641,13 @@ __metadata: languageName: node linkType: hard +"source-map-js@npm:^1.0.2": + version: 1.0.2 + resolution: "source-map-js@npm:1.0.2" + checksum: c049a7fc4deb9a7e9b481ae3d424cc793cb4845daa690bc5a05d428bf41bf231ced49b4cf0c9e77f9d42fdb3d20d6187619fc586605f5eabe995a316da8d377c + languageName: node + linkType: hard + "source-map-resolve@npm:^0.5.0": version: 0.5.3 resolution: "source-map-resolve@npm:0.5.3" @@ -13190,7 +13704,7 @@ __metadata: languageName: node linkType: hard -"source-map@npm:^0.6.0, source-map@npm:^0.6.1": +"source-map@npm:^0.6.0, source-map@npm:^0.6.1, source-map@npm:~0.6.1": version: 0.6.1 resolution: "source-map@npm:0.6.1" checksum: 59ce8640cf3f3124f64ac289012c2b8bd377c238e316fb323ea22fbfe83da07d81e000071d7242cad7a23cd91c7de98e4df8830ec3f133cb6133a5f6e9f67bc2 @@ -13362,6 +13876,13 @@ __metadata: languageName: node linkType: hard +"string-argv@npm:~0.3.1": + version: 0.3.1 + resolution: "string-argv@npm:0.3.1" + checksum: efbd0289b599bee808ce80820dfe49c9635610715429c6b7cc50750f0437e3c2f697c81e5c390208c13b5d5d12d904a1546172a88579f6ee5cbaaaa4dc9ec5cf + languageName: node + linkType: hard + "string-format@npm:^2.0.0": version: 2.0.0 resolution: "string-format@npm:2.0.0" @@ -13567,7 +14088,7 @@ __metadata: languageName: node linkType: hard -"strip-json-comments@npm:3.1.1, strip-json-comments@npm:^3.1.0, strip-json-comments@npm:^3.1.1": +"strip-json-comments@npm:3.1.1, strip-json-comments@npm:^3.1.0, strip-json-comments@npm:^3.1.1, strip-json-comments@npm:~3.1.1": version: 3.1.1 resolution: "strip-json-comments@npm:3.1.1" checksum: 492f73e27268f9b1c122733f28ecb0e7e8d8a531a6662efbd08e22cccb3f9475e90a1b82cab06a392f6afae6d2de636f977e231296400d0ec5304ba70f166443 @@ -14004,6 +14525,16 @@ __metadata: languageName: node linkType: hard +"ts-morph@npm:^14.0.0": + version: 14.0.0 + resolution: "ts-morph@npm:14.0.0" + dependencies: + "@ts-morph/common": ~0.13.0 + code-block-writer: ^11.0.0 + checksum: e975fb245ae558c638e94014dcbbad828b904dee5a7309bfb4ef2b2922d0d7ad902ec00874a959be58991043ce655f78ae78df0d0e0d6fb3800b991b95be08ce + languageName: node + linkType: hard + "ts-node@npm:10.8.1": version: 10.8.1 resolution: "ts-node@npm:10.8.1" @@ -14307,6 +14838,16 @@ __metadata: languageName: node linkType: hard +"typescript@npm:~4.7.4": + version: 4.7.4 + resolution: "typescript@npm:4.7.4" + bin: + tsc: bin/tsc + tsserver: bin/tsserver + checksum: 5750181b1cd7e6482c4195825547e70f944114fb47e58e4aa7553e62f11b3f3173766aef9c281783edfd881f7b8299cf35e3ca8caebe73d8464528c907a164df + languageName: node + linkType: hard + "typescript@patch:typescript@^4.6.3#~builtin": version: 4.6.3 resolution: "typescript@patch:typescript@npm%3A4.6.3#~builtin::version=4.6.3&hash=bda367" @@ -14317,6 +14858,16 @@ __metadata: languageName: node linkType: hard +"typescript@patch:typescript@~4.7.4#~builtin": + version: 4.7.4 + resolution: "typescript@patch:typescript@npm%3A4.7.4#~builtin::version=4.7.4&hash=bda367" + bin: + tsc: bin/tsc + tsserver: bin/tsserver + checksum: 96d3030cb01143570567cb4f3a616b10df65f658f0e74e853e77a089a6a954e35c800be7db8b9bfe9a1ae05d9c2897e281359f65e4caa1caf266368e1c4febd3 + languageName: node + linkType: hard + "typewise-core@npm:^1.2, typewise-core@npm:^1.2.0": version: 1.2.0 resolution: "typewise-core@npm:1.2.0" @@ -14664,6 +15215,13 @@ __metadata: languageName: node linkType: hard +"validator@npm:^13.7.0": + version: 13.7.0 + resolution: "validator@npm:13.7.0" + checksum: 2b83283de1222ca549a7ef57f46e8d49c6669213348db78b7045bce36a3b5843ff1e9f709ebf74574e06223461ee1f264f8cc9a26a0060a79a27de079d8286ef + languageName: node + linkType: hard + "varint@npm:^5.0.0": version: 5.0.2 resolution: "varint@npm:5.0.2" @@ -14689,6 +15247,55 @@ __metadata: languageName: node linkType: hard +"vite-plugin-dts@npm:^1.4.1": + version: 1.4.1 + resolution: "vite-plugin-dts@npm:1.4.1" + dependencies: + "@microsoft/api-extractor": ^7.20.0 + "@rushstack/node-core-library": ^3.45.1 + chalk: ^4.1.2 + debug: ^4.3.4 + fast-glob: ^3.2.11 + fs-extra: ^10.0.1 + ts-morph: ^14.0.0 + peerDependencies: + vite: ">=2.4.4" + checksum: 39a5d25f1e5de984f85e09c85f0b6b16de82c209bfc55f59a2d6b30996f14c683462895814ec388406116a7fad4a1d374efacbf51d76a7bdaad9c9708307f982 + languageName: node + linkType: hard + +"vite@npm:^3.1.0": + version: 3.1.0 + resolution: "vite@npm:3.1.0" + dependencies: + esbuild: ^0.15.6 + fsevents: ~2.3.2 + postcss: ^8.4.16 + resolve: ^1.22.1 + rollup: ~2.78.0 + peerDependencies: + less: "*" + sass: "*" + stylus: "*" + terser: ^5.4.0 + dependenciesMeta: + fsevents: + optional: true + peerDependenciesMeta: + less: + optional: true + sass: + optional: true + stylus: + optional: true + terser: + optional: true + bin: + vite: bin/vite.js + checksum: 1a343e3d46450181f79f34ff49cca5ff59bb7472de51ea2c4a042aa076f597d27d25c49f48405e82f607af7d8c1c13a9e789402ccb1b23570132382132ec3903 + languageName: node + linkType: hard + "wcwidth@npm:^1.0.1": version: 1.0.1 resolution: "wcwidth@npm:1.0.1" @@ -15877,6 +16484,23 @@ __metadata: languageName: node linkType: hard +"z-schema@npm:~5.0.2": + version: 5.0.4 + resolution: "z-schema@npm:5.0.4" + dependencies: + commander: ^2.20.3 + lodash.get: ^4.4.2 + lodash.isequal: ^4.5.0 + validator: ^13.7.0 + dependenciesMeta: + commander: + optional: true + bin: + z-schema: bin/z-schema + checksum: afa4e0039a104a53eeb6977bf754ef44e32042aecbf3b5eb18b82649763abd5c2608e47d6d6902291359b41e76130594d7f2b6132316d819c3529f17d4d3464d + languageName: node + linkType: hard + "zetachain@workspace:.": version: 0.0.0-use.local resolution: "zetachain@workspace:." From 252fd0ccde8d620d2c35395bdec9c4bdab207c7d Mon Sep 17 00:00:00 2001 From: Andres Martin Aiello <50411235+andresaiello@users.noreply.github.com> Date: Wed, 7 Sep 2022 13:10:10 -0300 Subject: [PATCH 038/115] Upgrade node (#49) --- .github/workflows/release.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index d8a94b67..084d0918 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -15,10 +15,10 @@ jobs: - name: Checkout Repo uses: actions/checkout@v2 - - name: Setup Node.js 12.x + - name: Setup Node.js 16.x uses: actions/setup-node@v2 with: - node-version: 12.x + node-version: 16.x - name: Install Dependencies run: yarn From 0520781e10534826471a97ee10e7f41fc1b98051 Mon Sep 17 00:00:00 2001 From: Andres Martin Aiello <50411235+andresaiello@users.noreply.github.com> Date: Mon, 12 Sep 2022 15:56:08 -0300 Subject: [PATCH 039/115] Fix zeta connector deployment scripts (#50) --- packages/protocol-contracts/scripts/deploy-zeta-connector.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/protocol-contracts/scripts/deploy-zeta-connector.ts b/packages/protocol-contracts/scripts/deploy-zeta-connector.ts index 7fcfd71d..8543e2a2 100644 --- a/packages/protocol-contracts/scripts/deploy-zeta-connector.ts +++ b/packages/protocol-contracts/scripts/deploy-zeta-connector.ts @@ -16,11 +16,11 @@ export async function deployZetaConnector() { if (isEthNetworkName(network.name)) { contract = await deployZetaConnectorEth({ - args: [getAddress("zetaToken"), getAddress("tss"), getAddress("tssUpdater")] + args: [getAddress("zetaToken"), getAddress("tss"), getAddress("tssUpdater"), getAddress("tssUpdater")] }); } else { contract = await deployZetaConnectorNonEth({ - args: [getAddress("zetaToken"), getAddress("tss"), getAddress("tssUpdater")] + args: [getAddress("zetaToken"), getAddress("tss"), getAddress("tssUpdater"), getAddress("tssUpdater")] }); } From 0eca92b4af9ab41b30b02403b7dc45a527b0d10d Mon Sep 17 00:00:00 2001 From: Andres Martin Aiello <50411235+andresaiello@users.noreply.github.com> Date: Mon, 19 Sep 2022 11:44:52 -0300 Subject: [PATCH 040/115] Deploy connector and zeta token to Klaytn (#46) --- packages/addresses/src/addresses.athens.json | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/packages/addresses/src/addresses.athens.json b/packages/addresses/src/addresses.athens.json index 444dd417..d7d3edce 100644 --- a/packages/addresses/src/addresses.athens.json +++ b/packages/addresses/src/addresses.athens.json @@ -72,5 +72,23 @@ "zetaToken": "0x000080383847bd75f91c168269aa74004877592f", "zetaTokenConsumerUniV2": "0x197bC8e7e813DfB95dEf0DAA44399648bC86f329", "immutableCreate2Factory": "0x095a03c6a68137fE9a566bBc3e552F299d8b886d" + }, + "klaytn-baobab": { + "connector": "0x000054d3A0Bc83Ec7808F52fCdC28A96c89F6C5c", + "crossChainCounter": "", + "crossChainNft": "", + "dai": "", + "multiChainValue": "", + "tss": "0x61141Bce5352fC9b5Ff648468676e356518D86AB", + "tssUpdater": "0x7274d1d5dddef36aac53dd45b93487ce01ef0a55", + "uniswapV2Router02": "", + "uniswapV3NftManager": "", + "uniswapV3Quoter": "", + "uniswapV3Router": "", + "usdc": "", + "weth9": "", + "zetaToken": "0x000080383847bD75F91c168269Aa74004877592f", + "zetaTokenConsumerUniV2": "", + "immutableCreate2Factory": "0x095a03c6a68137fE9a566bBc3e552F299d8b886d" } } \ No newline at end of file From 77e3185d69308b4c4f28efb9317b085000383006 Mon Sep 17 00:00:00 2001 From: Andres Martin Aiello <50411235+andresaiello@users.noreply.github.com> Date: Tue, 20 Sep 2022 16:04:54 -0300 Subject: [PATCH 041/115] Add different strategies to swap (#42) * Add different strategies to swap * consumer option * update CROSS_CHAIN_SWAP_MESSAGE * add test * remove old swap v3 * add deployment script * contract changes * update comment * update comment * deployment --- packages/addresses/src/addresses.athens.json | 9 +- .../multi-chain-swap/MultiChainSwap.bsc.sol | 14 - .../multi-chain-swap/MultiChainSwap.eth.sol | 16 - .../multi-chain-swap/MultiChainSwap.sol | 67 ++ ...e.sol => MultiChainSwapUniV2.strategy.sol} | 50 +- .../MultiChainSwapUniV3.strategy.sol | 251 +++++++ .../test/MultiChainSwapZetaConnector.sol | 7 +- .../MultiChainSwap.helpers.ts | 18 +- packages/example-contracts/package.json | 1 + .../deploy-multi-chain-swap-v3.ts | 32 + .../deploy-multi-chain-swap.ts | 7 +- .../multi-chain-swap/deterministic-deploy.ts | 4 +- .../multi-chain-swap/do-cross-chain-swap.ts | 7 +- .../multi-chain-swap/set-cross-chain-data.ts | 7 +- .../test/MultiChainSwap.spec.ts | 23 +- .../test/MultiChainSwapUniswapV3.spec.ts | 660 ++++++++++++++++++ .../example-contracts/test/test.helpers.ts | 24 +- yarn.lock | 1 + 18 files changed, 1085 insertions(+), 113 deletions(-) delete mode 100644 packages/example-contracts/contracts/multi-chain-swap/MultiChainSwap.bsc.sol delete mode 100644 packages/example-contracts/contracts/multi-chain-swap/MultiChainSwap.eth.sol create mode 100644 packages/example-contracts/contracts/multi-chain-swap/MultiChainSwap.sol rename packages/example-contracts/contracts/multi-chain-swap/{MultiChainSwap.base.sol => MultiChainSwapUniV2.strategy.sol} (89%) create mode 100644 packages/example-contracts/contracts/multi-chain-swap/MultiChainSwapUniV3.strategy.sol create mode 100644 packages/example-contracts/scripts/multi-chain-swap/deploy-multi-chain-swap-v3.ts create mode 100644 packages/example-contracts/test/MultiChainSwapUniswapV3.spec.ts diff --git a/packages/addresses/src/addresses.athens.json b/packages/addresses/src/addresses.athens.json index d7d3edce..de75cb94 100644 --- a/packages/addresses/src/addresses.athens.json +++ b/packages/addresses/src/addresses.athens.json @@ -47,13 +47,14 @@ "tssUpdater": "0x7274d1d5dddef36aac53dd45b93487ce01ef0a55", "uniswapV2Router02": "0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D", "uniswapV3NftManager": "", - "uniswapV3Quoter": "", - "uniswapV3Router": "", + "uniswapV3Quoter": "0xb27308f9F90D607463bb33eA1BeBb41C27CE5AB6", + "uniswapV3Router": "0xE592427A0AEce92De3Edee1F18E0157C05861564", "usdc": "", - "weth9": "", + "weth9": "0x9c3C9283D3e44854697Cd22D3Faa240Cfb032889", "zetaToken": "0x000080383847bd75f91c168269aa74004877592f", "zetaTokenConsumerUniV2": "", - "immutableCreate2Factory": "0x095a03c6a68137fE9a566bBc3e552F299d8b886d" + "immutableCreate2Factory": "0x095a03c6a68137fE9a566bBc3e552F299d8b886d", + "multiChainSwap": "0xaf28cb0d9E045170E1642321B964740784E7dC64" }, "ropsten": { "connector": "0x000054d3A0Bc83Ec7808F52fCdC28A96c89F6C5c", diff --git a/packages/example-contracts/contracts/multi-chain-swap/MultiChainSwap.bsc.sol b/packages/example-contracts/contracts/multi-chain-swap/MultiChainSwap.bsc.sol deleted file mode 100644 index 43729a0b..00000000 --- a/packages/example-contracts/contracts/multi-chain-swap/MultiChainSwap.bsc.sol +++ /dev/null @@ -1,14 +0,0 @@ -// SPDX-License-Identifier: MIT -pragma solidity 0.8.7; - -import "@zetachain/protocol-contracts/contracts/interfaces/ZetaInterfaces.sol"; - -abstract contract MultiChainSwapBsc is ZetaReceiver { - address public connectorAddress; - ZetaConnector internal _zetaConnector; - - constructor(address _connectorAddress) { - connectorAddress = _connectorAddress; - _zetaConnector = ZetaConnector(_connectorAddress); - } -} diff --git a/packages/example-contracts/contracts/multi-chain-swap/MultiChainSwap.eth.sol b/packages/example-contracts/contracts/multi-chain-swap/MultiChainSwap.eth.sol deleted file mode 100644 index 64e8e95a..00000000 --- a/packages/example-contracts/contracts/multi-chain-swap/MultiChainSwap.eth.sol +++ /dev/null @@ -1,16 +0,0 @@ -// SPDX-License-Identifier: MIT -pragma solidity 0.8.7; - -import "@zetachain/protocol-contracts/contracts/interfaces/ZetaInterfaces.sol"; - -import "./MultiChainSwap.base.sol"; - -abstract contract MultiChainSwapEth is MultiChainSwapBase { - address public connectorAddress; - ZetaConnector internal _zetaConnector; - - constructor(address _connectorAddress) { - connectorAddress = _connectorAddress; - _zetaConnector = ZetaConnector(_connectorAddress); - } -} diff --git a/packages/example-contracts/contracts/multi-chain-swap/MultiChainSwap.sol b/packages/example-contracts/contracts/multi-chain-swap/MultiChainSwap.sol new file mode 100644 index 00000000..e771ab73 --- /dev/null +++ b/packages/example-contracts/contracts/multi-chain-swap/MultiChainSwap.sol @@ -0,0 +1,67 @@ +// SPDX-License-Identifier: MIT +pragma solidity 0.8.7; + +import "@zetachain/protocol-contracts/contracts/ZetaInteractor.sol"; + +interface MultiChainSwap is ZetaReceiver { + event SentTokenSwap( + address sourceTxOrigin, + address sourceInputToken, + uint256 inputTokenAmount, + address destinationOutToken, + uint256 outTokenMinAmount, + address receiverAddress + ); + + event SentEthSwap( + address sourceTxOrigin, + uint256 inputEthAmount, + address destinationOutToken, + uint256 outTokenMinAmount, + address receiverAddress + ); + + event Swapped( + address sourceTxOrigin, + address sourceInputToken, + uint256 inputTokenAmount, + address destinationOutToken, + uint256 outTokenFinalAmount, + address receiverAddress + ); + + event RevertedSwap( + address sourceTxOrigin, + address sourceInputToken, + uint256 inputTokenAmount, + uint256 inputTokenReturnedAmount + ); + + function swapETHForTokensCrossChain( + bytes calldata receiverAddress, + address destinationOutToken, + bool isDestinationOutETH, + /** + * @dev The minimum amount of tokens that receiverAddress should get, + * if it's not reached, the transaction will revert on the destination chain + */ + uint256 outTokenMinAmount, + uint256 destinationChainId, + uint256 crossChaindestinationGasLimit + ) external payable; + + function swapTokensForTokensCrossChain( + address sourceInputToken, + uint256 inputTokenAmount, + bytes calldata receiverAddress, + address destinationOutToken, + bool isDestinationOutETH, + /** + * @dev The minimum amount of tokens that receiverAddress should get, + * if it's not reached, the transaction will revert on the destination chain + */ + uint256 outTokenMinAmount, + uint256 destinationChainId, + uint256 crossChaindestinationGasLimit + ) external; +} diff --git a/packages/example-contracts/contracts/multi-chain-swap/MultiChainSwap.base.sol b/packages/example-contracts/contracts/multi-chain-swap/MultiChainSwapUniV2.strategy.sol similarity index 89% rename from packages/example-contracts/contracts/multi-chain-swap/MultiChainSwap.base.sol rename to packages/example-contracts/contracts/multi-chain-swap/MultiChainSwapUniV2.strategy.sol index 627d4401..b07e3463 100644 --- a/packages/example-contracts/contracts/multi-chain-swap/MultiChainSwap.base.sol +++ b/packages/example-contracts/contracts/multi-chain-swap/MultiChainSwapUniV2.strategy.sol @@ -3,12 +3,11 @@ pragma solidity 0.8.7; import "@openzeppelin/contracts/interfaces/IERC20.sol"; import "@uniswap/v2-periphery/contracts/interfaces/IUniswapV2Router02.sol"; -import "@zetachain/protocol-contracts/contracts/ZetaInteractor.sol"; -import "@zetachain/protocol-contracts/contracts/interfaces/ZetaInterfaces.sol"; import "./MultiChainSwapErrors.sol"; +import "./MultiChainSwap.sol"; -contract MultiChainSwapBase is ZetaInteractor, ZetaReceiver, MultiChainSwapErrors { +contract MultiChainSwapUniV2 is MultiChainSwap, ZetaInteractor, MultiChainSwapErrors { uint16 internal constant MAX_DEADLINE = 200; bytes32 public constant CROSS_CHAIN_SWAP_MESSAGE = keccak256("CROSS_CHAIN_SWAP"); @@ -18,39 +17,6 @@ contract MultiChainSwapBase is ZetaInteractor, ZetaReceiver, MultiChainSwapError IUniswapV2Router02 internal uniswapV2Router; - event SentTokenSwap( - address sourceTxOrigin, - address sourceInputToken, - uint256 inputTokenAmount, - address destinationOutToken, - uint256 outTokenMinAmount, - address receiverAddress - ); - - event SentEthSwap( - address sourceTxOrigin, - uint256 inputEthAmount, - address destinationOutToken, - uint256 outTokenMinAmount, - address receiverAddress - ); - - event Swapped( - address sourceTxOrigin, - address sourceInputToken, - uint256 inputTokenAmount, - address destinationOutToken, - uint256 outTokenFinalAmount, - address receiverAddress - ); - - event RevertedSwap( - address sourceTxOrigin, - address sourceInputToken, - uint256 inputTokenAmount, - uint256 inputTokenReturnedAmount - ); - constructor( address zetaConnector_, address zetaToken_, @@ -73,7 +39,7 @@ contract MultiChainSwapBase is ZetaInteractor, ZetaReceiver, MultiChainSwapError uint256 outTokenMinAmount, uint256 destinationChainId, uint256 crossChaindestinationGasLimit - ) external payable { + ) external payable override { if (!_isValidChainId(destinationChainId)) revert InvalidDestinationChainId(); if (msg.value == 0) revert ValueShouldBeGreaterThanZero(); @@ -89,7 +55,7 @@ contract MultiChainSwapBase is ZetaInteractor, ZetaReceiver, MultiChainSwapError path[1] = zetaToken; uint256[] memory amounts = uniswapV2Router.swapExactETHForTokens{value: msg.value}( - 0, /// @dev Output can't be validated here, it's validated after the next swap + 0, /// @todo Add min amount path, address(this), block.timestamp + MAX_DEADLINE @@ -139,7 +105,7 @@ contract MultiChainSwapBase is ZetaInteractor, ZetaReceiver, MultiChainSwapError uint256 outTokenMinAmount, uint256 destinationChainId, uint256 crossChaindestinationGasLimit - ) external { + ) external override { if (!_isValidChainId(destinationChainId)) revert InvalidDestinationChainId(); if (sourceInputToken == address(0)) revert MissingSourceInputTokenAddress(); @@ -180,7 +146,7 @@ contract MultiChainSwapBase is ZetaInteractor, ZetaReceiver, MultiChainSwapError uint256[] memory amounts = uniswapV2Router.swapExactTokensForTokens( inputTokenAmount, - 0, /// @dev Output can't be validated here, it's validated after the next swap + 0, /// @todo Add min amount path, address(this), block.timestamp + MAX_DEADLINE @@ -357,7 +323,7 @@ contract MultiChainSwapBase is ZetaInteractor, ZetaReceiver, MultiChainSwapError if (inputTokenIsETH) { amounts = uniswapV2Router.swapExactTokensForETH( zetaRevert.remainingZetaValue, - 0, /// @dev Any output is fine, otherwise the value will be stuck in the contract + 0, /// @todo Add min amount path, sourceTxOrigin, block.timestamp + MAX_DEADLINE @@ -365,7 +331,7 @@ contract MultiChainSwapBase is ZetaInteractor, ZetaReceiver, MultiChainSwapError } else { amounts = uniswapV2Router.swapExactTokensForTokens( zetaRevert.remainingZetaValue, - 0, /// @dev Any output is fine, otherwise the value will be stuck in the contract + 0, /// @todo Add min amount path, sourceTxOrigin, block.timestamp + MAX_DEADLINE diff --git a/packages/example-contracts/contracts/multi-chain-swap/MultiChainSwapUniV3.strategy.sol b/packages/example-contracts/contracts/multi-chain-swap/MultiChainSwapUniV3.strategy.sol new file mode 100644 index 00000000..b6be0d2e --- /dev/null +++ b/packages/example-contracts/contracts/multi-chain-swap/MultiChainSwapUniV3.strategy.sol @@ -0,0 +1,251 @@ +// SPDX-License-Identifier: MIT +pragma solidity 0.8.7; + +import "@openzeppelin/contracts/interfaces/IERC20.sol"; +import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol"; +import "@zetachain/protocol-contracts/contracts/ZetaTokenConsumerUniV3.strategy.sol"; + +import "./MultiChainSwapErrors.sol"; +import "./MultiChainSwap.sol"; + +contract MultiChainSwapUniV3 is MultiChainSwap, ZetaInteractor, MultiChainSwapErrors, ZetaTokenConsumerUniV3 { + using SafeERC20 for IERC20; + bytes32 public constant CROSS_CHAIN_SWAP_MESSAGE = keccak256("CROSS_CHAIN_SWAP"); + + constructor( + address zetaConnector_, + address zetaToken_, + address uniswapV3Router_, + address quoter_, + address WETH9Address_, + uint24 zetaPoolFee_, + uint24 tokenPoolFee_ + ) + ZetaTokenConsumerUniV3(zetaToken_, uniswapV3Router_, quoter_, WETH9Address_, zetaPoolFee_, tokenPoolFee_) + ZetaInteractor(zetaConnector_) + {} + + function swapETHForTokensCrossChain( + bytes calldata receiverAddress, + address destinationOutToken, + bool isDestinationOutETH, + /** + * @dev The minimum amount of tokens that receiverAddress should get, + * if it's not reached, the transaction will revert on the destination chain + */ + uint256 outTokenMinAmount, + uint256 destinationChainId, + uint256 crossChaindestinationGasLimit + ) external payable override { + if (!_isValidChainId(destinationChainId)) revert InvalidDestinationChainId(); + + if (msg.value == 0) revert ValueShouldBeGreaterThanZero(); + if ( + (destinationOutToken != address(0) && isDestinationOutETH) || + (destinationOutToken == address(0) && !isDestinationOutETH) + ) revert OutTokenInvariant(); + + uint256 zetaValueAndGas = this.getZetaFromEth{value: msg.value}( + address(this), + 0 /// @todo Add min amount + ); + if (zetaValueAndGas == 0) revert ErrorSwappingTokens(); + + IERC20(zetaToken).safeApprove(address(connector), zetaValueAndGas); + + connector.send( + ZetaInterfaces.SendInput({ + destinationChainId: destinationChainId, + destinationAddress: interactorsByChainId[destinationChainId], + destinationGasLimit: crossChaindestinationGasLimit, + message: abi.encode( + CROSS_CHAIN_SWAP_MESSAGE, + msg.sender, + WETH9Address, + msg.value, + receiverAddress, + destinationOutToken, + isDestinationOutETH, + outTokenMinAmount, + true // inputTokenIsETH + ), + zetaValueAndGas: zetaValueAndGas, + zetaParams: abi.encode("") + }) + ); + } + + function swapTokensForTokensCrossChain( + address sourceInputToken, + uint256 inputTokenAmount, + bytes calldata receiverAddress, + address destinationOutToken, + bool isDestinationOutETH, + /** + * @dev The minimum amount of tokens that receiverAddress should get, + * if it's not reached, the transaction will revert on the destination chain + */ + uint256 outTokenMinAmount, + uint256 destinationChainId, + uint256 crossChaindestinationGasLimit + ) external override { + if (!_isValidChainId(destinationChainId)) revert InvalidDestinationChainId(); + + if (sourceInputToken == address(0)) revert MissingSourceInputTokenAddress(); + if ( + (destinationOutToken != address(0) && isDestinationOutETH) || + (destinationOutToken == address(0) && !isDestinationOutETH) + ) revert OutTokenInvariant(); + + uint256 zetaValueAndGas; + + IERC20(sourceInputToken).safeTransferFrom(msg.sender, address(this), inputTokenAmount); + + if (sourceInputToken == zetaToken) { + zetaValueAndGas = inputTokenAmount; + } else { + IERC20(sourceInputToken).safeApprove(address(this), inputTokenAmount); + zetaValueAndGas = this.getZetaFromToken( + address(this), + 0, /// @todo Add min amount + sourceInputToken, + inputTokenAmount + ); + + if (zetaValueAndGas == 0) revert ErrorSwappingTokens(); + } + + IERC20(zetaToken).safeApprove(address(connector), zetaValueAndGas); + + connector.send( + ZetaInterfaces.SendInput({ + destinationChainId: destinationChainId, + destinationAddress: interactorsByChainId[destinationChainId], + destinationGasLimit: crossChaindestinationGasLimit, + message: abi.encode( + CROSS_CHAIN_SWAP_MESSAGE, + msg.sender, + sourceInputToken, + inputTokenAmount, + receiverAddress, + destinationOutToken, + isDestinationOutETH, + outTokenMinAmount, + false // inputTokenIsETH + ), + zetaValueAndGas: zetaValueAndGas, + zetaParams: abi.encode("") + }) + ); + } + + function onZetaMessage(ZetaInterfaces.ZetaMessage calldata zetaMessage) + external + override + isValidMessageCall(zetaMessage) + { + ( + bytes32 messageType, + address sourceTxOrigin, + address sourceInputToken, + uint256 inputTokenAmount, + bytes memory receiverAddressEncoded, + address destinationOutToken, + bool isDestinationOutETH, + uint256 outTokenMinAmount, + + ) = abi.decode(zetaMessage.message, (bytes32, address, address, uint256, bytes, address, bool, uint256, bool)); + if (messageType != CROSS_CHAIN_SWAP_MESSAGE) revert InvalidMessageType(); + + uint256 outTokenFinalAmount; + if (destinationOutToken == zetaToken) { + if (zetaMessage.zetaValue < outTokenMinAmount) revert InsufficientOutToken(); + + IERC20(zetaToken).safeTransfer(address(uint160(bytes20(receiverAddressEncoded))), zetaMessage.zetaValue); + + outTokenFinalAmount = zetaMessage.zetaValue; + } else { + /** + * @dev If the out token is not Zeta, get it using Uniswap + */ + IERC20(zetaToken).safeApprove(address(this), zetaMessage.zetaValue); + + if (isDestinationOutETH) { + outTokenFinalAmount = this.getEthFromZeta( + address(uint160(bytes20(receiverAddressEncoded))), + outTokenMinAmount, + zetaMessage.zetaValue + ); + } else { + outTokenFinalAmount = this.getTokenFromZeta( + address(uint160(bytes20(receiverAddressEncoded))), + outTokenMinAmount, + destinationOutToken, + zetaMessage.zetaValue + ); + } + + if (outTokenFinalAmount == 0) revert ErrorSwappingTokens(); + if (outTokenFinalAmount < outTokenMinAmount) revert InsufficientOutToken(); + } + + emit Swapped( + sourceTxOrigin, + sourceInputToken, + inputTokenAmount, + destinationOutToken, + outTokenFinalAmount, + address(uint160(bytes20(receiverAddressEncoded))) + ); + } + + function onZetaRevert(ZetaInterfaces.ZetaRevert calldata zetaRevert) + external + override + isValidRevertCall(zetaRevert) + { + /** + * @dev: If something goes wrong we must swap to the source input token + */ + ( + , + address sourceTxOrigin, + address sourceInputToken, + uint256 inputTokenAmount, + , + , + , + , + bool inputTokenIsETH + ) = abi.decode(zetaRevert.message, (bytes32, address, address, uint256, bytes, address, bool, uint256, bool)); + + uint256 inputTokenReturnedAmount; + if (sourceInputToken == zetaToken) { + IERC20(zetaToken).safeApprove(address(this), zetaRevert.remainingZetaValue); + IERC20(zetaToken).safeTransferFrom(address(this), sourceTxOrigin, zetaRevert.remainingZetaValue); + inputTokenReturnedAmount = zetaRevert.remainingZetaValue; + } else { + /** + * @dev If the source input token is not Zeta, trade it using Uniswap + */ + IERC20(zetaToken).safeApprove(address(this), zetaRevert.remainingZetaValue); + + if (inputTokenIsETH) { + inputTokenReturnedAmount = this.getEthFromZeta( + sourceTxOrigin, + 0, /// @todo Add min amount + zetaRevert.remainingZetaValue + ); + } else { + inputTokenReturnedAmount = this.getTokenFromZeta( + sourceTxOrigin, + 0, /// @todo Add min amount + sourceInputToken, + zetaRevert.remainingZetaValue + ); + } + } + + emit RevertedSwap(sourceTxOrigin, sourceInputToken, inputTokenAmount, inputTokenReturnedAmount); + } +} diff --git a/packages/example-contracts/contracts/multi-chain-swap/test/MultiChainSwapZetaConnector.sol b/packages/example-contracts/contracts/multi-chain-swap/test/MultiChainSwapZetaConnector.sol index 2ecc1d33..4146c3cf 100644 --- a/packages/example-contracts/contracts/multi-chain-swap/test/MultiChainSwapZetaConnector.sol +++ b/packages/example-contracts/contracts/multi-chain-swap/test/MultiChainSwapZetaConnector.sol @@ -1,9 +1,10 @@ // SPDX-License-Identifier: MIT pragma solidity 0.8.7; +import "@openzeppelin/contracts/interfaces/IERC20.sol"; import "@zetachain/protocol-contracts/contracts/interfaces/ZetaInterfaces.sol"; -import "../MultiChainSwap.base.sol"; +import "../MultiChainSwap.sol"; contract MultiChainSwapZetaConnector is ZetaConnector { address public zetaToken; @@ -20,7 +21,7 @@ contract MultiChainSwapZetaConnector is ZetaConnector { bytes calldata message ) public { return - MultiChainSwapBase(payable(destinationAddress)).onZetaMessage( + MultiChainSwap(payable(destinationAddress)).onZetaMessage( ZetaInterfaces.ZetaMessage({ zetaTxSenderAddress: zetaTxSenderAddress, sourceChainId: sourceChainId, @@ -41,7 +42,7 @@ contract MultiChainSwapZetaConnector is ZetaConnector { bytes calldata message ) public { return - MultiChainSwapBase(payable(zetaTxSenderAddress)).onZetaRevert( + MultiChainSwap(payable(zetaTxSenderAddress)).onZetaRevert( ZetaInterfaces.ZetaRevert({ zetaTxSenderAddress: zetaTxSenderAddress, sourceChainId: sourceChainId, diff --git a/packages/example-contracts/lib/multi-chain-swap/MultiChainSwap.helpers.ts b/packages/example-contracts/lib/multi-chain-swap/MultiChainSwap.helpers.ts index cb078c99..ab377170 100644 --- a/packages/example-contracts/lib/multi-chain-swap/MultiChainSwap.helpers.ts +++ b/packages/example-contracts/lib/multi-chain-swap/MultiChainSwap.helpers.ts @@ -1,14 +1,22 @@ import { - MultiChainSwapBase, - MultiChainSwapBase__factory as MultiChainSwapBaseFactory, + MultiChainSwapUniV2, + MultiChainSwapUniV2__factory as MultiChainSwapUniV2Factory, + MultiChainSwapUniV3, + MultiChainSwapUniV3__factory as MultiChainSwapUniV3Factory, MultiChainSwapZetaConnector, MultiChainSwapZetaConnector__factory, } from "../../typechain-types"; import { getContract, GetContractParams } from "../shared/deploy.helpers"; -export const getMultiChainSwapBase = async (params: GetContractParams) => - getContract({ - contractName: "MultiChainSwapBase", +export const getMultiChainSwapUniV2 = async (params: GetContractParams) => + getContract({ + contractName: "MultiChainSwapUniV2", + ...params, + }); + +export const getMultiChainSwapUniV3 = async (params: GetContractParams) => + getContract({ + contractName: "MultiChainSwapUniV3", ...params, }); diff --git a/packages/example-contracts/package.json b/packages/example-contracts/package.json index 84984bbd..3ca4b2ac 100644 --- a/packages/example-contracts/package.json +++ b/packages/example-contracts/package.json @@ -32,6 +32,7 @@ "dependencies": { "@openzeppelin/contracts": "4.6.0", "@uniswap/v2-periphery": "1.1.0-beta.0", + "@uniswap/v3-periphery": "1.1.0", "@zetachain/addresses": "workspace:^", "@zetachain/addresses-tools": "workspace:^", "@zetachain/interfaces": "workspace:^", diff --git a/packages/example-contracts/scripts/multi-chain-swap/deploy-multi-chain-swap-v3.ts b/packages/example-contracts/scripts/multi-chain-swap/deploy-multi-chain-swap-v3.ts new file mode 100644 index 00000000..a5750262 --- /dev/null +++ b/packages/example-contracts/scripts/multi-chain-swap/deploy-multi-chain-swap-v3.ts @@ -0,0 +1,32 @@ +import { getAddress, isNetworkName } from "@zetachain/addresses"; +import { saveAddress } from "@zetachain/addresses-tools"; +import { network } from "hardhat"; + +import { getMultiChainSwapUniV3 } from "../../lib/multi-chain-swap/MultiChainSwap.helpers"; + +export async function deployMultiChainSwap() { + if (!isNetworkName(network.name) || !network.name) throw new Error("Invalid network name"); + + const CONNECTOR = getAddress("connector"); + + const ZETA_TOKEN = getAddress("zetaToken"); + + const UNI_QUOTER_V3 = getAddress("uniswapV3Quoter"); + + const UNI_ROUTER_V3 = getAddress("uniswapV3Router"); + + const WETH = getAddress("weth9"); + + const multiChainSwapContract = await getMultiChainSwapUniV3({ + deployParams: [CONNECTOR, ZETA_TOKEN, UNI_ROUTER_V3, UNI_QUOTER_V3, WETH, 500, 3000], + }); + + saveAddress("multiChainSwap", multiChainSwapContract.address); +} + +if (!process.env.EXECUTE_PROGRAMMATICALLY) { + deployMultiChainSwap().catch(error => { + console.error(error); + process.exit(1); + }); +} diff --git a/packages/example-contracts/scripts/multi-chain-swap/deploy-multi-chain-swap.ts b/packages/example-contracts/scripts/multi-chain-swap/deploy-multi-chain-swap.ts index a6304a49..47efe8da 100644 --- a/packages/example-contracts/scripts/multi-chain-swap/deploy-multi-chain-swap.ts +++ b/packages/example-contracts/scripts/multi-chain-swap/deploy-multi-chain-swap.ts @@ -2,14 +2,13 @@ import { isNetworkName } from "@zetachain/addresses"; import { saveAddress } from "@zetachain/addresses-tools"; import { network } from "hardhat"; -import { getMultiChainSwapBase } from "../../lib/multi-chain-swap/MultiChainSwap.helpers"; -import { getAddress } from "../../lib/shared/address.helpers"; +import { getMultiChainSwapUniV2 } from "../../lib/multi-chain-swap/MultiChainSwap.helpers"; export async function deployMultiChainSwap() { if (!isNetworkName(network.name) || !network.name) throw new Error("Invalid network name"); - const multiChainSwapContract = await getMultiChainSwapBase({ - deployParams: [getAddress("connector"), getAddress("zetaToken"), getAddress("uniswapV2Router02")] + const multiChainSwapContract = await getMultiChainSwapUniV2({ + deployParams: [getAddress("connector"), getAddress("zetaToken"), getAddress("uniswapV2Router02")], }); saveAddress("multiChainSwap", multiChainSwapContract.address); diff --git a/packages/example-contracts/scripts/multi-chain-swap/deterministic-deploy.ts b/packages/example-contracts/scripts/multi-chain-swap/deterministic-deploy.ts index e0548606..c6728ec4 100644 --- a/packages/example-contracts/scripts/multi-chain-swap/deterministic-deploy.ts +++ b/packages/example-contracts/scripts/multi-chain-swap/deterministic-deploy.ts @@ -6,7 +6,7 @@ import { ethers, network } from "hardhat"; import { getAddress } from "../../lib/shared/address.helpers"; import { deployContractToAddress, saltToHex } from "../../lib/shared/ImmutableCreate2Factory.helpers"; import { isEthNetworkName } from "../../lib/shared/network.constants"; -import { MultiChainSwapBase__factory } from "../../typechain-types"; +import { MultiChainSwapUniV2__factory } from "../../typechain-types"; import { setMultiChainSwapCrossChainData } from "./set-cross-chain-data"; const DEPLOYER_ADDRESS = process.env.DEPLOYER_ADDRESS ?? ""; @@ -34,7 +34,7 @@ export async function deterministicDeployMultiChainSwap() { const constructorTypes = ["address", "address", "address"]; const constructorArgs = [connector, zetaToken, uniswapV2Router02]; - const contractBytecode = MultiChainSwapBase__factory.bytecode; + const contractBytecode = MultiChainSwapUniV2__factory.bytecode; const { address } = await deployContractToAddress({ constructorArgs, diff --git a/packages/example-contracts/scripts/multi-chain-swap/do-cross-chain-swap.ts b/packages/example-contracts/scripts/multi-chain-swap/do-cross-chain-swap.ts index 2216292e..52617afd 100644 --- a/packages/example-contracts/scripts/multi-chain-swap/do-cross-chain-swap.ts +++ b/packages/example-contracts/scripts/multi-chain-swap/do-cross-chain-swap.ts @@ -2,8 +2,7 @@ import { isNetworkName } from "@zetachain/addresses"; import { parseUnits } from "ethers/lib/utils"; import { ethers, network } from "hardhat"; -import { getMultiChainSwapBase } from "../../lib/multi-chain-swap/MultiChainSwap.helpers"; -import { getAddress } from "../../lib/shared/address.helpers"; +import { getMultiChainSwapUniV2 } from "../../lib/multi-chain-swap/MultiChainSwap.helpers"; import { networkVariables } from "../../lib/shared/network.constants"; export async function doCrossChainSwap() { @@ -13,8 +12,8 @@ export async function doCrossChainSwap() { if (!_networkVariables.crossChainName) throw new Error("Invalid crossChainName"); - const multiChainSwapContract = await getMultiChainSwapBase({ - existingContractAddress: getAddress("multiChainSwap") + const multiChainSwapContract = await getMultiChainSwapUniV2({ + existingContractAddress: getAddress("multiChainSwap"), }); const [account1] = await ethers.getSigners(); diff --git a/packages/example-contracts/scripts/multi-chain-swap/set-cross-chain-data.ts b/packages/example-contracts/scripts/multi-chain-swap/set-cross-chain-data.ts index 0e7aeeb2..6c8a1aed 100644 --- a/packages/example-contracts/scripts/multi-chain-swap/set-cross-chain-data.ts +++ b/packages/example-contracts/scripts/multi-chain-swap/set-cross-chain-data.ts @@ -1,8 +1,7 @@ import { isNetworkName } from "@zetachain/addresses"; import { ethers, network } from "hardhat"; -import { getMultiChainSwapBase } from "../../lib/multi-chain-swap/MultiChainSwap.helpers"; -import { getAddress } from "../../lib/shared/address.helpers"; +import { getMultiChainSwapUniV2 } from "../../lib/multi-chain-swap/MultiChainSwap.helpers"; import { networkVariables } from "../../lib/shared/network.constants"; export async function setMultiChainSwapCrossChainData() { @@ -14,8 +13,8 @@ export async function setMultiChainSwapCrossChainData() { const crossChainMultiChainSwapAddress = getAddress("multiChainSwap"); - const crossChainMultiChainSwapContract = await getMultiChainSwapBase({ - existingContractAddress: crossChainMultiChainSwapAddress + const crossChainMultiChainSwapContract = await getMultiChainSwapUniV2({ + existingContractAddress: crossChainMultiChainSwapAddress, }); const crossChainAddress = getAddress("multiChainSwap", { diff --git a/packages/example-contracts/test/MultiChainSwap.spec.ts b/packages/example-contracts/test/MultiChainSwap.spec.ts index 3143a65f..7aa254a0 100644 --- a/packages/example-contracts/test/MultiChainSwap.spec.ts +++ b/packages/example-contracts/test/MultiChainSwap.spec.ts @@ -6,14 +6,13 @@ import { SignerWithAddress } from "@nomiclabs/hardhat-ethers/signers"; import chai, { expect } from "chai"; import { ethers } from "hardhat"; -import { getMultiChainSwapBase, getMultiChainSwapZetaConnector } from "../lib/multi-chain-swap/MultiChainSwap.helpers"; -import { getAddress } from "../lib/shared/address.helpers"; +import { getMultiChainSwapUniV2, getMultiChainSwapZetaConnector } from "../lib/multi-chain-swap/MultiChainSwap.helpers"; import { getNow, getZetaMock } from "../lib/shared/deploy.helpers"; import { ERC20__factory, IERC20, IUniswapV2Router02, - MultiChainSwapBase, + MultiChainSwapUniV2, MultiChainSwapZetaConnector, UniswapV2Router02__factory } from "../typechain-types"; @@ -32,14 +31,14 @@ describe("MultiChainSwap tests", () => { let USDCTokenContract: IERC20; let zetaConnectorMock: MultiChainSwapZetaConnector; - let multiChainSwapContractA: MultiChainSwapBase; + let multiChainSwapContractA: MultiChainSwapUniV2; const chainAId = 1; - let multiChainSwapContractB: MultiChainSwapBase; + let multiChainSwapContractB: MultiChainSwapUniV2; const chainBId = 2; let zetaConnectorSmock: FakeContract; - let multiChainSwapContractWithSmock: MultiChainSwapBase; + let multiChainSwapContractWithSmock: MultiChainSwapUniV2; let accounts: SignerWithAddress[]; let deployer: SignerWithAddress; @@ -101,17 +100,17 @@ describe("MultiChainSwap tests", () => { const ERC20Factory = new ERC20__factory(deployer); USDCTokenContract = ERC20Factory.attach(USDC_ADDR); - multiChainSwapContractA = await getMultiChainSwapBase({ - deployParams: [zetaConnectorMock.address, zetaTokenMock.address, uniswapRouterAddr] + multiChainSwapContractA = await getMultiChainSwapUniV2({ + deployParams: [zetaConnectorMock.address, zetaTokenMock.address, uniswapRouterAddr], }); - multiChainSwapContractB = await getMultiChainSwapBase({ - deployParams: [zetaConnectorMock.address, zetaTokenMock.address, uniswapRouterAddr] + multiChainSwapContractB = await getMultiChainSwapUniV2({ + deployParams: [zetaConnectorMock.address, zetaTokenMock.address, uniswapRouterAddr], }); zetaConnectorSmock = await smock.fake("MultiChainSwapZetaConnector"); - multiChainSwapContractWithSmock = await getMultiChainSwapBase({ - deployParams: [zetaConnectorSmock.address, zetaTokenMock.address, uniswapRouterAddr] + multiChainSwapContractWithSmock = await getMultiChainSwapUniV2({ + deployParams: [zetaConnectorSmock.address, zetaTokenMock.address, uniswapRouterAddr], }); const encodedCrossChainAddressB = ethers.utils.solidityPack(["address"], [multiChainSwapContractB.address]); diff --git a/packages/example-contracts/test/MultiChainSwapUniswapV3.spec.ts b/packages/example-contracts/test/MultiChainSwapUniswapV3.spec.ts new file mode 100644 index 00000000..1214451c --- /dev/null +++ b/packages/example-contracts/test/MultiChainSwapUniswapV3.spec.ts @@ -0,0 +1,660 @@ +import { FakeContract, smock } from "@defi-wonderland/smock"; +import { BigNumber } from "@ethersproject/bignumber"; +import { AddressZero, MaxUint256 } from "@ethersproject/constants"; +import { parseEther, parseUnits } from "@ethersproject/units"; +import { SignerWithAddress } from "@nomiclabs/hardhat-ethers/signers"; +import { getAddress } from "@zetachain/addresses"; +import { IERC20__factory } from "@zetachain/interfaces/typechain-types"; +import chai, { expect } from "chai"; +import { ethers } from "hardhat"; + +import { getMultiChainSwapUniV3, getMultiChainSwapZetaConnector } from "../lib/multi-chain-swap/MultiChainSwap.helpers"; +import { getNow } from "../lib/shared/deploy.helpers"; +import { + ERC20__factory, + IERC20, + MultiChainSwapUniV3, + MultiChainSwapZetaConnector, + UniswapV2Router02__factory, +} from "../typechain-types"; +import { getCustomErrorMessage, parseInteractorLog } from "./test.helpers"; + +chai.should(); +chai.use(smock.matchers); + +const swapToken = async (signer: SignerWithAddress, tokenAddress: string, expectedAmount: BigNumber) => { + const uniswapV2RouterAddr = getAddress("uniswapV2Router02", { + customNetworkName: "eth-mainnet", + customZetaNetwork: "mainnet", + }); + + const uniswapRouter = UniswapV2Router02__factory.connect(uniswapV2RouterAddr, signer); + + const WETH = await uniswapRouter.WETH(); + const path = [WETH, tokenAddress]; + const tx = await uniswapRouter + .connect(signer) + .swapETHForExactTokens(expectedAmount, path, signer.address, (await getNow()) + 360, { value: parseEther("10") }); + + await tx.wait(); +}; + +const encoder = new ethers.utils.AbiCoder(); +const HARDHAT_CHAIN_ID = 1337; + +const ZETA_TO_TRANSFER = parseUnits("1"); +const USDC_TO_TRANSFER = parseUnits("1", 6); + +describe("MultiChainSwap tests", () => { + let WETH: string; + let zetaTokenMock: IERC20; + let zetaTokenNonEthAddress: string; + let USDCTokenContract: IERC20; + let zetaConnectorMock: MultiChainSwapZetaConnector; + + let multiChainSwapContractA: MultiChainSwapUniV3; + const chainAId = 1; + + let multiChainSwapContractB: MultiChainSwapUniV3; + const chainBId = 2; + + let zetaConnectorSmock: FakeContract; + let multiChainSwapContractWithSmock: MultiChainSwapUniV3; + + let accounts: SignerWithAddress[]; + let deployer: SignerWithAddress; + let account1: SignerWithAddress; + + const clearUSDCBalance = async (account: SignerWithAddress) => { + const balance = await USDCTokenContract.balanceOf(account.address); + const w = ethers.Wallet.createRandom(); + const tx = await USDCTokenContract.connect(account).transfer(w.address, balance); + await tx.wait(); + }; + + const clearZetaBalance = async (account: SignerWithAddress) => { + const balance = await zetaTokenMock.balanceOf(account.address); + const w = ethers.Wallet.createRandom(); + const tx = await zetaTokenMock.connect(account).transfer(w.address, balance); + await tx.wait(); + }; + + beforeEach(async () => { + accounts = await ethers.getSigners(); + [deployer, account1] = accounts; + + const DAI = getAddress("dai", { + customNetworkName: "eth-mainnet", + customZetaNetwork: "mainnet", + }); + + const UNI_QUOTER_V3 = getAddress("uniswapV3Quoter", { + customNetworkName: "eth-mainnet", + customZetaNetwork: "mainnet", + }); + + const UNI_ROUTER_V3 = getAddress("uniswapV3Router", { + customNetworkName: "eth-mainnet", + customZetaNetwork: "mainnet", + }); + + WETH = getAddress("weth9", { + customNetworkName: "eth-mainnet", + customZetaNetwork: "mainnet", + }); + + const USDC_ADDR = getAddress("usdc", { + customNetworkName: "eth-mainnet", + customZetaNetwork: "mainnet", + }); + + const ERC20Factory = new ERC20__factory(deployer); + USDCTokenContract = ERC20Factory.attach(USDC_ADDR); + + // For testing purposes we use an existing uni v3 pool + await swapToken(deployer, DAI, parseEther("10000")); + + zetaTokenNonEthAddress = DAI; + zetaTokenMock = IERC20__factory.connect(zetaTokenNonEthAddress, deployer); + zetaConnectorMock = await getMultiChainSwapZetaConnector(zetaTokenMock.address); + multiChainSwapContractA = await getMultiChainSwapUniV3({ + deployParams: [zetaConnectorMock.address, zetaTokenNonEthAddress, UNI_ROUTER_V3, UNI_QUOTER_V3, WETH, 3000, 3000], + }); + + multiChainSwapContractB = await getMultiChainSwapUniV3({ + deployParams: [zetaConnectorMock.address, zetaTokenNonEthAddress, UNI_ROUTER_V3, UNI_QUOTER_V3, WETH, 3000, 3000], + }); + + zetaConnectorSmock = await smock.fake("MultiChainSwapZetaConnector"); + multiChainSwapContractWithSmock = await getMultiChainSwapUniV3({ + deployParams: [ + zetaConnectorSmock.address, + zetaTokenNonEthAddress, + UNI_ROUTER_V3, + UNI_QUOTER_V3, + WETH, + 3000, + 3000, + ], + }); + + const encodedCrossChainAddressB = ethers.utils.solidityPack(["address"], [multiChainSwapContractB.address]); + multiChainSwapContractA.setInteractorByChainId(chainBId, encodedCrossChainAddressB); + + const encodedCrossChainAddressA = ethers.utils.solidityPack(["address"], [multiChainSwapContractA.address]); + multiChainSwapContractB.setInteractorByChainId(chainAId, encodedCrossChainAddressA); + + multiChainSwapContractWithSmock.setInteractorByChainId(chainBId, encodedCrossChainAddressB); + + await clearUSDCBalance(deployer); + await clearUSDCBalance(account1); + await clearZetaBalance(account1); + }); + + describe("swapTokensForTokensCrossChainUniswapV3", () => { + it("Should revert if the destinationChainId is not in the storage", async () => { + await expect( + multiChainSwapContractA.swapETHForTokensCrossChain( + ethers.utils.solidityPack(["address"], [account1.address]), + zetaTokenMock.address, + false, + 0, + 10, + MaxUint256, + { + value: parseUnits("1"), + } + ) + ).to.be.revertedWith(getCustomErrorMessage("InvalidDestinationChainId")); + }); + + it("Should revert if the sourceInputToken isn't provided", async () => { + await expect( + multiChainSwapContractA.swapTokensForTokensCrossChain( + AddressZero, + BigNumber.from(10), + ethers.utils.solidityPack(["address"], [account1.address]), + zetaTokenMock.address, + false, + 0, + chainBId, + MaxUint256 + ) + ).to.be.revertedWith(getCustomErrorMessage("MissingSourceInputTokenAddress")); + }); + + it("Should revert if the destinationOutToken isn't provided", async () => { + await expect( + multiChainSwapContractA.swapTokensForTokensCrossChain( + zetaTokenMock.address, + BigNumber.from(10), + ethers.utils.solidityPack(["address"], [account1.address]), + AddressZero, + false, + 0, + chainBId, + MaxUint256 + ) + ).to.be.revertedWith(getCustomErrorMessage("OutTokenInvariant")); + }); + + it("Should trade ETH for Zeta", async () => { + await swapToken(deployer, USDCTokenContract.address, USDC_TO_TRANSFER); + + expect(await zetaTokenMock.balanceOf(account1.address)).to.be.eq(0); + + const tx1 = await zetaTokenMock.approve(multiChainSwapContractA.address, ZETA_TO_TRANSFER); + await tx1.wait(); + + const tx2 = await USDCTokenContract.approve(multiChainSwapContractA.address, USDC_TO_TRANSFER); + await tx2.wait(); + + const tx3 = await multiChainSwapContractA.swapETHForTokensCrossChain( + ethers.utils.solidityPack(["address"], [account1.address]), + zetaTokenMock.address, + false, + 0, + chainBId, + MaxUint256, + { value: ZETA_TO_TRANSFER } + ); + const result = await tx3.wait(); + expect(await zetaTokenMock.balanceOf(account1.address)).to.be.gt(0); + + const eventNames = parseInteractorLog(result.logs); + expect(eventNames.filter(e => e === "EthExchangedForZeta")).to.have.lengthOf(1); + expect(eventNames.filter(e => e === "TokenExchangedForZeta")).to.have.lengthOf(0); + expect(eventNames.filter(e => e === "ZetaExchangedForEth")).to.have.lengthOf(0); + expect(eventNames.filter(e => e === "ZetaExchangedForToken")).to.have.lengthOf(0); + + const swappedFilter = multiChainSwapContractB.filters.Swapped(); + const e1 = await multiChainSwapContractB.queryFilter(swappedFilter); + expect(e1.length).to.equal(1); + }); + + it("Should trade Zeta for ETH", async () => { + await swapToken(deployer, USDCTokenContract.address, USDC_TO_TRANSFER); + + const initialETHbalance = await ethers.provider.getBalance(account1.address); + + const tx1 = await zetaTokenMock.approve(multiChainSwapContractA.address, ZETA_TO_TRANSFER); + await tx1.wait(); + + const tx2 = await USDCTokenContract.approve(multiChainSwapContractA.address, USDC_TO_TRANSFER); + await tx2.wait(); + + const tx3 = await multiChainSwapContractA.swapTokensForTokensCrossChain( + zetaTokenMock.address, + ZETA_TO_TRANSFER, + ethers.utils.solidityPack(["address"], [account1.address]), + AddressZero, + true, + 0, + chainBId, + MaxUint256 + ); + const result = await tx3.wait(); + expect(await ethers.provider.getBalance(account1.address)).to.be.gt(initialETHbalance); + + const eventNames = parseInteractorLog(result.logs); + expect(eventNames.filter(e => e === "EthExchangedForZeta")).to.have.lengthOf(0); + expect(eventNames.filter(e => e === "TokenExchangedForZeta")).to.have.lengthOf(0); + expect(eventNames.filter(e => e === "ZetaExchangedForEth")).to.have.lengthOf(1); + expect(eventNames.filter(e => e === "ZetaExchangedForToken")).to.have.lengthOf(0); + + const swappedFilter = multiChainSwapContractB.filters.Swapped(); + const e1 = await multiChainSwapContractB.queryFilter(swappedFilter); + expect(e1.length).to.equal(1); + }); + + it("Should not perform any trade if the input token is Zeta", async () => { + expect(await zetaTokenMock.balanceOf(account1.address)).to.be.eq(0); + + const tx1 = await zetaTokenMock.approve(multiChainSwapContractA.address, ZETA_TO_TRANSFER); + await tx1.wait(); + + const tx2 = await USDCTokenContract.approve(multiChainSwapContractA.address, USDC_TO_TRANSFER); + await tx2.wait(); + + const tx3 = await multiChainSwapContractA.swapTokensForTokensCrossChain( + zetaTokenMock.address, + ZETA_TO_TRANSFER, + ethers.utils.solidityPack(["address"], [account1.address]), + zetaTokenMock.address, + false, + 0, + chainBId, + MaxUint256 + ); + await tx3.wait(); + expect(await zetaTokenMock.balanceOf(account1.address)).to.be.gt(0); + + const result = await tx3.wait(); + const eventNames = parseInteractorLog(result.logs); + expect(eventNames.filter(e => e === "EthExchangedForZeta")).to.have.lengthOf(0); + expect(eventNames.filter(e => e === "TokenExchangedForZeta")).to.have.lengthOf(0); + expect(eventNames.filter(e => e === "ZetaExchangedForEth")).to.have.lengthOf(0); + expect(eventNames.filter(e => e === "ZetaExchangedForToken")).to.have.lengthOf(0); + + const swappedFilter = multiChainSwapContractB.filters.Swapped(); + const e1 = await multiChainSwapContractB.queryFilter(swappedFilter); + expect(e1.length).to.equal(1); + }); + + it("Should trade the input token for Zeta", async () => { + await swapToken(deployer, USDCTokenContract.address, USDC_TO_TRANSFER); + + expect(await zetaTokenMock.balanceOf(account1.address)).to.be.eq(0); + + const tx1 = await zetaTokenMock.approve(multiChainSwapContractA.address, ZETA_TO_TRANSFER); + await tx1.wait(); + + const tx2 = await USDCTokenContract.approve(multiChainSwapContractA.address, USDC_TO_TRANSFER); + await tx2.wait(); + + const tx3 = await multiChainSwapContractA.swapTokensForTokensCrossChain( + USDCTokenContract.address, + USDC_TO_TRANSFER, + ethers.utils.solidityPack(["address"], [account1.address]), + zetaTokenMock.address, + false, + 0, + chainBId, + MaxUint256 + ); + const result = await tx3.wait(); + expect(await zetaTokenMock.balanceOf(account1.address)).to.be.gt(0); + + const eventNames = parseInteractorLog(result.logs); + expect(eventNames.filter(e => e === "EthExchangedForZeta")).to.have.lengthOf(0); + expect(eventNames.filter(e => e === "TokenExchangedForZeta")).to.have.lengthOf(1); + expect(eventNames.filter(e => e === "ZetaExchangedForEth")).to.have.lengthOf(0); + expect(eventNames.filter(e => e === "ZetaExchangedForToken")).to.have.lengthOf(0); + + const swappedFilter = multiChainSwapContractB.filters.Swapped(); + const e1 = await multiChainSwapContractB.queryFilter(swappedFilter); + expect(e1.length).to.equal(1); + }); + + it("Should trade zeta for the output token", async () => { + await swapToken(deployer, USDCTokenContract.address, USDC_TO_TRANSFER); + + expect(await USDCTokenContract.balanceOf(account1.address)).to.be.eq(0); + + const tx1 = await zetaTokenMock.approve(multiChainSwapContractA.address, ZETA_TO_TRANSFER); + await tx1.wait(); + + const tx2 = await USDCTokenContract.approve(multiChainSwapContractA.address, USDC_TO_TRANSFER); + await tx2.wait(); + + const tx3 = await multiChainSwapContractA.swapTokensForTokensCrossChain( + zetaTokenMock.address, + ZETA_TO_TRANSFER, + ethers.utils.solidityPack(["address"], [account1.address]), + USDCTokenContract.address, + false, + 0, + chainBId, + MaxUint256 + ); + const result = await tx3.wait(); + expect(await USDCTokenContract.balanceOf(account1.address)).to.be.gt(0); + + const eventNames = parseInteractorLog(result.logs); + expect(eventNames.filter(e => e === "EthExchangedForZeta")).to.have.lengthOf(0); + expect(eventNames.filter(e => e === "TokenExchangedForZeta")).to.have.lengthOf(0); + expect(eventNames.filter(e => e === "ZetaExchangedForEth")).to.have.lengthOf(0); + expect(eventNames.filter(e => e === "ZetaExchangedForToken")).to.have.lengthOf(1); + + const swappedFilter = multiChainSwapContractB.filters.Swapped(); + const e1 = await multiChainSwapContractB.queryFilter(swappedFilter); + expect(e1.length).to.equal(1); + }); + + it("Should trade input token for zeta and zeta for the output token", async () => { + await swapToken(deployer, USDCTokenContract.address, USDC_TO_TRANSFER); + + expect(await USDCTokenContract.balanceOf(account1.address)).to.be.eq(0); + + const tx1 = await zetaTokenMock.approve(multiChainSwapContractA.address, ZETA_TO_TRANSFER); + await tx1.wait(); + + const tx2 = await USDCTokenContract.approve(multiChainSwapContractA.address, USDC_TO_TRANSFER); + await tx2.wait(); + + const tx3 = await multiChainSwapContractA.swapTokensForTokensCrossChain( + USDCTokenContract.address, + USDC_TO_TRANSFER, + ethers.utils.solidityPack(["address"], [account1.address]), + USDCTokenContract.address, + false, + 0, + chainBId, + MaxUint256 + ); + const result = await tx3.wait(); + expect(await USDCTokenContract.balanceOf(account1.address)).to.be.gt(0); + + const eventNames = parseInteractorLog(result.logs); + expect(eventNames.filter(e => e === "EthExchangedForZeta")).to.have.lengthOf(0); + expect(eventNames.filter(e => e === "TokenExchangedForZeta")).to.have.lengthOf(1); + expect(eventNames.filter(e => e === "ZetaExchangedForEth")).to.have.lengthOf(0); + expect(eventNames.filter(e => e === "ZetaExchangedForToken")).to.have.lengthOf(1); + + const swappedFilter = multiChainSwapContractB.filters.Swapped(); + const e1 = await multiChainSwapContractB.queryFilter(swappedFilter); + expect(e1.length).to.equal(1); + }); + + it("Should call connector.send", async () => { + await swapToken(deployer, USDCTokenContract.address, USDC_TO_TRANSFER); + + expect(await USDCTokenContract.balanceOf(account1.address)).to.be.eq(0); + + const tx1 = await zetaTokenMock.approve(multiChainSwapContractWithSmock.address, ZETA_TO_TRANSFER); + await tx1.wait(); + + const tx2 = await USDCTokenContract.approve(multiChainSwapContractWithSmock.address, USDC_TO_TRANSFER); + await tx2.wait(); + + const tx3 = await multiChainSwapContractWithSmock.swapTokensForTokensCrossChain( + USDCTokenContract.address, + USDC_TO_TRANSFER, + ethers.utils.solidityPack(["address"], [account1.address]), + USDCTokenContract.address, + false, + 0, + chainBId, + MaxUint256 + ); + + zetaConnectorSmock.send.atCall(0).should.be.called; + }); + + it("Should emit a SentTokenSwap event", async () => { + await swapToken(deployer, USDCTokenContract.address, USDC_TO_TRANSFER); + + expect(await USDCTokenContract.balanceOf(account1.address)).to.be.eq(0); + + const tx1 = await zetaTokenMock.approve(multiChainSwapContractA.address, ZETA_TO_TRANSFER); + await tx1.wait(); + + const tx2 = await USDCTokenContract.approve(multiChainSwapContractA.address, USDC_TO_TRANSFER); + await tx2.wait(); + + const tx3 = await multiChainSwapContractA.swapTokensForTokensCrossChain( + USDCTokenContract.address, + USDC_TO_TRANSFER, + ethers.utils.solidityPack(["address"], [account1.address]), + USDCTokenContract.address, + false, + 0, + chainBId, + MaxUint256 + ); + await tx3.wait(); + + const swappedFilter = multiChainSwapContractB.filters.Swapped(); + const e1 = await multiChainSwapContractB.queryFilter(swappedFilter); + expect(e1.length).to.equal(1); + }); + + describe("onZetaMessage", () => { + it("Should revert if the caller is not ZetaConnector", async () => { + await expect( + multiChainSwapContractA.onZetaMessage({ + destinationAddress: multiChainSwapContractB.address, + message: encoder.encode(["address"], [multiChainSwapContractA.address]), + sourceChainId: chainBId, + zetaTxSenderAddress: ethers.utils.solidityPack(["address"], [multiChainSwapContractA.address]), + zetaValue: 0, + }) + ).to.be.revertedWith(getCustomErrorMessage("InvalidCaller", [deployer.address])); + }); + + it("Should revert if the zetaTxSenderAddress it not in interactorsByChainId", async () => { + await expect( + zetaConnectorMock.callOnZetaMessage( + ethers.utils.solidityPack(["address"], [multiChainSwapContractB.address]), + chainAId, + multiChainSwapContractB.address, + 0, + encoder.encode(["address"], [multiChainSwapContractB.address]) + ) + ).to.be.revertedWith(getCustomErrorMessage("InvalidZetaMessageCall")); + }); + }); + + describe("onZetaRevert", () => { + it("Should revert if the caller is not ZetaConnector", async () => { + await expect( + multiChainSwapContractA.onZetaRevert({ + destinationAddress: ethers.utils.solidityPack(["address"], [multiChainSwapContractB.address]), + destinationChainId: chainBId, + message: encoder.encode(["address"], [multiChainSwapContractA.address]), + remainingZetaValue: 0, + sourceChainId: chainAId, + zetaTxSenderAddress: deployer.address, + }) + ).to.be.revertedWith(getCustomErrorMessage("InvalidCaller", [deployer.address])); + }); + + it("Should trade the returned Zeta back for the input zeta token", async () => { + const tx1 = await zetaTokenMock.transfer(multiChainSwapContractA.address, parseUnits("10")); + await tx1.wait(); + + const originAddressInitialZetaBalance = await zetaTokenMock.balanceOf(deployer.address); + + const message = encoder.encode( + ["bytes32", "address", "address", "uint256", "bytes", "address", "bool", "uint256", "bool"], + [ + "0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff", + deployer.address, + zetaTokenMock.address, + 0, + "0xffffffff", + multiChainSwapContractA.address, + true, + 0, + false, + ] + ); + + const tx2 = await zetaConnectorMock.callOnZetaRevert( + multiChainSwapContractA.address, + HARDHAT_CHAIN_ID, + chainBId, + encoder.encode(["address"], [multiChainSwapContractB.address]), + 10, + 0, + message + ); + + await tx2.wait(); + + const originAddressFinalZetaBalance = await zetaTokenMock.balanceOf(deployer.address); + expect(originAddressFinalZetaBalance).to.be.eq(originAddressInitialZetaBalance.add(10)); + }); + + it("Should trade the returned Zeta back for the input token", async () => { + const tx1 = await zetaTokenMock.transfer(multiChainSwapContractA.address, parseUnits("100")); + await tx1.wait(); + + const originAddressInitialUSDCBalance = await USDCTokenContract.balanceOf(deployer.address); + + const message = encoder.encode( + ["bytes32", "address", "address", "uint256", "bytes", "address", "bool", "uint256", "bool"], + [ + "0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff", + deployer.address, + USDCTokenContract.address, + 0, + "0xffffffff", + multiChainSwapContractA.address, + true, + 0, + false, + ] + ); + + const tx2 = await zetaConnectorMock.callOnZetaRevert( + multiChainSwapContractA.address, + HARDHAT_CHAIN_ID, + chainBId, + encoder.encode(["address"], [multiChainSwapContractB.address]), + ZETA_TO_TRANSFER, + 0, + message + ); + + await tx2.wait(); + + const originAddressFinalUSDCBalance = await USDCTokenContract.balanceOf(deployer.address); + expect(originAddressFinalUSDCBalance).to.be.lt(originAddressInitialUSDCBalance.add(USDC_TO_TRANSFER)); + expect(originAddressFinalUSDCBalance).to.be.gt( + originAddressInitialUSDCBalance + .add(USDC_TO_TRANSFER) + .mul(990) + .div(1000) + ); + }); + + it("Should trade the returned ETH back to the caller", async () => { + const tx1 = await zetaTokenMock.transfer(multiChainSwapContractA.address, parseUnits("100")); + await tx1.wait(); + + const originAddressInitialETHBalance = await ethers.provider.getBalance(deployer.address); + + const message = encoder.encode( + ["bytes32", "address", "address", "uint256", "bytes", "address", "bool", "uint256", "bool"], + [ + "0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff", + deployer.address, + WETH, + 0, + "0xffffffff", + multiChainSwapContractA.address, + true, + 0, + true, + ] + ); + + const tx2 = await zetaConnectorMock.callOnZetaRevert( + multiChainSwapContractA.address, + HARDHAT_CHAIN_ID, + chainBId, + encoder.encode(["address"], [multiChainSwapContractB.address]), + parseUnits("2"), + 0, + message + ); + + await tx2.wait(); + + const originAddressFinalETHBalance = await ethers.provider.getBalance(deployer.address); + expect(originAddressFinalETHBalance).to.be.gt(originAddressInitialETHBalance.add("1")); + expect(originAddressFinalETHBalance).to.be.lt( + originAddressInitialETHBalance + .add("1") + .mul(1005) + .div(1000) + ); + }); + + it("Should emit a RevertedSwap event", async () => { + const tx1 = await zetaTokenMock.transfer(multiChainSwapContractA.address, parseUnits("10")); + await tx1.wait(); + + const message = encoder.encode( + ["bytes32", "address", "address", "uint256", "bytes", "address", "bool", "uint256", "bool"], + [ + "0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff", + deployer.address, + WETH, + 0, + "0xffffffff", + multiChainSwapContractA.address, + true, + 0, + true, + ] + ); + + const tx2 = await zetaConnectorMock.callOnZetaRevert( + multiChainSwapContractA.address, + HARDHAT_CHAIN_ID, + chainBId, + encoder.encode(["address"], [multiChainSwapContractB.address]), + parseUnits("2"), + 0, + message + ); + + const swappedFilter = multiChainSwapContractA.filters.RevertedSwap(); + const e1 = await multiChainSwapContractA.queryFilter(swappedFilter); + expect(e1.length).to.equal(1); + }); + }); + }); +}); diff --git a/packages/example-contracts/test/test.helpers.ts b/packages/example-contracts/test/test.helpers.ts index b9711ee2..f9bb6eb8 100644 --- a/packages/example-contracts/test/test.helpers.ts +++ b/packages/example-contracts/test/test.helpers.ts @@ -1,5 +1,7 @@ import { MaxUint256 } from "@ethersproject/constants"; import { SignerWithAddress } from "@nomiclabs/hardhat-ethers/signers"; +import { getAddress } from "@zetachain/addresses"; +import { ZetaTokenConsumerUniV3__factory } from "@zetachain/interfaces/typechain-types"; import { BigNumber, ContractReceipt } from "ethers"; import { getAddress } from "../lib/shared/address.helpers"; @@ -7,8 +9,8 @@ import { getNow } from "../lib/shared/deploy.helpers"; import { ERC20__factory, IUniswapV2Pair__factory, - MultiChainSwapBase__factory, - UniswapV2Router02__factory + MultiChainSwapUniV2__factory, + UniswapV2Router02__factory, } from "../typechain-types"; export const getMintTokenId = (mintTx: ContractReceipt) => mintTx.events?.[0].args?.tokenId; @@ -30,7 +32,23 @@ export const parseUniswapLog = (logs: ContractReceipt["logs"]) => { }; export const parseZetaLog = (logs: ContractReceipt["logs"]) => { - const iface = MultiChainSwapBase__factory.createInterface(); + const iface = MultiChainSwapUniV2__factory.createInterface(); + + const eventNames = logs.map(log => { + try { + const parsedLog = iface.parseLog(log); + + return parsedLog.name; + } catch (e) { + return "NO_ZETA_LOG"; + } + }); + + return eventNames; +}; + +export const parseInteractorLog = (logs: ContractReceipt["logs"]) => { + const iface = ZetaTokenConsumerUniV3__factory.createInterface(); const eventNames = logs.map(log => { try { diff --git a/yarn.lock b/yarn.lock index b13b4dfe..f3dea3b2 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2576,6 +2576,7 @@ __metadata: "@defi-wonderland/smock": ^2.0.7 "@openzeppelin/contracts": 4.6.0 "@uniswap/v2-periphery": 1.1.0-beta.0 + "@uniswap/v3-periphery": 1.1.0 "@zetachain/addresses": "workspace:^" "@zetachain/addresses-tools": "workspace:^" "@zetachain/interfaces": "workspace:^" From 9884884ec68ed4148722c90889eaca4ad608e55f Mon Sep 17 00:00:00 2001 From: Andres Martin Aiello <50411235+andresaiello@users.noreply.github.com> Date: Tue, 20 Sep 2022 16:17:28 -0300 Subject: [PATCH 042/115] Deploy send value contract to klaytn (#51) * Deploy send value contract to klaytn * add script --- packages/addresses-tools/src/networks.ts | 4 +-- packages/addresses/src/addresses.athens.json | 2 +- .../scripts/multi-chain-value/send-value.ts | 9 +++++ .../scripts/update-zeta-connector.ts | 33 +++++++++++++++++++ 4 files changed, 45 insertions(+), 3 deletions(-) create mode 100644 packages/protocol-contracts/scripts/update-zeta-connector.ts diff --git a/packages/addresses-tools/src/networks.ts b/packages/addresses-tools/src/networks.ts index a1c1f2e2..e7b3a3e7 100644 --- a/packages/addresses-tools/src/networks.ts +++ b/packages/addresses-tools/src/networks.ts @@ -37,8 +37,8 @@ export const getHardhatConfigNetworks = (PRIVATE_KEYS: string[]): NetworksUserCo "klaytn-baobab": { accounts: PRIVATE_KEYS, chainId: 1001, - gas: 2100000, - gasPrice: 8000000000, + gas: 6000000, + gasPrice: 54250000000, url: "https://api.baobab.klaytn.net:8651" }, "klaytn-cypress": { diff --git a/packages/addresses/src/addresses.athens.json b/packages/addresses/src/addresses.athens.json index de75cb94..7a8e2a52 100644 --- a/packages/addresses/src/addresses.athens.json +++ b/packages/addresses/src/addresses.athens.json @@ -79,7 +79,7 @@ "crossChainCounter": "", "crossChainNft": "", "dai": "", - "multiChainValue": "", + "multiChainValue": "0x4f97Bc7ed459111296583e92a62f17D20B20825d", "tss": "0x61141Bce5352fC9b5Ff648468676e356518D86AB", "tssUpdater": "0x7274d1d5dddef36aac53dd45b93487ce01ef0a55", "uniswapV2Router02": "", diff --git a/packages/example-contracts/scripts/multi-chain-value/send-value.ts b/packages/example-contracts/scripts/multi-chain-value/send-value.ts index adee82fe..19dc237a 100644 --- a/packages/example-contracts/scripts/multi-chain-value/send-value.ts +++ b/packages/example-contracts/scripts/multi-chain-value/send-value.ts @@ -29,6 +29,15 @@ async function main() { ) ).wait()); + networkName !== "klaytn-baobab" && + (await ( + await multiChainValueContract.send( + getChainId("klaytn-baobab"), + ethers.utils.solidityPack(["address"], [process.env.PUBLIC_KEY_1]), + amount + ) + ).wait()); + networkName !== "polygon-mumbai" && (await ( await multiChainValueContract.send( diff --git a/packages/protocol-contracts/scripts/update-zeta-connector.ts b/packages/protocol-contracts/scripts/update-zeta-connector.ts new file mode 100644 index 00000000..a2765a5c --- /dev/null +++ b/packages/protocol-contracts/scripts/update-zeta-connector.ts @@ -0,0 +1,33 @@ +import { isNetworkName } from "@zetachain/addresses"; +import { ethers, network } from "hardhat"; + +import { getAddress } from "../lib/address.helpers"; +import { getZetaFactoryNonEth, isEthNetworkName } from "../lib/contracts.helpers"; + +async function updateZetaConnector() { + if (!isNetworkName(network.name)) { + throw new Error(`network.name: ${network.name} isn't supported.`); + } + + const [, tssUpdaterSigner] = await ethers.getSigners(); + + if (isEthNetworkName(network.name)) { + throw new Error(`network.name: ${network.name} isn't supported.`); + } + + const contract = ( + await getZetaFactoryNonEth({ deployParams: null, existingContractAddress: getAddress("zetaToken") }) + ).connect(tssUpdaterSigner); + + await (await contract.updateTssAndConnectorAddresses(getAddress("tss"), getAddress("connector"))).wait(); + + console.log(`Updated TSS address to ${getAddress("tss")}.`); + console.log(`Updated Connector address to ${getAddress("connector")}.`); +} + +updateZetaConnector() + .then(() => process.exit(0)) + .catch(error => { + console.error(error); + process.exit(1); + }); From 16b56c7c02f34c5980345c2657a77e41de39865a Mon Sep 17 00:00:00 2001 From: Andres Martin Aiello <50411235+andresaiello@users.noreply.github.com> Date: Fri, 4 Nov 2022 13:49:05 -0300 Subject: [PATCH 043/115] Implement quantum suggestions (#43) * Add different strategies to swap * consumer option * update CROSS_CHAIN_SWAP_MESSAGE * add test * remove old swap v3 * add deployment script * contract changes * update comment * update comment * deployment * Implement Quantum suggestions --- .../cross-chain-counter/CrossChainCounter.sol | 1 + .../cross-chain-message/CrossChainMessage.sol | 4 ++-- .../cross-chain-warriors/CrossChainWarriors.sol | 10 +++------- .../multi-chain-swap/MultiChainSwapUniV2.strategy.sol | 11 ++++++----- 4 files changed, 12 insertions(+), 14 deletions(-) diff --git a/packages/example-contracts/contracts/cross-chain-counter/CrossChainCounter.sol b/packages/example-contracts/contracts/cross-chain-counter/CrossChainCounter.sol index a5f29d01..4a95f0cd 100644 --- a/packages/example-contracts/contracts/cross-chain-counter/CrossChainCounter.sol +++ b/packages/example-contracts/contracts/cross-chain-counter/CrossChainCounter.sol @@ -21,6 +21,7 @@ contract CrossChainCounter is ZetaInteractor, ZetaReceiver, CrossChainCounterErr function crossChainCount(uint256 destinationChainId) external { if (!_isValidChainId(destinationChainId)) revert InvalidDestinationChainId(); + counter[msg.sender]++; connector.send( ZetaInterfaces.SendInput({ destinationChainId: destinationChainId, diff --git a/packages/example-contracts/contracts/cross-chain-message/CrossChainMessage.sol b/packages/example-contracts/contracts/cross-chain-message/CrossChainMessage.sol index c7f81650..ed65e0b2 100644 --- a/packages/example-contracts/contracts/cross-chain-message/CrossChainMessage.sol +++ b/packages/example-contracts/contracts/cross-chain-message/CrossChainMessage.sol @@ -21,8 +21,8 @@ contract CrossChainMessage is ZetaInteractor, ZetaReceiver, CrossChainMessageErr event HelloWorldEvent(string messageData); event RevertedHelloWorldEvent(string messageData); - ZetaTokenConsumer private _zetaConsumer; - IERC20 internal _zetaToken; + ZetaTokenConsumer private immutable _zetaConsumer; + IERC20 internal immutable _zetaToken; constructor( address connectorAddress, diff --git a/packages/example-contracts/contracts/cross-chain-warriors/CrossChainWarriors.sol b/packages/example-contracts/contracts/cross-chain-warriors/CrossChainWarriors.sol index 076820b4..df74c325 100644 --- a/packages/example-contracts/contracts/cross-chain-warriors/CrossChainWarriors.sol +++ b/packages/example-contracts/contracts/cross-chain-warriors/CrossChainWarriors.sol @@ -27,13 +27,13 @@ contract CrossChainWarriors is bytes32 public constant CROSS_CHAIN_TRANSFER_MESSAGE = keccak256("CROSS_CHAIN_TRANSFER"); - IERC20 internal _zetaToken; + IERC20 internal immutable _zetaToken; string public baseURI; Counters.Counter public tokenIds; - ZetaTokenConsumer private _zetaConsumer; + ZetaTokenConsumer private immutable _zetaConsumer; constructor( address connectorAddress, @@ -56,13 +56,8 @@ contract CrossChainWarriors is baseURI = baseURIParam; } - function _baseURI() internal view virtual override returns (string memory) { - return baseURI; - } - function mint(address to) public returns (uint256) { uint256 newWarriorId = tokenIds.current(); - _safeMint(to, newWarriorId); /** * @dev Always increment by two to keep ids even/odd (depending on the chain) @@ -71,6 +66,7 @@ contract CrossChainWarriors is tokenIds.increment(); tokenIds.increment(); + _safeMint(to, newWarriorId); return newWarriorId; } diff --git a/packages/example-contracts/contracts/multi-chain-swap/MultiChainSwapUniV2.strategy.sol b/packages/example-contracts/contracts/multi-chain-swap/MultiChainSwapUniV2.strategy.sol index b07e3463..ce05be56 100644 --- a/packages/example-contracts/contracts/multi-chain-swap/MultiChainSwapUniV2.strategy.sol +++ b/packages/example-contracts/contracts/multi-chain-swap/MultiChainSwapUniV2.strategy.sol @@ -2,18 +2,20 @@ pragma solidity 0.8.7; import "@openzeppelin/contracts/interfaces/IERC20.sol"; +import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol"; import "@uniswap/v2-periphery/contracts/interfaces/IUniswapV2Router02.sol"; import "./MultiChainSwapErrors.sol"; import "./MultiChainSwap.sol"; contract MultiChainSwapUniV2 is MultiChainSwap, ZetaInteractor, MultiChainSwapErrors { + using SafeERC20 for IERC20; uint16 internal constant MAX_DEADLINE = 200; bytes32 public constant CROSS_CHAIN_SWAP_MESSAGE = keccak256("CROSS_CHAIN_SWAP"); - address public uniswapV2RouterAddress; + address public immutable uniswapV2RouterAddress; address internal immutable wETH; - address public zetaToken; + address public immutable zetaToken; IUniswapV2Router02 internal uniswapV2Router; @@ -127,9 +129,8 @@ contract MultiChainSwapUniV2 is MultiChainSwap, ZetaInteractor, MultiChainSwapEr * @dev If the input token is not Zeta, trade it using Uniswap */ { - bool success1 = IERC20(sourceInputToken).transferFrom(msg.sender, address(this), inputTokenAmount); - bool success2 = IERC20(sourceInputToken).approve(uniswapV2RouterAddress, inputTokenAmount); - if (!success1 || !success2) revert ErrorTransferringTokens(sourceInputToken); + IERC20(sourceInputToken).safeTransferFrom(msg.sender, address(this), inputTokenAmount); + IERC20(sourceInputToken).safeApprove(uniswapV2RouterAddress, inputTokenAmount); } address[] memory path; From 07e33f1387a383c8859c78e588250528f5837059 Mon Sep 17 00:00:00 2001 From: Andres Martin Aiello <50411235+andresaiello@users.noreply.github.com> Date: Tue, 8 Nov 2022 16:50:13 -0300 Subject: [PATCH 044/115] Develop cross chain swap (#53) * Develop cross chain swap * add deploy script * improve swap * deploy to athens2 * remove unsed code * renames * update readme --- README.md | 2 + .../addresses-tools/src/addresses.helpers.ts | 2 + packages/addresses-tools/src/networks.ts | 9 +- packages/addresses/src/addresses.athens.json | 35 +++++- packages/addresses/src/addresses.helpers.ts | 14 ++- packages/zevm-contracts/.env.example | 0 packages/zevm-contracts/.eslintrc.js | 23 ++++ packages/zevm-contracts/README.md | 16 +++ .../contracts/interfaces/IZRC4.sol | 31 +++++ .../contracts/interfaces/zContract.sol | 10 ++ .../contracts/system/SystemContract.sol | 115 +++++++++++++++++ .../contracts/zeta-swap/ZetaCurveSwapDemo.sol | 83 ++++++++++++ .../contracts/zeta-swap/ZetaSwap.sol | 119 ++++++++++++++++++ packages/zevm-contracts/hardhat.config.ts | 46 +++++++ packages/zevm-contracts/package.json | 41 ++++++ .../zevm-contracts/scripts/systemConstants.ts | 5 + .../scripts/zeta-swap/deploy.ts | 24 ++++ packages/zevm-contracts/tsconfig.json | 14 +++ yarn.lock | 18 +++ 19 files changed, 599 insertions(+), 8 deletions(-) create mode 100644 packages/zevm-contracts/.env.example create mode 100644 packages/zevm-contracts/.eslintrc.js create mode 100644 packages/zevm-contracts/README.md create mode 100644 packages/zevm-contracts/contracts/interfaces/IZRC4.sol create mode 100644 packages/zevm-contracts/contracts/interfaces/zContract.sol create mode 100644 packages/zevm-contracts/contracts/system/SystemContract.sol create mode 100644 packages/zevm-contracts/contracts/zeta-swap/ZetaCurveSwapDemo.sol create mode 100644 packages/zevm-contracts/contracts/zeta-swap/ZetaSwap.sol create mode 100644 packages/zevm-contracts/hardhat.config.ts create mode 100644 packages/zevm-contracts/package.json create mode 100644 packages/zevm-contracts/scripts/systemConstants.ts create mode 100644 packages/zevm-contracts/scripts/zeta-swap/deploy.ts create mode 100644 packages/zevm-contracts/tsconfig.json diff --git a/README.md b/README.md index fc524685..3d9cbd34 100644 --- a/README.md +++ b/README.md @@ -40,6 +40,8 @@ ZetaChain is a public, decentralized blockchain and smart contract platform buil #### [Protocol contracts](packages/example-contracts) +#### [ZEVM contracts](packages/zevm-contracts) + ### Cross-repo commands #### Package-specific commands diff --git a/packages/addresses-tools/src/addresses.helpers.ts b/packages/addresses-tools/src/addresses.helpers.ts index 217266e8..4390d27d 100644 --- a/packages/addresses-tools/src/addresses.helpers.ts +++ b/packages/addresses-tools/src/addresses.helpers.ts @@ -39,6 +39,7 @@ export const getScanVariable = ({ customNetworkName }: { customNetworkName?: str dotenv.config(); const v = { + "athens-v2": "", "bsc-localnet": "", "bsc-testnet": process.env.BSCSCAN_API_KEY || "", "eth-localnet": "", @@ -61,6 +62,7 @@ export const getExplorerUrl = ({ customNetworkName }: { customNetworkName?: stri dotenv.config(); const v = { + "athens-v2": "", "bsc-localnet": "", "bsc-testnet": "https://testnet.bscscan.com/", "eth-localnet": "", diff --git a/packages/addresses-tools/src/networks.ts b/packages/addresses-tools/src/networks.ts index e7b3a3e7..71b6a72c 100644 --- a/packages/addresses-tools/src/networks.ts +++ b/packages/addresses-tools/src/networks.ts @@ -1,6 +1,13 @@ import type { NetworksUserConfig } from "hardhat/types"; export const getHardhatConfigNetworks = (PRIVATE_KEYS: string[]): NetworksUserConfig => ({ + "athens-v2": { + accounts: PRIVATE_KEYS, + // chainId: 8666, + gas: 5000000, + gasPrice: 80000000000, + url: `http://3.132.197.22:8545`, + }, "bsc-localnet": { gas: 5000000, gasPrice: 80000000000, @@ -10,7 +17,7 @@ export const getHardhatConfigNetworks = (PRIVATE_KEYS: string[]): NetworksUserCo accounts: PRIVATE_KEYS, gas: 5000000, gasPrice: 80000000000, - url: `https://data-seed-prebsc-2-s3.binance.org:8545`, + url: `https://data-seed-prebsc-1-s1.binance.org:8545`, }, "eth-localnet": { gas: 2100000, diff --git a/packages/addresses/src/addresses.athens.json b/packages/addresses/src/addresses.athens.json index 7a8e2a52..03400621 100644 --- a/packages/addresses/src/addresses.athens.json +++ b/packages/addresses/src/addresses.athens.json @@ -16,7 +16,8 @@ "weth9": "", "zetaToken": "0x000080383847bd75f91c168269aa74004877592f", "zetaTokenConsumerUniV2": "0xa67b03930eb53d0462dCc0835e97964C062042fb", - "immutableCreate2Factory": "0x095a03c6a68137fE9a566bBc3e552F299d8b886d" + "immutableCreate2Factory": "0x095a03c6a68137fE9a566bBc3e552F299d8b886d", + "zetaSwap": "" }, "goerli": { "connector": "0x00007d0BA516a2bA02D77907d3a1348C1187Ae62", @@ -35,7 +36,8 @@ "weth9": "", "zetaToken": "0xCc7bb2D219A0FC08033E130629C2B854b7bA9195", "zetaTokenConsumerUniV2": "0xDDB1C86c69f258F6d33377a8725404E4393326bB", - "immutableCreate2Factory": "0x095a03c6a68137fE9a566bBc3e552F299d8b886d" + "immutableCreate2Factory": "0x095a03c6a68137fE9a566bBc3e552F299d8b886d", + "zetaSwap": "" }, "polygon-mumbai": { "connector": "0x000054d3A0Bc83Ec7808F52fCdC28A96c89F6C5c", @@ -54,7 +56,8 @@ "zetaToken": "0x000080383847bd75f91c168269aa74004877592f", "zetaTokenConsumerUniV2": "", "immutableCreate2Factory": "0x095a03c6a68137fE9a566bBc3e552F299d8b886d", - "multiChainSwap": "0xaf28cb0d9E045170E1642321B964740784E7dC64" + "multiChainSwap": "0xaf28cb0d9E045170E1642321B964740784E7dC64", + "zetaSwap": "" }, "ropsten": { "connector": "0x000054d3A0Bc83Ec7808F52fCdC28A96c89F6C5c", @@ -72,7 +75,8 @@ "weth9": "", "zetaToken": "0x000080383847bd75f91c168269aa74004877592f", "zetaTokenConsumerUniV2": "0x197bC8e7e813DfB95dEf0DAA44399648bC86f329", - "immutableCreate2Factory": "0x095a03c6a68137fE9a566bBc3e552F299d8b886d" + "immutableCreate2Factory": "0x095a03c6a68137fE9a566bBc3e552F299d8b886d", + "zetaSwap": "" }, "klaytn-baobab": { "connector": "0x000054d3A0Bc83Ec7808F52fCdC28A96c89F6C5c", @@ -90,6 +94,27 @@ "weth9": "", "zetaToken": "0x000080383847bD75F91c168269Aa74004877592f", "zetaTokenConsumerUniV2": "", - "immutableCreate2Factory": "0x095a03c6a68137fE9a566bBc3e552F299d8b886d" + "immutableCreate2Factory": "0x095a03c6a68137fE9a566bBc3e552F299d8b886d", + "zetaSwap": "" + }, + "athens-v2": { + "connector": "", + "crossChainCounter": "", + "crossChainNft": "", + "dai": "", + "multiChainSwap": "", + "multiChainValue": "", + "tss": "", + "tssUpdater": "", + "uniswapV2Router02": "", + "uniswapV3NftManager": "", + "uniswapV3Quoter": "", + "uniswapV3Router": "", + "usdc": "", + "weth9": "", + "zetaToken": "", + "zetaTokenConsumerUniV2": "", + "immutableCreate2Factory": "", + "zetaSwap": "0x8FeAf1BD718E4e6f82d0FE808f44f431B24b47DF" } } \ No newline at end of file diff --git a/packages/addresses/src/addresses.helpers.ts b/packages/addresses/src/addresses.helpers.ts index 7efc4a44..b8031477 100644 --- a/packages/addresses/src/addresses.helpers.ts +++ b/packages/addresses/src/addresses.helpers.ts @@ -19,6 +19,7 @@ export type ZetaAddress = | "uniswapV3Router" | "usdc" | "weth9" + | "zetaSwap" | "zetaToken" | "zetaTokenConsumerUniV2"; @@ -40,6 +41,7 @@ const zetaAddresses: Record = { uniswapV3Router: true, usdc: true, weth9: true, + zetaSwap: true, zetaToken: true, zetaTokenConsumerUniV2: true }; @@ -69,7 +71,13 @@ export const getLocalnetList = (): Record; export const isTestnetNetworkName = (networkName: string): networkName is TestnetNetworkName => @@ -77,7 +85,8 @@ export const isTestnetNetworkName = (networkName: string): networkName is Testne networkName === "bsc-testnet" || networkName === "polygon-mumbai" || networkName === "ropsten" || - networkName === "klaytn-baobab"; + networkName === "klaytn-baobab" || + networkName === "athens-v2"; export const isZetaTestnet = (networkName: string | undefined): networkName is ZetaTestnetNetworkName => networkName === "athens"; @@ -110,6 +119,7 @@ export type ZetaNetworkName = ZetaLocalNetworkName | ZetaMainnetNetworkName | Ze export const getChainId = (networkName: NetworkName) => { const chainIds: Record = { + "athens-v2": 101, "bsc-localnet": 97, "bsc-testnet": 97, "eth-localnet": 5, diff --git a/packages/zevm-contracts/.env.example b/packages/zevm-contracts/.env.example new file mode 100644 index 00000000..e69de29b diff --git a/packages/zevm-contracts/.eslintrc.js b/packages/zevm-contracts/.eslintrc.js new file mode 100644 index 00000000..77b8f69a --- /dev/null +++ b/packages/zevm-contracts/.eslintrc.js @@ -0,0 +1,23 @@ +const path = require("path"); + +const OFF = 0; + +module.exports = { + env: { + browser: false, + es2021: true, + mocha: true, + node: true, + }, + extends: ["../../.eslintrc.js"], + rules: { + "no-console": OFF, + }, + settings: { + "import/resolver": { + typescript: { + project: path.join(__dirname, "tsconfig.json"), + }, + }, + }, +}; diff --git a/packages/zevm-contracts/README.md b/packages/zevm-contracts/README.md new file mode 100644 index 00000000..d8ab9984 --- /dev/null +++ b/packages/zevm-contracts/README.md @@ -0,0 +1,16 @@ +# ZetaEVM contracts + +> ⚠️ The contracts **are not audited yet**, use at your own risk. + +## Environment variables + +Follow the template in `.env.example`. + +* The private key should **not** include `0x`. +* To verify your contracts, you'll need api keys both in BSCScan and Etherscan. + +## Running Tests + +```bash + yarn test +``` diff --git a/packages/zevm-contracts/contracts/interfaces/IZRC4.sol b/packages/zevm-contracts/contracts/interfaces/IZRC4.sol new file mode 100644 index 00000000..299dfd96 --- /dev/null +++ b/packages/zevm-contracts/contracts/interfaces/IZRC4.sol @@ -0,0 +1,31 @@ +// SPDX-License-Identifier: MIT +pragma solidity 0.8.7; + +interface IZRC4 { + function totalSupply() external view returns (uint256); + + function balanceOf(address account) external view returns (uint256); + + function transfer(address recipient, uint256 amount) external returns (bool); + + function allowance(address owner, address spender) external view returns (uint256); + + function approve(address spender, uint256 amount) external returns (bool); + + function transferFrom( + address sender, + address recipient, + uint256 amount + ) external returns (bool); + + function deposit(address to, uint256 amount) external returns (bool); + + function withdraw(bytes memory to, uint256 amount) external returns (bool); + + function withdrawGasFee() external view returns (address, uint256); + + event Transfer(address indexed from, address indexed to, uint256 value); + event Approval(address indexed owner, address indexed spender, uint256 value); + event Deposit(bytes from, address indexed to, uint256 value); + event Withdrawal(address indexed from, bytes to, uint256 value); +} diff --git a/packages/zevm-contracts/contracts/interfaces/zContract.sol b/packages/zevm-contracts/contracts/interfaces/zContract.sol new file mode 100644 index 00000000..e1c3350f --- /dev/null +++ b/packages/zevm-contracts/contracts/interfaces/zContract.sol @@ -0,0 +1,10 @@ +// SPDX-License-Identifier: MIT +pragma solidity 0.8.7; + +interface zContract { + function onCrossChainCall( + address zrc4, + uint256 amount, + bytes calldata message + ) external; +} diff --git a/packages/zevm-contracts/contracts/system/SystemContract.sol b/packages/zevm-contracts/contracts/system/SystemContract.sol new file mode 100644 index 00000000..87ea3477 --- /dev/null +++ b/packages/zevm-contracts/contracts/system/SystemContract.sol @@ -0,0 +1,115 @@ +// SPDX-License-Identifier: MIT +pragma solidity 0.8.7; + +import "../interfaces/zContract.sol"; +import "../interfaces/IZRC4.sol"; + +interface SystemContractErrors { + error CallerIsNotFungibleModule(); + + error InvalidTarget(); + + error CantBeIdenticalAddresses(); + + error CantBeZeroAddress(); +} + +contract SystemContract is SystemContractErrors { + mapping(uint256 => uint256) public gasPriceByChainId; + mapping(uint256 => address) public gasCoinZRC4ByChainId; + mapping(uint256 => address) public gasZetaPoolByChainId; + + address public constant FUNGIBLE_MODULE_ADDRESS = 0x735b14BB79463307AAcBED86DAf3322B1e6226aB; + address public wZetaContractAddress; + address public uniswapv2FactoryAddress; + address public uniswapv2Router02Address; + + event SystemContractDeployed(); + event SetGasPrice(uint256, uint256); + event SetGasCoin(uint256, address); + event SetGasZetaPool(uint256, address); + event SetWZeta(address); + + constructor( + address wzeta_, + address uniswapv2Factory_, + address uniswapv2Router02_ + ) { + if (msg.sender != FUNGIBLE_MODULE_ADDRESS) revert CallerIsNotFungibleModule(); + wZetaContractAddress = wzeta_; + uniswapv2FactoryAddress = uniswapv2Factory_; + uniswapv2Router02Address = uniswapv2Router02_; + emit SystemContractDeployed(); + } + + // deposit foreign coins into ZRC4 and call user specified contract on zEVM + function depositAndCall( + address zrc4, + uint256 amount, + address target, + bytes calldata message + ) external { + if (msg.sender != FUNGIBLE_MODULE_ADDRESS) revert CallerIsNotFungibleModule(); + if (target == FUNGIBLE_MODULE_ADDRESS || target == address(this)) revert InvalidTarget(); + + IZRC4(zrc4).deposit(target, amount); + zContract(target).onCrossChainCall(zrc4, amount, message); + } + + // returns sorted token addresses, used to handle return values from pairs sorted in this order + function sortTokens(address tokenA, address tokenB) internal pure returns (address token0, address token1) { + if (tokenA == tokenB) revert CantBeIdenticalAddresses(); + (token0, token1) = tokenA < tokenB ? (tokenA, tokenB) : (tokenB, tokenA); + if (token0 == address(0)) revert CantBeZeroAddress(); + } + + // calculates the CREATE2 address for a pair without making any external calls + function uniswapv2PairFor( + address factory, + address tokenA, + address tokenB + ) public pure returns (address pair) { + (address token0, address token1) = sortTokens(tokenA, tokenB); + pair = address( + uint160( + uint256( + keccak256( + abi.encodePacked( + hex"ff", + factory, + keccak256(abi.encodePacked(token0, token1)), + hex"96e8ac4277198ff8b6f785478aa9a39f403cb768dd02cbee326c3e7da348845f" // init code hash + ) + ) + ) + ) + ); + } + + // fungible module updates the gas price oracle periodically + function setGasPrice(uint256 chainID, uint256 price) external { + if (msg.sender != FUNGIBLE_MODULE_ADDRESS) revert CallerIsNotFungibleModule(); + gasPriceByChainId[chainID] = price; + emit SetGasPrice(chainID, price); + } + + function setGasCoinZRC4(uint256 chainID, address zrc4) external { + if (msg.sender != FUNGIBLE_MODULE_ADDRESS) revert CallerIsNotFungibleModule(); + gasCoinZRC4ByChainId[chainID] = zrc4; + emit SetGasCoin(chainID, zrc4); + } + + // set the pool wzeta/erc20 address + function setGasZetaPool(uint256 chainID, address erc20) external { + if (msg.sender != FUNGIBLE_MODULE_ADDRESS) revert CallerIsNotFungibleModule(); + address pool = uniswapv2PairFor(uniswapv2FactoryAddress, wZetaContractAddress, erc20); + gasZetaPoolByChainId[chainID] = pool; + emit SetGasZetaPool(chainID, pool); + } + + function setWZETAContractAddress(address addr) external { + if (msg.sender != FUNGIBLE_MODULE_ADDRESS) revert CallerIsNotFungibleModule(); + wZetaContractAddress = addr; + emit SetWZeta(wZetaContractAddress); + } +} diff --git a/packages/zevm-contracts/contracts/zeta-swap/ZetaCurveSwapDemo.sol b/packages/zevm-contracts/contracts/zeta-swap/ZetaCurveSwapDemo.sol new file mode 100644 index 00000000..6988bf85 --- /dev/null +++ b/packages/zevm-contracts/contracts/zeta-swap/ZetaCurveSwapDemo.sol @@ -0,0 +1,83 @@ +// SPDX-License-Identifier: MIT +pragma solidity 0.8.7; + +import "../interfaces/IZRC4.sol"; +import "../interfaces/zContract.sol"; + +interface ICRV3 { + function exchange( + uint256 i, + uint256 j, + uint256 dx, + uint256 min_dy, + bool use_eth + ) external returns (uint256); +} + +interface ZetaCurveSwapErrors { + error WrongGasContract(); + + error NotEnoughToPayGasFee(); +} + +contract ZetaCurveSwapDemo is zContract, ZetaCurveSwapErrors { + address public crv3pool; // gETH/tBNB/tMATIC pool + address[3] public crvZrc4s; + + constructor(address crv3pool_, address[3] memory zrc4s_) { + crv3pool = crv3pool_; + crvZrc4s = zrc4s_; + } + + function encode( + address zrc4, + address recipient, + uint256 minAmountOut + ) public pure returns (bytes memory) { + return abi.encode(zrc4, recipient, minAmountOut); + } + + function addr2idx(address zrc4) public view returns (uint256) { + for (uint256 i = 0; i < 3; i++) { + if (crvZrc4s[i] == zrc4) { + return i; + } + } + return 18; + } + + function _doWithdrawal( + address targetZRC4, + uint256 amount, + bytes32 receipient + ) private { + (address gasZRC4, uint256 gasFee) = IZRC4(targetZRC4).withdrawGasFee(); + + if (gasZRC4 != targetZRC4) revert WrongGasContract(); + if (gasFee >= amount) revert NotEnoughToPayGasFee(); + + IZRC4(targetZRC4).approve(targetZRC4, gasFee); + IZRC4(targetZRC4).withdraw(abi.encodePacked(receipient), amount - gasFee); + } + + function onCrossChainCall( + address zrc4, + uint256 amount, + bytes calldata message + ) external override { + (address targetZRC4, bytes32 receipient, ) = abi.decode(message, (address, bytes32, uint256)); + + address[] memory path = new address[](2); + path[0] = zrc4; + path[1] = targetZRC4; + IZRC4(zrc4).approve(address(crv3pool), amount); + + uint256 i = addr2idx(zrc4); + uint256 j = addr2idx(targetZRC4); + require(i >= 0 && i < 3 && j >= 0 && j < 3 && i != j, "i,j error"); + + uint256 outAmount = ICRV3(crv3pool).exchange(i, j, amount, 0, false); + + _doWithdrawal(targetZRC4, outAmount, receipient); + } +} diff --git a/packages/zevm-contracts/contracts/zeta-swap/ZetaSwap.sol b/packages/zevm-contracts/contracts/zeta-swap/ZetaSwap.sol new file mode 100644 index 00000000..b9015046 --- /dev/null +++ b/packages/zevm-contracts/contracts/zeta-swap/ZetaSwap.sol @@ -0,0 +1,119 @@ +// SPDX-License-Identifier: MIT +pragma solidity 0.8.7; + +import "@uniswap/v2-periphery/contracts/interfaces/IUniswapV2Router02.sol"; +import "@uniswap/v2-periphery/contracts/interfaces/IUniswapV2Router01.sol"; + +import "../interfaces/IZRC4.sol"; +import "../interfaces/zContract.sol"; + +interface ZetaSwapErrors { + error WrongGasContract(); + + error NotEnoughToPayGasFee(); + + error CantBeIdenticalAddresses(); + + error CantBeZeroAddress(); +} + +contract ZetaSwap is zContract, ZetaSwapErrors { + uint16 internal constant MAX_DEADLINE = 200; + + address public zetaToken; + address public immutable uniswapV2Router; + + constructor(address zetaToken_, address uniswapV2Router_) { + zetaToken = zetaToken_; + uniswapV2Router = uniswapV2Router_; + } + + // returns sorted token addresses, used to handle return values from pairs sorted in this order + function sortTokens(address tokenA, address tokenB) internal pure returns (address token0, address token1) { + if (tokenA == tokenB) revert CantBeIdenticalAddresses(); + (token0, token1) = tokenA < tokenB ? (tokenA, tokenB) : (tokenB, tokenA); + if (token0 == address(0)) revert CantBeZeroAddress(); + } + + // calculates the CREATE2 address for a pair without making any external calls + function uniswapv2PairFor( + address factory, + address tokenA, + address tokenB + ) public pure returns (address pair) { + (address token0, address token1) = sortTokens(tokenA, tokenB); + pair = address( + uint160( + uint256( + keccak256( + abi.encodePacked( + hex"ff", + factory, + keccak256(abi.encodePacked(token0, token1)), + hex"96e8ac4277198ff8b6f785478aa9a39f403cb768dd02cbee326c3e7da348845f" // init code hash + ) + ) + ) + ) + ); + } + + function encode( + address zrc4, + address recipient, + uint256 minAmountOut + ) public pure returns (bytes memory) { + return abi.encode(zrc4, recipient, minAmountOut); + } + + function _doWithdrawal( + address targetZRC4, + uint256 amount, + bytes32 receipient + ) private { + (address gasZRC4, uint256 gasFee) = IZRC4(targetZRC4).withdrawGasFee(); + + if (gasZRC4 != targetZRC4) revert WrongGasContract(); + if (gasFee >= amount) revert NotEnoughToPayGasFee(); + + IZRC4(targetZRC4).approve(targetZRC4, gasFee); + IZRC4(targetZRC4).withdraw(abi.encodePacked(receipient), amount - gasFee); + } + + function onCrossChainCall( + address zrc4, + uint256 amount, + bytes calldata message + ) external override { + (address targetZRC4, bytes32 receipient, uint256 minAmountOut) = abi.decode( + message, + (address, bytes32, uint256) + ); + + address uniswapPool = uniswapv2PairFor(uniswapV2Router, zrc4, targetZRC4); + bool existsPairPool = IZRC4(zrc4).balanceOf(uniswapPool) > 0 && IZRC4(zrc4).balanceOf(zetaToken) > 0; + + address[] memory path; + if (existsPairPool) { + path = new address[](2); + path[0] = zrc4; + path[1] = targetZRC4; + } else { + path = new address[](3); + path[0] = zrc4; + path[1] = zetaToken; + path[2] = targetZRC4; + } + + IZRC4(zrc4).approve(address(uniswapV2Router), amount); + uint256[] memory amounts = IUniswapV2Router01(uniswapV2Router).swapExactTokensForTokens( + amount, + minAmountOut, + path, + address(this), + block.timestamp + MAX_DEADLINE + ); + + _doWithdrawal(targetZRC4, amounts[1], receipient); + } +} diff --git a/packages/zevm-contracts/hardhat.config.ts b/packages/zevm-contracts/hardhat.config.ts new file mode 100644 index 00000000..53562131 --- /dev/null +++ b/packages/zevm-contracts/hardhat.config.ts @@ -0,0 +1,46 @@ +import "@nomiclabs/hardhat-etherscan"; +import "@nomiclabs/hardhat-waffle"; +import "@typechain/hardhat"; +import "hardhat-gas-reporter"; +import "solidity-coverage"; +import "tsconfig-paths/register"; + +import { getHardhatConfigNetworks, getHardhatConfigScanners } from "@zetachain/addresses-tools/src/networks"; +import * as dotenv from "dotenv"; +import type { HardhatUserConfig } from "hardhat/types"; + +dotenv.config(); + +const PRIVATE_KEYS = process.env.PRIVATE_KEY !== undefined ? [`0x${process.env.PRIVATE_KEY}`] : []; + +const config: HardhatUserConfig = { + etherscan: { + ...getHardhatConfigScanners(), + }, + gasReporter: { + currency: "USD", + enabled: process.env.REPORT_GAS !== undefined, + }, + networks: { + ...getHardhatConfigNetworks(PRIVATE_KEYS), + }, + solidity: { + compilers: [ + { version: "0.5.10" /** For create2 factory */ }, + { version: "0.6.6" /** For uniswap v2 */ }, + { version: "0.8.7" }, + ], + settings: { + /** + * @see {@link https://smock.readthedocs.io/en/latest/getting-started.html} + */ + outputSelection: { + "*": { + "*": ["storageLayout"], + }, + }, + }, + }, +}; + +export default config; diff --git a/packages/zevm-contracts/package.json b/packages/zevm-contracts/package.json new file mode 100644 index 00000000..0221a44d --- /dev/null +++ b/packages/zevm-contracts/package.json @@ -0,0 +1,41 @@ +{ + "name": "@zetachain/zevm-contracts", + "version": "0.0.1", + "license": "MIT", + "private": true, + "author": "zetachain", + "publishConfig": { + "access": "public", + "registry": "https://registry.npmjs.org/" + }, + "scripts": { + "clean": "npx hardhat clean", + "compile": "npx hardhat compile", + "multi-chain-swap:deploy-local": "ZETA_NETWORK=troy EXECUTE_PROGRAMMATICALLY=true npx hardhat run scripts/multi-chain-swap/deploy.ts --network hardhat", + "multi-chain-swap:deploy": "ZETA_NETWORK=athens EXECUTE_PROGRAMMATICALLY=true npx hardhat run scripts/multi-chain-swap/deploy.ts", + "lint:fix": "npm run lint:js:fix && npm run lint:sol:fix", + "lint:js:fix": "eslint --ext .js,.ts . --fix", + "lint:js": "eslint --ext .js,.ts .", + "lint:sol:fix": "prettier --write \"contracts/**/*.sol\"", + "lint:sol": "solhint 'contracts/**/*.sol' && prettier -c 'contracts/**/*.sol'", + "lint": "npm run lint:js && npm run lint:sol", + "test:watch": "echo You need to install `entr` to run this command && find contracts/**/** lib/**/** test/**/** -iname '*.sol' -o -iname '*.ts' | entr -cnr npx hardhat test", + "test": "npx hardhat test", + "tsc:watch": "npx tsc --watch" + }, + "devDependencies": { + "@defi-wonderland/smock": "^2.0.7", + "hardhat-gas-reporter": "^1.0.8", + "solidity-coverage": "^0.7.20", + "tsconfig-paths": "^3.14.1" + }, + "dependencies": { + "@openzeppelin/contracts": "4.6.0", + "@uniswap/v2-periphery": "1.1.0-beta.0", + "@zetachain/addresses": "workspace:^", + "@zetachain/addresses-tools": "workspace:^", + "@zetachain/interfaces": "workspace:^", + "@zetachain/protocol-contracts": "workspace:^", + "ethers": "5.6.8" + } +} diff --git a/packages/zevm-contracts/scripts/systemConstants.ts b/packages/zevm-contracts/scripts/systemConstants.ts new file mode 100644 index 00000000..0252b5be --- /dev/null +++ b/packages/zevm-contracts/scripts/systemConstants.ts @@ -0,0 +1,5 @@ +export const SYSTEM_CONTRACT = "0x239e96c8f17C85c30100AC26F635Ea15f23E9c67"; +export const SWAP_ADDRESS = "0x43cFaA5cDd103B7733B13cF72e21aB97A2074C84"; +export const TOKEN_ADDRESS = "0x6e78f64edc4c422e7045bcf7562f13bbee75948a"; +export const MATH_ADDRESS = "0x66aa280f3db58231d08835673af286a8aaa80ef5"; +export const VIEWS_ADDRESS = "0x1bfef792f3b0483a6e201c004d9a59de214cb68d"; diff --git a/packages/zevm-contracts/scripts/zeta-swap/deploy.ts b/packages/zevm-contracts/scripts/zeta-swap/deploy.ts new file mode 100644 index 00000000..753b40ee --- /dev/null +++ b/packages/zevm-contracts/scripts/zeta-swap/deploy.ts @@ -0,0 +1,24 @@ +import { saveAddress } from "@zetachain/addresses-tools"; +import hardhat from "hardhat"; +import { ethers } from "hardhat"; + +import { ZetaSwap, ZetaSwap__factory } from "../../typechain-types"; +import { SWAP_ADDRESS, WZETA_ADDRESS } from "../systemConstants"; + +const main = async () => { + console.log(`Deploying ZetaSwap...`); + + const Factory = (await ethers.getContractFactory("ZetaSwap")) as ZetaSwap__factory; + + const contract = (await Factory.deploy(WZETA_ADDRESS, SWAP_ADDRESS)) as ZetaSwap; + + await contract.deployed(); + + console.log("Deployed ZetaSwap. Address:", contract.address); + saveAddress("zetaSwap", contract.address); +}; + +main().catch(error => { + console.error(error); + process.exit(1); +}); diff --git a/packages/zevm-contracts/tsconfig.json b/packages/zevm-contracts/tsconfig.json new file mode 100644 index 00000000..355cfda5 --- /dev/null +++ b/packages/zevm-contracts/tsconfig.json @@ -0,0 +1,14 @@ +{ + "extends": "../../tsconfig.json", + "include": ["./scripts", "./lib", "./test", "./tests", "./typechain", "./**/*.json", "typechain-types"], + "exclude": ["artifacts", "cache"], + "files": ["./hardhat.config.ts"], + "compilerOptions": { + "baseUrl": ".", + "paths": { + "@zetachain/addresses": ["../addresses/src/index"], + "@zetachain/addresses/*": ["../addresses/src/*"], + "@zetachain/interfaces": ["../interfaces/src/index"] + } + } +} diff --git a/yarn.lock b/yarn.lock index f3dea3b2..5d658b40 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2610,6 +2610,24 @@ __metadata: languageName: unknown linkType: soft +"@zetachain/zevm-contracts@workspace:packages/zevm-contracts": + version: 0.0.0-use.local + resolution: "@zetachain/zevm-contracts@workspace:packages/zevm-contracts" + dependencies: + "@defi-wonderland/smock": ^2.0.7 + "@openzeppelin/contracts": 4.6.0 + "@uniswap/v2-periphery": 1.1.0-beta.0 + "@zetachain/addresses": "workspace:^" + "@zetachain/addresses-tools": "workspace:^" + "@zetachain/interfaces": "workspace:^" + "@zetachain/protocol-contracts": "workspace:^" + ethers: 5.6.8 + hardhat-gas-reporter: ^1.0.8 + solidity-coverage: ^0.7.20 + tsconfig-paths: ^3.14.1 + languageName: unknown + linkType: soft + "abbrev@npm:1": version: 1.1.1 resolution: "abbrev@npm:1.1.1" From d2a7b799fd7a197789056e22fd3ae596c7505b78 Mon Sep 17 00:00:00 2001 From: Andres Martin Aiello <50411235+andresaiello@users.noreply.github.com> Date: Mon, 28 Nov 2022 13:41:37 -0300 Subject: [PATCH 045/115] Develop and deploy zevm uniswap (#55) * Develop cross chain swap * add deploy script * remove unsed code * Develop and deploy zevm uniswap * rename ZRC4 to ZRC20 * rename ZRC20 to zrc20 * fix swap contract * refactor * params to swap * refactor * update env example * add zeta btc swap * add script to read zEVM system data * add bitcoin test * add tBTC constant * dd btc helper * deploy btc inbound * random updates and deploy * update sample * deploy to athens 2 * refactor liq script * update add liquidity script * remove athens2 constant * restore from main --- .../addresses-tools/src/addresses.helpers.ts | 32 ++- packages/addresses-tools/src/networks.ts | 10 +- packages/addresses/src/addresses.athens.json | 103 +++++--- packages/addresses/src/addresses.helpers.ts | 12 +- packages/addresses/src/addresses.mainnet.json | 65 +++-- packages/addresses/src/addresses.troy.json | 25 +- .../test/MultiChainSwap.spec.ts | 7 +- .../example-contracts/test/test.helpers.ts | 3 +- .../ImmutableCreate2Factory.ts | 227 ++++++++++++++++++ .../ImmutableCreate2Factory.sol/index.ts | 5 + .../typechain-types/contracts/index.ts | 5 +- .../contracts/openzeppelin/index.ts | 4 + .../ImmutableCreate2Factory__factory.ts | 154 ++++++++++++ .../ImmutableCreate2Factory.sol/index.ts | 5 + .../factories/contracts/index.ts | 3 +- .../factories/contracts/openzeppelin/index.ts | 4 + .../interfaces/typechain-types/hardhat.d.ts | 18 ++ packages/interfaces/typechain-types/index.ts | 6 +- packages/zevm-contracts/.env.example | 1 + .../interfaces/{IZRC4.sol => IZRC20.sol} | 2 +- .../contracts/interfaces/zContract.sol | 2 +- .../contracts/shared/TestContracts.sol | 8 + .../contracts/shared/TestUniswapContracts.sol | 10 + .../contracts/system/SystemContract.sol | 18 +- .../contracts/zeta-swap/ZetaCurveSwapDemo.sol | 42 ++-- .../contracts/zeta-swap/ZetaSwap.sol | 62 +++-- .../zeta-swap/ZetaSwapBtcInbound.sol | 51 ++++ .../zevm-contracts/scripts/systemConstants.ts | 13 +- .../zeta-swap/add-liquidity-zeta-uniswap.ts | 178 ++++++++++++++ .../scripts/zeta-swap/deploy.ts | 31 ++- .../scripts/zeta-swap/get-system-data.ts | 37 +++ .../scripts/zeta-swap/helpers.ts | 29 +++ .../zevm-contracts/scripts/zeta-swap/send.ts | 28 +++ .../scripts/zeta-swap/swap-on-zevm.ts | 51 ++++ .../zevm-contracts/scripts/zeta-swap/swap.ts | 45 ++++ packages/zevm-contracts/test/Swap.spec.ts | 66 +++++ 36 files changed, 1225 insertions(+), 137 deletions(-) create mode 100644 packages/interfaces/typechain-types/contracts/ImmutableCreate2Factory.sol/ImmutableCreate2Factory.ts create mode 100644 packages/interfaces/typechain-types/contracts/ImmutableCreate2Factory.sol/index.ts create mode 100644 packages/interfaces/typechain-types/contracts/openzeppelin/index.ts create mode 100644 packages/interfaces/typechain-types/factories/contracts/ImmutableCreate2Factory.sol/ImmutableCreate2Factory__factory.ts create mode 100644 packages/interfaces/typechain-types/factories/contracts/ImmutableCreate2Factory.sol/index.ts create mode 100644 packages/interfaces/typechain-types/factories/contracts/openzeppelin/index.ts rename packages/zevm-contracts/contracts/interfaces/{IZRC4.sol => IZRC20.sol} (98%) create mode 100644 packages/zevm-contracts/contracts/shared/TestContracts.sol create mode 100644 packages/zevm-contracts/contracts/shared/TestUniswapContracts.sol create mode 100644 packages/zevm-contracts/contracts/zeta-swap/ZetaSwapBtcInbound.sol create mode 100644 packages/zevm-contracts/scripts/zeta-swap/add-liquidity-zeta-uniswap.ts create mode 100644 packages/zevm-contracts/scripts/zeta-swap/get-system-data.ts create mode 100644 packages/zevm-contracts/scripts/zeta-swap/helpers.ts create mode 100644 packages/zevm-contracts/scripts/zeta-swap/send.ts create mode 100644 packages/zevm-contracts/scripts/zeta-swap/swap-on-zevm.ts create mode 100644 packages/zevm-contracts/scripts/zeta-swap/swap.ts create mode 100644 packages/zevm-contracts/test/Swap.spec.ts diff --git a/packages/addresses-tools/src/addresses.helpers.ts b/packages/addresses-tools/src/addresses.helpers.ts index 4390d27d..3e7d79e6 100644 --- a/packages/addresses-tools/src/addresses.helpers.ts +++ b/packages/addresses-tools/src/addresses.helpers.ts @@ -39,7 +39,8 @@ export const getScanVariable = ({ customNetworkName }: { customNetworkName?: str dotenv.config(); const v = { - "athens-v2": "", + athens: "", + "bitcoin-test": "", "bsc-localnet": "", "bsc-testnet": process.env.BSCSCAN_API_KEY || "", "eth-localnet": "", @@ -62,7 +63,8 @@ export const getExplorerUrl = ({ customNetworkName }: { customNetworkName?: stri dotenv.config(); const v = { - "athens-v2": "", + athens: "", + "bitcoin-test": "", "bsc-localnet": "", "bsc-testnet": "https://testnet.bscscan.com/", "eth-localnet": "", @@ -79,6 +81,26 @@ export const getExplorerUrl = ({ customNetworkName }: { customNetworkName?: stri return v[networkName]; }; +export const getGasSymbolByNetwork = (networkName: NetworkName): string => { + const v = { + athens: "ZETA", + "bitcoin-test": "BTC", + "bsc-localnet": "BNB", + "bsc-testnet": "BNB", + "eth-localnet": "ETH", + "eth-mainnet": "ETH", + goerli: "ETH", + hardhat: "ETH", + "klaytn-baobab": "KLAY", + "klaytn-cypress": "KLAY", + "polygon-localnet": "MATIC", + "polygon-mumbai": "MATIC", + ropsten: "BYEBYE" + }; + + return v[networkName]; +}; + const MissingZetaNetworkError = new Error( "ZETA_NETWORK is not defined, please set the environment variable (e.g.: ZETA_NETWORK=athens )" ); @@ -139,7 +161,7 @@ export const addNewAddress = (addressName: string, addressValue: string = "") => if (!addressName) throw new Error("Emtpy address name."); const addressesDirname = join(dirname, `./`); - const addressesFiles = readdirSync(addressesDirname); + const addressesFiles = readdirSync(addressesDirname).filter(fileName => fileName.includes(".json")); addressesFiles.forEach(addressesFilename => { const addressPath = join(addressesDirname, addressesFilename); @@ -147,7 +169,7 @@ export const addNewAddress = (addressName: string, addressValue: string = "") => const addressesByNetwork = JSON.parse(readFileSync(addressPath, "utf8")); Object.keys(addressesByNetwork).forEach(network => { - if (!isNetworkName(network)) return; + if (!isNetworkName(network) && !isZetaNetworkName(network)) return; addressesByNetwork[network][addressName] = addressValue; addressesByNetwork[network] = Object.keys(addressesByNetwork[network]) @@ -167,7 +189,7 @@ export const addNewAddress = (addressName: string, addressValue: string = "") => export const addNewNetwork = (newNetworkName: string, addTo: ZetaNetworkName[]) => { if (!newNetworkName) throw new Error("Emtpy networkName name."); const addressesDirname = join(dirname, `./`); - const addressesFiles = readdirSync(addressesDirname); + const addressesFiles = readdirSync(addressesDirname).filter(fileName => fileName.includes(".json")); addressesFiles.forEach(addressFilename => { const addressesFilePath = join(addressesDirname, addressFilename); diff --git a/packages/addresses-tools/src/networks.ts b/packages/addresses-tools/src/networks.ts index 71b6a72c..478f1694 100644 --- a/packages/addresses-tools/src/networks.ts +++ b/packages/addresses-tools/src/networks.ts @@ -1,12 +1,12 @@ import type { NetworksUserConfig } from "hardhat/types"; export const getHardhatConfigNetworks = (PRIVATE_KEYS: string[]): NetworksUserConfig => ({ - "athens-v2": { + "athens": { accounts: PRIVATE_KEYS, - // chainId: 8666, + // chainId: 7001, gas: 5000000, gasPrice: 80000000000, - url: `http://3.132.197.22:8545`, + url: `https://archive.athens2.zetachain.com/evm`, }, "bsc-localnet": { gas: 5000000, @@ -31,8 +31,8 @@ export const getHardhatConfigNetworks = (PRIVATE_KEYS: string[]): NetworksUserCo goerli: { accounts: PRIVATE_KEYS, gas: 2100000, - gasPrice: 8000000000, - url: "https://rpc.goerli.mudit.blog", + gasPrice: 38000000000, + url: `https://goerli.infura.io/v3/${process.env.INFURA_KEY}`, }, hardhat: { chainId: 1337, diff --git a/packages/addresses/src/addresses.athens.json b/packages/addresses/src/addresses.athens.json index 03400621..57e3dfab 100644 --- a/packages/addresses/src/addresses.athens.json +++ b/packages/addresses/src/addresses.athens.json @@ -4,117 +4,160 @@ "crossChainCounter": "", "crossChainNft": "0xF7f6534C8f70f6001Fc267b55abfAA8B8a41Ea2e", "dai": "", + "immutableCreate2Factory": "0x095a03c6a68137fE9a566bBc3e552F299d8b886d", "multiChainSwap": "0xa0b5cbdc4d14c4f4d36483ec0de310919f3b2d90", + "multiChainSwapZetaConnector": "", "multiChainValue": "0x54284C0b4948FE2F93D3a0Dc17fA3587b16eE19F", - "tss": "0x61141bce5352fc9b5ff648468676e356518d86ab", + "tss": "0x7c125C1d515b8945841b3d5144a060115C58725F", "tssUpdater": "0x7274d1d5dddef36aac53dd45b93487ce01ef0a55", + "uniswapV2Factory": "", "uniswapV2Router02": "0x9Ac64Cc6e4415144C455BD8E4837Fea55603e5c3", "uniswapV3NftManager": "", "uniswapV3Quoter": "", "uniswapV3Router": "", "usdc": "", "weth9": "", + "zetaSwap": "", + "zetaSwapBtcInbound": "", "zetaToken": "0x000080383847bd75f91c168269aa74004877592f", - "zetaTokenConsumerUniV2": "0xa67b03930eb53d0462dCc0835e97964C062042fb", - "immutableCreate2Factory": "0x095a03c6a68137fE9a566bBc3e552F299d8b886d", - "zetaSwap": "" + "zetaTokenConsumerUniV2": "0xa67b03930eb53d0462dCc0835e97964C062042fb" }, "goerli": { "connector": "0x00007d0BA516a2bA02D77907d3a1348C1187Ae62", "crossChainCounter": "", "crossChainNft": "0xfE9eb065cab82421D06C8eD41c31Beb473a5Fa7e", "dai": "", + "immutableCreate2Factory": "0x095a03c6a68137fE9a566bBc3e552F299d8b886d", "multiChainSwap": "0x805fE47D1FE7d86496753bB4B36206953c1ae660", + "multiChainSwapZetaConnector": "", "multiChainValue": "0x31F884940B3876290A16B183b841bbE7E4965743", - "tss": "0x61141bce5352fc9b5ff648468676e356518d86ab", + "tss": "0x7c125C1d515b8945841b3d5144a060115C58725F", "tssUpdater": "0x7274d1d5dddef36aac53dd45b93487ce01ef0a55", + "uniswapV2Factory": "", "uniswapV2Router02": "0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D", "uniswapV3NftManager": "", "uniswapV3Quoter": "", "uniswapV3Router": "", "usdc": "", "weth9": "", + "zetaSwap": "", + "zetaSwapBtcInbound": "", "zetaToken": "0xCc7bb2D219A0FC08033E130629C2B854b7bA9195", - "zetaTokenConsumerUniV2": "0xDDB1C86c69f258F6d33377a8725404E4393326bB", - "immutableCreate2Factory": "0x095a03c6a68137fE9a566bBc3e552F299d8b886d", - "zetaSwap": "" + "zetaTokenConsumerUniV2": "0xDDB1C86c69f258F6d33377a8725404E4393326bB" }, "polygon-mumbai": { "connector": "0x000054d3A0Bc83Ec7808F52fCdC28A96c89F6C5c", "crossChainCounter": "", "crossChainNft": "", "dai": "", + "immutableCreate2Factory": "0x095a03c6a68137fE9a566bBc3e552F299d8b886d", + "multiChainSwap": "0xaf28cb0d9E045170E1642321B964740784E7dC64", + "multiChainSwapZetaConnector": "", "multiChainValue": "0xb3021F5603291895b0Df5fC6276cda33a0B90fa6", - "tss": "0x61141bce5352fc9b5ff648468676e356518d86ab", + "tss": "0x7c125C1d515b8945841b3d5144a060115C58725F", "tssUpdater": "0x7274d1d5dddef36aac53dd45b93487ce01ef0a55", + "uniswapV2Factory": "", "uniswapV2Router02": "0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D", "uniswapV3NftManager": "", "uniswapV3Quoter": "0xb27308f9F90D607463bb33eA1BeBb41C27CE5AB6", "uniswapV3Router": "0xE592427A0AEce92De3Edee1F18E0157C05861564", "usdc": "", "weth9": "0x9c3C9283D3e44854697Cd22D3Faa240Cfb032889", + "zetaSwap": "", + "zetaSwapBtcInbound": "", "zetaToken": "0x000080383847bd75f91c168269aa74004877592f", - "zetaTokenConsumerUniV2": "", - "immutableCreate2Factory": "0x095a03c6a68137fE9a566bBc3e552F299d8b886d", - "multiChainSwap": "0xaf28cb0d9E045170E1642321B964740784E7dC64", - "zetaSwap": "" + "zetaTokenConsumerUniV2": "" }, "ropsten": { - "connector": "0x000054d3A0Bc83Ec7808F52fCdC28A96c89F6C5c", + "connector": "", "crossChainCounter": "", "crossChainNft": "", "dai": "", - "multiChainValue": "0x4740f4051eA6D896C694303228D86Ba3141065ca", - "tss": "0x61141Bce5352fC9b5Ff648468676e356518D86AB", - "tssUpdater": "0x7274d1d5dddef36aac53dd45b93487ce01ef0a55", - "uniswapV2Router02": "0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D", + "immutableCreate2Factory": "", + "multiChainSwap": "", + "multiChainSwapZetaConnector": "", + "multiChainValue": "", + "tss": "", + "tssUpdater": "", + "uniswapV2Factory": "", + "uniswapV2Router02": "", "uniswapV3NftManager": "", "uniswapV3Quoter": "", "uniswapV3Router": "", "usdc": "", "weth9": "", - "zetaToken": "0x000080383847bd75f91c168269aa74004877592f", - "zetaTokenConsumerUniV2": "0x197bC8e7e813DfB95dEf0DAA44399648bC86f329", - "immutableCreate2Factory": "0x095a03c6a68137fE9a566bBc3e552F299d8b886d", - "zetaSwap": "" + "zetaSwap": "", + "zetaSwapBtcInbound": "", + "zetaToken": "", + "zetaTokenConsumerUniV2": "" }, "klaytn-baobab": { "connector": "0x000054d3A0Bc83Ec7808F52fCdC28A96c89F6C5c", "crossChainCounter": "", "crossChainNft": "", "dai": "", + "immutableCreate2Factory": "0x095a03c6a68137fE9a566bBc3e552F299d8b886d", "multiChainValue": "0x4f97Bc7ed459111296583e92a62f17D20B20825d", - "tss": "0x61141Bce5352fC9b5Ff648468676e356518D86AB", + "multiChainSwap": "", + "multiChainSwapZetaConnector": "", + "tss": "0x7c125C1d515b8945841b3d5144a060115C58725F", "tssUpdater": "0x7274d1d5dddef36aac53dd45b93487ce01ef0a55", + "uniswapV2Factory": "", "uniswapV2Router02": "", "uniswapV3NftManager": "", "uniswapV3Quoter": "", "uniswapV3Router": "", "usdc": "", "weth9": "", + "zetaSwap": "", + "zetaSwapBtcInbound": "", "zetaToken": "0x000080383847bD75F91c168269Aa74004877592f", - "zetaTokenConsumerUniV2": "", - "immutableCreate2Factory": "0x095a03c6a68137fE9a566bBc3e552F299d8b886d", - "zetaSwap": "" + "zetaTokenConsumerUniV2": "" + }, + "athens": { + "connector": "", + "crossChainCounter": "", + "crossChainNft": "", + "dai": "", + "immutableCreate2Factory": "", + "multiChainSwap": "", + "multiChainSwapZetaConnector": "", + "multiChainValue": "", + "tss": "", + "tssUpdater": "", + "uniswapV2Factory": "0x9fd96203f7b22bCF72d9DCb40ff98302376cE09c", + "uniswapV2Router02": "0x2ca7d64A7EFE2D62A725E2B35Cf7230D6677FfEe", + "uniswapV3NftManager": "", + "uniswapV3Quoter": "", + "uniswapV3Router": "", + "usdc": "", + "weth9": "0x5F0b1a82749cb4E2278EC87F8BF6B618dC71a8bf", + "zetaSwap": "0x71Ec5c05Aa669c4922569c1D33F7a81aaa218138", + "zetaSwapBtcInbound": "0x79c73Ba355f84feFFcDA2D2Cd4D61b9c795919Cc", + "zetaToken": "", + "zetaTokenConsumerUniV2": "" }, - "athens-v2": { + "bitcoin-test": { "connector": "", "crossChainCounter": "", "crossChainNft": "", "dai": "", + "immutableCreate2Factory": "", "multiChainSwap": "", + "multiChainSwapZetaConnector": "", "multiChainValue": "", "tss": "", "tssUpdater": "", + "uniswapV2Factory": "", "uniswapV2Router02": "", "uniswapV3NftManager": "", "uniswapV3Quoter": "", "uniswapV3Router": "", "usdc": "", "weth9": "", + "zetaSwap": "", + "zetaSwapBtcInbound": "", "zetaToken": "", - "zetaTokenConsumerUniV2": "", - "immutableCreate2Factory": "", - "zetaSwap": "0x8FeAf1BD718E4e6f82d0FE808f44f431B24b47DF" + "zetaTokenConsumerUniV2": "" } } \ No newline at end of file diff --git a/packages/addresses/src/addresses.helpers.ts b/packages/addresses/src/addresses.helpers.ts index b8031477..37547c8e 100644 --- a/packages/addresses/src/addresses.helpers.ts +++ b/packages/addresses/src/addresses.helpers.ts @@ -13,6 +13,7 @@ export type ZetaAddress = | "multiChainValue" | "tss" | "tssUpdater" + | "uniswapV2Factory" | "uniswapV2Router02" | "uniswapV3NftManager" | "uniswapV3Quoter" @@ -20,6 +21,7 @@ export type ZetaAddress = | "usdc" | "weth9" | "zetaSwap" + | "zetaSwapBtcInbound" | "zetaToken" | "zetaTokenConsumerUniV2"; @@ -35,6 +37,7 @@ const zetaAddresses: Record = { multiChainValue: true, tss: true, tssUpdater: true, + uniswapV2Factory: true, uniswapV2Router02: true, uniswapV3NftManager: true, uniswapV3Quoter: true, @@ -42,6 +45,7 @@ const zetaAddresses: Record = { usdc: true, weth9: true, zetaSwap: true, + zetaSwapBtcInbound: true, zetaToken: true, zetaTokenConsumerUniV2: true }; @@ -72,7 +76,8 @@ export const getLocalnetList = (): Record networkName === "athens"; @@ -119,7 +124,8 @@ export type ZetaNetworkName = ZetaLocalNetworkName | ZetaMainnetNetworkName | Ze export const getChainId = (networkName: NetworkName) => { const chainIds: Record = { - "athens-v2": 101, + athens: 7001, + "bitcoin-test": 18332, "bsc-localnet": 97, "bsc-testnet": 97, "eth-localnet": 5, diff --git a/packages/addresses/src/addresses.mainnet.json b/packages/addresses/src/addresses.mainnet.json index 8565581d..1a37d9c3 100644 --- a/packages/addresses/src/addresses.mainnet.json +++ b/packages/addresses/src/addresses.mainnet.json @@ -1,19 +1,48 @@ { - "eth-mainnet": { - "connector": "", - "crossChainCounter": "", - "crossChainNft": "", - "dai": "0x6b175474e89094c44da98b954eedeac495271d0f", - "multiChainValue": "", - "tss": "", - "tssUpdater": "", - "uniswapV2Router02": "0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D", - "uniswapV3NftManager": "0xC36442b4a4522E871399CD717aBDD847Ab11FE88", - "uniswapV3Quoter": "0xb27308f9F90D607463bb33eA1BeBb41C27CE5AB6", - "uniswapV3Router": "0xE592427A0AEce92De3Edee1F18E0157C05861564", - "usdc": "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48", - "weth9": "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2", - "zetaToken": "", - "zetaTokenConsumerUniV2": "" - } -} + "eth-mainnet": { + "connector": "", + "crossChainCounter": "", + "crossChainNft": "", + "dai": "0x6b175474e89094c44da98b954eedeac495271d0f", + "multiChainValue": "", + "tss": "", + "tssUpdater": "", + "uniswapV2Router02": "0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D", + "uniswapV3NftManager": "0xC36442b4a4522E871399CD717aBDD847Ab11FE88", + "uniswapV3Quoter": "0xb27308f9F90D607463bb33eA1BeBb41C27CE5AB6", + "uniswapV3Router": "0xE592427A0AEce92De3Edee1F18E0157C05861564", + "usdc": "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48", + "weth9": "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2", + "zetaSwapBtcInbound": "", + "zetaToken": "", + "zetaTokenConsumerUniV2": "", + "immutableCreate2Factory": "", + "multiChainSwapZetaConnector": "", + "multiChainSwap": "", + "uniswapV2Factory": "", + "zetaSwap": "" + }, + "klaytn-cypress": { + "connector": "", + "crossChainCounter": "", + "crossChainNft": "", + "dai": "", + "multiChainValue": "", + "tss": "", + "tssUpdater": "", + "uniswapV2Router02": "", + "uniswapV3NftManager": "", + "uniswapV3Quoter": "", + "uniswapV3Router": "", + "usdc": "", + "weth9": "", + "zetaSwapBtcInbound": "", + "zetaToken": "", + "zetaTokenConsumerUniV2": "", + "immutableCreate2Factory": "", + "multiChainSwapZetaConnector": "", + "multiChainSwap": "", + "uniswapV2Factory": "", + "zetaSwap": "" + } +} \ No newline at end of file diff --git a/packages/addresses/src/addresses.troy.json b/packages/addresses/src/addresses.troy.json index 89820cbb..18ad510f 100644 --- a/packages/addresses/src/addresses.troy.json +++ b/packages/addresses/src/addresses.troy.json @@ -14,7 +14,12 @@ "uniswapV3Router": "", "usdc": "", "weth9": "", + "zetaSwapBtcInbound": "", "zetaToken": "0xddE78e6202518FF4936b5302cC2891ec180E8bFf", + "immutableCreate2Factory": "", + "multiChainSwapZetaConnector": "", + "uniswapV2Factory": "", + "zetaSwap": "", "zetaTokenConsumerUniV2": "" }, "eth-localnet": { @@ -22,6 +27,7 @@ "crossChainCounter": "", "crossChainNft": "", "dai": "", + "multiChainSwap":"", "multiChainValue": "", "tss": "0x8C001e2204000D8ED10cAcf0F68106b68e036A26", "tssUpdater": "0xfBec4048e09749515110c89D881EcDcA4460D377", @@ -31,7 +37,12 @@ "uniswapV3Router": "", "usdc": "", "weth9": "", + "zetaSwapBtcInbound": "", "zetaToken": "0xaEF27C0E302005dB3b442edF762EB070Dc2DB9b5", + "immutableCreate2Factory": "", + "multiChainSwapZetaConnector": "", + "uniswapV2Factory": "", + "zetaSwap": "", "zetaTokenConsumerUniV2": "" }, "bsc-localnet": { @@ -39,6 +50,7 @@ "crossChainCounter": "", "crossChainNft": "", "dai": "", + "multiChainSwap":"", "multiChainValue": "", "tss": "0x8C001e2204000D8ED10cAcf0F68106b68e036A26", "tssUpdater": "0x12Dc2227AA4b98b00Ff8148fDA9Ef750929B0F68", @@ -48,7 +60,12 @@ "uniswapV3Router": "", "usdc": "", "weth9": "", + "zetaSwapBtcInbound": "", "zetaToken": "0x0CF6e5aA211A4b7da5d04e93dC40Ee18202a5f84", + "immutableCreate2Factory": "", + "multiChainSwapZetaConnector": "", + "uniswapV2Factory": "", + "zetaSwap": "", "zetaTokenConsumerUniV2": "" }, "polygon-localnet": { @@ -56,6 +73,7 @@ "crossChainCounter": "", "crossChainNft": "", "dai": "", + "multiChainSwap":"", "multiChainValue": "", "tss": "0x8C001e2204000D8ED10cAcf0F68106b68e036A26", "tssUpdater": "0x78C18E214174A08Fc32e174fb203Aba05B016789", @@ -65,7 +83,12 @@ "uniswapV3Router": "", "usdc": "", "weth9": "", + "zetaSwapBtcInbound": "", "zetaToken": "0xD443E93f689a7E1d517Fef799b1d2Fd2FA536d3A", + "immutableCreate2Factory": "", + "multiChainSwapZetaConnector": "", + "uniswapV2Factory": "", + "zetaSwap": "", "zetaTokenConsumerUniV2": "" } -} +} \ No newline at end of file diff --git a/packages/example-contracts/test/MultiChainSwap.spec.ts b/packages/example-contracts/test/MultiChainSwap.spec.ts index 7aa254a0..8893721f 100644 --- a/packages/example-contracts/test/MultiChainSwap.spec.ts +++ b/packages/example-contracts/test/MultiChainSwap.spec.ts @@ -7,6 +7,7 @@ import chai, { expect } from "chai"; import { ethers } from "hardhat"; import { getMultiChainSwapUniV2, getMultiChainSwapZetaConnector } from "../lib/multi-chain-swap/MultiChainSwap.helpers"; +import { getAddress } from "../lib/shared/address.helpers"; import { getNow, getZetaMock } from "../lib/shared/deploy.helpers"; import { ERC20__factory, @@ -101,16 +102,16 @@ describe("MultiChainSwap tests", () => { USDCTokenContract = ERC20Factory.attach(USDC_ADDR); multiChainSwapContractA = await getMultiChainSwapUniV2({ - deployParams: [zetaConnectorMock.address, zetaTokenMock.address, uniswapRouterAddr], + deployParams: [zetaConnectorMock.address, zetaTokenMock.address, uniswapRouterAddr] }); multiChainSwapContractB = await getMultiChainSwapUniV2({ - deployParams: [zetaConnectorMock.address, zetaTokenMock.address, uniswapRouterAddr], + deployParams: [zetaConnectorMock.address, zetaTokenMock.address, uniswapRouterAddr] }); zetaConnectorSmock = await smock.fake("MultiChainSwapZetaConnector"); multiChainSwapContractWithSmock = await getMultiChainSwapUniV2({ - deployParams: [zetaConnectorSmock.address, zetaTokenMock.address, uniswapRouterAddr], + deployParams: [zetaConnectorSmock.address, zetaTokenMock.address, uniswapRouterAddr] }); const encodedCrossChainAddressB = ethers.utils.solidityPack(["address"], [multiChainSwapContractB.address]); diff --git a/packages/example-contracts/test/test.helpers.ts b/packages/example-contracts/test/test.helpers.ts index f9bb6eb8..46bcf0be 100644 --- a/packages/example-contracts/test/test.helpers.ts +++ b/packages/example-contracts/test/test.helpers.ts @@ -1,6 +1,5 @@ import { MaxUint256 } from "@ethersproject/constants"; import { SignerWithAddress } from "@nomiclabs/hardhat-ethers/signers"; -import { getAddress } from "@zetachain/addresses"; import { ZetaTokenConsumerUniV3__factory } from "@zetachain/interfaces/typechain-types"; import { BigNumber, ContractReceipt } from "ethers"; @@ -10,7 +9,7 @@ import { ERC20__factory, IUniswapV2Pair__factory, MultiChainSwapUniV2__factory, - UniswapV2Router02__factory, + UniswapV2Router02__factory } from "../typechain-types"; export const getMintTokenId = (mintTx: ContractReceipt) => mintTx.events?.[0].args?.tokenId; diff --git a/packages/interfaces/typechain-types/contracts/ImmutableCreate2Factory.sol/ImmutableCreate2Factory.ts b/packages/interfaces/typechain-types/contracts/ImmutableCreate2Factory.sol/ImmutableCreate2Factory.ts new file mode 100644 index 00000000..2ae856a5 --- /dev/null +++ b/packages/interfaces/typechain-types/contracts/ImmutableCreate2Factory.sol/ImmutableCreate2Factory.ts @@ -0,0 +1,227 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import type { + BaseContract, + BigNumber, + BytesLike, + CallOverrides, + ContractTransaction, + PayableOverrides, + 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, +} from "../../common"; + +export interface ImmutableCreate2FactoryInterface extends utils.Interface { + functions: { + "hasBeenDeployed(address)": FunctionFragment; + "safeCreate2(bytes32,bytes)": FunctionFragment; + "findCreate2Address(bytes32,bytes)": FunctionFragment; + "findCreate2AddressViaHash(bytes32,bytes32)": FunctionFragment; + }; + + getFunction( + nameOrSignatureOrTopic: + | "hasBeenDeployed" + | "safeCreate2" + | "findCreate2Address" + | "findCreate2AddressViaHash" + ): FunctionFragment; + + encodeFunctionData( + functionFragment: "hasBeenDeployed", + values: [string] + ): string; + encodeFunctionData( + functionFragment: "safeCreate2", + values: [BytesLike, BytesLike] + ): string; + encodeFunctionData( + functionFragment: "findCreate2Address", + values: [BytesLike, BytesLike] + ): string; + encodeFunctionData( + functionFragment: "findCreate2AddressViaHash", + values: [BytesLike, BytesLike] + ): string; + + decodeFunctionResult( + functionFragment: "hasBeenDeployed", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "safeCreate2", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "findCreate2Address", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "findCreate2AddressViaHash", + data: BytesLike + ): Result; + + events: {}; +} + +export interface ImmutableCreate2Factory extends BaseContract { + connect(signerOrProvider: Signer | Provider | string): this; + attach(addressOrName: string): this; + deployed(): Promise; + + interface: ImmutableCreate2FactoryInterface; + + 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: { + hasBeenDeployed( + deploymentAddress: string, + overrides?: CallOverrides + ): Promise<[boolean]>; + + safeCreate2( + salt: BytesLike, + initializationCode: BytesLike, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + + findCreate2Address( + salt: BytesLike, + initCode: BytesLike, + overrides?: CallOverrides + ): Promise<[string] & { deploymentAddress: string }>; + + findCreate2AddressViaHash( + salt: BytesLike, + initCodeHash: BytesLike, + overrides?: CallOverrides + ): Promise<[string] & { deploymentAddress: string }>; + }; + + hasBeenDeployed( + deploymentAddress: string, + overrides?: CallOverrides + ): Promise; + + safeCreate2( + salt: BytesLike, + initializationCode: BytesLike, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + + findCreate2Address( + salt: BytesLike, + initCode: BytesLike, + overrides?: CallOverrides + ): Promise; + + findCreate2AddressViaHash( + salt: BytesLike, + initCodeHash: BytesLike, + overrides?: CallOverrides + ): Promise; + + callStatic: { + hasBeenDeployed( + deploymentAddress: string, + overrides?: CallOverrides + ): Promise; + + safeCreate2( + salt: BytesLike, + initializationCode: BytesLike, + overrides?: CallOverrides + ): Promise; + + findCreate2Address( + salt: BytesLike, + initCode: BytesLike, + overrides?: CallOverrides + ): Promise; + + findCreate2AddressViaHash( + salt: BytesLike, + initCodeHash: BytesLike, + overrides?: CallOverrides + ): Promise; + }; + + filters: {}; + + estimateGas: { + hasBeenDeployed( + deploymentAddress: string, + overrides?: CallOverrides + ): Promise; + + safeCreate2( + salt: BytesLike, + initializationCode: BytesLike, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + + findCreate2Address( + salt: BytesLike, + initCode: BytesLike, + overrides?: CallOverrides + ): Promise; + + findCreate2AddressViaHash( + salt: BytesLike, + initCodeHash: BytesLike, + overrides?: CallOverrides + ): Promise; + }; + + populateTransaction: { + hasBeenDeployed( + deploymentAddress: string, + overrides?: CallOverrides + ): Promise; + + safeCreate2( + salt: BytesLike, + initializationCode: BytesLike, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + + findCreate2Address( + salt: BytesLike, + initCode: BytesLike, + overrides?: CallOverrides + ): Promise; + + findCreate2AddressViaHash( + salt: BytesLike, + initCodeHash: BytesLike, + overrides?: CallOverrides + ): Promise; + }; +} diff --git a/packages/interfaces/typechain-types/contracts/ImmutableCreate2Factory.sol/index.ts b/packages/interfaces/typechain-types/contracts/ImmutableCreate2Factory.sol/index.ts new file mode 100644 index 00000000..1af43d91 --- /dev/null +++ b/packages/interfaces/typechain-types/contracts/ImmutableCreate2Factory.sol/index.ts @@ -0,0 +1,5 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +export type { ImmutableCreate2Factory } from "./ImmutableCreate2Factory"; +export type { Ownable } from "./Ownable"; diff --git a/packages/interfaces/typechain-types/contracts/index.ts b/packages/interfaces/typechain-types/contracts/index.ts index 2f9ec59f..b6d3e651 100644 --- a/packages/interfaces/typechain-types/contracts/index.ts +++ b/packages/interfaces/typechain-types/contracts/index.ts @@ -1,6 +1,8 @@ /* Autogenerated file. Do not edit manually. */ /* tslint:disable */ /* eslint-disable */ +import type * as immutableCreate2FactorySol from "./ImmutableCreate2Factory.sol"; +export type { immutableCreate2FactorySol }; import type * as zetaEthSol from "./Zeta.eth.sol"; export type { zetaEthSol }; import type * as zetaNonEthSol from "./Zeta.non-eth.sol"; @@ -17,7 +19,8 @@ import type * as zetaTokenConsumerUniV3StrategySol from "./ZetaTokenConsumerUniV export type { zetaTokenConsumerUniV3StrategySol }; import type * as interfaces from "./interfaces"; export type { interfaces }; +import type * as openzeppelin from "./openzeppelin"; +export type { openzeppelin }; import type * as testing from "./testing"; export type { testing }; -export type { ImmutableCreate2Factory } from "./ImmutableCreate2Factory"; export type { ZetaInteractor } from "./ZetaInteractor"; diff --git a/packages/interfaces/typechain-types/contracts/openzeppelin/index.ts b/packages/interfaces/typechain-types/contracts/openzeppelin/index.ts new file mode 100644 index 00000000..4acbefbf --- /dev/null +++ b/packages/interfaces/typechain-types/contracts/openzeppelin/index.ts @@ -0,0 +1,4 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +export type { Ownable2Step } from "./Ownable2Step"; diff --git a/packages/interfaces/typechain-types/factories/contracts/ImmutableCreate2Factory.sol/ImmutableCreate2Factory__factory.ts b/packages/interfaces/typechain-types/factories/contracts/ImmutableCreate2Factory.sol/ImmutableCreate2Factory__factory.ts new file mode 100644 index 00000000..5c14e21f --- /dev/null +++ b/packages/interfaces/typechain-types/factories/contracts/ImmutableCreate2Factory.sol/ImmutableCreate2Factory__factory.ts @@ -0,0 +1,154 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import { Signer, utils, Contract, ContractFactory, Overrides } from "ethers"; +import type { Provider, TransactionRequest } from "@ethersproject/providers"; +import type { + ImmutableCreate2Factory, + ImmutableCreate2FactoryInterface, +} from "../../../contracts/ImmutableCreate2Factory.sol/ImmutableCreate2Factory"; + +const _abi = [ + { + constant: true, + inputs: [ + { + name: "deploymentAddress", + type: "address", + }, + ], + name: "hasBeenDeployed", + outputs: [ + { + name: "", + type: "bool", + }, + ], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: false, + inputs: [ + { + name: "salt", + type: "bytes32", + }, + { + name: "initializationCode", + type: "bytes", + }, + ], + name: "safeCreate2", + outputs: [ + { + name: "deploymentAddress", + type: "address", + }, + ], + payable: true, + stateMutability: "payable", + type: "function", + }, + { + constant: true, + inputs: [ + { + name: "salt", + type: "bytes32", + }, + { + name: "initCode", + type: "bytes", + }, + ], + name: "findCreate2Address", + outputs: [ + { + name: "deploymentAddress", + type: "address", + }, + ], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: true, + inputs: [ + { + name: "salt", + type: "bytes32", + }, + { + name: "initCodeHash", + type: "bytes32", + }, + ], + name: "findCreate2AddressViaHash", + outputs: [ + { + name: "deploymentAddress", + type: "address", + }, + ], + payable: false, + stateMutability: "view", + type: "function", + }, +]; + +const _bytecode = + "0x608060405234801561001057600080fd5b506109d0806100206000396000f3fe60806040526004361061003f5760003560e01c806308508b8f1461004457806364e03087146100ad57806385cf97ab14610170578063a49a7c9014610240575b600080fd5b34801561005057600080fd5b506100936004803603602081101561006757600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506102c5565b604051808215151515815260200191505060405180910390f35b61012e600480360360408110156100c357600080fd5b8101908080359060200190929190803590602001906401000000008111156100ea57600080fd5b8201836020820111156100fc57600080fd5b8035906020019184600183028401116401000000008311171561011e57600080fd5b909192939192939050505061031a565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561017c57600080fd5b506101fe6004803603604081101561019357600080fd5b8101908080359060200190929190803590602001906401000000008111156101ba57600080fd5b8201836020820111156101cc57600080fd5b803590602001918460018302840111640100000000831117156101ee57600080fd5b90919293919293905050506106b5565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561024c57600080fd5b506102836004803603604081101561026357600080fd5b8101908080359060200190929190803590602001909291905050506107db565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b60008060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff169050919050565b6000833373ffffffffffffffffffffffffffffffffffffffff168160601c73ffffffffffffffffffffffffffffffffffffffff16148061037b5750600060601b6bffffffffffffffffffffffff1916816bffffffffffffffffffffffff1916145b6103d0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260458152602001806109116045913960600191505060405180910390fd5b606084848080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f82011690508083019250505050505050905060003087836040516020018082805190602001908083835b602083106104545780518252602082019150602081019050602083039250610431565b6001836020036101000a0380198251168184511680821785525050505050509050019150506040516020818303038152906040528051906020012060405160200180807fff000000000000000000000000000000000000000000000000000000000000008152506001018473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1660601b815260140183815260200182815260200193505050506040516020818303038152906040528051906020012060001c90506000808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16156105c1576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252603f8152602001806108d2603f913960400191505060405180910390fd5b81602001825188818334f5955050508073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1614610654576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260468152602001806109566046913960600191505060405180910390fd5b60016000808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055505050509392505050565b6000308484846040516020018083838082843780830192505050925050506040516020818303038152906040528051906020012060405160200180807fff000000000000000000000000000000000000000000000000000000000000008152506001018473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1660601b815260140183815260200182815260200193505050506040516020818303038152906040528051906020012060001c90506000808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16156107d357600090506107d4565b5b9392505050565b600030838360405160200180807fff000000000000000000000000000000000000000000000000000000000000008152506001018473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1660601b815260140183815260200182815260200193505050506040516020818303038152906040528051906020012060001c90506000808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16156108ca57600090506108cb565b5b9291505056fe496e76616c696420636f6e7472616374206372656174696f6e202d20636f6e74726163742068617320616c7265616479206265656e206465706c6f7965642e496e76616c69642073616c74202d206669727374203230206279746573206f66207468652073616c74206d757374206d617463682063616c6c696e6720616464726573732e4661696c656420746f206465706c6f7920636f6e7472616374207573696e672070726f76696465642073616c7420616e6420696e697469616c697a6174696f6e20636f64652ea265627a7a72305820d7c139ad04a8d13985b5e2d67c67413e545e678b3fc89b6305c26e51dee238a764736f6c634300050a0032"; + +type ImmutableCreate2FactoryConstructorParams = + | [signer?: Signer] + | ConstructorParameters; + +const isSuperArgs = ( + xs: ImmutableCreate2FactoryConstructorParams +): xs is ConstructorParameters => xs.length > 1; + +export class ImmutableCreate2Factory__factory extends ContractFactory { + constructor(...args: ImmutableCreate2FactoryConstructorParams) { + if (isSuperArgs(args)) { + super(...args); + } else { + super(_abi, _bytecode, args[0]); + } + } + + override deploy( + overrides?: Overrides & { from?: string | Promise } + ): Promise { + return super.deploy(overrides || {}) as Promise; + } + override getDeployTransaction( + overrides?: Overrides & { from?: string | Promise } + ): TransactionRequest { + return super.getDeployTransaction(overrides || {}); + } + override attach(address: string): ImmutableCreate2Factory { + return super.attach(address) as ImmutableCreate2Factory; + } + override connect(signer: Signer): ImmutableCreate2Factory__factory { + return super.connect(signer) as ImmutableCreate2Factory__factory; + } + + static readonly bytecode = _bytecode; + static readonly abi = _abi; + static createInterface(): ImmutableCreate2FactoryInterface { + return new utils.Interface(_abi) as ImmutableCreate2FactoryInterface; + } + static connect( + address: string, + signerOrProvider: Signer | Provider + ): ImmutableCreate2Factory { + return new Contract( + address, + _abi, + signerOrProvider + ) as ImmutableCreate2Factory; + } +} diff --git a/packages/interfaces/typechain-types/factories/contracts/ImmutableCreate2Factory.sol/index.ts b/packages/interfaces/typechain-types/factories/contracts/ImmutableCreate2Factory.sol/index.ts new file mode 100644 index 00000000..bacefb31 --- /dev/null +++ b/packages/interfaces/typechain-types/factories/contracts/ImmutableCreate2Factory.sol/index.ts @@ -0,0 +1,5 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +export { ImmutableCreate2Factory__factory } from "./ImmutableCreate2Factory__factory"; +export { Ownable__factory } from "./Ownable__factory"; diff --git a/packages/interfaces/typechain-types/factories/contracts/index.ts b/packages/interfaces/typechain-types/factories/contracts/index.ts index 7584b68e..940117ae 100644 --- a/packages/interfaces/typechain-types/factories/contracts/index.ts +++ b/packages/interfaces/typechain-types/factories/contracts/index.ts @@ -1,6 +1,7 @@ /* Autogenerated file. Do not edit manually. */ /* tslint:disable */ /* eslint-disable */ +export * as immutableCreate2FactorySol from "./ImmutableCreate2Factory.sol"; export * as zetaEthSol from "./Zeta.eth.sol"; export * as zetaNonEthSol from "./Zeta.non-eth.sol"; export * as zetaConnectorBaseSol from "./ZetaConnector.base.sol"; @@ -9,6 +10,6 @@ export * as zetaConnectorNonEthSol from "./ZetaConnector.non-eth.sol"; export * as zetaTokenConsumerUniV2StrategySol from "./ZetaTokenConsumerUniV2.strategy.sol"; export * as zetaTokenConsumerUniV3StrategySol from "./ZetaTokenConsumerUniV3.strategy.sol"; export * as interfaces from "./interfaces"; +export * as openzeppelin from "./openzeppelin"; export * as testing from "./testing"; -export { ImmutableCreate2Factory__factory } from "./ImmutableCreate2Factory__factory"; export { ZetaInteractor__factory } from "./ZetaInteractor__factory"; diff --git a/packages/interfaces/typechain-types/factories/contracts/openzeppelin/index.ts b/packages/interfaces/typechain-types/factories/contracts/openzeppelin/index.ts new file mode 100644 index 00000000..19bc8448 --- /dev/null +++ b/packages/interfaces/typechain-types/factories/contracts/openzeppelin/index.ts @@ -0,0 +1,4 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +export { Ownable2Step__factory } from "./Ownable2Step__factory"; diff --git a/packages/interfaces/typechain-types/hardhat.d.ts b/packages/interfaces/typechain-types/hardhat.d.ts index 776a3f6e..88a97d42 100644 --- a/packages/interfaces/typechain-types/hardhat.d.ts +++ b/packages/interfaces/typechain-types/hardhat.d.ts @@ -80,6 +80,10 @@ declare module "hardhat/types/runtime" { name: "ImmutableCreate2Factory", signerOrOptions?: ethers.Signer | FactoryOptions ): Promise; + getContractFactory( + name: "Ownable", + signerOrOptions?: ethers.Signer | FactoryOptions + ): Promise; getContractFactory( name: "ConnectorErrors", signerOrOptions?: ethers.Signer | FactoryOptions @@ -108,6 +112,10 @@ declare module "hardhat/types/runtime" { name: "ZetaNonEthInterface", signerOrOptions?: ethers.Signer | FactoryOptions ): Promise; + getContractFactory( + name: "Ownable2Step", + signerOrOptions?: ethers.Signer | FactoryOptions + ): Promise; getContractFactory( name: "INonfungiblePositionManager", signerOrOptions?: ethers.Signer | FactoryOptions @@ -254,6 +262,11 @@ declare module "hardhat/types/runtime" { address: string, signer?: ethers.Signer ): Promise; + getContractAt( + name: "Ownable", + address: string, + signer?: ethers.Signer + ): Promise; getContractAt( name: "ConnectorErrors", address: string, @@ -289,6 +302,11 @@ declare module "hardhat/types/runtime" { address: string, signer?: ethers.Signer ): Promise; + getContractAt( + name: "Ownable2Step", + address: string, + signer?: ethers.Signer + ): Promise; getContractAt( name: "INonfungiblePositionManager", address: string, diff --git a/packages/interfaces/typechain-types/index.ts b/packages/interfaces/typechain-types/index.ts index 125404cd..66e46a91 100644 --- a/packages/interfaces/typechain-types/index.ts +++ b/packages/interfaces/typechain-types/index.ts @@ -38,8 +38,8 @@ export type { IQuoter } from "./@uniswap/v3-periphery/contracts/interfaces/IQuot export { IQuoter__factory } from "./factories/@uniswap/v3-periphery/contracts/interfaces/IQuoter__factory"; export type { ISwapRouter } from "./@uniswap/v3-periphery/contracts/interfaces/ISwapRouter"; export { ISwapRouter__factory } from "./factories/@uniswap/v3-periphery/contracts/interfaces/ISwapRouter__factory"; -export type { ImmutableCreate2Factory } from "./contracts/ImmutableCreate2Factory"; -export { ImmutableCreate2Factory__factory } from "./factories/contracts/ImmutableCreate2Factory__factory"; +export type { ImmutableCreate2Factory } from "./contracts/ImmutableCreate2Factory.sol/ImmutableCreate2Factory"; +export { ImmutableCreate2Factory__factory } from "./factories/contracts/ImmutableCreate2Factory.sol/ImmutableCreate2Factory__factory"; export type { ConnectorErrors } from "./contracts/interfaces/ConnectorErrors"; export { ConnectorErrors__factory } from "./factories/contracts/interfaces/ConnectorErrors__factory"; export type { ZetaErrors } from "./contracts/interfaces/ZetaErrors"; @@ -54,6 +54,8 @@ export type { ZetaTokenConsumer } from "./contracts/interfaces/ZetaInterfaces.so export { ZetaTokenConsumer__factory } from "./factories/contracts/interfaces/ZetaInterfaces.sol/ZetaTokenConsumer__factory"; export type { ZetaNonEthInterface } from "./contracts/interfaces/ZetaNonEthInterface"; export { ZetaNonEthInterface__factory } from "./factories/contracts/interfaces/ZetaNonEthInterface__factory"; +export type { Ownable2Step } from "./contracts/openzeppelin/Ownable2Step"; +export { Ownable2Step__factory } from "./factories/contracts/openzeppelin/Ownable2Step__factory"; export type { INonfungiblePositionManager } from "./contracts/testing/TestUniswapV3Contracts.sol/INonfungiblePositionManager"; export { INonfungiblePositionManager__factory } from "./factories/contracts/testing/TestUniswapV3Contracts.sol/INonfungiblePositionManager__factory"; export type { IPoolInitializer } from "./contracts/testing/TestUniswapV3Contracts.sol/IPoolInitializer"; diff --git a/packages/zevm-contracts/.env.example b/packages/zevm-contracts/.env.example index e69de29b..01c40bd1 100644 --- a/packages/zevm-contracts/.env.example +++ b/packages/zevm-contracts/.env.example @@ -0,0 +1 @@ +INFURA_KEY= \ No newline at end of file diff --git a/packages/zevm-contracts/contracts/interfaces/IZRC4.sol b/packages/zevm-contracts/contracts/interfaces/IZRC20.sol similarity index 98% rename from packages/zevm-contracts/contracts/interfaces/IZRC4.sol rename to packages/zevm-contracts/contracts/interfaces/IZRC20.sol index 299dfd96..ecd97122 100644 --- a/packages/zevm-contracts/contracts/interfaces/IZRC4.sol +++ b/packages/zevm-contracts/contracts/interfaces/IZRC20.sol @@ -1,7 +1,7 @@ // SPDX-License-Identifier: MIT pragma solidity 0.8.7; -interface IZRC4 { +interface IZRC20 { function totalSupply() external view returns (uint256); function balanceOf(address account) external view returns (uint256); diff --git a/packages/zevm-contracts/contracts/interfaces/zContract.sol b/packages/zevm-contracts/contracts/interfaces/zContract.sol index e1c3350f..5ede1549 100644 --- a/packages/zevm-contracts/contracts/interfaces/zContract.sol +++ b/packages/zevm-contracts/contracts/interfaces/zContract.sol @@ -3,7 +3,7 @@ pragma solidity 0.8.7; interface zContract { function onCrossChainCall( - address zrc4, + address zrc20, uint256 amount, bytes calldata message ) external; diff --git a/packages/zevm-contracts/contracts/shared/TestContracts.sol b/packages/zevm-contracts/contracts/shared/TestContracts.sol new file mode 100644 index 00000000..2c222aa8 --- /dev/null +++ b/packages/zevm-contracts/contracts/shared/TestContracts.sol @@ -0,0 +1,8 @@ +// SPDX-License-Identifier: MIT +pragma solidity 0.8.7; + +/** + * @dev Contracts that need to be compiled for testing purposes + */ + +import "@openzeppelin/contracts/token/ERC20/ERC20.sol"; diff --git a/packages/zevm-contracts/contracts/shared/TestUniswapContracts.sol b/packages/zevm-contracts/contracts/shared/TestUniswapContracts.sol new file mode 100644 index 00000000..53520a08 --- /dev/null +++ b/packages/zevm-contracts/contracts/shared/TestUniswapContracts.sol @@ -0,0 +1,10 @@ +// SPDX-License-Identifier: MIT +pragma solidity 0.6.6; + +/** + * @dev Contracts that need to be compiled for testing purposes + */ + +import "@uniswap/v2-core/contracts/interfaces/IUniswapV2Factory.sol"; +import "@uniswap/v2-core/contracts/interfaces/IUniswapV2Pair.sol"; +import "@uniswap/v2-periphery/contracts/UniswapV2Router02.sol"; diff --git a/packages/zevm-contracts/contracts/system/SystemContract.sol b/packages/zevm-contracts/contracts/system/SystemContract.sol index 87ea3477..93daf83f 100644 --- a/packages/zevm-contracts/contracts/system/SystemContract.sol +++ b/packages/zevm-contracts/contracts/system/SystemContract.sol @@ -2,7 +2,7 @@ pragma solidity 0.8.7; import "../interfaces/zContract.sol"; -import "../interfaces/IZRC4.sol"; +import "../interfaces/IZRC20.sol"; interface SystemContractErrors { error CallerIsNotFungibleModule(); @@ -16,7 +16,7 @@ interface SystemContractErrors { contract SystemContract is SystemContractErrors { mapping(uint256 => uint256) public gasPriceByChainId; - mapping(uint256 => address) public gasCoinZRC4ByChainId; + mapping(uint256 => address) public gasCoinZRC20ByChainId; mapping(uint256 => address) public gasZetaPoolByChainId; address public constant FUNGIBLE_MODULE_ADDRESS = 0x735b14BB79463307AAcBED86DAf3322B1e6226aB; @@ -42,9 +42,9 @@ contract SystemContract is SystemContractErrors { emit SystemContractDeployed(); } - // deposit foreign coins into ZRC4 and call user specified contract on zEVM + // deposit foreign coins into ZRC20 and call user specified contract on zEVM function depositAndCall( - address zrc4, + address zrc20, uint256 amount, address target, bytes calldata message @@ -52,8 +52,8 @@ contract SystemContract is SystemContractErrors { if (msg.sender != FUNGIBLE_MODULE_ADDRESS) revert CallerIsNotFungibleModule(); if (target == FUNGIBLE_MODULE_ADDRESS || target == address(this)) revert InvalidTarget(); - IZRC4(zrc4).deposit(target, amount); - zContract(target).onCrossChainCall(zrc4, amount, message); + IZRC20(zrc20).deposit(target, amount); + zContract(target).onCrossChainCall(zrc20, amount, message); } // returns sorted token addresses, used to handle return values from pairs sorted in this order @@ -93,10 +93,10 @@ contract SystemContract is SystemContractErrors { emit SetGasPrice(chainID, price); } - function setGasCoinZRC4(uint256 chainID, address zrc4) external { + function setGasCoinZRC20(uint256 chainID, address zrc20) external { if (msg.sender != FUNGIBLE_MODULE_ADDRESS) revert CallerIsNotFungibleModule(); - gasCoinZRC4ByChainId[chainID] = zrc4; - emit SetGasCoin(chainID, zrc4); + gasCoinZRC20ByChainId[chainID] = zrc20; + emit SetGasCoin(chainID, zrc20); } // set the pool wzeta/erc20 address diff --git a/packages/zevm-contracts/contracts/zeta-swap/ZetaCurveSwapDemo.sol b/packages/zevm-contracts/contracts/zeta-swap/ZetaCurveSwapDemo.sol index 6988bf85..3b63c686 100644 --- a/packages/zevm-contracts/contracts/zeta-swap/ZetaCurveSwapDemo.sol +++ b/packages/zevm-contracts/contracts/zeta-swap/ZetaCurveSwapDemo.sol @@ -1,7 +1,7 @@ // SPDX-License-Identifier: MIT pragma solidity 0.8.7; -import "../interfaces/IZRC4.sol"; +import "../interfaces/IZRC20.sol"; import "../interfaces/zContract.sol"; interface ICRV3 { @@ -22,24 +22,24 @@ interface ZetaCurveSwapErrors { contract ZetaCurveSwapDemo is zContract, ZetaCurveSwapErrors { address public crv3pool; // gETH/tBNB/tMATIC pool - address[3] public crvZrc4s; + address[3] public crvZRC20s; - constructor(address crv3pool_, address[3] memory zrc4s_) { + constructor(address crv3pool_, address[3] memory ZRC20s_) { crv3pool = crv3pool_; - crvZrc4s = zrc4s_; + crvZRC20s = ZRC20s_; } function encode( - address zrc4, + address zrc20, address recipient, uint256 minAmountOut ) public pure returns (bytes memory) { - return abi.encode(zrc4, recipient, minAmountOut); + return abi.encode(zrc20, recipient, minAmountOut); } - function addr2idx(address zrc4) public view returns (uint256) { + function addr2idx(address zrc20) public view returns (uint256) { for (uint256 i = 0; i < 3; i++) { - if (crvZrc4s[i] == zrc4) { + if (crvZRC20s[i] == zrc20) { return i; } } @@ -47,37 +47,37 @@ contract ZetaCurveSwapDemo is zContract, ZetaCurveSwapErrors { } function _doWithdrawal( - address targetZRC4, + address targetZRC20, uint256 amount, bytes32 receipient ) private { - (address gasZRC4, uint256 gasFee) = IZRC4(targetZRC4).withdrawGasFee(); + (address gasZRC20, uint256 gasFee) = IZRC20(targetZRC20).withdrawGasFee(); - if (gasZRC4 != targetZRC4) revert WrongGasContract(); + if (gasZRC20 != targetZRC20) revert WrongGasContract(); if (gasFee >= amount) revert NotEnoughToPayGasFee(); - IZRC4(targetZRC4).approve(targetZRC4, gasFee); - IZRC4(targetZRC4).withdraw(abi.encodePacked(receipient), amount - gasFee); + IZRC20(targetZRC20).approve(targetZRC20, gasFee); + IZRC20(targetZRC20).withdraw(abi.encodePacked(receipient), amount - gasFee); } function onCrossChainCall( - address zrc4, + address zrc20, uint256 amount, bytes calldata message ) external override { - (address targetZRC4, bytes32 receipient, ) = abi.decode(message, (address, bytes32, uint256)); + (address targetZRC20, bytes32 receipient, ) = abi.decode(message, (address, bytes32, uint256)); address[] memory path = new address[](2); - path[0] = zrc4; - path[1] = targetZRC4; - IZRC4(zrc4).approve(address(crv3pool), amount); + path[0] = zrc20; + path[1] = targetZRC20; + IZRC20(zrc20).approve(address(crv3pool), amount); - uint256 i = addr2idx(zrc4); - uint256 j = addr2idx(targetZRC4); + uint256 i = addr2idx(zrc20); + uint256 j = addr2idx(targetZRC20); require(i >= 0 && i < 3 && j >= 0 && j < 3 && i != j, "i,j error"); uint256 outAmount = ICRV3(crv3pool).exchange(i, j, amount, 0, false); - _doWithdrawal(targetZRC4, outAmount, receipient); + _doWithdrawal(targetZRC20, outAmount, receipient); } } diff --git a/packages/zevm-contracts/contracts/zeta-swap/ZetaSwap.sol b/packages/zevm-contracts/contracts/zeta-swap/ZetaSwap.sol index b9015046..c3208b1b 100644 --- a/packages/zevm-contracts/contracts/zeta-swap/ZetaSwap.sol +++ b/packages/zevm-contracts/contracts/zeta-swap/ZetaSwap.sol @@ -4,7 +4,7 @@ pragma solidity 0.8.7; import "@uniswap/v2-periphery/contracts/interfaces/IUniswapV2Router02.sol"; import "@uniswap/v2-periphery/contracts/interfaces/IUniswapV2Router01.sol"; -import "../interfaces/IZRC4.sol"; +import "../interfaces/IZRC20.sol"; import "../interfaces/zContract.sol"; interface ZetaSwapErrors { @@ -59,53 +59,54 @@ contract ZetaSwap is zContract, ZetaSwapErrors { } function encode( - address zrc4, + address zrc20, address recipient, uint256 minAmountOut ) public pure returns (bytes memory) { - return abi.encode(zrc4, recipient, minAmountOut); + return abi.encode(zrc20, recipient, minAmountOut); } function _doWithdrawal( - address targetZRC4, + address targetZRC20, uint256 amount, bytes32 receipient ) private { - (address gasZRC4, uint256 gasFee) = IZRC4(targetZRC4).withdrawGasFee(); + (address gasZRC20, uint256 gasFee) = IZRC20(targetZRC20).withdrawGasFee(); - if (gasZRC4 != targetZRC4) revert WrongGasContract(); + if (gasZRC20 != targetZRC20) revert WrongGasContract(); if (gasFee >= amount) revert NotEnoughToPayGasFee(); - IZRC4(targetZRC4).approve(targetZRC4, gasFee); - IZRC4(targetZRC4).withdraw(abi.encodePacked(receipient), amount - gasFee); + IZRC20(targetZRC20).approve(targetZRC20, gasFee); + IZRC20(targetZRC20).withdraw(abi.encodePacked(receipient), amount - gasFee); } - function onCrossChainCall( - address zrc4, - uint256 amount, - bytes calldata message - ) external override { - (address targetZRC4, bytes32 receipient, uint256 minAmountOut) = abi.decode( - message, - (address, bytes32, uint256) - ); + function _existsPairPool(address zrc20A, address zrc20B) private view returns (bool) { + address uniswapPool = uniswapv2PairFor(uniswapV2Router, zrc20A, zrc20B); + return IZRC20(zrc20A).balanceOf(uniswapPool) > 0 && IZRC20(zrc20B).balanceOf(uniswapPool) > 0; + } - address uniswapPool = uniswapv2PairFor(uniswapV2Router, zrc4, targetZRC4); - bool existsPairPool = IZRC4(zrc4).balanceOf(uniswapPool) > 0 && IZRC4(zrc4).balanceOf(zetaToken) > 0; + function _doSwap( + address zrc20, + uint256 amount, + address targetZRC20, + bytes32 receipient, + uint256 minAmountOut + ) internal { + bool existsPairPool = _existsPairPool(zrc20, zetaToken); address[] memory path; if (existsPairPool) { path = new address[](2); - path[0] = zrc4; - path[1] = targetZRC4; + path[0] = zrc20; + path[1] = targetZRC20; } else { path = new address[](3); - path[0] = zrc4; + path[0] = zrc20; path[1] = zetaToken; - path[2] = targetZRC4; + path[2] = targetZRC20; } - IZRC4(zrc4).approve(address(uniswapV2Router), amount); + IZRC20(zrc20).approve(address(uniswapV2Router), amount); uint256[] memory amounts = IUniswapV2Router01(uniswapV2Router).swapExactTokensForTokens( amount, minAmountOut, @@ -113,7 +114,18 @@ contract ZetaSwap is zContract, ZetaSwapErrors { address(this), block.timestamp + MAX_DEADLINE ); + _doWithdrawal(targetZRC20, amounts[path.length - 1], receipient); + } - _doWithdrawal(targetZRC4, amounts[1], receipient); + function onCrossChainCall( + address zrc20, + uint256 amount, + bytes calldata message + ) external virtual override { + (address targetZRC20, bytes32 receipient, uint256 minAmountOut) = abi.decode( + message, + (address, bytes32, uint256) + ); + _doSwap(zrc20, amount, targetZRC20, receipient, minAmountOut); } } diff --git a/packages/zevm-contracts/contracts/zeta-swap/ZetaSwapBtcInbound.sol b/packages/zevm-contracts/contracts/zeta-swap/ZetaSwapBtcInbound.sol new file mode 100644 index 00000000..cf50848a --- /dev/null +++ b/packages/zevm-contracts/contracts/zeta-swap/ZetaSwapBtcInbound.sol @@ -0,0 +1,51 @@ +// SPDX-License-Identifier: MIT +pragma solidity 0.8.7; + +import "./ZetaSwap.sol"; +import "../system/SystemContract.sol"; + +contract ZetaSwapBtcInbound is ZetaSwap { + address immutable systemContractAddress; + + constructor( + address zetaToken_, + address uniswapV2Router_, + address systemContractAddress_ + ) ZetaSwap(zetaToken_, uniswapV2Router_) { + systemContractAddress = systemContractAddress_; + } + + function bytesToAddress( + bytes calldata data, + uint256 offset, + uint256 size + ) private pure returns (address output) { + bytes memory b = data[offset:offset + size]; + assembly { + output := mload(add(b, size)) + } + } + + function bytesToUint32( + bytes calldata data, + uint256 offset, + uint256 size + ) private pure returns (uint32 output) { + bytes memory b = data[offset:offset + size]; + assembly { + output := mload(add(b, size)) + } + } + + function onCrossChainCall( + address zrc20, + uint256 amount, + bytes calldata message + ) external override { + address receipient = bytesToAddress(message, 0, 20); + uint32 targetZRC20ChainId = bytesToUint32(message, 20, 4); + address targetZRC20 = SystemContract(systemContractAddress).gasCoinZRC20ByChainId(targetZRC20ChainId); + + _doSwap(zrc20, amount, targetZRC20, bytes32(uint256(uint160(receipient))), 0); + } +} diff --git a/packages/zevm-contracts/scripts/systemConstants.ts b/packages/zevm-contracts/scripts/systemConstants.ts index 0252b5be..a6abad3d 100644 --- a/packages/zevm-contracts/scripts/systemConstants.ts +++ b/packages/zevm-contracts/scripts/systemConstants.ts @@ -1,5 +1,10 @@ export const SYSTEM_CONTRACT = "0x239e96c8f17C85c30100AC26F635Ea15f23E9c67"; -export const SWAP_ADDRESS = "0x43cFaA5cDd103B7733B13cF72e21aB97A2074C84"; -export const TOKEN_ADDRESS = "0x6e78f64edc4c422e7045bcf7562f13bbee75948a"; -export const MATH_ADDRESS = "0x66aa280f3db58231d08835673af286a8aaa80ef5"; -export const VIEWS_ADDRESS = "0x1bfef792f3b0483a6e201c004d9a59de214cb68d"; + +export type ZRC20 = "gETH" | "tBNB" | "tBTC" | "tMATIC"; + +export const ZRC20Addresses: Record = { + gETH: "0x91d18e54DAf4F677cB28167158d6dd21F6aB3921", + tBNB: "0x13A0c5930C028511Dc02665E7285134B6d11A5f4", + tBTC: "0x48f80608B672DC30DC7e3dbBd0343c5F02C738Eb", + tMATIC: "0xd97B1de3619ed2c6BEb3860147E30cA8A7dC9891" +}; diff --git a/packages/zevm-contracts/scripts/zeta-swap/add-liquidity-zeta-uniswap.ts b/packages/zevm-contracts/scripts/zeta-swap/add-liquidity-zeta-uniswap.ts new file mode 100644 index 00000000..8a0815cb --- /dev/null +++ b/packages/zevm-contracts/scripts/zeta-swap/add-liquidity-zeta-uniswap.ts @@ -0,0 +1,178 @@ +import { MaxUint256 } from "@ethersproject/constants"; +import { formatUnits, parseUnits } from "@ethersproject/units"; +import { SignerWithAddress } from "@nomiclabs/hardhat-ethers/signers"; +import { getChainId } from "@zetachain/addresses"; +import { NetworkName } from "@zetachain/addresses"; +import { getAddress } from "@zetachain/addresses"; +import { getGasSymbolByNetwork } from "@zetachain/addresses-tools"; +import { BigNumber } from "ethers"; +import { ethers } from "hardhat"; + +import { + ERC20, + ERC20__factory, + IUniswapV2Factory__factory, + IUniswapV2Pair__factory, + IUniswapV2Router02, + SystemContract__factory, + UniswapV2Router02__factory +} from "../../typechain-types"; +import { SYSTEM_CONTRACT } from "../systemConstants"; + +const BTC_TO_ADD = parseUnits("0", 8); +const ETH_TO_ADD = parseUnits("1500"); +const MATIC_TO_ADD = parseUnits("1500"); +const BNB_TO_ADD = parseUnits("100"); + +const ZETA_TO_ADD = parseUnits("0"); + +interface Pair { + TokenA: string; + TokenB: string; +} + +export const getNow = async () => { + const block = await ethers.provider.getBlock("latest"); + return block.timestamp; +}; + +export const sortPair = (token1: string, token2: string): Pair => { + if (token1 < token2) { + return { TokenA: token1, TokenB: token2 }; + } + return { TokenA: token2, TokenB: token1 }; +}; + +const addTokenEthLiquidity = async ( + tokenContract: ERC20, + tokenAmountToAdd: BigNumber, + ETHToAdd: BigNumber, + uniswapRouter: IUniswapV2Router02, + deployer: SignerWithAddress +) => { + const tx1 = await tokenContract.approve(uniswapRouter.address, MaxUint256); + await tx1.wait(); + + const tx2 = await uniswapRouter.addLiquidityETH( + tokenContract.address, + tokenAmountToAdd, + 0, + 0, + deployer.address, + (await getNow()) + 360, + { gasLimit: 10_000_000, value: ETHToAdd } + ); + await tx2.wait(); +}; + +const estimateZetaForToken = async ( + network: NetworkName, + WZETAAddress: string, + uniswapFactoryAddress: string, + tokenContract: ERC20, + tokenAmountToAdd: BigNumber, + deployer: SignerWithAddress +) => { + const uniswapV2Factory = IUniswapV2Factory__factory.connect(uniswapFactoryAddress, deployer); + + const pair = sortPair(tokenContract.address, WZETAAddress); + + const poolAddress = await uniswapV2Factory.getPair(pair.TokenA, pair.TokenB); + + const pool = IUniswapV2Pair__factory.connect(poolAddress, deployer); + + const reserves = await pool.getReserves(); + + const reservesZETA = WZETAAddress < tokenContract.address ? reserves.reserve0 : reserves.reserve1; + const reservesToken = WZETAAddress > tokenContract.address ? reserves.reserve0 : reserves.reserve1; + + const ZETAValue = reservesZETA.mul(tokenAmountToAdd).div(reservesToken); + + const tokenDecimals = await tokenContract.decimals(); + console.log( + `Zeta/${getGasSymbolByNetwork(network)} reserves ${formatUnits(reservesZETA)}/${formatUnits( + reservesToken, + tokenDecimals + )}` + ); + return ZETAValue; +}; + +async function addLiquidity( + network: NetworkName, + tokenAmountToAdd: BigNumber, + WZETAAddress: string, + uniswapFactoryAddress: string, + uniswapRouterAddress: string +) { + console.log(`Adding liquidity for: ${network}`); + const initLiquidityPool = !ZETA_TO_ADD.isZero(); + + const [deployer] = await ethers.getSigners(); + + const systemContract = await SystemContract__factory.connect(SYSTEM_CONTRACT, deployer); + const uniswapRouter = await UniswapV2Router02__factory.connect(uniswapRouterAddress, deployer); + + const tokenAddress = await systemContract.gasCoinZRC20ByChainId(getChainId(network)); + const tokenContract = ERC20__factory.connect(tokenAddress, deployer); + const tokenDecimals = await tokenContract.decimals(); + + const zetaToAdd = initLiquidityPool + ? ZETA_TO_ADD + : await estimateZetaForToken( + network, + WZETAAddress, + uniswapFactoryAddress, + tokenContract, + tokenAmountToAdd, + deployer + ); + + console.log( + `Zeta/${getGasSymbolByNetwork(network)} to add ${formatUnits(zetaToAdd)}/${formatUnits( + tokenAmountToAdd, + tokenDecimals + )}` + ); + + // await addTokenEthLiquidity(tokenContract, tokenAmountToAdd, zetaToAdd, uniswapRouter, deployer); +} +async function main() { + const WZETA_ADDRESS = getAddress({ + address: "weth9", + networkName: "athens", + zetaNetwork: "athens" + }); + + const UNISWAP_FACTORY_ADDRESS = getAddress({ + address: "uniswapV2Factory", + networkName: "athens", + zetaNetwork: "athens" + }); + + const UNISWAP_ROUTER_ADDRESS = getAddress({ + address: "uniswapV2Router02", + networkName: "athens", + zetaNetwork: "athens" + }); + + if (!ETH_TO_ADD.isZero()) { + await addLiquidity("goerli", ETH_TO_ADD, WZETA_ADDRESS, UNISWAP_FACTORY_ADDRESS, UNISWAP_ROUTER_ADDRESS); + } + if (!MATIC_TO_ADD.isZero()) { + await addLiquidity("polygon-mumbai", MATIC_TO_ADD, WZETA_ADDRESS, UNISWAP_FACTORY_ADDRESS, UNISWAP_ROUTER_ADDRESS); + } + if (!BNB_TO_ADD.isZero()) { + await addLiquidity("bsc-testnet", BNB_TO_ADD, WZETA_ADDRESS, UNISWAP_FACTORY_ADDRESS, UNISWAP_ROUTER_ADDRESS); + } + if (!BTC_TO_ADD.isZero()) { + await addLiquidity("bitcoin-test", BTC_TO_ADD, WZETA_ADDRESS, UNISWAP_FACTORY_ADDRESS, UNISWAP_ROUTER_ADDRESS); + } +} + +main() + .then(() => process.exit(0)) + .catch(error => { + console.error(error); + process.exit(1); + }); diff --git a/packages/zevm-contracts/scripts/zeta-swap/deploy.ts b/packages/zevm-contracts/scripts/zeta-swap/deploy.ts index 753b40ee..6b055105 100644 --- a/packages/zevm-contracts/scripts/zeta-swap/deploy.ts +++ b/packages/zevm-contracts/scripts/zeta-swap/deploy.ts @@ -1,21 +1,42 @@ +import { getAddress } from "@zetachain/addresses"; import { saveAddress } from "@zetachain/addresses-tools"; -import hardhat from "hardhat"; import { ethers } from "hardhat"; -import { ZetaSwap, ZetaSwap__factory } from "../../typechain-types"; -import { SWAP_ADDRESS, WZETA_ADDRESS } from "../systemConstants"; +import { ZetaSwap, ZetaSwap__factory, ZetaSwapBtcInbound, ZetaSwapBtcInbound__factory } from "../../typechain-types"; +import { SYSTEM_CONTRACT } from "../systemConstants"; const main = async () => { console.log(`Deploying ZetaSwap...`); - const Factory = (await ethers.getContractFactory("ZetaSwap")) as ZetaSwap__factory; + const WZETA_ADDRESS = getAddress({ + address: "weth9", + networkName: "athens", + zetaNetwork: "athens" + }); - const contract = (await Factory.deploy(WZETA_ADDRESS, SWAP_ADDRESS)) as ZetaSwap; + const UNISWAP_ROUTER_ADDRESS = getAddress({ + address: "uniswapV2Router02", + networkName: "athens", + zetaNetwork: "athens" + }); + const Factory = (await ethers.getContractFactory("ZetaSwap")) as ZetaSwap__factory; + const contract = (await Factory.deploy(WZETA_ADDRESS, UNISWAP_ROUTER_ADDRESS)) as ZetaSwap; await contract.deployed(); console.log("Deployed ZetaSwap. Address:", contract.address); saveAddress("zetaSwap", contract.address); + + const FactoryBTC = (await ethers.getContractFactory("ZetaSwapBtcInbound")) as ZetaSwapBtcInbound__factory; + const contractBTC = (await FactoryBTC.deploy( + WZETA_ADDRESS, + UNISWAP_ROUTER_ADDRESS, + SYSTEM_CONTRACT + )) as ZetaSwapBtcInbound; + await contractBTC.deployed(); + + console.log("Deployed zetaSwapBtcInbound. Address:", contractBTC.address); + saveAddress("zetaSwapBtcInbound", contractBTC.address); }; main().catch(error => { diff --git a/packages/zevm-contracts/scripts/zeta-swap/get-system-data.ts b/packages/zevm-contracts/scripts/zeta-swap/get-system-data.ts new file mode 100644 index 00000000..4074f063 --- /dev/null +++ b/packages/zevm-contracts/scripts/zeta-swap/get-system-data.ts @@ -0,0 +1,37 @@ +import { getChainId } from "@zetachain/addresses"; +import { NetworkName } from "@zetachain/addresses"; +import { getGasSymbolByNetwork } from "@zetachain/addresses-tools"; +import { ethers } from "hardhat"; + +import { SystemContract, SystemContract__factory } from "../../typechain-types"; +import { SYSTEM_CONTRACT } from "../systemConstants"; + +const getZRC20Address = async (systemContract: SystemContract, network: NetworkName) => { + const tokenAddress = await systemContract.gasCoinZRC20ByChainId(getChainId(network)); + console.log(`${getGasSymbolByNetwork(network)}`, tokenAddress); +}; + +async function main() { + const [deployer] = await ethers.getSigners(); + + const systemContract = await SystemContract__factory.connect(SYSTEM_CONTRACT, deployer); + const uniswapFactoryAddress = await systemContract.uniswapv2FactoryAddress(); + console.log(`uniswapv2Factory:`, uniswapFactoryAddress); + const uniswapRouterAddress = await systemContract.uniswapv2Router02Address(); + console.log(`uniswapv2Router02:`, uniswapRouterAddress); + + const WZETAAddress = await systemContract.wZetaContractAddress(); + console.log(`WZETA:`, WZETAAddress); + await getZRC20Address(systemContract, "bitcoin-test"); + await getZRC20Address(systemContract, "goerli"); + await getZRC20Address(systemContract, "klaytn-baobab"); + await getZRC20Address(systemContract, "bsc-testnet"); + await getZRC20Address(systemContract, "polygon-mumbai"); +} + +main() + .then(() => process.exit(0)) + .catch(error => { + console.error(error); + process.exit(1); + }); diff --git a/packages/zevm-contracts/scripts/zeta-swap/helpers.ts b/packages/zevm-contracts/scripts/zeta-swap/helpers.ts new file mode 100644 index 00000000..8e76e790 --- /dev/null +++ b/packages/zevm-contracts/scripts/zeta-swap/helpers.ts @@ -0,0 +1,29 @@ +import { BigNumber } from "@ethersproject/bignumber"; +import { ethers } from "hardhat"; + +export const encodeParams = (dataTypes: any[], data: any[]) => { + const abiCoder = ethers.utils.defaultAbiCoder; + return abiCoder.encode(dataTypes, data); +}; + +export const getSwapParams = (destination: string, destinationToken: string, minOutput: BigNumber) => { + const paddedDestination = ethers.utils.hexlify(ethers.utils.zeroPad(destination, 32)); + const params = encodeParams(["address", "bytes32", "uint256"], [destinationToken, paddedDestination, minOutput]); + + return params; +}; + +export const getSwapData = (zetaSwap: string, destination: string, destinationToken: string, minOutput: BigNumber) => { + const params = getSwapParams(destination, destinationToken, minOutput); + + return `${zetaSwap}${params.slice(2)}`; +}; + +export const getBitcoinTxMemo = (zetaSwapAddress: string, destinationAddress: string, chainId: string) => { + const paddedHexChainId = ethers.utils + .hexlify(Number(chainId)) + .slice(2) + .padStart(8, "0"); + const rawMemo = `${zetaSwapAddress}${destinationAddress.slice(2)}${paddedHexChainId}`; + return ethers.utils.base64.encode(rawMemo); +}; diff --git a/packages/zevm-contracts/scripts/zeta-swap/send.ts b/packages/zevm-contracts/scripts/zeta-swap/send.ts new file mode 100644 index 00000000..56e46fe9 --- /dev/null +++ b/packages/zevm-contracts/scripts/zeta-swap/send.ts @@ -0,0 +1,28 @@ +import { parseEther } from "@ethersproject/units"; +import { getAddress } from "@zetachain/addresses"; +import { ethers } from "hardhat"; +import { network } from "hardhat"; + +const main = async () => { + console.log(`Sending native token...`); + + const [signer] = await ethers.getSigners(); + + const tssAddress = getAddress({ + address: "tss", + networkName: network.name, + zetaNetwork: "athens" + }); + + const tx = await signer.sendTransaction({ + to: tssAddress, + value: parseEther("30") + }); + + console.log("Token sent. tx:", tx.hash); +}; + +main().catch(error => { + console.error(error); + process.exit(1); +}); diff --git a/packages/zevm-contracts/scripts/zeta-swap/swap-on-zevm.ts b/packages/zevm-contracts/scripts/zeta-swap/swap-on-zevm.ts new file mode 100644 index 00000000..0293cda2 --- /dev/null +++ b/packages/zevm-contracts/scripts/zeta-swap/swap-on-zevm.ts @@ -0,0 +1,51 @@ +import { BigNumber } from "@ethersproject/bignumber"; +import { parseUnits } from "@ethersproject/units"; +import { getAddress, isZetaNetworkName } from "@zetachain/addresses"; +import { ethers } from "hardhat"; +import { network } from "hardhat"; + +import { ERC20__factory, ZetaSwap__factory, ZetaSwapBtcInbound__factory } from "../../typechain-types"; +import { ZRC20Addresses } from "../systemConstants"; +import { getSwapParams } from "./helpers"; + +const USE_BTC_SWAP = true; +const SAMPLE_MEMO = "0x25A92a5853702F199bb2d805Bba05d67025214A800000005"; // 0xADDRESS + FFFF chain id (05 for goerli) + +const main = async () => { + if (!isZetaNetworkName(network.name) || !network.name) throw new Error("Invalid network name"); + const [signer] = await ethers.getSigners(); + const zetaSwap = getAddress({ + address: USE_BTC_SWAP ? "zetaSwapBtcInbound" : "zetaSwap", + networkName: "athens", + zetaNetwork: "athens" + }); + + const amount = parseUnits("0.00001", 8); + const sourceToken = ZRC20Addresses["tBTC"]; + + const zrc20Contract = ERC20__factory.connect(sourceToken, signer); + const tx0 = await zrc20Contract.transfer(zetaSwap, amount); + await tx0.wait(); + + console.log(`Swapping native token from zEVM...`); + + let params; + let zetaSwapContract; + + if (USE_BTC_SWAP) { + params = ethers.utils.arrayify(SAMPLE_MEMO); + zetaSwapContract = ZetaSwapBtcInbound__factory.connect(zetaSwap, signer); + } else { + params = getSwapParams(signer.address, ZRC20Addresses["gETH"], BigNumber.from("0")); + zetaSwapContract = ZetaSwap__factory.connect(zetaSwap, signer); + } + const tx1 = await zetaSwapContract.onCrossChainCall(sourceToken, amount, params); + await tx1.wait(); + + console.log("tx:", tx1.hash); +}; + +main().catch(error => { + console.error(error); + process.exit(1); +}); diff --git a/packages/zevm-contracts/scripts/zeta-swap/swap.ts b/packages/zevm-contracts/scripts/zeta-swap/swap.ts new file mode 100644 index 00000000..0e4e475e --- /dev/null +++ b/packages/zevm-contracts/scripts/zeta-swap/swap.ts @@ -0,0 +1,45 @@ +import { BigNumber } from "@ethersproject/bignumber"; +import { parseEther } from "@ethersproject/units"; +import { getAddress, isNetworkName } from "@zetachain/addresses"; +import { ethers } from "hardhat"; +import { network } from "hardhat"; + +import { ZRC20Addresses } from "../systemConstants"; +import { getSwapData } from "./helpers"; + +const main = async () => { + if (!isNetworkName(network.name) || !network.name) throw new Error("Invalid network name"); + + const destinationToken = network.name == "goerli" ? ZRC20Addresses["tMATIC"] : ZRC20Addresses["gETH"]; + + console.log(`Swapping native token...`); + + const [signer] = await ethers.getSigners(); + + const zetaSwapAddress = getAddress({ + address: "zetaSwap", + networkName: "athens", + zetaNetwork: "athens" + }); + + const tssAddress = getAddress({ + address: "tss", + networkName: network.name, + zetaNetwork: "athens" + }); + + const data = getSwapData(zetaSwapAddress, signer.address, destinationToken, BigNumber.from("0")); + + const tx = await signer.sendTransaction({ + data, + to: tssAddress, + value: parseEther("0.005") + }); + + console.log("tx:", tx.hash); +}; + +main().catch(error => { + console.error(error); + process.exit(1); +}); diff --git a/packages/zevm-contracts/test/Swap.spec.ts b/packages/zevm-contracts/test/Swap.spec.ts new file mode 100644 index 00000000..8bf4965e --- /dev/null +++ b/packages/zevm-contracts/test/Swap.spec.ts @@ -0,0 +1,66 @@ +import { BigNumber } from "@ethersproject/bignumber"; +import { SignerWithAddress } from "@nomiclabs/hardhat-ethers/signers"; +import { getAddress as getAddressLib } from "@zetachain/addresses"; +import { expect } from "chai"; +import { utils } from "ethers"; +import { ethers } from "hardhat"; + +import { encodeParams, getBitcoinTxMemo, getSwapBTCInboundData, getSwapParams } from "../scripts/zeta-swap/helpers"; +import { ZetaSwap, ZetaSwap__factory, ZetaSwapBtcInbound, ZetaSwapBtcInbound__factory } from "../typechain-types"; +import { ZetaSwapBTC } from "../typechain-types/contracts/zeta-swap/ZetaSwapBTC"; +import { ZetaSwapBTC__factory } from "../typechain-types/factories/contracts/zeta-swap/ZetaSwapBTC__factory"; + +describe("ZetaSwap tests", () => { + let zetaSwapContract: ZetaSwap; + let zetaSwapBTCContract: ZetaSwapBTC; + + let accounts: SignerWithAddress[]; + let deployer: SignerWithAddress; + + beforeEach(async () => { + accounts = await ethers.getSigners(); + [deployer] = accounts; + const uniswapRouterAddr = getAddressLib({ + address: "uniswapV2Router02", + networkName: "eth-mainnet", + zetaNetwork: "mainnet" + }); + const wGasToken = getAddressLib({ + address: "weth9", + networkName: "eth-mainnet", + zetaNetwork: "mainnet" + }); + + const Factory = (await ethers.getContractFactory("ZetaSwap")) as ZetaSwap__factory; + zetaSwapContract = (await Factory.deploy(wGasToken, uniswapRouterAddr)) as ZetaSwap; + await zetaSwapContract.deployed(); + + const FactoryBTC = (await ethers.getContractFactory("ZetaSwapBtcInbound")) as ZetaSwapBtcInbound__factory; + zetaSwapBTCContract = (await FactoryBTC.deploy(wGasToken, uniswapRouterAddr)) as ZetaSwapBtcInbound; + await zetaSwapBTCContract.deployed(); + }); + + describe("zetaSwap", () => { + it("Should do swap", async () => { + //@todo: add test + + const fakeZRC20 = accounts[1]; + const fakeZRC20Destination = accounts[2]; + + const params = getSwapParams(fakeZRC20Destination.address, deployer.address, BigNumber.from("10")); + await zetaSwapContract.onCrossChainCall(fakeZRC20.address, 0, params); + }); + }); + + describe("zetaSwapBTC", () => { + it("Should do swap", async () => { + //@todo: add test + + const fakeZRC20 = accounts[1]; + const fakeZRC20Destination = accounts[2]; + + const params = getBitcoinTxMemo("", fakeZRC20Destination.address, "5"); + await zetaSwapBTCContract.onCrossChainCall(fakeZRC20.address, 0, params); + }); + }); +}); From 6a94cdd3551f911aba260fa56238bf728a67d93f Mon Sep 17 00:00:00 2001 From: Andres Martin Aiello <50411235+andresaiello@users.noreply.github.com> Date: Mon, 26 Dec 2022 11:59:34 -0300 Subject: [PATCH 046/115] Improvements on contracts ownership (#54) * Improvements on contracts ownership * add safeCreate2AndTransfer * restore assertion --- .../ImmutableCreate2Factory.json | 23 ++ .../ImmutableCreate2Factory.sol/Ownable.json | 16 ++ .../ZetaInteractor.sol/ZetaInteractor.json | 39 +++ .../Ownable2Step.sol/Ownable2Step.json | 93 +++++++ .../ZetaInteractorMock.json | 39 +++ .../ImmutableCreate2Factory.ts | 40 +++ .../ImmutableCreate2Factory.sol/Ownable.ts | 104 ++++++++ .../contracts/ZetaInteractor.ts | 71 +++++ .../contracts/openzeppelin/Ownable2Step.ts | 249 ++++++++++++++++++ .../contracts/testing/ZetaInteractorMock.ts | 71 +++++ .../ImmutableCreate2Factory__factory.ts | 25 +- .../Ownable__factory.ts | 40 +++ .../contracts/ZetaInteractor__factory.ts | 39 +++ .../openzeppelin/Ownable2Step__factory.ts | 117 ++++++++ .../testing/ZetaInteractorMock__factory.ts | 41 ++- .../contracts/ImmutableCreate2Factory.sol | 51 ++-- .../contracts/ZetaInteractor.sol | 4 +- .../contracts/openzeppelin/Ownable2Step.sol | 57 ++++ .../contracts/testing/ZetaInteractorMock.sol | 3 +- .../ImmutableCreate2Factory.helpers.ts | 11 +- .../test/ImmutableCreate2Factory.spec.ts | 27 +- .../test/ZetaInteractor.spec.ts | 30 ++- 22 files changed, 1161 insertions(+), 29 deletions(-) create mode 100644 packages/interfaces/abi/json/contracts/ImmutableCreate2Factory.sol/Ownable.json create mode 100644 packages/interfaces/abi/json/contracts/openzeppelin/Ownable2Step.sol/Ownable2Step.json create mode 100644 packages/interfaces/typechain-types/contracts/ImmutableCreate2Factory.sol/Ownable.ts create mode 100644 packages/interfaces/typechain-types/contracts/openzeppelin/Ownable2Step.ts create mode 100644 packages/interfaces/typechain-types/factories/contracts/ImmutableCreate2Factory.sol/Ownable__factory.ts create mode 100644 packages/interfaces/typechain-types/factories/contracts/openzeppelin/Ownable2Step__factory.ts create mode 100644 packages/protocol-contracts/contracts/openzeppelin/Ownable2Step.sol diff --git a/packages/interfaces/abi/json/contracts/ImmutableCreate2Factory.sol/ImmutableCreate2Factory.json b/packages/interfaces/abi/json/contracts/ImmutableCreate2Factory.sol/ImmutableCreate2Factory.json index b7a40ec3..9abaed22 100644 --- a/packages/interfaces/abi/json/contracts/ImmutableCreate2Factory.sol/ImmutableCreate2Factory.json +++ b/packages/interfaces/abi/json/contracts/ImmutableCreate2Factory.sol/ImmutableCreate2Factory.json @@ -18,6 +18,29 @@ "stateMutability": "view", "type": "function" }, + { + "constant": false, + "inputs": [ + { + "name": "salt", + "type": "bytes32" + }, + { + "name": "initializationCode", + "type": "bytes" + } + ], + "name": "safeCreate2AndTransfer", + "outputs": [ + { + "name": "deploymentAddress", + "type": "address" + } + ], + "payable": true, + "stateMutability": "payable", + "type": "function" + }, { "constant": false, "inputs": [ diff --git a/packages/interfaces/abi/json/contracts/ImmutableCreate2Factory.sol/Ownable.json b/packages/interfaces/abi/json/contracts/ImmutableCreate2Factory.sol/Ownable.json new file mode 100644 index 00000000..ef4e5ac6 --- /dev/null +++ b/packages/interfaces/abi/json/contracts/ImmutableCreate2Factory.sol/Ownable.json @@ -0,0 +1,16 @@ +[ + { + "constant": false, + "inputs": [ + { + "name": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + } +] diff --git a/packages/interfaces/abi/json/contracts/ZetaInteractor.sol/ZetaInteractor.json b/packages/interfaces/abi/json/contracts/ZetaInteractor.sol/ZetaInteractor.json index dc07294b..4f8a706c 100644 --- a/packages/interfaces/abi/json/contracts/ZetaInteractor.sol/ZetaInteractor.json +++ b/packages/interfaces/abi/json/contracts/ZetaInteractor.sol/ZetaInteractor.json @@ -25,6 +25,25 @@ "name": "InvalidZetaRevertCall", "type": "error" }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipTransferStarted", + "type": "event" + }, { "anonymous": false, "inputs": [ @@ -44,6 +63,13 @@ "name": "OwnershipTransferred", "type": "event" }, + { + "inputs": [], + "name": "acceptOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, { "inputs": [], "name": "connector", @@ -89,6 +115,19 @@ "stateMutability": "view", "type": "function" }, + { + "inputs": [], + "name": "pendingOwner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, { "inputs": [], "name": "renounceOwnership", diff --git a/packages/interfaces/abi/json/contracts/openzeppelin/Ownable2Step.sol/Ownable2Step.json b/packages/interfaces/abi/json/contracts/openzeppelin/Ownable2Step.sol/Ownable2Step.json new file mode 100644 index 00000000..ca792daa --- /dev/null +++ b/packages/interfaces/abi/json/contracts/openzeppelin/Ownable2Step.sol/Ownable2Step.json @@ -0,0 +1,93 @@ +[ + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipTransferStarted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipTransferred", + "type": "event" + }, + { + "inputs": [], + "name": "acceptOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "pendingOwner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "renounceOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } +] diff --git a/packages/interfaces/abi/json/contracts/testing/ZetaInteractorMock.sol/ZetaInteractorMock.json b/packages/interfaces/abi/json/contracts/testing/ZetaInteractorMock.sol/ZetaInteractorMock.json index 54f52536..6adffa9c 100644 --- a/packages/interfaces/abi/json/contracts/testing/ZetaInteractorMock.sol/ZetaInteractorMock.json +++ b/packages/interfaces/abi/json/contracts/testing/ZetaInteractorMock.sol/ZetaInteractorMock.json @@ -36,6 +36,25 @@ "name": "InvalidZetaRevertCall", "type": "error" }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipTransferStarted", + "type": "event" + }, { "anonymous": false, "inputs": [ @@ -55,6 +74,13 @@ "name": "OwnershipTransferred", "type": "event" }, + { + "inputs": [], + "name": "acceptOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, { "inputs": [], "name": "connector", @@ -185,6 +211,19 @@ "stateMutability": "view", "type": "function" }, + { + "inputs": [], + "name": "pendingOwner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, { "inputs": [], "name": "renounceOwnership", diff --git a/packages/interfaces/typechain-types/contracts/ImmutableCreate2Factory.sol/ImmutableCreate2Factory.ts b/packages/interfaces/typechain-types/contracts/ImmutableCreate2Factory.sol/ImmutableCreate2Factory.ts index 2ae856a5..237cfc55 100644 --- a/packages/interfaces/typechain-types/contracts/ImmutableCreate2Factory.sol/ImmutableCreate2Factory.ts +++ b/packages/interfaces/typechain-types/contracts/ImmutableCreate2Factory.sol/ImmutableCreate2Factory.ts @@ -24,6 +24,7 @@ import type { export interface ImmutableCreate2FactoryInterface extends utils.Interface { functions: { "hasBeenDeployed(address)": FunctionFragment; + "safeCreate2AndTransfer(bytes32,bytes)": FunctionFragment; "safeCreate2(bytes32,bytes)": FunctionFragment; "findCreate2Address(bytes32,bytes)": FunctionFragment; "findCreate2AddressViaHash(bytes32,bytes32)": FunctionFragment; @@ -32,6 +33,7 @@ export interface ImmutableCreate2FactoryInterface extends utils.Interface { getFunction( nameOrSignatureOrTopic: | "hasBeenDeployed" + | "safeCreate2AndTransfer" | "safeCreate2" | "findCreate2Address" | "findCreate2AddressViaHash" @@ -41,6 +43,10 @@ export interface ImmutableCreate2FactoryInterface extends utils.Interface { functionFragment: "hasBeenDeployed", values: [string] ): string; + encodeFunctionData( + functionFragment: "safeCreate2AndTransfer", + values: [BytesLike, BytesLike] + ): string; encodeFunctionData( functionFragment: "safeCreate2", values: [BytesLike, BytesLike] @@ -58,6 +64,10 @@ export interface ImmutableCreate2FactoryInterface extends utils.Interface { functionFragment: "hasBeenDeployed", data: BytesLike ): Result; + decodeFunctionResult( + functionFragment: "safeCreate2AndTransfer", + data: BytesLike + ): Result; decodeFunctionResult( functionFragment: "safeCreate2", data: BytesLike @@ -106,6 +116,12 @@ export interface ImmutableCreate2Factory extends BaseContract { overrides?: CallOverrides ): Promise<[boolean]>; + safeCreate2AndTransfer( + salt: BytesLike, + initializationCode: BytesLike, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + safeCreate2( salt: BytesLike, initializationCode: BytesLike, @@ -130,6 +146,12 @@ export interface ImmutableCreate2Factory extends BaseContract { overrides?: CallOverrides ): Promise; + safeCreate2AndTransfer( + salt: BytesLike, + initializationCode: BytesLike, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + safeCreate2( salt: BytesLike, initializationCode: BytesLike, @@ -154,6 +176,12 @@ export interface ImmutableCreate2Factory extends BaseContract { overrides?: CallOverrides ): Promise; + safeCreate2AndTransfer( + salt: BytesLike, + initializationCode: BytesLike, + overrides?: CallOverrides + ): Promise; + safeCreate2( salt: BytesLike, initializationCode: BytesLike, @@ -181,6 +209,12 @@ export interface ImmutableCreate2Factory extends BaseContract { overrides?: CallOverrides ): Promise; + safeCreate2AndTransfer( + salt: BytesLike, + initializationCode: BytesLike, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + safeCreate2( salt: BytesLike, initializationCode: BytesLike, @@ -206,6 +240,12 @@ export interface ImmutableCreate2Factory extends BaseContract { overrides?: CallOverrides ): Promise; + safeCreate2AndTransfer( + salt: BytesLike, + initializationCode: BytesLike, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + safeCreate2( salt: BytesLike, initializationCode: BytesLike, diff --git a/packages/interfaces/typechain-types/contracts/ImmutableCreate2Factory.sol/Ownable.ts b/packages/interfaces/typechain-types/contracts/ImmutableCreate2Factory.sol/Ownable.ts new file mode 100644 index 00000000..713d9e3a --- /dev/null +++ b/packages/interfaces/typechain-types/contracts/ImmutableCreate2Factory.sol/Ownable.ts @@ -0,0 +1,104 @@ +/* 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, +} from "../../common"; + +export interface OwnableInterface extends utils.Interface { + functions: { + "transferOwnership(address)": FunctionFragment; + }; + + getFunction(nameOrSignatureOrTopic: "transferOwnership"): FunctionFragment; + + encodeFunctionData( + functionFragment: "transferOwnership", + values: [string] + ): string; + + decodeFunctionResult( + functionFragment: "transferOwnership", + data: BytesLike + ): Result; + + events: {}; +} + +export interface Ownable extends BaseContract { + connect(signerOrProvider: Signer | Provider | string): this; + attach(addressOrName: string): this; + deployed(): Promise; + + interface: OwnableInterface; + + 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: { + transferOwnership( + newOwner: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + }; + + transferOwnership( + newOwner: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + callStatic: { + transferOwnership( + newOwner: string, + overrides?: CallOverrides + ): Promise; + }; + + filters: {}; + + estimateGas: { + transferOwnership( + newOwner: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + }; + + populateTransaction: { + transferOwnership( + newOwner: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + }; +} diff --git a/packages/interfaces/typechain-types/contracts/ZetaInteractor.ts b/packages/interfaces/typechain-types/contracts/ZetaInteractor.ts index f9bbb74f..e1d357a5 100644 --- a/packages/interfaces/typechain-types/contracts/ZetaInteractor.ts +++ b/packages/interfaces/typechain-types/contracts/ZetaInteractor.ts @@ -28,9 +28,11 @@ import type { export interface ZetaInteractorInterface extends utils.Interface { functions: { + "acceptOwnership()": FunctionFragment; "connector()": FunctionFragment; "interactorsByChainId(uint256)": FunctionFragment; "owner()": FunctionFragment; + "pendingOwner()": FunctionFragment; "renounceOwnership()": FunctionFragment; "setInteractorByChainId(uint256,bytes)": FunctionFragment; "transferOwnership(address)": FunctionFragment; @@ -38,20 +40,30 @@ export interface ZetaInteractorInterface extends utils.Interface { getFunction( nameOrSignatureOrTopic: + | "acceptOwnership" | "connector" | "interactorsByChainId" | "owner" + | "pendingOwner" | "renounceOwnership" | "setInteractorByChainId" | "transferOwnership" ): FunctionFragment; + encodeFunctionData( + functionFragment: "acceptOwnership", + values?: undefined + ): string; encodeFunctionData(functionFragment: "connector", values?: undefined): string; encodeFunctionData( functionFragment: "interactorsByChainId", values: [BigNumberish] ): string; encodeFunctionData(functionFragment: "owner", values?: undefined): string; + encodeFunctionData( + functionFragment: "pendingOwner", + values?: undefined + ): string; encodeFunctionData( functionFragment: "renounceOwnership", values?: undefined @@ -65,12 +77,20 @@ export interface ZetaInteractorInterface extends utils.Interface { values: [string] ): string; + decodeFunctionResult( + functionFragment: "acceptOwnership", + data: BytesLike + ): Result; decodeFunctionResult(functionFragment: "connector", data: BytesLike): Result; decodeFunctionResult( functionFragment: "interactorsByChainId", data: BytesLike ): Result; decodeFunctionResult(functionFragment: "owner", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "pendingOwner", + data: BytesLike + ): Result; decodeFunctionResult( functionFragment: "renounceOwnership", data: BytesLike @@ -85,12 +105,26 @@ export interface ZetaInteractorInterface extends utils.Interface { ): Result; events: { + "OwnershipTransferStarted(address,address)": EventFragment; "OwnershipTransferred(address,address)": EventFragment; }; + getEvent(nameOrSignatureOrTopic: "OwnershipTransferStarted"): EventFragment; getEvent(nameOrSignatureOrTopic: "OwnershipTransferred"): EventFragment; } +export interface OwnershipTransferStartedEventObject { + previousOwner: string; + newOwner: string; +} +export type OwnershipTransferStartedEvent = TypedEvent< + [string, string], + OwnershipTransferStartedEventObject +>; + +export type OwnershipTransferStartedEventFilter = + TypedEventFilter; + export interface OwnershipTransferredEventObject { previousOwner: string; newOwner: string; @@ -130,6 +164,10 @@ export interface ZetaInteractor extends BaseContract { removeListener: OnEvent; functions: { + acceptOwnership( + overrides?: Overrides & { from?: string | Promise } + ): Promise; + connector(overrides?: CallOverrides): Promise<[string]>; interactorsByChainId( @@ -139,6 +177,8 @@ export interface ZetaInteractor extends BaseContract { owner(overrides?: CallOverrides): Promise<[string]>; + pendingOwner(overrides?: CallOverrides): Promise<[string]>; + renounceOwnership( overrides?: Overrides & { from?: string | Promise } ): Promise; @@ -155,6 +195,10 @@ export interface ZetaInteractor extends BaseContract { ): Promise; }; + acceptOwnership( + overrides?: Overrides & { from?: string | Promise } + ): Promise; + connector(overrides?: CallOverrides): Promise; interactorsByChainId( @@ -164,6 +208,8 @@ export interface ZetaInteractor extends BaseContract { owner(overrides?: CallOverrides): Promise; + pendingOwner(overrides?: CallOverrides): Promise; + renounceOwnership( overrides?: Overrides & { from?: string | Promise } ): Promise; @@ -180,6 +226,8 @@ export interface ZetaInteractor extends BaseContract { ): Promise; callStatic: { + acceptOwnership(overrides?: CallOverrides): Promise; + connector(overrides?: CallOverrides): Promise; interactorsByChainId( @@ -189,6 +237,8 @@ export interface ZetaInteractor extends BaseContract { owner(overrides?: CallOverrides): Promise; + pendingOwner(overrides?: CallOverrides): Promise; + renounceOwnership(overrides?: CallOverrides): Promise; setInteractorByChainId( @@ -204,6 +254,15 @@ export interface ZetaInteractor extends BaseContract { }; filters: { + "OwnershipTransferStarted(address,address)"( + previousOwner?: string | null, + newOwner?: string | null + ): OwnershipTransferStartedEventFilter; + OwnershipTransferStarted( + previousOwner?: string | null, + newOwner?: string | null + ): OwnershipTransferStartedEventFilter; + "OwnershipTransferred(address,address)"( previousOwner?: string | null, newOwner?: string | null @@ -215,6 +274,10 @@ export interface ZetaInteractor extends BaseContract { }; estimateGas: { + acceptOwnership( + overrides?: Overrides & { from?: string | Promise } + ): Promise; + connector(overrides?: CallOverrides): Promise; interactorsByChainId( @@ -224,6 +287,8 @@ export interface ZetaInteractor extends BaseContract { owner(overrides?: CallOverrides): Promise; + pendingOwner(overrides?: CallOverrides): Promise; + renounceOwnership( overrides?: Overrides & { from?: string | Promise } ): Promise; @@ -241,6 +306,10 @@ export interface ZetaInteractor extends BaseContract { }; populateTransaction: { + acceptOwnership( + overrides?: Overrides & { from?: string | Promise } + ): Promise; + connector(overrides?: CallOverrides): Promise; interactorsByChainId( @@ -250,6 +319,8 @@ export interface ZetaInteractor extends BaseContract { owner(overrides?: CallOverrides): Promise; + pendingOwner(overrides?: CallOverrides): Promise; + renounceOwnership( overrides?: Overrides & { from?: string | Promise } ): Promise; diff --git a/packages/interfaces/typechain-types/contracts/openzeppelin/Ownable2Step.ts b/packages/interfaces/typechain-types/contracts/openzeppelin/Ownable2Step.ts new file mode 100644 index 00000000..ea5ab139 --- /dev/null +++ b/packages/interfaces/typechain-types/contracts/openzeppelin/Ownable2Step.ts @@ -0,0 +1,249 @@ +/* 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, + EventFragment, +} from "@ethersproject/abi"; +import type { Listener, Provider } from "@ethersproject/providers"; +import type { + TypedEventFilter, + TypedEvent, + TypedListener, + OnEvent, +} from "../../common"; + +export interface Ownable2StepInterface extends utils.Interface { + functions: { + "acceptOwnership()": FunctionFragment; + "owner()": FunctionFragment; + "pendingOwner()": FunctionFragment; + "renounceOwnership()": FunctionFragment; + "transferOwnership(address)": FunctionFragment; + }; + + getFunction( + nameOrSignatureOrTopic: + | "acceptOwnership" + | "owner" + | "pendingOwner" + | "renounceOwnership" + | "transferOwnership" + ): FunctionFragment; + + encodeFunctionData( + functionFragment: "acceptOwnership", + values?: undefined + ): string; + encodeFunctionData(functionFragment: "owner", values?: undefined): string; + encodeFunctionData( + functionFragment: "pendingOwner", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "renounceOwnership", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "transferOwnership", + values: [string] + ): string; + + decodeFunctionResult( + functionFragment: "acceptOwnership", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "owner", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "pendingOwner", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "renounceOwnership", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "transferOwnership", + data: BytesLike + ): Result; + + events: { + "OwnershipTransferStarted(address,address)": EventFragment; + "OwnershipTransferred(address,address)": EventFragment; + }; + + getEvent(nameOrSignatureOrTopic: "OwnershipTransferStarted"): EventFragment; + getEvent(nameOrSignatureOrTopic: "OwnershipTransferred"): EventFragment; +} + +export interface OwnershipTransferStartedEventObject { + previousOwner: string; + newOwner: string; +} +export type OwnershipTransferStartedEvent = TypedEvent< + [string, string], + OwnershipTransferStartedEventObject +>; + +export type OwnershipTransferStartedEventFilter = + TypedEventFilter; + +export interface OwnershipTransferredEventObject { + previousOwner: string; + newOwner: string; +} +export type OwnershipTransferredEvent = TypedEvent< + [string, string], + OwnershipTransferredEventObject +>; + +export type OwnershipTransferredEventFilter = + TypedEventFilter; + +export interface Ownable2Step extends BaseContract { + connect(signerOrProvider: Signer | Provider | string): this; + attach(addressOrName: string): this; + deployed(): Promise; + + interface: Ownable2StepInterface; + + 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: { + acceptOwnership( + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + owner(overrides?: CallOverrides): Promise<[string]>; + + pendingOwner(overrides?: CallOverrides): Promise<[string]>; + + renounceOwnership( + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + transferOwnership( + newOwner: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + }; + + acceptOwnership( + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + owner(overrides?: CallOverrides): Promise; + + pendingOwner(overrides?: CallOverrides): Promise; + + renounceOwnership( + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + transferOwnership( + newOwner: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + callStatic: { + acceptOwnership(overrides?: CallOverrides): Promise; + + owner(overrides?: CallOverrides): Promise; + + pendingOwner(overrides?: CallOverrides): Promise; + + renounceOwnership(overrides?: CallOverrides): Promise; + + transferOwnership( + newOwner: string, + overrides?: CallOverrides + ): Promise; + }; + + filters: { + "OwnershipTransferStarted(address,address)"( + previousOwner?: string | null, + newOwner?: string | null + ): OwnershipTransferStartedEventFilter; + OwnershipTransferStarted( + previousOwner?: string | null, + newOwner?: string | null + ): OwnershipTransferStartedEventFilter; + + "OwnershipTransferred(address,address)"( + previousOwner?: string | null, + newOwner?: string | null + ): OwnershipTransferredEventFilter; + OwnershipTransferred( + previousOwner?: string | null, + newOwner?: string | null + ): OwnershipTransferredEventFilter; + }; + + estimateGas: { + acceptOwnership( + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + owner(overrides?: CallOverrides): Promise; + + pendingOwner(overrides?: CallOverrides): Promise; + + renounceOwnership( + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + transferOwnership( + newOwner: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + }; + + populateTransaction: { + acceptOwnership( + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + owner(overrides?: CallOverrides): Promise; + + pendingOwner(overrides?: CallOverrides): Promise; + + renounceOwnership( + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + transferOwnership( + newOwner: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + }; +} diff --git a/packages/interfaces/typechain-types/contracts/testing/ZetaInteractorMock.ts b/packages/interfaces/typechain-types/contracts/testing/ZetaInteractorMock.ts index dc4021a7..90625217 100644 --- a/packages/interfaces/typechain-types/contracts/testing/ZetaInteractorMock.ts +++ b/packages/interfaces/typechain-types/contracts/testing/ZetaInteractorMock.ts @@ -77,11 +77,13 @@ export declare namespace ZetaInterfaces { export interface ZetaInteractorMockInterface extends utils.Interface { functions: { + "acceptOwnership()": FunctionFragment; "connector()": FunctionFragment; "interactorsByChainId(uint256)": FunctionFragment; "onZetaMessage((bytes,uint256,address,uint256,bytes))": FunctionFragment; "onZetaRevert((address,uint256,bytes,uint256,uint256,bytes))": FunctionFragment; "owner()": FunctionFragment; + "pendingOwner()": FunctionFragment; "renounceOwnership()": FunctionFragment; "setInteractorByChainId(uint256,bytes)": FunctionFragment; "transferOwnership(address)": FunctionFragment; @@ -89,16 +91,22 @@ export interface ZetaInteractorMockInterface extends utils.Interface { getFunction( nameOrSignatureOrTopic: + | "acceptOwnership" | "connector" | "interactorsByChainId" | "onZetaMessage" | "onZetaRevert" | "owner" + | "pendingOwner" | "renounceOwnership" | "setInteractorByChainId" | "transferOwnership" ): FunctionFragment; + encodeFunctionData( + functionFragment: "acceptOwnership", + values?: undefined + ): string; encodeFunctionData(functionFragment: "connector", values?: undefined): string; encodeFunctionData( functionFragment: "interactorsByChainId", @@ -113,6 +121,10 @@ export interface ZetaInteractorMockInterface extends utils.Interface { values: [ZetaInterfaces.ZetaRevertStruct] ): string; encodeFunctionData(functionFragment: "owner", values?: undefined): string; + encodeFunctionData( + functionFragment: "pendingOwner", + values?: undefined + ): string; encodeFunctionData( functionFragment: "renounceOwnership", values?: undefined @@ -126,6 +138,10 @@ export interface ZetaInteractorMockInterface extends utils.Interface { values: [string] ): string; + decodeFunctionResult( + functionFragment: "acceptOwnership", + data: BytesLike + ): Result; decodeFunctionResult(functionFragment: "connector", data: BytesLike): Result; decodeFunctionResult( functionFragment: "interactorsByChainId", @@ -140,6 +156,10 @@ export interface ZetaInteractorMockInterface extends utils.Interface { data: BytesLike ): Result; decodeFunctionResult(functionFragment: "owner", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "pendingOwner", + data: BytesLike + ): Result; decodeFunctionResult( functionFragment: "renounceOwnership", data: BytesLike @@ -154,12 +174,26 @@ export interface ZetaInteractorMockInterface extends utils.Interface { ): Result; events: { + "OwnershipTransferStarted(address,address)": EventFragment; "OwnershipTransferred(address,address)": EventFragment; }; + getEvent(nameOrSignatureOrTopic: "OwnershipTransferStarted"): EventFragment; getEvent(nameOrSignatureOrTopic: "OwnershipTransferred"): EventFragment; } +export interface OwnershipTransferStartedEventObject { + previousOwner: string; + newOwner: string; +} +export type OwnershipTransferStartedEvent = TypedEvent< + [string, string], + OwnershipTransferStartedEventObject +>; + +export type OwnershipTransferStartedEventFilter = + TypedEventFilter; + export interface OwnershipTransferredEventObject { previousOwner: string; newOwner: string; @@ -199,6 +233,10 @@ export interface ZetaInteractorMock extends BaseContract { removeListener: OnEvent; functions: { + acceptOwnership( + overrides?: Overrides & { from?: string | Promise } + ): Promise; + connector(overrides?: CallOverrides): Promise<[string]>; interactorsByChainId( @@ -218,6 +256,8 @@ export interface ZetaInteractorMock extends BaseContract { owner(overrides?: CallOverrides): Promise<[string]>; + pendingOwner(overrides?: CallOverrides): Promise<[string]>; + renounceOwnership( overrides?: Overrides & { from?: string | Promise } ): Promise; @@ -234,6 +274,10 @@ export interface ZetaInteractorMock extends BaseContract { ): Promise; }; + acceptOwnership( + overrides?: Overrides & { from?: string | Promise } + ): Promise; + connector(overrides?: CallOverrides): Promise; interactorsByChainId( @@ -253,6 +297,8 @@ export interface ZetaInteractorMock extends BaseContract { owner(overrides?: CallOverrides): Promise; + pendingOwner(overrides?: CallOverrides): Promise; + renounceOwnership( overrides?: Overrides & { from?: string | Promise } ): Promise; @@ -269,6 +315,8 @@ export interface ZetaInteractorMock extends BaseContract { ): Promise; callStatic: { + acceptOwnership(overrides?: CallOverrides): Promise; + connector(overrides?: CallOverrides): Promise; interactorsByChainId( @@ -288,6 +336,8 @@ export interface ZetaInteractorMock extends BaseContract { owner(overrides?: CallOverrides): Promise; + pendingOwner(overrides?: CallOverrides): Promise; + renounceOwnership(overrides?: CallOverrides): Promise; setInteractorByChainId( @@ -303,6 +353,15 @@ export interface ZetaInteractorMock extends BaseContract { }; filters: { + "OwnershipTransferStarted(address,address)"( + previousOwner?: string | null, + newOwner?: string | null + ): OwnershipTransferStartedEventFilter; + OwnershipTransferStarted( + previousOwner?: string | null, + newOwner?: string | null + ): OwnershipTransferStartedEventFilter; + "OwnershipTransferred(address,address)"( previousOwner?: string | null, newOwner?: string | null @@ -314,6 +373,10 @@ export interface ZetaInteractorMock extends BaseContract { }; estimateGas: { + acceptOwnership( + overrides?: Overrides & { from?: string | Promise } + ): Promise; + connector(overrides?: CallOverrides): Promise; interactorsByChainId( @@ -333,6 +396,8 @@ export interface ZetaInteractorMock extends BaseContract { owner(overrides?: CallOverrides): Promise; + pendingOwner(overrides?: CallOverrides): Promise; + renounceOwnership( overrides?: Overrides & { from?: string | Promise } ): Promise; @@ -350,6 +415,10 @@ export interface ZetaInteractorMock extends BaseContract { }; populateTransaction: { + acceptOwnership( + overrides?: Overrides & { from?: string | Promise } + ): Promise; + connector(overrides?: CallOverrides): Promise; interactorsByChainId( @@ -369,6 +438,8 @@ export interface ZetaInteractorMock extends BaseContract { owner(overrides?: CallOverrides): Promise; + pendingOwner(overrides?: CallOverrides): Promise; + renounceOwnership( overrides?: Overrides & { from?: string | Promise } ): Promise; diff --git a/packages/interfaces/typechain-types/factories/contracts/ImmutableCreate2Factory.sol/ImmutableCreate2Factory__factory.ts b/packages/interfaces/typechain-types/factories/contracts/ImmutableCreate2Factory.sol/ImmutableCreate2Factory__factory.ts index 5c14e21f..5c4256dd 100644 --- a/packages/interfaces/typechain-types/factories/contracts/ImmutableCreate2Factory.sol/ImmutableCreate2Factory__factory.ts +++ b/packages/interfaces/typechain-types/factories/contracts/ImmutableCreate2Factory.sol/ImmutableCreate2Factory__factory.ts @@ -28,6 +28,29 @@ const _abi = [ stateMutability: "view", type: "function", }, + { + constant: false, + inputs: [ + { + name: "salt", + type: "bytes32", + }, + { + name: "initializationCode", + type: "bytes", + }, + ], + name: "safeCreate2AndTransfer", + outputs: [ + { + name: "deploymentAddress", + type: "address", + }, + ], + payable: true, + stateMutability: "payable", + type: "function", + }, { constant: false, inputs: [ @@ -100,7 +123,7 @@ const _abi = [ ]; const _bytecode = - "0x608060405234801561001057600080fd5b506109d0806100206000396000f3fe60806040526004361061003f5760003560e01c806308508b8f1461004457806364e03087146100ad57806385cf97ab14610170578063a49a7c9014610240575b600080fd5b34801561005057600080fd5b506100936004803603602081101561006757600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506102c5565b604051808215151515815260200191505060405180910390f35b61012e600480360360408110156100c357600080fd5b8101908080359060200190929190803590602001906401000000008111156100ea57600080fd5b8201836020820111156100fc57600080fd5b8035906020019184600183028401116401000000008311171561011e57600080fd5b909192939192939050505061031a565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561017c57600080fd5b506101fe6004803603604081101561019357600080fd5b8101908080359060200190929190803590602001906401000000008111156101ba57600080fd5b8201836020820111156101cc57600080fd5b803590602001918460018302840111640100000000831117156101ee57600080fd5b90919293919293905050506106b5565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561024c57600080fd5b506102836004803603604081101561026357600080fd5b8101908080359060200190929190803590602001909291905050506107db565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b60008060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff169050919050565b6000833373ffffffffffffffffffffffffffffffffffffffff168160601c73ffffffffffffffffffffffffffffffffffffffff16148061037b5750600060601b6bffffffffffffffffffffffff1916816bffffffffffffffffffffffff1916145b6103d0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260458152602001806109116045913960600191505060405180910390fd5b606084848080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f82011690508083019250505050505050905060003087836040516020018082805190602001908083835b602083106104545780518252602082019150602081019050602083039250610431565b6001836020036101000a0380198251168184511680821785525050505050509050019150506040516020818303038152906040528051906020012060405160200180807fff000000000000000000000000000000000000000000000000000000000000008152506001018473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1660601b815260140183815260200182815260200193505050506040516020818303038152906040528051906020012060001c90506000808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16156105c1576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252603f8152602001806108d2603f913960400191505060405180910390fd5b81602001825188818334f5955050508073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1614610654576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260468152602001806109566046913960600191505060405180910390fd5b60016000808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055505050509392505050565b6000308484846040516020018083838082843780830192505050925050506040516020818303038152906040528051906020012060405160200180807fff000000000000000000000000000000000000000000000000000000000000008152506001018473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1660601b815260140183815260200182815260200193505050506040516020818303038152906040528051906020012060001c90506000808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16156107d357600090506107d4565b5b9392505050565b600030838360405160200180807fff000000000000000000000000000000000000000000000000000000000000008152506001018473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1660601b815260140183815260200182815260200193505050506040516020818303038152906040528051906020012060001c90506000808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16156108ca57600090506108cb565b5b9291505056fe496e76616c696420636f6e7472616374206372656174696f6e202d20636f6e74726163742068617320616c7265616479206265656e206465706c6f7965642e496e76616c69642073616c74202d206669727374203230206279746573206f66207468652073616c74206d757374206d617463682063616c6c696e6720616464726573732e4661696c656420746f206465706c6f7920636f6e7472616374207573696e672070726f76696465642073616c7420616e6420696e697469616c697a6174696f6e20636f64652ea265627a7a72305820d7c139ad04a8d13985b5e2d67c67413e545e678b3fc89b6305c26e51dee238a764736f6c634300050a0032"; + "0x608060405234801561001057600080fd5b50610c54806100206000396000f3fe60806040526004361061004a5760003560e01c806308508b8f1461004f57806329346003146100b857806364e030871461017b57806385cf97ab14610280578063a49a7c9014610350575b600080fd5b34801561005b57600080fd5b5061009e6004803603602081101561007257600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506103d5565b604051808215151515815260200191505060405180910390f35b610139600480360360408110156100ce57600080fd5b8101908080359060200190929190803590602001906401000000008111156100f557600080fd5b82018360208201111561010757600080fd5b8035906020019184600183028401116401000000008311171561012957600080fd5b909192939192939050505061042a565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b61023e6004803603604081101561019157600080fd5b8101908080359060200190929190803590602001906401000000008111156101b857600080fd5b8201836020820111156101ca57600080fd5b803590602001918460018302840111640100000000831117156101ec57600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f8201169050808301925050505050505091929192905050506105cf565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561028c57600080fd5b5061030e600480360360408110156102a357600080fd5b8101908080359060200190929190803590602001906401000000008111156102ca57600080fd5b8201836020820111156102dc57600080fd5b803590602001918460018302840111640100000000831117156102fe57600080fd5b9091929391929390505050610698565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561035c57600080fd5b506103936004803603604081101561037357600080fd5b8101908080359060200190929190803590602001909291905050506107be565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b60008060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff169050919050565b6000833373ffffffffffffffffffffffffffffffffffffffff168160601c73ffffffffffffffffffffffffffffffffffffffff16148061048b5750600060601b6bffffffffffffffffffffffff1916816bffffffffffffffffffffffff1916145b6104e0576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526045815260200180610b956045913960600191505060405180910390fd5b61052e8585858080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050506108b4565b91508173ffffffffffffffffffffffffffffffffffffffff1663f2fde38b336040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001915050600060405180830381600087803b1580156105af57600080fd5b505af11580156105c3573d6000803e3d6000fd5b50505050509392505050565b6000823373ffffffffffffffffffffffffffffffffffffffff168160601c73ffffffffffffffffffffffffffffffffffffffff1614806106305750600060601b6bffffffffffffffffffffffff1916816bffffffffffffffffffffffff1916145b610685576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526045815260200180610b956045913960600191505060405180910390fd5b61068f84846108b4565b91505092915050565b6000308484846040516020018083838082843780830192505050925050506040516020818303038152906040528051906020012060405160200180807fff000000000000000000000000000000000000000000000000000000000000008152506001018473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1660601b815260140183815260200182815260200193505050506040516020818303038152906040528051906020012060001c90506000808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16156107b657600090506107b7565b5b9392505050565b600030838360405160200180807fff000000000000000000000000000000000000000000000000000000000000008152506001018473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1660601b815260140183815260200182815260200193505050506040516020818303038152906040528051906020012060001c90506000808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16156108ad57600090506108ae565b5b92915050565b6000606082905060003085836040516020018082805190602001908083835b602083106108f657805182526020820191506020810190506020830392506108d3565b6001836020036101000a0380198251168184511680821785525050505050509050019150506040516020818303038152906040528051906020012060405160200180807fff000000000000000000000000000000000000000000000000000000000000008152506001018473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1660601b815260140183815260200182815260200193505050506040516020818303038152906040528051906020012060001c90506000808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1615610a63576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252603f815260200180610b56603f913960400191505060405180910390fd5b81602001825186818334f5945050508073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614610af6576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526046815260200180610bda6046913960600191505060405180910390fd5b60016000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555050509291505056fe496e76616c696420636f6e7472616374206372656174696f6e202d20636f6e74726163742068617320616c7265616479206265656e206465706c6f7965642e496e76616c69642073616c74202d206669727374203230206279746573206f66207468652073616c74206d757374206d617463682063616c6c696e6720616464726573732e4661696c656420746f206465706c6f7920636f6e7472616374207573696e672070726f76696465642073616c7420616e6420696e697469616c697a6174696f6e20636f64652ea265627a7a72305820a78ac019740038abee03eddb8175dfb6b2e2b02b701cbb347a488accc30e4f5d64736f6c634300050a0032"; type ImmutableCreate2FactoryConstructorParams = | [signer?: Signer] diff --git a/packages/interfaces/typechain-types/factories/contracts/ImmutableCreate2Factory.sol/Ownable__factory.ts b/packages/interfaces/typechain-types/factories/contracts/ImmutableCreate2Factory.sol/Ownable__factory.ts new file mode 100644 index 00000000..ad195845 --- /dev/null +++ b/packages/interfaces/typechain-types/factories/contracts/ImmutableCreate2Factory.sol/Ownable__factory.ts @@ -0,0 +1,40 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ + +import { Contract, Signer, utils } from "ethers"; +import type { Provider } from "@ethersproject/providers"; +import type { + Ownable, + OwnableInterface, +} from "../../../contracts/ImmutableCreate2Factory.sol/Ownable"; + +const _abi = [ + { + constant: false, + inputs: [ + { + name: "newOwner", + type: "address", + }, + ], + name: "transferOwnership", + outputs: [], + payable: false, + stateMutability: "nonpayable", + type: "function", + }, +]; + +export class Ownable__factory { + static readonly abi = _abi; + static createInterface(): OwnableInterface { + return new utils.Interface(_abi) as OwnableInterface; + } + static connect( + address: string, + signerOrProvider: Signer | Provider + ): Ownable { + return new Contract(address, _abi, signerOrProvider) as Ownable; + } +} diff --git a/packages/interfaces/typechain-types/factories/contracts/ZetaInteractor__factory.ts b/packages/interfaces/typechain-types/factories/contracts/ZetaInteractor__factory.ts index ad56afeb..eb1e66e3 100644 --- a/packages/interfaces/typechain-types/factories/contracts/ZetaInteractor__factory.ts +++ b/packages/interfaces/typechain-types/factories/contracts/ZetaInteractor__factory.ts @@ -36,6 +36,25 @@ const _abi = [ name: "InvalidZetaRevertCall", type: "error", }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "previousOwner", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "newOwner", + type: "address", + }, + ], + name: "OwnershipTransferStarted", + type: "event", + }, { anonymous: false, inputs: [ @@ -55,6 +74,13 @@ const _abi = [ name: "OwnershipTransferred", type: "event", }, + { + inputs: [], + name: "acceptOwnership", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, { inputs: [], name: "connector", @@ -100,6 +126,19 @@ const _abi = [ stateMutability: "view", type: "function", }, + { + inputs: [], + name: "pendingOwner", + outputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, { inputs: [], name: "renounceOwnership", diff --git a/packages/interfaces/typechain-types/factories/contracts/openzeppelin/Ownable2Step__factory.ts b/packages/interfaces/typechain-types/factories/contracts/openzeppelin/Ownable2Step__factory.ts new file mode 100644 index 00000000..87a3acfd --- /dev/null +++ b/packages/interfaces/typechain-types/factories/contracts/openzeppelin/Ownable2Step__factory.ts @@ -0,0 +1,117 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ + +import { Contract, Signer, utils } from "ethers"; +import type { Provider } from "@ethersproject/providers"; +import type { + Ownable2Step, + Ownable2StepInterface, +} from "../../../contracts/openzeppelin/Ownable2Step"; + +const _abi = [ + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "previousOwner", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "newOwner", + type: "address", + }, + ], + name: "OwnershipTransferStarted", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "previousOwner", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "newOwner", + type: "address", + }, + ], + name: "OwnershipTransferred", + type: "event", + }, + { + inputs: [], + name: "acceptOwnership", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "owner", + outputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "pendingOwner", + outputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "renounceOwnership", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "newOwner", + type: "address", + }, + ], + name: "transferOwnership", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, +]; + +export class Ownable2Step__factory { + static readonly abi = _abi; + static createInterface(): Ownable2StepInterface { + return new utils.Interface(_abi) as Ownable2StepInterface; + } + static connect( + address: string, + signerOrProvider: Signer | Provider + ): Ownable2Step { + return new Contract(address, _abi, signerOrProvider) as Ownable2Step; + } +} diff --git a/packages/interfaces/typechain-types/factories/contracts/testing/ZetaInteractorMock__factory.ts b/packages/interfaces/typechain-types/factories/contracts/testing/ZetaInteractorMock__factory.ts index a9079319..694810e1 100644 --- a/packages/interfaces/typechain-types/factories/contracts/testing/ZetaInteractorMock__factory.ts +++ b/packages/interfaces/typechain-types/factories/contracts/testing/ZetaInteractorMock__factory.ts @@ -46,6 +46,25 @@ const _abi = [ name: "InvalidZetaRevertCall", type: "error", }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "previousOwner", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "newOwner", + type: "address", + }, + ], + name: "OwnershipTransferStarted", + type: "event", + }, { anonymous: false, inputs: [ @@ -65,6 +84,13 @@ const _abi = [ name: "OwnershipTransferred", type: "event", }, + { + inputs: [], + name: "acceptOwnership", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, { inputs: [], name: "connector", @@ -195,6 +221,19 @@ const _abi = [ stateMutability: "view", type: "function", }, + { + inputs: [], + name: "pendingOwner", + outputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, { inputs: [], name: "renounceOwnership", @@ -236,7 +275,7 @@ const _abi = [ ]; const _bytecode = - "0x60c06040523480156200001157600080fd5b506040516200112538038062001125833981810160405281019062000037919062000182565b80620000586200004c6200009f60201b60201c565b620000a760201b60201c565b46608081815250508073ffffffffffffffffffffffffffffffffffffffff1660a08173ffffffffffffffffffffffffffffffffffffffff1660601b81525050505062000207565b600033905090565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050816000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b6000815190506200017c81620001ed565b92915050565b6000602082840312156200019b576200019a620001e8565b5b6000620001ab848285016200016b565b91505092915050565b6000620001c182620001c8565b9050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600080fd5b620001f881620001b4565b81146200020457600080fd5b50565b60805160a05160601c610eee62000237600039600081816104b801526105fd0152600061032b0152610eee6000f3fe608060405234801561001057600080fd5b50600436106100885760003560e01c8063715018a61161005b578063715018a61461011157806383f3084f1461011b5780638da5cb5b14610139578063f2fde38b1461015757610088565b80632618143f1461008d5780633749c51a146100bd5780633ff0693c146100d95780634fd3f7d7146100f5575b600080fd5b6100a760048036038101906100a29190610979565b610173565b6040516100b49190610b92565b60405180910390f35b6100d760048036038101906100d291906108e7565b610213565b005b6100f360048036038101906100ee9190610930565b6102a9565b005b61010f600480360381019061010a91906109a6565b61038a565b005b61011961042e565b005b6101236104b6565b6040516101309190610bb4565b60405180910390f35b6101416104da565b60405161014e9190610b77565b60405180910390f35b610171600480360381019061016c91906108ba565b610503565b005b6001602052806000526040600020600091509050805461019290610d73565b80601f01602080910402602001604051908101604052809291908181526020018280546101be90610d73565b801561020b5780601f106101e05761010080835404028352916020019161020b565b820191906000526020600020905b8154815290600101906020018083116101ee57829003601f168201915b505050505081565b8061021c6105fb565b60016000826020013581526020019081526020016000206040516102409190610b60565b60405180910390208180600001906102589190610c0f565b604051610266929190610b47565b6040518091039020146102a5576040517fb473eb0a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5050565b806102b26105fb565b3073ffffffffffffffffffffffffffffffffffffffff168160000160208101906102dc91906108ba565b73ffffffffffffffffffffffffffffffffffffffff1614610329576040517fc03e9c3f00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b7f0000000000000000000000000000000000000000000000000000000000000000816020013514610386576040517fc03e9c3f00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5050565b61039261068d565b73ffffffffffffffffffffffffffffffffffffffff166103b06104da565b73ffffffffffffffffffffffffffffffffffffffff1614610406576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016103fd90610bef565b60405180910390fd5b8181600160008681526020019081526020016000209190610428929190610759565b50505050565b61043661068d565b73ffffffffffffffffffffffffffffffffffffffff166104546104da565b73ffffffffffffffffffffffffffffffffffffffff16146104aa576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016104a190610bef565b60405180910390fd5b6104b46000610695565b565b7f000000000000000000000000000000000000000000000000000000000000000081565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b61050b61068d565b73ffffffffffffffffffffffffffffffffffffffff166105296104da565b73ffffffffffffffffffffffffffffffffffffffff161461057f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161057690610bef565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614156105ef576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016105e690610bcf565b60405180910390fd5b6105f881610695565b50565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461068b57336040517fcbd9d2e00000000000000000000000000000000000000000000000000000000081526004016106829190610b77565b60405180910390fd5b565b600033905090565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050816000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b82805461076590610d73565b90600052602060002090601f01602090048101928261078757600085556107ce565b82601f106107a057803560ff19168380011785556107ce565b828001600101855582156107ce579182015b828111156107cd5782358255916020019190600101906107b2565b5b5090506107db91906107df565b5090565b5b808211156107f85760008160009055506001016107e0565b5090565b60008135905061080b81610e8a565b92915050565b60008083601f84011261082757610826610dd9565b5b8235905067ffffffffffffffff81111561084457610843610dd4565b5b6020830191508360018202830111156108605761085f610ded565b5b9250929050565b600060a0828403121561087d5761087c610de3565b5b81905092915050565b600060c0828403121561089c5761089b610de3565b5b81905092915050565b6000813590506108b481610ea1565b92915050565b6000602082840312156108d0576108cf610dfc565b5b60006108de848285016107fc565b91505092915050565b6000602082840312156108fd576108fc610dfc565b5b600082013567ffffffffffffffff81111561091b5761091a610df7565b5b61092784828501610867565b91505092915050565b60006020828403121561094657610945610dfc565b5b600082013567ffffffffffffffff81111561096457610963610df7565b5b61097084828501610886565b91505092915050565b60006020828403121561098f5761098e610dfc565b5b600061099d848285016108a5565b91505092915050565b6000806000604084860312156109bf576109be610dfc565b5b60006109cd868287016108a5565b935050602084013567ffffffffffffffff8111156109ee576109ed610df7565b5b6109fa86828701610811565b92509250509250925092565b610a0f81610cbf565b82525050565b6000610a218385610ca3565b9350610a2e838584610d31565b82840190509392505050565b6000610a4582610c87565b610a4f8185610c92565b9350610a5f818560208601610d40565b610a6881610e01565b840191505092915050565b60008154610a8081610d73565b610a8a8186610ca3565b94506001821660008114610aa55760018114610ab657610ae9565b60ff19831686528186019350610ae9565b610abf85610c72565b60005b83811015610ae157815481890152600182019150602081019050610ac2565b838801955050505b50505092915050565b610afb81610cfb565b82525050565b6000610b0e602683610cae565b9150610b1982610e12565b604082019050919050565b6000610b31602083610cae565b9150610b3c82610e61565b602082019050919050565b6000610b54828486610a15565b91508190509392505050565b6000610b6c8284610a73565b915081905092915050565b6000602082019050610b8c6000830184610a06565b92915050565b60006020820190508181036000830152610bac8184610a3a565b905092915050565b6000602082019050610bc96000830184610af2565b92915050565b60006020820190508181036000830152610be881610b01565b9050919050565b60006020820190508181036000830152610c0881610b24565b9050919050565b60008083356001602003843603038112610c2c57610c2b610de8565b5b80840192508235915067ffffffffffffffff821115610c4e57610c4d610dde565b5b602083019250600182023603831315610c6a57610c69610df2565b5b509250929050565b60008190508160005260206000209050919050565b600081519050919050565b600082825260208201905092915050565b600081905092915050565b600082825260208201905092915050565b6000610cca82610cd1565b9050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b6000610d0682610d0d565b9050919050565b6000610d1882610d1f565b9050919050565b6000610d2a82610cd1565b9050919050565b82818337600083830152505050565b60005b83811015610d5e578082015181840152602081019050610d43565b83811115610d6d576000848401525b50505050565b60006002820490506001821680610d8b57607f821691505b60208210811415610d9f57610d9e610da5565b5b50919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160008201527f6464726573730000000000000000000000000000000000000000000000000000602082015250565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b610e9381610cbf565b8114610e9e57600080fd5b50565b610eaa81610cf1565b8114610eb557600080fd5b5056fea264697066735822122028d663348b87973bc380b1f3d98c4ef89817d84be8e00d9c2b177f549b9b710064736f6c63430008070033"; + "0x60c06040523480156200001157600080fd5b50604051620012b2380380620012b28339818101604052810190620000379190620001c0565b80620000586200004c6200009f60201b60201c565b620000a760201b60201c565b46608081815250508073ffffffffffffffffffffffffffffffffffffffff1660a08173ffffffffffffffffffffffffffffffffffffffff1660601b81525050505062000245565b600033905090565b600160006101000a81549073ffffffffffffffffffffffffffffffffffffffff0219169055620000e281620000e560201b620007191760201c565b50565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050816000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b600081519050620001ba816200022b565b92915050565b600060208284031215620001d957620001d862000226565b5b6000620001e984828501620001a9565b91505092915050565b6000620001ff8262000206565b9050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600080fd5b6200023681620001f2565b81146200024257600080fd5b50565b60805160a05160601c61103d620002756000396000818161058301526107df01526000610369015261103d6000f3fe608060405234801561001057600080fd5b506004361061009e5760003560e01c806379ba50971161006657806379ba50971461013157806383f3084f1461013b5780638da5cb5b14610159578063e30c397814610177578063f2fde38b146101955761009e565b80632618143f146100a35780633749c51a146100d35780633ff0693c146100ef5780634fd3f7d71461010b578063715018a614610127575b600080fd5b6100bd60048036038101906100b89190610ac8565b6101b1565b6040516100ca9190610ce1565b60405180910390f35b6100ed60048036038101906100e89190610a36565b610251565b005b61010960048036038101906101049190610a7f565b6102e7565b005b61012560048036038101906101209190610af5565b6103c8565b005b61012f61046c565b005b6101396104f4565b005b610143610581565b6040516101509190610d03565b60405180910390f35b6101616105a5565b60405161016e9190610cc6565b60405180910390f35b61017f6105ce565b60405161018c9190610cc6565b60405180910390f35b6101af60048036038101906101aa9190610a09565b6105f8565b005b600260205280600052604060002060009150905080546101d090610ec2565b80601f01602080910402602001604051908101604052809291908181526020018280546101fc90610ec2565b80156102495780601f1061021e57610100808354040283529160200191610249565b820191906000526020600020905b81548152906001019060200180831161022c57829003601f168201915b505050505081565b8061025a6107dd565b600260008260200135815260200190815260200160002060405161027e9190610caf565b60405180910390208180600001906102969190610d5e565b6040516102a4929190610c96565b6040518091039020146102e3576040517fb473eb0a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5050565b806102f06107dd565b3073ffffffffffffffffffffffffffffffffffffffff1681600001602081019061031a9190610a09565b73ffffffffffffffffffffffffffffffffffffffff1614610367576040517fc03e9c3f00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b7f00000000000000000000000000000000000000000000000000000000000000008160200135146103c4576040517fc03e9c3f00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5050565b6103d061086f565b73ffffffffffffffffffffffffffffffffffffffff166103ee6105a5565b73ffffffffffffffffffffffffffffffffffffffff1614610444576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161043b90610d3e565b60405180910390fd5b81816002600086815260200190815260200160002091906104669291906108a8565b50505050565b61047461086f565b73ffffffffffffffffffffffffffffffffffffffff166104926105a5565b73ffffffffffffffffffffffffffffffffffffffff16146104e8576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016104df90610d3e565b60405180910390fd5b6104f26000610877565b565b60006104fe61086f565b90508073ffffffffffffffffffffffffffffffffffffffff1661051f6105ce565b73ffffffffffffffffffffffffffffffffffffffff1614610575576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161056c90610d1e565b60405180910390fd5b61057e81610877565b50565b7f000000000000000000000000000000000000000000000000000000000000000081565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b6000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b61060061086f565b73ffffffffffffffffffffffffffffffffffffffff1661061e6105a5565b73ffffffffffffffffffffffffffffffffffffffff1614610674576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161066b90610d3e565b60405180910390fd5b80600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508073ffffffffffffffffffffffffffffffffffffffff166106d46105a5565b73ffffffffffffffffffffffffffffffffffffffff167f38d16b8cac22d99fc7c124b9cd0de2d3fa1faef420bfe791d8c362d765e2270060405160405180910390a350565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050816000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461086d57336040517fcbd9d2e00000000000000000000000000000000000000000000000000000000081526004016108649190610cc6565b60405180910390fd5b565b600033905090565b600160006101000a81549073ffffffffffffffffffffffffffffffffffffffff02191690556108a581610719565b50565b8280546108b490610ec2565b90600052602060002090601f0160209004810192826108d6576000855561091d565b82601f106108ef57803560ff191683800117855561091d565b8280016001018555821561091d579182015b8281111561091c578235825591602001919060010190610901565b5b50905061092a919061092e565b5090565b5b8082111561094757600081600090555060010161092f565b5090565b60008135905061095a81610fd9565b92915050565b60008083601f84011261097657610975610f28565b5b8235905067ffffffffffffffff81111561099357610992610f23565b5b6020830191508360018202830111156109af576109ae610f3c565b5b9250929050565b600060a082840312156109cc576109cb610f32565b5b81905092915050565b600060c082840312156109eb576109ea610f32565b5b81905092915050565b600081359050610a0381610ff0565b92915050565b600060208284031215610a1f57610a1e610f4b565b5b6000610a2d8482850161094b565b91505092915050565b600060208284031215610a4c57610a4b610f4b565b5b600082013567ffffffffffffffff811115610a6a57610a69610f46565b5b610a76848285016109b6565b91505092915050565b600060208284031215610a9557610a94610f4b565b5b600082013567ffffffffffffffff811115610ab357610ab2610f46565b5b610abf848285016109d5565b91505092915050565b600060208284031215610ade57610add610f4b565b5b6000610aec848285016109f4565b91505092915050565b600080600060408486031215610b0e57610b0d610f4b565b5b6000610b1c868287016109f4565b935050602084013567ffffffffffffffff811115610b3d57610b3c610f46565b5b610b4986828701610960565b92509250509250925092565b610b5e81610e0e565b82525050565b6000610b708385610df2565b9350610b7d838584610e80565b82840190509392505050565b6000610b9482610dd6565b610b9e8185610de1565b9350610bae818560208601610e8f565b610bb781610f50565b840191505092915050565b60008154610bcf81610ec2565b610bd98186610df2565b94506001821660008114610bf45760018114610c0557610c38565b60ff19831686528186019350610c38565b610c0e85610dc1565b60005b83811015610c3057815481890152600182019150602081019050610c11565b838801955050505b50505092915050565b610c4a81610e4a565b82525050565b6000610c5d602983610dfd565b9150610c6882610f61565b604082019050919050565b6000610c80602083610dfd565b9150610c8b82610fb0565b602082019050919050565b6000610ca3828486610b64565b91508190509392505050565b6000610cbb8284610bc2565b915081905092915050565b6000602082019050610cdb6000830184610b55565b92915050565b60006020820190508181036000830152610cfb8184610b89565b905092915050565b6000602082019050610d186000830184610c41565b92915050565b60006020820190508181036000830152610d3781610c50565b9050919050565b60006020820190508181036000830152610d5781610c73565b9050919050565b60008083356001602003843603038112610d7b57610d7a610f37565b5b80840192508235915067ffffffffffffffff821115610d9d57610d9c610f2d565b5b602083019250600182023603831315610db957610db8610f41565b5b509250929050565b60008190508160005260206000209050919050565b600081519050919050565b600082825260208201905092915050565b600081905092915050565b600082825260208201905092915050565b6000610e1982610e20565b9050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b6000610e5582610e5c565b9050919050565b6000610e6782610e6e565b9050919050565b6000610e7982610e20565b9050919050565b82818337600083830152505050565b60005b83811015610ead578082015181840152602081019050610e92565b83811115610ebc576000848401525b50505050565b60006002820490506001821680610eda57607f821691505b60208210811415610eee57610eed610ef4565b5b50919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f4f776e61626c6532537465703a2063616c6c6572206973206e6f74207468652060008201527f6e6577206f776e65720000000000000000000000000000000000000000000000602082015250565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b610fe281610e0e565b8114610fed57600080fd5b50565b610ff981610e40565b811461100457600080fd5b5056fea26469706673582212204e2a568ab403c04b828cee4d3bcde0c942b0681627e66f2b91d3f3bedd1ce60b64736f6c63430008070033"; type ZetaInteractorMockConstructorParams = | [signer?: Signer] diff --git a/packages/protocol-contracts/contracts/ImmutableCreate2Factory.sol b/packages/protocol-contracts/contracts/ImmutableCreate2Factory.sol index 4d639e29..96d2a91e 100644 --- a/packages/protocol-contracts/contracts/ImmutableCreate2Factory.sol +++ b/packages/protocol-contracts/contracts/ImmutableCreate2Factory.sol @@ -1,5 +1,9 @@ pragma solidity 0.5.10; // optimization enabled, 99999 runs, evm: petersburg +interface Ownable { + function transferOwnership(address newOwner) external; +} + /** * @title Immutable Create2 Contract Factory * @author 0age @@ -19,21 +23,8 @@ contract ImmutableCreate2Factory { // mapping to track which addresses have already been deployed. mapping(address => bool) private _deployed; - /** - * @dev Create a contract using CREATE2 by submitting a given salt or nonce - * along with the initialization code for the contract. Note that the first 20 - * bytes of the salt must match those of the calling address, which prevents - * contract creation events from being submitted by unintended parties. - * @param salt bytes32 The nonce that will be passed into the CREATE2 call. - * @param initializationCode bytes The initialization code that will be passed - * into the CREATE2 call. - * @return Address of the contract that will be created, or the null address - * if a contract already exists at that address. - */ - function safeCreate2(bytes32 salt, bytes calldata initializationCode) - external - payable - containsCaller(salt) + function safeCreate2Internal(bytes32 salt, bytes memory initializationCode) + internal returns (address deploymentAddress) { // move the initialization code from calldata to memory. @@ -82,6 +73,26 @@ contract ImmutableCreate2Factory { _deployed[deploymentAddress] = true; } + /** + * @dev Create a contract using CREATE2 by submitting a given salt or nonce + * along with the initialization code for the contract. Note that the first 20 + * bytes of the salt must match those of the calling address, which prevents + * contract creation events from being submitted by unintended parties. + * @param salt bytes32 The nonce that will be passed into the CREATE2 call. + * @param initializationCode bytes The initialization code that will be passed + * into the CREATE2 call. + * @return Address of the contract that will be created, or the null address + * if a contract already exists at that address. + */ + function safeCreate2(bytes32 salt, bytes memory initializationCode) + public + payable + containsCaller(salt) + returns (address deploymentAddress) + { + return safeCreate2Internal(salt, initializationCode); + } + /** * @dev Compute the address of the contract that will be created when * submitting a given salt or nonce to the contract along with the contract's @@ -191,4 +202,14 @@ contract ImmutableCreate2Factory { ); _; } + + function safeCreate2AndTransfer(bytes32 salt, bytes calldata initializationCode) + external + payable + containsCaller(salt) + returns (address deploymentAddress) + { + deploymentAddress = safeCreate2Internal(salt, initializationCode); + Ownable(deploymentAddress).transferOwnership(msg.sender); + } } diff --git a/packages/protocol-contracts/contracts/ZetaInteractor.sol b/packages/protocol-contracts/contracts/ZetaInteractor.sol index 4a9e0a8b..995474c3 100644 --- a/packages/protocol-contracts/contracts/ZetaInteractor.sol +++ b/packages/protocol-contracts/contracts/ZetaInteractor.sol @@ -1,12 +1,12 @@ // SPDX-License-Identifier: MIT pragma solidity 0.8.7; -import "@openzeppelin/contracts/access/Ownable.sol"; +import "./openzeppelin/Ownable2Step.sol"; import "./interfaces/ZetaInterfaces.sol"; import "./interfaces/ZetaInteractorErrors.sol"; -abstract contract ZetaInteractor is Ownable, ZetaInteractorErrors { +abstract contract ZetaInteractor is Ownable2Step, ZetaInteractorErrors { bytes32 constant ZERO_BYTES = keccak256(new bytes(0)); uint256 internal immutable currentChainId; ZetaConnector public immutable connector; diff --git a/packages/protocol-contracts/contracts/openzeppelin/Ownable2Step.sol b/packages/protocol-contracts/contracts/openzeppelin/Ownable2Step.sol new file mode 100644 index 00000000..d08053f5 --- /dev/null +++ b/packages/protocol-contracts/contracts/openzeppelin/Ownable2Step.sol @@ -0,0 +1,57 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v4.7.0) (access/Ownable.sol) + +pragma solidity ^0.8.0; + +import "@openzeppelin/contracts/access/Ownable.sol"; + +/** + * @dev Contract module which provides access control mechanism, where + * there is an account (an owner) that can be granted exclusive access to + * specific functions. + * + * By default, the owner account will be the one that deploys the contract. This + * can later be changed with {transferOwnership} and {acceptOwnership}. + * + * This module is used through inheritance. It will make available all functions + * from parent (Ownable). + */ +abstract contract Ownable2Step is Ownable { + address private _pendingOwner; + + event OwnershipTransferStarted(address indexed previousOwner, address indexed newOwner); + + /** + * @dev Returns the address of the pending owner. + */ + function pendingOwner() public view virtual returns (address) { + return _pendingOwner; + } + + /** + * @dev Starts the ownership transfer of the contract to a new account. Replaces the pending transfer if there is one. + * Can only be called by the current owner. + */ + function transferOwnership(address newOwner) public virtual override onlyOwner { + _pendingOwner = newOwner; + emit OwnershipTransferStarted(owner(), newOwner); + } + + /** + * @dev Transfers ownership of the contract to a new account (`newOwner`) and deletes any pending owner. + * Internal function without access restriction. + */ + function _transferOwnership(address newOwner) internal virtual override { + delete _pendingOwner; + super._transferOwnership(newOwner); + } + + /** + * @dev The new owner accepts the ownership transfer. + */ + function acceptOwnership() external { + address sender = _msgSender(); + require(pendingOwner() == sender, "Ownable2Step: caller is not the new owner"); + _transferOwnership(sender); + } +} diff --git a/packages/protocol-contracts/contracts/testing/ZetaInteractorMock.sol b/packages/protocol-contracts/contracts/testing/ZetaInteractorMock.sol index 6b21baab..8b472fd9 100644 --- a/packages/protocol-contracts/contracts/testing/ZetaInteractorMock.sol +++ b/packages/protocol-contracts/contracts/testing/ZetaInteractorMock.sol @@ -1,9 +1,10 @@ // SPDX-License-Identifier: MIT pragma solidity 0.8.7; +import "../openzeppelin/Ownable2Step.sol"; import "../ZetaInteractor.sol"; -contract ZetaInteractorMock is ZetaInteractor, ZetaReceiver { +contract ZetaInteractorMock is Ownable2Step, ZetaInteractor, ZetaReceiver { constructor(address zetaConnectorAddress) ZetaInteractor(zetaConnectorAddress) {} function onZetaMessage(ZetaInterfaces.ZetaMessage calldata zetaMessage) diff --git a/packages/protocol-contracts/lib/ImmutableCreate2Factory/ImmutableCreate2Factory.helpers.ts b/packages/protocol-contracts/lib/ImmutableCreate2Factory/ImmutableCreate2Factory.helpers.ts index 98e9f50c..bbf48bb6 100644 --- a/packages/protocol-contracts/lib/ImmutableCreate2Factory/ImmutableCreate2Factory.helpers.ts +++ b/packages/protocol-contracts/lib/ImmutableCreate2Factory/ImmutableCreate2Factory.helpers.ts @@ -8,7 +8,7 @@ export const buildBytecode = (constructorTypes: any[], constructorArgs: any[], c export const buildCreate2Address = (saltHex: string, byteCode: string, factoryAddress: string) => { const payload = ethers.utils.keccak256( - `0x${["ff", factoryAddress, saltHex, ethers.utils.keccak256(byteCode)].map((x) => x.replace(/0x/, "")).join("")}` + `0x${["ff", factoryAddress, saltHex, ethers.utils.keccak256(byteCode)].map(x => x.replace(/0x/, "")).join("")}` ); return `0x${payload.slice(-40)}`.toLowerCase(); @@ -41,6 +41,7 @@ export async function deployContractToAddress({ constructorTypes = [] as string[], constructorArgs = [] as any[], signer, + transferOwner = false }: { constructorArgs?: any[]; constructorTypes?: string[]; @@ -48,6 +49,7 @@ export async function deployContractToAddress({ factoryAddress: string; salt: string; signer: Signer; + transferOwner?: boolean; }) { const factory = ImmutableCreate2Factory__factory.connect(factoryAddress, signer); @@ -55,15 +57,16 @@ export async function deployContractToAddress({ const computedAddr = await factory.findCreate2Address(salt, bytecode); - const tx = await factory.safeCreate2(salt, bytecode, { - gasLimit: 6000000, + const call = transferOwner ? factory.safeCreate2AndTransfer : factory.safeCreate2; + const tx = await call(salt, bytecode, { + gasLimit: 6000000 }); const result = await tx.wait(); return { address: computedAddr as string, receipt: result as TransactionReceipt, - txHash: result.transactionHash as string, + txHash: result.transactionHash as string }; } diff --git a/packages/protocol-contracts/test/ImmutableCreate2Factory.spec.ts b/packages/protocol-contracts/test/ImmutableCreate2Factory.spec.ts index f3225399..8db7d0ea 100644 --- a/packages/protocol-contracts/test/ImmutableCreate2Factory.spec.ts +++ b/packages/protocol-contracts/test/ImmutableCreate2Factory.spec.ts @@ -4,6 +4,7 @@ import { ImmutableCreate2Factory, ImmutableCreate2Factory__factory, ZetaEth__factory, + ZetaInteractorMock__factory } from "@zetachain/interfaces/typechain-types"; import chai, { expect } from "chai"; import { parseEther } from "ethers/lib/utils"; @@ -15,7 +16,7 @@ import { buildCreate2Address, deployContractToAddress, isDeployed, - saltToHex, + saltToHex } from "../lib/ImmutableCreate2Factory/ImmutableCreate2Factory.helpers"; chai.should(); @@ -51,7 +52,7 @@ describe("Deterministic deployment tests", () => { contractBytecode: ZetaEth__factory.bytecode, factoryAddress: immutableCreate2.address, salt: salthex, - signer: signer, + signer: signer }); expect(address).to.be.eq(expectedAddress); @@ -102,4 +103,26 @@ describe("Deterministic deployment tests", () => { const expectedAddressOffchain = buildCreate2Address(salthex, bytecode, immutableCreate2.address); expect(expectedAddress.toLocaleLowerCase()).to.be.eq(expectedAddressOffchain); }); + + it("Should deploy and transfer ownership to deployer", async () => { + let saltStr = "0"; + + const salthex = saltToHex(saltStr, signer.address); + const constructorTypes = ["address"]; + const constructorArgs = [signer.address]; + + const { address } = await deployContractToAddress({ + constructorArgs: constructorArgs, + constructorTypes: constructorTypes, + contractBytecode: ZetaInteractorMock__factory.bytecode, + factoryAddress: immutableCreate2.address, + salt: salthex, + signer: signer, + transferOwner: true + }); + + const contract = ZetaInteractorMock__factory.connect(address, signer); + await contract.acceptOwnership(); + expect(await contract.owner()).to.be.eq(signer.address); + }); }); diff --git a/packages/protocol-contracts/test/ZetaInteractor.spec.ts b/packages/protocol-contracts/test/ZetaInteractor.spec.ts index 73b24f87..3e6c52fa 100644 --- a/packages/protocol-contracts/test/ZetaInteractor.spec.ts +++ b/packages/protocol-contracts/test/ZetaInteractor.spec.ts @@ -38,7 +38,7 @@ describe("ZetaInteractor tests", () => { message: encoder.encode(["address"], [zetaInteractorMock.address]), sourceChainId: chainBId, zetaTxSenderAddress: ethers.utils.solidityPack(["address"], [zetaInteractorMock.address]), - zetaValue: 0, + zetaValue: 0 }) ).to.be.revertedWith(getCustomErrorMessage("InvalidCaller", [deployer.address])); }); @@ -50,7 +50,7 @@ describe("ZetaInteractor tests", () => { message: encoder.encode(["address"], [crossChainContractB.address]), sourceChainId: chainBId, zetaTxSenderAddress: ethers.utils.solidityPack(["address"], [zetaInteractorMock.address]), - zetaValue: 0, + zetaValue: 0 }) ).to.be.revertedWith(getCustomErrorMessage("InvalidZetaMessageCall")); }); @@ -65,9 +65,33 @@ describe("ZetaInteractor tests", () => { message: encoder.encode(["address"], [zetaInteractorMock.address]), remainingZetaValue: 0, sourceChainId: chainAId, - zetaTxSenderAddress: deployer.address, + zetaTxSenderAddress: deployer.address }) ).to.be.revertedWith(getCustomErrorMessage("InvalidCaller", [deployer.address])); }); }); + + describe("transferOwnership", () => { + it("Should transfer ownership", async () => { + const randomSigner = accounts[3]; + await zetaInteractorMock.transferOwnership(randomSigner.address); + await zetaInteractorMock.connect(randomSigner).acceptOwnership(); + await expect(await zetaInteractorMock.owner()).to.be.eq(randomSigner.address); + }); + + it("Should keep the ownership until accept", async () => { + const randomSigner = accounts[3]; + await zetaInteractorMock.transferOwnership(randomSigner.address); + await expect(await zetaInteractorMock.owner()).to.be.eq(deployer.address); + }); + + it("Should revert if old owner want to do some action", async () => { + const randomSigner = accounts[3]; + await zetaInteractorMock.transferOwnership(randomSigner.address); + await zetaInteractorMock.connect(randomSigner).acceptOwnership(); + await expect(zetaInteractorMock.transferOwnership(randomSigner.address)).to.be.revertedWith( + "Ownable: caller is not the owner" + ); + }); + }); }); From 03a7ff3c15d8fe93a6b4d018d5002b648cd3e90b Mon Sep 17 00:00:00 2001 From: Andres Martin Aiello <50411235+andresaiello@users.noreply.github.com> Date: Mon, 26 Dec 2022 12:08:48 -0300 Subject: [PATCH 047/115] Develop cctx testing scripts (#56) * Develop cctx testing scripts * comments addressed --- .../zevm-contracts/scripts/systemConstants.ts | 14 +++ .../scripts/zeta-swap/stress-swap.ts | 102 ++++++++++++++++++ 2 files changed, 116 insertions(+) create mode 100644 packages/zevm-contracts/scripts/zeta-swap/stress-swap.ts diff --git a/packages/zevm-contracts/scripts/systemConstants.ts b/packages/zevm-contracts/scripts/systemConstants.ts index a6abad3d..9349b55e 100644 --- a/packages/zevm-contracts/scripts/systemConstants.ts +++ b/packages/zevm-contracts/scripts/systemConstants.ts @@ -1,3 +1,5 @@ +import { isNetworkName, NetworkName } from "@zetachain/addresses"; + export const SYSTEM_CONTRACT = "0x239e96c8f17C85c30100AC26F635Ea15f23E9c67"; export type ZRC20 = "gETH" | "tBNB" | "tBTC" | "tMATIC"; @@ -8,3 +10,15 @@ export const ZRC20Addresses: Record = { tBTC: "0x48f80608B672DC30DC7e3dbBd0343c5F02C738Eb", tMATIC: "0xd97B1de3619ed2c6BEb3860147E30cA8A7dC9891" }; + +export type SwappableNetwork = Extract; + +export const isSwappableNetwork = (network: string): network is SwappableNetwork => + network === "bitcoin-test" || network === "bsc-testnet" || network === "goerli" || network === "polygon-mumbai"; + +export const ChainToZRC20: Record = { + "bitcoin-test": "tBTC", + "bsc-testnet": "tBNB", + goerli: "gETH", + "polygon-mumbai": "tMATIC" +}; diff --git a/packages/zevm-contracts/scripts/zeta-swap/stress-swap.ts b/packages/zevm-contracts/scripts/zeta-swap/stress-swap.ts new file mode 100644 index 00000000..d76d3c77 --- /dev/null +++ b/packages/zevm-contracts/scripts/zeta-swap/stress-swap.ts @@ -0,0 +1,102 @@ +/* ********************************* */ +/* How to run this script +/* To run this script you have to setup the enviroment (yarn and setup .env) and run this command +/* ZETA_NETWORK=athens npx hardhat run scripts/zeta-swap/stress-swap.ts --network "polygon-mumbai" +/* In the example we use "polygon-mumbai", that's the source network. Can be any valid source network +/* Be sure to have enough gas tokens to pay all the tx +/* This script is to stress the node but it's not optimize for real use. May fail to enquee some tx sometimes but will enquee enough to test +/* ********************************* */ + +import { BigNumber } from "@ethersproject/bignumber"; +import { formatEther, parseEther } from "@ethersproject/units"; +import { SignerWithAddress } from "@nomiclabs/hardhat-ethers/signers"; +import { getAddress } from "@zetachain/addresses"; +import { ethers, network } from "hardhat"; + +import { ChainToZRC20, isSwappableNetwork, SwappableNetwork, ZRC20Addresses } from "../systemConstants"; +import { getSwapData } from "./helpers"; + +interface SwapToChainParams { + destinationNetwork: SwappableNetwork; + nonce: number; + signer: SignerWithAddress; + tssAddress: string; + value: BigNumber; + zetaSwapAddress: string; +} + +const swapToChain = async ({ + zetaSwapAddress, + tssAddress, + signer, + destinationNetwork, + value, + nonce +}: SwapToChainParams) => { + const zrc20 = ChainToZRC20[destinationNetwork]; + const data = getSwapData(zetaSwapAddress, signer.address, ZRC20Addresses[zrc20], BigNumber.from("0")); + const tx = await signer.sendTransaction({ + data, + nonce, + to: tssAddress, + value + }); + console.log(`tx: ${tx.hash}, nonce: ${nonce}, destinationToken: ${destinationNetwork}, value: ${formatEther(value)}`); +}; + +const main = async () => { + if (!isSwappableNetwork(network.name) || !network.name) throw new Error("Invalid network name"); + const swappableNetwork: SwappableNetwork = network.name; + + // @dev: bitcoin is invalid as destination + const invalidDestinations: SwappableNetwork[] = [swappableNetwork, "bitcoin-test"]; + const networks = Object.keys(ChainToZRC20).map(c => c as SwappableNetwork); + + const destinationNetworks = networks.filter(e => !invalidDestinations.includes(e)); + + console.log(`Swapping native token...`); + + const [signer] = await ethers.getSigners(); + + const zetaSwapAddress = getAddress({ + address: "zetaSwap", + networkName: "athens", + zetaNetwork: "athens" + }); + + const tssAddress = getAddress({ + address: "tss", + networkName: network.name, + zetaNetwork: "athens" + }); + + const nonce = await signer.getTransactionCount(); + + const swapsPerNetwork = destinationNetworks.map((destinationNetwork, index) => { + const baseNonce = nonce + index * 5; + const param: SwapToChainParams = { + destinationNetwork, + nonce: baseNonce, + signer, + tssAddress, + value: parseEther("0.002"), + zetaSwapAddress + }; + return [ + swapToChain(param), + swapToChain({ ...param, nonce: baseNonce + 1, value: parseEther("0.002") }), + swapToChain({ ...param, nonce: baseNonce + 2, value: parseEther("0.003") }), + swapToChain({ ...param, nonce: baseNonce + 3, value: parseEther("0.004") }), + swapToChain({ ...param, nonce: baseNonce + 4, value: parseEther("0.005") }) + ]; + }); + + const swaps = swapsPerNetwork.reduce((p, c) => [...p, ...c], []); + + await Promise.all(swaps); +}; + +main().catch(error => { + console.error(error); + process.exit(1); +}); From e7402e3da56662d9d8ddf0d16ef0150f501744a5 Mon Sep 17 00:00:00 2001 From: Andres Martin Aiello <50411235+andresaiello@users.noreply.github.com> Date: Thu, 5 Jan 2023 11:52:35 -0300 Subject: [PATCH 048/115] Write SC for multiple output (#57) * Write SC for multiple output * add test * add multiple output test * refactor using system contarct info * add test * fix v1 swap * comments addressed * rename NoAvailableTransfers * typo --- packages/addresses/src/addresses.mainnet.json | 94 +++++++------- .../multi-output/ZetaMultiOutput.sol | 73 +++++++++++ .../contracts/shared/BytesHelperLib.sol | 22 ++++ .../contracts/shared/SwapHelperLib.sol | 93 ++++++++++++++ .../contracts/shared/TestSystemContract.sol | 54 ++++++++ .../contracts/shared/TestZRC20.sol | 33 +++++ .../contracts/zeta-swap/ZetaSwap.sol | 34 ++--- .../zeta-swap/ZetaSwapBtcInbound.sol | 21 +--- .../zeta-swap/ZetaSwapBtcInboundV2.sol | 32 +++++ .../contracts/zeta-swap/ZetaSwapV2.sol | 31 +++++ .../scripts/zeta-swap/helpers.ts | 19 +++ .../test/MultipleOutput.spec.ts | 111 +++++++++++++++++ packages/zevm-contracts/test/Swap.spec.ts | 117 +++++++++++++++--- packages/zevm-contracts/test/test.helpers.ts | 71 +++++++++++ 14 files changed, 698 insertions(+), 107 deletions(-) create mode 100644 packages/zevm-contracts/contracts/multi-output/ZetaMultiOutput.sol create mode 100644 packages/zevm-contracts/contracts/shared/BytesHelperLib.sol create mode 100644 packages/zevm-contracts/contracts/shared/SwapHelperLib.sol create mode 100644 packages/zevm-contracts/contracts/shared/TestSystemContract.sol create mode 100644 packages/zevm-contracts/contracts/shared/TestZRC20.sol create mode 100644 packages/zevm-contracts/contracts/zeta-swap/ZetaSwapBtcInboundV2.sol create mode 100644 packages/zevm-contracts/contracts/zeta-swap/ZetaSwapV2.sol create mode 100644 packages/zevm-contracts/test/MultipleOutput.spec.ts create mode 100644 packages/zevm-contracts/test/test.helpers.ts diff --git a/packages/addresses/src/addresses.mainnet.json b/packages/addresses/src/addresses.mainnet.json index 1a37d9c3..82bce6ee 100644 --- a/packages/addresses/src/addresses.mainnet.json +++ b/packages/addresses/src/addresses.mainnet.json @@ -1,48 +1,48 @@ { - "eth-mainnet": { - "connector": "", - "crossChainCounter": "", - "crossChainNft": "", - "dai": "0x6b175474e89094c44da98b954eedeac495271d0f", - "multiChainValue": "", - "tss": "", - "tssUpdater": "", - "uniswapV2Router02": "0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D", - "uniswapV3NftManager": "0xC36442b4a4522E871399CD717aBDD847Ab11FE88", - "uniswapV3Quoter": "0xb27308f9F90D607463bb33eA1BeBb41C27CE5AB6", - "uniswapV3Router": "0xE592427A0AEce92De3Edee1F18E0157C05861564", - "usdc": "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48", - "weth9": "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2", - "zetaSwapBtcInbound": "", - "zetaToken": "", - "zetaTokenConsumerUniV2": "", - "immutableCreate2Factory": "", - "multiChainSwapZetaConnector": "", - "multiChainSwap": "", - "uniswapV2Factory": "", - "zetaSwap": "" - }, - "klaytn-cypress": { - "connector": "", - "crossChainCounter": "", - "crossChainNft": "", - "dai": "", - "multiChainValue": "", - "tss": "", - "tssUpdater": "", - "uniswapV2Router02": "", - "uniswapV3NftManager": "", - "uniswapV3Quoter": "", - "uniswapV3Router": "", - "usdc": "", - "weth9": "", - "zetaSwapBtcInbound": "", - "zetaToken": "", - "zetaTokenConsumerUniV2": "", - "immutableCreate2Factory": "", - "multiChainSwapZetaConnector": "", - "multiChainSwap": "", - "uniswapV2Factory": "", - "zetaSwap": "" - } -} \ No newline at end of file + "eth-mainnet": { + "connector": "", + "crossChainCounter": "", + "crossChainNft": "", + "dai": "0x6b175474e89094c44da98b954eedeac495271d0f", + "multiChainValue": "", + "tss": "", + "tssUpdater": "", + "uniswapV2Router02": "0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D", + "uniswapV3NftManager": "0xC36442b4a4522E871399CD717aBDD847Ab11FE88", + "uniswapV3Quoter": "0xb27308f9F90D607463bb33eA1BeBb41C27CE5AB6", + "uniswapV3Router": "0xE592427A0AEce92De3Edee1F18E0157C05861564", + "usdc": "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48", + "weth9": "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2", + "zetaSwapBtcInbound": "", + "zetaToken": "", + "zetaTokenConsumerUniV2": "", + "immutableCreate2Factory": "", + "multiChainSwapZetaConnector": "", + "multiChainSwap": "", + "uniswapV2Factory": "0x5C69bEe701ef814a2B6a3EDD4B1652CB9cc5aA6f", + "zetaSwap": "" + }, + "klaytn-cypress": { + "connector": "", + "crossChainCounter": "", + "crossChainNft": "", + "dai": "", + "multiChainValue": "", + "tss": "", + "tssUpdater": "", + "uniswapV2Router02": "", + "uniswapV3NftManager": "", + "uniswapV3Quoter": "", + "uniswapV3Router": "", + "usdc": "", + "weth9": "", + "zetaSwapBtcInbound": "", + "zetaToken": "", + "zetaTokenConsumerUniV2": "", + "immutableCreate2Factory": "", + "multiChainSwapZetaConnector": "", + "multiChainSwap": "", + "uniswapV2Factory": "", + "zetaSwap": "" + } +} diff --git a/packages/zevm-contracts/contracts/multi-output/ZetaMultiOutput.sol b/packages/zevm-contracts/contracts/multi-output/ZetaMultiOutput.sol new file mode 100644 index 00000000..918a5c76 --- /dev/null +++ b/packages/zevm-contracts/contracts/multi-output/ZetaMultiOutput.sol @@ -0,0 +1,73 @@ +// SPDX-License-Identifier: MIT +pragma solidity 0.8.7; + +import "@openzeppelin/contracts/access/Ownable.sol"; +import "../system/SystemContract.sol"; +import "../interfaces/IZRC20.sol"; +import "../interfaces/zContract.sol"; +import "../shared/BytesHelperLib.sol"; +import "../shared/SwapHelperLib.sol"; + +interface ZetaMultiOutputErrors { + error NoAvailableTransfers(); +} + +contract ZetaMultiOutput is zContract, Ownable, ZetaMultiOutputErrors { + SystemContract public immutable systemContract; + address[] public destinationTokens; + + event DestinationRegistered(address); + event Withdrawal(address, uint256, address); + + constructor(address systemContractAddress) { + systemContract = SystemContract(systemContractAddress); + } + + function registerDestinationToken(address destinationToken) external onlyOwner { + destinationTokens.push(destinationToken); + emit DestinationRegistered(destinationToken); + } + + function _getTotalTransfers(address zrc20) internal view returns (uint256) { + uint256 total = 0; + for (uint256 i; i < destinationTokens.length; i++) { + if (destinationTokens[i] == zrc20) continue; + total++; + } + + return total; + } + + function onCrossChainCall(address zrc20, uint256 amount, bytes calldata message) external virtual override { + if (_getTotalTransfers(zrc20) == 0) revert NoAvailableTransfers(); + + address receipient = BytesHelperLib.bytesToAddress(message, 0); + uint256 amountToTransfer = amount / _getTotalTransfers(zrc20); + uint256 leftOver = amount - amountToTransfer * _getTotalTransfers(zrc20); + + uint256 lastTransferIndex = destinationTokens[destinationTokens.length - 1] == zrc20 + ? destinationTokens.length - 2 + : destinationTokens.length - 1; + + for (uint256 i; i < destinationTokens.length; i++) { + address targetZRC20 = destinationTokens[i]; + if (targetZRC20 == zrc20) continue; + + if (lastTransferIndex == i) { + amountToTransfer += leftOver; + } + + uint256 outputAmount = SwapHelperLib._doSwap( + systemContract.wZetaContractAddress(), + systemContract.uniswapv2FactoryAddress(), + systemContract.uniswapv2Router02Address(), + zrc20, + amountToTransfer, + targetZRC20, + 0 + ); + SwapHelperLib._doWithdrawal(targetZRC20, outputAmount, BytesHelperLib.addressToBytes(receipient)); + emit Withdrawal(targetZRC20, outputAmount, receipient); + } + } +} diff --git a/packages/zevm-contracts/contracts/shared/BytesHelperLib.sol b/packages/zevm-contracts/contracts/shared/BytesHelperLib.sol new file mode 100644 index 00000000..122de889 --- /dev/null +++ b/packages/zevm-contracts/contracts/shared/BytesHelperLib.sol @@ -0,0 +1,22 @@ +// SPDX-License-Identifier: UNLICENSED +pragma solidity =0.8.7; + +library BytesHelperLib { + function bytesToAddress(bytes calldata data, uint256 offset) internal pure returns (address output) { + bytes memory b = data[offset:offset + 20]; + assembly { + output := mload(add(b, 20)) + } + } + + function bytesToUint32(bytes calldata data, uint256 offset) internal pure returns (uint32 output) { + bytes memory b = data[offset:offset + 4]; + assembly { + output := mload(add(b, 4)) + } + } + + function addressToBytes(address someAddress) internal pure returns (bytes32) { + return bytes32(uint256(uint160(someAddress))); + } +} diff --git a/packages/zevm-contracts/contracts/shared/SwapHelperLib.sol b/packages/zevm-contracts/contracts/shared/SwapHelperLib.sol new file mode 100644 index 00000000..55ed16c8 --- /dev/null +++ b/packages/zevm-contracts/contracts/shared/SwapHelperLib.sol @@ -0,0 +1,93 @@ +// SPDX-License-Identifier: UNLICENSED +pragma solidity =0.8.7; + +import "@uniswap/v2-periphery/contracts/interfaces/IUniswapV2Router02.sol"; +import "@uniswap/v2-periphery/contracts/interfaces/IUniswapV2Router01.sol"; +import "../interfaces/IZRC20.sol"; + +library SwapHelperLib { + uint16 internal constant MAX_DEADLINE = 200; + + error WrongGasContract(); + + error NotEnoughToPayGasFee(); + + error CantBeIdenticalAddresses(); + + error CantBeZeroAddress(); + + // returns sorted token addresses, used to handle return values from pairs sorted in this order + function sortTokens(address tokenA, address tokenB) internal pure returns (address token0, address token1) { + if (tokenA == tokenB) revert CantBeIdenticalAddresses(); + (token0, token1) = tokenA < tokenB ? (tokenA, tokenB) : (tokenB, tokenA); + if (token0 == address(0)) revert CantBeZeroAddress(); + } + + // calculates the CREATE2 address for a pair without making any external calls + function uniswapv2PairFor(address factory, address tokenA, address tokenB) public pure returns (address pair) { + (address token0, address token1) = sortTokens(tokenA, tokenB); + pair = address( + uint160( + uint256( + keccak256( + abi.encodePacked( + hex"ff", + factory, + keccak256(abi.encodePacked(token0, token1)), + hex"96e8ac4277198ff8b6f785478aa9a39f403cb768dd02cbee326c3e7da348845f" // init code hash + ) + ) + ) + ) + ); + } + + function _doWithdrawal(address targetZRC20, uint256 amount, bytes32 receipient) internal { + (address gasZRC20, uint256 gasFee) = IZRC20(targetZRC20).withdrawGasFee(); + + if (gasZRC20 != targetZRC20) revert WrongGasContract(); + if (gasFee >= amount) revert NotEnoughToPayGasFee(); + + IZRC20(targetZRC20).approve(targetZRC20, gasFee); + IZRC20(targetZRC20).withdraw(abi.encodePacked(receipient), amount - gasFee); + } + + function _existsPairPool(address uniswapV2Factory, address zrc20A, address zrc20B) internal view returns (bool) { + address uniswapPool = uniswapv2PairFor(uniswapV2Factory, zrc20A, zrc20B); + return IZRC20(zrc20A).balanceOf(uniswapPool) > 0 && IZRC20(zrc20B).balanceOf(uniswapPool) > 0; + } + + function _doSwap( + address zetaToken, + address uniswapV2Factory, + address uniswapV2Router, + address zrc20, + uint256 amount, + address targetZRC20, + uint256 minAmountOut + ) internal returns (uint256) { + bool existsPairPool = _existsPairPool(uniswapV2Factory, zrc20, targetZRC20); + + address[] memory path; + if (existsPairPool) { + path = new address[](2); + path[0] = zrc20; + path[1] = targetZRC20; + } else { + path = new address[](3); + path[0] = zrc20; + path[1] = zetaToken; + path[2] = targetZRC20; + } + + IZRC20(zrc20).approve(address(uniswapV2Router), amount); + uint256[] memory amounts = IUniswapV2Router01(uniswapV2Router).swapExactTokensForTokens( + amount, + minAmountOut, + path, + address(this), + block.timestamp + MAX_DEADLINE + ); + return amounts[path.length - 1]; + } +} diff --git a/packages/zevm-contracts/contracts/shared/TestSystemContract.sol b/packages/zevm-contracts/contracts/shared/TestSystemContract.sol new file mode 100644 index 00000000..ccb5a1e7 --- /dev/null +++ b/packages/zevm-contracts/contracts/shared/TestSystemContract.sol @@ -0,0 +1,54 @@ +// SPDX-License-Identifier: MIT +pragma solidity 0.8.7; + +import "../interfaces/zContract.sol"; +import "../interfaces/IZRC20.sol"; + +interface SystemContractErrors { + error CallerIsNotFungibleModule(); + + error InvalidTarget(); + + error CantBeIdenticalAddresses(); + + error CantBeZeroAddress(); +} + +contract TestSystemContract is SystemContractErrors { + mapping(uint256 => uint256) public gasPriceByChainId; + mapping(uint256 => address) public gasCoinZRC20ByChainId; + mapping(uint256 => address) public gasZetaPoolByChainId; + + address public wZetaContractAddress; + address public uniswapv2FactoryAddress; + address public uniswapv2Router02Address; + + event SystemContractDeployed(); + event SetGasPrice(uint256, uint256); + event SetGasCoin(uint256, address); + event SetGasZetaPool(uint256, address); + event SetWZeta(address); + + constructor(address wzeta_, address uniswapv2Factory_, address uniswapv2Router02_) { + wZetaContractAddress = wzeta_; + uniswapv2FactoryAddress = uniswapv2Factory_; + uniswapv2Router02Address = uniswapv2Router02_; + emit SystemContractDeployed(); + } + + // fungible module updates the gas price oracle periodically + function setGasPrice(uint256 chainID, uint256 price) external { + gasPriceByChainId[chainID] = price; + emit SetGasPrice(chainID, price); + } + + function setGasCoinZRC20(uint256 chainID, address zrc20) external { + gasCoinZRC20ByChainId[chainID] = zrc20; + emit SetGasCoin(chainID, zrc20); + } + + function setWZETAContractAddress(address addr) external { + wZetaContractAddress = addr; + emit SetWZeta(wZetaContractAddress); + } +} diff --git a/packages/zevm-contracts/contracts/shared/TestZRC20.sol b/packages/zevm-contracts/contracts/shared/TestZRC20.sol new file mode 100644 index 00000000..1d3ef364 --- /dev/null +++ b/packages/zevm-contracts/contracts/shared/TestZRC20.sol @@ -0,0 +1,33 @@ +// SPDX-License-Identifier: MIT +pragma solidity =0.8.7; + +import "@openzeppelin/contracts/token/ERC20/ERC20.sol"; +import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; + +import "./BytesHelperLib.sol"; + +contract TestZRC20 is ERC20 { + constructor(uint256 initialSupply, string memory name, string memory symbol) ERC20(name, symbol) { + _mint(msg.sender, initialSupply * (10 ** uint256(decimals()))); + } + + function deposit(address to, uint256 amount) external returns (bool) { + return true; + } + + function bytesToAddress(bytes calldata data, uint256 offset, uint256 size) public pure returns (address output) { + bytes memory b = data[offset:offset + size]; + assembly { + output := mload(add(b, size)) + } + } + + function withdraw(bytes calldata to, uint256 amount) external returns (bool) { + address toAddress = BytesHelperLib.bytesToAddress(to, 12); + return transfer(toAddress, amount); + } + + function withdrawGasFee() external view returns (address, uint256) { + return (address(this), 0); + } +} diff --git a/packages/zevm-contracts/contracts/zeta-swap/ZetaSwap.sol b/packages/zevm-contracts/contracts/zeta-swap/ZetaSwap.sol index c3208b1b..b37c4cc7 100644 --- a/packages/zevm-contracts/contracts/zeta-swap/ZetaSwap.sol +++ b/packages/zevm-contracts/contracts/zeta-swap/ZetaSwap.sol @@ -20,11 +20,13 @@ interface ZetaSwapErrors { contract ZetaSwap is zContract, ZetaSwapErrors { uint16 internal constant MAX_DEADLINE = 200; - address public zetaToken; + address public immutable zetaToken; + address public immutable uniswapV2Factory; address public immutable uniswapV2Router; - constructor(address zetaToken_, address uniswapV2Router_) { + constructor(address zetaToken_, address uniswapV2Factory_, address uniswapV2Router_) { zetaToken = zetaToken_; + uniswapV2Factory = uniswapV2Factory_; uniswapV2Router = uniswapV2Router_; } @@ -36,11 +38,7 @@ contract ZetaSwap is zContract, ZetaSwapErrors { } // calculates the CREATE2 address for a pair without making any external calls - function uniswapv2PairFor( - address factory, - address tokenA, - address tokenB - ) public pure returns (address pair) { + function uniswapv2PairFor(address factory, address tokenA, address tokenB) public pure returns (address pair) { (address token0, address token1) = sortTokens(tokenA, tokenB); pair = address( uint160( @@ -58,19 +56,11 @@ contract ZetaSwap is zContract, ZetaSwapErrors { ); } - function encode( - address zrc20, - address recipient, - uint256 minAmountOut - ) public pure returns (bytes memory) { + function encode(address zrc20, address recipient, uint256 minAmountOut) public pure returns (bytes memory) { return abi.encode(zrc20, recipient, minAmountOut); } - function _doWithdrawal( - address targetZRC20, - uint256 amount, - bytes32 receipient - ) private { + function _doWithdrawal(address targetZRC20, uint256 amount, bytes32 receipient) private { (address gasZRC20, uint256 gasFee) = IZRC20(targetZRC20).withdrawGasFee(); if (gasZRC20 != targetZRC20) revert WrongGasContract(); @@ -81,7 +71,7 @@ contract ZetaSwap is zContract, ZetaSwapErrors { } function _existsPairPool(address zrc20A, address zrc20B) private view returns (bool) { - address uniswapPool = uniswapv2PairFor(uniswapV2Router, zrc20A, zrc20B); + address uniswapPool = uniswapv2PairFor(uniswapV2Factory, zrc20A, zrc20B); return IZRC20(zrc20A).balanceOf(uniswapPool) > 0 && IZRC20(zrc20B).balanceOf(uniswapPool) > 0; } @@ -92,7 +82,7 @@ contract ZetaSwap is zContract, ZetaSwapErrors { bytes32 receipient, uint256 minAmountOut ) internal { - bool existsPairPool = _existsPairPool(zrc20, zetaToken); + bool existsPairPool = _existsPairPool(zrc20, targetZRC20); address[] memory path; if (existsPairPool) { @@ -117,11 +107,7 @@ contract ZetaSwap is zContract, ZetaSwapErrors { _doWithdrawal(targetZRC20, amounts[path.length - 1], receipient); } - function onCrossChainCall( - address zrc20, - uint256 amount, - bytes calldata message - ) external virtual override { + function onCrossChainCall(address zrc20, uint256 amount, bytes calldata message) external virtual override { (address targetZRC20, bytes32 receipient, uint256 minAmountOut) = abi.decode( message, (address, bytes32, uint256) diff --git a/packages/zevm-contracts/contracts/zeta-swap/ZetaSwapBtcInbound.sol b/packages/zevm-contracts/contracts/zeta-swap/ZetaSwapBtcInbound.sol index cf50848a..8b0cfb62 100644 --- a/packages/zevm-contracts/contracts/zeta-swap/ZetaSwapBtcInbound.sol +++ b/packages/zevm-contracts/contracts/zeta-swap/ZetaSwapBtcInbound.sol @@ -9,39 +9,28 @@ contract ZetaSwapBtcInbound is ZetaSwap { constructor( address zetaToken_, + address uniswapV2Factory_, address uniswapV2Router_, address systemContractAddress_ - ) ZetaSwap(zetaToken_, uniswapV2Router_) { + ) ZetaSwap(zetaToken_, uniswapV2Factory_, uniswapV2Router_) { systemContractAddress = systemContractAddress_; } - function bytesToAddress( - bytes calldata data, - uint256 offset, - uint256 size - ) private pure returns (address output) { + function bytesToAddress(bytes calldata data, uint256 offset, uint256 size) private pure returns (address output) { bytes memory b = data[offset:offset + size]; assembly { output := mload(add(b, size)) } } - function bytesToUint32( - bytes calldata data, - uint256 offset, - uint256 size - ) private pure returns (uint32 output) { + function bytesToUint32(bytes calldata data, uint256 offset, uint256 size) private pure returns (uint32 output) { bytes memory b = data[offset:offset + size]; assembly { output := mload(add(b, size)) } } - function onCrossChainCall( - address zrc20, - uint256 amount, - bytes calldata message - ) external override { + function onCrossChainCall(address zrc20, uint256 amount, bytes calldata message) external override { address receipient = bytesToAddress(message, 0, 20); uint32 targetZRC20ChainId = bytesToUint32(message, 20, 4); address targetZRC20 = SystemContract(systemContractAddress).gasCoinZRC20ByChainId(targetZRC20ChainId); diff --git a/packages/zevm-contracts/contracts/zeta-swap/ZetaSwapBtcInboundV2.sol b/packages/zevm-contracts/contracts/zeta-swap/ZetaSwapBtcInboundV2.sol new file mode 100644 index 00000000..9a857782 --- /dev/null +++ b/packages/zevm-contracts/contracts/zeta-swap/ZetaSwapBtcInboundV2.sol @@ -0,0 +1,32 @@ +// SPDX-License-Identifier: MIT +pragma solidity 0.8.7; + +import "../system/SystemContract.sol"; +import "../interfaces/zContract.sol"; +import "../shared/BytesHelperLib.sol"; +import "../shared/SwapHelperLib.sol"; + +contract ZetaSwapBtcInboundV2 { + SystemContract public immutable systemContract; + + constructor(address systemContractAddress) { + systemContract = SystemContract(systemContractAddress); + } + + function onCrossChainCall(address zrc20, uint256 amount, bytes calldata message) external { + address receipient = BytesHelperLib.bytesToAddress(message, 0); + uint32 targetZRC20ChainId = BytesHelperLib.bytesToUint32(message, 20); + address targetZRC20 = systemContract.gasCoinZRC20ByChainId(targetZRC20ChainId); + + uint256 outputAmount = SwapHelperLib._doSwap( + systemContract.wZetaContractAddress(), + systemContract.uniswapv2FactoryAddress(), + systemContract.uniswapv2Router02Address(), + zrc20, + amount, + targetZRC20, + 0 + ); + SwapHelperLib._doWithdrawal(targetZRC20, outputAmount, BytesHelperLib.addressToBytes(receipient)); + } +} diff --git a/packages/zevm-contracts/contracts/zeta-swap/ZetaSwapV2.sol b/packages/zevm-contracts/contracts/zeta-swap/ZetaSwapV2.sol new file mode 100644 index 00000000..a7617865 --- /dev/null +++ b/packages/zevm-contracts/contracts/zeta-swap/ZetaSwapV2.sol @@ -0,0 +1,31 @@ +// SPDX-License-Identifier: MIT +pragma solidity 0.8.7; + +import "../system/SystemContract.sol"; +import "../interfaces/zContract.sol"; +import "../shared/SwapHelperLib.sol"; + +contract ZetaSwapV2 is zContract { + SystemContract public immutable systemContract; + + constructor(address systemContractAddress) { + systemContract = SystemContract(systemContractAddress); + } + + function onCrossChainCall(address zrc20, uint256 amount, bytes calldata message) external virtual override { + (address targetZRC20, bytes32 receipient, uint256 minAmountOut) = abi.decode( + message, + (address, bytes32, uint256) + ); + uint256 outputAmount = SwapHelperLib._doSwap( + systemContract.wZetaContractAddress(), + systemContract.uniswapv2FactoryAddress(), + systemContract.uniswapv2Router02Address(), + zrc20, + amount, + targetZRC20, + minAmountOut + ); + SwapHelperLib._doWithdrawal(targetZRC20, outputAmount, receipient); + } +} diff --git a/packages/zevm-contracts/scripts/zeta-swap/helpers.ts b/packages/zevm-contracts/scripts/zeta-swap/helpers.ts index 8e76e790..e2312576 100644 --- a/packages/zevm-contracts/scripts/zeta-swap/helpers.ts +++ b/packages/zevm-contracts/scripts/zeta-swap/helpers.ts @@ -1,4 +1,5 @@ import { BigNumber } from "@ethersproject/bignumber"; +import { HashZero } from "@ethersproject/constants"; import { ethers } from "hardhat"; export const encodeParams = (dataTypes: any[], data: any[]) => { @@ -27,3 +28,21 @@ export const getBitcoinTxMemo = (zetaSwapAddress: string, destinationAddress: st const rawMemo = `${zetaSwapAddress}${destinationAddress.slice(2)}${paddedHexChainId}`; return ethers.utils.base64.encode(rawMemo); }; + +export const getBitcoinTxMemoForTest = (destinationAddress: string, chainId: string) => { + const paddedHexChainId = ethers.utils + .hexlify(Number(chainId)) + .slice(2) + .padStart(8, "0"); + const rawMemo = `${destinationAddress.slice(2)}${paddedHexChainId}`; + + const paddedMemo = rawMemo.padEnd(HashZero.length - 2, "0"); + return `0x${paddedMemo}`; +}; + +export const getMultiOutputForTest = (destinationAddress: string) => { + const rawMemo = `${destinationAddress.slice(2)}`; + + const paddedMemo = rawMemo.padEnd(HashZero.length - 2, "0"); + return `0x${paddedMemo}`; +}; diff --git a/packages/zevm-contracts/test/MultipleOutput.spec.ts b/packages/zevm-contracts/test/MultipleOutput.spec.ts new file mode 100644 index 00000000..99fd902a --- /dev/null +++ b/packages/zevm-contracts/test/MultipleOutput.spec.ts @@ -0,0 +1,111 @@ +import { parseUnits } from "@ethersproject/units"; +import { SignerWithAddress } from "@nomiclabs/hardhat-ethers/signers"; +import { getAddress as getAddressLib } from "@zetachain/addresses"; +import { expect } from "chai"; +import { ethers, network } from "hardhat"; + +import { getMultiOutputForTest } from "../scripts/zeta-swap/helpers"; +import { TestSystemContract, TestZRC20, ZetaMultiOutput, ZetaMultiOutput__factory } from "../typechain-types"; +import { evmSetup } from "./test.helpers"; + +describe("ZetaSwap tests", () => { + let zetaMultiOutputContract: ZetaMultiOutput; + let ZRC20Contracts: TestZRC20[]; + let systemContract: TestSystemContract; + + let accounts: SignerWithAddress[]; + let deployer: SignerWithAddress; + + beforeEach(async () => { + accounts = await ethers.getSigners(); + [deployer] = accounts; + + await network.provider.send("hardhat_setBalance", [deployer.address, parseUnits("1000000").toHexString()]); + + const uniswapRouterAddr = getAddressLib({ + address: "uniswapV2Router02", + networkName: "eth-mainnet", + zetaNetwork: "mainnet" + }); + + const uniswapFactoryAddr = getAddressLib({ + address: "uniswapV2Factory", + networkName: "eth-mainnet", + zetaNetwork: "mainnet" + }); + + const wGasToken = getAddressLib({ + address: "weth9", + networkName: "eth-mainnet", + zetaNetwork: "mainnet" + }); + + const evmSetupResult = await evmSetup(wGasToken, uniswapFactoryAddr, uniswapRouterAddr); + ZRC20Contracts = evmSetupResult.ZRC20Contracts; + systemContract = evmSetupResult.systemContract; + + const Factory = (await ethers.getContractFactory("ZetaMultiOutput")) as ZetaMultiOutput__factory; + zetaMultiOutputContract = (await Factory.deploy(systemContract.address)) as ZetaMultiOutput; + await zetaMultiOutputContract.deployed(); + + zetaMultiOutputContract.registerDestinationToken(ZRC20Contracts[0].address); + zetaMultiOutputContract.registerDestinationToken(ZRC20Contracts[1].address); + zetaMultiOutputContract.registerDestinationToken(ZRC20Contracts[2].address); + }); + + describe("ZetaMultiOutput", () => { + it("Should do transfers", async () => { + const initBalanceToken0 = await ZRC20Contracts[0].balanceOf(deployer.address); + const initBalanceToken1 = await ZRC20Contracts[1].balanceOf(deployer.address); + const initBalanceToken2 = await ZRC20Contracts[2].balanceOf(deployer.address); + + const amount = parseUnits("10"); + await ZRC20Contracts[0].transfer(zetaMultiOutputContract.address, amount); + + const params = getMultiOutputForTest(deployer.address); + await zetaMultiOutputContract.onCrossChainCall(ZRC20Contracts[0].address, amount, params); + + const endBalanceToken0 = await ZRC20Contracts[0].balanceOf(deployer.address); + const endBalanceToken1 = await ZRC20Contracts[1].balanceOf(deployer.address); + const endBalanceToken2 = await ZRC20Contracts[2].balanceOf(deployer.address); + + expect(endBalanceToken0).to.be.eq(initBalanceToken0.sub(amount)); + expect(endBalanceToken1).to.be.gt(initBalanceToken1); + expect(endBalanceToken2).to.be.gt(initBalanceToken2); + }); + + it("Should throw error if no owner try to register chain", async () => { + const zetaMultiOutputContractOtherUser = zetaMultiOutputContract.connect(accounts[1]); + await expect(zetaMultiOutputContractOtherUser.registerDestinationToken(ZRC20Contracts[2].address)).to.be.reverted; + }); + + it("Should throw error if there's no destination registered", async () => { + const Factory = (await ethers.getContractFactory("ZetaMultiOutput")) as ZetaMultiOutput__factory; + zetaMultiOutputContract = (await Factory.deploy(systemContract.address)) as ZetaMultiOutput; + await zetaMultiOutputContract.deployed(); + + const amount = parseUnits("10"); + await ZRC20Contracts[0].transfer(zetaMultiOutputContract.address, amount); + + const params = getMultiOutputForTest(deployer.address); + await expect( + zetaMultiOutputContract.onCrossChainCall(ZRC20Contracts[0].address, amount, params) + ).to.be.revertedWith("NoAvailableTransfers()"); + }); + + it("Should throw error if there's no transfer to do", async () => { + const Factory = (await ethers.getContractFactory("ZetaMultiOutput")) as ZetaMultiOutput__factory; + zetaMultiOutputContract = (await Factory.deploy(systemContract.address)) as ZetaMultiOutput; + await zetaMultiOutputContract.deployed(); + zetaMultiOutputContract.registerDestinationToken(ZRC20Contracts[0].address); + + const amount = parseUnits("10"); + await ZRC20Contracts[0].transfer(zetaMultiOutputContract.address, amount); + + const params = getMultiOutputForTest(deployer.address); + await expect( + zetaMultiOutputContract.onCrossChainCall(ZRC20Contracts[0].address, amount, params) + ).to.be.revertedWith("NoAvailableTransfers()"); + }); + }); +}); diff --git a/packages/zevm-contracts/test/Swap.spec.ts b/packages/zevm-contracts/test/Swap.spec.ts index 8bf4965e..3f9111d9 100644 --- a/packages/zevm-contracts/test/Swap.spec.ts +++ b/packages/zevm-contracts/test/Swap.spec.ts @@ -1,18 +1,32 @@ import { BigNumber } from "@ethersproject/bignumber"; +import { parseUnits } from "@ethersproject/units"; import { SignerWithAddress } from "@nomiclabs/hardhat-ethers/signers"; import { getAddress as getAddressLib } from "@zetachain/addresses"; import { expect } from "chai"; -import { utils } from "ethers"; -import { ethers } from "hardhat"; +import { ethers, network } from "hardhat"; -import { encodeParams, getBitcoinTxMemo, getSwapBTCInboundData, getSwapParams } from "../scripts/zeta-swap/helpers"; -import { ZetaSwap, ZetaSwap__factory, ZetaSwapBtcInbound, ZetaSwapBtcInbound__factory } from "../typechain-types"; -import { ZetaSwapBTC } from "../typechain-types/contracts/zeta-swap/ZetaSwapBTC"; -import { ZetaSwapBTC__factory } from "../typechain-types/factories/contracts/zeta-swap/ZetaSwapBTC__factory"; +import { getBitcoinTxMemoForTest, getSwapParams } from "../scripts/zeta-swap/helpers"; +import { + TestSystemContract, + TestZRC20, + ZetaSwap, + ZetaSwap__factory, + ZetaSwapBtcInbound, + ZetaSwapBtcInbound__factory, + ZetaSwapBtcInboundV2, + ZetaSwapBtcInboundV2__factory, + ZetaSwapV2, + ZetaSwapV2__factory +} from "../typechain-types"; +import { evmSetup } from "./test.helpers"; describe("ZetaSwap tests", () => { let zetaSwapContract: ZetaSwap; - let zetaSwapBTCContract: ZetaSwapBTC; + let zetaSwapV2Contract: ZetaSwapV2; + let zetaSwapBTCContract: ZetaSwapBtcInbound; + let zetaSwapBTCV2Contract: ZetaSwapBtcInboundV2; + let ZRC20Contracts: TestZRC20[]; + let systemContract: TestSystemContract; let accounts: SignerWithAddress[]; let deployer: SignerWithAddress; @@ -20,47 +34,110 @@ describe("ZetaSwap tests", () => { beforeEach(async () => { accounts = await ethers.getSigners(); [deployer] = accounts; + + await network.provider.send("hardhat_setBalance", [deployer.address, parseUnits("1000000").toHexString()]); + const uniswapRouterAddr = getAddressLib({ address: "uniswapV2Router02", networkName: "eth-mainnet", zetaNetwork: "mainnet" }); + + const uniswapFactoryAddr = getAddressLib({ + address: "uniswapV2Factory", + networkName: "eth-mainnet", + zetaNetwork: "mainnet" + }); + const wGasToken = getAddressLib({ address: "weth9", networkName: "eth-mainnet", zetaNetwork: "mainnet" }); - const Factory = (await ethers.getContractFactory("ZetaSwap")) as ZetaSwap__factory; - zetaSwapContract = (await Factory.deploy(wGasToken, uniswapRouterAddr)) as ZetaSwap; + const evmSetupResult = await evmSetup(wGasToken, uniswapFactoryAddr, uniswapRouterAddr); + ZRC20Contracts = evmSetupResult.ZRC20Contracts; + systemContract = evmSetupResult.systemContract; + + const FactorySwap = (await ethers.getContractFactory("ZetaSwap")) as ZetaSwap__factory; + zetaSwapContract = (await FactorySwap.deploy(wGasToken, uniswapFactoryAddr, uniswapRouterAddr)) as ZetaSwap; await zetaSwapContract.deployed(); + const FactorySwapV2 = (await ethers.getContractFactory("ZetaSwapV2")) as ZetaSwapV2__factory; + zetaSwapV2Contract = (await FactorySwapV2.deploy(systemContract.address)) as ZetaSwapV2; + await zetaSwapV2Contract.deployed(); + const FactoryBTC = (await ethers.getContractFactory("ZetaSwapBtcInbound")) as ZetaSwapBtcInbound__factory; - zetaSwapBTCContract = (await FactoryBTC.deploy(wGasToken, uniswapRouterAddr)) as ZetaSwapBtcInbound; + zetaSwapBTCContract = (await FactoryBTC.deploy( + wGasToken, + uniswapFactoryAddr, + uniswapRouterAddr, + systemContract.address + )) as ZetaSwapBtcInbound; await zetaSwapBTCContract.deployed(); + + const FactoryBTCV2 = (await ethers.getContractFactory("ZetaSwapBtcInboundV2")) as ZetaSwapBtcInboundV2__factory; + zetaSwapBTCV2Contract = (await FactoryBTCV2.deploy(systemContract.address)) as ZetaSwapBtcInboundV2; + await zetaSwapBTCV2Contract.deployed(); }); describe("zetaSwap", () => { it("Should do swap", async () => { - //@todo: add test + const amount = parseUnits("10"); + await ZRC20Contracts[0].transfer(zetaSwapContract.address, amount); + + const initBalance = await ZRC20Contracts[1].balanceOf(deployer.address); + + const params = getSwapParams(deployer.address, ZRC20Contracts[1].address, BigNumber.from(0)); + await zetaSwapContract.onCrossChainCall(ZRC20Contracts[0].address, amount, params); + + const endBalance = await ZRC20Contracts[1].balanceOf(deployer.address); + await expect(endBalance).to.be.gt(initBalance); + }); + }); + + describe("zetaSwapV2", () => { + it("Should do swap", async () => { + const amount = parseUnits("10"); + await ZRC20Contracts[0].transfer(zetaSwapV2Contract.address, amount); - const fakeZRC20 = accounts[1]; - const fakeZRC20Destination = accounts[2]; + const initBalance = await ZRC20Contracts[1].balanceOf(deployer.address); - const params = getSwapParams(fakeZRC20Destination.address, deployer.address, BigNumber.from("10")); - await zetaSwapContract.onCrossChainCall(fakeZRC20.address, 0, params); + const params = getSwapParams(deployer.address, ZRC20Contracts[1].address, BigNumber.from(0)); + await zetaSwapV2Contract.onCrossChainCall(ZRC20Contracts[0].address, amount, params); + + const endBalance = await ZRC20Contracts[1].balanceOf(deployer.address); + expect(endBalance).to.be.gt(initBalance); }); }); describe("zetaSwapBTC", () => { it("Should do swap", async () => { - //@todo: add test + const amount = parseUnits("1"); + await ZRC20Contracts[0].transfer(zetaSwapBTCContract.address, amount); + + const initBalance = await ZRC20Contracts[1].balanceOf(deployer.address); + + const params = getBitcoinTxMemoForTest(deployer.address, "5"); + await zetaSwapBTCContract.onCrossChainCall(ZRC20Contracts[0].address, amount, params); + + const endBalance = await ZRC20Contracts[1].balanceOf(deployer.address); + expect(endBalance).to.be.gt(initBalance); + }); + }); + + describe("zetaSwapBTCV2", () => { + it("Should do swap", async () => { + const amount = parseUnits("1"); + await ZRC20Contracts[0].transfer(zetaSwapBTCV2Contract.address, amount); + + const initBalance = await ZRC20Contracts[1].balanceOf(deployer.address); - const fakeZRC20 = accounts[1]; - const fakeZRC20Destination = accounts[2]; + const params = getBitcoinTxMemoForTest(deployer.address, "5"); + await zetaSwapBTCV2Contract.onCrossChainCall(ZRC20Contracts[0].address, amount, params); - const params = getBitcoinTxMemo("", fakeZRC20Destination.address, "5"); - await zetaSwapBTCContract.onCrossChainCall(fakeZRC20.address, 0, params); + const endBalance = await ZRC20Contracts[1].balanceOf(deployer.address); + expect(endBalance).to.be.gt(initBalance); }); }); }); diff --git a/packages/zevm-contracts/test/test.helpers.ts b/packages/zevm-contracts/test/test.helpers.ts new file mode 100644 index 00000000..b6a98e96 --- /dev/null +++ b/packages/zevm-contracts/test/test.helpers.ts @@ -0,0 +1,71 @@ +import { MaxUint256 } from "@ethersproject/constants"; +import { parseUnits } from "@ethersproject/units"; +import { SignerWithAddress } from "@nomiclabs/hardhat-ethers/signers"; +import { ethers } from "hardhat"; + +import { + TestSystemContract, + TestSystemContract__factory, + TestZRC20, + TestZRC20__factory, + UniswapV2Router02__factory +} from "../typechain-types"; + +const addZetaEthLiquidity = async (signer: SignerWithAddress, token: TestZRC20, uniswapRouterAddr: string) => { + const block = await ethers.provider.getBlock("latest"); + + const tx1 = await token.approve(uniswapRouterAddr, MaxUint256); + await tx1.wait(); + + const uniswapRouterFork = UniswapV2Router02__factory.connect(uniswapRouterAddr, signer); + + const tx2 = await uniswapRouterFork.addLiquidityETH( + token.address, + parseUnits("1000"), + 0, + 0, + signer.address, + block.timestamp + 360, + { value: parseUnits("1000") } + ); + await tx2.wait(); +}; + +interface EvmSetupResult { + ZRC20Contracts: TestZRC20[]; + systemContract: TestSystemContract; +} + +export const evmSetup = async ( + wGasToken: string, + uniswapFactoryAddr: string, + uniswapRouterAddr: string +): Promise => { + const [signer] = await ethers.getSigners(); + + const ZRC20Factory = (await ethers.getContractFactory("TestZRC20")) as TestZRC20__factory; + + const token1Contract = (await ZRC20Factory.deploy(parseUnits("1000000"), "tBNB", "tBNB")) as TestZRC20; + const token2Contract = (await ZRC20Factory.deploy(parseUnits("1000000"), "gETH", "gETH")) as TestZRC20; + const token3Contract = (await ZRC20Factory.deploy(parseUnits("1000000"), "tMATIC", "tMATIC")) as TestZRC20; + + const ZRC20Contracts = [token1Contract, token2Contract, token3Contract]; + + const SystemContractFactory = (await ethers.getContractFactory("TestSystemContract")) as TestSystemContract__factory; + + const systemContract = (await SystemContractFactory.deploy( + wGasToken, + uniswapFactoryAddr, + uniswapRouterAddr + )) as TestSystemContract; + + await systemContract.setGasCoinZRC20(97, ZRC20Contracts[0].address); + await systemContract.setGasCoinZRC20(5, ZRC20Contracts[1].address); + await systemContract.setGasCoinZRC20(80001, ZRC20Contracts[2].address); + + await addZetaEthLiquidity(signer, ZRC20Contracts[0], uniswapRouterAddr); + await addZetaEthLiquidity(signer, ZRC20Contracts[1], uniswapRouterAddr); + await addZetaEthLiquidity(signer, ZRC20Contracts[2], uniswapRouterAddr); + + return { ZRC20Contracts, systemContract }; +}; From 010e6527ffd54e20932633306d6b14ab9255cc7c Mon Sep 17 00:00:00 2001 From: Brandon Truong Date: Wed, 11 Jan 2023 10:48:08 -0500 Subject: [PATCH 049/115] Create bugbounty.md (#59) * Create bugbounty.md * Update bugbounty.md --- bugbounty.md | 45 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 bugbounty.md diff --git a/bugbounty.md b/bugbounty.md new file mode 100644 index 00000000..8de375d3 --- /dev/null +++ b/bugbounty.md @@ -0,0 +1,45 @@ +## Bug Bounty Overview + +ZetaChain is committed to security across all aspects of its ecosystem. To that end, ZetaChain has established a bug bounty program to reward researchers, developers, and users who help identify and report security vulnerabilities. + +You can access and report issues at [https://immunefi.com/bounty/zetachain/](https://immunefi.com/bounty/zetachain/). + +## Scope + +The scope of this bug bounty program is focused on ZetaChain's smart contracts, public-facing APIs, blockchain protocol/infrastructure, and web applications. + +## Program Guidelines + +1. All reports must be submitted through Immunefi, accessible [here](https://immunefi.com/bounty/zetachain/). +2. Report any suspected vulnerability promptly. +3. Do not attempt to exploit a vulnerability without prior authorization. +4. Do not publicly disclose a vulnerability before it is reported and patched. +5. Do not access data or systems beyond the scope of the vulnerability. +6. Do not use social engineering techniques. +7. Do not attempt to access accounts or personal data of users. + +## Rewards + +The rewards for successful vulnerability reports range from $5,000 to $100,000, depending on the severity of the issue. All payouts are to be done by the ZetaChain team through Immunefi. + +### **Smart Contracts** + +| Critical | USD $30,000 to $100,000 | +| --- | --- | +| High | USD $10,000 to $30,000 | +| Medium | USD $10,000 | + +### **Websites and Applications** + +| Critical | USD $15,000 to $30,000 | +| --- | --- | +| High | USD $5,000 to $15,000 | +| Medium | USD $5,000 | + +## Responsible Disclosure + +We value responsible disclosure, and we encourage all participants to act responsibly when reporting vulnerabilities. + +## Contact + +For any questions or concerns, please contact us at bugbounty@zetachain.com. From 09332dc63ba65bb09c51b12336750876b8f4aaf1 Mon Sep 17 00:00:00 2001 From: Andres Martin Aiello <50411235+andresaiello@users.noreply.github.com> Date: Thu, 12 Jan 2023 11:21:05 -0300 Subject: [PATCH 050/115] Deploy swap to klaytn (#52) (#60) * Deploy swap to klaytn * update comment * fix merge --- packages/addresses/src/addresses.athens.json | 18 +- packages/addresses/src/addresses.helpers.ts | 2 + .../MultiChainSwapTrident.strategy.sol | 249 ++++++++++++++++++ .../MultiChainSwap.helpers.ts | 16 +- .../lib/shared/network.constants.ts | 8 +- .../deploy-multi-chain-swap-trident.ts | 33 +++ .../deploy-multi-chain-swap-v3.ts | 5 +- .../deploy-multi-chain-swap.ts | 3 +- .../multi-chain-swap/do-cross-chain-swap.ts | 3 +- .../multi-chain-swap/set-cross-chain-data.ts | 3 +- .../test/MultiChainSwapUniswapV3.spec.ts | 44 ++-- .../ZetaTokenConsumerTrident.strategy.sol | 211 +++++++++++++++ ...ridentConcentratedLiquidityPoolFactory.sol | 23 ++ .../interfaces/TridentIPoolRouter.sol | 75 ++++++ 14 files changed, 648 insertions(+), 45 deletions(-) create mode 100644 packages/example-contracts/contracts/multi-chain-swap/MultiChainSwapTrident.strategy.sol create mode 100644 packages/example-contracts/scripts/multi-chain-swap/deploy-multi-chain-swap-trident.ts create mode 100644 packages/protocol-contracts/contracts/ZetaTokenConsumerTrident.strategy.sol create mode 100644 packages/protocol-contracts/contracts/interfaces/TridentConcentratedLiquidityPoolFactory.sol create mode 100644 packages/protocol-contracts/contracts/interfaces/TridentIPoolRouter.sol diff --git a/packages/addresses/src/addresses.athens.json b/packages/addresses/src/addresses.athens.json index 57e3dfab..9b7f80b0 100644 --- a/packages/addresses/src/addresses.athens.json +++ b/packages/addresses/src/addresses.athens.json @@ -8,6 +8,7 @@ "multiChainSwap": "0xa0b5cbdc4d14c4f4d36483ec0de310919f3b2d90", "multiChainSwapZetaConnector": "", "multiChainValue": "0x54284C0b4948FE2F93D3a0Dc17fA3587b16eE19F", + "tridentPoolFactory": "", "tss": "0x7c125C1d515b8945841b3d5144a060115C58725F", "tssUpdater": "0x7274d1d5dddef36aac53dd45b93487ce01ef0a55", "uniswapV2Factory": "", @@ -31,6 +32,7 @@ "multiChainSwap": "0x805fE47D1FE7d86496753bB4B36206953c1ae660", "multiChainSwapZetaConnector": "", "multiChainValue": "0x31F884940B3876290A16B183b841bbE7E4965743", + "tridentPoolFactory": "", "tss": "0x7c125C1d515b8945841b3d5144a060115C58725F", "tssUpdater": "0x7274d1d5dddef36aac53dd45b93487ce01ef0a55", "uniswapV2Factory": "", @@ -52,6 +54,7 @@ "dai": "", "immutableCreate2Factory": "0x095a03c6a68137fE9a566bBc3e552F299d8b886d", "multiChainSwap": "0xaf28cb0d9E045170E1642321B964740784E7dC64", + "tridentPoolFactory": "", "multiChainSwapZetaConnector": "", "multiChainValue": "0xb3021F5603291895b0Df5fC6276cda33a0B90fa6", "tss": "0x7c125C1d515b8945841b3d5144a060115C58725F", @@ -77,6 +80,7 @@ "multiChainSwap": "", "multiChainSwapZetaConnector": "", "multiChainValue": "", + "tridentPoolFactory": "", "tss": "", "tssUpdater": "", "uniswapV2Factory": "", @@ -97,18 +101,18 @@ "crossChainNft": "", "dai": "", "immutableCreate2Factory": "0x095a03c6a68137fE9a566bBc3e552F299d8b886d", + "multiChainSwap": "0xf254632444601120166809AB7B0A4fC59a3d8A61", "multiChainValue": "0x4f97Bc7ed459111296583e92a62f17D20B20825d", - "multiChainSwap": "", - "multiChainSwapZetaConnector": "", + "tridentPoolFactory": "0x2be2C91cCA2df52b41a9e42723c46fD029359c95", "tss": "0x7c125C1d515b8945841b3d5144a060115C58725F", "tssUpdater": "0x7274d1d5dddef36aac53dd45b93487ce01ef0a55", "uniswapV2Factory": "", "uniswapV2Router02": "", "uniswapV3NftManager": "", - "uniswapV3Quoter": "", - "uniswapV3Router": "", + "uniswapV3Quoter": "0x42271971dbF42fbfEaF7F428604a86760300cB5B", + "uniswapV3Router": "0x42271971dbF42fbfEaF7F428604a86760300cB5B", "usdc": "", - "weth9": "", + "weth9": "0x0339d5Eb6D195Ba90B13ed1BCeAa97EbD198b106", "zetaSwap": "", "zetaSwapBtcInbound": "", "zetaToken": "0x000080383847bD75F91c168269Aa74004877592f", @@ -123,6 +127,7 @@ "multiChainSwap": "", "multiChainSwapZetaConnector": "", "multiChainValue": "", + "tridentPoolFactory": "", "tss": "", "tssUpdater": "", "uniswapV2Factory": "0x9fd96203f7b22bCF72d9DCb40ff98302376cE09c", @@ -146,6 +151,7 @@ "multiChainSwap": "", "multiChainSwapZetaConnector": "", "multiChainValue": "", + "tridentPoolFactory": "", "tss": "", "tssUpdater": "", "uniswapV2Factory": "", @@ -160,4 +166,4 @@ "zetaToken": "", "zetaTokenConsumerUniV2": "" } -} \ No newline at end of file +} diff --git a/packages/addresses/src/addresses.helpers.ts b/packages/addresses/src/addresses.helpers.ts index 37547c8e..d92266d5 100644 --- a/packages/addresses/src/addresses.helpers.ts +++ b/packages/addresses/src/addresses.helpers.ts @@ -11,6 +11,7 @@ export type ZetaAddress = | "multiChainSwap" | "multiChainSwapZetaConnector" | "multiChainValue" + | "tridentPoolFactory" | "tss" | "tssUpdater" | "uniswapV2Factory" @@ -35,6 +36,7 @@ const zetaAddresses: Record = { multiChainSwap: true, multiChainSwapZetaConnector: true, multiChainValue: true, + tridentPoolFactory: true, tss: true, tssUpdater: true, uniswapV2Factory: true, diff --git a/packages/example-contracts/contracts/multi-chain-swap/MultiChainSwapTrident.strategy.sol b/packages/example-contracts/contracts/multi-chain-swap/MultiChainSwapTrident.strategy.sol new file mode 100644 index 00000000..aaf61920 --- /dev/null +++ b/packages/example-contracts/contracts/multi-chain-swap/MultiChainSwapTrident.strategy.sol @@ -0,0 +1,249 @@ +// SPDX-License-Identifier: MIT +pragma solidity 0.8.7; + +import "@openzeppelin/contracts/interfaces/IERC20.sol"; +import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol"; +import "@zetachain/protocol-contracts/contracts/ZetaTokenConsumerTrident.strategy.sol"; + +import "./MultiChainSwapErrors.sol"; +import "./MultiChainSwap.sol"; + +contract MultiChainSwapTrident is MultiChainSwap, ZetaInteractor, MultiChainSwapErrors, ZetaTokenConsumerTrident { + using SafeERC20 for IERC20; + bytes32 public constant CROSS_CHAIN_SWAP_MESSAGE = keccak256("CROSS_CHAIN_SWAP"); + + constructor( + address zetaConnector_, + address zetaToken_, + address uniswapV3Router_, + address WETH9Address_, + address poolFactory_ + ) + ZetaTokenConsumerTrident(zetaToken_, uniswapV3Router_, WETH9Address_, poolFactory_) + ZetaInteractor(zetaConnector_) + {} + + function swapETHForTokensCrossChain( + bytes calldata receiverAddress, + address destinationOutToken, + bool isDestinationOutETH, + /** + * @dev The minimum amount of tokens that receiverAddress should get, + * if it's not reached, the transaction will revert on the destination chain + */ + uint256 outTokenMinAmount, + uint256 destinationChainId, + uint256 crossChaindestinationGasLimit + ) external payable override { + if (!_isValidChainId(destinationChainId)) revert InvalidDestinationChainId(); + + if (msg.value == 0) revert ValueShouldBeGreaterThanZero(); + if ( + (destinationOutToken != address(0) && isDestinationOutETH) || + (destinationOutToken == address(0) && !isDestinationOutETH) + ) revert OutTokenInvariant(); + + uint256 zetaValueAndGas = this.getZetaFromEth{value: msg.value}( + address(this), + 0 /// @todo Add min amount + ); + if (zetaValueAndGas == 0) revert ErrorSwappingTokens(); + + IERC20(zetaToken).safeApprove(address(connector), zetaValueAndGas); + + connector.send( + ZetaInterfaces.SendInput({ + destinationChainId: destinationChainId, + destinationAddress: interactorsByChainId[destinationChainId], + destinationGasLimit: crossChaindestinationGasLimit, + message: abi.encode( + CROSS_CHAIN_SWAP_MESSAGE, + msg.sender, + WETH9Address, + msg.value, + receiverAddress, + destinationOutToken, + isDestinationOutETH, + outTokenMinAmount, + true // inputTokenIsETH + ), + zetaValueAndGas: zetaValueAndGas, + zetaParams: abi.encode("") + }) + ); + } + + function swapTokensForTokensCrossChain( + address sourceInputToken, + uint256 inputTokenAmount, + bytes calldata receiverAddress, + address destinationOutToken, + bool isDestinationOutETH, + /** + * @dev The minimum amount of tokens that receiverAddress should get, + * if it's not reached, the transaction will revert on the destination chain + */ + uint256 outTokenMinAmount, + uint256 destinationChainId, + uint256 crossChaindestinationGasLimit + ) external override { + if (!_isValidChainId(destinationChainId)) revert InvalidDestinationChainId(); + + if (sourceInputToken == address(0)) revert MissingSourceInputTokenAddress(); + if ( + (destinationOutToken != address(0) && isDestinationOutETH) || + (destinationOutToken == address(0) && !isDestinationOutETH) + ) revert OutTokenInvariant(); + + uint256 zetaValueAndGas; + + IERC20(sourceInputToken).safeTransferFrom(msg.sender, address(this), inputTokenAmount); + + if (sourceInputToken == zetaToken) { + zetaValueAndGas = inputTokenAmount; + } else { + IERC20(sourceInputToken).safeApprove(address(this), inputTokenAmount); + zetaValueAndGas = this.getZetaFromToken( + address(this), + 0, /// @todo Add min amount + sourceInputToken, + inputTokenAmount + ); + + if (zetaValueAndGas == 0) revert ErrorSwappingTokens(); + } + + IERC20(zetaToken).safeApprove(address(connector), zetaValueAndGas); + + connector.send( + ZetaInterfaces.SendInput({ + destinationChainId: destinationChainId, + destinationAddress: interactorsByChainId[destinationChainId], + destinationGasLimit: crossChaindestinationGasLimit, + message: abi.encode( + CROSS_CHAIN_SWAP_MESSAGE, + msg.sender, + sourceInputToken, + inputTokenAmount, + receiverAddress, + destinationOutToken, + isDestinationOutETH, + outTokenMinAmount, + false // inputTokenIsETH + ), + zetaValueAndGas: zetaValueAndGas, + zetaParams: abi.encode("") + }) + ); + } + + function onZetaMessage(ZetaInterfaces.ZetaMessage calldata zetaMessage) + external + override + isValidMessageCall(zetaMessage) + { + ( + bytes32 messageType, + address sourceTxOrigin, + address sourceInputToken, + uint256 inputTokenAmount, + bytes memory receiverAddressEncoded, + address destinationOutToken, + bool isDestinationOutETH, + uint256 outTokenMinAmount, + + ) = abi.decode(zetaMessage.message, (bytes32, address, address, uint256, bytes, address, bool, uint256, bool)); + if (messageType != CROSS_CHAIN_SWAP_MESSAGE) revert InvalidMessageType(); + + uint256 outTokenFinalAmount; + if (destinationOutToken == zetaToken) { + if (zetaMessage.zetaValue < outTokenMinAmount) revert InsufficientOutToken(); + + IERC20(zetaToken).safeTransfer(address(uint160(bytes20(receiverAddressEncoded))), zetaMessage.zetaValue); + + outTokenFinalAmount = zetaMessage.zetaValue; + } else { + /** + * @dev If the out token is not Zeta, get it using Uniswap + */ + IERC20(zetaToken).safeApprove(address(this), zetaMessage.zetaValue); + + if (isDestinationOutETH) { + outTokenFinalAmount = this.getEthFromZeta( + address(uint160(bytes20(receiverAddressEncoded))), + outTokenMinAmount, + zetaMessage.zetaValue + ); + } else { + outTokenFinalAmount = this.getTokenFromZeta( + address(uint160(bytes20(receiverAddressEncoded))), + outTokenMinAmount, + destinationOutToken, + zetaMessage.zetaValue + ); + } + + if (outTokenFinalAmount == 0) revert ErrorSwappingTokens(); + if (outTokenFinalAmount < outTokenMinAmount) revert InsufficientOutToken(); + } + + emit Swapped( + sourceTxOrigin, + sourceInputToken, + inputTokenAmount, + destinationOutToken, + outTokenFinalAmount, + address(uint160(bytes20(receiverAddressEncoded))) + ); + } + + function onZetaRevert(ZetaInterfaces.ZetaRevert calldata zetaRevert) + external + override + isValidRevertCall(zetaRevert) + { + /** + * @dev: If something goes wrong we must swap to the source input token + */ + ( + , + address sourceTxOrigin, + address sourceInputToken, + uint256 inputTokenAmount, + , + , + , + , + bool inputTokenIsETH + ) = abi.decode(zetaRevert.message, (bytes32, address, address, uint256, bytes, address, bool, uint256, bool)); + + uint256 inputTokenReturnedAmount; + if (sourceInputToken == zetaToken) { + IERC20(zetaToken).safeApprove(address(this), zetaRevert.remainingZetaValue); + IERC20(zetaToken).safeTransferFrom(address(this), sourceTxOrigin, zetaRevert.remainingZetaValue); + inputTokenReturnedAmount = zetaRevert.remainingZetaValue; + } else { + /** + * @dev If the source input token is not Zeta, trade it using Uniswap + */ + IERC20(zetaToken).safeApprove(address(this), zetaRevert.remainingZetaValue); + + if (inputTokenIsETH) { + inputTokenReturnedAmount = this.getEthFromZeta( + sourceTxOrigin, + 0, /// @todo Add min amount + zetaRevert.remainingZetaValue + ); + } else { + inputTokenReturnedAmount = this.getTokenFromZeta( + sourceTxOrigin, + 0, /// @todo Add min amount + sourceInputToken, + zetaRevert.remainingZetaValue + ); + } + } + + emit RevertedSwap(sourceTxOrigin, sourceInputToken, inputTokenAmount, inputTokenReturnedAmount); + } +} diff --git a/packages/example-contracts/lib/multi-chain-swap/MultiChainSwap.helpers.ts b/packages/example-contracts/lib/multi-chain-swap/MultiChainSwap.helpers.ts index ab377170..26ce50b0 100644 --- a/packages/example-contracts/lib/multi-chain-swap/MultiChainSwap.helpers.ts +++ b/packages/example-contracts/lib/multi-chain-swap/MultiChainSwap.helpers.ts @@ -4,24 +4,32 @@ import { MultiChainSwapUniV3, MultiChainSwapUniV3__factory as MultiChainSwapUniV3Factory, MultiChainSwapZetaConnector, - MultiChainSwapZetaConnector__factory, + MultiChainSwapZetaConnector__factory } from "../../typechain-types"; +import { MultiChainSwapTrident } from "../../typechain-types/contracts/multi-chain-swap/MultiChainSwapTrident.strategy.sol"; +import { MultiChainSwapTrident__factory } from "../../typechain-types/factories/contracts/multi-chain-swap/MultiChainSwapTrident.strategy.sol"; import { getContract, GetContractParams } from "../shared/deploy.helpers"; export const getMultiChainSwapUniV2 = async (params: GetContractParams) => getContract({ contractName: "MultiChainSwapUniV2", - ...params, + ...params }); export const getMultiChainSwapUniV3 = async (params: GetContractParams) => getContract({ contractName: "MultiChainSwapUniV3", - ...params, + ...params + }); + +export const getMultiChainSwapTrident = async (params: GetContractParams) => + getContract({ + contractName: "MultiChainSwapTrident", + ...params }); export const getMultiChainSwapZetaConnector = async (zetaToken: string) => getContract({ contractName: "MultiChainSwapZetaConnector", - deployParams: [zetaToken], + deployParams: [zetaToken] }); diff --git a/packages/example-contracts/lib/shared/network.constants.ts b/packages/example-contracts/lib/shared/network.constants.ts index 1d15dc90..4aaa540e 100644 --- a/packages/example-contracts/lib/shared/network.constants.ts +++ b/packages/example-contracts/lib/shared/network.constants.ts @@ -1,6 +1,6 @@ import { NetworkName } from "@zetachain/addresses"; -type ChainId = 0 | 5 | 97 | 1337; +type ChainId = 0 | 5 | 97 | 1001 | 1337 | 80001; export type NetworkVariables = { chainId: ChainId; @@ -47,10 +47,10 @@ export const networkVariables: Record = { crossChainName: "" }, "klaytn-baobab": { - chainId: 0, + chainId: 1001, connectorAddress: "", - crossChainId: 0, - crossChainName: "" + crossChainId: 5, + crossChainName: "goerli" }, "klaytn-cypress": { chainId: 0, diff --git a/packages/example-contracts/scripts/multi-chain-swap/deploy-multi-chain-swap-trident.ts b/packages/example-contracts/scripts/multi-chain-swap/deploy-multi-chain-swap-trident.ts new file mode 100644 index 00000000..c7a53537 --- /dev/null +++ b/packages/example-contracts/scripts/multi-chain-swap/deploy-multi-chain-swap-trident.ts @@ -0,0 +1,33 @@ +import { isNetworkName } from "@zetachain/addresses"; +import { saveAddress } from "@zetachain/addresses-tools"; +import { network } from "hardhat"; + +import { getMultiChainSwapTrident } from "../../lib/multi-chain-swap/MultiChainSwap.helpers"; +import { getAddress } from "../../lib/shared/address.helpers"; + +export async function deployMultiChainSwap() { + if (!isNetworkName(network.name) || !network.name) throw new Error("Invalid network name"); + + const CONNECTOR = getAddress("connector"); + + const ZETA_TOKEN = getAddress("zetaToken"); + + const UNI_ROUTER_V3 = getAddress("uniswapV3Router"); + + const WETH = getAddress("weth9"); + + const TRIDENT_POOL_FACTORY = getAddress("tridentPoolFactory"); + + const multiChainSwapContract = await getMultiChainSwapTrident({ + deployParams: [CONNECTOR, ZETA_TOKEN, UNI_ROUTER_V3, WETH, TRIDENT_POOL_FACTORY] + }); + + saveAddress("multiChainSwap", multiChainSwapContract.address); +} + +if (!process.env.EXECUTE_PROGRAMMATICALLY) { + deployMultiChainSwap().catch(error => { + console.error(error); + process.exit(1); + }); +} diff --git a/packages/example-contracts/scripts/multi-chain-swap/deploy-multi-chain-swap-v3.ts b/packages/example-contracts/scripts/multi-chain-swap/deploy-multi-chain-swap-v3.ts index a5750262..d62811f9 100644 --- a/packages/example-contracts/scripts/multi-chain-swap/deploy-multi-chain-swap-v3.ts +++ b/packages/example-contracts/scripts/multi-chain-swap/deploy-multi-chain-swap-v3.ts @@ -1,8 +1,9 @@ -import { getAddress, isNetworkName } from "@zetachain/addresses"; +import { isNetworkName } from "@zetachain/addresses"; import { saveAddress } from "@zetachain/addresses-tools"; import { network } from "hardhat"; import { getMultiChainSwapUniV3 } from "../../lib/multi-chain-swap/MultiChainSwap.helpers"; +import { getAddress } from "../../lib/shared/address.helpers"; export async function deployMultiChainSwap() { if (!isNetworkName(network.name) || !network.name) throw new Error("Invalid network name"); @@ -18,7 +19,7 @@ export async function deployMultiChainSwap() { const WETH = getAddress("weth9"); const multiChainSwapContract = await getMultiChainSwapUniV3({ - deployParams: [CONNECTOR, ZETA_TOKEN, UNI_ROUTER_V3, UNI_QUOTER_V3, WETH, 500, 3000], + deployParams: [CONNECTOR, ZETA_TOKEN, UNI_ROUTER_V3, UNI_QUOTER_V3, WETH, 500, 3000] }); saveAddress("multiChainSwap", multiChainSwapContract.address); diff --git a/packages/example-contracts/scripts/multi-chain-swap/deploy-multi-chain-swap.ts b/packages/example-contracts/scripts/multi-chain-swap/deploy-multi-chain-swap.ts index 47efe8da..8ed8ce24 100644 --- a/packages/example-contracts/scripts/multi-chain-swap/deploy-multi-chain-swap.ts +++ b/packages/example-contracts/scripts/multi-chain-swap/deploy-multi-chain-swap.ts @@ -3,12 +3,13 @@ import { saveAddress } from "@zetachain/addresses-tools"; import { network } from "hardhat"; import { getMultiChainSwapUniV2 } from "../../lib/multi-chain-swap/MultiChainSwap.helpers"; +import { getAddress } from "../../lib/shared/address.helpers"; export async function deployMultiChainSwap() { if (!isNetworkName(network.name) || !network.name) throw new Error("Invalid network name"); const multiChainSwapContract = await getMultiChainSwapUniV2({ - deployParams: [getAddress("connector"), getAddress("zetaToken"), getAddress("uniswapV2Router02")], + deployParams: [getAddress("connector"), getAddress("zetaToken"), getAddress("uniswapV2Router02")] }); saveAddress("multiChainSwap", multiChainSwapContract.address); diff --git a/packages/example-contracts/scripts/multi-chain-swap/do-cross-chain-swap.ts b/packages/example-contracts/scripts/multi-chain-swap/do-cross-chain-swap.ts index 52617afd..9084edc5 100644 --- a/packages/example-contracts/scripts/multi-chain-swap/do-cross-chain-swap.ts +++ b/packages/example-contracts/scripts/multi-chain-swap/do-cross-chain-swap.ts @@ -3,6 +3,7 @@ import { parseUnits } from "ethers/lib/utils"; import { ethers, network } from "hardhat"; import { getMultiChainSwapUniV2 } from "../../lib/multi-chain-swap/MultiChainSwap.helpers"; +import { getAddress } from "../../lib/shared/address.helpers"; import { networkVariables } from "../../lib/shared/network.constants"; export async function doCrossChainSwap() { @@ -13,7 +14,7 @@ export async function doCrossChainSwap() { if (!_networkVariables.crossChainName) throw new Error("Invalid crossChainName"); const multiChainSwapContract = await getMultiChainSwapUniV2({ - existingContractAddress: getAddress("multiChainSwap"), + existingContractAddress: getAddress("multiChainSwap") }); const [account1] = await ethers.getSigners(); diff --git a/packages/example-contracts/scripts/multi-chain-swap/set-cross-chain-data.ts b/packages/example-contracts/scripts/multi-chain-swap/set-cross-chain-data.ts index 6c8a1aed..cfffc696 100644 --- a/packages/example-contracts/scripts/multi-chain-swap/set-cross-chain-data.ts +++ b/packages/example-contracts/scripts/multi-chain-swap/set-cross-chain-data.ts @@ -2,6 +2,7 @@ import { isNetworkName } from "@zetachain/addresses"; import { ethers, network } from "hardhat"; import { getMultiChainSwapUniV2 } from "../../lib/multi-chain-swap/MultiChainSwap.helpers"; +import { getAddress } from "../../lib/shared/address.helpers"; import { networkVariables } from "../../lib/shared/network.constants"; export async function setMultiChainSwapCrossChainData() { @@ -14,7 +15,7 @@ export async function setMultiChainSwapCrossChainData() { const crossChainMultiChainSwapAddress = getAddress("multiChainSwap"); const crossChainMultiChainSwapContract = await getMultiChainSwapUniV2({ - existingContractAddress: crossChainMultiChainSwapAddress, + existingContractAddress: crossChainMultiChainSwapAddress }); const crossChainAddress = getAddress("multiChainSwap", { diff --git a/packages/example-contracts/test/MultiChainSwapUniswapV3.spec.ts b/packages/example-contracts/test/MultiChainSwapUniswapV3.spec.ts index 1214451c..f007b220 100644 --- a/packages/example-contracts/test/MultiChainSwapUniswapV3.spec.ts +++ b/packages/example-contracts/test/MultiChainSwapUniswapV3.spec.ts @@ -3,19 +3,19 @@ import { BigNumber } from "@ethersproject/bignumber"; import { AddressZero, MaxUint256 } from "@ethersproject/constants"; import { parseEther, parseUnits } from "@ethersproject/units"; import { SignerWithAddress } from "@nomiclabs/hardhat-ethers/signers"; -import { getAddress } from "@zetachain/addresses"; import { IERC20__factory } from "@zetachain/interfaces/typechain-types"; import chai, { expect } from "chai"; import { ethers } from "hardhat"; import { getMultiChainSwapUniV3, getMultiChainSwapZetaConnector } from "../lib/multi-chain-swap/MultiChainSwap.helpers"; +import { getAddress } from "../lib/shared/address.helpers"; import { getNow } from "../lib/shared/deploy.helpers"; import { ERC20__factory, IERC20, MultiChainSwapUniV3, MultiChainSwapZetaConnector, - UniswapV2Router02__factory, + UniswapV2Router02__factory } from "../typechain-types"; import { getCustomErrorMessage, parseInteractorLog } from "./test.helpers"; @@ -25,7 +25,7 @@ chai.use(smock.matchers); const swapToken = async (signer: SignerWithAddress, tokenAddress: string, expectedAmount: BigNumber) => { const uniswapV2RouterAddr = getAddress("uniswapV2Router02", { customNetworkName: "eth-mainnet", - customZetaNetwork: "mainnet", + customZetaNetwork: "mainnet" }); const uniswapRouter = UniswapV2Router02__factory.connect(uniswapV2RouterAddr, signer); @@ -85,27 +85,27 @@ describe("MultiChainSwap tests", () => { const DAI = getAddress("dai", { customNetworkName: "eth-mainnet", - customZetaNetwork: "mainnet", + customZetaNetwork: "mainnet" }); const UNI_QUOTER_V3 = getAddress("uniswapV3Quoter", { customNetworkName: "eth-mainnet", - customZetaNetwork: "mainnet", + customZetaNetwork: "mainnet" }); const UNI_ROUTER_V3 = getAddress("uniswapV3Router", { customNetworkName: "eth-mainnet", - customZetaNetwork: "mainnet", + customZetaNetwork: "mainnet" }); WETH = getAddress("weth9", { customNetworkName: "eth-mainnet", - customZetaNetwork: "mainnet", + customZetaNetwork: "mainnet" }); const USDC_ADDR = getAddress("usdc", { customNetworkName: "eth-mainnet", - customZetaNetwork: "mainnet", + customZetaNetwork: "mainnet" }); const ERC20Factory = new ERC20__factory(deployer); @@ -118,24 +118,16 @@ describe("MultiChainSwap tests", () => { zetaTokenMock = IERC20__factory.connect(zetaTokenNonEthAddress, deployer); zetaConnectorMock = await getMultiChainSwapZetaConnector(zetaTokenMock.address); multiChainSwapContractA = await getMultiChainSwapUniV3({ - deployParams: [zetaConnectorMock.address, zetaTokenNonEthAddress, UNI_ROUTER_V3, UNI_QUOTER_V3, WETH, 3000, 3000], + deployParams: [zetaConnectorMock.address, zetaTokenNonEthAddress, UNI_ROUTER_V3, UNI_QUOTER_V3, WETH, 3000, 3000] }); multiChainSwapContractB = await getMultiChainSwapUniV3({ - deployParams: [zetaConnectorMock.address, zetaTokenNonEthAddress, UNI_ROUTER_V3, UNI_QUOTER_V3, WETH, 3000, 3000], + deployParams: [zetaConnectorMock.address, zetaTokenNonEthAddress, UNI_ROUTER_V3, UNI_QUOTER_V3, WETH, 3000, 3000] }); zetaConnectorSmock = await smock.fake("MultiChainSwapZetaConnector"); multiChainSwapContractWithSmock = await getMultiChainSwapUniV3({ - deployParams: [ - zetaConnectorSmock.address, - zetaTokenNonEthAddress, - UNI_ROUTER_V3, - UNI_QUOTER_V3, - WETH, - 3000, - 3000, - ], + deployParams: [zetaConnectorSmock.address, zetaTokenNonEthAddress, UNI_ROUTER_V3, UNI_QUOTER_V3, WETH, 3000, 3000] }); const encodedCrossChainAddressB = ethers.utils.solidityPack(["address"], [multiChainSwapContractB.address]); @@ -162,7 +154,7 @@ describe("MultiChainSwap tests", () => { 10, MaxUint256, { - value: parseUnits("1"), + value: parseUnits("1") } ) ).to.be.revertedWith(getCustomErrorMessage("InvalidDestinationChainId")); @@ -467,7 +459,7 @@ describe("MultiChainSwap tests", () => { message: encoder.encode(["address"], [multiChainSwapContractA.address]), sourceChainId: chainBId, zetaTxSenderAddress: ethers.utils.solidityPack(["address"], [multiChainSwapContractA.address]), - zetaValue: 0, + zetaValue: 0 }) ).to.be.revertedWith(getCustomErrorMessage("InvalidCaller", [deployer.address])); }); @@ -494,7 +486,7 @@ describe("MultiChainSwap tests", () => { message: encoder.encode(["address"], [multiChainSwapContractA.address]), remainingZetaValue: 0, sourceChainId: chainAId, - zetaTxSenderAddress: deployer.address, + zetaTxSenderAddress: deployer.address }) ).to.be.revertedWith(getCustomErrorMessage("InvalidCaller", [deployer.address])); }); @@ -516,7 +508,7 @@ describe("MultiChainSwap tests", () => { multiChainSwapContractA.address, true, 0, - false, + false ] ); @@ -553,7 +545,7 @@ describe("MultiChainSwap tests", () => { multiChainSwapContractA.address, true, 0, - false, + false ] ); @@ -596,7 +588,7 @@ describe("MultiChainSwap tests", () => { multiChainSwapContractA.address, true, 0, - true, + true ] ); @@ -637,7 +629,7 @@ describe("MultiChainSwap tests", () => { multiChainSwapContractA.address, true, 0, - true, + true ] ); diff --git a/packages/protocol-contracts/contracts/ZetaTokenConsumerTrident.strategy.sol b/packages/protocol-contracts/contracts/ZetaTokenConsumerTrident.strategy.sol new file mode 100644 index 00000000..ce92ecbf --- /dev/null +++ b/packages/protocol-contracts/contracts/ZetaTokenConsumerTrident.strategy.sol @@ -0,0 +1,211 @@ +// SPDX-License-Identifier: MIT +pragma solidity 0.8.7; + +import "@openzeppelin/contracts/interfaces/IERC20.sol"; +import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol"; +import "@uniswap/v3-periphery/contracts/interfaces/IQuoter.sol"; + +import "./interfaces/ZetaInterfaces.sol"; +import "./interfaces/TridentConcentratedLiquidityPoolFactory.sol"; +import "./interfaces/TridentIPoolRouter.sol"; + +interface ZetaTokenConsumerTridentErrors { + error InvalidAddress(); + + error InputCantBeZero(); + + error ErrorSendingETH(); + + error ReentrancyError(); +} + +interface WETH9 { + function deposit() external payable; + + function withdraw(uint256 wad) external; + + function depositTo(address to) external payable; + + function withdrawTo(address payable to, uint256 value) external; +} + +/** + * @dev Trident strategy for ZetaTokenConsumer + */ +contract ZetaTokenConsumerTrident is ZetaTokenConsumer, ZetaTokenConsumerTridentErrors { + using SafeERC20 for IERC20; + uint256 internal constant MAX_DEADLINE = 200; + + address internal immutable WETH9Address; + address public immutable zetaToken; + + IPoolRouter public immutable tridentRouter; + ConcentratedLiquidityPoolFactory public immutable poolFactory; + + bool internal _locked; + + constructor( + address zetaToken_, + address uniswapV3Router_, + address WETH9Address_, + address poolFactory_ + ) { + if ( + zetaToken_ == address(0) || + uniswapV3Router_ == address(0) || + WETH9Address_ == address(0) || + poolFactory_ == address(0) + ) revert InvalidAddress(); + + zetaToken = zetaToken_; + tridentRouter = IPoolRouter(uniswapV3Router_); + poolFactory = ConcentratedLiquidityPoolFactory(poolFactory_); + WETH9Address = WETH9Address_; + } + + modifier nonReentrant() { + if (_locked) revert ReentrancyError(); + _locked = true; + _; + _locked = false; + } + + receive() external payable {} + + function getPair(address token0, address token1) internal pure returns (address, address) { + if (token0 < token1) return (token0, token1); + + return (token1, token0); + } + + function getZetaFromEth(address destinationAddress, uint256 minAmountOut) + external + payable + override + returns (uint256) + { + if (destinationAddress == address(0)) revert InvalidAddress(); + if (msg.value == 0) revert InputCantBeZero(); + + (address token0, address token1) = getPair(WETH9Address, zetaToken); + address[] memory pairPools = poolFactory.getPools(token0, token1, 0, 1); + + IPoolRouter.ExactInputSingleParams memory params = IPoolRouter.ExactInputSingleParams({ + tokenIn: address(0), + amountIn: msg.value, + amountOutMinimum: minAmountOut, + pool: pairPools[0], + to: destinationAddress, + unwrap: false + }); + + uint256 amountOut = tridentRouter.exactInputSingle{value: msg.value}(params); + + emit EthExchangedForZeta(msg.value, amountOut); + return amountOut; + } + + function getZetaFromToken( + address destinationAddress, + uint256 minAmountOut, + address inputToken, + uint256 inputTokenAmount + ) external override returns (uint256) { + if (destinationAddress == address(0) || inputToken == address(0)) revert InvalidAddress(); + if (inputTokenAmount == 0) revert InputCantBeZero(); + + IERC20(inputToken).safeTransferFrom(msg.sender, address(this), inputTokenAmount); + IERC20(inputToken).safeApprove(address(tridentRouter), inputTokenAmount); + + (address token0, address token1) = getPair(inputToken, WETH9Address); + address[] memory pairPools1 = poolFactory.getPools(token0, token1, 0, 1); + + (token0, token1) = getPair(WETH9Address, zetaToken); + address[] memory pairPools2 = poolFactory.getPools(token0, token1, 0, 1); + + address[] memory path = new address[](2); + path[0] = pairPools1[0]; + path[1] = pairPools2[0]; + + IPoolRouter.ExactInputParams memory params = IPoolRouter.ExactInputParams({ + tokenIn: inputToken, + amountIn: inputTokenAmount, + amountOutMinimum: minAmountOut, + path: path, + to: destinationAddress, + unwrap: false + }); + + uint256 amountOut = tridentRouter.exactInput(params); + + emit TokenExchangedForZeta(inputToken, inputTokenAmount, amountOut); + return amountOut; + } + + function getEthFromZeta( + address destinationAddress, + uint256 minAmountOut, + uint256 zetaTokenAmount + ) external override returns (uint256) { + if (destinationAddress == address(0)) revert InvalidAddress(); + if (zetaTokenAmount == 0) revert InputCantBeZero(); + + IERC20(zetaToken).safeTransferFrom(msg.sender, address(this), zetaTokenAmount); + IERC20(zetaToken).safeApprove(address(tridentRouter), zetaTokenAmount); + + (address token0, address token1) = getPair(zetaToken, WETH9Address); + address[] memory pairPools = poolFactory.getPools(token0, token1, 0, 1); + + IPoolRouter.ExactInputSingleParams memory params = IPoolRouter.ExactInputSingleParams({ + tokenIn: zetaToken, + amountIn: zetaTokenAmount, + amountOutMinimum: minAmountOut, + pool: pairPools[0], + to: destinationAddress, + unwrap: true + }); + + uint256 amountOut = tridentRouter.exactInputSingle(params); + + emit ZetaExchangedForEth(zetaTokenAmount, amountOut); + + return amountOut; + } + + function getTokenFromZeta( + address destinationAddress, + uint256 minAmountOut, + address outputToken, + uint256 zetaTokenAmount + ) external override nonReentrant returns (uint256) { + if (destinationAddress == address(0) || outputToken == address(0)) revert InvalidAddress(); + if (zetaTokenAmount == 0) revert InputCantBeZero(); + + IERC20(zetaToken).safeTransferFrom(msg.sender, address(this), zetaTokenAmount); + IERC20(zetaToken).safeApprove(address(tridentRouter), zetaTokenAmount); + + (address token0, address token1) = getPair(zetaToken, WETH9Address); + address[] memory pairPools1 = poolFactory.getPools(token0, token1, 0, 1); + + (token0, token1) = getPair(WETH9Address, outputToken); + address[] memory pairPools2 = poolFactory.getPools(token0, token1, 0, 1); + + address[] memory path = new address[](2); + path[0] = pairPools1[0]; + path[1] = pairPools2[0]; + + IPoolRouter.ExactInputParams memory params = IPoolRouter.ExactInputParams({ + tokenIn: zetaToken, + amountIn: zetaTokenAmount, + amountOutMinimum: minAmountOut, + path: path, + to: destinationAddress, + unwrap: false + }); + + uint256 amountOut = tridentRouter.exactInput(params); + + emit ZetaExchangedForToken(outputToken, zetaTokenAmount, amountOut); + return amountOut; + } +} diff --git a/packages/protocol-contracts/contracts/interfaces/TridentConcentratedLiquidityPoolFactory.sol b/packages/protocol-contracts/contracts/interfaces/TridentConcentratedLiquidityPoolFactory.sol new file mode 100644 index 00000000..d8c28898 --- /dev/null +++ b/packages/protocol-contracts/contracts/interfaces/TridentConcentratedLiquidityPoolFactory.sol @@ -0,0 +1,23 @@ +// SPDX-License-Identifier: GPL-3.0 + +/* + * + * ##### ## # # #### ###### ## ##### ##### #### ##### #### #### #### # + * # # # # ## # # # # # # # # # # # # # # # # # # # # + * # # # # # # # # ##### # # # # # # # # # # # # # # # + * ##### ###### # # # # ### # ###### ##### ##### # # # # # # # # # + * # # # # ## # # # # # # # # # # # # # # # # # # + * # # # # # #### ###### # # # # # #### # #### #### #### ###### + * + */ + +pragma solidity >=0.8.0; + +interface ConcentratedLiquidityPoolFactory { + function getPools( + address token0, + address token1, + uint256 startIndex, + uint256 count + ) external view returns (address[] memory pairPools); +} diff --git a/packages/protocol-contracts/contracts/interfaces/TridentIPoolRouter.sol b/packages/protocol-contracts/contracts/interfaces/TridentIPoolRouter.sol new file mode 100644 index 00000000..b5e8bb3e --- /dev/null +++ b/packages/protocol-contracts/contracts/interfaces/TridentIPoolRouter.sol @@ -0,0 +1,75 @@ +// SPDX-License-Identifier: GPL-3.0 + +/* + * + * ##### ## # # #### ###### ## ##### ##### #### ##### #### #### #### # + * # # # # ## # # # # # # # # # # # # # # # # # # # # + * # # # # # # # # ##### # # # # # # # # # # # # # # # + * ##### ###### # # # # ### # ###### ##### ##### # # # # # # # # # + * # # # # ## # # # # # # # # # # # # # # # # # # + * # # # # # #### ###### # # # # # #### # #### #### #### ###### + * + */ + +pragma solidity >=0.8.0; + +interface IPoolRouter { + struct ExactInputSingleParams { + address tokenIn; /// @dev the input token address. If tokenIn is address(0), msg.value will be wrapped and used as input token + uint256 amountIn; /// @dev The amount of input tokens to send + uint256 amountOutMinimum; /// @dev minimum required amount of output token after swap + address pool; /// @dev pool address to swap + address to; /// @dev address to receive + bool unwrap; /// @dev unwrap if output token is wrapped klay + } + + struct ExactInputParams { + address tokenIn; /// @dev the token address to swap-in. If tokenIn is address(0), msg.value will be wrapped and used as input token + uint256 amountIn; /// @dev The amount of input tokens to send. + uint256 amountOutMinimum; /// @dev minimum required amount of output token after swap + address[] path; /// @dev An array of pool addresses to pass through + address to; /// @dev recipient of the output tokens + bool unwrap; /// @dev unwrap if output token is wrapped klay + } + + struct ExactOutputSingleParams { + address tokenIn; /// @dev the input token address. If tokenIn is address(0), msg.value will be wrapped and used as input token + uint256 amountOut; /// @dev The amount of output tokens to receive + uint256 amountInMaximum; /// @dev maximum available amount of input token after swap + address pool; /// @dev pool address to swap + address to; /// @dev address to receive + bool unwrap; /// @dev unwrap if output token is wrapped klay + } + + struct ExactOutputParams { + address tokenIn; /// @dev the token address to swap-in. If tokenIn is address(0), msg.value will be wrapped and used as input token + uint256 amountOut; /// @dev The amount of output tokens to receive + uint256 amountInMaximum; /// @dev maximum available amount of input token after swap + address[] path; /// @dev An array of pool addresses to pass through + address to; /// @dev recipient of the output tokens + bool unwrap; /// @dev unwrap if output token is wrapped klay + } + + /// @notice Swap amountIn of one token for as much as possible of another token + /// @param params The parameters necessary for the swap, encoded as ExactInputSingleParams in calldata + function exactInputSingle(ExactInputSingleParams calldata params) external payable returns (uint256 amountOut); + + /// @notice Swap amountIn of one token for as much as possible of another along the specified path + /// @param params The parameters necessary for the multi-hop swap, encoded as ExactInputParams in calldata + function exactInput(ExactInputParams calldata params) external payable returns (uint256 amountOut); + + /// @notice Swaps as little as possible of one token for `amountOut` of another token + /// @param params The parameters necessary for the swap, encoded as ExactOutputSingleParams in calldata + function exactOutputSingle(ExactOutputSingleParams calldata params) external payable returns (uint256 amountIn); + + /// @notice Swaps as little as possible of one token for `amountOut` of another along the specified path (reversed) + /// @param params The parameters necessary for the multi-hop swap, encoded as ExactOutputParams in calldata + function exactOutput(ExactOutputParams calldata params) external payable returns (uint256 amountIn); + + /// @notice Recover mistakenly sent tokens + function sweep( + address token, + uint256 amount, + address recipient + ) external payable; +} From 9336fe255281fd6ecd9bb6a98d49839a1070fa4f Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 25 Jan 2023 10:40:00 -0300 Subject: [PATCH 051/115] Bump @openzeppelin/contracts from 4.6.0 to 4.7.3 (#63) Bumps [@openzeppelin/contracts](https://github.com/OpenZeppelin/openzeppelin-contracts) from 4.6.0 to 4.7.3. - [Release notes](https://github.com/OpenZeppelin/openzeppelin-contracts/releases) - [Changelog](https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/CHANGELOG.md) - [Commits](https://github.com/OpenZeppelin/openzeppelin-contracts/compare/v4.6.0...v4.7.3) --- updated-dependencies: - dependency-name: "@openzeppelin/contracts" dependency-type: direct:production ... Signed-off-by: dependabot[bot] Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- packages/example-contracts/package.json | 2 +- packages/protocol-contracts/package.json | 2 +- packages/zevm-contracts/package.json | 2 +- yarn.lock | 14 +++++++------- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/packages/example-contracts/package.json b/packages/example-contracts/package.json index 3ca4b2ac..bd4c1c55 100644 --- a/packages/example-contracts/package.json +++ b/packages/example-contracts/package.json @@ -30,7 +30,7 @@ "tsconfig-paths": "^3.14.1" }, "dependencies": { - "@openzeppelin/contracts": "4.6.0", + "@openzeppelin/contracts": "4.7.3", "@uniswap/v2-periphery": "1.1.0-beta.0", "@uniswap/v3-periphery": "1.1.0", "@zetachain/addresses": "workspace:^", diff --git a/packages/protocol-contracts/package.json b/packages/protocol-contracts/package.json index 66600b45..f1b8081d 100644 --- a/packages/protocol-contracts/package.json +++ b/packages/protocol-contracts/package.json @@ -31,7 +31,7 @@ "tsconfig-paths": "^3.14.1" }, "dependencies": { - "@openzeppelin/contracts": "4.6.0", + "@openzeppelin/contracts": "4.7.3", "@uniswap/v2-periphery": "1.1.0-beta.0", "@uniswap/v3-periphery": "1.1.0", "ethers": "5.6.8" diff --git a/packages/zevm-contracts/package.json b/packages/zevm-contracts/package.json index 0221a44d..b7846ac1 100644 --- a/packages/zevm-contracts/package.json +++ b/packages/zevm-contracts/package.json @@ -30,7 +30,7 @@ "tsconfig-paths": "^3.14.1" }, "dependencies": { - "@openzeppelin/contracts": "4.6.0", + "@openzeppelin/contracts": "4.7.3", "@uniswap/v2-periphery": "1.1.0-beta.0", "@zetachain/addresses": "workspace:^", "@zetachain/addresses-tools": "workspace:^", diff --git a/yarn.lock b/yarn.lock index 5d658b40..78110386 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1597,10 +1597,10 @@ __metadata: languageName: node linkType: hard -"@openzeppelin/contracts@npm:4.6.0": - version: 4.6.0 - resolution: "@openzeppelin/contracts@npm:4.6.0" - checksum: 1de06211b279d7aef2bb9abbdd58eb80c71256f7e888a10855ea23bb06ef8723b22fb550d06af60247dfbd7f0f23de9821732012d7541a823339070a8442d1db +"@openzeppelin/contracts@npm:4.7.3": + version: 4.7.3 + resolution: "@openzeppelin/contracts@npm:4.7.3" + checksum: 18382fcacf7cfd652f5dd0e70c08f08ea74eaa8ff11e9f9850639ada70198ae01a3f9493d89a52d724f2db394e9616bf6258017804612ba273167cf657fbb073 languageName: node linkType: hard @@ -2574,7 +2574,7 @@ __metadata: resolution: "@zetachain/example-contracts@workspace:packages/example-contracts" dependencies: "@defi-wonderland/smock": ^2.0.7 - "@openzeppelin/contracts": 4.6.0 + "@openzeppelin/contracts": 4.7.3 "@uniswap/v2-periphery": 1.1.0-beta.0 "@uniswap/v3-periphery": 1.1.0 "@zetachain/addresses": "workspace:^" @@ -2598,7 +2598,7 @@ __metadata: version: 0.0.0-use.local resolution: "@zetachain/protocol-contracts@workspace:packages/protocol-contracts" dependencies: - "@openzeppelin/contracts": 4.6.0 + "@openzeppelin/contracts": 4.7.3 "@uniswap/v2-periphery": 1.1.0-beta.0 "@uniswap/v3-periphery": 1.1.0 "@zetachain/addresses": "workspace:^" @@ -2615,7 +2615,7 @@ __metadata: resolution: "@zetachain/zevm-contracts@workspace:packages/zevm-contracts" dependencies: "@defi-wonderland/smock": ^2.0.7 - "@openzeppelin/contracts": 4.6.0 + "@openzeppelin/contracts": 4.7.3 "@uniswap/v2-periphery": 1.1.0-beta.0 "@zetachain/addresses": "workspace:^" "@zetachain/addresses-tools": "workspace:^" From cfe525cce06e2dd89b3ceca795c5f986bee31354 Mon Sep 17 00:00:00 2001 From: Andres Martin Aiello <50411235+andresaiello@users.noreply.github.com> Date: Wed, 25 Jan 2023 13:16:20 -0300 Subject: [PATCH 052/115] Missing zero address check in (#62) * Missing zero address check in Signed-off-by: Andres Aiello * test signed Signed-off-by: Andres Aiello * test signed Signed-off-by: Andres Aiello Signed-off-by: Andres Aiello --- .../MultiChainSwapUniV2.strategy.sol | 23 +- .../test/MultiChainSwapZetaConnector.sol | 3 +- .../multi-chain-value/MultiChainValue.sol | 7 +- .../lib/shared/network.constants.ts | 12 + .../ZetaInteractor.sol/ZetaInteractor.json | 5 + .../WETH9.json | 53 +++ .../ZetaTokenConsumerTrident.json | 300 +++++++++++++ .../ZetaTokenConsumerTridentErrors.json | 17 + .../ZetaTokenConsumerUniV2Errors.json | 5 - .../ZetaTokenConsumerUniV3Errors.json | 5 - .../ConnectorErrors.sol/ConnectorErrors.json | 5 - .../ConcentratedLiquidityPoolFactory.json | 36 ++ .../TridentIPoolRouter.sol/IPoolRouter.json | 229 ++++++++++ .../ZetaInterfaces.sol/ZetaCommonErrors.json | 7 + .../ZetaInteractorMock.json | 5 + .../WETH9.ts | 184 ++++++++ .../ZetaTokenConsumerTrident.ts | 417 ++++++++++++++++++ .../ZetaTokenConsumerTridentErrors.ts | 56 +++ .../index.ts | 6 + .../typechain-types/contracts/index.ts | 2 + .../ConcentratedLiquidityPoolFactory.ts | 116 +++++ .../index.ts | 4 + .../TridentIPoolRouter.sol/IPoolRouter.ts | 354 +++++++++++++++ .../TridentIPoolRouter.sol/index.ts | 4 + .../ZetaInterfaces.sol/ZetaCommonErrors.ts | 55 +++ .../interfaces/ZetaInterfaces.sol/index.ts | 1 + .../contracts/interfaces/index.ts | 4 + .../Zeta.non-eth.sol/ZetaNonEth__factory.ts | 2 +- .../ZetaConnectorBase__factory.ts | 2 +- .../ZetaConnectorEth__factory.ts | 2 +- .../ZetaConnectorNonEth__factory.ts | 2 +- .../contracts/ZetaInteractor__factory.ts | 5 + .../WETH9__factory.ts | 74 ++++ ...ZetaTokenConsumerTridentErrors__factory.ts | 45 ++ .../ZetaTokenConsumerTrident__factory.ts | 384 ++++++++++++++++ .../index.ts | 6 + .../ZetaTokenConsumerUniV2Errors__factory.ts | 5 - .../ZetaTokenConsumerUniV2__factory.ts | 2 +- .../ZetaTokenConsumerUniV3Errors__factory.ts | 5 - .../ZetaTokenConsumerUniV3__factory.ts | 2 +- .../factories/contracts/index.ts | 1 + .../interfaces/ConnectorErrors__factory.ts | 5 - ...ncentratedLiquidityPoolFactory__factory.ts | 66 +++ .../index.ts | 4 + .../IPoolRouter__factory.ts | 253 +++++++++++ .../TridentIPoolRouter.sol/index.ts | 4 + .../ZetaCommonErrors__factory.ts | 31 ++ .../interfaces/ZetaInterfaces.sol/index.ts | 1 + .../factories/contracts/interfaces/index.ts | 2 + .../testing/ZetaInteractorMock__factory.ts | 7 +- .../testing/ZetaReceiverMock__factory.ts | 2 +- .../interfaces/typechain-types/hardhat.d.ts | 54 +++ packages/interfaces/typechain-types/index.ts | 14 +- .../contracts/Zeta.non-eth.sol | 6 +- .../contracts/ZetaConnector.base.sol | 15 +- .../contracts/ZetaInteractor.sol | 1 + .../ZetaTokenConsumerTrident.strategy.sol | 29 +- .../ZetaTokenConsumerUniV2.strategy.sol | 22 +- .../ZetaTokenConsumerUniV3.strategy.sol | 22 +- .../contracts/interfaces/ConnectorErrors.sol | 2 - .../contracts/interfaces/ZetaInterfaces.sol | 4 + .../test/ZetaInteractor.spec.ts | 23 +- .../contracts/zeta-swap/ZetaCurveSwapDemo.sol | 30 +- .../contracts/zeta-swap/ZetaSwap.sol | 2 + 64 files changed, 2905 insertions(+), 146 deletions(-) create mode 100644 packages/interfaces/abi/json/contracts/ZetaTokenConsumerTrident.strategy.sol/WETH9.json create mode 100644 packages/interfaces/abi/json/contracts/ZetaTokenConsumerTrident.strategy.sol/ZetaTokenConsumerTrident.json create mode 100644 packages/interfaces/abi/json/contracts/ZetaTokenConsumerTrident.strategy.sol/ZetaTokenConsumerTridentErrors.json create mode 100644 packages/interfaces/abi/json/contracts/interfaces/TridentConcentratedLiquidityPoolFactory.sol/ConcentratedLiquidityPoolFactory.json create mode 100644 packages/interfaces/abi/json/contracts/interfaces/TridentIPoolRouter.sol/IPoolRouter.json create mode 100644 packages/interfaces/abi/json/contracts/interfaces/ZetaInterfaces.sol/ZetaCommonErrors.json create mode 100644 packages/interfaces/typechain-types/contracts/ZetaTokenConsumerTrident.strategy.sol/WETH9.ts create mode 100644 packages/interfaces/typechain-types/contracts/ZetaTokenConsumerTrident.strategy.sol/ZetaTokenConsumerTrident.ts create mode 100644 packages/interfaces/typechain-types/contracts/ZetaTokenConsumerTrident.strategy.sol/ZetaTokenConsumerTridentErrors.ts create mode 100644 packages/interfaces/typechain-types/contracts/ZetaTokenConsumerTrident.strategy.sol/index.ts create mode 100644 packages/interfaces/typechain-types/contracts/interfaces/TridentConcentratedLiquidityPoolFactory.sol/ConcentratedLiquidityPoolFactory.ts create mode 100644 packages/interfaces/typechain-types/contracts/interfaces/TridentConcentratedLiquidityPoolFactory.sol/index.ts create mode 100644 packages/interfaces/typechain-types/contracts/interfaces/TridentIPoolRouter.sol/IPoolRouter.ts create mode 100644 packages/interfaces/typechain-types/contracts/interfaces/TridentIPoolRouter.sol/index.ts create mode 100644 packages/interfaces/typechain-types/contracts/interfaces/ZetaInterfaces.sol/ZetaCommonErrors.ts create mode 100644 packages/interfaces/typechain-types/factories/contracts/ZetaTokenConsumerTrident.strategy.sol/WETH9__factory.ts create mode 100644 packages/interfaces/typechain-types/factories/contracts/ZetaTokenConsumerTrident.strategy.sol/ZetaTokenConsumerTridentErrors__factory.ts create mode 100644 packages/interfaces/typechain-types/factories/contracts/ZetaTokenConsumerTrident.strategy.sol/ZetaTokenConsumerTrident__factory.ts create mode 100644 packages/interfaces/typechain-types/factories/contracts/ZetaTokenConsumerTrident.strategy.sol/index.ts create mode 100644 packages/interfaces/typechain-types/factories/contracts/interfaces/TridentConcentratedLiquidityPoolFactory.sol/ConcentratedLiquidityPoolFactory__factory.ts create mode 100644 packages/interfaces/typechain-types/factories/contracts/interfaces/TridentConcentratedLiquidityPoolFactory.sol/index.ts create mode 100644 packages/interfaces/typechain-types/factories/contracts/interfaces/TridentIPoolRouter.sol/IPoolRouter__factory.ts create mode 100644 packages/interfaces/typechain-types/factories/contracts/interfaces/TridentIPoolRouter.sol/index.ts create mode 100644 packages/interfaces/typechain-types/factories/contracts/interfaces/ZetaInterfaces.sol/ZetaCommonErrors__factory.ts diff --git a/packages/example-contracts/contracts/multi-chain-swap/MultiChainSwapUniV2.strategy.sol b/packages/example-contracts/contracts/multi-chain-swap/MultiChainSwapUniV2.strategy.sol index ce05be56..3dba451e 100644 --- a/packages/example-contracts/contracts/multi-chain-swap/MultiChainSwapUniV2.strategy.sol +++ b/packages/example-contracts/contracts/multi-chain-swap/MultiChainSwapUniV2.strategy.sol @@ -19,11 +19,8 @@ contract MultiChainSwapUniV2 is MultiChainSwap, ZetaInteractor, MultiChainSwapEr IUniswapV2Router02 internal uniswapV2Router; - constructor( - address zetaConnector_, - address zetaToken_, - address uniswapV2Router_ - ) ZetaInteractor(zetaConnector_) { + constructor(address zetaConnector_, address zetaToken_, address uniswapV2Router_) ZetaInteractor(zetaConnector_) { + if (zetaToken_ == address(0) || uniswapV2Router_ == address(0)) revert ZetaCommonErrors.InvalidAddress(); zetaToken = zetaToken_; uniswapV2RouterAddress = uniswapV2Router_; uniswapV2Router = IUniswapV2Router02(uniswapV2Router_); @@ -184,11 +181,9 @@ contract MultiChainSwapUniV2 is MultiChainSwap, ZetaInteractor, MultiChainSwapEr ); } - function onZetaMessage(ZetaInterfaces.ZetaMessage calldata zetaMessage) - external - override - isValidMessageCall(zetaMessage) - { + function onZetaMessage( + ZetaInterfaces.ZetaMessage calldata zetaMessage + ) external override isValidMessageCall(zetaMessage) { ( bytes32 messageType, address sourceTxOrigin, @@ -268,11 +263,9 @@ contract MultiChainSwapUniV2 is MultiChainSwap, ZetaInteractor, MultiChainSwapEr ); } - function onZetaRevert(ZetaInterfaces.ZetaRevert calldata zetaRevert) - external - override - isValidRevertCall(zetaRevert) - { + function onZetaRevert( + ZetaInterfaces.ZetaRevert calldata zetaRevert + ) external override isValidRevertCall(zetaRevert) { /** * @dev: If something goes wrong we must swap to the source input token */ diff --git a/packages/example-contracts/contracts/multi-chain-swap/test/MultiChainSwapZetaConnector.sol b/packages/example-contracts/contracts/multi-chain-swap/test/MultiChainSwapZetaConnector.sol index 4146c3cf..e89bb745 100644 --- a/packages/example-contracts/contracts/multi-chain-swap/test/MultiChainSwapZetaConnector.sol +++ b/packages/example-contracts/contracts/multi-chain-swap/test/MultiChainSwapZetaConnector.sol @@ -7,9 +7,10 @@ import "@zetachain/protocol-contracts/contracts/interfaces/ZetaInterfaces.sol"; import "../MultiChainSwap.sol"; contract MultiChainSwapZetaConnector is ZetaConnector { - address public zetaToken; + address public immutable zetaToken; constructor(address zetaToken_) { + if (zetaToken_ == address(0)) revert ZetaCommonErrors.InvalidAddress(); zetaToken = zetaToken_; } diff --git a/packages/example-contracts/contracts/multi-chain-value/MultiChainValue.sol b/packages/example-contracts/contracts/multi-chain-value/MultiChainValue.sol index 0bde0c38..f91fc005 100644 --- a/packages/example-contracts/contracts/multi-chain-value/MultiChainValue.sol +++ b/packages/example-contracts/contracts/multi-chain-value/MultiChainValue.sol @@ -21,6 +21,7 @@ contract MultiChainValue is ZetaInteractor, MultiChainValueErrors { mapping(uint256 => bool) public availableChainIds; constructor(address connectorAddress_, address zetaToken_) ZetaInteractor(connectorAddress_) { + if (zetaToken_ == address(0)) revert ZetaCommonErrors.InvalidAddress(); zetaToken = zetaToken_; } @@ -36,11 +37,7 @@ contract MultiChainValue is ZetaInteractor, MultiChainValueErrors { delete availableChainIds[destinationChainId]; } - function send( - uint256 destinationChainId, - bytes calldata destinationAddress, - uint256 zetaValueAndGas - ) external { + function send(uint256 destinationChainId, bytes calldata destinationAddress, uint256 zetaValueAndGas) external { if (!availableChainIds[destinationChainId]) revert InvalidDestinationChainId(); if (zetaValueAndGas == 0) revert InvalidZetaValueAndGas(); diff --git a/packages/example-contracts/lib/shared/network.constants.ts b/packages/example-contracts/lib/shared/network.constants.ts index 4aaa540e..c4489629 100644 --- a/packages/example-contracts/lib/shared/network.constants.ts +++ b/packages/example-contracts/lib/shared/network.constants.ts @@ -10,6 +10,18 @@ export type NetworkVariables = { }; export const networkVariables: Record = { + athens: { + chainId: 0, + connectorAddress: "", + crossChainId: 0, + crossChainName: "" + }, + "bitcoin-test": { + chainId: 0, + connectorAddress: "", + crossChainId: 0, + crossChainName: "" + }, "bsc-localnet": { chainId: 0, connectorAddress: "", diff --git a/packages/interfaces/abi/json/contracts/ZetaInteractor.sol/ZetaInteractor.json b/packages/interfaces/abi/json/contracts/ZetaInteractor.sol/ZetaInteractor.json index 4f8a706c..c9c47ad2 100644 --- a/packages/interfaces/abi/json/contracts/ZetaInteractor.sol/ZetaInteractor.json +++ b/packages/interfaces/abi/json/contracts/ZetaInteractor.sol/ZetaInteractor.json @@ -1,4 +1,9 @@ [ + { + "inputs": [], + "name": "InvalidAddress", + "type": "error" + }, { "inputs": [ { diff --git a/packages/interfaces/abi/json/contracts/ZetaTokenConsumerTrident.strategy.sol/WETH9.json b/packages/interfaces/abi/json/contracts/ZetaTokenConsumerTrident.strategy.sol/WETH9.json new file mode 100644 index 00000000..ee1a6bf7 --- /dev/null +++ b/packages/interfaces/abi/json/contracts/ZetaTokenConsumerTrident.strategy.sol/WETH9.json @@ -0,0 +1,53 @@ +[ + { + "inputs": [], + "name": "deposit", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "to", + "type": "address" + } + ], + "name": "depositTo", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "wad", + "type": "uint256" + } + ], + "name": "withdraw", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address payable", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "withdrawTo", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } +] diff --git a/packages/interfaces/abi/json/contracts/ZetaTokenConsumerTrident.strategy.sol/ZetaTokenConsumerTrident.json b/packages/interfaces/abi/json/contracts/ZetaTokenConsumerTrident.strategy.sol/ZetaTokenConsumerTrident.json new file mode 100644 index 00000000..2568adad --- /dev/null +++ b/packages/interfaces/abi/json/contracts/ZetaTokenConsumerTrident.strategy.sol/ZetaTokenConsumerTrident.json @@ -0,0 +1,300 @@ +[ + { + "inputs": [ + { + "internalType": "address", + "name": "zetaToken_", + "type": "address" + }, + { + "internalType": "address", + "name": "uniswapV3Router_", + "type": "address" + }, + { + "internalType": "address", + "name": "WETH9Address_", + "type": "address" + }, + { + "internalType": "address", + "name": "poolFactory_", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "inputs": [], + "name": "ErrorSendingETH", + "type": "error" + }, + { + "inputs": [], + "name": "InputCantBeZero", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidAddress", + "type": "error" + }, + { + "inputs": [], + "name": "ReentrancyError", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "amountIn", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amountOut", + "type": "uint256" + } + ], + "name": "EthExchangedForZeta", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "token", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amountIn", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amountOut", + "type": "uint256" + } + ], + "name": "TokenExchangedForZeta", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "amountIn", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amountOut", + "type": "uint256" + } + ], + "name": "ZetaExchangedForEth", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "token", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amountIn", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amountOut", + "type": "uint256" + } + ], + "name": "ZetaExchangedForToken", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "destinationAddress", + "type": "address" + }, + { + "internalType": "uint256", + "name": "minAmountOut", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "zetaTokenAmount", + "type": "uint256" + } + ], + "name": "getEthFromZeta", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "destinationAddress", + "type": "address" + }, + { + "internalType": "uint256", + "name": "minAmountOut", + "type": "uint256" + }, + { + "internalType": "address", + "name": "outputToken", + "type": "address" + }, + { + "internalType": "uint256", + "name": "zetaTokenAmount", + "type": "uint256" + } + ], + "name": "getTokenFromZeta", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "destinationAddress", + "type": "address" + }, + { + "internalType": "uint256", + "name": "minAmountOut", + "type": "uint256" + } + ], + "name": "getZetaFromEth", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "destinationAddress", + "type": "address" + }, + { + "internalType": "uint256", + "name": "minAmountOut", + "type": "uint256" + }, + { + "internalType": "address", + "name": "inputToken", + "type": "address" + }, + { + "internalType": "uint256", + "name": "inputTokenAmount", + "type": "uint256" + } + ], + "name": "getZetaFromToken", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "poolFactory", + "outputs": [ + { + "internalType": "contract ConcentratedLiquidityPoolFactory", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "tridentRouter", + "outputs": [ + { + "internalType": "contract IPoolRouter", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "zetaToken", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "stateMutability": "payable", + "type": "receive" + } +] diff --git a/packages/interfaces/abi/json/contracts/ZetaTokenConsumerTrident.strategy.sol/ZetaTokenConsumerTridentErrors.json b/packages/interfaces/abi/json/contracts/ZetaTokenConsumerTrident.strategy.sol/ZetaTokenConsumerTridentErrors.json new file mode 100644 index 00000000..9b4f88fd --- /dev/null +++ b/packages/interfaces/abi/json/contracts/ZetaTokenConsumerTrident.strategy.sol/ZetaTokenConsumerTridentErrors.json @@ -0,0 +1,17 @@ +[ + { + "inputs": [], + "name": "ErrorSendingETH", + "type": "error" + }, + { + "inputs": [], + "name": "InputCantBeZero", + "type": "error" + }, + { + "inputs": [], + "name": "ReentrancyError", + "type": "error" + } +] diff --git a/packages/interfaces/abi/json/contracts/ZetaTokenConsumerUniV2.strategy.sol/ZetaTokenConsumerUniV2Errors.json b/packages/interfaces/abi/json/contracts/ZetaTokenConsumerUniV2.strategy.sol/ZetaTokenConsumerUniV2Errors.json index 58399351..6f676ed8 100644 --- a/packages/interfaces/abi/json/contracts/ZetaTokenConsumerUniV2.strategy.sol/ZetaTokenConsumerUniV2Errors.json +++ b/packages/interfaces/abi/json/contracts/ZetaTokenConsumerUniV2.strategy.sol/ZetaTokenConsumerUniV2Errors.json @@ -3,10 +3,5 @@ "inputs": [], "name": "InputCantBeZero", "type": "error" - }, - { - "inputs": [], - "name": "InvalidAddress", - "type": "error" } ] diff --git a/packages/interfaces/abi/json/contracts/ZetaTokenConsumerUniV3.strategy.sol/ZetaTokenConsumerUniV3Errors.json b/packages/interfaces/abi/json/contracts/ZetaTokenConsumerUniV3.strategy.sol/ZetaTokenConsumerUniV3Errors.json index c358ff10..9b4f88fd 100644 --- a/packages/interfaces/abi/json/contracts/ZetaTokenConsumerUniV3.strategy.sol/ZetaTokenConsumerUniV3Errors.json +++ b/packages/interfaces/abi/json/contracts/ZetaTokenConsumerUniV3.strategy.sol/ZetaTokenConsumerUniV3Errors.json @@ -9,11 +9,6 @@ "name": "InputCantBeZero", "type": "error" }, - { - "inputs": [], - "name": "InvalidAddress", - "type": "error" - }, { "inputs": [], "name": "ReentrancyError", diff --git a/packages/interfaces/abi/json/contracts/interfaces/ConnectorErrors.sol/ConnectorErrors.json b/packages/interfaces/abi/json/contracts/interfaces/ConnectorErrors.sol/ConnectorErrors.json index 616428da..76090930 100644 --- a/packages/interfaces/abi/json/contracts/interfaces/ConnectorErrors.sol/ConnectorErrors.json +++ b/packages/interfaces/abi/json/contracts/interfaces/ConnectorErrors.sol/ConnectorErrors.json @@ -54,11 +54,6 @@ "name": "ExceedsMaxSupply", "type": "error" }, - { - "inputs": [], - "name": "InvalidAddress", - "type": "error" - }, { "inputs": [], "name": "ZetaTransferError", diff --git a/packages/interfaces/abi/json/contracts/interfaces/TridentConcentratedLiquidityPoolFactory.sol/ConcentratedLiquidityPoolFactory.json b/packages/interfaces/abi/json/contracts/interfaces/TridentConcentratedLiquidityPoolFactory.sol/ConcentratedLiquidityPoolFactory.json new file mode 100644 index 00000000..9a7fd0d3 --- /dev/null +++ b/packages/interfaces/abi/json/contracts/interfaces/TridentConcentratedLiquidityPoolFactory.sol/ConcentratedLiquidityPoolFactory.json @@ -0,0 +1,36 @@ +[ + { + "inputs": [ + { + "internalType": "address", + "name": "token0", + "type": "address" + }, + { + "internalType": "address", + "name": "token1", + "type": "address" + }, + { + "internalType": "uint256", + "name": "startIndex", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "count", + "type": "uint256" + } + ], + "name": "getPools", + "outputs": [ + { + "internalType": "address[]", + "name": "pairPools", + "type": "address[]" + } + ], + "stateMutability": "view", + "type": "function" + } +] diff --git a/packages/interfaces/abi/json/contracts/interfaces/TridentIPoolRouter.sol/IPoolRouter.json b/packages/interfaces/abi/json/contracts/interfaces/TridentIPoolRouter.sol/IPoolRouter.json new file mode 100644 index 00000000..ac14d7c7 --- /dev/null +++ b/packages/interfaces/abi/json/contracts/interfaces/TridentIPoolRouter.sol/IPoolRouter.json @@ -0,0 +1,229 @@ +[ + { + "inputs": [ + { + "components": [ + { + "internalType": "address", + "name": "tokenIn", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amountIn", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "amountOutMinimum", + "type": "uint256" + }, + { + "internalType": "address[]", + "name": "path", + "type": "address[]" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "bool", + "name": "unwrap", + "type": "bool" + } + ], + "internalType": "struct IPoolRouter.ExactInputParams", + "name": "params", + "type": "tuple" + } + ], + "name": "exactInput", + "outputs": [ + { + "internalType": "uint256", + "name": "amountOut", + "type": "uint256" + } + ], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "components": [ + { + "internalType": "address", + "name": "tokenIn", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amountIn", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "amountOutMinimum", + "type": "uint256" + }, + { + "internalType": "address", + "name": "pool", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "bool", + "name": "unwrap", + "type": "bool" + } + ], + "internalType": "struct IPoolRouter.ExactInputSingleParams", + "name": "params", + "type": "tuple" + } + ], + "name": "exactInputSingle", + "outputs": [ + { + "internalType": "uint256", + "name": "amountOut", + "type": "uint256" + } + ], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "components": [ + { + "internalType": "address", + "name": "tokenIn", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amountOut", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "amountInMaximum", + "type": "uint256" + }, + { + "internalType": "address[]", + "name": "path", + "type": "address[]" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "bool", + "name": "unwrap", + "type": "bool" + } + ], + "internalType": "struct IPoolRouter.ExactOutputParams", + "name": "params", + "type": "tuple" + } + ], + "name": "exactOutput", + "outputs": [ + { + "internalType": "uint256", + "name": "amountIn", + "type": "uint256" + } + ], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "components": [ + { + "internalType": "address", + "name": "tokenIn", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amountOut", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "amountInMaximum", + "type": "uint256" + }, + { + "internalType": "address", + "name": "pool", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "bool", + "name": "unwrap", + "type": "bool" + } + ], + "internalType": "struct IPoolRouter.ExactOutputSingleParams", + "name": "params", + "type": "tuple" + } + ], + "name": "exactOutputSingle", + "outputs": [ + { + "internalType": "uint256", + "name": "amountIn", + "type": "uint256" + } + ], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "token", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + }, + { + "internalType": "address", + "name": "recipient", + "type": "address" + } + ], + "name": "sweep", + "outputs": [], + "stateMutability": "payable", + "type": "function" + } +] diff --git a/packages/interfaces/abi/json/contracts/interfaces/ZetaInterfaces.sol/ZetaCommonErrors.json b/packages/interfaces/abi/json/contracts/interfaces/ZetaInterfaces.sol/ZetaCommonErrors.json new file mode 100644 index 00000000..d64d606e --- /dev/null +++ b/packages/interfaces/abi/json/contracts/interfaces/ZetaInterfaces.sol/ZetaCommonErrors.json @@ -0,0 +1,7 @@ +[ + { + "inputs": [], + "name": "InvalidAddress", + "type": "error" + } +] diff --git a/packages/interfaces/abi/json/contracts/testing/ZetaInteractorMock.sol/ZetaInteractorMock.json b/packages/interfaces/abi/json/contracts/testing/ZetaInteractorMock.sol/ZetaInteractorMock.json index 6adffa9c..e352d295 100644 --- a/packages/interfaces/abi/json/contracts/testing/ZetaInteractorMock.sol/ZetaInteractorMock.json +++ b/packages/interfaces/abi/json/contracts/testing/ZetaInteractorMock.sol/ZetaInteractorMock.json @@ -10,6 +10,11 @@ "stateMutability": "nonpayable", "type": "constructor" }, + { + "inputs": [], + "name": "InvalidAddress", + "type": "error" + }, { "inputs": [ { diff --git a/packages/interfaces/typechain-types/contracts/ZetaTokenConsumerTrident.strategy.sol/WETH9.ts b/packages/interfaces/typechain-types/contracts/ZetaTokenConsumerTrident.strategy.sol/WETH9.ts new file mode 100644 index 00000000..12ffd5b2 --- /dev/null +++ b/packages/interfaces/typechain-types/contracts/ZetaTokenConsumerTrident.strategy.sol/WETH9.ts @@ -0,0 +1,184 @@ +/* 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 } from "@ethersproject/abi"; +import type { Listener, Provider } from "@ethersproject/providers"; +import type { + TypedEventFilter, + TypedEvent, + TypedListener, + OnEvent, +} from "../../common"; + +export interface WETH9Interface extends utils.Interface { + functions: { + "deposit()": FunctionFragment; + "depositTo(address)": FunctionFragment; + "withdraw(uint256)": FunctionFragment; + "withdrawTo(address,uint256)": FunctionFragment; + }; + + getFunction( + nameOrSignatureOrTopic: "deposit" | "depositTo" | "withdraw" | "withdrawTo" + ): FunctionFragment; + + encodeFunctionData(functionFragment: "deposit", values?: undefined): string; + encodeFunctionData(functionFragment: "depositTo", values: [string]): string; + encodeFunctionData( + functionFragment: "withdraw", + values: [BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "withdrawTo", + values: [string, BigNumberish] + ): string; + + decodeFunctionResult(functionFragment: "deposit", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "depositTo", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "withdraw", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "withdrawTo", data: BytesLike): Result; + + events: {}; +} + +export interface WETH9 extends BaseContract { + connect(signerOrProvider: Signer | Provider | string): this; + attach(addressOrName: string): this; + deployed(): Promise; + + interface: WETH9Interface; + + 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: { + deposit( + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + + depositTo( + to: string, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + + withdraw( + wad: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + withdrawTo( + to: string, + value: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + }; + + deposit( + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + + depositTo( + to: string, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + + withdraw( + wad: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + withdrawTo( + to: string, + value: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + callStatic: { + deposit(overrides?: CallOverrides): Promise; + + depositTo(to: string, overrides?: CallOverrides): Promise; + + withdraw(wad: BigNumberish, overrides?: CallOverrides): Promise; + + withdrawTo( + to: string, + value: BigNumberish, + overrides?: CallOverrides + ): Promise; + }; + + filters: {}; + + estimateGas: { + deposit( + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + + depositTo( + to: string, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + + withdraw( + wad: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + withdrawTo( + to: string, + value: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + }; + + populateTransaction: { + deposit( + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + + depositTo( + to: string, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + + withdraw( + wad: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + withdrawTo( + to: string, + value: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + }; +} diff --git a/packages/interfaces/typechain-types/contracts/ZetaTokenConsumerTrident.strategy.sol/ZetaTokenConsumerTrident.ts b/packages/interfaces/typechain-types/contracts/ZetaTokenConsumerTrident.strategy.sol/ZetaTokenConsumerTrident.ts new file mode 100644 index 00000000..a41c92ce --- /dev/null +++ b/packages/interfaces/typechain-types/contracts/ZetaTokenConsumerTrident.strategy.sol/ZetaTokenConsumerTrident.ts @@ -0,0 +1,417 @@ +/* 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, +} from "../../common"; + +export interface ZetaTokenConsumerTridentInterface extends utils.Interface { + functions: { + "getEthFromZeta(address,uint256,uint256)": FunctionFragment; + "getTokenFromZeta(address,uint256,address,uint256)": FunctionFragment; + "getZetaFromEth(address,uint256)": FunctionFragment; + "getZetaFromToken(address,uint256,address,uint256)": FunctionFragment; + "poolFactory()": FunctionFragment; + "tridentRouter()": FunctionFragment; + "zetaToken()": FunctionFragment; + }; + + getFunction( + nameOrSignatureOrTopic: + | "getEthFromZeta" + | "getTokenFromZeta" + | "getZetaFromEth" + | "getZetaFromToken" + | "poolFactory" + | "tridentRouter" + | "zetaToken" + ): FunctionFragment; + + encodeFunctionData( + functionFragment: "getEthFromZeta", + values: [string, BigNumberish, BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "getTokenFromZeta", + values: [string, BigNumberish, string, BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "getZetaFromEth", + values: [string, BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "getZetaFromToken", + values: [string, BigNumberish, string, BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "poolFactory", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "tridentRouter", + values?: undefined + ): string; + encodeFunctionData(functionFragment: "zetaToken", values?: undefined): string; + + decodeFunctionResult( + functionFragment: "getEthFromZeta", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "getTokenFromZeta", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "getZetaFromEth", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "getZetaFromToken", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "poolFactory", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "tridentRouter", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "zetaToken", data: BytesLike): Result; + + events: { + "EthExchangedForZeta(uint256,uint256)": EventFragment; + "TokenExchangedForZeta(address,uint256,uint256)": EventFragment; + "ZetaExchangedForEth(uint256,uint256)": EventFragment; + "ZetaExchangedForToken(address,uint256,uint256)": EventFragment; + }; + + getEvent(nameOrSignatureOrTopic: "EthExchangedForZeta"): EventFragment; + getEvent(nameOrSignatureOrTopic: "TokenExchangedForZeta"): EventFragment; + getEvent(nameOrSignatureOrTopic: "ZetaExchangedForEth"): EventFragment; + getEvent(nameOrSignatureOrTopic: "ZetaExchangedForToken"): EventFragment; +} + +export interface EthExchangedForZetaEventObject { + amountIn: BigNumber; + amountOut: BigNumber; +} +export type EthExchangedForZetaEvent = TypedEvent< + [BigNumber, BigNumber], + EthExchangedForZetaEventObject +>; + +export type EthExchangedForZetaEventFilter = + TypedEventFilter; + +export interface TokenExchangedForZetaEventObject { + token: string; + amountIn: BigNumber; + amountOut: BigNumber; +} +export type TokenExchangedForZetaEvent = TypedEvent< + [string, BigNumber, BigNumber], + TokenExchangedForZetaEventObject +>; + +export type TokenExchangedForZetaEventFilter = + TypedEventFilter; + +export interface ZetaExchangedForEthEventObject { + amountIn: BigNumber; + amountOut: BigNumber; +} +export type ZetaExchangedForEthEvent = TypedEvent< + [BigNumber, BigNumber], + ZetaExchangedForEthEventObject +>; + +export type ZetaExchangedForEthEventFilter = + TypedEventFilter; + +export interface ZetaExchangedForTokenEventObject { + token: string; + amountIn: BigNumber; + amountOut: BigNumber; +} +export type ZetaExchangedForTokenEvent = TypedEvent< + [string, BigNumber, BigNumber], + ZetaExchangedForTokenEventObject +>; + +export type ZetaExchangedForTokenEventFilter = + TypedEventFilter; + +export interface ZetaTokenConsumerTrident extends BaseContract { + connect(signerOrProvider: Signer | Provider | string): this; + attach(addressOrName: string): this; + deployed(): Promise; + + interface: ZetaTokenConsumerTridentInterface; + + 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: { + getEthFromZeta( + destinationAddress: string, + minAmountOut: BigNumberish, + zetaTokenAmount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + getTokenFromZeta( + destinationAddress: string, + minAmountOut: BigNumberish, + outputToken: string, + zetaTokenAmount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + getZetaFromEth( + destinationAddress: string, + minAmountOut: BigNumberish, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + + getZetaFromToken( + destinationAddress: string, + minAmountOut: BigNumberish, + inputToken: string, + inputTokenAmount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + poolFactory(overrides?: CallOverrides): Promise<[string]>; + + tridentRouter(overrides?: CallOverrides): Promise<[string]>; + + zetaToken(overrides?: CallOverrides): Promise<[string]>; + }; + + getEthFromZeta( + destinationAddress: string, + minAmountOut: BigNumberish, + zetaTokenAmount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + getTokenFromZeta( + destinationAddress: string, + minAmountOut: BigNumberish, + outputToken: string, + zetaTokenAmount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + getZetaFromEth( + destinationAddress: string, + minAmountOut: BigNumberish, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + + getZetaFromToken( + destinationAddress: string, + minAmountOut: BigNumberish, + inputToken: string, + inputTokenAmount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + poolFactory(overrides?: CallOverrides): Promise; + + tridentRouter(overrides?: CallOverrides): Promise; + + zetaToken(overrides?: CallOverrides): Promise; + + callStatic: { + getEthFromZeta( + destinationAddress: string, + minAmountOut: BigNumberish, + zetaTokenAmount: BigNumberish, + overrides?: CallOverrides + ): Promise; + + getTokenFromZeta( + destinationAddress: string, + minAmountOut: BigNumberish, + outputToken: string, + zetaTokenAmount: BigNumberish, + overrides?: CallOverrides + ): Promise; + + getZetaFromEth( + destinationAddress: string, + minAmountOut: BigNumberish, + overrides?: CallOverrides + ): Promise; + + getZetaFromToken( + destinationAddress: string, + minAmountOut: BigNumberish, + inputToken: string, + inputTokenAmount: BigNumberish, + overrides?: CallOverrides + ): Promise; + + poolFactory(overrides?: CallOverrides): Promise; + + tridentRouter(overrides?: CallOverrides): Promise; + + zetaToken(overrides?: CallOverrides): Promise; + }; + + filters: { + "EthExchangedForZeta(uint256,uint256)"( + amountIn?: null, + amountOut?: null + ): EthExchangedForZetaEventFilter; + EthExchangedForZeta( + amountIn?: null, + amountOut?: null + ): EthExchangedForZetaEventFilter; + + "TokenExchangedForZeta(address,uint256,uint256)"( + token?: null, + amountIn?: null, + amountOut?: null + ): TokenExchangedForZetaEventFilter; + TokenExchangedForZeta( + token?: null, + amountIn?: null, + amountOut?: null + ): TokenExchangedForZetaEventFilter; + + "ZetaExchangedForEth(uint256,uint256)"( + amountIn?: null, + amountOut?: null + ): ZetaExchangedForEthEventFilter; + ZetaExchangedForEth( + amountIn?: null, + amountOut?: null + ): ZetaExchangedForEthEventFilter; + + "ZetaExchangedForToken(address,uint256,uint256)"( + token?: null, + amountIn?: null, + amountOut?: null + ): ZetaExchangedForTokenEventFilter; + ZetaExchangedForToken( + token?: null, + amountIn?: null, + amountOut?: null + ): ZetaExchangedForTokenEventFilter; + }; + + estimateGas: { + getEthFromZeta( + destinationAddress: string, + minAmountOut: BigNumberish, + zetaTokenAmount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + getTokenFromZeta( + destinationAddress: string, + minAmountOut: BigNumberish, + outputToken: string, + zetaTokenAmount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + getZetaFromEth( + destinationAddress: string, + minAmountOut: BigNumberish, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + + getZetaFromToken( + destinationAddress: string, + minAmountOut: BigNumberish, + inputToken: string, + inputTokenAmount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + poolFactory(overrides?: CallOverrides): Promise; + + tridentRouter(overrides?: CallOverrides): Promise; + + zetaToken(overrides?: CallOverrides): Promise; + }; + + populateTransaction: { + getEthFromZeta( + destinationAddress: string, + minAmountOut: BigNumberish, + zetaTokenAmount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + getTokenFromZeta( + destinationAddress: string, + minAmountOut: BigNumberish, + outputToken: string, + zetaTokenAmount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + getZetaFromEth( + destinationAddress: string, + minAmountOut: BigNumberish, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + + getZetaFromToken( + destinationAddress: string, + minAmountOut: BigNumberish, + inputToken: string, + inputTokenAmount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + poolFactory(overrides?: CallOverrides): Promise; + + tridentRouter(overrides?: CallOverrides): Promise; + + zetaToken(overrides?: CallOverrides): Promise; + }; +} diff --git a/packages/interfaces/typechain-types/contracts/ZetaTokenConsumerTrident.strategy.sol/ZetaTokenConsumerTridentErrors.ts b/packages/interfaces/typechain-types/contracts/ZetaTokenConsumerTrident.strategy.sol/ZetaTokenConsumerTridentErrors.ts new file mode 100644 index 00000000..49ad3234 --- /dev/null +++ b/packages/interfaces/typechain-types/contracts/ZetaTokenConsumerTrident.strategy.sol/ZetaTokenConsumerTridentErrors.ts @@ -0,0 +1,56 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import type { BaseContract, Signer, utils } from "ethers"; + +import type { Listener, Provider } from "@ethersproject/providers"; +import type { + TypedEventFilter, + TypedEvent, + TypedListener, + OnEvent, +} from "../../common"; + +export interface ZetaTokenConsumerTridentErrorsInterface + extends utils.Interface { + functions: {}; + + events: {}; +} + +export interface ZetaTokenConsumerTridentErrors extends BaseContract { + connect(signerOrProvider: Signer | Provider | string): this; + attach(addressOrName: string): this; + deployed(): Promise; + + interface: ZetaTokenConsumerTridentErrorsInterface; + + 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: {}; + + callStatic: {}; + + filters: {}; + + estimateGas: {}; + + populateTransaction: {}; +} diff --git a/packages/interfaces/typechain-types/contracts/ZetaTokenConsumerTrident.strategy.sol/index.ts b/packages/interfaces/typechain-types/contracts/ZetaTokenConsumerTrident.strategy.sol/index.ts new file mode 100644 index 00000000..8b60d4c3 --- /dev/null +++ b/packages/interfaces/typechain-types/contracts/ZetaTokenConsumerTrident.strategy.sol/index.ts @@ -0,0 +1,6 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +export type { WETH9 } from "./WETH9"; +export type { ZetaTokenConsumerTrident } from "./ZetaTokenConsumerTrident"; +export type { ZetaTokenConsumerTridentErrors } from "./ZetaTokenConsumerTridentErrors"; diff --git a/packages/interfaces/typechain-types/contracts/index.ts b/packages/interfaces/typechain-types/contracts/index.ts index b6d3e651..d464af18 100644 --- a/packages/interfaces/typechain-types/contracts/index.ts +++ b/packages/interfaces/typechain-types/contracts/index.ts @@ -13,6 +13,8 @@ import type * as zetaConnectorEthSol from "./ZetaConnector.eth.sol"; export type { zetaConnectorEthSol }; import type * as zetaConnectorNonEthSol from "./ZetaConnector.non-eth.sol"; export type { zetaConnectorNonEthSol }; +import type * as zetaTokenConsumerTridentStrategySol from "./ZetaTokenConsumerTrident.strategy.sol"; +export type { zetaTokenConsumerTridentStrategySol }; import type * as zetaTokenConsumerUniV2StrategySol from "./ZetaTokenConsumerUniV2.strategy.sol"; export type { zetaTokenConsumerUniV2StrategySol }; import type * as zetaTokenConsumerUniV3StrategySol from "./ZetaTokenConsumerUniV3.strategy.sol"; diff --git a/packages/interfaces/typechain-types/contracts/interfaces/TridentConcentratedLiquidityPoolFactory.sol/ConcentratedLiquidityPoolFactory.ts b/packages/interfaces/typechain-types/contracts/interfaces/TridentConcentratedLiquidityPoolFactory.sol/ConcentratedLiquidityPoolFactory.ts new file mode 100644 index 00000000..8f8721ad --- /dev/null +++ b/packages/interfaces/typechain-types/contracts/interfaces/TridentConcentratedLiquidityPoolFactory.sol/ConcentratedLiquidityPoolFactory.ts @@ -0,0 +1,116 @@ +/* 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, +} from "../../../common"; + +export interface ConcentratedLiquidityPoolFactoryInterface + extends utils.Interface { + functions: { + "getPools(address,address,uint256,uint256)": FunctionFragment; + }; + + getFunction(nameOrSignatureOrTopic: "getPools"): FunctionFragment; + + encodeFunctionData( + functionFragment: "getPools", + values: [string, string, BigNumberish, BigNumberish] + ): string; + + decodeFunctionResult(functionFragment: "getPools", data: BytesLike): Result; + + events: {}; +} + +export interface ConcentratedLiquidityPoolFactory extends BaseContract { + connect(signerOrProvider: Signer | Provider | string): this; + attach(addressOrName: string): this; + deployed(): Promise; + + interface: ConcentratedLiquidityPoolFactoryInterface; + + 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: { + getPools( + token0: string, + token1: string, + startIndex: BigNumberish, + count: BigNumberish, + overrides?: CallOverrides + ): Promise<[string[]] & { pairPools: string[] }>; + }; + + getPools( + token0: string, + token1: string, + startIndex: BigNumberish, + count: BigNumberish, + overrides?: CallOverrides + ): Promise; + + callStatic: { + getPools( + token0: string, + token1: string, + startIndex: BigNumberish, + count: BigNumberish, + overrides?: CallOverrides + ): Promise; + }; + + filters: {}; + + estimateGas: { + getPools( + token0: string, + token1: string, + startIndex: BigNumberish, + count: BigNumberish, + overrides?: CallOverrides + ): Promise; + }; + + populateTransaction: { + getPools( + token0: string, + token1: string, + startIndex: BigNumberish, + count: BigNumberish, + overrides?: CallOverrides + ): Promise; + }; +} diff --git a/packages/interfaces/typechain-types/contracts/interfaces/TridentConcentratedLiquidityPoolFactory.sol/index.ts b/packages/interfaces/typechain-types/contracts/interfaces/TridentConcentratedLiquidityPoolFactory.sol/index.ts new file mode 100644 index 00000000..fda1a582 --- /dev/null +++ b/packages/interfaces/typechain-types/contracts/interfaces/TridentConcentratedLiquidityPoolFactory.sol/index.ts @@ -0,0 +1,4 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +export type { ConcentratedLiquidityPoolFactory } from "./ConcentratedLiquidityPoolFactory"; diff --git a/packages/interfaces/typechain-types/contracts/interfaces/TridentIPoolRouter.sol/IPoolRouter.ts b/packages/interfaces/typechain-types/contracts/interfaces/TridentIPoolRouter.sol/IPoolRouter.ts new file mode 100644 index 00000000..da234b6a --- /dev/null +++ b/packages/interfaces/typechain-types/contracts/interfaces/TridentIPoolRouter.sol/IPoolRouter.ts @@ -0,0 +1,354 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import type { + BaseContract, + BigNumber, + BigNumberish, + BytesLike, + CallOverrides, + ContractTransaction, + PayableOverrides, + 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, +} from "../../../common"; + +export declare namespace IPoolRouter { + export type ExactInputParamsStruct = { + tokenIn: string; + amountIn: BigNumberish; + amountOutMinimum: BigNumberish; + path: string[]; + to: string; + unwrap: boolean; + }; + + export type ExactInputParamsStructOutput = [ + string, + BigNumber, + BigNumber, + string[], + string, + boolean + ] & { + tokenIn: string; + amountIn: BigNumber; + amountOutMinimum: BigNumber; + path: string[]; + to: string; + unwrap: boolean; + }; + + export type ExactInputSingleParamsStruct = { + tokenIn: string; + amountIn: BigNumberish; + amountOutMinimum: BigNumberish; + pool: string; + to: string; + unwrap: boolean; + }; + + export type ExactInputSingleParamsStructOutput = [ + string, + BigNumber, + BigNumber, + string, + string, + boolean + ] & { + tokenIn: string; + amountIn: BigNumber; + amountOutMinimum: BigNumber; + pool: string; + to: string; + unwrap: boolean; + }; + + export type ExactOutputParamsStruct = { + tokenIn: string; + amountOut: BigNumberish; + amountInMaximum: BigNumberish; + path: string[]; + to: string; + unwrap: boolean; + }; + + export type ExactOutputParamsStructOutput = [ + string, + BigNumber, + BigNumber, + string[], + string, + boolean + ] & { + tokenIn: string; + amountOut: BigNumber; + amountInMaximum: BigNumber; + path: string[]; + to: string; + unwrap: boolean; + }; + + export type ExactOutputSingleParamsStruct = { + tokenIn: string; + amountOut: BigNumberish; + amountInMaximum: BigNumberish; + pool: string; + to: string; + unwrap: boolean; + }; + + export type ExactOutputSingleParamsStructOutput = [ + string, + BigNumber, + BigNumber, + string, + string, + boolean + ] & { + tokenIn: string; + amountOut: BigNumber; + amountInMaximum: BigNumber; + pool: string; + to: string; + unwrap: boolean; + }; +} + +export interface IPoolRouterInterface extends utils.Interface { + functions: { + "exactInput((address,uint256,uint256,address[],address,bool))": FunctionFragment; + "exactInputSingle((address,uint256,uint256,address,address,bool))": FunctionFragment; + "exactOutput((address,uint256,uint256,address[],address,bool))": FunctionFragment; + "exactOutputSingle((address,uint256,uint256,address,address,bool))": FunctionFragment; + "sweep(address,uint256,address)": FunctionFragment; + }; + + getFunction( + nameOrSignatureOrTopic: + | "exactInput" + | "exactInputSingle" + | "exactOutput" + | "exactOutputSingle" + | "sweep" + ): FunctionFragment; + + encodeFunctionData( + functionFragment: "exactInput", + values: [IPoolRouter.ExactInputParamsStruct] + ): string; + encodeFunctionData( + functionFragment: "exactInputSingle", + values: [IPoolRouter.ExactInputSingleParamsStruct] + ): string; + encodeFunctionData( + functionFragment: "exactOutput", + values: [IPoolRouter.ExactOutputParamsStruct] + ): string; + encodeFunctionData( + functionFragment: "exactOutputSingle", + values: [IPoolRouter.ExactOutputSingleParamsStruct] + ): string; + encodeFunctionData( + functionFragment: "sweep", + values: [string, BigNumberish, string] + ): string; + + decodeFunctionResult(functionFragment: "exactInput", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "exactInputSingle", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "exactOutput", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "exactOutputSingle", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "sweep", data: BytesLike): Result; + + events: {}; +} + +export interface IPoolRouter extends BaseContract { + connect(signerOrProvider: Signer | Provider | string): this; + attach(addressOrName: string): this; + deployed(): Promise; + + interface: IPoolRouterInterface; + + 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: { + exactInput( + params: IPoolRouter.ExactInputParamsStruct, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + + exactInputSingle( + params: IPoolRouter.ExactInputSingleParamsStruct, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + + exactOutput( + params: IPoolRouter.ExactOutputParamsStruct, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + + exactOutputSingle( + params: IPoolRouter.ExactOutputSingleParamsStruct, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + + sweep( + token: string, + amount: BigNumberish, + recipient: string, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + }; + + exactInput( + params: IPoolRouter.ExactInputParamsStruct, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + + exactInputSingle( + params: IPoolRouter.ExactInputSingleParamsStruct, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + + exactOutput( + params: IPoolRouter.ExactOutputParamsStruct, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + + exactOutputSingle( + params: IPoolRouter.ExactOutputSingleParamsStruct, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + + sweep( + token: string, + amount: BigNumberish, + recipient: string, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + + callStatic: { + exactInput( + params: IPoolRouter.ExactInputParamsStruct, + overrides?: CallOverrides + ): Promise; + + exactInputSingle( + params: IPoolRouter.ExactInputSingleParamsStruct, + overrides?: CallOverrides + ): Promise; + + exactOutput( + params: IPoolRouter.ExactOutputParamsStruct, + overrides?: CallOverrides + ): Promise; + + exactOutputSingle( + params: IPoolRouter.ExactOutputSingleParamsStruct, + overrides?: CallOverrides + ): Promise; + + sweep( + token: string, + amount: BigNumberish, + recipient: string, + overrides?: CallOverrides + ): Promise; + }; + + filters: {}; + + estimateGas: { + exactInput( + params: IPoolRouter.ExactInputParamsStruct, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + + exactInputSingle( + params: IPoolRouter.ExactInputSingleParamsStruct, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + + exactOutput( + params: IPoolRouter.ExactOutputParamsStruct, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + + exactOutputSingle( + params: IPoolRouter.ExactOutputSingleParamsStruct, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + + sweep( + token: string, + amount: BigNumberish, + recipient: string, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + }; + + populateTransaction: { + exactInput( + params: IPoolRouter.ExactInputParamsStruct, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + + exactInputSingle( + params: IPoolRouter.ExactInputSingleParamsStruct, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + + exactOutput( + params: IPoolRouter.ExactOutputParamsStruct, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + + exactOutputSingle( + params: IPoolRouter.ExactOutputSingleParamsStruct, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + + sweep( + token: string, + amount: BigNumberish, + recipient: string, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + }; +} diff --git a/packages/interfaces/typechain-types/contracts/interfaces/TridentIPoolRouter.sol/index.ts b/packages/interfaces/typechain-types/contracts/interfaces/TridentIPoolRouter.sol/index.ts new file mode 100644 index 00000000..e5d212a6 --- /dev/null +++ b/packages/interfaces/typechain-types/contracts/interfaces/TridentIPoolRouter.sol/index.ts @@ -0,0 +1,4 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +export type { IPoolRouter } from "./IPoolRouter"; diff --git a/packages/interfaces/typechain-types/contracts/interfaces/ZetaInterfaces.sol/ZetaCommonErrors.ts b/packages/interfaces/typechain-types/contracts/interfaces/ZetaInterfaces.sol/ZetaCommonErrors.ts new file mode 100644 index 00000000..ffc7af30 --- /dev/null +++ b/packages/interfaces/typechain-types/contracts/interfaces/ZetaInterfaces.sol/ZetaCommonErrors.ts @@ -0,0 +1,55 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import type { BaseContract, Signer, utils } from "ethers"; + +import type { Listener, Provider } from "@ethersproject/providers"; +import type { + TypedEventFilter, + TypedEvent, + TypedListener, + OnEvent, +} from "../../../common"; + +export interface ZetaCommonErrorsInterface extends utils.Interface { + functions: {}; + + events: {}; +} + +export interface ZetaCommonErrors extends BaseContract { + connect(signerOrProvider: Signer | Provider | string): this; + attach(addressOrName: string): this; + deployed(): Promise; + + interface: ZetaCommonErrorsInterface; + + 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: {}; + + callStatic: {}; + + filters: {}; + + estimateGas: {}; + + populateTransaction: {}; +} diff --git a/packages/interfaces/typechain-types/contracts/interfaces/ZetaInterfaces.sol/index.ts b/packages/interfaces/typechain-types/contracts/interfaces/ZetaInterfaces.sol/index.ts index 61430840..a4f4c2aa 100644 --- a/packages/interfaces/typechain-types/contracts/interfaces/ZetaInterfaces.sol/index.ts +++ b/packages/interfaces/typechain-types/contracts/interfaces/ZetaInterfaces.sol/index.ts @@ -1,6 +1,7 @@ /* Autogenerated file. Do not edit manually. */ /* tslint:disable */ /* eslint-disable */ +export type { ZetaCommonErrors } from "./ZetaCommonErrors"; export type { ZetaConnector } from "./ZetaConnector"; export type { ZetaReceiver } from "./ZetaReceiver"; export type { ZetaTokenConsumer } from "./ZetaTokenConsumer"; diff --git a/packages/interfaces/typechain-types/contracts/interfaces/index.ts b/packages/interfaces/typechain-types/contracts/interfaces/index.ts index 22914e47..25257284 100644 --- a/packages/interfaces/typechain-types/contracts/interfaces/index.ts +++ b/packages/interfaces/typechain-types/contracts/interfaces/index.ts @@ -1,6 +1,10 @@ /* Autogenerated file. Do not edit manually. */ /* tslint:disable */ /* eslint-disable */ +import type * as tridentConcentratedLiquidityPoolFactorySol from "./TridentConcentratedLiquidityPoolFactory.sol"; +export type { tridentConcentratedLiquidityPoolFactorySol }; +import type * as tridentIPoolRouterSol from "./TridentIPoolRouter.sol"; +export type { tridentIPoolRouterSol }; import type * as zetaInterfacesSol from "./ZetaInterfaces.sol"; export type { zetaInterfacesSol }; export type { ConnectorErrors } from "./ConnectorErrors"; diff --git a/packages/interfaces/typechain-types/factories/contracts/Zeta.non-eth.sol/ZetaNonEth__factory.ts b/packages/interfaces/typechain-types/factories/contracts/Zeta.non-eth.sol/ZetaNonEth__factory.ts index 371d991b..28b1daf4 100644 --- a/packages/interfaces/typechain-types/factories/contracts/Zeta.non-eth.sol/ZetaNonEth__factory.ts +++ b/packages/interfaces/typechain-types/factories/contracts/Zeta.non-eth.sol/ZetaNonEth__factory.ts @@ -514,7 +514,7 @@ const _abi = [ ]; const _bytecode = - "0x60806040523480156200001157600080fd5b506040516200237c3803806200237c8339818101604052810190620000379190620002c8565b6040518060400160405280600481526020017f5a657461000000000000000000000000000000000000000000000000000000008152506040518060400160405280600481526020017f5a455441000000000000000000000000000000000000000000000000000000008152508160039080519060200190620000bb92919062000201565b508060049080519060200190620000d492919062000201565b505050600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614806200013f5750600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16145b1562000177576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b81600660006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555080600760006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505050620003c7565b8280546200020f9062000343565b90600052602060002090601f0160209004810192826200023357600085556200027f565b82601f106200024e57805160ff19168380011785556200027f565b828001600101855582156200027f579182015b828111156200027e57825182559160200191906001019062000261565b5b5090506200028e919062000292565b5090565b5b80821115620002ad57600081600090555060010162000293565b5090565b600081519050620002c281620003ad565b92915050565b60008060408385031215620002e257620002e1620003a8565b5b6000620002f285828601620002b1565b92505060206200030585828601620002b1565b9150509250929050565b60006200031c8262000323565b9050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600060028204905060018216806200035c57607f821691505b6020821081141562000373576200037262000379565b5b50919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b600080fd5b620003b8816200030f565b8114620003c457600080fd5b50565b611fa580620003d76000396000f3fe608060405234801561001057600080fd5b50600436106101215760003560e01c806342966c68116100ad57806395d89b411161007157806395d89b41146102f6578063a457c2d714610314578063a9059cbb14610344578063bff9662a14610374578063dd62ed3e1461039257610121565b806342966c68146102665780635b1125911461028257806370a08231146102a0578063779e3b63146102d057806379cc6790146102da57610121565b80631e458bee116100f45780631e458bee146101ae57806323b872dd146101ca578063313ce567146101fa578063328a01d014610218578063395093511461023657610121565b806306fdde0314610126578063095ea7b31461014457806315d57fd41461017457806318160ddd14610190575b600080fd5b61012e6103c2565b60405161013b91906118ea565b60405180910390f35b61015e60048036038101906101599190611621565b610454565b60405161016b91906118cf565b60405180910390f35b61018e6004803603810190610189919061158e565b610477565b005b610198610689565b6040516101a59190611a4c565b60405180910390f35b6101c860048036038101906101c39190611661565b610693565b005b6101e460048036038101906101df91906115ce565b610783565b6040516101f191906118cf565b60405180910390f35b6102026107b2565b60405161020f9190611a67565b60405180910390f35b6102206107bb565b60405161022d91906118b4565b60405180910390f35b610250600480360381019061024b9190611621565b6107e1565b60405161025d91906118cf565b60405180910390f35b610280600480360381019061027b91906116b4565b610818565b005b61028a61082c565b60405161029791906118b4565b60405180910390f35b6102ba60048036038101906102b59190611561565b610852565b6040516102c79190611a4c565b60405180910390f35b6102d861089a565b005b6102f460048036038101906102ef9190611621565b610a1a565b005b6102fe610b08565b60405161030b91906118ea565b60405180910390f35b61032e60048036038101906103299190611621565b610b9a565b60405161033b91906118cf565b60405180910390f35b61035e60048036038101906103599190611621565b610c11565b60405161036b91906118cf565b60405180910390f35b61037c610c34565b60405161038991906118b4565b60405180910390f35b6103ac60048036038101906103a7919061158e565b610c5a565b6040516103b99190611a4c565b60405180910390f35b6060600380546103d190611bba565b80601f01602080910402602001604051908101604052809291908181526020018280546103fd90611bba565b801561044a5780601f1061041f5761010080835404028352916020019161044a565b820191906000526020600020905b81548152906001019060200180831161042d57829003601f168201915b5050505050905090565b60008061045f610ce1565b905061046c818585610ce9565b600191505092915050565b600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141580156105235750600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614155b1561056557336040517fcdfcef9700000000000000000000000000000000000000000000000000000000815260040161055c91906118b4565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614806105cc5750600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16145b15610603576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b81600660006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555080600560006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505050565b6000600254905090565b600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461072557336040517f3fe32fba00000000000000000000000000000000000000000000000000000000815260040161071c91906118b4565b60405180910390fd5b61072f8383610eb4565b808373ffffffffffffffffffffffffffffffffffffffff167fc263b302aec62d29105026245f19e16f8e0137066ccd4a8bd941f716bd4096bb846040516107769190611a4c565b60405180910390a3505050565b60008061078e610ce1565b905061079b858285611014565b6107a68585856110a0565b60019150509392505050565b60006012905090565b600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000806107ec610ce1565b905061080d8185856107fe8589610c5a565b6108089190611a9e565b610ce9565b600191505092915050565b610829610823610ce1565b82611321565b50565b600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60008060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461092c57336040517fe700765e00000000000000000000000000000000000000000000000000000000815260040161092391906118b4565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff16600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614156109b5576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16600760006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610aac57336040517f3fe32fba000000000000000000000000000000000000000000000000000000008152600401610aa391906118b4565b60405180910390fd5b610ab682826114f8565b8173ffffffffffffffffffffffffffffffffffffffff167f919f7e2092ffcc9d09f599be18d8152860b0c054df788a33bc549cdd9d0f15b182604051610afc9190611a4c565b60405180910390a25050565b606060048054610b1790611bba565b80601f0160208091040260200160405190810160405280929190818152602001828054610b4390611bba565b8015610b905780601f10610b6557610100808354040283529160200191610b90565b820191906000526020600020905b815481529060010190602001808311610b7357829003601f168201915b5050505050905090565b600080610ba5610ce1565b90506000610bb38286610c5a565b905083811015610bf8576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610bef90611a0c565b60405180910390fd5b610c058286868403610ce9565b60019250505092915050565b600080610c1c610ce1565b9050610c298185856110a0565b600191505092915050565b600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415610d59576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610d50906119ec565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415610dc9576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610dc09061194c565b60405180910390fd5b80600160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92583604051610ea79190611a4c565b60405180910390a3505050565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415610f24576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610f1b90611a2c565b60405180910390fd5b610f3060008383611518565b8060026000828254610f429190611a9e565b92505081905550806000808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254610f979190611a9e565b925050819055508173ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef83604051610ffc9190611a4c565b60405180910390a36110106000838361151d565b5050565b60006110208484610c5a565b90507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff811461109a578181101561108c576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016110839061196c565b60405180910390fd5b6110998484848403610ce9565b5b50505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415611110576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611107906119cc565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611180576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016111779061190c565b60405180910390fd5b61118b838383611518565b60008060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905081811015611211576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016112089061198c565b60405180910390fd5b8181036000808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550816000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282546112a49190611a9e565b925050819055508273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040516113089190611a4c565b60405180910390a361131b84848461151d565b50505050565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611391576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611388906119ac565b60405180910390fd5b61139d82600083611518565b60008060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905081811015611423576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161141a9061192c565b60405180910390fd5b8181036000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550816002600082825461147a9190611af4565b92505081905550600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040516114df9190611a4c565b60405180910390a36114f38360008461151d565b505050565b61150a82611504610ce1565b83611014565b6115148282611321565b5050565b505050565b505050565b60008135905061153181611f2a565b92915050565b60008135905061154681611f41565b92915050565b60008135905061155b81611f58565b92915050565b60006020828403121561157757611576611c4a565b5b600061158584828501611522565b91505092915050565b600080604083850312156115a5576115a4611c4a565b5b60006115b385828601611522565b92505060206115c485828601611522565b9150509250929050565b6000806000606084860312156115e7576115e6611c4a565b5b60006115f586828701611522565b935050602061160686828701611522565b92505060406116178682870161154c565b9150509250925092565b6000806040838503121561163857611637611c4a565b5b600061164685828601611522565b92505060206116578582860161154c565b9150509250929050565b60008060006060848603121561167a57611679611c4a565b5b600061168886828701611522565b93505060206116998682870161154c565b92505060406116aa86828701611537565b9150509250925092565b6000602082840312156116ca576116c9611c4a565b5b60006116d88482850161154c565b91505092915050565b6116ea81611b28565b82525050565b6116f981611b3a565b82525050565b600061170a82611a82565b6117148185611a8d565b9350611724818560208601611b87565b61172d81611c4f565b840191505092915050565b6000611745602383611a8d565b915061175082611c60565b604082019050919050565b6000611768602283611a8d565b915061177382611caf565b604082019050919050565b600061178b602283611a8d565b915061179682611cfe565b604082019050919050565b60006117ae601d83611a8d565b91506117b982611d4d565b602082019050919050565b60006117d1602683611a8d565b91506117dc82611d76565b604082019050919050565b60006117f4602183611a8d565b91506117ff82611dc5565b604082019050919050565b6000611817602583611a8d565b915061182282611e14565b604082019050919050565b600061183a602483611a8d565b915061184582611e63565b604082019050919050565b600061185d602583611a8d565b915061186882611eb2565b604082019050919050565b6000611880601f83611a8d565b915061188b82611f01565b602082019050919050565b61189f81611b70565b82525050565b6118ae81611b7a565b82525050565b60006020820190506118c960008301846116e1565b92915050565b60006020820190506118e460008301846116f0565b92915050565b6000602082019050818103600083015261190481846116ff565b905092915050565b6000602082019050818103600083015261192581611738565b9050919050565b600060208201905081810360008301526119458161175b565b9050919050565b600060208201905081810360008301526119658161177e565b9050919050565b60006020820190508181036000830152611985816117a1565b9050919050565b600060208201905081810360008301526119a5816117c4565b9050919050565b600060208201905081810360008301526119c5816117e7565b9050919050565b600060208201905081810360008301526119e58161180a565b9050919050565b60006020820190508181036000830152611a058161182d565b9050919050565b60006020820190508181036000830152611a2581611850565b9050919050565b60006020820190508181036000830152611a4581611873565b9050919050565b6000602082019050611a616000830184611896565b92915050565b6000602082019050611a7c60008301846118a5565b92915050565b600081519050919050565b600082825260208201905092915050565b6000611aa982611b70565b9150611ab483611b70565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff03821115611ae957611ae8611bec565b5b828201905092915050565b6000611aff82611b70565b9150611b0a83611b70565b925082821015611b1d57611b1c611bec565b5b828203905092915050565b6000611b3382611b50565b9050919050565b60008115159050919050565b6000819050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b600060ff82169050919050565b60005b83811015611ba5578082015181840152602081019050611b8a565b83811115611bb4576000848401525b50505050565b60006002820490506001821680611bd257607f821691505b60208210811415611be657611be5611c1b565b5b50919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b600080fd5b6000601f19601f8301169050919050565b7f45524332303a207472616e7366657220746f20746865207a65726f206164647260008201527f6573730000000000000000000000000000000000000000000000000000000000602082015250565b7f45524332303a206275726e20616d6f756e7420657863656564732062616c616e60008201527f6365000000000000000000000000000000000000000000000000000000000000602082015250565b7f45524332303a20617070726f766520746f20746865207a65726f20616464726560008201527f7373000000000000000000000000000000000000000000000000000000000000602082015250565b7f45524332303a20696e73756666696369656e7420616c6c6f77616e6365000000600082015250565b7f45524332303a207472616e7366657220616d6f756e742065786365656473206260008201527f616c616e63650000000000000000000000000000000000000000000000000000602082015250565b7f45524332303a206275726e2066726f6d20746865207a65726f2061646472657360008201527f7300000000000000000000000000000000000000000000000000000000000000602082015250565b7f45524332303a207472616e736665722066726f6d20746865207a65726f20616460008201527f6472657373000000000000000000000000000000000000000000000000000000602082015250565b7f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460008201527f7265737300000000000000000000000000000000000000000000000000000000602082015250565b7f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f7760008201527f207a65726f000000000000000000000000000000000000000000000000000000602082015250565b7f45524332303a206d696e7420746f20746865207a65726f206164647265737300600082015250565b611f3381611b28565b8114611f3e57600080fd5b50565b611f4a81611b46565b8114611f5557600080fd5b50565b611f6181611b70565b8114611f6c57600080fd5b5056fea264697066735822122008f6e523d84c166be747205bdbde5d8ba13c478304202ab40df209426973ae7564736f6c63430008070033"; + "0x60806040523480156200001157600080fd5b506040516200237c3803806200237c8339818101604052810190620000379190620002c8565b6040518060400160405280600481526020017f5a657461000000000000000000000000000000000000000000000000000000008152506040518060400160405280600481526020017f5a455441000000000000000000000000000000000000000000000000000000008152508160039080519060200190620000bb92919062000201565b508060049080519060200190620000d492919062000201565b505050600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614806200013f5750600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16145b1562000177576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b81600660006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555080600760006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505050620003c7565b8280546200020f9062000343565b90600052602060002090601f0160209004810192826200023357600085556200027f565b82601f106200024e57805160ff19168380011785556200027f565b828001600101855582156200027f579182015b828111156200027e57825182559160200191906001019062000261565b5b5090506200028e919062000292565b5090565b5b80821115620002ad57600081600090555060010162000293565b5090565b600081519050620002c281620003ad565b92915050565b60008060408385031215620002e257620002e1620003a8565b5b6000620002f285828601620002b1565b92505060206200030585828601620002b1565b9150509250929050565b60006200031c8262000323565b9050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600060028204905060018216806200035c57607f821691505b6020821081141562000373576200037262000379565b5b50919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b600080fd5b620003b8816200030f565b8114620003c457600080fd5b50565b611fa580620003d76000396000f3fe608060405234801561001057600080fd5b50600436106101215760003560e01c806342966c68116100ad57806395d89b411161007157806395d89b41146102f6578063a457c2d714610314578063a9059cbb14610344578063bff9662a14610374578063dd62ed3e1461039257610121565b806342966c68146102665780635b1125911461028257806370a08231146102a0578063779e3b63146102d057806379cc6790146102da57610121565b80631e458bee116100f45780631e458bee146101ae57806323b872dd146101ca578063313ce567146101fa578063328a01d014610218578063395093511461023657610121565b806306fdde0314610126578063095ea7b31461014457806315d57fd41461017457806318160ddd14610190575b600080fd5b61012e6103c2565b60405161013b91906118ea565b60405180910390f35b61015e60048036038101906101599190611621565b610454565b60405161016b91906118cf565b60405180910390f35b61018e6004803603810190610189919061158e565b610477565b005b610198610689565b6040516101a59190611a4c565b60405180910390f35b6101c860048036038101906101c39190611661565b610693565b005b6101e460048036038101906101df91906115ce565b610783565b6040516101f191906118cf565b60405180910390f35b6102026107b2565b60405161020f9190611a67565b60405180910390f35b6102206107bb565b60405161022d91906118b4565b60405180910390f35b610250600480360381019061024b9190611621565b6107e1565b60405161025d91906118cf565b60405180910390f35b610280600480360381019061027b91906116b4565b610818565b005b61028a61082c565b60405161029791906118b4565b60405180910390f35b6102ba60048036038101906102b59190611561565b610852565b6040516102c79190611a4c565b60405180910390f35b6102d861089a565b005b6102f460048036038101906102ef9190611621565b610a1a565b005b6102fe610b08565b60405161030b91906118ea565b60405180910390f35b61032e60048036038101906103299190611621565b610b9a565b60405161033b91906118cf565b60405180910390f35b61035e60048036038101906103599190611621565b610c11565b60405161036b91906118cf565b60405180910390f35b61037c610c34565b60405161038991906118b4565b60405180910390f35b6103ac60048036038101906103a7919061158e565b610c5a565b6040516103b99190611a4c565b60405180910390f35b6060600380546103d190611bba565b80601f01602080910402602001604051908101604052809291908181526020018280546103fd90611bba565b801561044a5780601f1061041f5761010080835404028352916020019161044a565b820191906000526020600020905b81548152906001019060200180831161042d57829003601f168201915b5050505050905090565b60008061045f610ce1565b905061046c818585610ce9565b600191505092915050565b600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141580156105235750600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614155b1561056557336040517fcdfcef9700000000000000000000000000000000000000000000000000000000815260040161055c91906118b4565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614806105cc5750600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16145b15610603576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b81600660006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555080600560006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505050565b6000600254905090565b600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461072557336040517f3fe32fba00000000000000000000000000000000000000000000000000000000815260040161071c91906118b4565b60405180910390fd5b61072f8383610eb4565b808373ffffffffffffffffffffffffffffffffffffffff167fc263b302aec62d29105026245f19e16f8e0137066ccd4a8bd941f716bd4096bb846040516107769190611a4c565b60405180910390a3505050565b60008061078e610ce1565b905061079b858285611014565b6107a68585856110a0565b60019150509392505050565b60006012905090565b600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000806107ec610ce1565b905061080d8185856107fe8589610c5a565b6108089190611a9e565b610ce9565b600191505092915050565b610829610823610ce1565b82611321565b50565b600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60008060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461092c57336040517fe700765e00000000000000000000000000000000000000000000000000000000815260040161092391906118b4565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff16600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614156109b5576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16600760006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610aac57336040517f3fe32fba000000000000000000000000000000000000000000000000000000008152600401610aa391906118b4565b60405180910390fd5b610ab682826114f8565b8173ffffffffffffffffffffffffffffffffffffffff167f919f7e2092ffcc9d09f599be18d8152860b0c054df788a33bc549cdd9d0f15b182604051610afc9190611a4c565b60405180910390a25050565b606060048054610b1790611bba565b80601f0160208091040260200160405190810160405280929190818152602001828054610b4390611bba565b8015610b905780601f10610b6557610100808354040283529160200191610b90565b820191906000526020600020905b815481529060010190602001808311610b7357829003601f168201915b5050505050905090565b600080610ba5610ce1565b90506000610bb38286610c5a565b905083811015610bf8576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610bef90611a0c565b60405180910390fd5b610c058286868403610ce9565b60019250505092915050565b600080610c1c610ce1565b9050610c298185856110a0565b600191505092915050565b600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415610d59576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610d50906119ec565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415610dc9576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610dc09061194c565b60405180910390fd5b80600160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92583604051610ea79190611a4c565b60405180910390a3505050565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415610f24576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610f1b90611a2c565b60405180910390fd5b610f3060008383611518565b8060026000828254610f429190611a9e565b92505081905550806000808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254610f979190611a9e565b925050819055508173ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef83604051610ffc9190611a4c565b60405180910390a36110106000838361151d565b5050565b60006110208484610c5a565b90507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff811461109a578181101561108c576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016110839061196c565b60405180910390fd5b6110998484848403610ce9565b5b50505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415611110576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611107906119cc565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611180576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016111779061190c565b60405180910390fd5b61118b838383611518565b60008060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905081811015611211576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016112089061198c565b60405180910390fd5b8181036000808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550816000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282546112a49190611a9e565b925050819055508273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040516113089190611a4c565b60405180910390a361131b84848461151d565b50505050565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611391576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611388906119ac565b60405180910390fd5b61139d82600083611518565b60008060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905081811015611423576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161141a9061192c565b60405180910390fd5b8181036000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550816002600082825461147a9190611af4565b92505081905550600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040516114df9190611a4c565b60405180910390a36114f38360008461151d565b505050565b61150a82611504610ce1565b83611014565b6115148282611321565b5050565b505050565b505050565b60008135905061153181611f2a565b92915050565b60008135905061154681611f41565b92915050565b60008135905061155b81611f58565b92915050565b60006020828403121561157757611576611c4a565b5b600061158584828501611522565b91505092915050565b600080604083850312156115a5576115a4611c4a565b5b60006115b385828601611522565b92505060206115c485828601611522565b9150509250929050565b6000806000606084860312156115e7576115e6611c4a565b5b60006115f586828701611522565b935050602061160686828701611522565b92505060406116178682870161154c565b9150509250925092565b6000806040838503121561163857611637611c4a565b5b600061164685828601611522565b92505060206116578582860161154c565b9150509250929050565b60008060006060848603121561167a57611679611c4a565b5b600061168886828701611522565b93505060206116998682870161154c565b92505060406116aa86828701611537565b9150509250925092565b6000602082840312156116ca576116c9611c4a565b5b60006116d88482850161154c565b91505092915050565b6116ea81611b28565b82525050565b6116f981611b3a565b82525050565b600061170a82611a82565b6117148185611a8d565b9350611724818560208601611b87565b61172d81611c4f565b840191505092915050565b6000611745602383611a8d565b915061175082611c60565b604082019050919050565b6000611768602283611a8d565b915061177382611caf565b604082019050919050565b600061178b602283611a8d565b915061179682611cfe565b604082019050919050565b60006117ae601d83611a8d565b91506117b982611d4d565b602082019050919050565b60006117d1602683611a8d565b91506117dc82611d76565b604082019050919050565b60006117f4602183611a8d565b91506117ff82611dc5565b604082019050919050565b6000611817602583611a8d565b915061182282611e14565b604082019050919050565b600061183a602483611a8d565b915061184582611e63565b604082019050919050565b600061185d602583611a8d565b915061186882611eb2565b604082019050919050565b6000611880601f83611a8d565b915061188b82611f01565b602082019050919050565b61189f81611b70565b82525050565b6118ae81611b7a565b82525050565b60006020820190506118c960008301846116e1565b92915050565b60006020820190506118e460008301846116f0565b92915050565b6000602082019050818103600083015261190481846116ff565b905092915050565b6000602082019050818103600083015261192581611738565b9050919050565b600060208201905081810360008301526119458161175b565b9050919050565b600060208201905081810360008301526119658161177e565b9050919050565b60006020820190508181036000830152611985816117a1565b9050919050565b600060208201905081810360008301526119a5816117c4565b9050919050565b600060208201905081810360008301526119c5816117e7565b9050919050565b600060208201905081810360008301526119e58161180a565b9050919050565b60006020820190508181036000830152611a058161182d565b9050919050565b60006020820190508181036000830152611a2581611850565b9050919050565b60006020820190508181036000830152611a4581611873565b9050919050565b6000602082019050611a616000830184611896565b92915050565b6000602082019050611a7c60008301846118a5565b92915050565b600081519050919050565b600082825260208201905092915050565b6000611aa982611b70565b9150611ab483611b70565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff03821115611ae957611ae8611bec565b5b828201905092915050565b6000611aff82611b70565b9150611b0a83611b70565b925082821015611b1d57611b1c611bec565b5b828203905092915050565b6000611b3382611b50565b9050919050565b60008115159050919050565b6000819050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b600060ff82169050919050565b60005b83811015611ba5578082015181840152602081019050611b8a565b83811115611bb4576000848401525b50505050565b60006002820490506001821680611bd257607f821691505b60208210811415611be657611be5611c1b565b5b50919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b600080fd5b6000601f19601f8301169050919050565b7f45524332303a207472616e7366657220746f20746865207a65726f206164647260008201527f6573730000000000000000000000000000000000000000000000000000000000602082015250565b7f45524332303a206275726e20616d6f756e7420657863656564732062616c616e60008201527f6365000000000000000000000000000000000000000000000000000000000000602082015250565b7f45524332303a20617070726f766520746f20746865207a65726f20616464726560008201527f7373000000000000000000000000000000000000000000000000000000000000602082015250565b7f45524332303a20696e73756666696369656e7420616c6c6f77616e6365000000600082015250565b7f45524332303a207472616e7366657220616d6f756e742065786365656473206260008201527f616c616e63650000000000000000000000000000000000000000000000000000602082015250565b7f45524332303a206275726e2066726f6d20746865207a65726f2061646472657360008201527f7300000000000000000000000000000000000000000000000000000000000000602082015250565b7f45524332303a207472616e736665722066726f6d20746865207a65726f20616460008201527f6472657373000000000000000000000000000000000000000000000000000000602082015250565b7f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460008201527f7265737300000000000000000000000000000000000000000000000000000000602082015250565b7f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f7760008201527f207a65726f000000000000000000000000000000000000000000000000000000602082015250565b7f45524332303a206d696e7420746f20746865207a65726f206164647265737300600082015250565b611f3381611b28565b8114611f3e57600080fd5b50565b611f4a81611b46565b8114611f5557600080fd5b50565b611f6181611b70565b8114611f6c57600080fd5b5056fea2646970667358221220efc8fd85061fd3ea77a16439a4c2eba5e4ea231b6d61d39f635845016271272b64736f6c63430008070033"; type ZetaNonEthConstructorParams = | [signer?: Signer] diff --git a/packages/interfaces/typechain-types/factories/contracts/ZetaConnector.base.sol/ZetaConnectorBase__factory.ts b/packages/interfaces/typechain-types/factories/contracts/ZetaConnector.base.sol/ZetaConnectorBase__factory.ts index c2c85112..aa667fde 100644 --- a/packages/interfaces/typechain-types/factories/contracts/ZetaConnector.base.sol/ZetaConnectorBase__factory.ts +++ b/packages/interfaces/typechain-types/factories/contracts/ZetaConnector.base.sol/ZetaConnectorBase__factory.ts @@ -552,7 +552,7 @@ const _abi = [ ]; const _bytecode = - "0x60a06040523480156200001157600080fd5b50604051620012af380380620012af83398181016040528101906200003791906200027c565b60008060006101000a81548160ff021916908315150217905550600073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff161480620000b95750600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16145b80620000f15750600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16145b80620001295750600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16145b1562000161576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8373ffffffffffffffffffffffffffffffffffffffff1660808173ffffffffffffffffffffffffffffffffffffffff1660601b8152505082600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555081600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555080600060016101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505050505062000341565b600081519050620002768162000327565b92915050565b6000806000806080858703121562000299576200029862000322565b5b6000620002a98782880162000265565b9450506020620002bc8782880162000265565b9350506040620002cf8782880162000265565b9250506060620002e28782880162000265565b91505092959194509250565b6000620002fb8262000302565b9050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600080fd5b6200033281620002ee565b81146200033e57600080fd5b50565b60805160601c610f4f6200036060003960006102160152610f4f6000f3fe608060405234801561001057600080fd5b50600436106100cf5760003560e01c80636128480f1161008c5780639122c344116100665780639122c344146101a2578063942a5e16146101be578063ec026901146101da578063f7fb869b146101f6576100cf565b80636128480f14610172578063779e3b631461018e5780638456cb5914610198576100cf565b806321e093b1146100d457806329dd214d146100f2578063328a01d01461010e5780633f4ba83a1461012c5780635b112591146101365780635c975abb14610154575b600080fd5b6100dc610214565b6040516100e99190610d62565b60405180910390f35b61010c60048036038101906101079190610be6565b610238565b005b610116610242565b6040516101239190610d62565b60405180910390f35b610134610268565b005b61013e610304565b60405161014b9190610d62565b60405180910390f35b61015c61032a565b6040516101699190610da6565b60405180910390f35b61018c60048036038101906101879190610ad7565b610340565b005b6101966104b6565b005b6101a0610636565b005b6101bc60048036038101906101b79190610ad7565b6106d2565b005b6101d860048036038101906101d39190610b04565b6108a4565b005b6101f460048036038101906101ef9190610cb5565b6108af565b005b6101fe6108b2565b60405161020b9190610d62565b60405180910390f35b7f000000000000000000000000000000000000000000000000000000000000000081565b5050505050505050565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146102fa57336040517f4677a0d30000000000000000000000000000000000000000000000000000000081526004016102f19190610d62565b60405180910390fd5b6103026108d8565b565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60008060009054906101000a900460ff16905090565b600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146103d257336040517f4677a0d30000000000000000000000000000000000000000000000000000000081526004016103c99190610d62565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415610439576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b80600060016101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055507fd41d83655d484bdf299598751c371b2d92088667266fe3774b25a97bdd5d039733826040516104ab929190610d7d565b60405180910390a150565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461054857336040517fe700765e00000000000000000000000000000000000000000000000000000000815260040161053f9190610d62565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff16600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614156105d1576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146106c857336040517f4677a0d30000000000000000000000000000000000000000000000000000000081526004016106bf9190610d62565b60405180910390fd5b6106d0610979565b565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415801561077e5750600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614155b156107c057336040517fcdfcef970000000000000000000000000000000000000000000000000000000081526004016107b79190610d62565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415610827576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b80600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055507fe79965b5c67dcfb2cf5fe152715e4a7256cee62a3d5dd8484fd8a8539eb8beff3382604051610899929190610d7d565b60405180910390a150565b505050505050505050565b50565b600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6108e061032a565b61091f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161091690610dc1565b60405180910390fd5b60008060006101000a81548160ff0219169083151502179055507f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa610962610a1b565b60405161096f9190610d62565b60405180910390a1565b61098161032a565b156109c1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016109b890610de1565b60405180910390fd5b60016000806101000a81548160ff0219169083151502179055507f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258610a04610a1b565b604051610a119190610d62565b60405180910390a1565b600033905090565b600081359050610a3281610ed4565b92915050565b600081359050610a4781610eeb565b92915050565b60008083601f840112610a6357610a62610e69565b5b8235905067ffffffffffffffff811115610a8057610a7f610e64565b5b602083019150836001820283011115610a9c57610a9b610e73565b5b9250929050565b600060c08284031215610ab957610ab8610e6e565b5b81905092915050565b600081359050610ad181610f02565b92915050565b600060208284031215610aed57610aec610e7d565b5b6000610afb84828501610a23565b91505092915050565b600080600080600080600080600060e08a8c031215610b2657610b25610e7d565b5b6000610b348c828d01610a23565b9950506020610b458c828d01610ac2565b98505060408a013567ffffffffffffffff811115610b6657610b65610e78565b5b610b728c828d01610a4d565b97509750506060610b858c828d01610ac2565b9550506080610b968c828d01610ac2565b94505060a08a013567ffffffffffffffff811115610bb757610bb6610e78565b5b610bc38c828d01610a4d565b935093505060c0610bd68c828d01610a38565b9150509295985092959850929598565b60008060008060008060008060c0898b031215610c0657610c05610e7d565b5b600089013567ffffffffffffffff811115610c2457610c23610e78565b5b610c308b828c01610a4d565b98509850506020610c438b828c01610ac2565b9650506040610c548b828c01610a23565b9550506060610c658b828c01610ac2565b945050608089013567ffffffffffffffff811115610c8657610c85610e78565b5b610c928b828c01610a4d565b935093505060a0610ca58b828c01610a38565b9150509295985092959890939650565b600060208284031215610ccb57610cca610e7d565b5b600082013567ffffffffffffffff811115610ce957610ce8610e78565b5b610cf584828501610aa3565b91505092915050565b610d0781610e12565b82525050565b610d1681610e24565b82525050565b6000610d29601483610e01565b9150610d3482610e82565b602082019050919050565b6000610d4c601083610e01565b9150610d5782610eab565b602082019050919050565b6000602082019050610d776000830184610cfe565b92915050565b6000604082019050610d926000830185610cfe565b610d9f6020830184610cfe565b9392505050565b6000602082019050610dbb6000830184610d0d565b92915050565b60006020820190508181036000830152610dda81610d1c565b9050919050565b60006020820190508181036000830152610dfa81610d3f565b9050919050565b600082825260208201905092915050565b6000610e1d82610e3a565b9050919050565b60008115159050919050565b6000819050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b7f5061757361626c653a206e6f7420706175736564000000000000000000000000600082015250565b7f5061757361626c653a2070617573656400000000000000000000000000000000600082015250565b610edd81610e12565b8114610ee857600080fd5b50565b610ef481610e30565b8114610eff57600080fd5b50565b610f0b81610e5a565b8114610f1657600080fd5b5056fea2646970667358221220f8353bbbdfd6d1446a66c5c6a27dd64c79c8a5fc510d61067e05b53214042b0f64736f6c63430008070033"; + "0x60a06040523480156200001157600080fd5b50604051620012af380380620012af83398181016040528101906200003791906200027c565b60008060006101000a81548160ff021916908315150217905550600073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff161480620000b95750600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16145b80620000f15750600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16145b80620001295750600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16145b1562000161576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8373ffffffffffffffffffffffffffffffffffffffff1660808173ffffffffffffffffffffffffffffffffffffffff1660601b8152505082600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555081600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555080600060016101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505050505062000341565b600081519050620002768162000327565b92915050565b6000806000806080858703121562000299576200029862000322565b5b6000620002a98782880162000265565b9450506020620002bc8782880162000265565b9350506040620002cf8782880162000265565b9250506060620002e28782880162000265565b91505092959194509250565b6000620002fb8262000302565b9050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600080fd5b6200033281620002ee565b81146200033e57600080fd5b50565b60805160601c610f4f6200036060003960006102160152610f4f6000f3fe608060405234801561001057600080fd5b50600436106100cf5760003560e01c80636128480f1161008c5780639122c344116100665780639122c344146101a2578063942a5e16146101be578063ec026901146101da578063f7fb869b146101f6576100cf565b80636128480f14610172578063779e3b631461018e5780638456cb5914610198576100cf565b806321e093b1146100d457806329dd214d146100f2578063328a01d01461010e5780633f4ba83a1461012c5780635b112591146101365780635c975abb14610154575b600080fd5b6100dc610214565b6040516100e99190610d62565b60405180910390f35b61010c60048036038101906101079190610be6565b610238565b005b610116610242565b6040516101239190610d62565b60405180910390f35b610134610268565b005b61013e610304565b60405161014b9190610d62565b60405180910390f35b61015c61032a565b6040516101699190610da6565b60405180910390f35b61018c60048036038101906101879190610ad7565b610340565b005b6101966104b6565b005b6101a0610636565b005b6101bc60048036038101906101b79190610ad7565b6106d2565b005b6101d860048036038101906101d39190610b04565b6108a4565b005b6101f460048036038101906101ef9190610cb5565b6108af565b005b6101fe6108b2565b60405161020b9190610d62565b60405180910390f35b7f000000000000000000000000000000000000000000000000000000000000000081565b5050505050505050565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146102fa57336040517f4677a0d30000000000000000000000000000000000000000000000000000000081526004016102f19190610d62565b60405180910390fd5b6103026108d8565b565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60008060009054906101000a900460ff16905090565b600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146103d257336040517f4677a0d30000000000000000000000000000000000000000000000000000000081526004016103c99190610d62565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415610439576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b80600060016101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055507fd41d83655d484bdf299598751c371b2d92088667266fe3774b25a97bdd5d039733826040516104ab929190610d7d565b60405180910390a150565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461054857336040517fe700765e00000000000000000000000000000000000000000000000000000000815260040161053f9190610d62565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff16600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614156105d1576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146106c857336040517f4677a0d30000000000000000000000000000000000000000000000000000000081526004016106bf9190610d62565b60405180910390fd5b6106d0610979565b565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415801561077e5750600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614155b156107c057336040517fcdfcef970000000000000000000000000000000000000000000000000000000081526004016107b79190610d62565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415610827576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b80600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055507fe79965b5c67dcfb2cf5fe152715e4a7256cee62a3d5dd8484fd8a8539eb8beff3382604051610899929190610d7d565b60405180910390a150565b505050505050505050565b50565b600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6108e061032a565b61091f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161091690610dc1565b60405180910390fd5b60008060006101000a81548160ff0219169083151502179055507f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa610962610a1b565b60405161096f9190610d62565b60405180910390a1565b61098161032a565b156109c1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016109b890610de1565b60405180910390fd5b60016000806101000a81548160ff0219169083151502179055507f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258610a04610a1b565b604051610a119190610d62565b60405180910390a1565b600033905090565b600081359050610a3281610ed4565b92915050565b600081359050610a4781610eeb565b92915050565b60008083601f840112610a6357610a62610e69565b5b8235905067ffffffffffffffff811115610a8057610a7f610e64565b5b602083019150836001820283011115610a9c57610a9b610e73565b5b9250929050565b600060c08284031215610ab957610ab8610e6e565b5b81905092915050565b600081359050610ad181610f02565b92915050565b600060208284031215610aed57610aec610e7d565b5b6000610afb84828501610a23565b91505092915050565b600080600080600080600080600060e08a8c031215610b2657610b25610e7d565b5b6000610b348c828d01610a23565b9950506020610b458c828d01610ac2565b98505060408a013567ffffffffffffffff811115610b6657610b65610e78565b5b610b728c828d01610a4d565b97509750506060610b858c828d01610ac2565b9550506080610b968c828d01610ac2565b94505060a08a013567ffffffffffffffff811115610bb757610bb6610e78565b5b610bc38c828d01610a4d565b935093505060c0610bd68c828d01610a38565b9150509295985092959850929598565b60008060008060008060008060c0898b031215610c0657610c05610e7d565b5b600089013567ffffffffffffffff811115610c2457610c23610e78565b5b610c308b828c01610a4d565b98509850506020610c438b828c01610ac2565b9650506040610c548b828c01610a23565b9550506060610c658b828c01610ac2565b945050608089013567ffffffffffffffff811115610c8657610c85610e78565b5b610c928b828c01610a4d565b935093505060a0610ca58b828c01610a38565b9150509295985092959890939650565b600060208284031215610ccb57610cca610e7d565b5b600082013567ffffffffffffffff811115610ce957610ce8610e78565b5b610cf584828501610aa3565b91505092915050565b610d0781610e12565b82525050565b610d1681610e24565b82525050565b6000610d29601483610e01565b9150610d3482610e82565b602082019050919050565b6000610d4c601083610e01565b9150610d5782610eab565b602082019050919050565b6000602082019050610d776000830184610cfe565b92915050565b6000604082019050610d926000830185610cfe565b610d9f6020830184610cfe565b9392505050565b6000602082019050610dbb6000830184610d0d565b92915050565b60006020820190508181036000830152610dda81610d1c565b9050919050565b60006020820190508181036000830152610dfa81610d3f565b9050919050565b600082825260208201905092915050565b6000610e1d82610e3a565b9050919050565b60008115159050919050565b6000819050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b7f5061757361626c653a206e6f7420706175736564000000000000000000000000600082015250565b7f5061757361626c653a2070617573656400000000000000000000000000000000600082015250565b610edd81610e12565b8114610ee857600080fd5b50565b610ef481610e30565b8114610eff57600080fd5b50565b610f0b81610e5a565b8114610f1657600080fd5b5056fea2646970667358221220d3ebad2506efc9ad19b36e88a9a310b27741c5170491eebcc6cac5563851dee464736f6c63430008070033"; type ZetaConnectorBaseConstructorParams = | [signer?: Signer] diff --git a/packages/interfaces/typechain-types/factories/contracts/ZetaConnector.eth.sol/ZetaConnectorEth__factory.ts b/packages/interfaces/typechain-types/factories/contracts/ZetaConnector.eth.sol/ZetaConnectorEth__factory.ts index 317a8240..ac343322 100644 --- a/packages/interfaces/typechain-types/factories/contracts/ZetaConnector.eth.sol/ZetaConnectorEth__factory.ts +++ b/packages/interfaces/typechain-types/factories/contracts/ZetaConnector.eth.sol/ZetaConnectorEth__factory.ts @@ -565,7 +565,7 @@ const _abi = [ ]; const _bytecode = - "0x60a06040523480156200001157600080fd5b506040516200213f3803806200213f833981810160405281019062000037919062000284565b8383838360008060006101000a81548160ff021916908315150217905550600073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff161480620000bd5750600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16145b80620000f55750600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16145b806200012d5750600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16145b1562000165576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8373ffffffffffffffffffffffffffffffffffffffff1660808173ffffffffffffffffffffffffffffffffffffffff1660601b8152505082600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555081600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555080600060016101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550505050505050505062000349565b6000815190506200027e816200032f565b92915050565b60008060008060808587031215620002a157620002a06200032a565b5b6000620002b1878288016200026d565b9450506020620002c4878288016200026d565b9350506040620002d7878288016200026d565b9250506060620002ea878288016200026d565b91505092959194509250565b600062000303826200030a565b9050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600080fd5b6200033a81620002f6565b81146200034657600080fd5b50565b60805160601c611dbb620003846000396000818161024f01528181610275015281816103ff01528181610dc201526110850152611dbb6000f3fe608060405234801561001057600080fd5b50600436106100ea5760003560e01c80636128480f1161008c5780639122c344116100665780639122c344146101db578063942a5e16146101f7578063ec02690114610213578063f7fb869b1461022f576100ea565b80636128480f146101ab578063779e3b63146101c75780638456cb59146101d1576100ea565b8063328a01d0116100c8578063328a01d0146101475780633f4ba83a146101655780635b1125911461016f5780635c975abb1461018d576100ea565b806321e093b1146100ef578063252bc8861461010d57806329dd214d1461012b575b600080fd5b6100f761024d565b60405161010491906118dc565b60405180910390f35b610115610271565b6040516101229190611b49565b60405180910390f35b61014560048036038101906101409190611593565b610321565b005b61014f610682565b60405161015c91906118dc565b60405180910390f35b61016d6106a8565b005b610177610744565b60405161018491906118dc565b60405180910390f35b61019561076a565b6040516101a29190611a61565b60405180910390f35b6101c560048036038101906101c09190611457565b610780565b005b6101cf6108f6565b005b6101d9610a76565b005b6101f560048036038101906101f09190611457565b610b12565b005b610211600480360381019061020c9190611484565b610ce4565b005b61022d60048036038101906102289190611662565b611039565b005b610237611208565b60405161024491906118dc565b60405180910390f35b7f000000000000000000000000000000000000000000000000000000000000000081565b60007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b81526004016102cc91906118dc565b60206040518083038186803b1580156102e457600080fd5b505afa1580156102f8573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061031c91906116ab565b905090565b61032961076a565b15610369576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161036090611ae5565b60405180910390fd5b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146103fb57336040517fff70ace20000000000000000000000000000000000000000000000000000000081526004016103f291906118dc565b60405180910390fd5b60007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663a9059cbb87876040518363ffffffff1660e01b81526004016104589291906119d3565b602060405180830381600087803b15801561047257600080fd5b505af1158015610486573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104aa9190611566565b9050806104e3576040517f20878f6200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600084849050111561061f578573ffffffffffffffffffffffffffffffffffffffff16633749c51a6040518060a001604052808c8c8080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f8201169050808301925050505050505081526020018a81526020018973ffffffffffffffffffffffffffffffffffffffff16815260200188815260200187878080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050508152506040518263ffffffff1660e01b81526004016105ec9190611b05565b600060405180830381600087803b15801561060657600080fd5b505af115801561061a573d6000803e3d6000fd5b505050505b818673ffffffffffffffffffffffffffffffffffffffff16887ff1302855733b40d8acb467ee990b6d56c05c80e28ebcabfa6e6f3f57cb50d6988c8c8a8a8a60405161066f959493929190611a7c565b60405180910390a4505050505050505050565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461073a57336040517f4677a0d300000000000000000000000000000000000000000000000000000000815260040161073191906118dc565b60405180910390fd5b61074261122e565b565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60008060009054906101000a900460ff16905090565b600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461081257336040517f4677a0d300000000000000000000000000000000000000000000000000000000815260040161080991906118dc565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415610879576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b80600060016101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055507fd41d83655d484bdf299598751c371b2d92088667266fe3774b25a97bdd5d039733826040516108eb9291906118f7565b60405180910390a150565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461098857336040517fe700765e00000000000000000000000000000000000000000000000000000000815260040161097f91906118dc565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff16600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161415610a11576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610b0857336040517f4677a0d3000000000000000000000000000000000000000000000000000000008152600401610aff91906118dc565b60405180910390fd5b610b106112cf565b565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614158015610bbe5750600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614155b15610c0057336040517fcdfcef97000000000000000000000000000000000000000000000000000000008152600401610bf791906118dc565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415610c67576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b80600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055507fe79965b5c67dcfb2cf5fe152715e4a7256cee62a3d5dd8484fd8a8539eb8beff3382604051610cd99291906118f7565b60405180910390a150565b610cec61076a565b15610d2c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610d2390611ae5565b60405180910390fd5b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610dbe57336040517fff70ace2000000000000000000000000000000000000000000000000000000008152600401610db591906118dc565b60405180910390fd5b60007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663a9059cbb8b876040518363ffffffff1660e01b8152600401610e1b9291906119d3565b602060405180830381600087803b158015610e3557600080fd5b505af1158015610e49573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e6d9190611566565b905080610ea6576040517f20878f6200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000848490501115610fe8578973ffffffffffffffffffffffffffffffffffffffff16633ff0693c6040518060c001604052808d73ffffffffffffffffffffffffffffffffffffffff1681526020018c81526020018b8b8080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f82011690508083019250505050505050815260200189815260200188815260200187878080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050508152506040518263ffffffff1660e01b8152600401610fb59190611b27565b600060405180830381600087803b158015610fcf57600080fd5b505af1158015610fe3573d6000803e3d6000fd5b505050505b81867f521fb0b407c2eb9b1375530e9b9a569889992140a688bc076aa72c1712012c888c8c8c8c8b8b8b60405161102597969594939291906119fc565b60405180910390a350505050505050505050565b61104161076a565b15611081576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161107890611ae5565b60405180910390fd5b60007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166323b872dd333085608001356040518463ffffffff1660e01b81526004016110e493929190611920565b602060405180830381600087803b1580156110fe57600080fd5b505af1158015611112573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111369190611566565b90508061116f576040517f20878f6200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b81600001353373ffffffffffffffffffffffffffffffffffffffff167f7ec1c94701e09b1652f3e1d307e60c4b9ebf99aff8c2079fd1d8c585e031c4e4328580602001906111bd9190611b64565b876080013588604001358980606001906111d79190611b64565b8b8060a001906111e79190611b64565b6040516111fc99989796959493929190611957565b60405180910390a35050565b600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b61123661076a565b611275576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161126c90611ac5565b60405180910390fd5b60008060006101000a81548160ff0219169083151502179055507f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa6112b8611371565b6040516112c591906118dc565b60405180910390a1565b6112d761076a565b15611317576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161130e90611ae5565b60405180910390fd5b60016000806101000a81548160ff0219169083151502179055507f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a25861135a611371565b60405161136791906118dc565b60405180910390a1565b600033905090565b60008135905061138881611d29565b92915050565b60008151905061139d81611d40565b92915050565b6000813590506113b281611d57565b92915050565b60008083601f8401126113ce576113cd611c9e565b5b8235905067ffffffffffffffff8111156113eb576113ea611c99565b5b60208301915083600182028301111561140757611406611cb2565b5b9250929050565b600060c0828403121561142457611423611ca8565b5b81905092915050565b60008135905061143c81611d6e565b92915050565b60008151905061145181611d6e565b92915050565b60006020828403121561146d5761146c611cc1565b5b600061147b84828501611379565b91505092915050565b600080600080600080600080600060e08a8c0312156114a6576114a5611cc1565b5b60006114b48c828d01611379565b99505060206114c58c828d0161142d565b98505060408a013567ffffffffffffffff8111156114e6576114e5611cbc565b5b6114f28c828d016113b8565b975097505060606115058c828d0161142d565b95505060806115168c828d0161142d565b94505060a08a013567ffffffffffffffff81111561153757611536611cbc565b5b6115438c828d016113b8565b935093505060c06115568c828d016113a3565b9150509295985092959850929598565b60006020828403121561157c5761157b611cc1565b5b600061158a8482850161138e565b91505092915050565b60008060008060008060008060c0898b0312156115b3576115b2611cc1565b5b600089013567ffffffffffffffff8111156115d1576115d0611cbc565b5b6115dd8b828c016113b8565b985098505060206115f08b828c0161142d565b96505060406116018b828c01611379565b95505060606116128b828c0161142d565b945050608089013567ffffffffffffffff81111561163357611632611cbc565b5b61163f8b828c016113b8565b935093505060a06116528b828c016113a3565b9150509295985092959890939650565b60006020828403121561167857611677611cc1565b5b600082013567ffffffffffffffff81111561169657611695611cbc565b5b6116a28482850161140e565b91505092915050565b6000602082840312156116c1576116c0611cc1565b5b60006116cf84828501611442565b91505092915050565b6116e181611c05565b82525050565b6116f081611c05565b82525050565b6116ff81611c17565b82525050565b60006117118385611be3565b935061171e838584611c57565b61172783611cc6565b840190509392505050565b600061173d82611bc7565b6117478185611bd2565b9350611757818560208601611c66565b61176081611cc6565b840191505092915050565b6000611778601483611bf4565b915061178382611cd7565b602082019050919050565b600061179b601083611bf4565b91506117a682611d00565b602082019050919050565b600060a08301600083015184820360008601526117ce8282611732565b91505060208301516117e360208601826118be565b5060408301516117f660408601826116d8565b50606083015161180960608601826118be565b50608083015184820360808601526118218282611732565b9150508091505092915050565b600060c08301600083015161184660008601826116d8565b50602083015161185960208601826118be565b50604083015184820360408601526118718282611732565b915050606083015161188660608601826118be565b50608083015161189960808601826118be565b5060a083015184820360a08601526118b18282611732565b9150508091505092915050565b6118c781611c4d565b82525050565b6118d681611c4d565b82525050565b60006020820190506118f160008301846116e7565b92915050565b600060408201905061190c60008301856116e7565b61191960208301846116e7565b9392505050565b600060608201905061193560008301866116e7565b61194260208301856116e7565b61194f60408301846118cd565b949350505050565b600060c08201905061196c600083018c6116e7565b818103602083015261197f818a8c611705565b905061198e60408301896118cd565b61199b60608301886118cd565b81810360808301526119ae818688611705565b905081810360a08301526119c3818486611705565b90509a9950505050505050505050565b60006040820190506119e860008301856116e7565b6119f560208301846118cd565b9392505050565b600060a082019050611a11600083018a6116e7565b611a1e60208301896118cd565b8181036040830152611a31818789611705565b9050611a4060608301866118cd565b8181036080830152611a53818486611705565b905098975050505050505050565b6000602082019050611a7660008301846116f6565b92915050565b60006060820190508181036000830152611a97818789611705565b9050611aa660208301866118cd565b8181036040830152611ab9818486611705565b90509695505050505050565b60006020820190508181036000830152611ade8161176b565b9050919050565b60006020820190508181036000830152611afe8161178e565b9050919050565b60006020820190508181036000830152611b1f81846117b1565b905092915050565b60006020820190508181036000830152611b41818461182e565b905092915050565b6000602082019050611b5e60008301846118cd565b92915050565b60008083356001602003843603038112611b8157611b80611cad565b5b80840192508235915067ffffffffffffffff821115611ba357611ba2611ca3565b5b602083019250600182023603831315611bbf57611bbe611cb7565b5b509250929050565b600081519050919050565b600082825260208201905092915050565b600082825260208201905092915050565b600082825260208201905092915050565b6000611c1082611c2d565b9050919050565b60008115159050919050565b6000819050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b82818337600083830152505050565b60005b83811015611c84578082015181840152602081019050611c69565b83811115611c93576000848401525b50505050565b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f5061757361626c653a206e6f7420706175736564000000000000000000000000600082015250565b7f5061757361626c653a2070617573656400000000000000000000000000000000600082015250565b611d3281611c05565b8114611d3d57600080fd5b50565b611d4981611c17565b8114611d5457600080fd5b50565b611d6081611c23565b8114611d6b57600080fd5b50565b611d7781611c4d565b8114611d8257600080fd5b5056fea26469706673582212206faf10d466cdd32bc304b84630ab2180a500405477f269295b2e779ca6055f0264736f6c63430008070033"; + "0x60a06040523480156200001157600080fd5b506040516200213f3803806200213f833981810160405281019062000037919062000284565b8383838360008060006101000a81548160ff021916908315150217905550600073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff161480620000bd5750600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16145b80620000f55750600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16145b806200012d5750600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16145b1562000165576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8373ffffffffffffffffffffffffffffffffffffffff1660808173ffffffffffffffffffffffffffffffffffffffff1660601b8152505082600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555081600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555080600060016101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550505050505050505062000349565b6000815190506200027e816200032f565b92915050565b60008060008060808587031215620002a157620002a06200032a565b5b6000620002b1878288016200026d565b9450506020620002c4878288016200026d565b9350506040620002d7878288016200026d565b9250506060620002ea878288016200026d565b91505092959194509250565b600062000303826200030a565b9050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600080fd5b6200033a81620002f6565b81146200034657600080fd5b50565b60805160601c611dbb620003846000396000818161024f01528181610275015281816103ff01528181610dc201526110850152611dbb6000f3fe608060405234801561001057600080fd5b50600436106100ea5760003560e01c80636128480f1161008c5780639122c344116100665780639122c344146101db578063942a5e16146101f7578063ec02690114610213578063f7fb869b1461022f576100ea565b80636128480f146101ab578063779e3b63146101c75780638456cb59146101d1576100ea565b8063328a01d0116100c8578063328a01d0146101475780633f4ba83a146101655780635b1125911461016f5780635c975abb1461018d576100ea565b806321e093b1146100ef578063252bc8861461010d57806329dd214d1461012b575b600080fd5b6100f761024d565b60405161010491906118dc565b60405180910390f35b610115610271565b6040516101229190611b49565b60405180910390f35b61014560048036038101906101409190611593565b610321565b005b61014f610682565b60405161015c91906118dc565b60405180910390f35b61016d6106a8565b005b610177610744565b60405161018491906118dc565b60405180910390f35b61019561076a565b6040516101a29190611a61565b60405180910390f35b6101c560048036038101906101c09190611457565b610780565b005b6101cf6108f6565b005b6101d9610a76565b005b6101f560048036038101906101f09190611457565b610b12565b005b610211600480360381019061020c9190611484565b610ce4565b005b61022d60048036038101906102289190611662565b611039565b005b610237611208565b60405161024491906118dc565b60405180910390f35b7f000000000000000000000000000000000000000000000000000000000000000081565b60007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b81526004016102cc91906118dc565b60206040518083038186803b1580156102e457600080fd5b505afa1580156102f8573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061031c91906116ab565b905090565b61032961076a565b15610369576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161036090611ae5565b60405180910390fd5b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146103fb57336040517fff70ace20000000000000000000000000000000000000000000000000000000081526004016103f291906118dc565b60405180910390fd5b60007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663a9059cbb87876040518363ffffffff1660e01b81526004016104589291906119d3565b602060405180830381600087803b15801561047257600080fd5b505af1158015610486573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104aa9190611566565b9050806104e3576040517f20878f6200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600084849050111561061f578573ffffffffffffffffffffffffffffffffffffffff16633749c51a6040518060a001604052808c8c8080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f8201169050808301925050505050505081526020018a81526020018973ffffffffffffffffffffffffffffffffffffffff16815260200188815260200187878080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050508152506040518263ffffffff1660e01b81526004016105ec9190611b05565b600060405180830381600087803b15801561060657600080fd5b505af115801561061a573d6000803e3d6000fd5b505050505b818673ffffffffffffffffffffffffffffffffffffffff16887ff1302855733b40d8acb467ee990b6d56c05c80e28ebcabfa6e6f3f57cb50d6988c8c8a8a8a60405161066f959493929190611a7c565b60405180910390a4505050505050505050565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461073a57336040517f4677a0d300000000000000000000000000000000000000000000000000000000815260040161073191906118dc565b60405180910390fd5b61074261122e565b565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60008060009054906101000a900460ff16905090565b600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461081257336040517f4677a0d300000000000000000000000000000000000000000000000000000000815260040161080991906118dc565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415610879576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b80600060016101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055507fd41d83655d484bdf299598751c371b2d92088667266fe3774b25a97bdd5d039733826040516108eb9291906118f7565b60405180910390a150565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461098857336040517fe700765e00000000000000000000000000000000000000000000000000000000815260040161097f91906118dc565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff16600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161415610a11576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610b0857336040517f4677a0d3000000000000000000000000000000000000000000000000000000008152600401610aff91906118dc565b60405180910390fd5b610b106112cf565b565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614158015610bbe5750600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614155b15610c0057336040517fcdfcef97000000000000000000000000000000000000000000000000000000008152600401610bf791906118dc565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415610c67576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b80600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055507fe79965b5c67dcfb2cf5fe152715e4a7256cee62a3d5dd8484fd8a8539eb8beff3382604051610cd99291906118f7565b60405180910390a150565b610cec61076a565b15610d2c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610d2390611ae5565b60405180910390fd5b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610dbe57336040517fff70ace2000000000000000000000000000000000000000000000000000000008152600401610db591906118dc565b60405180910390fd5b60007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663a9059cbb8b876040518363ffffffff1660e01b8152600401610e1b9291906119d3565b602060405180830381600087803b158015610e3557600080fd5b505af1158015610e49573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e6d9190611566565b905080610ea6576040517f20878f6200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000848490501115610fe8578973ffffffffffffffffffffffffffffffffffffffff16633ff0693c6040518060c001604052808d73ffffffffffffffffffffffffffffffffffffffff1681526020018c81526020018b8b8080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f82011690508083019250505050505050815260200189815260200188815260200187878080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050508152506040518263ffffffff1660e01b8152600401610fb59190611b27565b600060405180830381600087803b158015610fcf57600080fd5b505af1158015610fe3573d6000803e3d6000fd5b505050505b81867f521fb0b407c2eb9b1375530e9b9a569889992140a688bc076aa72c1712012c888c8c8c8c8b8b8b60405161102597969594939291906119fc565b60405180910390a350505050505050505050565b61104161076a565b15611081576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161107890611ae5565b60405180910390fd5b60007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166323b872dd333085608001356040518463ffffffff1660e01b81526004016110e493929190611920565b602060405180830381600087803b1580156110fe57600080fd5b505af1158015611112573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111369190611566565b90508061116f576040517f20878f6200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b81600001353373ffffffffffffffffffffffffffffffffffffffff167f7ec1c94701e09b1652f3e1d307e60c4b9ebf99aff8c2079fd1d8c585e031c4e4328580602001906111bd9190611b64565b876080013588604001358980606001906111d79190611b64565b8b8060a001906111e79190611b64565b6040516111fc99989796959493929190611957565b60405180910390a35050565b600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b61123661076a565b611275576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161126c90611ac5565b60405180910390fd5b60008060006101000a81548160ff0219169083151502179055507f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa6112b8611371565b6040516112c591906118dc565b60405180910390a1565b6112d761076a565b15611317576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161130e90611ae5565b60405180910390fd5b60016000806101000a81548160ff0219169083151502179055507f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a25861135a611371565b60405161136791906118dc565b60405180910390a1565b600033905090565b60008135905061138881611d29565b92915050565b60008151905061139d81611d40565b92915050565b6000813590506113b281611d57565b92915050565b60008083601f8401126113ce576113cd611c9e565b5b8235905067ffffffffffffffff8111156113eb576113ea611c99565b5b60208301915083600182028301111561140757611406611cb2565b5b9250929050565b600060c0828403121561142457611423611ca8565b5b81905092915050565b60008135905061143c81611d6e565b92915050565b60008151905061145181611d6e565b92915050565b60006020828403121561146d5761146c611cc1565b5b600061147b84828501611379565b91505092915050565b600080600080600080600080600060e08a8c0312156114a6576114a5611cc1565b5b60006114b48c828d01611379565b99505060206114c58c828d0161142d565b98505060408a013567ffffffffffffffff8111156114e6576114e5611cbc565b5b6114f28c828d016113b8565b975097505060606115058c828d0161142d565b95505060806115168c828d0161142d565b94505060a08a013567ffffffffffffffff81111561153757611536611cbc565b5b6115438c828d016113b8565b935093505060c06115568c828d016113a3565b9150509295985092959850929598565b60006020828403121561157c5761157b611cc1565b5b600061158a8482850161138e565b91505092915050565b60008060008060008060008060c0898b0312156115b3576115b2611cc1565b5b600089013567ffffffffffffffff8111156115d1576115d0611cbc565b5b6115dd8b828c016113b8565b985098505060206115f08b828c0161142d565b96505060406116018b828c01611379565b95505060606116128b828c0161142d565b945050608089013567ffffffffffffffff81111561163357611632611cbc565b5b61163f8b828c016113b8565b935093505060a06116528b828c016113a3565b9150509295985092959890939650565b60006020828403121561167857611677611cc1565b5b600082013567ffffffffffffffff81111561169657611695611cbc565b5b6116a28482850161140e565b91505092915050565b6000602082840312156116c1576116c0611cc1565b5b60006116cf84828501611442565b91505092915050565b6116e181611c05565b82525050565b6116f081611c05565b82525050565b6116ff81611c17565b82525050565b60006117118385611be3565b935061171e838584611c57565b61172783611cc6565b840190509392505050565b600061173d82611bc7565b6117478185611bd2565b9350611757818560208601611c66565b61176081611cc6565b840191505092915050565b6000611778601483611bf4565b915061178382611cd7565b602082019050919050565b600061179b601083611bf4565b91506117a682611d00565b602082019050919050565b600060a08301600083015184820360008601526117ce8282611732565b91505060208301516117e360208601826118be565b5060408301516117f660408601826116d8565b50606083015161180960608601826118be565b50608083015184820360808601526118218282611732565b9150508091505092915050565b600060c08301600083015161184660008601826116d8565b50602083015161185960208601826118be565b50604083015184820360408601526118718282611732565b915050606083015161188660608601826118be565b50608083015161189960808601826118be565b5060a083015184820360a08601526118b18282611732565b9150508091505092915050565b6118c781611c4d565b82525050565b6118d681611c4d565b82525050565b60006020820190506118f160008301846116e7565b92915050565b600060408201905061190c60008301856116e7565b61191960208301846116e7565b9392505050565b600060608201905061193560008301866116e7565b61194260208301856116e7565b61194f60408301846118cd565b949350505050565b600060c08201905061196c600083018c6116e7565b818103602083015261197f818a8c611705565b905061198e60408301896118cd565b61199b60608301886118cd565b81810360808301526119ae818688611705565b905081810360a08301526119c3818486611705565b90509a9950505050505050505050565b60006040820190506119e860008301856116e7565b6119f560208301846118cd565b9392505050565b600060a082019050611a11600083018a6116e7565b611a1e60208301896118cd565b8181036040830152611a31818789611705565b9050611a4060608301866118cd565b8181036080830152611a53818486611705565b905098975050505050505050565b6000602082019050611a7660008301846116f6565b92915050565b60006060820190508181036000830152611a97818789611705565b9050611aa660208301866118cd565b8181036040830152611ab9818486611705565b90509695505050505050565b60006020820190508181036000830152611ade8161176b565b9050919050565b60006020820190508181036000830152611afe8161178e565b9050919050565b60006020820190508181036000830152611b1f81846117b1565b905092915050565b60006020820190508181036000830152611b41818461182e565b905092915050565b6000602082019050611b5e60008301846118cd565b92915050565b60008083356001602003843603038112611b8157611b80611cad565b5b80840192508235915067ffffffffffffffff821115611ba357611ba2611ca3565b5b602083019250600182023603831315611bbf57611bbe611cb7565b5b509250929050565b600081519050919050565b600082825260208201905092915050565b600082825260208201905092915050565b600082825260208201905092915050565b6000611c1082611c2d565b9050919050565b60008115159050919050565b6000819050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b82818337600083830152505050565b60005b83811015611c84578082015181840152602081019050611c69565b83811115611c93576000848401525b50505050565b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f5061757361626c653a206e6f7420706175736564000000000000000000000000600082015250565b7f5061757361626c653a2070617573656400000000000000000000000000000000600082015250565b611d3281611c05565b8114611d3d57600080fd5b50565b611d4981611c17565b8114611d5457600080fd5b50565b611d6081611c23565b8114611d6b57600080fd5b50565b611d7781611c4d565b8114611d8257600080fd5b5056fea26469706673582212204afae5ba3a424139ef405c884be1de5add9bbfcccb641fabd41c670b0fffb5db64736f6c63430008070033"; type ZetaConnectorEthConstructorParams = | [signer?: Signer] diff --git a/packages/interfaces/typechain-types/factories/contracts/ZetaConnector.non-eth.sol/ZetaConnectorNonEth__factory.ts b/packages/interfaces/typechain-types/factories/contracts/ZetaConnector.non-eth.sol/ZetaConnectorNonEth__factory.ts index b37aa9ff..2c5e0042 100644 --- a/packages/interfaces/typechain-types/factories/contracts/ZetaConnector.non-eth.sol/ZetaConnectorNonEth__factory.ts +++ b/packages/interfaces/typechain-types/factories/contracts/ZetaConnector.non-eth.sol/ZetaConnectorNonEth__factory.ts @@ -591,7 +591,7 @@ const _abi = [ ]; const _bytecode = - "0x60a06040527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6003553480156200003557600080fd5b506040516200239b3803806200239b83398181016040528101906200005b9190620002a8565b8383838360008060006101000a81548160ff021916908315150217905550600073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff161480620000e15750600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16145b80620001195750600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16145b80620001515750600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16145b1562000189576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8373ffffffffffffffffffffffffffffffffffffffff1660808173ffffffffffffffffffffffffffffffffffffffff1660601b8152505082600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555081600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555080600060016101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050505050505050506200036d565b600081519050620002a28162000353565b92915050565b60008060008060808587031215620002c557620002c46200034e565b5b6000620002d58782880162000291565b9450506020620002e88782880162000291565b9350506040620002fb8782880162000291565b92505060606200030e8782880162000291565b91505092959194509250565b600062000327826200032e565b9050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600080fd5b6200035e816200031a565b81146200036a57600080fd5b50565b60805160601c611fe5620003b66000396000818161029f015281816102c5015281816104500152818161053e01528181610f460152818161103401526112a30152611fe56000f3fe608060405234801561001057600080fd5b50600436106101005760003560e01c80636f8b44b011610097578063942a5e1611610066578063942a5e1614610229578063d5abeb0114610245578063ec02690114610263578063f7fb869b1461027f57610100565b80636f8b44b0146101dd578063779e3b63146101f95780638456cb59146102035780639122c3441461020d57610100565b80633f4ba83a116100d35780633f4ba83a1461017b5780635b112591146101855780635c975abb146101a35780636128480f146101c157610100565b806321e093b114610105578063252bc8861461012357806329dd214d14610141578063328a01d01461015d575b600080fd5b61010d61029d565b60405161011a9190611a98565b60405180910390f35b61012b6102c1565b6040516101389190611d05565b60405180910390f35b61015b60048036038101906101569190611713565b610371565b005b610165610769565b6040516101729190611a98565b60405180910390f35b61018361078f565b005b61018d61082b565b60405161019a9190611a98565b60405180910390f35b6101ab610851565b6040516101b89190611c1d565b60405180910390f35b6101db60048036038101906101d69190611604565b610867565b005b6101f760048036038101906101f2919061182b565b6109dd565b005b610201610a79565b005b61020b610bf9565b005b61022760048036038101906102229190611604565b610c95565b005b610243600480360381019061023e9190611631565b610e67565b005b61024d611253565b60405161025a9190611d05565b60405180910390f35b61027d600480360381019061027891906117e2565b611259565b005b6102876113ca565b6040516102949190611a98565b60405180910390f35b7f000000000000000000000000000000000000000000000000000000000000000081565b60007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b815260040161031c9190611a98565b60206040518083038186803b15801561033457600080fd5b505afa158015610348573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061036c9190611858565b905090565b610379610851565b156103b9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016103b090611ca1565b60405180910390fd5b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461044b57336040517fff70ace20000000000000000000000000000000000000000000000000000000081526004016104429190611a98565b60405180910390fd5b6003547f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166318160ddd6040518163ffffffff1660e01b815260040160206040518083038186803b1580156104b457600080fd5b505afa1580156104c8573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104ec9190611858565b856104f79190611dc1565b111561053c576003546040517f3d3dbc830000000000000000000000000000000000000000000000000000000081526004016105339190611d05565b60405180910390fd5b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16631e458bee8686846040518463ffffffff1660e01b815260040161059993929190611b81565b600060405180830381600087803b1580156105b357600080fd5b505af11580156105c7573d6000803e3d6000fd5b505050506000838390501115610707578473ffffffffffffffffffffffffffffffffffffffff16633749c51a6040518060a001604052808b8b8080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f8201169050808301925050505050505081526020018981526020018873ffffffffffffffffffffffffffffffffffffffff16815260200187815260200186868080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050508152506040518263ffffffff1660e01b81526004016106d49190611cc1565b600060405180830381600087803b1580156106ee57600080fd5b505af1158015610702573d6000803e3d6000fd5b505050505b808573ffffffffffffffffffffffffffffffffffffffff16877ff1302855733b40d8acb467ee990b6d56c05c80e28ebcabfa6e6f3f57cb50d6988b8b898989604051610757959493929190611c38565b60405180910390a45050505050505050565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461082157336040517f4677a0d30000000000000000000000000000000000000000000000000000000081526004016108189190611a98565b60405180910390fd5b6108296113f0565b565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60008060009054906101000a900460ff16905090565b600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146108f957336040517f4677a0d30000000000000000000000000000000000000000000000000000000081526004016108f09190611a98565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415610960576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b80600060016101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055507fd41d83655d484bdf299598751c371b2d92088667266fe3774b25a97bdd5d039733826040516109d2929190611ab3565b60405180910390a150565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610a6f57336040517fff70ace2000000000000000000000000000000000000000000000000000000008152600401610a669190611a98565b60405180910390fd5b8060038190555050565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610b0b57336040517fe700765e000000000000000000000000000000000000000000000000000000008152600401610b029190611a98565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff16600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161415610b94576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610c8b57336040517f4677a0d3000000000000000000000000000000000000000000000000000000008152600401610c829190611a98565b60405180910390fd5b610c93611491565b565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614158015610d415750600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614155b15610d8357336040517fcdfcef97000000000000000000000000000000000000000000000000000000008152600401610d7a9190611a98565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415610dea576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b80600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055507fe79965b5c67dcfb2cf5fe152715e4a7256cee62a3d5dd8484fd8a8539eb8beff3382604051610e5c929190611ab3565b60405180910390a150565b610e6f610851565b15610eaf576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610ea690611ca1565b60405180910390fd5b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610f4157336040517fff70ace2000000000000000000000000000000000000000000000000000000008152600401610f389190611a98565b60405180910390fd5b6003547f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166318160ddd6040518163ffffffff1660e01b815260040160206040518083038186803b158015610faa57600080fd5b505afa158015610fbe573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610fe29190611858565b85610fed9190611dc1565b1115611032576003546040517f3d3dbc830000000000000000000000000000000000000000000000000000000081526004016110299190611d05565b60405180910390fd5b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16631e458bee8a86846040518463ffffffff1660e01b815260040161108f93929190611b81565b600060405180830381600087803b1580156110a957600080fd5b505af11580156110bd573d6000803e3d6000fd5b505050506000838390501115611203578873ffffffffffffffffffffffffffffffffffffffff16633ff0693c6040518060c001604052808c73ffffffffffffffffffffffffffffffffffffffff1681526020018b81526020018a8a8080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f82011690508083019250505050505050815260200188815260200187815260200186868080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050508152506040518263ffffffff1660e01b81526004016111d09190611ce3565b600060405180830381600087803b1580156111ea57600080fd5b505af11580156111fe573d6000803e3d6000fd5b505050505b80857f521fb0b407c2eb9b1375530e9b9a569889992140a688bc076aa72c1712012c888b8b8b8b8a8a8a6040516112409796959493929190611bb8565b60405180910390a3505050505050505050565b60035481565b611261610851565b156112a1576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161129890611ca1565b60405180910390fd5b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166379cc67903383608001356040518363ffffffff1660e01b8152600401611300929190611b58565b600060405180830381600087803b15801561131a57600080fd5b505af115801561132e573d6000803e3d6000fd5b5050505080600001353373ffffffffffffffffffffffffffffffffffffffff167f7ec1c94701e09b1652f3e1d307e60c4b9ebf99aff8c2079fd1d8c585e031c4e4328480602001906113809190611d20565b8660800135876040013588806060019061139a9190611d20565b8a8060a001906113aa9190611d20565b6040516113bf99989796959493929190611adc565b60405180910390a350565b600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6113f8610851565b611437576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161142e90611c81565b60405180910390fd5b60008060006101000a81548160ff0219169083151502179055507f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa61147a611533565b6040516114879190611a98565b60405180910390a1565b611499610851565b156114d9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016114d090611ca1565b60405180910390fd5b60016000806101000a81548160ff0219169083151502179055507f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a25861151c611533565b6040516115299190611a98565b60405180910390a1565b600033905090565b60008135905061154a81611f6a565b92915050565b60008135905061155f81611f81565b92915050565b60008083601f84011261157b5761157a611edf565b5b8235905067ffffffffffffffff81111561159857611597611eda565b5b6020830191508360018202830111156115b4576115b3611ef3565b5b9250929050565b600060c082840312156115d1576115d0611ee9565b5b81905092915050565b6000813590506115e981611f98565b92915050565b6000815190506115fe81611f98565b92915050565b60006020828403121561161a57611619611f02565b5b60006116288482850161153b565b91505092915050565b600080600080600080600080600060e08a8c03121561165357611652611f02565b5b60006116618c828d0161153b565b99505060206116728c828d016115da565b98505060408a013567ffffffffffffffff81111561169357611692611efd565b5b61169f8c828d01611565565b975097505060606116b28c828d016115da565b95505060806116c38c828d016115da565b94505060a08a013567ffffffffffffffff8111156116e4576116e3611efd565b5b6116f08c828d01611565565b935093505060c06117038c828d01611550565b9150509295985092959850929598565b60008060008060008060008060c0898b03121561173357611732611f02565b5b600089013567ffffffffffffffff81111561175157611750611efd565b5b61175d8b828c01611565565b985098505060206117708b828c016115da565b96505060406117818b828c0161153b565b95505060606117928b828c016115da565b945050608089013567ffffffffffffffff8111156117b3576117b2611efd565b5b6117bf8b828c01611565565b935093505060a06117d28b828c01611550565b9150509295985092959890939650565b6000602082840312156117f8576117f7611f02565b5b600082013567ffffffffffffffff81111561181657611815611efd565b5b611822848285016115bb565b91505092915050565b60006020828403121561184157611840611f02565b5b600061184f848285016115da565b91505092915050565b60006020828403121561186e5761186d611f02565b5b600061187c848285016115ef565b91505092915050565b61188e81611e17565b82525050565b61189d81611e17565b82525050565b6118ac81611e29565b82525050565b6118bb81611e35565b82525050565b60006118cd8385611d9f565b93506118da838584611e69565b6118e383611f07565b840190509392505050565b60006118f982611d83565b6119038185611d8e565b9350611913818560208601611e78565b61191c81611f07565b840191505092915050565b6000611934601483611db0565b915061193f82611f18565b602082019050919050565b6000611957601083611db0565b915061196282611f41565b602082019050919050565b600060a083016000830151848203600086015261198a82826118ee565b915050602083015161199f6020860182611a7a565b5060408301516119b26040860182611885565b5060608301516119c56060860182611a7a565b50608083015184820360808601526119dd82826118ee565b9150508091505092915050565b600060c083016000830151611a026000860182611885565b506020830151611a156020860182611a7a565b5060408301518482036040860152611a2d82826118ee565b9150506060830151611a426060860182611a7a565b506080830151611a556080860182611a7a565b5060a083015184820360a0860152611a6d82826118ee565b9150508091505092915050565b611a8381611e5f565b82525050565b611a9281611e5f565b82525050565b6000602082019050611aad6000830184611894565b92915050565b6000604082019050611ac86000830185611894565b611ad56020830184611894565b9392505050565b600060c082019050611af1600083018c611894565b8181036020830152611b04818a8c6118c1565b9050611b136040830189611a89565b611b206060830188611a89565b8181036080830152611b338186886118c1565b905081810360a0830152611b488184866118c1565b90509a9950505050505050505050565b6000604082019050611b6d6000830185611894565b611b7a6020830184611a89565b9392505050565b6000606082019050611b966000830186611894565b611ba36020830185611a89565b611bb060408301846118b2565b949350505050565b600060a082019050611bcd600083018a611894565b611bda6020830189611a89565b8181036040830152611bed8187896118c1565b9050611bfc6060830186611a89565b8181036080830152611c0f8184866118c1565b905098975050505050505050565b6000602082019050611c3260008301846118a3565b92915050565b60006060820190508181036000830152611c538187896118c1565b9050611c626020830186611a89565b8181036040830152611c758184866118c1565b90509695505050505050565b60006020820190508181036000830152611c9a81611927565b9050919050565b60006020820190508181036000830152611cba8161194a565b9050919050565b60006020820190508181036000830152611cdb818461196d565b905092915050565b60006020820190508181036000830152611cfd81846119ea565b905092915050565b6000602082019050611d1a6000830184611a89565b92915050565b60008083356001602003843603038112611d3d57611d3c611eee565b5b80840192508235915067ffffffffffffffff821115611d5f57611d5e611ee4565b5b602083019250600182023603831315611d7b57611d7a611ef8565b5b509250929050565b600081519050919050565b600082825260208201905092915050565b600082825260208201905092915050565b600082825260208201905092915050565b6000611dcc82611e5f565b9150611dd783611e5f565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff03821115611e0c57611e0b611eab565b5b828201905092915050565b6000611e2282611e3f565b9050919050565b60008115159050919050565b6000819050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b82818337600083830152505050565b60005b83811015611e96578082015181840152602081019050611e7b565b83811115611ea5576000848401525b50505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f5061757361626c653a206e6f7420706175736564000000000000000000000000600082015250565b7f5061757361626c653a2070617573656400000000000000000000000000000000600082015250565b611f7381611e17565b8114611f7e57600080fd5b50565b611f8a81611e35565b8114611f9557600080fd5b50565b611fa181611e5f565b8114611fac57600080fd5b5056fea264697066735822122026e075a0329747f85269f5d9d020ef49f1b1599f4c1ed2ca912d2621aec8339c64736f6c63430008070033"; + "0x60a06040527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6003553480156200003557600080fd5b506040516200239b3803806200239b83398181016040528101906200005b9190620002a8565b8383838360008060006101000a81548160ff021916908315150217905550600073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff161480620000e15750600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16145b80620001195750600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16145b80620001515750600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16145b1562000189576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8373ffffffffffffffffffffffffffffffffffffffff1660808173ffffffffffffffffffffffffffffffffffffffff1660601b8152505082600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555081600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555080600060016101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050505050505050506200036d565b600081519050620002a28162000353565b92915050565b60008060008060808587031215620002c557620002c46200034e565b5b6000620002d58782880162000291565b9450506020620002e88782880162000291565b9350506040620002fb8782880162000291565b92505060606200030e8782880162000291565b91505092959194509250565b600062000327826200032e565b9050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600080fd5b6200035e816200031a565b81146200036a57600080fd5b50565b60805160601c611fe5620003b66000396000818161029f015281816102c5015281816104500152818161053e01528181610f460152818161103401526112a30152611fe56000f3fe608060405234801561001057600080fd5b50600436106101005760003560e01c80636f8b44b011610097578063942a5e1611610066578063942a5e1614610229578063d5abeb0114610245578063ec02690114610263578063f7fb869b1461027f57610100565b80636f8b44b0146101dd578063779e3b63146101f95780638456cb59146102035780639122c3441461020d57610100565b80633f4ba83a116100d35780633f4ba83a1461017b5780635b112591146101855780635c975abb146101a35780636128480f146101c157610100565b806321e093b114610105578063252bc8861461012357806329dd214d14610141578063328a01d01461015d575b600080fd5b61010d61029d565b60405161011a9190611a98565b60405180910390f35b61012b6102c1565b6040516101389190611d05565b60405180910390f35b61015b60048036038101906101569190611713565b610371565b005b610165610769565b6040516101729190611a98565b60405180910390f35b61018361078f565b005b61018d61082b565b60405161019a9190611a98565b60405180910390f35b6101ab610851565b6040516101b89190611c1d565b60405180910390f35b6101db60048036038101906101d69190611604565b610867565b005b6101f760048036038101906101f2919061182b565b6109dd565b005b610201610a79565b005b61020b610bf9565b005b61022760048036038101906102229190611604565b610c95565b005b610243600480360381019061023e9190611631565b610e67565b005b61024d611253565b60405161025a9190611d05565b60405180910390f35b61027d600480360381019061027891906117e2565b611259565b005b6102876113ca565b6040516102949190611a98565b60405180910390f35b7f000000000000000000000000000000000000000000000000000000000000000081565b60007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b815260040161031c9190611a98565b60206040518083038186803b15801561033457600080fd5b505afa158015610348573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061036c9190611858565b905090565b610379610851565b156103b9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016103b090611ca1565b60405180910390fd5b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461044b57336040517fff70ace20000000000000000000000000000000000000000000000000000000081526004016104429190611a98565b60405180910390fd5b6003547f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166318160ddd6040518163ffffffff1660e01b815260040160206040518083038186803b1580156104b457600080fd5b505afa1580156104c8573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104ec9190611858565b856104f79190611dc1565b111561053c576003546040517f3d3dbc830000000000000000000000000000000000000000000000000000000081526004016105339190611d05565b60405180910390fd5b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16631e458bee8686846040518463ffffffff1660e01b815260040161059993929190611b81565b600060405180830381600087803b1580156105b357600080fd5b505af11580156105c7573d6000803e3d6000fd5b505050506000838390501115610707578473ffffffffffffffffffffffffffffffffffffffff16633749c51a6040518060a001604052808b8b8080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f8201169050808301925050505050505081526020018981526020018873ffffffffffffffffffffffffffffffffffffffff16815260200187815260200186868080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050508152506040518263ffffffff1660e01b81526004016106d49190611cc1565b600060405180830381600087803b1580156106ee57600080fd5b505af1158015610702573d6000803e3d6000fd5b505050505b808573ffffffffffffffffffffffffffffffffffffffff16877ff1302855733b40d8acb467ee990b6d56c05c80e28ebcabfa6e6f3f57cb50d6988b8b898989604051610757959493929190611c38565b60405180910390a45050505050505050565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461082157336040517f4677a0d30000000000000000000000000000000000000000000000000000000081526004016108189190611a98565b60405180910390fd5b6108296113f0565b565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60008060009054906101000a900460ff16905090565b600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146108f957336040517f4677a0d30000000000000000000000000000000000000000000000000000000081526004016108f09190611a98565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415610960576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b80600060016101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055507fd41d83655d484bdf299598751c371b2d92088667266fe3774b25a97bdd5d039733826040516109d2929190611ab3565b60405180910390a150565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610a6f57336040517fff70ace2000000000000000000000000000000000000000000000000000000008152600401610a669190611a98565b60405180910390fd5b8060038190555050565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610b0b57336040517fe700765e000000000000000000000000000000000000000000000000000000008152600401610b029190611a98565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff16600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161415610b94576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610c8b57336040517f4677a0d3000000000000000000000000000000000000000000000000000000008152600401610c829190611a98565b60405180910390fd5b610c93611491565b565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614158015610d415750600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614155b15610d8357336040517fcdfcef97000000000000000000000000000000000000000000000000000000008152600401610d7a9190611a98565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415610dea576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b80600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055507fe79965b5c67dcfb2cf5fe152715e4a7256cee62a3d5dd8484fd8a8539eb8beff3382604051610e5c929190611ab3565b60405180910390a150565b610e6f610851565b15610eaf576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610ea690611ca1565b60405180910390fd5b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610f4157336040517fff70ace2000000000000000000000000000000000000000000000000000000008152600401610f389190611a98565b60405180910390fd5b6003547f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166318160ddd6040518163ffffffff1660e01b815260040160206040518083038186803b158015610faa57600080fd5b505afa158015610fbe573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610fe29190611858565b85610fed9190611dc1565b1115611032576003546040517f3d3dbc830000000000000000000000000000000000000000000000000000000081526004016110299190611d05565b60405180910390fd5b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16631e458bee8a86846040518463ffffffff1660e01b815260040161108f93929190611b81565b600060405180830381600087803b1580156110a957600080fd5b505af11580156110bd573d6000803e3d6000fd5b505050506000838390501115611203578873ffffffffffffffffffffffffffffffffffffffff16633ff0693c6040518060c001604052808c73ffffffffffffffffffffffffffffffffffffffff1681526020018b81526020018a8a8080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f82011690508083019250505050505050815260200188815260200187815260200186868080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050508152506040518263ffffffff1660e01b81526004016111d09190611ce3565b600060405180830381600087803b1580156111ea57600080fd5b505af11580156111fe573d6000803e3d6000fd5b505050505b80857f521fb0b407c2eb9b1375530e9b9a569889992140a688bc076aa72c1712012c888b8b8b8b8a8a8a6040516112409796959493929190611bb8565b60405180910390a3505050505050505050565b60035481565b611261610851565b156112a1576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161129890611ca1565b60405180910390fd5b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166379cc67903383608001356040518363ffffffff1660e01b8152600401611300929190611b58565b600060405180830381600087803b15801561131a57600080fd5b505af115801561132e573d6000803e3d6000fd5b5050505080600001353373ffffffffffffffffffffffffffffffffffffffff167f7ec1c94701e09b1652f3e1d307e60c4b9ebf99aff8c2079fd1d8c585e031c4e4328480602001906113809190611d20565b8660800135876040013588806060019061139a9190611d20565b8a8060a001906113aa9190611d20565b6040516113bf99989796959493929190611adc565b60405180910390a350565b600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6113f8610851565b611437576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161142e90611c81565b60405180910390fd5b60008060006101000a81548160ff0219169083151502179055507f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa61147a611533565b6040516114879190611a98565b60405180910390a1565b611499610851565b156114d9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016114d090611ca1565b60405180910390fd5b60016000806101000a81548160ff0219169083151502179055507f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a25861151c611533565b6040516115299190611a98565b60405180910390a1565b600033905090565b60008135905061154a81611f6a565b92915050565b60008135905061155f81611f81565b92915050565b60008083601f84011261157b5761157a611edf565b5b8235905067ffffffffffffffff81111561159857611597611eda565b5b6020830191508360018202830111156115b4576115b3611ef3565b5b9250929050565b600060c082840312156115d1576115d0611ee9565b5b81905092915050565b6000813590506115e981611f98565b92915050565b6000815190506115fe81611f98565b92915050565b60006020828403121561161a57611619611f02565b5b60006116288482850161153b565b91505092915050565b600080600080600080600080600060e08a8c03121561165357611652611f02565b5b60006116618c828d0161153b565b99505060206116728c828d016115da565b98505060408a013567ffffffffffffffff81111561169357611692611efd565b5b61169f8c828d01611565565b975097505060606116b28c828d016115da565b95505060806116c38c828d016115da565b94505060a08a013567ffffffffffffffff8111156116e4576116e3611efd565b5b6116f08c828d01611565565b935093505060c06117038c828d01611550565b9150509295985092959850929598565b60008060008060008060008060c0898b03121561173357611732611f02565b5b600089013567ffffffffffffffff81111561175157611750611efd565b5b61175d8b828c01611565565b985098505060206117708b828c016115da565b96505060406117818b828c0161153b565b95505060606117928b828c016115da565b945050608089013567ffffffffffffffff8111156117b3576117b2611efd565b5b6117bf8b828c01611565565b935093505060a06117d28b828c01611550565b9150509295985092959890939650565b6000602082840312156117f8576117f7611f02565b5b600082013567ffffffffffffffff81111561181657611815611efd565b5b611822848285016115bb565b91505092915050565b60006020828403121561184157611840611f02565b5b600061184f848285016115da565b91505092915050565b60006020828403121561186e5761186d611f02565b5b600061187c848285016115ef565b91505092915050565b61188e81611e17565b82525050565b61189d81611e17565b82525050565b6118ac81611e29565b82525050565b6118bb81611e35565b82525050565b60006118cd8385611d9f565b93506118da838584611e69565b6118e383611f07565b840190509392505050565b60006118f982611d83565b6119038185611d8e565b9350611913818560208601611e78565b61191c81611f07565b840191505092915050565b6000611934601483611db0565b915061193f82611f18565b602082019050919050565b6000611957601083611db0565b915061196282611f41565b602082019050919050565b600060a083016000830151848203600086015261198a82826118ee565b915050602083015161199f6020860182611a7a565b5060408301516119b26040860182611885565b5060608301516119c56060860182611a7a565b50608083015184820360808601526119dd82826118ee565b9150508091505092915050565b600060c083016000830151611a026000860182611885565b506020830151611a156020860182611a7a565b5060408301518482036040860152611a2d82826118ee565b9150506060830151611a426060860182611a7a565b506080830151611a556080860182611a7a565b5060a083015184820360a0860152611a6d82826118ee565b9150508091505092915050565b611a8381611e5f565b82525050565b611a9281611e5f565b82525050565b6000602082019050611aad6000830184611894565b92915050565b6000604082019050611ac86000830185611894565b611ad56020830184611894565b9392505050565b600060c082019050611af1600083018c611894565b8181036020830152611b04818a8c6118c1565b9050611b136040830189611a89565b611b206060830188611a89565b8181036080830152611b338186886118c1565b905081810360a0830152611b488184866118c1565b90509a9950505050505050505050565b6000604082019050611b6d6000830185611894565b611b7a6020830184611a89565b9392505050565b6000606082019050611b966000830186611894565b611ba36020830185611a89565b611bb060408301846118b2565b949350505050565b600060a082019050611bcd600083018a611894565b611bda6020830189611a89565b8181036040830152611bed8187896118c1565b9050611bfc6060830186611a89565b8181036080830152611c0f8184866118c1565b905098975050505050505050565b6000602082019050611c3260008301846118a3565b92915050565b60006060820190508181036000830152611c538187896118c1565b9050611c626020830186611a89565b8181036040830152611c758184866118c1565b90509695505050505050565b60006020820190508181036000830152611c9a81611927565b9050919050565b60006020820190508181036000830152611cba8161194a565b9050919050565b60006020820190508181036000830152611cdb818461196d565b905092915050565b60006020820190508181036000830152611cfd81846119ea565b905092915050565b6000602082019050611d1a6000830184611a89565b92915050565b60008083356001602003843603038112611d3d57611d3c611eee565b5b80840192508235915067ffffffffffffffff821115611d5f57611d5e611ee4565b5b602083019250600182023603831315611d7b57611d7a611ef8565b5b509250929050565b600081519050919050565b600082825260208201905092915050565b600082825260208201905092915050565b600082825260208201905092915050565b6000611dcc82611e5f565b9150611dd783611e5f565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff03821115611e0c57611e0b611eab565b5b828201905092915050565b6000611e2282611e3f565b9050919050565b60008115159050919050565b6000819050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b82818337600083830152505050565b60005b83811015611e96578082015181840152602081019050611e7b565b83811115611ea5576000848401525b50505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f5061757361626c653a206e6f7420706175736564000000000000000000000000600082015250565b7f5061757361626c653a2070617573656400000000000000000000000000000000600082015250565b611f7381611e17565b8114611f7e57600080fd5b50565b611f8a81611e35565b8114611f9557600080fd5b50565b611fa181611e5f565b8114611fac57600080fd5b5056fea26469706673582212207c81f3eda238f1aaea94a3be443049f79c941c060e4a8f0c9b2110fa6330805e64736f6c63430008070033"; type ZetaConnectorNonEthConstructorParams = | [signer?: Signer] diff --git a/packages/interfaces/typechain-types/factories/contracts/ZetaInteractor__factory.ts b/packages/interfaces/typechain-types/factories/contracts/ZetaInteractor__factory.ts index eb1e66e3..b34920eb 100644 --- a/packages/interfaces/typechain-types/factories/contracts/ZetaInteractor__factory.ts +++ b/packages/interfaces/typechain-types/factories/contracts/ZetaInteractor__factory.ts @@ -10,6 +10,11 @@ import type { } from "../../contracts/ZetaInteractor"; const _abi = [ + { + inputs: [], + name: "InvalidAddress", + type: "error", + }, { inputs: [ { diff --git a/packages/interfaces/typechain-types/factories/contracts/ZetaTokenConsumerTrident.strategy.sol/WETH9__factory.ts b/packages/interfaces/typechain-types/factories/contracts/ZetaTokenConsumerTrident.strategy.sol/WETH9__factory.ts new file mode 100644 index 00000000..511e54d2 --- /dev/null +++ b/packages/interfaces/typechain-types/factories/contracts/ZetaTokenConsumerTrident.strategy.sol/WETH9__factory.ts @@ -0,0 +1,74 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ + +import { Contract, Signer, utils } from "ethers"; +import type { Provider } from "@ethersproject/providers"; +import type { + WETH9, + WETH9Interface, +} from "../../../contracts/ZetaTokenConsumerTrident.strategy.sol/WETH9"; + +const _abi = [ + { + inputs: [], + name: "deposit", + outputs: [], + stateMutability: "payable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "to", + type: "address", + }, + ], + name: "depositTo", + outputs: [], + stateMutability: "payable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "wad", + type: "uint256", + }, + ], + name: "withdraw", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address payable", + name: "to", + type: "address", + }, + { + internalType: "uint256", + name: "value", + type: "uint256", + }, + ], + name: "withdrawTo", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, +]; + +export class WETH9__factory { + static readonly abi = _abi; + static createInterface(): WETH9Interface { + return new utils.Interface(_abi) as WETH9Interface; + } + static connect(address: string, signerOrProvider: Signer | Provider): WETH9 { + return new Contract(address, _abi, signerOrProvider) as WETH9; + } +} diff --git a/packages/interfaces/typechain-types/factories/contracts/ZetaTokenConsumerTrident.strategy.sol/ZetaTokenConsumerTridentErrors__factory.ts b/packages/interfaces/typechain-types/factories/contracts/ZetaTokenConsumerTrident.strategy.sol/ZetaTokenConsumerTridentErrors__factory.ts new file mode 100644 index 00000000..4d8a7ee7 --- /dev/null +++ b/packages/interfaces/typechain-types/factories/contracts/ZetaTokenConsumerTrident.strategy.sol/ZetaTokenConsumerTridentErrors__factory.ts @@ -0,0 +1,45 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ + +import { Contract, Signer, utils } from "ethers"; +import type { Provider } from "@ethersproject/providers"; +import type { + ZetaTokenConsumerTridentErrors, + ZetaTokenConsumerTridentErrorsInterface, +} from "../../../contracts/ZetaTokenConsumerTrident.strategy.sol/ZetaTokenConsumerTridentErrors"; + +const _abi = [ + { + inputs: [], + name: "ErrorSendingETH", + type: "error", + }, + { + inputs: [], + name: "InputCantBeZero", + type: "error", + }, + { + inputs: [], + name: "ReentrancyError", + type: "error", + }, +]; + +export class ZetaTokenConsumerTridentErrors__factory { + static readonly abi = _abi; + static createInterface(): ZetaTokenConsumerTridentErrorsInterface { + return new utils.Interface(_abi) as ZetaTokenConsumerTridentErrorsInterface; + } + static connect( + address: string, + signerOrProvider: Signer | Provider + ): ZetaTokenConsumerTridentErrors { + return new Contract( + address, + _abi, + signerOrProvider + ) as ZetaTokenConsumerTridentErrors; + } +} diff --git a/packages/interfaces/typechain-types/factories/contracts/ZetaTokenConsumerTrident.strategy.sol/ZetaTokenConsumerTrident__factory.ts b/packages/interfaces/typechain-types/factories/contracts/ZetaTokenConsumerTrident.strategy.sol/ZetaTokenConsumerTrident__factory.ts new file mode 100644 index 00000000..c35c37d2 --- /dev/null +++ b/packages/interfaces/typechain-types/factories/contracts/ZetaTokenConsumerTrident.strategy.sol/ZetaTokenConsumerTrident__factory.ts @@ -0,0 +1,384 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import { Signer, utils, Contract, ContractFactory, Overrides } from "ethers"; +import type { Provider, TransactionRequest } from "@ethersproject/providers"; +import type { + ZetaTokenConsumerTrident, + ZetaTokenConsumerTridentInterface, +} from "../../../contracts/ZetaTokenConsumerTrident.strategy.sol/ZetaTokenConsumerTrident"; + +const _abi = [ + { + inputs: [ + { + internalType: "address", + name: "zetaToken_", + type: "address", + }, + { + internalType: "address", + name: "uniswapV3Router_", + type: "address", + }, + { + internalType: "address", + name: "WETH9Address_", + type: "address", + }, + { + internalType: "address", + name: "poolFactory_", + type: "address", + }, + ], + stateMutability: "nonpayable", + type: "constructor", + }, + { + inputs: [], + name: "ErrorSendingETH", + type: "error", + }, + { + inputs: [], + name: "InputCantBeZero", + type: "error", + }, + { + inputs: [], + name: "InvalidAddress", + type: "error", + }, + { + inputs: [], + name: "ReentrancyError", + type: "error", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "uint256", + name: "amountIn", + type: "uint256", + }, + { + indexed: false, + internalType: "uint256", + name: "amountOut", + type: "uint256", + }, + ], + name: "EthExchangedForZeta", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "address", + name: "token", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "amountIn", + type: "uint256", + }, + { + indexed: false, + internalType: "uint256", + name: "amountOut", + type: "uint256", + }, + ], + name: "TokenExchangedForZeta", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "uint256", + name: "amountIn", + type: "uint256", + }, + { + indexed: false, + internalType: "uint256", + name: "amountOut", + type: "uint256", + }, + ], + name: "ZetaExchangedForEth", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "address", + name: "token", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "amountIn", + type: "uint256", + }, + { + indexed: false, + internalType: "uint256", + name: "amountOut", + type: "uint256", + }, + ], + name: "ZetaExchangedForToken", + type: "event", + }, + { + inputs: [ + { + internalType: "address", + name: "destinationAddress", + type: "address", + }, + { + internalType: "uint256", + name: "minAmountOut", + type: "uint256", + }, + { + internalType: "uint256", + name: "zetaTokenAmount", + type: "uint256", + }, + ], + name: "getEthFromZeta", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "destinationAddress", + type: "address", + }, + { + internalType: "uint256", + name: "minAmountOut", + type: "uint256", + }, + { + internalType: "address", + name: "outputToken", + type: "address", + }, + { + internalType: "uint256", + name: "zetaTokenAmount", + type: "uint256", + }, + ], + name: "getTokenFromZeta", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "destinationAddress", + type: "address", + }, + { + internalType: "uint256", + name: "minAmountOut", + type: "uint256", + }, + ], + name: "getZetaFromEth", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "payable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "destinationAddress", + type: "address", + }, + { + internalType: "uint256", + name: "minAmountOut", + type: "uint256", + }, + { + internalType: "address", + name: "inputToken", + type: "address", + }, + { + internalType: "uint256", + name: "inputTokenAmount", + type: "uint256", + }, + ], + name: "getZetaFromToken", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "poolFactory", + outputs: [ + { + internalType: "contract ConcentratedLiquidityPoolFactory", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "tridentRouter", + outputs: [ + { + internalType: "contract IPoolRouter", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "zetaToken", + outputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + stateMutability: "payable", + type: "receive", + }, +]; + +const _bytecode = + "0x6101006040523480156200001257600080fd5b5060405162002add38038062002add833981810160405281019062000038919062000245565b600073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff161480620000a05750600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16145b80620000d85750600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16145b80620001105750600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16145b1562000148576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8373ffffffffffffffffffffffffffffffffffffffff1660a08173ffffffffffffffffffffffffffffffffffffffff1660601b815250508273ffffffffffffffffffffffffffffffffffffffff1660c08173ffffffffffffffffffffffffffffffffffffffff1660601b815250508073ffffffffffffffffffffffffffffffffffffffff1660e08173ffffffffffffffffffffffffffffffffffffffff1660601b815250508173ffffffffffffffffffffffffffffffffffffffff1660808173ffffffffffffffffffffffffffffffffffffffff1660601b81525050505050506200030a565b6000815190506200023f81620002f0565b92915050565b60008060008060808587031215620002625762000261620002eb565b5b600062000272878288016200022e565b945050602062000285878288016200022e565b935050604062000298878288016200022e565b9250506060620002ab878288016200022e565b91505092959194509250565b6000620002c482620002cb565b9050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600080fd5b620002fb81620002b7565b81146200030757600080fd5b50565b60805160601c60a05160601c60c05160601c60e05160601c6126c962000414600039600081816102e0015281816106ca015281816107d601528181610b0c01528181610cde015281816111a8015261129401526000818161042c0152818161064f01528181610a1201528181610c2301528181610e4901528181610f3e015281816110ed01526114f00152600081816102b401528181610521015281816107a601528181610bd901528181610c4501528181610c9101528181610da3015281816110a30152818161110f0152818161115b015261147b0152600081816102930152818161069e0152818161078501528181610cb20152818161117c015261126301526126c96000f3fe6080604052600436106100745760003560e01c80634219dc401161004e5780634219dc401461011857806354c49a2a1461014357806364b5528a14610180578063a53fb10b146101ab5761007b565b8063013b2ff81461008057806321e093b1146100b05780632405620a146100db5761007b565b3661007b57005b600080fd5b61009a60048036038101906100959190611bbd565b6101e8565b6040516100a7919061229d565b60405180910390f35b3480156100bc57600080fd5b506100c561051f565b6040516100d29190612068565b60405180910390f35b3480156100e757600080fd5b5061010260048036038101906100fd9190611bfd565b610543565b60405161010f919061229d565b60405180910390f35b34801561012457600080fd5b5061012d610b0a565b60405161013a9190612188565b60405180910390f35b34801561014f57600080fd5b5061016a60048036038101906101659190611c64565b610b2e565b604051610177919061229d565b60405180910390f35b34801561018c57600080fd5b50610195610f3c565b6040516101a291906121a3565b60405180910390f35b3480156101b757600080fd5b506101d260048036038101906101cd9190611bfd565b610f60565b6040516101df919061229d565b60405180910390f35b60008073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415610250576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600034141561028b576040517fb813f54900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000806102d87f00000000000000000000000000000000000000000000000000000000000000007f0000000000000000000000000000000000000000000000000000000000000000611602565b9150915060007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166371a258128484600060016040518563ffffffff1660e01b815260040161033f94939291906120ac565b60006040518083038186803b15801561035757600080fd5b505afa15801561036b573d6000803e3d6000fd5b505050506040513d6000823e3d601f19601f820116820180604052508101906103949190611cb7565b905060006040518060c00160405280600073ffffffffffffffffffffffffffffffffffffffff168152602001348152602001878152602001836000815181106103e0576103df6124b5565b5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1681526020018873ffffffffffffffffffffffffffffffffffffffff16815260200160001515815250905060007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663c07f5c3234846040518363ffffffff1660e01b81526004016104849190612282565b6020604051808303818588803b15801561049d57600080fd5b505af11580156104b1573d6000803e3d6000fd5b50505050506040513d601f19601f820116820180604052508101906104d69190611d2d565b90507f87890b0a30955b1db16cc894fbe24779ae05d9f337bfe8b6dfc0809b5bf9da1134826040516105099291906122b8565b60405180910390a1809550505050505092915050565b7f000000000000000000000000000000000000000000000000000000000000000081565b60008073ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff1614806105ab5750600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16145b156105e2576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600082141561061d576040517fb813f54900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61064a3330848673ffffffffffffffffffffffffffffffffffffffff16611652909392919063ffffffff16565b6106957f0000000000000000000000000000000000000000000000000000000000000000838573ffffffffffffffffffffffffffffffffffffffff166116db9092919063ffffffff16565b6000806106c2857f0000000000000000000000000000000000000000000000000000000000000000611602565b9150915060007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166371a258128484600060016040518563ffffffff1660e01b815260040161072994939291906120ac565b60006040518083038186803b15801561074157600080fd5b505afa158015610755573d6000803e3d6000fd5b505050506040513d6000823e3d601f19601f8201168201806040525081019061077e9190611cb7565b90506107ca7f00000000000000000000000000000000000000000000000000000000000000007f0000000000000000000000000000000000000000000000000000000000000000611602565b809350819450505060007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166371a258128585600060016040518563ffffffff1660e01b815260040161083594939291906120ac565b60006040518083038186803b15801561084d57600080fd5b505afa158015610861573d6000803e3d6000fd5b505050506040513d6000823e3d601f19601f8201168201806040525081019061088a9190611cb7565b90506000600267ffffffffffffffff8111156108a9576108a86124e4565b5b6040519080825280602002602001820160405280156108d75781602001602082028036833780820191505090505b509050826000815181106108ee576108ed6124b5565b5b60200260200101518160008151811061090a576109096124b5565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff168152505081600081518110610958576109576124b5565b5b602002602001015181600181518110610974576109736124b5565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff168152505060006040518060c001604052808a73ffffffffffffffffffffffffffffffffffffffff1681526020018981526020018b81526020018381526020018c73ffffffffffffffffffffffffffffffffffffffff16815260200160001515815250905060007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663363a9dba836040518263ffffffff1660e01b8152600401610a699190612260565b602060405180830381600087803b158015610a8357600080fd5b505af1158015610a97573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610abb9190611d2d565b90507f017190d3d99ee6d8dd0604ef1e71ff9802810c6485f57c9b2ed6169848dd119f8a8a83604051610af093929190612151565b60405180910390a180975050505050505050949350505050565b7f000000000000000000000000000000000000000000000000000000000000000081565b60008073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff161415610b96576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000821415610bd1576040517fb813f54900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610c1e3330847f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16611652909392919063ffffffff16565b610c897f0000000000000000000000000000000000000000000000000000000000000000837f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166116db9092919063ffffffff16565b600080610cd67f00000000000000000000000000000000000000000000000000000000000000007f0000000000000000000000000000000000000000000000000000000000000000611602565b9150915060007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166371a258128484600060016040518563ffffffff1660e01b8152600401610d3d94939291906120ac565b60006040518083038186803b158015610d5557600080fd5b505afa158015610d69573d6000803e3d6000fd5b505050506040513d6000823e3d601f19601f82011682018060405250810190610d929190611cb7565b905060006040518060c001604052807f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16815260200187815260200188815260200183600081518110610dfd57610dfc6124b5565b5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1681526020018973ffffffffffffffffffffffffffffffffffffffff16815260200160011515815250905060007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663c07f5c32836040518263ffffffff1660e01b8152600401610ea09190612282565b602060405180830381600087803b158015610eba57600080fd5b505af1158015610ece573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ef29190611d2d565b90507f74e171117e91660f493740924d8bad0caf48dc4fbccb767fb05935397a2c17ae8782604051610f259291906122b8565b60405180910390a180955050505050509392505050565b7f000000000000000000000000000000000000000000000000000000000000000081565b60008060009054906101000a900460ff1615610fa8576040517f29f745a700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60016000806101000a81548160ff021916908315150217905550600073ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff1614806110295750600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16145b15611060576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600082141561109b576040517fb813f54900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6110e83330847f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16611652909392919063ffffffff16565b6111537f0000000000000000000000000000000000000000000000000000000000000000837f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166116db9092919063ffffffff16565b6000806111a07f00000000000000000000000000000000000000000000000000000000000000007f0000000000000000000000000000000000000000000000000000000000000000611602565b9150915060007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166371a258128484600060016040518563ffffffff1660e01b815260040161120794939291906120ac565b60006040518083038186803b15801561121f57600080fd5b505afa158015611233573d6000803e3d6000fd5b505050506040513d6000823e3d601f19601f8201168201806040525081019061125c9190611cb7565b90506112887f000000000000000000000000000000000000000000000000000000000000000087611602565b809350819450505060007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166371a258128585600060016040518563ffffffff1660e01b81526004016112f394939291906120ac565b60006040518083038186803b15801561130b57600080fd5b505afa15801561131f573d6000803e3d6000fd5b505050506040513d6000823e3d601f19601f820116820180604052508101906113489190611cb7565b90506000600267ffffffffffffffff811115611367576113666124e4565b5b6040519080825280602002602001820160405280156113955781602001602082028036833780820191505090505b509050826000815181106113ac576113ab6124b5565b5b6020026020010151816000815181106113c8576113c76124b5565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff168152505081600081518110611416576114156124b5565b5b602002602001015181600181518110611432576114316124b5565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff168152505060006040518060c001604052807f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1681526020018981526020018b81526020018381526020018c73ffffffffffffffffffffffffffffffffffffffff16815260200160001515815250905060007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663363a9dba836040518263ffffffff1660e01b81526004016115479190612260565b602060405180830381600087803b15801561156157600080fd5b505af1158015611575573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115999190611d2d565b90507f0a7cb8f6e1d29e616c1209a3f418c17b3a9137005377f6dd072217b1ede2573b8a8a836040516115ce93929190612151565b60405180910390a18097505050505050505060008060006101000a81548160ff021916908315150217905550949350505050565b6000808273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1610156116445783839150915061164b565b8284915091505b9250929050565b6116d5846323b872dd60e01b858585604051602401611673939291906120f1565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050611839565b50505050565b6000811480611774575060008373ffffffffffffffffffffffffffffffffffffffff1663dd62ed3e30856040518363ffffffff1660e01b8152600401611722929190612083565b60206040518083038186803b15801561173a57600080fd5b505afa15801561174e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906117729190611d2d565b145b6117b3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016117aa90612240565b60405180910390fd5b6118348363095ea7b360e01b84846040516024016117d2929190612128565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050611839565b505050565b600061189b826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c65648152508573ffffffffffffffffffffffffffffffffffffffff166119009092919063ffffffff16565b90506000815111156118fb57808060200190518101906118bb9190611d00565b6118fa576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016118f190612220565b60405180910390fd5b5b505050565b606061190f8484600085611918565b90509392505050565b60608247101561195d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611954906121e0565b60405180910390fd5b61196685611a2c565b6119a5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161199c90612200565b60405180910390fd5b6000808673ffffffffffffffffffffffffffffffffffffffff1685876040516119ce9190612051565b60006040518083038185875af1925050503d8060008114611a0b576040519150601f19603f3d011682016040523d82523d6000602084013e611a10565b606091505b5091509150611a20828286611a4f565b92505050949350505050565b6000808273ffffffffffffffffffffffffffffffffffffffff163b119050919050565b60608315611a5f57829050611aaf565b600083511115611a725782518084602001fd5b816040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611aa691906121be565b60405180910390fd5b9392505050565b6000611ac9611ac484612306565b6122e1565b90508083825260208201905082856020860282011115611aec57611aeb612518565b5b60005b85811015611b1c5781611b028882611b3b565b845260208401935060208301925050600181019050611aef565b5050509392505050565b600081359050611b358161264e565b92915050565b600081519050611b4a8161264e565b92915050565b600082601f830112611b6557611b64612513565b5b8151611b75848260208601611ab6565b91505092915050565b600081519050611b8d81612665565b92915050565b600081359050611ba28161267c565b92915050565b600081519050611bb78161267c565b92915050565b60008060408385031215611bd457611bd3612522565b5b6000611be285828601611b26565b9250506020611bf385828601611b93565b9150509250929050565b60008060008060808587031215611c1757611c16612522565b5b6000611c2587828801611b26565b9450506020611c3687828801611b93565b9350506040611c4787828801611b26565b9250506060611c5887828801611b93565b91505092959194509250565b600080600060608486031215611c7d57611c7c612522565b5b6000611c8b86828701611b26565b9350506020611c9c86828701611b93565b9250506040611cad86828701611b93565b9150509250925092565b600060208284031215611ccd57611ccc612522565b5b600082015167ffffffffffffffff811115611ceb57611cea61251d565b5b611cf784828501611b50565b91505092915050565b600060208284031215611d1657611d15612522565b5b6000611d2484828501611b7e565b91505092915050565b600060208284031215611d4357611d42612522565b5b6000611d5184828501611ba8565b91505092915050565b6000611d668383611d72565b60208301905092915050565b611d7b8161239d565b82525050565b611d8a8161239d565b82525050565b6000611d9b82612342565b611da58185612370565b9350611db083612332565b8060005b83811015611de1578151611dc88882611d5a565b9750611dd383612363565b925050600181019050611db4565b5085935050505092915050565b611df7816123af565b82525050565b6000611e088261234d565b611e128185612381565b9350611e22818560208601612451565b80840191505092915050565b611e37816123e5565b82525050565b611e46816123f7565b82525050565b611e5581612409565b82525050565b611e648161241b565b82525050565b6000611e7582612358565b611e7f818561238c565b9350611e8f818560208601612451565b611e9881612527565b840191505092915050565b6000611eb060268361238c565b9150611ebb82612538565b604082019050919050565b6000611ed3601d8361238c565b9150611ede82612587565b602082019050919050565b6000611ef6602a8361238c565b9150611f01826125b0565b604082019050919050565b6000611f1960368361238c565b9150611f24826125ff565b604082019050919050565b600060c083016000830151611f476000860182611d72565b506020830151611f5a6020860182612033565b506040830151611f6d6040860182612033565b5060608301518482036060860152611f858282611d90565b9150506080830151611f9a6080860182611d72565b5060a0830151611fad60a0860182611dee565b508091505092915050565b60c082016000820151611fce6000850182611d72565b506020820151611fe16020850182612033565b506040820151611ff46040850182612033565b5060608201516120076060850182611d72565b50608082015161201a6080850182611d72565b5060a082015161202d60a0850182611dee565b50505050565b61203c816123db565b82525050565b61204b816123db565b82525050565b600061205d8284611dfd565b915081905092915050565b600060208201905061207d6000830184611d81565b92915050565b60006040820190506120986000830185611d81565b6120a56020830184611d81565b9392505050565b60006080820190506120c16000830187611d81565b6120ce6020830186611d81565b6120db6040830185611e4c565b6120e86060830184611e5b565b95945050505050565b60006060820190506121066000830186611d81565b6121136020830185611d81565b6121206040830184612042565b949350505050565b600060408201905061213d6000830185611d81565b61214a6020830184612042565b9392505050565b60006060820190506121666000830186611d81565b6121736020830185612042565b6121806040830184612042565b949350505050565b600060208201905061219d6000830184611e2e565b92915050565b60006020820190506121b86000830184611e3d565b92915050565b600060208201905081810360008301526121d88184611e6a565b905092915050565b600060208201905081810360008301526121f981611ea3565b9050919050565b6000602082019050818103600083015261221981611ec6565b9050919050565b6000602082019050818103600083015261223981611ee9565b9050919050565b6000602082019050818103600083015261225981611f0c565b9050919050565b6000602082019050818103600083015261227a8184611f2f565b905092915050565b600060c0820190506122976000830184611fb8565b92915050565b60006020820190506122b26000830184612042565b92915050565b60006040820190506122cd6000830185612042565b6122da6020830184612042565b9392505050565b60006122eb6122fc565b90506122f78282612484565b919050565b6000604051905090565b600067ffffffffffffffff821115612321576123206124e4565b5b602082029050602081019050919050565b6000819050602082019050919050565b600081519050919050565b600081519050919050565b600081519050919050565b6000602082019050919050565b600082825260208201905092915050565b600081905092915050565b600082825260208201905092915050565b60006123a8826123bb565b9050919050565b60008115159050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b60006123f08261242d565b9050919050565b60006124028261242d565b9050919050565b6000612414826123db565b9050919050565b6000612426826123db565b9050919050565b60006124388261243f565b9050919050565b600061244a826123bb565b9050919050565b60005b8381101561246f578082015181840152602081019050612454565b8381111561247e576000848401525b50505050565b61248d82612527565b810181811067ffffffffffffffff821117156124ac576124ab6124e4565b5b80604052505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600080fd5b600080fd5b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f416464726573733a20696e73756666696369656e742062616c616e636520666f60008201527f722063616c6c0000000000000000000000000000000000000000000000000000602082015250565b7f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000600082015250565b7f5361666545524332303a204552433230206f7065726174696f6e20646964206e60008201527f6f74207375636365656400000000000000000000000000000000000000000000602082015250565b7f5361666545524332303a20617070726f76652066726f6d206e6f6e2d7a65726f60008201527f20746f206e6f6e2d7a65726f20616c6c6f77616e636500000000000000000000602082015250565b6126578161239d565b811461266257600080fd5b50565b61266e816123af565b811461267957600080fd5b50565b612685816123db565b811461269057600080fd5b5056fea2646970667358221220a553569c9610a34e29e7a80e1bded855d026e48ea087596037ab14ad290b88b164736f6c63430008070033"; + +type ZetaTokenConsumerTridentConstructorParams = + | [signer?: Signer] + | ConstructorParameters; + +const isSuperArgs = ( + xs: ZetaTokenConsumerTridentConstructorParams +): xs is ConstructorParameters => xs.length > 1; + +export class ZetaTokenConsumerTrident__factory extends ContractFactory { + constructor(...args: ZetaTokenConsumerTridentConstructorParams) { + if (isSuperArgs(args)) { + super(...args); + } else { + super(_abi, _bytecode, args[0]); + } + } + + override deploy( + zetaToken_: string, + uniswapV3Router_: string, + WETH9Address_: string, + poolFactory_: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise { + return super.deploy( + zetaToken_, + uniswapV3Router_, + WETH9Address_, + poolFactory_, + overrides || {} + ) as Promise; + } + override getDeployTransaction( + zetaToken_: string, + uniswapV3Router_: string, + WETH9Address_: string, + poolFactory_: string, + overrides?: Overrides & { from?: string | Promise } + ): TransactionRequest { + return super.getDeployTransaction( + zetaToken_, + uniswapV3Router_, + WETH9Address_, + poolFactory_, + overrides || {} + ); + } + override attach(address: string): ZetaTokenConsumerTrident { + return super.attach(address) as ZetaTokenConsumerTrident; + } + override connect(signer: Signer): ZetaTokenConsumerTrident__factory { + return super.connect(signer) as ZetaTokenConsumerTrident__factory; + } + + static readonly bytecode = _bytecode; + static readonly abi = _abi; + static createInterface(): ZetaTokenConsumerTridentInterface { + return new utils.Interface(_abi) as ZetaTokenConsumerTridentInterface; + } + static connect( + address: string, + signerOrProvider: Signer | Provider + ): ZetaTokenConsumerTrident { + return new Contract( + address, + _abi, + signerOrProvider + ) as ZetaTokenConsumerTrident; + } +} diff --git a/packages/interfaces/typechain-types/factories/contracts/ZetaTokenConsumerTrident.strategy.sol/index.ts b/packages/interfaces/typechain-types/factories/contracts/ZetaTokenConsumerTrident.strategy.sol/index.ts new file mode 100644 index 00000000..aed02e47 --- /dev/null +++ b/packages/interfaces/typechain-types/factories/contracts/ZetaTokenConsumerTrident.strategy.sol/index.ts @@ -0,0 +1,6 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +export { WETH9__factory } from "./WETH9__factory"; +export { ZetaTokenConsumerTrident__factory } from "./ZetaTokenConsumerTrident__factory"; +export { ZetaTokenConsumerTridentErrors__factory } from "./ZetaTokenConsumerTridentErrors__factory"; diff --git a/packages/interfaces/typechain-types/factories/contracts/ZetaTokenConsumerUniV2.strategy.sol/ZetaTokenConsumerUniV2Errors__factory.ts b/packages/interfaces/typechain-types/factories/contracts/ZetaTokenConsumerUniV2.strategy.sol/ZetaTokenConsumerUniV2Errors__factory.ts index eea9a796..ce7dfe2e 100644 --- a/packages/interfaces/typechain-types/factories/contracts/ZetaTokenConsumerUniV2.strategy.sol/ZetaTokenConsumerUniV2Errors__factory.ts +++ b/packages/interfaces/typechain-types/factories/contracts/ZetaTokenConsumerUniV2.strategy.sol/ZetaTokenConsumerUniV2Errors__factory.ts @@ -15,11 +15,6 @@ const _abi = [ name: "InputCantBeZero", type: "error", }, - { - inputs: [], - name: "InvalidAddress", - type: "error", - }, ]; export class ZetaTokenConsumerUniV2Errors__factory { diff --git a/packages/interfaces/typechain-types/factories/contracts/ZetaTokenConsumerUniV2.strategy.sol/ZetaTokenConsumerUniV2__factory.ts b/packages/interfaces/typechain-types/factories/contracts/ZetaTokenConsumerUniV2.strategy.sol/ZetaTokenConsumerUniV2__factory.ts index ef82d476..d48587b7 100644 --- a/packages/interfaces/typechain-types/factories/contracts/ZetaTokenConsumerUniV2.strategy.sol/ZetaTokenConsumerUniV2__factory.ts +++ b/packages/interfaces/typechain-types/factories/contracts/ZetaTokenConsumerUniV2.strategy.sol/ZetaTokenConsumerUniV2__factory.ts @@ -260,7 +260,7 @@ const _abi = [ ]; const _bytecode = - "0x60e06040523480156200001157600080fd5b50604051620026aa380380620026aa83398181016040528101906200003791906200024e565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614806200009f5750600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16145b15620000d7576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8173ffffffffffffffffffffffffffffffffffffffff1660a08173ffffffffffffffffffffffffffffffffffffffff1660601b815250508073ffffffffffffffffffffffffffffffffffffffff1660c08173ffffffffffffffffffffffffffffffffffffffff1660601b815250508073ffffffffffffffffffffffffffffffffffffffff1663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b1580156200018c57600080fd5b505afa158015620001a1573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620001c791906200021c565b73ffffffffffffffffffffffffffffffffffffffff1660808173ffffffffffffffffffffffffffffffffffffffff1660601b815250505050620002e8565b6000815190506200021681620002ce565b92915050565b600060208284031215620002355762000234620002c9565b5b6000620002458482850162000205565b91505092915050565b60008060408385031215620002685762000267620002c9565b5b6000620002788582860162000205565b92505060206200028b8582860162000205565b9150509250929050565b6000620002a282620002a9565b9050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600080fd5b620002d98162000295565b8114620002e557600080fd5b50565b60805160601c60a05160601c60c05160601c6122e8620003c26000396000818161033401528181610598015281816108e101528181610b0f01528181610ca501528181610f0701526112700152600081816102c30152818161046a015281816106f10152818161086f01528181610ac501528181610b3101528181610bc501528181610ebd01528181610f29015281816110110152611140015260008181610254015281816105e2015281816106820152818161080001528181610c3401528181610f710152818161108001526111af01526122e86000f3fe60806040526004361061004a5760003560e01c8063013b2ff81461004f57806321e093b11461007f5780632405620a146100aa57806354c49a2a146100e7578063a53fb10b14610124575b600080fd5b610069600480360381019061006491906118ff565b610161565b6040516100769190611dc9565b60405180910390f35b34801561008b57600080fd5b50610094610468565b6040516100a19190611c4c565b60405180910390f35b3480156100b657600080fd5b506100d160048036038101906100cc919061193f565b61048c565b6040516100de9190611dc9565b60405180910390f35b3480156100f357600080fd5b5061010e600480360381019061010991906119a6565b610a1a565b60405161011b9190611dc9565b60405180910390f35b34801561013057600080fd5b5061014b6004803603810190610146919061193f565b610ddb565b6040516101589190611dc9565b60405180910390f35b60008073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614156101c9576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000341415610204576040517fb813f54900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000600267ffffffffffffffff81111561022157610220612103565b5b60405190808252806020026020018201604052801561024f5781602001602082028036833780820191505090505b5090507f000000000000000000000000000000000000000000000000000000000000000081600081518110610287576102866120d4565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff16815250507f0000000000000000000000000000000000000000000000000000000000000000816001815181106102f6576102f56120d4565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff168152505060007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16637ff36ab53486858960c84261037f9190611f6f565b6040518663ffffffff1660e01b815260040161039e9493929190611de4565b6000604051808303818588803b1580156103b757600080fd5b505af11580156103cb573d6000803e3d6000fd5b50505050506040513d6000823e3d601f19601f820116820180604052508101906103f591906119f9565b9050600081600184516104089190611fc5565b81518110610419576104186120d4565b5b602002602001015190507f87890b0a30955b1db16cc894fbe24779ae05d9f337bfe8b6dfc0809b5bf9da113482604051610454929190611e30565b60405180910390a180935050505092915050565b7f000000000000000000000000000000000000000000000000000000000000000081565b60008073ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff1614806104f45750600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16145b1561052b576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000821415610566576040517fb813f54900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6105933330848673ffffffffffffffffffffffffffffffffffffffff166113a9909392919063ffffffff16565b6105de7f0000000000000000000000000000000000000000000000000000000000000000838573ffffffffffffffffffffffffffffffffffffffff166114329092919063ffffffff16565b60607f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff16141561076357600267ffffffffffffffff81111561064f5761064e612103565b5b60405190808252806020026020018201604052801561067d5781602001602082028036833780820191505090505b5090507f0000000000000000000000000000000000000000000000000000000000000000816000815181106106b5576106b46120d4565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff16815250507f000000000000000000000000000000000000000000000000000000000000000081600181518110610724576107236120d4565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff16815250506108dd565b600367ffffffffffffffff81111561077e5761077d612103565b5b6040519080825280602002602001820160405280156107ac5781602001602082028036833780820191505090505b50905083816000815181106107c4576107c36120d4565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff16815250507f000000000000000000000000000000000000000000000000000000000000000081600181518110610833576108326120d4565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff16815250507f0000000000000000000000000000000000000000000000000000000000000000816002815181106108a2576108a16120d4565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff16815250505b60007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166338ed17398588858b60c84261092c9190611f6f565b6040518663ffffffff1660e01b815260040161094c959493929190611e59565b600060405180830381600087803b15801561096657600080fd5b505af115801561097a573d6000803e3d6000fd5b505050506040513d6000823e3d601f19601f820116820180604052508101906109a391906119f9565b9050600081600184516109b69190611fc5565b815181106109c7576109c66120d4565b5b602002602001015190507f017190d3d99ee6d8dd0604ef1e71ff9802810c6485f57c9b2ed6169848dd119f868683604051610a0493929190611cf0565b60405180910390a1809350505050949350505050565b60008073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff161415610a82576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000821415610abd576040517fb813f54900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610b0a3330847f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166113a9909392919063ffffffff16565b610b757f0000000000000000000000000000000000000000000000000000000000000000837f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166114329092919063ffffffff16565b6000600267ffffffffffffffff811115610b9257610b91612103565b5b604051908082528060200260200182016040528015610bc05781602001602082028036833780820191505090505b5090507f000000000000000000000000000000000000000000000000000000000000000081600081518110610bf857610bf76120d4565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff16815250507f000000000000000000000000000000000000000000000000000000000000000081600181518110610c6757610c666120d4565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff168152505060007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166318cbafe58587858a60c842610cf09190611f6f565b6040518663ffffffff1660e01b8152600401610d10959493929190611e59565b600060405180830381600087803b158015610d2a57600080fd5b505af1158015610d3e573d6000803e3d6000fd5b505050506040513d6000823e3d601f19601f82011682018060405250810190610d6791906119f9565b905060008160018451610d7a9190611fc5565b81518110610d8b57610d8a6120d4565b5b602002602001015190507f74e171117e91660f493740924d8bad0caf48dc4fbccb767fb05935397a2c17ae8582604051610dc6929190611e30565b60405180910390a18093505050509392505050565b60008073ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff161480610e435750600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16145b15610e7a576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000821415610eb5576040517fb813f54900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610f023330847f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166113a9909392919063ffffffff16565b610f6d7f0000000000000000000000000000000000000000000000000000000000000000837f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166114329092919063ffffffff16565b60607f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1614156110f257600267ffffffffffffffff811115610fde57610fdd612103565b5b60405190808252806020026020018201604052801561100c5781602001602082028036833780820191505090505b5090507f000000000000000000000000000000000000000000000000000000000000000081600081518110611044576110436120d4565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff16815250507f0000000000000000000000000000000000000000000000000000000000000000816001815181106110b3576110b26120d4565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff168152505061126c565b600367ffffffffffffffff81111561110d5761110c612103565b5b60405190808252806020026020018201604052801561113b5781602001602082028036833780820191505090505b5090507f000000000000000000000000000000000000000000000000000000000000000081600081518110611173576111726120d4565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff16815250507f0000000000000000000000000000000000000000000000000000000000000000816001815181106111e2576111e16120d4565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff16815250508381600281518110611231576112306120d4565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff16815250505b60007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166338ed17398588858b60c8426112bb9190611f6f565b6040518663ffffffff1660e01b81526004016112db959493929190611e59565b600060405180830381600087803b1580156112f557600080fd5b505af1158015611309573d6000803e3d6000fd5b505050506040513d6000823e3d601f19601f8201168201806040525081019061133291906119f9565b9050600081600184516113459190611fc5565b81518110611356576113556120d4565b5b602002602001015190507f0a7cb8f6e1d29e616c1209a3f418c17b3a9137005377f6dd072217b1ede2573b86868360405161139393929190611cf0565b60405180910390a1809350505050949350505050565b61142c846323b872dd60e01b8585856040516024016113ca93929190611c90565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050611590565b50505050565b60008114806114cb575060008373ffffffffffffffffffffffffffffffffffffffff1663dd62ed3e30856040518363ffffffff1660e01b8152600401611479929190611c67565b60206040518083038186803b15801561149157600080fd5b505afa1580156114a5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114c99190611a6f565b145b61150a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161150190611da9565b60405180910390fd5b61158b8363095ea7b360e01b8484604051602401611529929190611cc7565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050611590565b505050565b60006115f2826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c65648152508573ffffffffffffffffffffffffffffffffffffffff166116579092919063ffffffff16565b905060008151111561165257808060200190518101906116129190611a42565b611651576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161164890611d89565b60405180910390fd5b5b505050565b6060611666848460008561166f565b90509392505050565b6060824710156116b4576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016116ab90611d49565b60405180910390fd5b6116bd85611783565b6116fc576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016116f390611d69565b60405180910390fd5b6000808673ffffffffffffffffffffffffffffffffffffffff1685876040516117259190611c35565b60006040518083038185875af1925050503d8060008114611762576040519150601f19603f3d011682016040523d82523d6000602084013e611767565b606091505b50915091506117778282866117a6565b92505050949350505050565b6000808273ffffffffffffffffffffffffffffffffffffffff163b119050919050565b606083156117b657829050611806565b6000835111156117c95782518084602001fd5b816040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016117fd9190611d27565b60405180910390fd5b9392505050565b600061182061181b84611ed8565b611eb3565b9050808382526020820190508285602086028201111561184357611842612137565b5b60005b85811015611873578161185988826118ea565b845260208401935060208301925050600181019050611846565b5050509392505050565b60008135905061188c8161226d565b92915050565b600082601f8301126118a7576118a6612132565b5b81516118b784826020860161180d565b91505092915050565b6000815190506118cf81612284565b92915050565b6000813590506118e48161229b565b92915050565b6000815190506118f98161229b565b92915050565b6000806040838503121561191657611915612141565b5b60006119248582860161187d565b9250506020611935858286016118d5565b9150509250929050565b6000806000806080858703121561195957611958612141565b5b60006119678782880161187d565b9450506020611978878288016118d5565b93505060406119898782880161187d565b925050606061199a878288016118d5565b91505092959194509250565b6000806000606084860312156119bf576119be612141565b5b60006119cd8682870161187d565b93505060206119de868287016118d5565b92505060406119ef868287016118d5565b9150509250925092565b600060208284031215611a0f57611a0e612141565b5b600082015167ffffffffffffffff811115611a2d57611a2c61213c565b5b611a3984828501611892565b91505092915050565b600060208284031215611a5857611a57612141565b5b6000611a66848285016118c0565b91505092915050565b600060208284031215611a8557611a84612141565b5b6000611a93848285016118ea565b91505092915050565b6000611aa88383611ab4565b60208301905092915050565b611abd81611ff9565b82525050565b611acc81611ff9565b82525050565b6000611add82611f14565b611ae78185611f42565b9350611af283611f04565b8060005b83811015611b23578151611b0a8882611a9c565b9750611b1583611f35565b925050600181019050611af6565b5085935050505092915050565b6000611b3b82611f1f565b611b458185611f53565b9350611b55818560208601612041565b80840191505092915050565b6000611b6c82611f2a565b611b768185611f5e565b9350611b86818560208601612041565b611b8f81612146565b840191505092915050565b6000611ba7602683611f5e565b9150611bb282612157565b604082019050919050565b6000611bca601d83611f5e565b9150611bd5826121a6565b602082019050919050565b6000611bed602a83611f5e565b9150611bf8826121cf565b604082019050919050565b6000611c10603683611f5e565b9150611c1b8261221e565b604082019050919050565b611c2f81612037565b82525050565b6000611c418284611b30565b915081905092915050565b6000602082019050611c616000830184611ac3565b92915050565b6000604082019050611c7c6000830185611ac3565b611c896020830184611ac3565b9392505050565b6000606082019050611ca56000830186611ac3565b611cb26020830185611ac3565b611cbf6040830184611c26565b949350505050565b6000604082019050611cdc6000830185611ac3565b611ce96020830184611c26565b9392505050565b6000606082019050611d056000830186611ac3565b611d126020830185611c26565b611d1f6040830184611c26565b949350505050565b60006020820190508181036000830152611d418184611b61565b905092915050565b60006020820190508181036000830152611d6281611b9a565b9050919050565b60006020820190508181036000830152611d8281611bbd565b9050919050565b60006020820190508181036000830152611da281611be0565b9050919050565b60006020820190508181036000830152611dc281611c03565b9050919050565b6000602082019050611dde6000830184611c26565b92915050565b6000608082019050611df96000830187611c26565b8181036020830152611e0b8186611ad2565b9050611e1a6040830185611ac3565b611e276060830184611c26565b95945050505050565b6000604082019050611e456000830185611c26565b611e526020830184611c26565b9392505050565b600060a082019050611e6e6000830188611c26565b611e7b6020830187611c26565b8181036040830152611e8d8186611ad2565b9050611e9c6060830185611ac3565b611ea96080830184611c26565b9695505050505050565b6000611ebd611ece565b9050611ec98282612074565b919050565b6000604051905090565b600067ffffffffffffffff821115611ef357611ef2612103565b5b602082029050602081019050919050565b6000819050602082019050919050565b600081519050919050565b600081519050919050565b600081519050919050565b6000602082019050919050565b600082825260208201905092915050565b600081905092915050565b600082825260208201905092915050565b6000611f7a82612037565b9150611f8583612037565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff03821115611fba57611fb96120a5565b5b828201905092915050565b6000611fd082612037565b9150611fdb83612037565b925082821015611fee57611fed6120a5565b5b828203905092915050565b600061200482612017565b9050919050565b60008115159050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b60005b8381101561205f578082015181840152602081019050612044565b8381111561206e576000848401525b50505050565b61207d82612146565b810181811067ffffffffffffffff8211171561209c5761209b612103565b5b80604052505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600080fd5b600080fd5b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f416464726573733a20696e73756666696369656e742062616c616e636520666f60008201527f722063616c6c0000000000000000000000000000000000000000000000000000602082015250565b7f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000600082015250565b7f5361666545524332303a204552433230206f7065726174696f6e20646964206e60008201527f6f74207375636365656400000000000000000000000000000000000000000000602082015250565b7f5361666545524332303a20617070726f76652066726f6d206e6f6e2d7a65726f60008201527f20746f206e6f6e2d7a65726f20616c6c6f77616e636500000000000000000000602082015250565b61227681611ff9565b811461228157600080fd5b50565b61228d8161200b565b811461229857600080fd5b50565b6122a481612037565b81146122af57600080fd5b5056fea26469706673582212209d0e3cafa4547673e4834e1381def595dd0be20bbbac9eb70f3c9b961a8cdbca64736f6c63430008070033"; + "0x60e06040523480156200001157600080fd5b50604051620026aa380380620026aa83398181016040528101906200003791906200024e565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614806200009f5750600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16145b15620000d7576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8173ffffffffffffffffffffffffffffffffffffffff1660a08173ffffffffffffffffffffffffffffffffffffffff1660601b815250508073ffffffffffffffffffffffffffffffffffffffff1660c08173ffffffffffffffffffffffffffffffffffffffff1660601b815250508073ffffffffffffffffffffffffffffffffffffffff1663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b1580156200018c57600080fd5b505afa158015620001a1573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620001c791906200021c565b73ffffffffffffffffffffffffffffffffffffffff1660808173ffffffffffffffffffffffffffffffffffffffff1660601b815250505050620002e8565b6000815190506200021681620002ce565b92915050565b600060208284031215620002355762000234620002c9565b5b6000620002458482850162000205565b91505092915050565b60008060408385031215620002685762000267620002c9565b5b6000620002788582860162000205565b92505060206200028b8582860162000205565b9150509250929050565b6000620002a282620002a9565b9050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600080fd5b620002d98162000295565b8114620002e557600080fd5b50565b60805160601c60a05160601c60c05160601c6122e8620003c26000396000818161033401528181610598015281816108e101528181610b0f01528181610ca501528181610f0701526112700152600081816102c30152818161046a015281816106f10152818161086f01528181610ac501528181610b3101528181610bc501528181610ebd01528181610f29015281816110110152611140015260008181610254015281816105e2015281816106820152818161080001528181610c3401528181610f710152818161108001526111af01526122e86000f3fe60806040526004361061004a5760003560e01c8063013b2ff81461004f57806321e093b11461007f5780632405620a146100aa57806354c49a2a146100e7578063a53fb10b14610124575b600080fd5b610069600480360381019061006491906118ff565b610161565b6040516100769190611dc9565b60405180910390f35b34801561008b57600080fd5b50610094610468565b6040516100a19190611c4c565b60405180910390f35b3480156100b657600080fd5b506100d160048036038101906100cc919061193f565b61048c565b6040516100de9190611dc9565b60405180910390f35b3480156100f357600080fd5b5061010e600480360381019061010991906119a6565b610a1a565b60405161011b9190611dc9565b60405180910390f35b34801561013057600080fd5b5061014b6004803603810190610146919061193f565b610ddb565b6040516101589190611dc9565b60405180910390f35b60008073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614156101c9576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000341415610204576040517fb813f54900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000600267ffffffffffffffff81111561022157610220612103565b5b60405190808252806020026020018201604052801561024f5781602001602082028036833780820191505090505b5090507f000000000000000000000000000000000000000000000000000000000000000081600081518110610287576102866120d4565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff16815250507f0000000000000000000000000000000000000000000000000000000000000000816001815181106102f6576102f56120d4565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff168152505060007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16637ff36ab53486858960c84261037f9190611f6f565b6040518663ffffffff1660e01b815260040161039e9493929190611de4565b6000604051808303818588803b1580156103b757600080fd5b505af11580156103cb573d6000803e3d6000fd5b50505050506040513d6000823e3d601f19601f820116820180604052508101906103f591906119f9565b9050600081600184516104089190611fc5565b81518110610419576104186120d4565b5b602002602001015190507f87890b0a30955b1db16cc894fbe24779ae05d9f337bfe8b6dfc0809b5bf9da113482604051610454929190611e30565b60405180910390a180935050505092915050565b7f000000000000000000000000000000000000000000000000000000000000000081565b60008073ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff1614806104f45750600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16145b1561052b576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000821415610566576040517fb813f54900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6105933330848673ffffffffffffffffffffffffffffffffffffffff166113a9909392919063ffffffff16565b6105de7f0000000000000000000000000000000000000000000000000000000000000000838573ffffffffffffffffffffffffffffffffffffffff166114329092919063ffffffff16565b60607f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff16141561076357600267ffffffffffffffff81111561064f5761064e612103565b5b60405190808252806020026020018201604052801561067d5781602001602082028036833780820191505090505b5090507f0000000000000000000000000000000000000000000000000000000000000000816000815181106106b5576106b46120d4565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff16815250507f000000000000000000000000000000000000000000000000000000000000000081600181518110610724576107236120d4565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff16815250506108dd565b600367ffffffffffffffff81111561077e5761077d612103565b5b6040519080825280602002602001820160405280156107ac5781602001602082028036833780820191505090505b50905083816000815181106107c4576107c36120d4565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff16815250507f000000000000000000000000000000000000000000000000000000000000000081600181518110610833576108326120d4565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff16815250507f0000000000000000000000000000000000000000000000000000000000000000816002815181106108a2576108a16120d4565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff16815250505b60007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166338ed17398588858b60c84261092c9190611f6f565b6040518663ffffffff1660e01b815260040161094c959493929190611e59565b600060405180830381600087803b15801561096657600080fd5b505af115801561097a573d6000803e3d6000fd5b505050506040513d6000823e3d601f19601f820116820180604052508101906109a391906119f9565b9050600081600184516109b69190611fc5565b815181106109c7576109c66120d4565b5b602002602001015190507f017190d3d99ee6d8dd0604ef1e71ff9802810c6485f57c9b2ed6169848dd119f868683604051610a0493929190611cf0565b60405180910390a1809350505050949350505050565b60008073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff161415610a82576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000821415610abd576040517fb813f54900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610b0a3330847f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166113a9909392919063ffffffff16565b610b757f0000000000000000000000000000000000000000000000000000000000000000837f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166114329092919063ffffffff16565b6000600267ffffffffffffffff811115610b9257610b91612103565b5b604051908082528060200260200182016040528015610bc05781602001602082028036833780820191505090505b5090507f000000000000000000000000000000000000000000000000000000000000000081600081518110610bf857610bf76120d4565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff16815250507f000000000000000000000000000000000000000000000000000000000000000081600181518110610c6757610c666120d4565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff168152505060007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166318cbafe58587858a60c842610cf09190611f6f565b6040518663ffffffff1660e01b8152600401610d10959493929190611e59565b600060405180830381600087803b158015610d2a57600080fd5b505af1158015610d3e573d6000803e3d6000fd5b505050506040513d6000823e3d601f19601f82011682018060405250810190610d6791906119f9565b905060008160018451610d7a9190611fc5565b81518110610d8b57610d8a6120d4565b5b602002602001015190507f74e171117e91660f493740924d8bad0caf48dc4fbccb767fb05935397a2c17ae8582604051610dc6929190611e30565b60405180910390a18093505050509392505050565b60008073ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff161480610e435750600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16145b15610e7a576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000821415610eb5576040517fb813f54900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610f023330847f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166113a9909392919063ffffffff16565b610f6d7f0000000000000000000000000000000000000000000000000000000000000000837f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166114329092919063ffffffff16565b60607f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1614156110f257600267ffffffffffffffff811115610fde57610fdd612103565b5b60405190808252806020026020018201604052801561100c5781602001602082028036833780820191505090505b5090507f000000000000000000000000000000000000000000000000000000000000000081600081518110611044576110436120d4565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff16815250507f0000000000000000000000000000000000000000000000000000000000000000816001815181106110b3576110b26120d4565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff168152505061126c565b600367ffffffffffffffff81111561110d5761110c612103565b5b60405190808252806020026020018201604052801561113b5781602001602082028036833780820191505090505b5090507f000000000000000000000000000000000000000000000000000000000000000081600081518110611173576111726120d4565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff16815250507f0000000000000000000000000000000000000000000000000000000000000000816001815181106111e2576111e16120d4565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff16815250508381600281518110611231576112306120d4565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff16815250505b60007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166338ed17398588858b60c8426112bb9190611f6f565b6040518663ffffffff1660e01b81526004016112db959493929190611e59565b600060405180830381600087803b1580156112f557600080fd5b505af1158015611309573d6000803e3d6000fd5b505050506040513d6000823e3d601f19601f8201168201806040525081019061133291906119f9565b9050600081600184516113459190611fc5565b81518110611356576113556120d4565b5b602002602001015190507f0a7cb8f6e1d29e616c1209a3f418c17b3a9137005377f6dd072217b1ede2573b86868360405161139393929190611cf0565b60405180910390a1809350505050949350505050565b61142c846323b872dd60e01b8585856040516024016113ca93929190611c90565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050611590565b50505050565b60008114806114cb575060008373ffffffffffffffffffffffffffffffffffffffff1663dd62ed3e30856040518363ffffffff1660e01b8152600401611479929190611c67565b60206040518083038186803b15801561149157600080fd5b505afa1580156114a5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114c99190611a6f565b145b61150a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161150190611da9565b60405180910390fd5b61158b8363095ea7b360e01b8484604051602401611529929190611cc7565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050611590565b505050565b60006115f2826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c65648152508573ffffffffffffffffffffffffffffffffffffffff166116579092919063ffffffff16565b905060008151111561165257808060200190518101906116129190611a42565b611651576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161164890611d89565b60405180910390fd5b5b505050565b6060611666848460008561166f565b90509392505050565b6060824710156116b4576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016116ab90611d49565b60405180910390fd5b6116bd85611783565b6116fc576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016116f390611d69565b60405180910390fd5b6000808673ffffffffffffffffffffffffffffffffffffffff1685876040516117259190611c35565b60006040518083038185875af1925050503d8060008114611762576040519150601f19603f3d011682016040523d82523d6000602084013e611767565b606091505b50915091506117778282866117a6565b92505050949350505050565b6000808273ffffffffffffffffffffffffffffffffffffffff163b119050919050565b606083156117b657829050611806565b6000835111156117c95782518084602001fd5b816040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016117fd9190611d27565b60405180910390fd5b9392505050565b600061182061181b84611ed8565b611eb3565b9050808382526020820190508285602086028201111561184357611842612137565b5b60005b85811015611873578161185988826118ea565b845260208401935060208301925050600181019050611846565b5050509392505050565b60008135905061188c8161226d565b92915050565b600082601f8301126118a7576118a6612132565b5b81516118b784826020860161180d565b91505092915050565b6000815190506118cf81612284565b92915050565b6000813590506118e48161229b565b92915050565b6000815190506118f98161229b565b92915050565b6000806040838503121561191657611915612141565b5b60006119248582860161187d565b9250506020611935858286016118d5565b9150509250929050565b6000806000806080858703121561195957611958612141565b5b60006119678782880161187d565b9450506020611978878288016118d5565b93505060406119898782880161187d565b925050606061199a878288016118d5565b91505092959194509250565b6000806000606084860312156119bf576119be612141565b5b60006119cd8682870161187d565b93505060206119de868287016118d5565b92505060406119ef868287016118d5565b9150509250925092565b600060208284031215611a0f57611a0e612141565b5b600082015167ffffffffffffffff811115611a2d57611a2c61213c565b5b611a3984828501611892565b91505092915050565b600060208284031215611a5857611a57612141565b5b6000611a66848285016118c0565b91505092915050565b600060208284031215611a8557611a84612141565b5b6000611a93848285016118ea565b91505092915050565b6000611aa88383611ab4565b60208301905092915050565b611abd81611ff9565b82525050565b611acc81611ff9565b82525050565b6000611add82611f14565b611ae78185611f42565b9350611af283611f04565b8060005b83811015611b23578151611b0a8882611a9c565b9750611b1583611f35565b925050600181019050611af6565b5085935050505092915050565b6000611b3b82611f1f565b611b458185611f53565b9350611b55818560208601612041565b80840191505092915050565b6000611b6c82611f2a565b611b768185611f5e565b9350611b86818560208601612041565b611b8f81612146565b840191505092915050565b6000611ba7602683611f5e565b9150611bb282612157565b604082019050919050565b6000611bca601d83611f5e565b9150611bd5826121a6565b602082019050919050565b6000611bed602a83611f5e565b9150611bf8826121cf565b604082019050919050565b6000611c10603683611f5e565b9150611c1b8261221e565b604082019050919050565b611c2f81612037565b82525050565b6000611c418284611b30565b915081905092915050565b6000602082019050611c616000830184611ac3565b92915050565b6000604082019050611c7c6000830185611ac3565b611c896020830184611ac3565b9392505050565b6000606082019050611ca56000830186611ac3565b611cb26020830185611ac3565b611cbf6040830184611c26565b949350505050565b6000604082019050611cdc6000830185611ac3565b611ce96020830184611c26565b9392505050565b6000606082019050611d056000830186611ac3565b611d126020830185611c26565b611d1f6040830184611c26565b949350505050565b60006020820190508181036000830152611d418184611b61565b905092915050565b60006020820190508181036000830152611d6281611b9a565b9050919050565b60006020820190508181036000830152611d8281611bbd565b9050919050565b60006020820190508181036000830152611da281611be0565b9050919050565b60006020820190508181036000830152611dc281611c03565b9050919050565b6000602082019050611dde6000830184611c26565b92915050565b6000608082019050611df96000830187611c26565b8181036020830152611e0b8186611ad2565b9050611e1a6040830185611ac3565b611e276060830184611c26565b95945050505050565b6000604082019050611e456000830185611c26565b611e526020830184611c26565b9392505050565b600060a082019050611e6e6000830188611c26565b611e7b6020830187611c26565b8181036040830152611e8d8186611ad2565b9050611e9c6060830185611ac3565b611ea96080830184611c26565b9695505050505050565b6000611ebd611ece565b9050611ec98282612074565b919050565b6000604051905090565b600067ffffffffffffffff821115611ef357611ef2612103565b5b602082029050602081019050919050565b6000819050602082019050919050565b600081519050919050565b600081519050919050565b600081519050919050565b6000602082019050919050565b600082825260208201905092915050565b600081905092915050565b600082825260208201905092915050565b6000611f7a82612037565b9150611f8583612037565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff03821115611fba57611fb96120a5565b5b828201905092915050565b6000611fd082612037565b9150611fdb83612037565b925082821015611fee57611fed6120a5565b5b828203905092915050565b600061200482612017565b9050919050565b60008115159050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b60005b8381101561205f578082015181840152602081019050612044565b8381111561206e576000848401525b50505050565b61207d82612146565b810181811067ffffffffffffffff8211171561209c5761209b612103565b5b80604052505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600080fd5b600080fd5b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f416464726573733a20696e73756666696369656e742062616c616e636520666f60008201527f722063616c6c0000000000000000000000000000000000000000000000000000602082015250565b7f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000600082015250565b7f5361666545524332303a204552433230206f7065726174696f6e20646964206e60008201527f6f74207375636365656400000000000000000000000000000000000000000000602082015250565b7f5361666545524332303a20617070726f76652066726f6d206e6f6e2d7a65726f60008201527f20746f206e6f6e2d7a65726f20616c6c6f77616e636500000000000000000000602082015250565b61227681611ff9565b811461228157600080fd5b50565b61228d8161200b565b811461229857600080fd5b50565b6122a481612037565b81146122af57600080fd5b5056fea2646970667358221220d6f74d0903b8170eb0faadde1b2a7b45fd6545417f220764d9b6a6645cfe1a1964736f6c63430008070033"; type ZetaTokenConsumerUniV2ConstructorParams = | [signer?: Signer] diff --git a/packages/interfaces/typechain-types/factories/contracts/ZetaTokenConsumerUniV3.strategy.sol/ZetaTokenConsumerUniV3Errors__factory.ts b/packages/interfaces/typechain-types/factories/contracts/ZetaTokenConsumerUniV3.strategy.sol/ZetaTokenConsumerUniV3Errors__factory.ts index f1e9450a..04046aad 100644 --- a/packages/interfaces/typechain-types/factories/contracts/ZetaTokenConsumerUniV3.strategy.sol/ZetaTokenConsumerUniV3Errors__factory.ts +++ b/packages/interfaces/typechain-types/factories/contracts/ZetaTokenConsumerUniV3.strategy.sol/ZetaTokenConsumerUniV3Errors__factory.ts @@ -20,11 +20,6 @@ const _abi = [ name: "InputCantBeZero", type: "error", }, - { - inputs: [], - name: "InvalidAddress", - type: "error", - }, { inputs: [], name: "ReentrancyError", diff --git a/packages/interfaces/typechain-types/factories/contracts/ZetaTokenConsumerUniV3.strategy.sol/ZetaTokenConsumerUniV3__factory.ts b/packages/interfaces/typechain-types/factories/contracts/ZetaTokenConsumerUniV3.strategy.sol/ZetaTokenConsumerUniV3__factory.ts index 9bb84583..45b9c450 100644 --- a/packages/interfaces/typechain-types/factories/contracts/ZetaTokenConsumerUniV3.strategy.sol/ZetaTokenConsumerUniV3__factory.ts +++ b/packages/interfaces/typechain-types/factories/contracts/ZetaTokenConsumerUniV3.strategy.sol/ZetaTokenConsumerUniV3__factory.ts @@ -353,7 +353,7 @@ const _abi = [ ]; const _bytecode = - "0x6101406040523480156200001257600080fd5b50604051620025af380380620025af83398181016040528101906200003891906200028a565b600073ffffffffffffffffffffffffffffffffffffffff168673ffffffffffffffffffffffffffffffffffffffff161480620000a05750600073ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff16145b80620000d85750600073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff16145b80620001105750600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16145b1562000148576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8573ffffffffffffffffffffffffffffffffffffffff1660e08173ffffffffffffffffffffffffffffffffffffffff1660601b815250508473ffffffffffffffffffffffffffffffffffffffff166101008173ffffffffffffffffffffffffffffffffffffffff1660601b815250508373ffffffffffffffffffffffffffffffffffffffff166101208173ffffffffffffffffffffffffffffffffffffffff1660601b815250508273ffffffffffffffffffffffffffffffffffffffff1660c08173ffffffffffffffffffffffffffffffffffffffff1660601b815250508162ffffff1660808162ffffff1660e81b815250508062ffffff1660a08162ffffff1660e81b81525050505050505050620003a2565b6000815190506200026d816200036e565b92915050565b600081519050620002848162000388565b92915050565b60008060008060008060c08789031215620002aa57620002a962000369565b5b6000620002ba89828a016200025c565b9650506020620002cd89828a016200025c565b9550506040620002e089828a016200025c565b9450506060620002f389828a016200025c565b93505060806200030689828a0162000273565b92505060a06200031989828a0162000273565b9150509295509295509295565b600062000333826200033a565b9050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600062ffffff82169050919050565b600080fd5b620003798162000326565b81146200038557600080fd5b50565b62000393816200035a565b81146200039f57600080fd5b50565b60805160e81c60a05160e81c60c05160601c60e05160601c6101005160601c6101205160601c6120fc620004b360003960006111400152600081816104030152818161062301528181610761015281816108560152818161099101528181610b0301528181610ed30152611031015260008181610343015281816104f5015281816106dc01528181610947015281816109b301528181610a0701528181610e8901528181610ef50152610f480152600081816103070152818161069a01528181610a4301528181610bb00152610f8a01526000818161067901528181610d240152610fab01526000818161037f015281816106bb0152818161087a01528181610a7f0152610f6901526120fc6000f3fe60806040526004361061008a5760003560e01c80633cbd7005116100595780633cbd70051461015957806354c49a2a146101845780635d9dfdde146101c1578063a53fb10b146101ec578063c6bbd5a71461022957610091565b8063013b2ff81461009657806321e093b1146100c65780632405620a146100f15780632c76d7a61461012e57610091565b3661009157005b600080fd5b6100b060048036038101906100ab919061161a565b610254565b6040516100bd9190611d24565b60405180910390f35b3480156100d257600080fd5b506100db6104f3565b6040516100e89190611b18565b60405180910390f35b3480156100fd57600080fd5b506101186004803603810190610113919061165a565b610517565b6040516101259190611d24565b60405180910390f35b34801561013a57600080fd5b50610143610854565b6040516101509190611c0e565b60405180910390f35b34801561016557600080fd5b5061016e610878565b60405161017b9190611d09565b60405180910390f35b34801561019057600080fd5b506101ab60048036038101906101a691906116c1565b61089c565b6040516101b89190611d24565b60405180910390f35b3480156101cd57600080fd5b506101d6610d22565b6040516101e39190611d09565b60405180910390f35b3480156101f857600080fd5b50610213600480360381019061020e919061165a565b610d46565b6040516102209190611d24565b60405180910390f35b34801561023557600080fd5b5061023e61113e565b60405161024b9190611bf3565b60405180910390f35b60008073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614156102bc576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60003414156102f7576040517fb813f54900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60006040518061010001604052807f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1681526020017f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1681526020017f000000000000000000000000000000000000000000000000000000000000000062ffffff1681526020018573ffffffffffffffffffffffffffffffffffffffff16815260200160c8426103d19190611dab565b8152602001348152602001848152602001600073ffffffffffffffffffffffffffffffffffffffff16815250905060007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663414bf38934846040518363ffffffff1660e01b815260040161045b9190611ced565b6020604051808303818588803b15801561047457600080fd5b505af1158015610488573d6000803e3d6000fd5b50505050506040513d601f19601f820116820180604052508101906104ad9190611741565b90507f87890b0a30955b1db16cc894fbe24779ae05d9f337bfe8b6dfc0809b5bf9da1134826040516104e0929190611d3f565b60405180910390a1809250505092915050565b7f000000000000000000000000000000000000000000000000000000000000000081565b60008073ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff16148061057f5750600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16145b156105b6576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008214156105f1576040517fb813f54900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61061e3330848673ffffffffffffffffffffffffffffffffffffffff16611162909392919063ffffffff16565b6106697f0000000000000000000000000000000000000000000000000000000000000000838573ffffffffffffffffffffffffffffffffffffffff166111eb9092919063ffffffff16565b60006040518060a00160405280857f00000000000000000000000000000000000000000000000000000000000000007f00000000000000000000000000000000000000000000000000000000000000007f00000000000000000000000000000000000000000000000000000000000000007f000000000000000000000000000000000000000000000000000000000000000060405160200161070f959493929190611a8d565b60405160208183030381529060405281526020018773ffffffffffffffffffffffffffffffffffffffff16815260200160c84261074c9190611dab565b815260200184815260200186815250905060007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663c04b8d59836040518263ffffffff1660e01b81526004016107b89190611ccb565b602060405180830381600087803b1580156107d257600080fd5b505af11580156107e6573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061080a9190611741565b90507f017190d3d99ee6d8dd0604ef1e71ff9802810c6485f57c9b2ed6169848dd119f85858360405161083f93929190611bbc565b60405180910390a18092505050949350505050565b7f000000000000000000000000000000000000000000000000000000000000000081565b7f000000000000000000000000000000000000000000000000000000000000000081565b60008073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff161415610904576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600082141561093f576040517fb813f54900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61098c3330847f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16611162909392919063ffffffff16565b6109f77f0000000000000000000000000000000000000000000000000000000000000000837f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166111eb9092919063ffffffff16565b60006040518061010001604052807f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1681526020017f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1681526020017f000000000000000000000000000000000000000000000000000000000000000062ffffff1681526020013073ffffffffffffffffffffffffffffffffffffffff16815260200160c842610ad19190611dab565b8152602001848152602001858152602001600073ffffffffffffffffffffffffffffffffffffffff16815250905060007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663414bf389836040518263ffffffff1660e01b8152600401610b5a9190611ced565b602060405180830381600087803b158015610b7457600080fd5b505af1158015610b88573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610bac9190611741565b90507f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16632e1a7d4d826040518263ffffffff1660e01b8152600401610c079190611d24565b600060405180830381600087803b158015610c2157600080fd5b505af1158015610c35573d6000803e3d6000fd5b505050507f74e171117e91660f493740924d8bad0caf48dc4fbccb767fb05935397a2c17ae8482604051610c6a929190611d3f565b60405180910390a160008673ffffffffffffffffffffffffffffffffffffffff1682604051610c9890611b03565b60006040518083038185875af1925050503d8060008114610cd5576040519150601f19603f3d011682016040523d82523d6000602084013e610cda565b606091505b5050905080610d15576040517f3794aeaf00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8193505050509392505050565b7f000000000000000000000000000000000000000000000000000000000000000081565b60008060009054906101000a900460ff1615610d8e576040517f29f745a700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60016000806101000a81548160ff021916908315150217905550600073ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff161480610e0f5750600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16145b15610e46576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000821415610e81576040517fb813f54900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610ece3330847f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16611162909392919063ffffffff16565b610f397f0000000000000000000000000000000000000000000000000000000000000000837f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166111eb9092919063ffffffff16565b60006040518060a001604052807f00000000000000000000000000000000000000000000000000000000000000007f00000000000000000000000000000000000000000000000000000000000000007f00000000000000000000000000000000000000000000000000000000000000007f000000000000000000000000000000000000000000000000000000000000000089604051602001610fdf959493929190611a8d565b60405160208183030381529060405281526020018773ffffffffffffffffffffffffffffffffffffffff16815260200160c84261101c9190611dab565b815260200184815260200186815250905060007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663c04b8d59836040518263ffffffff1660e01b81526004016110889190611ccb565b602060405180830381600087803b1580156110a257600080fd5b505af11580156110b6573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110da9190611741565b90507f0a7cb8f6e1d29e616c1209a3f418c17b3a9137005377f6dd072217b1ede2573b85858360405161110f93929190611bbc565b60405180910390a1809250505060008060006101000a81548160ff021916908315150217905550949350505050565b7f000000000000000000000000000000000000000000000000000000000000000081565b6111e5846323b872dd60e01b85858560405160240161118393929190611b5c565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050611349565b50505050565b6000811480611284575060008373ffffffffffffffffffffffffffffffffffffffff1663dd62ed3e30856040518363ffffffff1660e01b8152600401611232929190611b33565b60206040518083038186803b15801561124a57600080fd5b505afa15801561125e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112829190611741565b145b6112c3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016112ba90611cab565b60405180910390fd5b6113448363095ea7b360e01b84846040516024016112e2929190611b93565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050611349565b505050565b60006113ab826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c65648152508573ffffffffffffffffffffffffffffffffffffffff166114109092919063ffffffff16565b905060008151111561140b57808060200190518101906113cb9190611714565b61140a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161140190611c8b565b60405180910390fd5b5b505050565b606061141f8484600085611428565b90509392505050565b60608247101561146d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161146490611c4b565b60405180910390fd5b6114768561153c565b6114b5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016114ac90611c6b565b60405180910390fd5b6000808673ffffffffffffffffffffffffffffffffffffffff1685876040516114de9190611aec565b60006040518083038185875af1925050503d806000811461151b576040519150601f19603f3d011682016040523d82523d6000602084013e611520565b606091505b509150915061153082828661155f565b92505050949350505050565b6000808273ffffffffffffffffffffffffffffffffffffffff163b119050919050565b6060831561156f578290506115bf565b6000835111156115825782518084602001fd5b816040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016115b69190611c29565b60405180910390fd5b9392505050565b6000813590506115d581612081565b92915050565b6000815190506115ea81612098565b92915050565b6000813590506115ff816120af565b92915050565b600081519050611614816120af565b92915050565b6000806040838503121561163157611630611f38565b5b600061163f858286016115c6565b9250506020611650858286016115f0565b9150509250929050565b6000806000806080858703121561167457611673611f38565b5b6000611682878288016115c6565b9450506020611693878288016115f0565b93505060406116a4878288016115c6565b92505060606116b5878288016115f0565b91505092959194509250565b6000806000606084860312156116da576116d9611f38565b5b60006116e8868287016115c6565b93505060206116f9868287016115f0565b925050604061170a868287016115f0565b9150509250925092565b60006020828403121561172a57611729611f38565b5b6000611738848285016115db565b91505092915050565b60006020828403121561175757611756611f38565b5b600061176584828501611605565b91505092915050565b61177781611e01565b82525050565b61178681611e01565b82525050565b61179d61179882611e01565b611ed3565b82525050565b60006117ae82611d68565b6117b88185611d7e565b93506117c8818560208601611ea0565b6117d181611f3d565b840191505092915050565b60006117e782611d68565b6117f18185611d8f565b9350611801818560208601611ea0565b80840191505092915050565b61181681611e58565b82525050565b61182581611e6a565b82525050565b600061183682611d73565b6118408185611d9a565b9350611850818560208601611ea0565b61185981611f3d565b840191505092915050565b6000611871602683611d9a565b915061187c82611f68565b604082019050919050565b6000611894600083611d8f565b915061189f82611fb7565b600082019050919050565b60006118b7601d83611d9a565b91506118c282611fba565b602082019050919050565b60006118da602a83611d9a565b91506118e582611fe3565b604082019050919050565b60006118fd603683611d9a565b915061190882612032565b604082019050919050565b600060a083016000830151848203600086015261193082826117a3565b9150506020830151611945602086018261176e565b5060408301516119586040860182611a6f565b50606083015161196b6060860182611a6f565b50608083015161197e6080860182611a6f565b508091505092915050565b610100820160008201516119a0600085018261176e565b5060208201516119b3602085018261176e565b5060408201516119c66040850182611a3a565b5060608201516119d9606085018261176e565b5060808201516119ec6080850182611a6f565b5060a08201516119ff60a0850182611a6f565b5060c0820151611a1260c0850182611a6f565b5060e0820151611a2560e0850182611a2b565b50505050565b611a3481611e1f565b82525050565b611a4381611e3f565b82525050565b611a5281611e3f565b82525050565b611a69611a6482611e3f565b611ef7565b82525050565b611a7881611e4e565b82525050565b611a8781611e4e565b82525050565b6000611a99828861178c565b601482019150611aa98287611a58565b600382019150611ab9828661178c565b601482019150611ac98285611a58565b600382019150611ad9828461178c565b6014820191508190509695505050505050565b6000611af882846117dc565b915081905092915050565b6000611b0e82611887565b9150819050919050565b6000602082019050611b2d600083018461177d565b92915050565b6000604082019050611b48600083018561177d565b611b55602083018461177d565b9392505050565b6000606082019050611b71600083018661177d565b611b7e602083018561177d565b611b8b6040830184611a7e565b949350505050565b6000604082019050611ba8600083018561177d565b611bb56020830184611a7e565b9392505050565b6000606082019050611bd1600083018661177d565b611bde6020830185611a7e565b611beb6040830184611a7e565b949350505050565b6000602082019050611c08600083018461180d565b92915050565b6000602082019050611c23600083018461181c565b92915050565b60006020820190508181036000830152611c43818461182b565b905092915050565b60006020820190508181036000830152611c6481611864565b9050919050565b60006020820190508181036000830152611c84816118aa565b9050919050565b60006020820190508181036000830152611ca4816118cd565b9050919050565b60006020820190508181036000830152611cc4816118f0565b9050919050565b60006020820190508181036000830152611ce58184611913565b905092915050565b600061010082019050611d036000830184611989565b92915050565b6000602082019050611d1e6000830184611a49565b92915050565b6000602082019050611d396000830184611a7e565b92915050565b6000604082019050611d546000830185611a7e565b611d616020830184611a7e565b9392505050565b600081519050919050565b600081519050919050565b600082825260208201905092915050565b600081905092915050565b600082825260208201905092915050565b6000611db682611e4e565b9150611dc183611e4e565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff03821115611df657611df5611f09565b5b828201905092915050565b6000611e0c82611e1f565b9050919050565b60008115159050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600062ffffff82169050919050565b6000819050919050565b6000611e6382611e7c565b9050919050565b6000611e7582611e7c565b9050919050565b6000611e8782611e8e565b9050919050565b6000611e9982611e1f565b9050919050565b60005b83811015611ebe578082015181840152602081019050611ea3565b83811115611ecd576000848401525b50505050565b6000611ede82611ee5565b9050919050565b6000611ef082611f5b565b9050919050565b6000611f0282611f4e565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b600080fd5b6000601f19601f8301169050919050565b60008160e81b9050919050565b60008160601b9050919050565b7f416464726573733a20696e73756666696369656e742062616c616e636520666f60008201527f722063616c6c0000000000000000000000000000000000000000000000000000602082015250565b50565b7f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000600082015250565b7f5361666545524332303a204552433230206f7065726174696f6e20646964206e60008201527f6f74207375636365656400000000000000000000000000000000000000000000602082015250565b7f5361666545524332303a20617070726f76652066726f6d206e6f6e2d7a65726f60008201527f20746f206e6f6e2d7a65726f20616c6c6f77616e636500000000000000000000602082015250565b61208a81611e01565b811461209557600080fd5b50565b6120a181611e13565b81146120ac57600080fd5b50565b6120b881611e4e565b81146120c357600080fd5b5056fea264697066735822122028effbcd83dac6e039c3988574ddee3db7f7c68ef58a7545ca1c974c999d8a4d64736f6c63430008070033"; + "0x6101406040523480156200001257600080fd5b50604051620025af380380620025af83398181016040528101906200003891906200028a565b600073ffffffffffffffffffffffffffffffffffffffff168673ffffffffffffffffffffffffffffffffffffffff161480620000a05750600073ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff16145b80620000d85750600073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff16145b80620001105750600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16145b1562000148576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8573ffffffffffffffffffffffffffffffffffffffff1660e08173ffffffffffffffffffffffffffffffffffffffff1660601b815250508473ffffffffffffffffffffffffffffffffffffffff166101008173ffffffffffffffffffffffffffffffffffffffff1660601b815250508373ffffffffffffffffffffffffffffffffffffffff166101208173ffffffffffffffffffffffffffffffffffffffff1660601b815250508273ffffffffffffffffffffffffffffffffffffffff1660c08173ffffffffffffffffffffffffffffffffffffffff1660601b815250508162ffffff1660808162ffffff1660e81b815250508062ffffff1660a08162ffffff1660e81b81525050505050505050620003a2565b6000815190506200026d816200036e565b92915050565b600081519050620002848162000388565b92915050565b60008060008060008060c08789031215620002aa57620002a962000369565b5b6000620002ba89828a016200025c565b9650506020620002cd89828a016200025c565b9550506040620002e089828a016200025c565b9450506060620002f389828a016200025c565b93505060806200030689828a0162000273565b92505060a06200031989828a0162000273565b9150509295509295509295565b600062000333826200033a565b9050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600062ffffff82169050919050565b600080fd5b620003798162000326565b81146200038557600080fd5b50565b62000393816200035a565b81146200039f57600080fd5b50565b60805160e81c60a05160e81c60c05160601c60e05160601c6101005160601c6101205160601c6120fc620004b360003960006111400152600081816104030152818161062301528181610761015281816108560152818161099101528181610b0301528181610ed30152611031015260008181610343015281816104f5015281816106dc01528181610947015281816109b301528181610a0701528181610e8901528181610ef50152610f480152600081816103070152818161069a01528181610a4301528181610bb00152610f8a01526000818161067901528181610d240152610fab01526000818161037f015281816106bb0152818161087a01528181610a7f0152610f6901526120fc6000f3fe60806040526004361061008a5760003560e01c80633cbd7005116100595780633cbd70051461015957806354c49a2a146101845780635d9dfdde146101c1578063a53fb10b146101ec578063c6bbd5a71461022957610091565b8063013b2ff81461009657806321e093b1146100c65780632405620a146100f15780632c76d7a61461012e57610091565b3661009157005b600080fd5b6100b060048036038101906100ab919061161a565b610254565b6040516100bd9190611d24565b60405180910390f35b3480156100d257600080fd5b506100db6104f3565b6040516100e89190611b18565b60405180910390f35b3480156100fd57600080fd5b506101186004803603810190610113919061165a565b610517565b6040516101259190611d24565b60405180910390f35b34801561013a57600080fd5b50610143610854565b6040516101509190611c0e565b60405180910390f35b34801561016557600080fd5b5061016e610878565b60405161017b9190611d09565b60405180910390f35b34801561019057600080fd5b506101ab60048036038101906101a691906116c1565b61089c565b6040516101b89190611d24565b60405180910390f35b3480156101cd57600080fd5b506101d6610d22565b6040516101e39190611d09565b60405180910390f35b3480156101f857600080fd5b50610213600480360381019061020e919061165a565b610d46565b6040516102209190611d24565b60405180910390f35b34801561023557600080fd5b5061023e61113e565b60405161024b9190611bf3565b60405180910390f35b60008073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614156102bc576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60003414156102f7576040517fb813f54900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60006040518061010001604052807f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1681526020017f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1681526020017f000000000000000000000000000000000000000000000000000000000000000062ffffff1681526020018573ffffffffffffffffffffffffffffffffffffffff16815260200160c8426103d19190611dab565b8152602001348152602001848152602001600073ffffffffffffffffffffffffffffffffffffffff16815250905060007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663414bf38934846040518363ffffffff1660e01b815260040161045b9190611ced565b6020604051808303818588803b15801561047457600080fd5b505af1158015610488573d6000803e3d6000fd5b50505050506040513d601f19601f820116820180604052508101906104ad9190611741565b90507f87890b0a30955b1db16cc894fbe24779ae05d9f337bfe8b6dfc0809b5bf9da1134826040516104e0929190611d3f565b60405180910390a1809250505092915050565b7f000000000000000000000000000000000000000000000000000000000000000081565b60008073ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff16148061057f5750600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16145b156105b6576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008214156105f1576040517fb813f54900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61061e3330848673ffffffffffffffffffffffffffffffffffffffff16611162909392919063ffffffff16565b6106697f0000000000000000000000000000000000000000000000000000000000000000838573ffffffffffffffffffffffffffffffffffffffff166111eb9092919063ffffffff16565b60006040518060a00160405280857f00000000000000000000000000000000000000000000000000000000000000007f00000000000000000000000000000000000000000000000000000000000000007f00000000000000000000000000000000000000000000000000000000000000007f000000000000000000000000000000000000000000000000000000000000000060405160200161070f959493929190611a8d565b60405160208183030381529060405281526020018773ffffffffffffffffffffffffffffffffffffffff16815260200160c84261074c9190611dab565b815260200184815260200186815250905060007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663c04b8d59836040518263ffffffff1660e01b81526004016107b89190611ccb565b602060405180830381600087803b1580156107d257600080fd5b505af11580156107e6573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061080a9190611741565b90507f017190d3d99ee6d8dd0604ef1e71ff9802810c6485f57c9b2ed6169848dd119f85858360405161083f93929190611bbc565b60405180910390a18092505050949350505050565b7f000000000000000000000000000000000000000000000000000000000000000081565b7f000000000000000000000000000000000000000000000000000000000000000081565b60008073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff161415610904576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600082141561093f576040517fb813f54900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61098c3330847f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16611162909392919063ffffffff16565b6109f77f0000000000000000000000000000000000000000000000000000000000000000837f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166111eb9092919063ffffffff16565b60006040518061010001604052807f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1681526020017f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1681526020017f000000000000000000000000000000000000000000000000000000000000000062ffffff1681526020013073ffffffffffffffffffffffffffffffffffffffff16815260200160c842610ad19190611dab565b8152602001848152602001858152602001600073ffffffffffffffffffffffffffffffffffffffff16815250905060007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663414bf389836040518263ffffffff1660e01b8152600401610b5a9190611ced565b602060405180830381600087803b158015610b7457600080fd5b505af1158015610b88573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610bac9190611741565b90507f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16632e1a7d4d826040518263ffffffff1660e01b8152600401610c079190611d24565b600060405180830381600087803b158015610c2157600080fd5b505af1158015610c35573d6000803e3d6000fd5b505050507f74e171117e91660f493740924d8bad0caf48dc4fbccb767fb05935397a2c17ae8482604051610c6a929190611d3f565b60405180910390a160008673ffffffffffffffffffffffffffffffffffffffff1682604051610c9890611b03565b60006040518083038185875af1925050503d8060008114610cd5576040519150601f19603f3d011682016040523d82523d6000602084013e610cda565b606091505b5050905080610d15576040517f3794aeaf00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8193505050509392505050565b7f000000000000000000000000000000000000000000000000000000000000000081565b60008060009054906101000a900460ff1615610d8e576040517f29f745a700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60016000806101000a81548160ff021916908315150217905550600073ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff161480610e0f5750600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16145b15610e46576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000821415610e81576040517fb813f54900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610ece3330847f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16611162909392919063ffffffff16565b610f397f0000000000000000000000000000000000000000000000000000000000000000837f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166111eb9092919063ffffffff16565b60006040518060a001604052807f00000000000000000000000000000000000000000000000000000000000000007f00000000000000000000000000000000000000000000000000000000000000007f00000000000000000000000000000000000000000000000000000000000000007f000000000000000000000000000000000000000000000000000000000000000089604051602001610fdf959493929190611a8d565b60405160208183030381529060405281526020018773ffffffffffffffffffffffffffffffffffffffff16815260200160c84261101c9190611dab565b815260200184815260200186815250905060007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663c04b8d59836040518263ffffffff1660e01b81526004016110889190611ccb565b602060405180830381600087803b1580156110a257600080fd5b505af11580156110b6573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110da9190611741565b90507f0a7cb8f6e1d29e616c1209a3f418c17b3a9137005377f6dd072217b1ede2573b85858360405161110f93929190611bbc565b60405180910390a1809250505060008060006101000a81548160ff021916908315150217905550949350505050565b7f000000000000000000000000000000000000000000000000000000000000000081565b6111e5846323b872dd60e01b85858560405160240161118393929190611b5c565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050611349565b50505050565b6000811480611284575060008373ffffffffffffffffffffffffffffffffffffffff1663dd62ed3e30856040518363ffffffff1660e01b8152600401611232929190611b33565b60206040518083038186803b15801561124a57600080fd5b505afa15801561125e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112829190611741565b145b6112c3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016112ba90611cab565b60405180910390fd5b6113448363095ea7b360e01b84846040516024016112e2929190611b93565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050611349565b505050565b60006113ab826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c65648152508573ffffffffffffffffffffffffffffffffffffffff166114109092919063ffffffff16565b905060008151111561140b57808060200190518101906113cb9190611714565b61140a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161140190611c8b565b60405180910390fd5b5b505050565b606061141f8484600085611428565b90509392505050565b60608247101561146d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161146490611c4b565b60405180910390fd5b6114768561153c565b6114b5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016114ac90611c6b565b60405180910390fd5b6000808673ffffffffffffffffffffffffffffffffffffffff1685876040516114de9190611aec565b60006040518083038185875af1925050503d806000811461151b576040519150601f19603f3d011682016040523d82523d6000602084013e611520565b606091505b509150915061153082828661155f565b92505050949350505050565b6000808273ffffffffffffffffffffffffffffffffffffffff163b119050919050565b6060831561156f578290506115bf565b6000835111156115825782518084602001fd5b816040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016115b69190611c29565b60405180910390fd5b9392505050565b6000813590506115d581612081565b92915050565b6000815190506115ea81612098565b92915050565b6000813590506115ff816120af565b92915050565b600081519050611614816120af565b92915050565b6000806040838503121561163157611630611f38565b5b600061163f858286016115c6565b9250506020611650858286016115f0565b9150509250929050565b6000806000806080858703121561167457611673611f38565b5b6000611682878288016115c6565b9450506020611693878288016115f0565b93505060406116a4878288016115c6565b92505060606116b5878288016115f0565b91505092959194509250565b6000806000606084860312156116da576116d9611f38565b5b60006116e8868287016115c6565b93505060206116f9868287016115f0565b925050604061170a868287016115f0565b9150509250925092565b60006020828403121561172a57611729611f38565b5b6000611738848285016115db565b91505092915050565b60006020828403121561175757611756611f38565b5b600061176584828501611605565b91505092915050565b61177781611e01565b82525050565b61178681611e01565b82525050565b61179d61179882611e01565b611ed3565b82525050565b60006117ae82611d68565b6117b88185611d7e565b93506117c8818560208601611ea0565b6117d181611f3d565b840191505092915050565b60006117e782611d68565b6117f18185611d8f565b9350611801818560208601611ea0565b80840191505092915050565b61181681611e58565b82525050565b61182581611e6a565b82525050565b600061183682611d73565b6118408185611d9a565b9350611850818560208601611ea0565b61185981611f3d565b840191505092915050565b6000611871602683611d9a565b915061187c82611f68565b604082019050919050565b6000611894600083611d8f565b915061189f82611fb7565b600082019050919050565b60006118b7601d83611d9a565b91506118c282611fba565b602082019050919050565b60006118da602a83611d9a565b91506118e582611fe3565b604082019050919050565b60006118fd603683611d9a565b915061190882612032565b604082019050919050565b600060a083016000830151848203600086015261193082826117a3565b9150506020830151611945602086018261176e565b5060408301516119586040860182611a6f565b50606083015161196b6060860182611a6f565b50608083015161197e6080860182611a6f565b508091505092915050565b610100820160008201516119a0600085018261176e565b5060208201516119b3602085018261176e565b5060408201516119c66040850182611a3a565b5060608201516119d9606085018261176e565b5060808201516119ec6080850182611a6f565b5060a08201516119ff60a0850182611a6f565b5060c0820151611a1260c0850182611a6f565b5060e0820151611a2560e0850182611a2b565b50505050565b611a3481611e1f565b82525050565b611a4381611e3f565b82525050565b611a5281611e3f565b82525050565b611a69611a6482611e3f565b611ef7565b82525050565b611a7881611e4e565b82525050565b611a8781611e4e565b82525050565b6000611a99828861178c565b601482019150611aa98287611a58565b600382019150611ab9828661178c565b601482019150611ac98285611a58565b600382019150611ad9828461178c565b6014820191508190509695505050505050565b6000611af882846117dc565b915081905092915050565b6000611b0e82611887565b9150819050919050565b6000602082019050611b2d600083018461177d565b92915050565b6000604082019050611b48600083018561177d565b611b55602083018461177d565b9392505050565b6000606082019050611b71600083018661177d565b611b7e602083018561177d565b611b8b6040830184611a7e565b949350505050565b6000604082019050611ba8600083018561177d565b611bb56020830184611a7e565b9392505050565b6000606082019050611bd1600083018661177d565b611bde6020830185611a7e565b611beb6040830184611a7e565b949350505050565b6000602082019050611c08600083018461180d565b92915050565b6000602082019050611c23600083018461181c565b92915050565b60006020820190508181036000830152611c43818461182b565b905092915050565b60006020820190508181036000830152611c6481611864565b9050919050565b60006020820190508181036000830152611c84816118aa565b9050919050565b60006020820190508181036000830152611ca4816118cd565b9050919050565b60006020820190508181036000830152611cc4816118f0565b9050919050565b60006020820190508181036000830152611ce58184611913565b905092915050565b600061010082019050611d036000830184611989565b92915050565b6000602082019050611d1e6000830184611a49565b92915050565b6000602082019050611d396000830184611a7e565b92915050565b6000604082019050611d546000830185611a7e565b611d616020830184611a7e565b9392505050565b600081519050919050565b600081519050919050565b600082825260208201905092915050565b600081905092915050565b600082825260208201905092915050565b6000611db682611e4e565b9150611dc183611e4e565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff03821115611df657611df5611f09565b5b828201905092915050565b6000611e0c82611e1f565b9050919050565b60008115159050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600062ffffff82169050919050565b6000819050919050565b6000611e6382611e7c565b9050919050565b6000611e7582611e7c565b9050919050565b6000611e8782611e8e565b9050919050565b6000611e9982611e1f565b9050919050565b60005b83811015611ebe578082015181840152602081019050611ea3565b83811115611ecd576000848401525b50505050565b6000611ede82611ee5565b9050919050565b6000611ef082611f5b565b9050919050565b6000611f0282611f4e565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b600080fd5b6000601f19601f8301169050919050565b60008160e81b9050919050565b60008160601b9050919050565b7f416464726573733a20696e73756666696369656e742062616c616e636520666f60008201527f722063616c6c0000000000000000000000000000000000000000000000000000602082015250565b50565b7f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000600082015250565b7f5361666545524332303a204552433230206f7065726174696f6e20646964206e60008201527f6f74207375636365656400000000000000000000000000000000000000000000602082015250565b7f5361666545524332303a20617070726f76652066726f6d206e6f6e2d7a65726f60008201527f20746f206e6f6e2d7a65726f20616c6c6f77616e636500000000000000000000602082015250565b61208a81611e01565b811461209557600080fd5b50565b6120a181611e13565b81146120ac57600080fd5b50565b6120b881611e4e565b81146120c357600080fd5b5056fea264697066735822122039a694c0158622ee75b5f35cba659638056a539d34b56459f55502d38bab836564736f6c63430008070033"; type ZetaTokenConsumerUniV3ConstructorParams = | [signer?: Signer] diff --git a/packages/interfaces/typechain-types/factories/contracts/index.ts b/packages/interfaces/typechain-types/factories/contracts/index.ts index 940117ae..028b2e9e 100644 --- a/packages/interfaces/typechain-types/factories/contracts/index.ts +++ b/packages/interfaces/typechain-types/factories/contracts/index.ts @@ -7,6 +7,7 @@ export * as zetaNonEthSol from "./Zeta.non-eth.sol"; export * as zetaConnectorBaseSol from "./ZetaConnector.base.sol"; export * as zetaConnectorEthSol from "./ZetaConnector.eth.sol"; export * as zetaConnectorNonEthSol from "./ZetaConnector.non-eth.sol"; +export * as zetaTokenConsumerTridentStrategySol from "./ZetaTokenConsumerTrident.strategy.sol"; export * as zetaTokenConsumerUniV2StrategySol from "./ZetaTokenConsumerUniV2.strategy.sol"; export * as zetaTokenConsumerUniV3StrategySol from "./ZetaTokenConsumerUniV3.strategy.sol"; export * as interfaces from "./interfaces"; diff --git a/packages/interfaces/typechain-types/factories/contracts/interfaces/ConnectorErrors__factory.ts b/packages/interfaces/typechain-types/factories/contracts/interfaces/ConnectorErrors__factory.ts index 6594e084..ad028930 100644 --- a/packages/interfaces/typechain-types/factories/contracts/interfaces/ConnectorErrors__factory.ts +++ b/packages/interfaces/typechain-types/factories/contracts/interfaces/ConnectorErrors__factory.ts @@ -65,11 +65,6 @@ const _abi = [ name: "ExceedsMaxSupply", type: "error", }, - { - inputs: [], - name: "InvalidAddress", - type: "error", - }, { inputs: [], name: "ZetaTransferError", diff --git a/packages/interfaces/typechain-types/factories/contracts/interfaces/TridentConcentratedLiquidityPoolFactory.sol/ConcentratedLiquidityPoolFactory__factory.ts b/packages/interfaces/typechain-types/factories/contracts/interfaces/TridentConcentratedLiquidityPoolFactory.sol/ConcentratedLiquidityPoolFactory__factory.ts new file mode 100644 index 00000000..f49929a5 --- /dev/null +++ b/packages/interfaces/typechain-types/factories/contracts/interfaces/TridentConcentratedLiquidityPoolFactory.sol/ConcentratedLiquidityPoolFactory__factory.ts @@ -0,0 +1,66 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ + +import { Contract, Signer, utils } from "ethers"; +import type { Provider } from "@ethersproject/providers"; +import type { + ConcentratedLiquidityPoolFactory, + ConcentratedLiquidityPoolFactoryInterface, +} from "../../../../contracts/interfaces/TridentConcentratedLiquidityPoolFactory.sol/ConcentratedLiquidityPoolFactory"; + +const _abi = [ + { + inputs: [ + { + internalType: "address", + name: "token0", + type: "address", + }, + { + internalType: "address", + name: "token1", + type: "address", + }, + { + internalType: "uint256", + name: "startIndex", + type: "uint256", + }, + { + internalType: "uint256", + name: "count", + type: "uint256", + }, + ], + name: "getPools", + outputs: [ + { + internalType: "address[]", + name: "pairPools", + type: "address[]", + }, + ], + stateMutability: "view", + type: "function", + }, +]; + +export class ConcentratedLiquidityPoolFactory__factory { + static readonly abi = _abi; + static createInterface(): ConcentratedLiquidityPoolFactoryInterface { + return new utils.Interface( + _abi + ) as ConcentratedLiquidityPoolFactoryInterface; + } + static connect( + address: string, + signerOrProvider: Signer | Provider + ): ConcentratedLiquidityPoolFactory { + return new Contract( + address, + _abi, + signerOrProvider + ) as ConcentratedLiquidityPoolFactory; + } +} diff --git a/packages/interfaces/typechain-types/factories/contracts/interfaces/TridentConcentratedLiquidityPoolFactory.sol/index.ts b/packages/interfaces/typechain-types/factories/contracts/interfaces/TridentConcentratedLiquidityPoolFactory.sol/index.ts new file mode 100644 index 00000000..d1fea771 --- /dev/null +++ b/packages/interfaces/typechain-types/factories/contracts/interfaces/TridentConcentratedLiquidityPoolFactory.sol/index.ts @@ -0,0 +1,4 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +export { ConcentratedLiquidityPoolFactory__factory } from "./ConcentratedLiquidityPoolFactory__factory"; diff --git a/packages/interfaces/typechain-types/factories/contracts/interfaces/TridentIPoolRouter.sol/IPoolRouter__factory.ts b/packages/interfaces/typechain-types/factories/contracts/interfaces/TridentIPoolRouter.sol/IPoolRouter__factory.ts new file mode 100644 index 00000000..deb1bb44 --- /dev/null +++ b/packages/interfaces/typechain-types/factories/contracts/interfaces/TridentIPoolRouter.sol/IPoolRouter__factory.ts @@ -0,0 +1,253 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ + +import { Contract, Signer, utils } from "ethers"; +import type { Provider } from "@ethersproject/providers"; +import type { + IPoolRouter, + IPoolRouterInterface, +} from "../../../../contracts/interfaces/TridentIPoolRouter.sol/IPoolRouter"; + +const _abi = [ + { + inputs: [ + { + components: [ + { + internalType: "address", + name: "tokenIn", + type: "address", + }, + { + internalType: "uint256", + name: "amountIn", + type: "uint256", + }, + { + internalType: "uint256", + name: "amountOutMinimum", + type: "uint256", + }, + { + internalType: "address[]", + name: "path", + type: "address[]", + }, + { + internalType: "address", + name: "to", + type: "address", + }, + { + internalType: "bool", + name: "unwrap", + type: "bool", + }, + ], + internalType: "struct IPoolRouter.ExactInputParams", + name: "params", + type: "tuple", + }, + ], + name: "exactInput", + outputs: [ + { + internalType: "uint256", + name: "amountOut", + type: "uint256", + }, + ], + stateMutability: "payable", + type: "function", + }, + { + inputs: [ + { + components: [ + { + internalType: "address", + name: "tokenIn", + type: "address", + }, + { + internalType: "uint256", + name: "amountIn", + type: "uint256", + }, + { + internalType: "uint256", + name: "amountOutMinimum", + type: "uint256", + }, + { + internalType: "address", + name: "pool", + type: "address", + }, + { + internalType: "address", + name: "to", + type: "address", + }, + { + internalType: "bool", + name: "unwrap", + type: "bool", + }, + ], + internalType: "struct IPoolRouter.ExactInputSingleParams", + name: "params", + type: "tuple", + }, + ], + name: "exactInputSingle", + outputs: [ + { + internalType: "uint256", + name: "amountOut", + type: "uint256", + }, + ], + stateMutability: "payable", + type: "function", + }, + { + inputs: [ + { + components: [ + { + internalType: "address", + name: "tokenIn", + type: "address", + }, + { + internalType: "uint256", + name: "amountOut", + type: "uint256", + }, + { + internalType: "uint256", + name: "amountInMaximum", + type: "uint256", + }, + { + internalType: "address[]", + name: "path", + type: "address[]", + }, + { + internalType: "address", + name: "to", + type: "address", + }, + { + internalType: "bool", + name: "unwrap", + type: "bool", + }, + ], + internalType: "struct IPoolRouter.ExactOutputParams", + name: "params", + type: "tuple", + }, + ], + name: "exactOutput", + outputs: [ + { + internalType: "uint256", + name: "amountIn", + type: "uint256", + }, + ], + stateMutability: "payable", + type: "function", + }, + { + inputs: [ + { + components: [ + { + internalType: "address", + name: "tokenIn", + type: "address", + }, + { + internalType: "uint256", + name: "amountOut", + type: "uint256", + }, + { + internalType: "uint256", + name: "amountInMaximum", + type: "uint256", + }, + { + internalType: "address", + name: "pool", + type: "address", + }, + { + internalType: "address", + name: "to", + type: "address", + }, + { + internalType: "bool", + name: "unwrap", + type: "bool", + }, + ], + internalType: "struct IPoolRouter.ExactOutputSingleParams", + name: "params", + type: "tuple", + }, + ], + name: "exactOutputSingle", + outputs: [ + { + internalType: "uint256", + name: "amountIn", + type: "uint256", + }, + ], + stateMutability: "payable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "token", + type: "address", + }, + { + internalType: "uint256", + name: "amount", + type: "uint256", + }, + { + internalType: "address", + name: "recipient", + type: "address", + }, + ], + name: "sweep", + outputs: [], + stateMutability: "payable", + type: "function", + }, +]; + +export class IPoolRouter__factory { + static readonly abi = _abi; + static createInterface(): IPoolRouterInterface { + return new utils.Interface(_abi) as IPoolRouterInterface; + } + static connect( + address: string, + signerOrProvider: Signer | Provider + ): IPoolRouter { + return new Contract(address, _abi, signerOrProvider) as IPoolRouter; + } +} diff --git a/packages/interfaces/typechain-types/factories/contracts/interfaces/TridentIPoolRouter.sol/index.ts b/packages/interfaces/typechain-types/factories/contracts/interfaces/TridentIPoolRouter.sol/index.ts new file mode 100644 index 00000000..48f758eb --- /dev/null +++ b/packages/interfaces/typechain-types/factories/contracts/interfaces/TridentIPoolRouter.sol/index.ts @@ -0,0 +1,4 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +export { IPoolRouter__factory } from "./IPoolRouter__factory"; diff --git a/packages/interfaces/typechain-types/factories/contracts/interfaces/ZetaInterfaces.sol/ZetaCommonErrors__factory.ts b/packages/interfaces/typechain-types/factories/contracts/interfaces/ZetaInterfaces.sol/ZetaCommonErrors__factory.ts new file mode 100644 index 00000000..87689d59 --- /dev/null +++ b/packages/interfaces/typechain-types/factories/contracts/interfaces/ZetaInterfaces.sol/ZetaCommonErrors__factory.ts @@ -0,0 +1,31 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ + +import { Contract, Signer, utils } from "ethers"; +import type { Provider } from "@ethersproject/providers"; +import type { + ZetaCommonErrors, + ZetaCommonErrorsInterface, +} from "../../../../contracts/interfaces/ZetaInterfaces.sol/ZetaCommonErrors"; + +const _abi = [ + { + inputs: [], + name: "InvalidAddress", + type: "error", + }, +]; + +export class ZetaCommonErrors__factory { + static readonly abi = _abi; + static createInterface(): ZetaCommonErrorsInterface { + return new utils.Interface(_abi) as ZetaCommonErrorsInterface; + } + static connect( + address: string, + signerOrProvider: Signer | Provider + ): ZetaCommonErrors { + return new Contract(address, _abi, signerOrProvider) as ZetaCommonErrors; + } +} diff --git a/packages/interfaces/typechain-types/factories/contracts/interfaces/ZetaInterfaces.sol/index.ts b/packages/interfaces/typechain-types/factories/contracts/interfaces/ZetaInterfaces.sol/index.ts index 09fee2da..7dd58379 100644 --- a/packages/interfaces/typechain-types/factories/contracts/interfaces/ZetaInterfaces.sol/index.ts +++ b/packages/interfaces/typechain-types/factories/contracts/interfaces/ZetaInterfaces.sol/index.ts @@ -1,6 +1,7 @@ /* Autogenerated file. Do not edit manually. */ /* tslint:disable */ /* eslint-disable */ +export { ZetaCommonErrors__factory } from "./ZetaCommonErrors__factory"; export { ZetaConnector__factory } from "./ZetaConnector__factory"; export { ZetaReceiver__factory } from "./ZetaReceiver__factory"; export { ZetaTokenConsumer__factory } from "./ZetaTokenConsumer__factory"; diff --git a/packages/interfaces/typechain-types/factories/contracts/interfaces/index.ts b/packages/interfaces/typechain-types/factories/contracts/interfaces/index.ts index 4ca02cf7..823d3b13 100644 --- a/packages/interfaces/typechain-types/factories/contracts/interfaces/index.ts +++ b/packages/interfaces/typechain-types/factories/contracts/interfaces/index.ts @@ -1,6 +1,8 @@ /* Autogenerated file. Do not edit manually. */ /* tslint:disable */ /* eslint-disable */ +export * as tridentConcentratedLiquidityPoolFactorySol from "./TridentConcentratedLiquidityPoolFactory.sol"; +export * as tridentIPoolRouterSol from "./TridentIPoolRouter.sol"; export * as zetaInterfacesSol from "./ZetaInterfaces.sol"; export { ConnectorErrors__factory } from "./ConnectorErrors__factory"; export { ZetaErrors__factory } from "./ZetaErrors__factory"; diff --git a/packages/interfaces/typechain-types/factories/contracts/testing/ZetaInteractorMock__factory.ts b/packages/interfaces/typechain-types/factories/contracts/testing/ZetaInteractorMock__factory.ts index 694810e1..2f263147 100644 --- a/packages/interfaces/typechain-types/factories/contracts/testing/ZetaInteractorMock__factory.ts +++ b/packages/interfaces/typechain-types/factories/contracts/testing/ZetaInteractorMock__factory.ts @@ -20,6 +20,11 @@ const _abi = [ stateMutability: "nonpayable", type: "constructor", }, + { + inputs: [], + name: "InvalidAddress", + type: "error", + }, { inputs: [ { @@ -275,7 +280,7 @@ const _abi = [ ]; const _bytecode = - "0x60c06040523480156200001157600080fd5b50604051620012b2380380620012b28339818101604052810190620000379190620001c0565b80620000586200004c6200009f60201b60201c565b620000a760201b60201c565b46608081815250508073ffffffffffffffffffffffffffffffffffffffff1660a08173ffffffffffffffffffffffffffffffffffffffff1660601b81525050505062000245565b600033905090565b600160006101000a81549073ffffffffffffffffffffffffffffffffffffffff0219169055620000e281620000e560201b620007191760201c565b50565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050816000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b600081519050620001ba816200022b565b92915050565b600060208284031215620001d957620001d862000226565b5b6000620001e984828501620001a9565b91505092915050565b6000620001ff8262000206565b9050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600080fd5b6200023681620001f2565b81146200024257600080fd5b50565b60805160a05160601c61103d620002756000396000818161058301526107df01526000610369015261103d6000f3fe608060405234801561001057600080fd5b506004361061009e5760003560e01c806379ba50971161006657806379ba50971461013157806383f3084f1461013b5780638da5cb5b14610159578063e30c397814610177578063f2fde38b146101955761009e565b80632618143f146100a35780633749c51a146100d35780633ff0693c146100ef5780634fd3f7d71461010b578063715018a614610127575b600080fd5b6100bd60048036038101906100b89190610ac8565b6101b1565b6040516100ca9190610ce1565b60405180910390f35b6100ed60048036038101906100e89190610a36565b610251565b005b61010960048036038101906101049190610a7f565b6102e7565b005b61012560048036038101906101209190610af5565b6103c8565b005b61012f61046c565b005b6101396104f4565b005b610143610581565b6040516101509190610d03565b60405180910390f35b6101616105a5565b60405161016e9190610cc6565b60405180910390f35b61017f6105ce565b60405161018c9190610cc6565b60405180910390f35b6101af60048036038101906101aa9190610a09565b6105f8565b005b600260205280600052604060002060009150905080546101d090610ec2565b80601f01602080910402602001604051908101604052809291908181526020018280546101fc90610ec2565b80156102495780601f1061021e57610100808354040283529160200191610249565b820191906000526020600020905b81548152906001019060200180831161022c57829003601f168201915b505050505081565b8061025a6107dd565b600260008260200135815260200190815260200160002060405161027e9190610caf565b60405180910390208180600001906102969190610d5e565b6040516102a4929190610c96565b6040518091039020146102e3576040517fb473eb0a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5050565b806102f06107dd565b3073ffffffffffffffffffffffffffffffffffffffff1681600001602081019061031a9190610a09565b73ffffffffffffffffffffffffffffffffffffffff1614610367576040517fc03e9c3f00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b7f00000000000000000000000000000000000000000000000000000000000000008160200135146103c4576040517fc03e9c3f00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5050565b6103d061086f565b73ffffffffffffffffffffffffffffffffffffffff166103ee6105a5565b73ffffffffffffffffffffffffffffffffffffffff1614610444576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161043b90610d3e565b60405180910390fd5b81816002600086815260200190815260200160002091906104669291906108a8565b50505050565b61047461086f565b73ffffffffffffffffffffffffffffffffffffffff166104926105a5565b73ffffffffffffffffffffffffffffffffffffffff16146104e8576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016104df90610d3e565b60405180910390fd5b6104f26000610877565b565b60006104fe61086f565b90508073ffffffffffffffffffffffffffffffffffffffff1661051f6105ce565b73ffffffffffffffffffffffffffffffffffffffff1614610575576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161056c90610d1e565b60405180910390fd5b61057e81610877565b50565b7f000000000000000000000000000000000000000000000000000000000000000081565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b6000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b61060061086f565b73ffffffffffffffffffffffffffffffffffffffff1661061e6105a5565b73ffffffffffffffffffffffffffffffffffffffff1614610674576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161066b90610d3e565b60405180910390fd5b80600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508073ffffffffffffffffffffffffffffffffffffffff166106d46105a5565b73ffffffffffffffffffffffffffffffffffffffff167f38d16b8cac22d99fc7c124b9cd0de2d3fa1faef420bfe791d8c362d765e2270060405160405180910390a350565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050816000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461086d57336040517fcbd9d2e00000000000000000000000000000000000000000000000000000000081526004016108649190610cc6565b60405180910390fd5b565b600033905090565b600160006101000a81549073ffffffffffffffffffffffffffffffffffffffff02191690556108a581610719565b50565b8280546108b490610ec2565b90600052602060002090601f0160209004810192826108d6576000855561091d565b82601f106108ef57803560ff191683800117855561091d565b8280016001018555821561091d579182015b8281111561091c578235825591602001919060010190610901565b5b50905061092a919061092e565b5090565b5b8082111561094757600081600090555060010161092f565b5090565b60008135905061095a81610fd9565b92915050565b60008083601f84011261097657610975610f28565b5b8235905067ffffffffffffffff81111561099357610992610f23565b5b6020830191508360018202830111156109af576109ae610f3c565b5b9250929050565b600060a082840312156109cc576109cb610f32565b5b81905092915050565b600060c082840312156109eb576109ea610f32565b5b81905092915050565b600081359050610a0381610ff0565b92915050565b600060208284031215610a1f57610a1e610f4b565b5b6000610a2d8482850161094b565b91505092915050565b600060208284031215610a4c57610a4b610f4b565b5b600082013567ffffffffffffffff811115610a6a57610a69610f46565b5b610a76848285016109b6565b91505092915050565b600060208284031215610a9557610a94610f4b565b5b600082013567ffffffffffffffff811115610ab357610ab2610f46565b5b610abf848285016109d5565b91505092915050565b600060208284031215610ade57610add610f4b565b5b6000610aec848285016109f4565b91505092915050565b600080600060408486031215610b0e57610b0d610f4b565b5b6000610b1c868287016109f4565b935050602084013567ffffffffffffffff811115610b3d57610b3c610f46565b5b610b4986828701610960565b92509250509250925092565b610b5e81610e0e565b82525050565b6000610b708385610df2565b9350610b7d838584610e80565b82840190509392505050565b6000610b9482610dd6565b610b9e8185610de1565b9350610bae818560208601610e8f565b610bb781610f50565b840191505092915050565b60008154610bcf81610ec2565b610bd98186610df2565b94506001821660008114610bf45760018114610c0557610c38565b60ff19831686528186019350610c38565b610c0e85610dc1565b60005b83811015610c3057815481890152600182019150602081019050610c11565b838801955050505b50505092915050565b610c4a81610e4a565b82525050565b6000610c5d602983610dfd565b9150610c6882610f61565b604082019050919050565b6000610c80602083610dfd565b9150610c8b82610fb0565b602082019050919050565b6000610ca3828486610b64565b91508190509392505050565b6000610cbb8284610bc2565b915081905092915050565b6000602082019050610cdb6000830184610b55565b92915050565b60006020820190508181036000830152610cfb8184610b89565b905092915050565b6000602082019050610d186000830184610c41565b92915050565b60006020820190508181036000830152610d3781610c50565b9050919050565b60006020820190508181036000830152610d5781610c73565b9050919050565b60008083356001602003843603038112610d7b57610d7a610f37565b5b80840192508235915067ffffffffffffffff821115610d9d57610d9c610f2d565b5b602083019250600182023603831315610db957610db8610f41565b5b509250929050565b60008190508160005260206000209050919050565b600081519050919050565b600082825260208201905092915050565b600081905092915050565b600082825260208201905092915050565b6000610e1982610e20565b9050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b6000610e5582610e5c565b9050919050565b6000610e6782610e6e565b9050919050565b6000610e7982610e20565b9050919050565b82818337600083830152505050565b60005b83811015610ead578082015181840152602081019050610e92565b83811115610ebc576000848401525b50505050565b60006002820490506001821680610eda57607f821691505b60208210811415610eee57610eed610ef4565b5b50919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f4f776e61626c6532537465703a2063616c6c6572206973206e6f74207468652060008201527f6e6577206f776e65720000000000000000000000000000000000000000000000602082015250565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b610fe281610e0e565b8114610fed57600080fd5b50565b610ff981610e40565b811461100457600080fd5b5056fea26469706673582212204e2a568ab403c04b828cee4d3bcde0c942b0681627e66f2b91d3f3bedd1ce60b64736f6c63430008070033"; + "0x60c06040523480156200001157600080fd5b506040516200131a3803806200131a833981810160405281019062000037919062000228565b80620000586200004c6200010760201b60201c565b6200010f60201b60201c565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415620000c0576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b46608081815250508073ffffffffffffffffffffffffffffffffffffffff1660a08173ffffffffffffffffffffffffffffffffffffffff1660601b815250505050620002ad565b600033905090565b600160006101000a81549073ffffffffffffffffffffffffffffffffffffffff02191690556200014a816200014d60201b620007191760201c565b50565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050816000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b600081519050620002228162000293565b92915050565b6000602082840312156200024157620002406200028e565b5b6000620002518482850162000211565b91505092915050565b600062000267826200026e565b9050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600080fd5b6200029e816200025a565b8114620002aa57600080fd5b50565b60805160a05160601c61103d620002dd6000396000818161058301526107df01526000610369015261103d6000f3fe608060405234801561001057600080fd5b506004361061009e5760003560e01c806379ba50971161006657806379ba50971461013157806383f3084f1461013b5780638da5cb5b14610159578063e30c397814610177578063f2fde38b146101955761009e565b80632618143f146100a35780633749c51a146100d35780633ff0693c146100ef5780634fd3f7d71461010b578063715018a614610127575b600080fd5b6100bd60048036038101906100b89190610ac8565b6101b1565b6040516100ca9190610ce1565b60405180910390f35b6100ed60048036038101906100e89190610a36565b610251565b005b61010960048036038101906101049190610a7f565b6102e7565b005b61012560048036038101906101209190610af5565b6103c8565b005b61012f61046c565b005b6101396104f4565b005b610143610581565b6040516101509190610d03565b60405180910390f35b6101616105a5565b60405161016e9190610cc6565b60405180910390f35b61017f6105ce565b60405161018c9190610cc6565b60405180910390f35b6101af60048036038101906101aa9190610a09565b6105f8565b005b600260205280600052604060002060009150905080546101d090610ec2565b80601f01602080910402602001604051908101604052809291908181526020018280546101fc90610ec2565b80156102495780601f1061021e57610100808354040283529160200191610249565b820191906000526020600020905b81548152906001019060200180831161022c57829003601f168201915b505050505081565b8061025a6107dd565b600260008260200135815260200190815260200160002060405161027e9190610caf565b60405180910390208180600001906102969190610d5e565b6040516102a4929190610c96565b6040518091039020146102e3576040517fb473eb0a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5050565b806102f06107dd565b3073ffffffffffffffffffffffffffffffffffffffff1681600001602081019061031a9190610a09565b73ffffffffffffffffffffffffffffffffffffffff1614610367576040517fc03e9c3f00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b7f00000000000000000000000000000000000000000000000000000000000000008160200135146103c4576040517fc03e9c3f00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5050565b6103d061086f565b73ffffffffffffffffffffffffffffffffffffffff166103ee6105a5565b73ffffffffffffffffffffffffffffffffffffffff1614610444576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161043b90610d3e565b60405180910390fd5b81816002600086815260200190815260200160002091906104669291906108a8565b50505050565b61047461086f565b73ffffffffffffffffffffffffffffffffffffffff166104926105a5565b73ffffffffffffffffffffffffffffffffffffffff16146104e8576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016104df90610d3e565b60405180910390fd5b6104f26000610877565b565b60006104fe61086f565b90508073ffffffffffffffffffffffffffffffffffffffff1661051f6105ce565b73ffffffffffffffffffffffffffffffffffffffff1614610575576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161056c90610d1e565b60405180910390fd5b61057e81610877565b50565b7f000000000000000000000000000000000000000000000000000000000000000081565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b6000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b61060061086f565b73ffffffffffffffffffffffffffffffffffffffff1661061e6105a5565b73ffffffffffffffffffffffffffffffffffffffff1614610674576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161066b90610d3e565b60405180910390fd5b80600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508073ffffffffffffffffffffffffffffffffffffffff166106d46105a5565b73ffffffffffffffffffffffffffffffffffffffff167f38d16b8cac22d99fc7c124b9cd0de2d3fa1faef420bfe791d8c362d765e2270060405160405180910390a350565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050816000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461086d57336040517fcbd9d2e00000000000000000000000000000000000000000000000000000000081526004016108649190610cc6565b60405180910390fd5b565b600033905090565b600160006101000a81549073ffffffffffffffffffffffffffffffffffffffff02191690556108a581610719565b50565b8280546108b490610ec2565b90600052602060002090601f0160209004810192826108d6576000855561091d565b82601f106108ef57803560ff191683800117855561091d565b8280016001018555821561091d579182015b8281111561091c578235825591602001919060010190610901565b5b50905061092a919061092e565b5090565b5b8082111561094757600081600090555060010161092f565b5090565b60008135905061095a81610fd9565b92915050565b60008083601f84011261097657610975610f28565b5b8235905067ffffffffffffffff81111561099357610992610f23565b5b6020830191508360018202830111156109af576109ae610f3c565b5b9250929050565b600060a082840312156109cc576109cb610f32565b5b81905092915050565b600060c082840312156109eb576109ea610f32565b5b81905092915050565b600081359050610a0381610ff0565b92915050565b600060208284031215610a1f57610a1e610f4b565b5b6000610a2d8482850161094b565b91505092915050565b600060208284031215610a4c57610a4b610f4b565b5b600082013567ffffffffffffffff811115610a6a57610a69610f46565b5b610a76848285016109b6565b91505092915050565b600060208284031215610a9557610a94610f4b565b5b600082013567ffffffffffffffff811115610ab357610ab2610f46565b5b610abf848285016109d5565b91505092915050565b600060208284031215610ade57610add610f4b565b5b6000610aec848285016109f4565b91505092915050565b600080600060408486031215610b0e57610b0d610f4b565b5b6000610b1c868287016109f4565b935050602084013567ffffffffffffffff811115610b3d57610b3c610f46565b5b610b4986828701610960565b92509250509250925092565b610b5e81610e0e565b82525050565b6000610b708385610df2565b9350610b7d838584610e80565b82840190509392505050565b6000610b9482610dd6565b610b9e8185610de1565b9350610bae818560208601610e8f565b610bb781610f50565b840191505092915050565b60008154610bcf81610ec2565b610bd98186610df2565b94506001821660008114610bf45760018114610c0557610c38565b60ff19831686528186019350610c38565b610c0e85610dc1565b60005b83811015610c3057815481890152600182019150602081019050610c11565b838801955050505b50505092915050565b610c4a81610e4a565b82525050565b6000610c5d602983610dfd565b9150610c6882610f61565b604082019050919050565b6000610c80602083610dfd565b9150610c8b82610fb0565b602082019050919050565b6000610ca3828486610b64565b91508190509392505050565b6000610cbb8284610bc2565b915081905092915050565b6000602082019050610cdb6000830184610b55565b92915050565b60006020820190508181036000830152610cfb8184610b89565b905092915050565b6000602082019050610d186000830184610c41565b92915050565b60006020820190508181036000830152610d3781610c50565b9050919050565b60006020820190508181036000830152610d5781610c73565b9050919050565b60008083356001602003843603038112610d7b57610d7a610f37565b5b80840192508235915067ffffffffffffffff821115610d9d57610d9c610f2d565b5b602083019250600182023603831315610db957610db8610f41565b5b509250929050565b60008190508160005260206000209050919050565b600081519050919050565b600082825260208201905092915050565b600081905092915050565b600082825260208201905092915050565b6000610e1982610e20565b9050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b6000610e5582610e5c565b9050919050565b6000610e6782610e6e565b9050919050565b6000610e7982610e20565b9050919050565b82818337600083830152505050565b60005b83811015610ead578082015181840152602081019050610e92565b83811115610ebc576000848401525b50505050565b60006002820490506001821680610eda57607f821691505b60208210811415610eee57610eed610ef4565b5b50919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f4f776e61626c6532537465703a2063616c6c6572206973206e6f74207468652060008201527f6e6577206f776e65720000000000000000000000000000000000000000000000602082015250565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b610fe281610e0e565b8114610fed57600080fd5b50565b610ff981610e40565b811461100457600080fd5b5056fea264697066735822122031dbc47d254d071d88a7ccc0c6e8c79ccd7fd28f9597f2524870fb4bf2785f8364736f6c63430008070033"; type ZetaInteractorMockConstructorParams = | [signer?: Signer] diff --git a/packages/interfaces/typechain-types/factories/contracts/testing/ZetaReceiverMock__factory.ts b/packages/interfaces/typechain-types/factories/contracts/testing/ZetaReceiverMock__factory.ts index c576a897..ac0984b9 100644 --- a/packages/interfaces/typechain-types/factories/contracts/testing/ZetaReceiverMock__factory.ts +++ b/packages/interfaces/typechain-types/factories/contracts/testing/ZetaReceiverMock__factory.ts @@ -123,7 +123,7 @@ const _abi = [ ]; const _bytecode = - "0x608060405234801561001057600080fd5b506102d5806100206000396000f3fe608060405234801561001057600080fd5b50600436106100365760003560e01c80633749c51a1461003b5780633ff0693c14610057575b600080fd5b6100556004803603810190610050919061018b565b610073565b005b610071600480360381019061006c91906101d4565b6100bf565b005b7f72a301dee3abcbe15615f3e253229bf4b4f508460603d674991c9a777b833c6e8160400160208101906100a7919061015e565b6040516100b4919061022c565b60405180910390a150565b7f53bd04e26f94f13ff43da96839541821041c309c6f624712192cbe3a2d133cc48160000160208101906100f3919061015e565b604051610100919061022c565b60405180910390a150565b60008135905061011a81610288565b92915050565b600060a0828403121561013657610135610279565b5b81905092915050565b600060c0828403121561015557610154610279565b5b81905092915050565b60006020828403121561017457610173610283565b5b60006101828482850161010b565b91505092915050565b6000602082840312156101a1576101a0610283565b5b600082013567ffffffffffffffff8111156101bf576101be61027e565b5b6101cb84828501610120565b91505092915050565b6000602082840312156101ea576101e9610283565b5b600082013567ffffffffffffffff8111156102085761020761027e565b5b6102148482850161013f565b91505092915050565b61022681610247565b82525050565b6000602082019050610241600083018461021d565b92915050565b600061025282610259565b9050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600080fd5b600080fd5b600080fd5b61029181610247565b811461029c57600080fd5b5056fea264697066735822122006f6a029b94ae14786eef98c35ac2ac751827442e3de0bc5d526a58c71a198c264736f6c63430008070033"; + "0x608060405234801561001057600080fd5b506102d5806100206000396000f3fe608060405234801561001057600080fd5b50600436106100365760003560e01c80633749c51a1461003b5780633ff0693c14610057575b600080fd5b6100556004803603810190610050919061018b565b610073565b005b610071600480360381019061006c91906101d4565b6100bf565b005b7f72a301dee3abcbe15615f3e253229bf4b4f508460603d674991c9a777b833c6e8160400160208101906100a7919061015e565b6040516100b4919061022c565b60405180910390a150565b7f53bd04e26f94f13ff43da96839541821041c309c6f624712192cbe3a2d133cc48160000160208101906100f3919061015e565b604051610100919061022c565b60405180910390a150565b60008135905061011a81610288565b92915050565b600060a0828403121561013657610135610279565b5b81905092915050565b600060c0828403121561015557610154610279565b5b81905092915050565b60006020828403121561017457610173610283565b5b60006101828482850161010b565b91505092915050565b6000602082840312156101a1576101a0610283565b5b600082013567ffffffffffffffff8111156101bf576101be61027e565b5b6101cb84828501610120565b91505092915050565b6000602082840312156101ea576101e9610283565b5b600082013567ffffffffffffffff8111156102085761020761027e565b5b6102148482850161013f565b91505092915050565b61022681610247565b82525050565b6000602082019050610241600083018461021d565b92915050565b600061025282610259565b9050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600080fd5b600080fd5b600080fd5b61029181610247565b811461029c57600080fd5b5056fea26469706673582212206d9ab112510099dc99b35fd9426757716b4a84cc69366a29a94f07745edef2cc64736f6c63430008070033"; type ZetaReceiverMockConstructorParams = | [signer?: Signer] diff --git a/packages/interfaces/typechain-types/hardhat.d.ts b/packages/interfaces/typechain-types/hardhat.d.ts index 88a97d42..a1fa138c 100644 --- a/packages/interfaces/typechain-types/hardhat.d.ts +++ b/packages/interfaces/typechain-types/hardhat.d.ts @@ -88,6 +88,14 @@ declare module "hardhat/types/runtime" { name: "ConnectorErrors", signerOrOptions?: ethers.Signer | FactoryOptions ): Promise; + getContractFactory( + name: "ConcentratedLiquidityPoolFactory", + signerOrOptions?: ethers.Signer | FactoryOptions + ): Promise; + getContractFactory( + name: "IPoolRouter", + signerOrOptions?: ethers.Signer | FactoryOptions + ): Promise; getContractFactory( name: "ZetaErrors", signerOrOptions?: ethers.Signer | FactoryOptions @@ -96,6 +104,10 @@ declare module "hardhat/types/runtime" { name: "ZetaInteractorErrors", signerOrOptions?: ethers.Signer | FactoryOptions ): Promise; + getContractFactory( + name: "ZetaCommonErrors", + signerOrOptions?: ethers.Signer | FactoryOptions + ): Promise; getContractFactory( name: "ZetaConnector", signerOrOptions?: ethers.Signer | FactoryOptions @@ -156,6 +168,18 @@ declare module "hardhat/types/runtime" { name: "ZetaInteractor", signerOrOptions?: ethers.Signer | FactoryOptions ): Promise; + getContractFactory( + name: "WETH9", + signerOrOptions?: ethers.Signer | FactoryOptions + ): Promise; + getContractFactory( + name: "ZetaTokenConsumerTrident", + signerOrOptions?: ethers.Signer | FactoryOptions + ): Promise; + getContractFactory( + name: "ZetaTokenConsumerTridentErrors", + signerOrOptions?: ethers.Signer | FactoryOptions + ): Promise; getContractFactory( name: "ZetaTokenConsumerUniV2", signerOrOptions?: ethers.Signer | FactoryOptions @@ -272,6 +296,16 @@ declare module "hardhat/types/runtime" { address: string, signer?: ethers.Signer ): Promise; + getContractAt( + name: "ConcentratedLiquidityPoolFactory", + address: string, + signer?: ethers.Signer + ): Promise; + getContractAt( + name: "IPoolRouter", + address: string, + signer?: ethers.Signer + ): Promise; getContractAt( name: "ZetaErrors", address: string, @@ -282,6 +316,11 @@ declare module "hardhat/types/runtime" { address: string, signer?: ethers.Signer ): Promise; + getContractAt( + name: "ZetaCommonErrors", + address: string, + signer?: ethers.Signer + ): Promise; getContractAt( name: "ZetaConnector", address: string, @@ -357,6 +396,21 @@ declare module "hardhat/types/runtime" { address: string, signer?: ethers.Signer ): Promise; + getContractAt( + name: "WETH9", + address: string, + signer?: ethers.Signer + ): Promise; + getContractAt( + name: "ZetaTokenConsumerTrident", + address: string, + signer?: ethers.Signer + ): Promise; + getContractAt( + name: "ZetaTokenConsumerTridentErrors", + address: string, + signer?: ethers.Signer + ): Promise; getContractAt( name: "ZetaTokenConsumerUniV2", address: string, diff --git a/packages/interfaces/typechain-types/index.ts b/packages/interfaces/typechain-types/index.ts index 66e46a91..13e82824 100644 --- a/packages/interfaces/typechain-types/index.ts +++ b/packages/interfaces/typechain-types/index.ts @@ -42,10 +42,16 @@ export type { ImmutableCreate2Factory } from "./contracts/ImmutableCreate2Factor export { ImmutableCreate2Factory__factory } from "./factories/contracts/ImmutableCreate2Factory.sol/ImmutableCreate2Factory__factory"; export type { ConnectorErrors } from "./contracts/interfaces/ConnectorErrors"; export { ConnectorErrors__factory } from "./factories/contracts/interfaces/ConnectorErrors__factory"; +export type { ConcentratedLiquidityPoolFactory } from "./contracts/interfaces/TridentConcentratedLiquidityPoolFactory.sol/ConcentratedLiquidityPoolFactory"; +export { ConcentratedLiquidityPoolFactory__factory } from "./factories/contracts/interfaces/TridentConcentratedLiquidityPoolFactory.sol/ConcentratedLiquidityPoolFactory__factory"; +export type { IPoolRouter } from "./contracts/interfaces/TridentIPoolRouter.sol/IPoolRouter"; +export { IPoolRouter__factory } from "./factories/contracts/interfaces/TridentIPoolRouter.sol/IPoolRouter__factory"; export type { ZetaErrors } from "./contracts/interfaces/ZetaErrors"; export { ZetaErrors__factory } from "./factories/contracts/interfaces/ZetaErrors__factory"; export type { ZetaInteractorErrors } from "./contracts/interfaces/ZetaInteractorErrors"; export { ZetaInteractorErrors__factory } from "./factories/contracts/interfaces/ZetaInteractorErrors__factory"; +export type { ZetaCommonErrors } from "./contracts/interfaces/ZetaInterfaces.sol/ZetaCommonErrors"; +export { ZetaCommonErrors__factory } from "./factories/contracts/interfaces/ZetaInterfaces.sol/ZetaCommonErrors__factory"; export type { ZetaConnector } from "./contracts/interfaces/ZetaInterfaces.sol/ZetaConnector"; export { ZetaConnector__factory } from "./factories/contracts/interfaces/ZetaInterfaces.sol/ZetaConnector__factory"; export type { ZetaReceiver } from "./contracts/interfaces/ZetaInterfaces.sol/ZetaReceiver"; @@ -76,12 +82,16 @@ export type { ZetaConnectorNonEth } from "./contracts/ZetaConnector.non-eth.sol/ export { ZetaConnectorNonEth__factory } from "./factories/contracts/ZetaConnector.non-eth.sol/ZetaConnectorNonEth__factory"; export type { ZetaInteractor } from "./contracts/ZetaInteractor"; export { ZetaInteractor__factory } from "./factories/contracts/ZetaInteractor__factory"; +export type { WETH9 } from "./contracts/ZetaTokenConsumerTrident.strategy.sol/WETH9"; +export { WETH9__factory } from "./factories/contracts/ZetaTokenConsumerTrident.strategy.sol/WETH9__factory"; +export type { ZetaTokenConsumerTrident } from "./contracts/ZetaTokenConsumerTrident.strategy.sol/ZetaTokenConsumerTrident"; +export { ZetaTokenConsumerTrident__factory } from "./factories/contracts/ZetaTokenConsumerTrident.strategy.sol/ZetaTokenConsumerTrident__factory"; +export type { ZetaTokenConsumerTridentErrors } from "./contracts/ZetaTokenConsumerTrident.strategy.sol/ZetaTokenConsumerTridentErrors"; +export { ZetaTokenConsumerTridentErrors__factory } from "./factories/contracts/ZetaTokenConsumerTrident.strategy.sol/ZetaTokenConsumerTridentErrors__factory"; export type { ZetaTokenConsumerUniV2 } from "./contracts/ZetaTokenConsumerUniV2.strategy.sol/ZetaTokenConsumerUniV2"; export { ZetaTokenConsumerUniV2__factory } from "./factories/contracts/ZetaTokenConsumerUniV2.strategy.sol/ZetaTokenConsumerUniV2__factory"; export type { ZetaTokenConsumerUniV2Errors } from "./contracts/ZetaTokenConsumerUniV2.strategy.sol/ZetaTokenConsumerUniV2Errors"; export { ZetaTokenConsumerUniV2Errors__factory } from "./factories/contracts/ZetaTokenConsumerUniV2.strategy.sol/ZetaTokenConsumerUniV2Errors__factory"; -export type { WETH9 } from "./contracts/ZetaTokenConsumerUniV3.strategy.sol/WETH9"; -export { WETH9__factory } from "./factories/contracts/ZetaTokenConsumerUniV3.strategy.sol/WETH9__factory"; export type { ZetaTokenConsumerUniV3 } from "./contracts/ZetaTokenConsumerUniV3.strategy.sol/ZetaTokenConsumerUniV3"; export { ZetaTokenConsumerUniV3__factory } from "./factories/contracts/ZetaTokenConsumerUniV3.strategy.sol/ZetaTokenConsumerUniV3__factory"; export type { ZetaTokenConsumerUniV3Errors } from "./contracts/ZetaTokenConsumerUniV3.strategy.sol/ZetaTokenConsumerUniV3Errors"; diff --git a/packages/protocol-contracts/contracts/Zeta.non-eth.sol b/packages/protocol-contracts/contracts/Zeta.non-eth.sol index bd354bbf..5ae786d8 100644 --- a/packages/protocol-contracts/contracts/Zeta.non-eth.sol +++ b/packages/protocol-contracts/contracts/Zeta.non-eth.sol @@ -49,11 +49,7 @@ contract ZetaNonEth is ZetaNonEthInterface, ERC20Burnable, ZetaErrors { tssAddressUpdater = tssAddress; } - function mint( - address mintee, - uint256 value, - bytes32 internalSendHash - ) external override { + function mint(address mintee, uint256 value, bytes32 internalSendHash) external override { /** * @dev Only Connector can mint. Minting requires burning the equivalent amount on another chain */ diff --git a/packages/protocol-contracts/contracts/ZetaConnector.base.sol b/packages/protocol-contracts/contracts/ZetaConnector.base.sol index 4258e223..3e848ac3 100644 --- a/packages/protocol-contracts/contracts/ZetaConnector.base.sol +++ b/packages/protocol-contracts/contracts/ZetaConnector.base.sol @@ -53,19 +53,14 @@ contract ZetaConnectorBase is ConnectorErrors, Pausable { event PauserAddressUpdated(address updaterAddress, address newTssAddress); - constructor( - address zetaToken_, - address tssAddress_, - address tssAddressUpdater_, - address pauserAddress_ - ) { + constructor(address zetaToken_, address tssAddress_, address tssAddressUpdater_, address pauserAddress_) { if ( zetaToken_ == address(0) || tssAddress_ == address(0) || tssAddressUpdater_ == address(0) || pauserAddress_ == address(0) ) { - revert InvalidAddress(); + revert ZetaCommonErrors.InvalidAddress(); } zetaToken = zetaToken_; @@ -90,7 +85,7 @@ contract ZetaConnectorBase is ConnectorErrors, Pausable { } function updatePauserAddress(address pauserAddress_) external onlyPauser { - if (pauserAddress_ == address(0)) revert InvalidAddress(); + if (pauserAddress_ == address(0)) revert ZetaCommonErrors.InvalidAddress(); pauserAddress = pauserAddress_; @@ -99,7 +94,7 @@ contract ZetaConnectorBase is ConnectorErrors, Pausable { function updateTssAddress(address tssAddress_) external { if (msg.sender != tssAddress && msg.sender != tssAddressUpdater) revert CallerIsNotTssOrUpdater(msg.sender); - if (tssAddress_ == address(0)) revert InvalidAddress(); + if (tssAddress_ == address(0)) revert ZetaCommonErrors.InvalidAddress(); tssAddress = tssAddress_; @@ -110,7 +105,7 @@ contract ZetaConnectorBase is ConnectorErrors, Pausable { * @dev Changes the ownership of tssAddressUpdater to be the one held by the Zeta blockchain TSS nodes. */ function renounceTssAddressUpdater() external onlyTssUpdater { - if (tssAddress == address(0)) revert InvalidAddress(); + if (tssAddress == address(0)) revert ZetaCommonErrors.InvalidAddress(); tssAddressUpdater = tssAddress; } diff --git a/packages/protocol-contracts/contracts/ZetaInteractor.sol b/packages/protocol-contracts/contracts/ZetaInteractor.sol index 995474c3..bed6a780 100644 --- a/packages/protocol-contracts/contracts/ZetaInteractor.sol +++ b/packages/protocol-contracts/contracts/ZetaInteractor.sol @@ -35,6 +35,7 @@ abstract contract ZetaInteractor is Ownable2Step, ZetaInteractorErrors { } constructor(address zetaConnectorAddress) { + if (zetaConnectorAddress == address(0)) revert ZetaCommonErrors.InvalidAddress(); currentChainId = block.chainid; connector = ZetaConnector(zetaConnectorAddress); } diff --git a/packages/protocol-contracts/contracts/ZetaTokenConsumerTrident.strategy.sol b/packages/protocol-contracts/contracts/ZetaTokenConsumerTrident.strategy.sol index ce92ecbf..0c4c38d0 100644 --- a/packages/protocol-contracts/contracts/ZetaTokenConsumerTrident.strategy.sol +++ b/packages/protocol-contracts/contracts/ZetaTokenConsumerTrident.strategy.sol @@ -10,8 +10,6 @@ import "./interfaces/TridentConcentratedLiquidityPoolFactory.sol"; import "./interfaces/TridentIPoolRouter.sol"; interface ZetaTokenConsumerTridentErrors { - error InvalidAddress(); - error InputCantBeZero(); error ErrorSendingETH(); @@ -44,18 +42,13 @@ contract ZetaTokenConsumerTrident is ZetaTokenConsumer, ZetaTokenConsumerTrident bool internal _locked; - constructor( - address zetaToken_, - address uniswapV3Router_, - address WETH9Address_, - address poolFactory_ - ) { + constructor(address zetaToken_, address uniswapV3Router_, address WETH9Address_, address poolFactory_) { if ( zetaToken_ == address(0) || uniswapV3Router_ == address(0) || WETH9Address_ == address(0) || poolFactory_ == address(0) - ) revert InvalidAddress(); + ) revert ZetaCommonErrors.InvalidAddress(); zetaToken = zetaToken_; tridentRouter = IPoolRouter(uniswapV3Router_); @@ -78,13 +71,11 @@ contract ZetaTokenConsumerTrident is ZetaTokenConsumer, ZetaTokenConsumerTrident return (token1, token0); } - function getZetaFromEth(address destinationAddress, uint256 minAmountOut) - external - payable - override - returns (uint256) - { - if (destinationAddress == address(0)) revert InvalidAddress(); + function getZetaFromEth( + address destinationAddress, + uint256 minAmountOut + ) external payable override returns (uint256) { + if (destinationAddress == address(0)) revert ZetaCommonErrors.InvalidAddress(); if (msg.value == 0) revert InputCantBeZero(); (address token0, address token1) = getPair(WETH9Address, zetaToken); @@ -111,7 +102,7 @@ contract ZetaTokenConsumerTrident is ZetaTokenConsumer, ZetaTokenConsumerTrident address inputToken, uint256 inputTokenAmount ) external override returns (uint256) { - if (destinationAddress == address(0) || inputToken == address(0)) revert InvalidAddress(); + if (destinationAddress == address(0) || inputToken == address(0)) revert ZetaCommonErrors.InvalidAddress(); if (inputTokenAmount == 0) revert InputCantBeZero(); IERC20(inputToken).safeTransferFrom(msg.sender, address(this), inputTokenAmount); @@ -147,7 +138,7 @@ contract ZetaTokenConsumerTrident is ZetaTokenConsumer, ZetaTokenConsumerTrident uint256 minAmountOut, uint256 zetaTokenAmount ) external override returns (uint256) { - if (destinationAddress == address(0)) revert InvalidAddress(); + if (destinationAddress == address(0)) revert ZetaCommonErrors.InvalidAddress(); if (zetaTokenAmount == 0) revert InputCantBeZero(); IERC20(zetaToken).safeTransferFrom(msg.sender, address(this), zetaTokenAmount); @@ -178,7 +169,7 @@ contract ZetaTokenConsumerTrident is ZetaTokenConsumer, ZetaTokenConsumerTrident address outputToken, uint256 zetaTokenAmount ) external override nonReentrant returns (uint256) { - if (destinationAddress == address(0) || outputToken == address(0)) revert InvalidAddress(); + if (destinationAddress == address(0) || outputToken == address(0)) revert ZetaCommonErrors.InvalidAddress(); if (zetaTokenAmount == 0) revert InputCantBeZero(); IERC20(zetaToken).safeTransferFrom(msg.sender, address(this), zetaTokenAmount); diff --git a/packages/protocol-contracts/contracts/ZetaTokenConsumerUniV2.strategy.sol b/packages/protocol-contracts/contracts/ZetaTokenConsumerUniV2.strategy.sol index fa3c96ca..50e18202 100644 --- a/packages/protocol-contracts/contracts/ZetaTokenConsumerUniV2.strategy.sol +++ b/packages/protocol-contracts/contracts/ZetaTokenConsumerUniV2.strategy.sol @@ -8,8 +8,6 @@ import "@uniswap/v2-periphery/contracts/interfaces/IUniswapV2Router02.sol"; import "./interfaces/ZetaInterfaces.sol"; interface ZetaTokenConsumerUniV2Errors { - error InvalidAddress(); - error InputCantBeZero(); } @@ -26,20 +24,18 @@ contract ZetaTokenConsumerUniV2 is ZetaTokenConsumer, ZetaTokenConsumerUniV2Erro IUniswapV2Router02 internal immutable uniswapV2Router; constructor(address zetaToken_, address uniswapV2Router_) { - if (zetaToken_ == address(0) || uniswapV2Router_ == address(0)) revert InvalidAddress(); + if (zetaToken_ == address(0) || uniswapV2Router_ == address(0)) revert ZetaCommonErrors.InvalidAddress(); zetaToken = zetaToken_; uniswapV2Router = IUniswapV2Router02(uniswapV2Router_); wETH = IUniswapV2Router02(uniswapV2Router_).WETH(); } - function getZetaFromEth(address destinationAddress, uint256 minAmountOut) - external - payable - override - returns (uint256) - { - if (destinationAddress == address(0)) revert InvalidAddress(); + function getZetaFromEth( + address destinationAddress, + uint256 minAmountOut + ) external payable override returns (uint256) { + if (destinationAddress == address(0)) revert ZetaCommonErrors.InvalidAddress(); if (msg.value == 0) revert InputCantBeZero(); address[] memory path = new address[](2); @@ -65,7 +61,7 @@ contract ZetaTokenConsumerUniV2 is ZetaTokenConsumer, ZetaTokenConsumerUniV2Erro address inputToken, uint256 inputTokenAmount ) external override returns (uint256) { - if (destinationAddress == address(0) || inputToken == address(0)) revert InvalidAddress(); + if (destinationAddress == address(0) || inputToken == address(0)) revert ZetaCommonErrors.InvalidAddress(); if (inputTokenAmount == 0) revert InputCantBeZero(); IERC20(inputToken).safeTransferFrom(msg.sender, address(this), inputTokenAmount); @@ -101,7 +97,7 @@ contract ZetaTokenConsumerUniV2 is ZetaTokenConsumer, ZetaTokenConsumerUniV2Erro uint256 minAmountOut, uint256 zetaTokenAmount ) external override returns (uint256) { - if (destinationAddress == address(0)) revert InvalidAddress(); + if (destinationAddress == address(0)) revert ZetaCommonErrors.InvalidAddress(); if (zetaTokenAmount == 0) revert InputCantBeZero(); IERC20(zetaToken).safeTransferFrom(msg.sender, address(this), zetaTokenAmount); @@ -131,7 +127,7 @@ contract ZetaTokenConsumerUniV2 is ZetaTokenConsumer, ZetaTokenConsumerUniV2Erro address outputToken, uint256 zetaTokenAmount ) external override returns (uint256) { - if (destinationAddress == address(0) || outputToken == address(0)) revert InvalidAddress(); + if (destinationAddress == address(0) || outputToken == address(0)) revert ZetaCommonErrors.InvalidAddress(); if (zetaTokenAmount == 0) revert InputCantBeZero(); IERC20(zetaToken).safeTransferFrom(msg.sender, address(this), zetaTokenAmount); diff --git a/packages/protocol-contracts/contracts/ZetaTokenConsumerUniV3.strategy.sol b/packages/protocol-contracts/contracts/ZetaTokenConsumerUniV3.strategy.sol index 57c75420..2b82db2c 100644 --- a/packages/protocol-contracts/contracts/ZetaTokenConsumerUniV3.strategy.sol +++ b/packages/protocol-contracts/contracts/ZetaTokenConsumerUniV3.strategy.sol @@ -9,8 +9,6 @@ import "@uniswap/v3-periphery/contracts/interfaces/IQuoter.sol"; import "./interfaces/ZetaInterfaces.sol"; interface ZetaTokenConsumerUniV3Errors { - error InvalidAddress(); - error InputCantBeZero(); error ErrorSendingETH(); @@ -53,7 +51,7 @@ contract ZetaTokenConsumerUniV3 is ZetaTokenConsumer, ZetaTokenConsumerUniV3Erro uniswapV3Router_ == address(0) || quoter_ == address(0) || WETH9Address_ == address(0) - ) revert InvalidAddress(); + ) revert ZetaCommonErrors.InvalidAddress(); zetaToken = zetaToken_; uniswapV3Router = ISwapRouter(uniswapV3Router_); @@ -72,13 +70,11 @@ contract ZetaTokenConsumerUniV3 is ZetaTokenConsumer, ZetaTokenConsumerUniV3Erro receive() external payable {} - function getZetaFromEth(address destinationAddress, uint256 minAmountOut) - external - payable - override - returns (uint256) - { - if (destinationAddress == address(0)) revert InvalidAddress(); + function getZetaFromEth( + address destinationAddress, + uint256 minAmountOut + ) external payable override returns (uint256) { + if (destinationAddress == address(0)) revert ZetaCommonErrors.InvalidAddress(); if (msg.value == 0) revert InputCantBeZero(); ISwapRouter.ExactInputSingleParams memory params = ISwapRouter.ExactInputSingleParams({ @@ -104,7 +100,7 @@ contract ZetaTokenConsumerUniV3 is ZetaTokenConsumer, ZetaTokenConsumerUniV3Erro address inputToken, uint256 inputTokenAmount ) external override returns (uint256) { - if (destinationAddress == address(0) || inputToken == address(0)) revert InvalidAddress(); + if (destinationAddress == address(0) || inputToken == address(0)) revert ZetaCommonErrors.InvalidAddress(); if (inputTokenAmount == 0) revert InputCantBeZero(); IERC20(inputToken).safeTransferFrom(msg.sender, address(this), inputTokenAmount); @@ -129,7 +125,7 @@ contract ZetaTokenConsumerUniV3 is ZetaTokenConsumer, ZetaTokenConsumerUniV3Erro uint256 minAmountOut, uint256 zetaTokenAmount ) external override returns (uint256) { - if (destinationAddress == address(0)) revert InvalidAddress(); + if (destinationAddress == address(0)) revert ZetaCommonErrors.InvalidAddress(); if (zetaTokenAmount == 0) revert InputCantBeZero(); IERC20(zetaToken).safeTransferFrom(msg.sender, address(this), zetaTokenAmount); @@ -164,7 +160,7 @@ contract ZetaTokenConsumerUniV3 is ZetaTokenConsumer, ZetaTokenConsumerUniV3Erro address outputToken, uint256 zetaTokenAmount ) external override nonReentrant returns (uint256) { - if (destinationAddress == address(0) || outputToken == address(0)) revert InvalidAddress(); + if (destinationAddress == address(0) || outputToken == address(0)) revert ZetaCommonErrors.InvalidAddress(); if (zetaTokenAmount == 0) revert InputCantBeZero(); IERC20(zetaToken).safeTransferFrom(msg.sender, address(this), zetaTokenAmount); diff --git a/packages/protocol-contracts/contracts/interfaces/ConnectorErrors.sol b/packages/protocol-contracts/contracts/interfaces/ConnectorErrors.sol index 370b50af..88232c08 100644 --- a/packages/protocol-contracts/contracts/interfaces/ConnectorErrors.sol +++ b/packages/protocol-contracts/contracts/interfaces/ConnectorErrors.sol @@ -10,8 +10,6 @@ interface ConnectorErrors { error CallerIsNotTssOrUpdater(address caller); - error InvalidAddress(); - error ZetaTransferError(); error ExceedsMaxSupply(uint256 maxSupply); diff --git a/packages/protocol-contracts/contracts/interfaces/ZetaInterfaces.sol b/packages/protocol-contracts/contracts/interfaces/ZetaInterfaces.sol index ce46579e..d078d6d0 100644 --- a/packages/protocol-contracts/contracts/interfaces/ZetaInterfaces.sol +++ b/packages/protocol-contracts/contracts/interfaces/ZetaInterfaces.sol @@ -102,3 +102,7 @@ interface ZetaTokenConsumer { uint256 zetaTokenAmount ) external returns (uint256); } + +interface ZetaCommonErrors { + error InvalidAddress(); +} diff --git a/packages/protocol-contracts/test/ZetaInteractor.spec.ts b/packages/protocol-contracts/test/ZetaInteractor.spec.ts index 3e6c52fa..73a27cb9 100644 --- a/packages/protocol-contracts/test/ZetaInteractor.spec.ts +++ b/packages/protocol-contracts/test/ZetaInteractor.spec.ts @@ -1,5 +1,5 @@ import { SignerWithAddress } from "@nomiclabs/hardhat-ethers/signers"; -import { ZetaInteractorMock } from "@zetachain/interfaces/typechain-types"; +import { ZetaInteractorMock, ZetaInteractorMock__factory } from "@zetachain/interfaces/typechain-types"; import chai, { expect } from "chai"; import { ethers } from "hardhat"; @@ -30,6 +30,27 @@ describe("ZetaInteractor tests", () => { await (await zetaInteractorMock.setInteractorByChainId(chainBId, encodedCrossChainAddressB)).wait(); }); + describe("onCreate", () => { + it("Should revert if constructor param is zero address", async () => { + const Factory = await ethers.getContractFactory("ZetaInteractorMock"); + await expect(Factory.deploy(ethers.constants.AddressZero)).to.be.revertedWith( + getCustomErrorMessage("InvalidAddress") + ); + }); + + it("Should revert if the zetaTxSenderAddress it not in interactorsByChainId", async () => { + await expect( + zetaInteractorMock.connect(zetaConnector).onZetaMessage({ + destinationAddress: crossChainContractB.address, + message: encoder.encode(["address"], [crossChainContractB.address]), + sourceChainId: chainBId, + zetaTxSenderAddress: ethers.utils.solidityPack(["address"], [zetaInteractorMock.address]), + zetaValue: 0 + }) + ).to.be.revertedWith(getCustomErrorMessage("InvalidZetaMessageCall")); + }); + }); + describe("onZetaMessage", () => { it("Should revert if the caller is not ZetaConnector", async () => { await expect( diff --git a/packages/zevm-contracts/contracts/zeta-swap/ZetaCurveSwapDemo.sol b/packages/zevm-contracts/contracts/zeta-swap/ZetaCurveSwapDemo.sol index 3b63c686..c1eb997e 100644 --- a/packages/zevm-contracts/contracts/zeta-swap/ZetaCurveSwapDemo.sol +++ b/packages/zevm-contracts/contracts/zeta-swap/ZetaCurveSwapDemo.sol @@ -5,19 +5,15 @@ import "../interfaces/IZRC20.sol"; import "../interfaces/zContract.sol"; interface ICRV3 { - function exchange( - uint256 i, - uint256 j, - uint256 dx, - uint256 min_dy, - bool use_eth - ) external returns (uint256); + function exchange(uint256 i, uint256 j, uint256 dx, uint256 min_dy, bool use_eth) external returns (uint256); } interface ZetaCurveSwapErrors { error WrongGasContract(); error NotEnoughToPayGasFee(); + + error InvalidAddress(); } contract ZetaCurveSwapDemo is zContract, ZetaCurveSwapErrors { @@ -25,15 +21,13 @@ contract ZetaCurveSwapDemo is zContract, ZetaCurveSwapErrors { address[3] public crvZRC20s; constructor(address crv3pool_, address[3] memory ZRC20s_) { + if (crv3pool_ == address(0) || ZRC20s_[0] == address(0) || ZRC20s_[1] == address(0) || ZRC20s_[2] == address(0)) + revert InvalidAddress(); crv3pool = crv3pool_; crvZRC20s = ZRC20s_; } - function encode( - address zrc20, - address recipient, - uint256 minAmountOut - ) public pure returns (bytes memory) { + function encode(address zrc20, address recipient, uint256 minAmountOut) public pure returns (bytes memory) { return abi.encode(zrc20, recipient, minAmountOut); } @@ -46,11 +40,7 @@ contract ZetaCurveSwapDemo is zContract, ZetaCurveSwapErrors { return 18; } - function _doWithdrawal( - address targetZRC20, - uint256 amount, - bytes32 receipient - ) private { + function _doWithdrawal(address targetZRC20, uint256 amount, bytes32 receipient) private { (address gasZRC20, uint256 gasFee) = IZRC20(targetZRC20).withdrawGasFee(); if (gasZRC20 != targetZRC20) revert WrongGasContract(); @@ -60,11 +50,7 @@ contract ZetaCurveSwapDemo is zContract, ZetaCurveSwapErrors { IZRC20(targetZRC20).withdraw(abi.encodePacked(receipient), amount - gasFee); } - function onCrossChainCall( - address zrc20, - uint256 amount, - bytes calldata message - ) external override { + function onCrossChainCall(address zrc20, uint256 amount, bytes calldata message) external override { (address targetZRC20, bytes32 receipient, ) = abi.decode(message, (address, bytes32, uint256)); address[] memory path = new address[](2); diff --git a/packages/zevm-contracts/contracts/zeta-swap/ZetaSwap.sol b/packages/zevm-contracts/contracts/zeta-swap/ZetaSwap.sol index b37c4cc7..8133dcc7 100644 --- a/packages/zevm-contracts/contracts/zeta-swap/ZetaSwap.sol +++ b/packages/zevm-contracts/contracts/zeta-swap/ZetaSwap.sol @@ -25,6 +25,8 @@ contract ZetaSwap is zContract, ZetaSwapErrors { address public immutable uniswapV2Router; constructor(address zetaToken_, address uniswapV2Factory_, address uniswapV2Router_) { + if (zetaToken_ == address(0) || uniswapV2Factory_ == address(0) || uniswapV2Router_ == address(0)) + revert CantBeZeroAddress(); zetaToken = zetaToken_; uniswapV2Factory = uniswapV2Factory_; uniswapV2Router = uniswapV2Router_; From a4c2aba3e325d8950847e7ec101e39e42f3d2a25 Mon Sep 17 00:00:00 2001 From: Andres Martin Aiello <50411235+andresaiello@users.noreply.github.com> Date: Wed, 25 Jan 2023 13:34:14 -0300 Subject: [PATCH 053/115] Fix dependa bot alerts: Upgrade oz contracts (#64) --- .../test/CrossChainWarriors.spec.ts | 4 +- .../draft-IERC20Permit.sol/IERC20Permit.json | 77 ++++++ .../draft-IERC20Permit.sol/IERC20Permit.ts | 177 ++++++++++++++ .../draft-IERC20Permit.sol/index.ts | 4 + .../contracts/token/ERC20/extensions/index.ts | 2 + .../contracts/ImmutableCreate2Factory.ts | 227 ------------------ .../contracts/token/ERC20/ERC20__factory.ts | 2 +- .../IERC20Permit__factory.ts | 101 ++++++++ .../draft-IERC20Permit.sol/index.ts | 4 + .../contracts/token/ERC20/extensions/index.ts | 1 + .../ImmutableCreate2Factory__factory.ts | 154 ------------ .../Zeta.eth.sol/ZetaEth__factory.ts | 2 +- .../Zeta.non-eth.sol/ZetaNonEth__factory.ts | 2 +- .../ZetaConnectorBase__factory.ts | 2 +- .../ZetaConnectorEth__factory.ts | 2 +- .../ZetaConnectorNonEth__factory.ts | 2 +- .../ZetaTokenConsumerTrident__factory.ts | 2 +- .../ZetaTokenConsumerUniV2__factory.ts | 2 +- .../ZetaTokenConsumerUniV3__factory.ts | 2 +- .../testing/ZetaInteractorMock__factory.ts | 2 +- .../interfaces/typechain-types/hardhat.d.ts | 9 + packages/interfaces/typechain-types/index.ts | 2 + 22 files changed, 388 insertions(+), 394 deletions(-) create mode 100644 packages/interfaces/abi/json/@openzeppelin/contracts/token/ERC20/extensions/draft-IERC20Permit.sol/IERC20Permit.json create mode 100644 packages/interfaces/typechain-types/@openzeppelin/contracts/token/ERC20/extensions/draft-IERC20Permit.sol/IERC20Permit.ts create mode 100644 packages/interfaces/typechain-types/@openzeppelin/contracts/token/ERC20/extensions/draft-IERC20Permit.sol/index.ts delete mode 100644 packages/interfaces/typechain-types/contracts/ImmutableCreate2Factory.ts create mode 100644 packages/interfaces/typechain-types/factories/@openzeppelin/contracts/token/ERC20/extensions/draft-IERC20Permit.sol/IERC20Permit__factory.ts create mode 100644 packages/interfaces/typechain-types/factories/@openzeppelin/contracts/token/ERC20/extensions/draft-IERC20Permit.sol/index.ts delete mode 100644 packages/interfaces/typechain-types/factories/contracts/ImmutableCreate2Factory__factory.ts diff --git a/packages/example-contracts/test/CrossChainWarriors.spec.ts b/packages/example-contracts/test/CrossChainWarriors.spec.ts index cd6f6e0f..01c2dae5 100644 --- a/packages/example-contracts/test/CrossChainWarriors.spec.ts +++ b/packages/example-contracts/test/CrossChainWarriors.spec.ts @@ -279,9 +279,7 @@ describe("CrossChainWarriors tests", () => { ).wait(); // Make sure that the NFT was removed from the source chain - await expect(crossChainWarriorsContractChainA.ownerOf(nftId)).to.be.revertedWith( - "ERC721: owner query for nonexistent token" - ); + await expect(crossChainWarriorsContractChainA.ownerOf(nftId)).to.be.revertedWith("ERC721: invalid token ID"); const messageType = await crossChainWarriorsContractChainA.CROSS_CHAIN_TRANSFER_MESSAGE(); diff --git a/packages/interfaces/abi/json/@openzeppelin/contracts/token/ERC20/extensions/draft-IERC20Permit.sol/IERC20Permit.json b/packages/interfaces/abi/json/@openzeppelin/contracts/token/ERC20/extensions/draft-IERC20Permit.sol/IERC20Permit.json new file mode 100644 index 00000000..5e412778 --- /dev/null +++ b/packages/interfaces/abi/json/@openzeppelin/contracts/token/ERC20/extensions/draft-IERC20Permit.sol/IERC20Permit.json @@ -0,0 +1,77 @@ +[ + { + "inputs": [], + "name": "DOMAIN_SEPARATOR", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "nonces", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "deadline", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "v", + "type": "uint8" + }, + { + "internalType": "bytes32", + "name": "r", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "s", + "type": "bytes32" + } + ], + "name": "permit", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } +] diff --git a/packages/interfaces/typechain-types/@openzeppelin/contracts/token/ERC20/extensions/draft-IERC20Permit.sol/IERC20Permit.ts b/packages/interfaces/typechain-types/@openzeppelin/contracts/token/ERC20/extensions/draft-IERC20Permit.sol/IERC20Permit.ts new file mode 100644 index 00000000..2cec857b --- /dev/null +++ b/packages/interfaces/typechain-types/@openzeppelin/contracts/token/ERC20/extensions/draft-IERC20Permit.sol/IERC20Permit.ts @@ -0,0 +1,177 @@ +/* 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, +} from "../../../../../../common"; + +export interface IERC20PermitInterface extends utils.Interface { + functions: { + "DOMAIN_SEPARATOR()": FunctionFragment; + "nonces(address)": FunctionFragment; + "permit(address,address,uint256,uint256,uint8,bytes32,bytes32)": FunctionFragment; + }; + + getFunction( + nameOrSignatureOrTopic: "DOMAIN_SEPARATOR" | "nonces" | "permit" + ): FunctionFragment; + + encodeFunctionData( + functionFragment: "DOMAIN_SEPARATOR", + values?: undefined + ): string; + encodeFunctionData(functionFragment: "nonces", values: [string]): string; + encodeFunctionData( + functionFragment: "permit", + values: [ + string, + string, + BigNumberish, + BigNumberish, + BigNumberish, + BytesLike, + BytesLike + ] + ): string; + + decodeFunctionResult( + functionFragment: "DOMAIN_SEPARATOR", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "nonces", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "permit", data: BytesLike): Result; + + events: {}; +} + +export interface IERC20Permit extends BaseContract { + connect(signerOrProvider: Signer | Provider | string): this; + attach(addressOrName: string): this; + deployed(): Promise; + + interface: IERC20PermitInterface; + + 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: { + DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise<[string]>; + + nonces(owner: string, overrides?: CallOverrides): Promise<[BigNumber]>; + + permit( + owner: string, + spender: string, + value: BigNumberish, + deadline: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + }; + + DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise; + + nonces(owner: string, overrides?: CallOverrides): Promise; + + permit( + owner: string, + spender: string, + value: BigNumberish, + deadline: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + callStatic: { + DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise; + + nonces(owner: string, overrides?: CallOverrides): Promise; + + permit( + owner: string, + spender: string, + value: BigNumberish, + deadline: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: CallOverrides + ): Promise; + }; + + filters: {}; + + estimateGas: { + DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise; + + nonces(owner: string, overrides?: CallOverrides): Promise; + + permit( + owner: string, + spender: string, + value: BigNumberish, + deadline: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + }; + + populateTransaction: { + DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise; + + nonces( + owner: string, + overrides?: CallOverrides + ): Promise; + + permit( + owner: string, + spender: string, + value: BigNumberish, + deadline: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + }; +} diff --git a/packages/interfaces/typechain-types/@openzeppelin/contracts/token/ERC20/extensions/draft-IERC20Permit.sol/index.ts b/packages/interfaces/typechain-types/@openzeppelin/contracts/token/ERC20/extensions/draft-IERC20Permit.sol/index.ts new file mode 100644 index 00000000..6673dc7d --- /dev/null +++ b/packages/interfaces/typechain-types/@openzeppelin/contracts/token/ERC20/extensions/draft-IERC20Permit.sol/index.ts @@ -0,0 +1,4 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +export type { IERC20Permit } from "./IERC20Permit"; diff --git a/packages/interfaces/typechain-types/@openzeppelin/contracts/token/ERC20/extensions/index.ts b/packages/interfaces/typechain-types/@openzeppelin/contracts/token/ERC20/extensions/index.ts index 96ee12e9..9c8ebc24 100644 --- a/packages/interfaces/typechain-types/@openzeppelin/contracts/token/ERC20/extensions/index.ts +++ b/packages/interfaces/typechain-types/@openzeppelin/contracts/token/ERC20/extensions/index.ts @@ -1,5 +1,7 @@ /* Autogenerated file. Do not edit manually. */ /* tslint:disable */ /* eslint-disable */ +import type * as draftIerc20PermitSol from "./draft-IERC20Permit.sol"; +export type { draftIerc20PermitSol }; export type { ERC20Burnable } from "./ERC20Burnable"; export type { IERC20Metadata } from "./IERC20Metadata"; diff --git a/packages/interfaces/typechain-types/contracts/ImmutableCreate2Factory.ts b/packages/interfaces/typechain-types/contracts/ImmutableCreate2Factory.ts deleted file mode 100644 index 70ca5354..00000000 --- a/packages/interfaces/typechain-types/contracts/ImmutableCreate2Factory.ts +++ /dev/null @@ -1,227 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ -import type { - BaseContract, - BigNumber, - BytesLike, - CallOverrides, - ContractTransaction, - PayableOverrides, - 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, -} from "../common"; - -export interface ImmutableCreate2FactoryInterface extends utils.Interface { - functions: { - "hasBeenDeployed(address)": FunctionFragment; - "safeCreate2(bytes32,bytes)": FunctionFragment; - "findCreate2Address(bytes32,bytes)": FunctionFragment; - "findCreate2AddressViaHash(bytes32,bytes32)": FunctionFragment; - }; - - getFunction( - nameOrSignatureOrTopic: - | "hasBeenDeployed" - | "safeCreate2" - | "findCreate2Address" - | "findCreate2AddressViaHash" - ): FunctionFragment; - - encodeFunctionData( - functionFragment: "hasBeenDeployed", - values: [string] - ): string; - encodeFunctionData( - functionFragment: "safeCreate2", - values: [BytesLike, BytesLike] - ): string; - encodeFunctionData( - functionFragment: "findCreate2Address", - values: [BytesLike, BytesLike] - ): string; - encodeFunctionData( - functionFragment: "findCreate2AddressViaHash", - values: [BytesLike, BytesLike] - ): string; - - decodeFunctionResult( - functionFragment: "hasBeenDeployed", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "safeCreate2", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "findCreate2Address", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "findCreate2AddressViaHash", - data: BytesLike - ): Result; - - events: {}; -} - -export interface ImmutableCreate2Factory extends BaseContract { - connect(signerOrProvider: Signer | Provider | string): this; - attach(addressOrName: string): this; - deployed(): Promise; - - interface: ImmutableCreate2FactoryInterface; - - 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: { - hasBeenDeployed( - deploymentAddress: string, - overrides?: CallOverrides - ): Promise<[boolean]>; - - safeCreate2( - salt: BytesLike, - initializationCode: BytesLike, - overrides?: PayableOverrides & { from?: string | Promise } - ): Promise; - - findCreate2Address( - salt: BytesLike, - initCode: BytesLike, - overrides?: CallOverrides - ): Promise<[string] & { deploymentAddress: string }>; - - findCreate2AddressViaHash( - salt: BytesLike, - initCodeHash: BytesLike, - overrides?: CallOverrides - ): Promise<[string] & { deploymentAddress: string }>; - }; - - hasBeenDeployed( - deploymentAddress: string, - overrides?: CallOverrides - ): Promise; - - safeCreate2( - salt: BytesLike, - initializationCode: BytesLike, - overrides?: PayableOverrides & { from?: string | Promise } - ): Promise; - - findCreate2Address( - salt: BytesLike, - initCode: BytesLike, - overrides?: CallOverrides - ): Promise; - - findCreate2AddressViaHash( - salt: BytesLike, - initCodeHash: BytesLike, - overrides?: CallOverrides - ): Promise; - - callStatic: { - hasBeenDeployed( - deploymentAddress: string, - overrides?: CallOverrides - ): Promise; - - safeCreate2( - salt: BytesLike, - initializationCode: BytesLike, - overrides?: CallOverrides - ): Promise; - - findCreate2Address( - salt: BytesLike, - initCode: BytesLike, - overrides?: CallOverrides - ): Promise; - - findCreate2AddressViaHash( - salt: BytesLike, - initCodeHash: BytesLike, - overrides?: CallOverrides - ): Promise; - }; - - filters: {}; - - estimateGas: { - hasBeenDeployed( - deploymentAddress: string, - overrides?: CallOverrides - ): Promise; - - safeCreate2( - salt: BytesLike, - initializationCode: BytesLike, - overrides?: PayableOverrides & { from?: string | Promise } - ): Promise; - - findCreate2Address( - salt: BytesLike, - initCode: BytesLike, - overrides?: CallOverrides - ): Promise; - - findCreate2AddressViaHash( - salt: BytesLike, - initCodeHash: BytesLike, - overrides?: CallOverrides - ): Promise; - }; - - populateTransaction: { - hasBeenDeployed( - deploymentAddress: string, - overrides?: CallOverrides - ): Promise; - - safeCreate2( - salt: BytesLike, - initializationCode: BytesLike, - overrides?: PayableOverrides & { from?: string | Promise } - ): Promise; - - findCreate2Address( - salt: BytesLike, - initCode: BytesLike, - overrides?: CallOverrides - ): Promise; - - findCreate2AddressViaHash( - salt: BytesLike, - initCodeHash: BytesLike, - overrides?: CallOverrides - ): Promise; - }; -} diff --git a/packages/interfaces/typechain-types/factories/@openzeppelin/contracts/token/ERC20/ERC20__factory.ts b/packages/interfaces/typechain-types/factories/@openzeppelin/contracts/token/ERC20/ERC20__factory.ts index ebe8fe78..f2d68109 100644 --- a/packages/interfaces/typechain-types/factories/@openzeppelin/contracts/token/ERC20/ERC20__factory.ts +++ b/packages/interfaces/typechain-types/factories/@openzeppelin/contracts/token/ERC20/ERC20__factory.ts @@ -298,7 +298,7 @@ const _abi = [ ]; const _bytecode = - "0x60806040523480156200001157600080fd5b50604051620016203803806200162083398181016040528101906200003791906200019f565b81600390805190602001906200004f92919062000071565b5080600490805190602001906200006892919062000071565b505050620003a8565b8280546200007f90620002b9565b90600052602060002090601f016020900481019282620000a35760008555620000ef565b82601f10620000be57805160ff1916838001178555620000ef565b82800160010185558215620000ef579182015b82811115620000ee578251825591602001919060010190620000d1565b5b509050620000fe919062000102565b5090565b5b808211156200011d57600081600090555060010162000103565b5090565b60006200013862000132846200024d565b62000224565b90508281526020810184848401111562000157576200015662000388565b5b6200016484828562000283565b509392505050565b600082601f83011262000184576200018362000383565b5b81516200019684826020860162000121565b91505092915050565b60008060408385031215620001b957620001b862000392565b5b600083015167ffffffffffffffff811115620001da57620001d96200038d565b5b620001e8858286016200016c565b925050602083015167ffffffffffffffff8111156200020c576200020b6200038d565b5b6200021a858286016200016c565b9150509250929050565b60006200023062000243565b90506200023e8282620002ef565b919050565b6000604051905090565b600067ffffffffffffffff8211156200026b576200026a62000354565b5b620002768262000397565b9050602081019050919050565b60005b83811015620002a357808201518184015260208101905062000286565b83811115620002b3576000848401525b50505050565b60006002820490506001821680620002d257607f821691505b60208210811415620002e957620002e862000325565b5b50919050565b620002fa8262000397565b810181811067ffffffffffffffff821117156200031c576200031b62000354565b5b80604052505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600080fd5b600080fd5b600080fd5b600080fd5b6000601f19601f8301169050919050565b61126880620003b86000396000f3fe608060405234801561001057600080fd5b50600436106100a95760003560e01c80633950935111610071578063395093511461016857806370a082311461019857806395d89b41146101c8578063a457c2d7146101e6578063a9059cbb14610216578063dd62ed3e14610246576100a9565b806306fdde03146100ae578063095ea7b3146100cc57806318160ddd146100fc57806323b872dd1461011a578063313ce5671461014a575b600080fd5b6100b6610276565b6040516100c39190610d29565b60405180910390f35b6100e660048036038101906100e19190610b73565b610308565b6040516100f39190610d0e565b60405180910390f35b61010461032b565b6040516101119190610e2b565b60405180910390f35b610134600480360381019061012f9190610b20565b610335565b6040516101419190610d0e565b60405180910390f35b610152610364565b60405161015f9190610e46565b60405180910390f35b610182600480360381019061017d9190610b73565b61036d565b60405161018f9190610d0e565b60405180910390f35b6101b260048036038101906101ad9190610ab3565b6103a4565b6040516101bf9190610e2b565b60405180910390f35b6101d06103ec565b6040516101dd9190610d29565b60405180910390f35b61020060048036038101906101fb9190610b73565b61047e565b60405161020d9190610d0e565b60405180910390f35b610230600480360381019061022b9190610b73565b6104f5565b60405161023d9190610d0e565b60405180910390f35b610260600480360381019061025b9190610ae0565b610518565b60405161026d9190610e2b565b60405180910390f35b60606003805461028590610f5b565b80601f01602080910402602001604051908101604052809291908181526020018280546102b190610f5b565b80156102fe5780601f106102d3576101008083540402835291602001916102fe565b820191906000526020600020905b8154815290600101906020018083116102e157829003601f168201915b5050505050905090565b60008061031361059f565b90506103208185856105a7565b600191505092915050565b6000600254905090565b60008061034061059f565b905061034d858285610772565b6103588585856107fe565b60019150509392505050565b60006012905090565b60008061037861059f565b905061039981858561038a8589610518565b6103949190610e7d565b6105a7565b600191505092915050565b60008060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b6060600480546103fb90610f5b565b80601f016020809104026020016040519081016040528092919081815260200182805461042790610f5b565b80156104745780601f1061044957610100808354040283529160200191610474565b820191906000526020600020905b81548152906001019060200180831161045757829003601f168201915b5050505050905090565b60008061048961059f565b905060006104978286610518565b9050838110156104dc576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016104d390610e0b565b60405180910390fd5b6104e982868684036105a7565b60019250505092915050565b60008061050061059f565b905061050d8185856107fe565b600191505092915050565b6000600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415610617576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161060e90610deb565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415610687576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161067e90610d6b565b60405180910390fd5b80600160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925836040516107659190610e2b565b60405180910390a3505050565b600061077e8484610518565b90507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff81146107f857818110156107ea576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016107e190610d8b565b60405180910390fd5b6107f784848484036105a7565b5b50505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16141561086e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161086590610dcb565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614156108de576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016108d590610d4b565b60405180910390fd5b6108e9838383610a7f565b60008060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205490508181101561096f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161096690610dab565b60405180910390fd5b8181036000808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550816000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254610a029190610e7d565b925050819055508273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef84604051610a669190610e2b565b60405180910390a3610a79848484610a84565b50505050565b505050565b505050565b600081359050610a9881611204565b92915050565b600081359050610aad8161121b565b92915050565b600060208284031215610ac957610ac8610feb565b5b6000610ad784828501610a89565b91505092915050565b60008060408385031215610af757610af6610feb565b5b6000610b0585828601610a89565b9250506020610b1685828601610a89565b9150509250929050565b600080600060608486031215610b3957610b38610feb565b5b6000610b4786828701610a89565b9350506020610b5886828701610a89565b9250506040610b6986828701610a9e565b9150509250925092565b60008060408385031215610b8a57610b89610feb565b5b6000610b9885828601610a89565b9250506020610ba985828601610a9e565b9150509250929050565b610bbc81610ee5565b82525050565b6000610bcd82610e61565b610bd78185610e6c565b9350610be7818560208601610f28565b610bf081610ff0565b840191505092915050565b6000610c08602383610e6c565b9150610c1382611001565b604082019050919050565b6000610c2b602283610e6c565b9150610c3682611050565b604082019050919050565b6000610c4e601d83610e6c565b9150610c598261109f565b602082019050919050565b6000610c71602683610e6c565b9150610c7c826110c8565b604082019050919050565b6000610c94602583610e6c565b9150610c9f82611117565b604082019050919050565b6000610cb7602483610e6c565b9150610cc282611166565b604082019050919050565b6000610cda602583610e6c565b9150610ce5826111b5565b604082019050919050565b610cf981610f11565b82525050565b610d0881610f1b565b82525050565b6000602082019050610d236000830184610bb3565b92915050565b60006020820190508181036000830152610d438184610bc2565b905092915050565b60006020820190508181036000830152610d6481610bfb565b9050919050565b60006020820190508181036000830152610d8481610c1e565b9050919050565b60006020820190508181036000830152610da481610c41565b9050919050565b60006020820190508181036000830152610dc481610c64565b9050919050565b60006020820190508181036000830152610de481610c87565b9050919050565b60006020820190508181036000830152610e0481610caa565b9050919050565b60006020820190508181036000830152610e2481610ccd565b9050919050565b6000602082019050610e406000830184610cf0565b92915050565b6000602082019050610e5b6000830184610cff565b92915050565b600081519050919050565b600082825260208201905092915050565b6000610e8882610f11565b9150610e9383610f11565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff03821115610ec857610ec7610f8d565b5b828201905092915050565b6000610ede82610ef1565b9050919050565b60008115159050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b600060ff82169050919050565b60005b83811015610f46578082015181840152602081019050610f2b565b83811115610f55576000848401525b50505050565b60006002820490506001821680610f7357607f821691505b60208210811415610f8757610f86610fbc565b5b50919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b600080fd5b6000601f19601f8301169050919050565b7f45524332303a207472616e7366657220746f20746865207a65726f206164647260008201527f6573730000000000000000000000000000000000000000000000000000000000602082015250565b7f45524332303a20617070726f766520746f20746865207a65726f20616464726560008201527f7373000000000000000000000000000000000000000000000000000000000000602082015250565b7f45524332303a20696e73756666696369656e7420616c6c6f77616e6365000000600082015250565b7f45524332303a207472616e7366657220616d6f756e742065786365656473206260008201527f616c616e63650000000000000000000000000000000000000000000000000000602082015250565b7f45524332303a207472616e736665722066726f6d20746865207a65726f20616460008201527f6472657373000000000000000000000000000000000000000000000000000000602082015250565b7f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460008201527f7265737300000000000000000000000000000000000000000000000000000000602082015250565b7f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f7760008201527f207a65726f000000000000000000000000000000000000000000000000000000602082015250565b61120d81610ed3565b811461121857600080fd5b50565b61122481610f11565b811461122f57600080fd5b5056fea2646970667358221220f812f72e4617ac1793217922d861ad44469876d78a78cf959b8249c39441c2b864736f6c63430008070033"; + "0x60806040523480156200001157600080fd5b50604051620016203803806200162083398181016040528101906200003791906200019f565b81600390805190602001906200004f92919062000071565b5080600490805190602001906200006892919062000071565b505050620003a8565b8280546200007f90620002b9565b90600052602060002090601f016020900481019282620000a35760008555620000ef565b82601f10620000be57805160ff1916838001178555620000ef565b82800160010185558215620000ef579182015b82811115620000ee578251825591602001919060010190620000d1565b5b509050620000fe919062000102565b5090565b5b808211156200011d57600081600090555060010162000103565b5090565b60006200013862000132846200024d565b62000224565b90508281526020810184848401111562000157576200015662000388565b5b6200016484828562000283565b509392505050565b600082601f83011262000184576200018362000383565b5b81516200019684826020860162000121565b91505092915050565b60008060408385031215620001b957620001b862000392565b5b600083015167ffffffffffffffff811115620001da57620001d96200038d565b5b620001e8858286016200016c565b925050602083015167ffffffffffffffff8111156200020c576200020b6200038d565b5b6200021a858286016200016c565b9150509250929050565b60006200023062000243565b90506200023e8282620002ef565b919050565b6000604051905090565b600067ffffffffffffffff8211156200026b576200026a62000354565b5b620002768262000397565b9050602081019050919050565b60005b83811015620002a357808201518184015260208101905062000286565b83811115620002b3576000848401525b50505050565b60006002820490506001821680620002d257607f821691505b60208210811415620002e957620002e862000325565b5b50919050565b620002fa8262000397565b810181811067ffffffffffffffff821117156200031c576200031b62000354565b5b80604052505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600080fd5b600080fd5b600080fd5b600080fd5b6000601f19601f8301169050919050565b61126880620003b86000396000f3fe608060405234801561001057600080fd5b50600436106100a95760003560e01c80633950935111610071578063395093511461016857806370a082311461019857806395d89b41146101c8578063a457c2d7146101e6578063a9059cbb14610216578063dd62ed3e14610246576100a9565b806306fdde03146100ae578063095ea7b3146100cc57806318160ddd146100fc57806323b872dd1461011a578063313ce5671461014a575b600080fd5b6100b6610276565b6040516100c39190610d29565b60405180910390f35b6100e660048036038101906100e19190610b73565b610308565b6040516100f39190610d0e565b60405180910390f35b61010461032b565b6040516101119190610e2b565b60405180910390f35b610134600480360381019061012f9190610b20565b610335565b6040516101419190610d0e565b60405180910390f35b610152610364565b60405161015f9190610e46565b60405180910390f35b610182600480360381019061017d9190610b73565b61036d565b60405161018f9190610d0e565b60405180910390f35b6101b260048036038101906101ad9190610ab3565b6103a4565b6040516101bf9190610e2b565b60405180910390f35b6101d06103ec565b6040516101dd9190610d29565b60405180910390f35b61020060048036038101906101fb9190610b73565b61047e565b60405161020d9190610d0e565b60405180910390f35b610230600480360381019061022b9190610b73565b6104f5565b60405161023d9190610d0e565b60405180910390f35b610260600480360381019061025b9190610ae0565b610518565b60405161026d9190610e2b565b60405180910390f35b60606003805461028590610f5b565b80601f01602080910402602001604051908101604052809291908181526020018280546102b190610f5b565b80156102fe5780601f106102d3576101008083540402835291602001916102fe565b820191906000526020600020905b8154815290600101906020018083116102e157829003601f168201915b5050505050905090565b60008061031361059f565b90506103208185856105a7565b600191505092915050565b6000600254905090565b60008061034061059f565b905061034d858285610772565b6103588585856107fe565b60019150509392505050565b60006012905090565b60008061037861059f565b905061039981858561038a8589610518565b6103949190610e7d565b6105a7565b600191505092915050565b60008060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b6060600480546103fb90610f5b565b80601f016020809104026020016040519081016040528092919081815260200182805461042790610f5b565b80156104745780601f1061044957610100808354040283529160200191610474565b820191906000526020600020905b81548152906001019060200180831161045757829003601f168201915b5050505050905090565b60008061048961059f565b905060006104978286610518565b9050838110156104dc576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016104d390610e0b565b60405180910390fd5b6104e982868684036105a7565b60019250505092915050565b60008061050061059f565b905061050d8185856107fe565b600191505092915050565b6000600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415610617576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161060e90610deb565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415610687576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161067e90610d6b565b60405180910390fd5b80600160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925836040516107659190610e2b565b60405180910390a3505050565b600061077e8484610518565b90507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff81146107f857818110156107ea576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016107e190610d8b565b60405180910390fd5b6107f784848484036105a7565b5b50505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16141561086e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161086590610dcb565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614156108de576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016108d590610d4b565b60405180910390fd5b6108e9838383610a7f565b60008060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205490508181101561096f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161096690610dab565b60405180910390fd5b8181036000808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550816000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254610a029190610e7d565b925050819055508273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef84604051610a669190610e2b565b60405180910390a3610a79848484610a84565b50505050565b505050565b505050565b600081359050610a9881611204565b92915050565b600081359050610aad8161121b565b92915050565b600060208284031215610ac957610ac8610feb565b5b6000610ad784828501610a89565b91505092915050565b60008060408385031215610af757610af6610feb565b5b6000610b0585828601610a89565b9250506020610b1685828601610a89565b9150509250929050565b600080600060608486031215610b3957610b38610feb565b5b6000610b4786828701610a89565b9350506020610b5886828701610a89565b9250506040610b6986828701610a9e565b9150509250925092565b60008060408385031215610b8a57610b89610feb565b5b6000610b9885828601610a89565b9250506020610ba985828601610a9e565b9150509250929050565b610bbc81610ee5565b82525050565b6000610bcd82610e61565b610bd78185610e6c565b9350610be7818560208601610f28565b610bf081610ff0565b840191505092915050565b6000610c08602383610e6c565b9150610c1382611001565b604082019050919050565b6000610c2b602283610e6c565b9150610c3682611050565b604082019050919050565b6000610c4e601d83610e6c565b9150610c598261109f565b602082019050919050565b6000610c71602683610e6c565b9150610c7c826110c8565b604082019050919050565b6000610c94602583610e6c565b9150610c9f82611117565b604082019050919050565b6000610cb7602483610e6c565b9150610cc282611166565b604082019050919050565b6000610cda602583610e6c565b9150610ce5826111b5565b604082019050919050565b610cf981610f11565b82525050565b610d0881610f1b565b82525050565b6000602082019050610d236000830184610bb3565b92915050565b60006020820190508181036000830152610d438184610bc2565b905092915050565b60006020820190508181036000830152610d6481610bfb565b9050919050565b60006020820190508181036000830152610d8481610c1e565b9050919050565b60006020820190508181036000830152610da481610c41565b9050919050565b60006020820190508181036000830152610dc481610c64565b9050919050565b60006020820190508181036000830152610de481610c87565b9050919050565b60006020820190508181036000830152610e0481610caa565b9050919050565b60006020820190508181036000830152610e2481610ccd565b9050919050565b6000602082019050610e406000830184610cf0565b92915050565b6000602082019050610e5b6000830184610cff565b92915050565b600081519050919050565b600082825260208201905092915050565b6000610e8882610f11565b9150610e9383610f11565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff03821115610ec857610ec7610f8d565b5b828201905092915050565b6000610ede82610ef1565b9050919050565b60008115159050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b600060ff82169050919050565b60005b83811015610f46578082015181840152602081019050610f2b565b83811115610f55576000848401525b50505050565b60006002820490506001821680610f7357607f821691505b60208210811415610f8757610f86610fbc565b5b50919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b600080fd5b6000601f19601f8301169050919050565b7f45524332303a207472616e7366657220746f20746865207a65726f206164647260008201527f6573730000000000000000000000000000000000000000000000000000000000602082015250565b7f45524332303a20617070726f766520746f20746865207a65726f20616464726560008201527f7373000000000000000000000000000000000000000000000000000000000000602082015250565b7f45524332303a20696e73756666696369656e7420616c6c6f77616e6365000000600082015250565b7f45524332303a207472616e7366657220616d6f756e742065786365656473206260008201527f616c616e63650000000000000000000000000000000000000000000000000000602082015250565b7f45524332303a207472616e736665722066726f6d20746865207a65726f20616460008201527f6472657373000000000000000000000000000000000000000000000000000000602082015250565b7f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460008201527f7265737300000000000000000000000000000000000000000000000000000000602082015250565b7f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f7760008201527f207a65726f000000000000000000000000000000000000000000000000000000602082015250565b61120d81610ed3565b811461121857600080fd5b50565b61122481610f11565b811461122f57600080fd5b5056fea264697066735822122021da860480863b748c7dae8d44db86f49371c52f302ea966ecdbcdffdeaba44764736f6c63430008070033"; type ERC20ConstructorParams = | [signer?: Signer] diff --git a/packages/interfaces/typechain-types/factories/@openzeppelin/contracts/token/ERC20/extensions/draft-IERC20Permit.sol/IERC20Permit__factory.ts b/packages/interfaces/typechain-types/factories/@openzeppelin/contracts/token/ERC20/extensions/draft-IERC20Permit.sol/IERC20Permit__factory.ts new file mode 100644 index 00000000..3c95eeca --- /dev/null +++ b/packages/interfaces/typechain-types/factories/@openzeppelin/contracts/token/ERC20/extensions/draft-IERC20Permit.sol/IERC20Permit__factory.ts @@ -0,0 +1,101 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ + +import { Contract, Signer, utils } from "ethers"; +import type { Provider } from "@ethersproject/providers"; +import type { + IERC20Permit, + IERC20PermitInterface, +} from "../../../../../../../@openzeppelin/contracts/token/ERC20/extensions/draft-IERC20Permit.sol/IERC20Permit"; + +const _abi = [ + { + inputs: [], + name: "DOMAIN_SEPARATOR", + outputs: [ + { + internalType: "bytes32", + name: "", + type: "bytes32", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "owner", + type: "address", + }, + ], + name: "nonces", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "owner", + type: "address", + }, + { + internalType: "address", + name: "spender", + type: "address", + }, + { + internalType: "uint256", + name: "value", + type: "uint256", + }, + { + internalType: "uint256", + name: "deadline", + type: "uint256", + }, + { + internalType: "uint8", + name: "v", + type: "uint8", + }, + { + internalType: "bytes32", + name: "r", + type: "bytes32", + }, + { + internalType: "bytes32", + name: "s", + type: "bytes32", + }, + ], + name: "permit", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, +]; + +export class IERC20Permit__factory { + static readonly abi = _abi; + static createInterface(): IERC20PermitInterface { + return new utils.Interface(_abi) as IERC20PermitInterface; + } + static connect( + address: string, + signerOrProvider: Signer | Provider + ): IERC20Permit { + return new Contract(address, _abi, signerOrProvider) as IERC20Permit; + } +} diff --git a/packages/interfaces/typechain-types/factories/@openzeppelin/contracts/token/ERC20/extensions/draft-IERC20Permit.sol/index.ts b/packages/interfaces/typechain-types/factories/@openzeppelin/contracts/token/ERC20/extensions/draft-IERC20Permit.sol/index.ts new file mode 100644 index 00000000..5f347d4a --- /dev/null +++ b/packages/interfaces/typechain-types/factories/@openzeppelin/contracts/token/ERC20/extensions/draft-IERC20Permit.sol/index.ts @@ -0,0 +1,4 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +export { IERC20Permit__factory } from "./IERC20Permit__factory"; diff --git a/packages/interfaces/typechain-types/factories/@openzeppelin/contracts/token/ERC20/extensions/index.ts b/packages/interfaces/typechain-types/factories/@openzeppelin/contracts/token/ERC20/extensions/index.ts index 3ddce532..463124cc 100644 --- a/packages/interfaces/typechain-types/factories/@openzeppelin/contracts/token/ERC20/extensions/index.ts +++ b/packages/interfaces/typechain-types/factories/@openzeppelin/contracts/token/ERC20/extensions/index.ts @@ -1,5 +1,6 @@ /* Autogenerated file. Do not edit manually. */ /* tslint:disable */ /* eslint-disable */ +export * as draftIerc20PermitSol from "./draft-IERC20Permit.sol"; export { ERC20Burnable__factory } from "./ERC20Burnable__factory"; export { IERC20Metadata__factory } from "./IERC20Metadata__factory"; diff --git a/packages/interfaces/typechain-types/factories/contracts/ImmutableCreate2Factory__factory.ts b/packages/interfaces/typechain-types/factories/contracts/ImmutableCreate2Factory__factory.ts deleted file mode 100644 index 6e99592e..00000000 --- a/packages/interfaces/typechain-types/factories/contracts/ImmutableCreate2Factory__factory.ts +++ /dev/null @@ -1,154 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ -import { Signer, utils, Contract, ContractFactory, Overrides } from "ethers"; -import type { Provider, TransactionRequest } from "@ethersproject/providers"; -import type { - ImmutableCreate2Factory, - ImmutableCreate2FactoryInterface, -} from "../../contracts/ImmutableCreate2Factory"; - -const _abi = [ - { - constant: true, - inputs: [ - { - name: "deploymentAddress", - type: "address", - }, - ], - name: "hasBeenDeployed", - outputs: [ - { - name: "", - type: "bool", - }, - ], - payable: false, - stateMutability: "view", - type: "function", - }, - { - constant: false, - inputs: [ - { - name: "salt", - type: "bytes32", - }, - { - name: "initializationCode", - type: "bytes", - }, - ], - name: "safeCreate2", - outputs: [ - { - name: "deploymentAddress", - type: "address", - }, - ], - payable: true, - stateMutability: "payable", - type: "function", - }, - { - constant: true, - inputs: [ - { - name: "salt", - type: "bytes32", - }, - { - name: "initCode", - type: "bytes", - }, - ], - name: "findCreate2Address", - outputs: [ - { - name: "deploymentAddress", - type: "address", - }, - ], - payable: false, - stateMutability: "view", - type: "function", - }, - { - constant: true, - inputs: [ - { - name: "salt", - type: "bytes32", - }, - { - name: "initCodeHash", - type: "bytes32", - }, - ], - name: "findCreate2AddressViaHash", - outputs: [ - { - name: "deploymentAddress", - type: "address", - }, - ], - payable: false, - stateMutability: "view", - type: "function", - }, -]; - -const _bytecode = - "0x608060405234801561001057600080fd5b506109d0806100206000396000f3fe60806040526004361061003f5760003560e01c806308508b8f1461004457806364e03087146100ad57806385cf97ab14610170578063a49a7c9014610240575b600080fd5b34801561005057600080fd5b506100936004803603602081101561006757600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506102c5565b604051808215151515815260200191505060405180910390f35b61012e600480360360408110156100c357600080fd5b8101908080359060200190929190803590602001906401000000008111156100ea57600080fd5b8201836020820111156100fc57600080fd5b8035906020019184600183028401116401000000008311171561011e57600080fd5b909192939192939050505061031a565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561017c57600080fd5b506101fe6004803603604081101561019357600080fd5b8101908080359060200190929190803590602001906401000000008111156101ba57600080fd5b8201836020820111156101cc57600080fd5b803590602001918460018302840111640100000000831117156101ee57600080fd5b90919293919293905050506106b5565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561024c57600080fd5b506102836004803603604081101561026357600080fd5b8101908080359060200190929190803590602001909291905050506107db565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b60008060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff169050919050565b6000833373ffffffffffffffffffffffffffffffffffffffff168160601c73ffffffffffffffffffffffffffffffffffffffff16148061037b5750600060601b6bffffffffffffffffffffffff1916816bffffffffffffffffffffffff1916145b6103d0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260458152602001806109116045913960600191505060405180910390fd5b606084848080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f82011690508083019250505050505050905060003087836040516020018082805190602001908083835b602083106104545780518252602082019150602081019050602083039250610431565b6001836020036101000a0380198251168184511680821785525050505050509050019150506040516020818303038152906040528051906020012060405160200180807fff000000000000000000000000000000000000000000000000000000000000008152506001018473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1660601b815260140183815260200182815260200193505050506040516020818303038152906040528051906020012060001c90506000808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16156105c1576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252603f8152602001806108d2603f913960400191505060405180910390fd5b81602001825188818334f5955050508073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1614610654576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260468152602001806109566046913960600191505060405180910390fd5b60016000808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055505050509392505050565b6000308484846040516020018083838082843780830192505050925050506040516020818303038152906040528051906020012060405160200180807fff000000000000000000000000000000000000000000000000000000000000008152506001018473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1660601b815260140183815260200182815260200193505050506040516020818303038152906040528051906020012060001c90506000808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16156107d357600090506107d4565b5b9392505050565b600030838360405160200180807fff000000000000000000000000000000000000000000000000000000000000008152506001018473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1660601b815260140183815260200182815260200193505050506040516020818303038152906040528051906020012060001c90506000808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16156108ca57600090506108cb565b5b9291505056fe496e76616c696420636f6e7472616374206372656174696f6e202d20636f6e74726163742068617320616c7265616479206265656e206465706c6f7965642e496e76616c69642073616c74202d206669727374203230206279746573206f66207468652073616c74206d757374206d617463682063616c6c696e6720616464726573732e4661696c656420746f206465706c6f7920636f6e7472616374207573696e672070726f76696465642073616c7420616e6420696e697469616c697a6174696f6e20636f64652ea265627a7a72305820d7c139ad04a8d13985b5e2d67c67413e545e678b3fc89b6305c26e51dee238a764736f6c634300050a0032"; - -type ImmutableCreate2FactoryConstructorParams = - | [signer?: Signer] - | ConstructorParameters; - -const isSuperArgs = ( - xs: ImmutableCreate2FactoryConstructorParams -): xs is ConstructorParameters => xs.length > 1; - -export class ImmutableCreate2Factory__factory extends ContractFactory { - constructor(...args: ImmutableCreate2FactoryConstructorParams) { - if (isSuperArgs(args)) { - super(...args); - } else { - super(_abi, _bytecode, args[0]); - } - } - - override deploy( - overrides?: Overrides & { from?: string | Promise } - ): Promise { - return super.deploy(overrides || {}) as Promise; - } - override getDeployTransaction( - overrides?: Overrides & { from?: string | Promise } - ): TransactionRequest { - return super.getDeployTransaction(overrides || {}); - } - override attach(address: string): ImmutableCreate2Factory { - return super.attach(address) as ImmutableCreate2Factory; - } - override connect(signer: Signer): ImmutableCreate2Factory__factory { - return super.connect(signer) as ImmutableCreate2Factory__factory; - } - - static readonly bytecode = _bytecode; - static readonly abi = _abi; - static createInterface(): ImmutableCreate2FactoryInterface { - return new utils.Interface(_abi) as ImmutableCreate2FactoryInterface; - } - static connect( - address: string, - signerOrProvider: Signer | Provider - ): ImmutableCreate2Factory { - return new Contract( - address, - _abi, - signerOrProvider - ) as ImmutableCreate2Factory; - } -} diff --git a/packages/interfaces/typechain-types/factories/contracts/Zeta.eth.sol/ZetaEth__factory.ts b/packages/interfaces/typechain-types/factories/contracts/Zeta.eth.sol/ZetaEth__factory.ts index 2a2dda9a..c59e3587 100644 --- a/packages/interfaces/typechain-types/factories/contracts/Zeta.eth.sol/ZetaEth__factory.ts +++ b/packages/interfaces/typechain-types/factories/contracts/Zeta.eth.sol/ZetaEth__factory.ts @@ -300,7 +300,7 @@ const _abi = [ ]; const _bytecode = - "0x60806040523480156200001157600080fd5b50604051620019eb380380620019eb833981810160405281019062000037919062000370565b6040518060400160405280600481526020017f5a657461000000000000000000000000000000000000000000000000000000008152506040518060400160405280600481526020017f5a455441000000000000000000000000000000000000000000000000000000008152508160039080519060200190620000bb929190620002a9565b508060049080519060200190620000d4929190620002a9565b5050506200011633620000ec6200011d60201b60201c565b60ff16600a620000fd9190620004e2565b836200010a91906200061f565b6200012660201b60201c565b5062000773565b60006012905090565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16141562000199576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016200019090620003da565b60405180910390fd5b620001ad600083836200029f60201b60201c565b8060026000828254620001c191906200042a565b92505081905550806000808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282546200021891906200042a565b925050819055508173ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040516200027f9190620003fc565b60405180910390a36200029b60008383620002a460201b60201c565b5050565b505050565b505050565b828054620002b7906200068a565b90600052602060002090601f016020900481019282620002db576000855562000327565b82601f10620002f657805160ff191683800117855562000327565b8280016001018555821562000327579182015b828111156200032657825182559160200191906001019062000309565b5b5090506200033691906200033a565b5090565b5b80821115620003555760008160009055506001016200033b565b5090565b6000815190506200036a8162000759565b92915050565b6000602082840312156200038957620003886200071e565b5b6000620003998482850162000359565b91505092915050565b6000620003b1601f8362000419565b9150620003be8262000730565b602082019050919050565b620003d48162000680565b82525050565b60006020820190508181036000830152620003f581620003a2565b9050919050565b6000602082019050620004136000830184620003c9565b92915050565b600082825260208201905092915050565b6000620004378262000680565b9150620004448362000680565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff038211156200047c576200047b620006c0565b5b828201905092915050565b6000808291508390505b6001851115620004d957808604811115620004b157620004b0620006c0565b5b6001851615620004c15780820291505b8081029050620004d18562000723565b945062000491565b94509492505050565b6000620004ef8262000680565b9150620004fc8362000680565b92506200052b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff848462000533565b905092915050565b60008262000545576001905062000618565b8162000555576000905062000618565b81600181146200056e57600281146200057957620005af565b600191505062000618565b60ff8411156200058e576200058d620006c0565b5b8360020a915084821115620005a857620005a7620006c0565b5b5062000618565b5060208310610133831016604e8410600b8410161715620005e95782820a905083811115620005e357620005e2620006c0565b5b62000618565b620005f8848484600162000487565b92509050818404811115620006125762000611620006c0565b5b81810290505b9392505050565b60006200062c8262000680565b9150620006398362000680565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0483118215151615620006755762000674620006c0565b5b828202905092915050565b6000819050919050565b60006002820490506001821680620006a357607f821691505b60208210811415620006ba57620006b9620006ef565b5b50919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b600080fd5b60008160011c9050919050565b7f45524332303a206d696e7420746f20746865207a65726f206164647265737300600082015250565b620007648162000680565b81146200077057600080fd5b50565b61126880620007836000396000f3fe608060405234801561001057600080fd5b50600436106100a95760003560e01c80633950935111610071578063395093511461016857806370a082311461019857806395d89b41146101c8578063a457c2d7146101e6578063a9059cbb14610216578063dd62ed3e14610246576100a9565b806306fdde03146100ae578063095ea7b3146100cc57806318160ddd146100fc57806323b872dd1461011a578063313ce5671461014a575b600080fd5b6100b6610276565b6040516100c39190610d29565b60405180910390f35b6100e660048036038101906100e19190610b73565b610308565b6040516100f39190610d0e565b60405180910390f35b61010461032b565b6040516101119190610e2b565b60405180910390f35b610134600480360381019061012f9190610b20565b610335565b6040516101419190610d0e565b60405180910390f35b610152610364565b60405161015f9190610e46565b60405180910390f35b610182600480360381019061017d9190610b73565b61036d565b60405161018f9190610d0e565b60405180910390f35b6101b260048036038101906101ad9190610ab3565b6103a4565b6040516101bf9190610e2b565b60405180910390f35b6101d06103ec565b6040516101dd9190610d29565b60405180910390f35b61020060048036038101906101fb9190610b73565b61047e565b60405161020d9190610d0e565b60405180910390f35b610230600480360381019061022b9190610b73565b6104f5565b60405161023d9190610d0e565b60405180910390f35b610260600480360381019061025b9190610ae0565b610518565b60405161026d9190610e2b565b60405180910390f35b60606003805461028590610f5b565b80601f01602080910402602001604051908101604052809291908181526020018280546102b190610f5b565b80156102fe5780601f106102d3576101008083540402835291602001916102fe565b820191906000526020600020905b8154815290600101906020018083116102e157829003601f168201915b5050505050905090565b60008061031361059f565b90506103208185856105a7565b600191505092915050565b6000600254905090565b60008061034061059f565b905061034d858285610772565b6103588585856107fe565b60019150509392505050565b60006012905090565b60008061037861059f565b905061039981858561038a8589610518565b6103949190610e7d565b6105a7565b600191505092915050565b60008060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b6060600480546103fb90610f5b565b80601f016020809104026020016040519081016040528092919081815260200182805461042790610f5b565b80156104745780601f1061044957610100808354040283529160200191610474565b820191906000526020600020905b81548152906001019060200180831161045757829003601f168201915b5050505050905090565b60008061048961059f565b905060006104978286610518565b9050838110156104dc576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016104d390610e0b565b60405180910390fd5b6104e982868684036105a7565b60019250505092915050565b60008061050061059f565b905061050d8185856107fe565b600191505092915050565b6000600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415610617576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161060e90610deb565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415610687576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161067e90610d6b565b60405180910390fd5b80600160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925836040516107659190610e2b565b60405180910390a3505050565b600061077e8484610518565b90507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff81146107f857818110156107ea576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016107e190610d8b565b60405180910390fd5b6107f784848484036105a7565b5b50505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16141561086e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161086590610dcb565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614156108de576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016108d590610d4b565b60405180910390fd5b6108e9838383610a7f565b60008060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205490508181101561096f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161096690610dab565b60405180910390fd5b8181036000808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550816000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254610a029190610e7d565b925050819055508273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef84604051610a669190610e2b565b60405180910390a3610a79848484610a84565b50505050565b505050565b505050565b600081359050610a9881611204565b92915050565b600081359050610aad8161121b565b92915050565b600060208284031215610ac957610ac8610feb565b5b6000610ad784828501610a89565b91505092915050565b60008060408385031215610af757610af6610feb565b5b6000610b0585828601610a89565b9250506020610b1685828601610a89565b9150509250929050565b600080600060608486031215610b3957610b38610feb565b5b6000610b4786828701610a89565b9350506020610b5886828701610a89565b9250506040610b6986828701610a9e565b9150509250925092565b60008060408385031215610b8a57610b89610feb565b5b6000610b9885828601610a89565b9250506020610ba985828601610a9e565b9150509250929050565b610bbc81610ee5565b82525050565b6000610bcd82610e61565b610bd78185610e6c565b9350610be7818560208601610f28565b610bf081610ff0565b840191505092915050565b6000610c08602383610e6c565b9150610c1382611001565b604082019050919050565b6000610c2b602283610e6c565b9150610c3682611050565b604082019050919050565b6000610c4e601d83610e6c565b9150610c598261109f565b602082019050919050565b6000610c71602683610e6c565b9150610c7c826110c8565b604082019050919050565b6000610c94602583610e6c565b9150610c9f82611117565b604082019050919050565b6000610cb7602483610e6c565b9150610cc282611166565b604082019050919050565b6000610cda602583610e6c565b9150610ce5826111b5565b604082019050919050565b610cf981610f11565b82525050565b610d0881610f1b565b82525050565b6000602082019050610d236000830184610bb3565b92915050565b60006020820190508181036000830152610d438184610bc2565b905092915050565b60006020820190508181036000830152610d6481610bfb565b9050919050565b60006020820190508181036000830152610d8481610c1e565b9050919050565b60006020820190508181036000830152610da481610c41565b9050919050565b60006020820190508181036000830152610dc481610c64565b9050919050565b60006020820190508181036000830152610de481610c87565b9050919050565b60006020820190508181036000830152610e0481610caa565b9050919050565b60006020820190508181036000830152610e2481610ccd565b9050919050565b6000602082019050610e406000830184610cf0565b92915050565b6000602082019050610e5b6000830184610cff565b92915050565b600081519050919050565b600082825260208201905092915050565b6000610e8882610f11565b9150610e9383610f11565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff03821115610ec857610ec7610f8d565b5b828201905092915050565b6000610ede82610ef1565b9050919050565b60008115159050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b600060ff82169050919050565b60005b83811015610f46578082015181840152602081019050610f2b565b83811115610f55576000848401525b50505050565b60006002820490506001821680610f7357607f821691505b60208210811415610f8757610f86610fbc565b5b50919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b600080fd5b6000601f19601f8301169050919050565b7f45524332303a207472616e7366657220746f20746865207a65726f206164647260008201527f6573730000000000000000000000000000000000000000000000000000000000602082015250565b7f45524332303a20617070726f766520746f20746865207a65726f20616464726560008201527f7373000000000000000000000000000000000000000000000000000000000000602082015250565b7f45524332303a20696e73756666696369656e7420616c6c6f77616e6365000000600082015250565b7f45524332303a207472616e7366657220616d6f756e742065786365656473206260008201527f616c616e63650000000000000000000000000000000000000000000000000000602082015250565b7f45524332303a207472616e736665722066726f6d20746865207a65726f20616460008201527f6472657373000000000000000000000000000000000000000000000000000000602082015250565b7f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460008201527f7265737300000000000000000000000000000000000000000000000000000000602082015250565b7f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f7760008201527f207a65726f000000000000000000000000000000000000000000000000000000602082015250565b61120d81610ed3565b811461121857600080fd5b50565b61122481610f11565b811461122f57600080fd5b5056fea26469706673582212209ae0cd235a6e914c58a7438ba7a501a39e146954d201dff4f02d4bdd3c3e329b64736f6c63430008070033"; + "0x60806040523480156200001157600080fd5b50604051620019eb380380620019eb833981810160405281019062000037919062000370565b6040518060400160405280600481526020017f5a657461000000000000000000000000000000000000000000000000000000008152506040518060400160405280600481526020017f5a455441000000000000000000000000000000000000000000000000000000008152508160039080519060200190620000bb929190620002a9565b508060049080519060200190620000d4929190620002a9565b5050506200011633620000ec6200011d60201b60201c565b60ff16600a620000fd9190620004e2565b836200010a91906200061f565b6200012660201b60201c565b5062000773565b60006012905090565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16141562000199576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016200019090620003da565b60405180910390fd5b620001ad600083836200029f60201b60201c565b8060026000828254620001c191906200042a565b92505081905550806000808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282546200021891906200042a565b925050819055508173ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040516200027f9190620003fc565b60405180910390a36200029b60008383620002a460201b60201c565b5050565b505050565b505050565b828054620002b7906200068a565b90600052602060002090601f016020900481019282620002db576000855562000327565b82601f10620002f657805160ff191683800117855562000327565b8280016001018555821562000327579182015b828111156200032657825182559160200191906001019062000309565b5b5090506200033691906200033a565b5090565b5b80821115620003555760008160009055506001016200033b565b5090565b6000815190506200036a8162000759565b92915050565b6000602082840312156200038957620003886200071e565b5b6000620003998482850162000359565b91505092915050565b6000620003b1601f8362000419565b9150620003be8262000730565b602082019050919050565b620003d48162000680565b82525050565b60006020820190508181036000830152620003f581620003a2565b9050919050565b6000602082019050620004136000830184620003c9565b92915050565b600082825260208201905092915050565b6000620004378262000680565b9150620004448362000680565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff038211156200047c576200047b620006c0565b5b828201905092915050565b6000808291508390505b6001851115620004d957808604811115620004b157620004b0620006c0565b5b6001851615620004c15780820291505b8081029050620004d18562000723565b945062000491565b94509492505050565b6000620004ef8262000680565b9150620004fc8362000680565b92506200052b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff848462000533565b905092915050565b60008262000545576001905062000618565b8162000555576000905062000618565b81600181146200056e57600281146200057957620005af565b600191505062000618565b60ff8411156200058e576200058d620006c0565b5b8360020a915084821115620005a857620005a7620006c0565b5b5062000618565b5060208310610133831016604e8410600b8410161715620005e95782820a905083811115620005e357620005e2620006c0565b5b62000618565b620005f8848484600162000487565b92509050818404811115620006125762000611620006c0565b5b81810290505b9392505050565b60006200062c8262000680565b9150620006398362000680565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0483118215151615620006755762000674620006c0565b5b828202905092915050565b6000819050919050565b60006002820490506001821680620006a357607f821691505b60208210811415620006ba57620006b9620006ef565b5b50919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b600080fd5b60008160011c9050919050565b7f45524332303a206d696e7420746f20746865207a65726f206164647265737300600082015250565b620007648162000680565b81146200077057600080fd5b50565b61126880620007836000396000f3fe608060405234801561001057600080fd5b50600436106100a95760003560e01c80633950935111610071578063395093511461016857806370a082311461019857806395d89b41146101c8578063a457c2d7146101e6578063a9059cbb14610216578063dd62ed3e14610246576100a9565b806306fdde03146100ae578063095ea7b3146100cc57806318160ddd146100fc57806323b872dd1461011a578063313ce5671461014a575b600080fd5b6100b6610276565b6040516100c39190610d29565b60405180910390f35b6100e660048036038101906100e19190610b73565b610308565b6040516100f39190610d0e565b60405180910390f35b61010461032b565b6040516101119190610e2b565b60405180910390f35b610134600480360381019061012f9190610b20565b610335565b6040516101419190610d0e565b60405180910390f35b610152610364565b60405161015f9190610e46565b60405180910390f35b610182600480360381019061017d9190610b73565b61036d565b60405161018f9190610d0e565b60405180910390f35b6101b260048036038101906101ad9190610ab3565b6103a4565b6040516101bf9190610e2b565b60405180910390f35b6101d06103ec565b6040516101dd9190610d29565b60405180910390f35b61020060048036038101906101fb9190610b73565b61047e565b60405161020d9190610d0e565b60405180910390f35b610230600480360381019061022b9190610b73565b6104f5565b60405161023d9190610d0e565b60405180910390f35b610260600480360381019061025b9190610ae0565b610518565b60405161026d9190610e2b565b60405180910390f35b60606003805461028590610f5b565b80601f01602080910402602001604051908101604052809291908181526020018280546102b190610f5b565b80156102fe5780601f106102d3576101008083540402835291602001916102fe565b820191906000526020600020905b8154815290600101906020018083116102e157829003601f168201915b5050505050905090565b60008061031361059f565b90506103208185856105a7565b600191505092915050565b6000600254905090565b60008061034061059f565b905061034d858285610772565b6103588585856107fe565b60019150509392505050565b60006012905090565b60008061037861059f565b905061039981858561038a8589610518565b6103949190610e7d565b6105a7565b600191505092915050565b60008060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b6060600480546103fb90610f5b565b80601f016020809104026020016040519081016040528092919081815260200182805461042790610f5b565b80156104745780601f1061044957610100808354040283529160200191610474565b820191906000526020600020905b81548152906001019060200180831161045757829003601f168201915b5050505050905090565b60008061048961059f565b905060006104978286610518565b9050838110156104dc576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016104d390610e0b565b60405180910390fd5b6104e982868684036105a7565b60019250505092915050565b60008061050061059f565b905061050d8185856107fe565b600191505092915050565b6000600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415610617576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161060e90610deb565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415610687576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161067e90610d6b565b60405180910390fd5b80600160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925836040516107659190610e2b565b60405180910390a3505050565b600061077e8484610518565b90507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff81146107f857818110156107ea576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016107e190610d8b565b60405180910390fd5b6107f784848484036105a7565b5b50505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16141561086e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161086590610dcb565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614156108de576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016108d590610d4b565b60405180910390fd5b6108e9838383610a7f565b60008060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205490508181101561096f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161096690610dab565b60405180910390fd5b8181036000808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550816000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254610a029190610e7d565b925050819055508273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef84604051610a669190610e2b565b60405180910390a3610a79848484610a84565b50505050565b505050565b505050565b600081359050610a9881611204565b92915050565b600081359050610aad8161121b565b92915050565b600060208284031215610ac957610ac8610feb565b5b6000610ad784828501610a89565b91505092915050565b60008060408385031215610af757610af6610feb565b5b6000610b0585828601610a89565b9250506020610b1685828601610a89565b9150509250929050565b600080600060608486031215610b3957610b38610feb565b5b6000610b4786828701610a89565b9350506020610b5886828701610a89565b9250506040610b6986828701610a9e565b9150509250925092565b60008060408385031215610b8a57610b89610feb565b5b6000610b9885828601610a89565b9250506020610ba985828601610a9e565b9150509250929050565b610bbc81610ee5565b82525050565b6000610bcd82610e61565b610bd78185610e6c565b9350610be7818560208601610f28565b610bf081610ff0565b840191505092915050565b6000610c08602383610e6c565b9150610c1382611001565b604082019050919050565b6000610c2b602283610e6c565b9150610c3682611050565b604082019050919050565b6000610c4e601d83610e6c565b9150610c598261109f565b602082019050919050565b6000610c71602683610e6c565b9150610c7c826110c8565b604082019050919050565b6000610c94602583610e6c565b9150610c9f82611117565b604082019050919050565b6000610cb7602483610e6c565b9150610cc282611166565b604082019050919050565b6000610cda602583610e6c565b9150610ce5826111b5565b604082019050919050565b610cf981610f11565b82525050565b610d0881610f1b565b82525050565b6000602082019050610d236000830184610bb3565b92915050565b60006020820190508181036000830152610d438184610bc2565b905092915050565b60006020820190508181036000830152610d6481610bfb565b9050919050565b60006020820190508181036000830152610d8481610c1e565b9050919050565b60006020820190508181036000830152610da481610c41565b9050919050565b60006020820190508181036000830152610dc481610c64565b9050919050565b60006020820190508181036000830152610de481610c87565b9050919050565b60006020820190508181036000830152610e0481610caa565b9050919050565b60006020820190508181036000830152610e2481610ccd565b9050919050565b6000602082019050610e406000830184610cf0565b92915050565b6000602082019050610e5b6000830184610cff565b92915050565b600081519050919050565b600082825260208201905092915050565b6000610e8882610f11565b9150610e9383610f11565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff03821115610ec857610ec7610f8d565b5b828201905092915050565b6000610ede82610ef1565b9050919050565b60008115159050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b600060ff82169050919050565b60005b83811015610f46578082015181840152602081019050610f2b565b83811115610f55576000848401525b50505050565b60006002820490506001821680610f7357607f821691505b60208210811415610f8757610f86610fbc565b5b50919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b600080fd5b6000601f19601f8301169050919050565b7f45524332303a207472616e7366657220746f20746865207a65726f206164647260008201527f6573730000000000000000000000000000000000000000000000000000000000602082015250565b7f45524332303a20617070726f766520746f20746865207a65726f20616464726560008201527f7373000000000000000000000000000000000000000000000000000000000000602082015250565b7f45524332303a20696e73756666696369656e7420616c6c6f77616e6365000000600082015250565b7f45524332303a207472616e7366657220616d6f756e742065786365656473206260008201527f616c616e63650000000000000000000000000000000000000000000000000000602082015250565b7f45524332303a207472616e736665722066726f6d20746865207a65726f20616460008201527f6472657373000000000000000000000000000000000000000000000000000000602082015250565b7f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460008201527f7265737300000000000000000000000000000000000000000000000000000000602082015250565b7f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f7760008201527f207a65726f000000000000000000000000000000000000000000000000000000602082015250565b61120d81610ed3565b811461121857600080fd5b50565b61122481610f11565b811461122f57600080fd5b5056fea264697066735822122085f62951c60131806ff6d81dd2cb63a4fa2077ceb118c62fb5c0f303f2e1519a64736f6c63430008070033"; type ZetaEthConstructorParams = | [signer?: Signer] diff --git a/packages/interfaces/typechain-types/factories/contracts/Zeta.non-eth.sol/ZetaNonEth__factory.ts b/packages/interfaces/typechain-types/factories/contracts/Zeta.non-eth.sol/ZetaNonEth__factory.ts index 28b1daf4..3d8143e0 100644 --- a/packages/interfaces/typechain-types/factories/contracts/Zeta.non-eth.sol/ZetaNonEth__factory.ts +++ b/packages/interfaces/typechain-types/factories/contracts/Zeta.non-eth.sol/ZetaNonEth__factory.ts @@ -514,7 +514,7 @@ const _abi = [ ]; const _bytecode = - "0x60806040523480156200001157600080fd5b506040516200237c3803806200237c8339818101604052810190620000379190620002c8565b6040518060400160405280600481526020017f5a657461000000000000000000000000000000000000000000000000000000008152506040518060400160405280600481526020017f5a455441000000000000000000000000000000000000000000000000000000008152508160039080519060200190620000bb92919062000201565b508060049080519060200190620000d492919062000201565b505050600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614806200013f5750600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16145b1562000177576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b81600660006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555080600760006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505050620003c7565b8280546200020f9062000343565b90600052602060002090601f0160209004810192826200023357600085556200027f565b82601f106200024e57805160ff19168380011785556200027f565b828001600101855582156200027f579182015b828111156200027e57825182559160200191906001019062000261565b5b5090506200028e919062000292565b5090565b5b80821115620002ad57600081600090555060010162000293565b5090565b600081519050620002c281620003ad565b92915050565b60008060408385031215620002e257620002e1620003a8565b5b6000620002f285828601620002b1565b92505060206200030585828601620002b1565b9150509250929050565b60006200031c8262000323565b9050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600060028204905060018216806200035c57607f821691505b6020821081141562000373576200037262000379565b5b50919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b600080fd5b620003b8816200030f565b8114620003c457600080fd5b50565b611fa580620003d76000396000f3fe608060405234801561001057600080fd5b50600436106101215760003560e01c806342966c68116100ad57806395d89b411161007157806395d89b41146102f6578063a457c2d714610314578063a9059cbb14610344578063bff9662a14610374578063dd62ed3e1461039257610121565b806342966c68146102665780635b1125911461028257806370a08231146102a0578063779e3b63146102d057806379cc6790146102da57610121565b80631e458bee116100f45780631e458bee146101ae57806323b872dd146101ca578063313ce567146101fa578063328a01d014610218578063395093511461023657610121565b806306fdde0314610126578063095ea7b31461014457806315d57fd41461017457806318160ddd14610190575b600080fd5b61012e6103c2565b60405161013b91906118ea565b60405180910390f35b61015e60048036038101906101599190611621565b610454565b60405161016b91906118cf565b60405180910390f35b61018e6004803603810190610189919061158e565b610477565b005b610198610689565b6040516101a59190611a4c565b60405180910390f35b6101c860048036038101906101c39190611661565b610693565b005b6101e460048036038101906101df91906115ce565b610783565b6040516101f191906118cf565b60405180910390f35b6102026107b2565b60405161020f9190611a67565b60405180910390f35b6102206107bb565b60405161022d91906118b4565b60405180910390f35b610250600480360381019061024b9190611621565b6107e1565b60405161025d91906118cf565b60405180910390f35b610280600480360381019061027b91906116b4565b610818565b005b61028a61082c565b60405161029791906118b4565b60405180910390f35b6102ba60048036038101906102b59190611561565b610852565b6040516102c79190611a4c565b60405180910390f35b6102d861089a565b005b6102f460048036038101906102ef9190611621565b610a1a565b005b6102fe610b08565b60405161030b91906118ea565b60405180910390f35b61032e60048036038101906103299190611621565b610b9a565b60405161033b91906118cf565b60405180910390f35b61035e60048036038101906103599190611621565b610c11565b60405161036b91906118cf565b60405180910390f35b61037c610c34565b60405161038991906118b4565b60405180910390f35b6103ac60048036038101906103a7919061158e565b610c5a565b6040516103b99190611a4c565b60405180910390f35b6060600380546103d190611bba565b80601f01602080910402602001604051908101604052809291908181526020018280546103fd90611bba565b801561044a5780601f1061041f5761010080835404028352916020019161044a565b820191906000526020600020905b81548152906001019060200180831161042d57829003601f168201915b5050505050905090565b60008061045f610ce1565b905061046c818585610ce9565b600191505092915050565b600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141580156105235750600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614155b1561056557336040517fcdfcef9700000000000000000000000000000000000000000000000000000000815260040161055c91906118b4565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614806105cc5750600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16145b15610603576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b81600660006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555080600560006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505050565b6000600254905090565b600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461072557336040517f3fe32fba00000000000000000000000000000000000000000000000000000000815260040161071c91906118b4565b60405180910390fd5b61072f8383610eb4565b808373ffffffffffffffffffffffffffffffffffffffff167fc263b302aec62d29105026245f19e16f8e0137066ccd4a8bd941f716bd4096bb846040516107769190611a4c565b60405180910390a3505050565b60008061078e610ce1565b905061079b858285611014565b6107a68585856110a0565b60019150509392505050565b60006012905090565b600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000806107ec610ce1565b905061080d8185856107fe8589610c5a565b6108089190611a9e565b610ce9565b600191505092915050565b610829610823610ce1565b82611321565b50565b600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60008060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461092c57336040517fe700765e00000000000000000000000000000000000000000000000000000000815260040161092391906118b4565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff16600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614156109b5576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16600760006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610aac57336040517f3fe32fba000000000000000000000000000000000000000000000000000000008152600401610aa391906118b4565b60405180910390fd5b610ab682826114f8565b8173ffffffffffffffffffffffffffffffffffffffff167f919f7e2092ffcc9d09f599be18d8152860b0c054df788a33bc549cdd9d0f15b182604051610afc9190611a4c565b60405180910390a25050565b606060048054610b1790611bba565b80601f0160208091040260200160405190810160405280929190818152602001828054610b4390611bba565b8015610b905780601f10610b6557610100808354040283529160200191610b90565b820191906000526020600020905b815481529060010190602001808311610b7357829003601f168201915b5050505050905090565b600080610ba5610ce1565b90506000610bb38286610c5a565b905083811015610bf8576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610bef90611a0c565b60405180910390fd5b610c058286868403610ce9565b60019250505092915050565b600080610c1c610ce1565b9050610c298185856110a0565b600191505092915050565b600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415610d59576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610d50906119ec565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415610dc9576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610dc09061194c565b60405180910390fd5b80600160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92583604051610ea79190611a4c565b60405180910390a3505050565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415610f24576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610f1b90611a2c565b60405180910390fd5b610f3060008383611518565b8060026000828254610f429190611a9e565b92505081905550806000808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254610f979190611a9e565b925050819055508173ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef83604051610ffc9190611a4c565b60405180910390a36110106000838361151d565b5050565b60006110208484610c5a565b90507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff811461109a578181101561108c576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016110839061196c565b60405180910390fd5b6110998484848403610ce9565b5b50505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415611110576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611107906119cc565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611180576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016111779061190c565b60405180910390fd5b61118b838383611518565b60008060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905081811015611211576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016112089061198c565b60405180910390fd5b8181036000808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550816000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282546112a49190611a9e565b925050819055508273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040516113089190611a4c565b60405180910390a361131b84848461151d565b50505050565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611391576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611388906119ac565b60405180910390fd5b61139d82600083611518565b60008060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905081811015611423576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161141a9061192c565b60405180910390fd5b8181036000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550816002600082825461147a9190611af4565b92505081905550600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040516114df9190611a4c565b60405180910390a36114f38360008461151d565b505050565b61150a82611504610ce1565b83611014565b6115148282611321565b5050565b505050565b505050565b60008135905061153181611f2a565b92915050565b60008135905061154681611f41565b92915050565b60008135905061155b81611f58565b92915050565b60006020828403121561157757611576611c4a565b5b600061158584828501611522565b91505092915050565b600080604083850312156115a5576115a4611c4a565b5b60006115b385828601611522565b92505060206115c485828601611522565b9150509250929050565b6000806000606084860312156115e7576115e6611c4a565b5b60006115f586828701611522565b935050602061160686828701611522565b92505060406116178682870161154c565b9150509250925092565b6000806040838503121561163857611637611c4a565b5b600061164685828601611522565b92505060206116578582860161154c565b9150509250929050565b60008060006060848603121561167a57611679611c4a565b5b600061168886828701611522565b93505060206116998682870161154c565b92505060406116aa86828701611537565b9150509250925092565b6000602082840312156116ca576116c9611c4a565b5b60006116d88482850161154c565b91505092915050565b6116ea81611b28565b82525050565b6116f981611b3a565b82525050565b600061170a82611a82565b6117148185611a8d565b9350611724818560208601611b87565b61172d81611c4f565b840191505092915050565b6000611745602383611a8d565b915061175082611c60565b604082019050919050565b6000611768602283611a8d565b915061177382611caf565b604082019050919050565b600061178b602283611a8d565b915061179682611cfe565b604082019050919050565b60006117ae601d83611a8d565b91506117b982611d4d565b602082019050919050565b60006117d1602683611a8d565b91506117dc82611d76565b604082019050919050565b60006117f4602183611a8d565b91506117ff82611dc5565b604082019050919050565b6000611817602583611a8d565b915061182282611e14565b604082019050919050565b600061183a602483611a8d565b915061184582611e63565b604082019050919050565b600061185d602583611a8d565b915061186882611eb2565b604082019050919050565b6000611880601f83611a8d565b915061188b82611f01565b602082019050919050565b61189f81611b70565b82525050565b6118ae81611b7a565b82525050565b60006020820190506118c960008301846116e1565b92915050565b60006020820190506118e460008301846116f0565b92915050565b6000602082019050818103600083015261190481846116ff565b905092915050565b6000602082019050818103600083015261192581611738565b9050919050565b600060208201905081810360008301526119458161175b565b9050919050565b600060208201905081810360008301526119658161177e565b9050919050565b60006020820190508181036000830152611985816117a1565b9050919050565b600060208201905081810360008301526119a5816117c4565b9050919050565b600060208201905081810360008301526119c5816117e7565b9050919050565b600060208201905081810360008301526119e58161180a565b9050919050565b60006020820190508181036000830152611a058161182d565b9050919050565b60006020820190508181036000830152611a2581611850565b9050919050565b60006020820190508181036000830152611a4581611873565b9050919050565b6000602082019050611a616000830184611896565b92915050565b6000602082019050611a7c60008301846118a5565b92915050565b600081519050919050565b600082825260208201905092915050565b6000611aa982611b70565b9150611ab483611b70565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff03821115611ae957611ae8611bec565b5b828201905092915050565b6000611aff82611b70565b9150611b0a83611b70565b925082821015611b1d57611b1c611bec565b5b828203905092915050565b6000611b3382611b50565b9050919050565b60008115159050919050565b6000819050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b600060ff82169050919050565b60005b83811015611ba5578082015181840152602081019050611b8a565b83811115611bb4576000848401525b50505050565b60006002820490506001821680611bd257607f821691505b60208210811415611be657611be5611c1b565b5b50919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b600080fd5b6000601f19601f8301169050919050565b7f45524332303a207472616e7366657220746f20746865207a65726f206164647260008201527f6573730000000000000000000000000000000000000000000000000000000000602082015250565b7f45524332303a206275726e20616d6f756e7420657863656564732062616c616e60008201527f6365000000000000000000000000000000000000000000000000000000000000602082015250565b7f45524332303a20617070726f766520746f20746865207a65726f20616464726560008201527f7373000000000000000000000000000000000000000000000000000000000000602082015250565b7f45524332303a20696e73756666696369656e7420616c6c6f77616e6365000000600082015250565b7f45524332303a207472616e7366657220616d6f756e742065786365656473206260008201527f616c616e63650000000000000000000000000000000000000000000000000000602082015250565b7f45524332303a206275726e2066726f6d20746865207a65726f2061646472657360008201527f7300000000000000000000000000000000000000000000000000000000000000602082015250565b7f45524332303a207472616e736665722066726f6d20746865207a65726f20616460008201527f6472657373000000000000000000000000000000000000000000000000000000602082015250565b7f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460008201527f7265737300000000000000000000000000000000000000000000000000000000602082015250565b7f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f7760008201527f207a65726f000000000000000000000000000000000000000000000000000000602082015250565b7f45524332303a206d696e7420746f20746865207a65726f206164647265737300600082015250565b611f3381611b28565b8114611f3e57600080fd5b50565b611f4a81611b46565b8114611f5557600080fd5b50565b611f6181611b70565b8114611f6c57600080fd5b5056fea2646970667358221220efc8fd85061fd3ea77a16439a4c2eba5e4ea231b6d61d39f635845016271272b64736f6c63430008070033"; + "0x60806040523480156200001157600080fd5b506040516200237c3803806200237c8339818101604052810190620000379190620002c8565b6040518060400160405280600481526020017f5a657461000000000000000000000000000000000000000000000000000000008152506040518060400160405280600481526020017f5a455441000000000000000000000000000000000000000000000000000000008152508160039080519060200190620000bb92919062000201565b508060049080519060200190620000d492919062000201565b505050600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614806200013f5750600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16145b1562000177576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b81600660006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555080600760006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505050620003c7565b8280546200020f9062000343565b90600052602060002090601f0160209004810192826200023357600085556200027f565b82601f106200024e57805160ff19168380011785556200027f565b828001600101855582156200027f579182015b828111156200027e57825182559160200191906001019062000261565b5b5090506200028e919062000292565b5090565b5b80821115620002ad57600081600090555060010162000293565b5090565b600081519050620002c281620003ad565b92915050565b60008060408385031215620002e257620002e1620003a8565b5b6000620002f285828601620002b1565b92505060206200030585828601620002b1565b9150509250929050565b60006200031c8262000323565b9050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600060028204905060018216806200035c57607f821691505b6020821081141562000373576200037262000379565b5b50919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b600080fd5b620003b8816200030f565b8114620003c457600080fd5b50565b611fa580620003d76000396000f3fe608060405234801561001057600080fd5b50600436106101215760003560e01c806342966c68116100ad57806395d89b411161007157806395d89b41146102f6578063a457c2d714610314578063a9059cbb14610344578063bff9662a14610374578063dd62ed3e1461039257610121565b806342966c68146102665780635b1125911461028257806370a08231146102a0578063779e3b63146102d057806379cc6790146102da57610121565b80631e458bee116100f45780631e458bee146101ae57806323b872dd146101ca578063313ce567146101fa578063328a01d014610218578063395093511461023657610121565b806306fdde0314610126578063095ea7b31461014457806315d57fd41461017457806318160ddd14610190575b600080fd5b61012e6103c2565b60405161013b91906118ea565b60405180910390f35b61015e60048036038101906101599190611621565b610454565b60405161016b91906118cf565b60405180910390f35b61018e6004803603810190610189919061158e565b610477565b005b610198610689565b6040516101a59190611a4c565b60405180910390f35b6101c860048036038101906101c39190611661565b610693565b005b6101e460048036038101906101df91906115ce565b610783565b6040516101f191906118cf565b60405180910390f35b6102026107b2565b60405161020f9190611a67565b60405180910390f35b6102206107bb565b60405161022d91906118b4565b60405180910390f35b610250600480360381019061024b9190611621565b6107e1565b60405161025d91906118cf565b60405180910390f35b610280600480360381019061027b91906116b4565b610818565b005b61028a61082c565b60405161029791906118b4565b60405180910390f35b6102ba60048036038101906102b59190611561565b610852565b6040516102c79190611a4c565b60405180910390f35b6102d861089a565b005b6102f460048036038101906102ef9190611621565b610a1a565b005b6102fe610b08565b60405161030b91906118ea565b60405180910390f35b61032e60048036038101906103299190611621565b610b9a565b60405161033b91906118cf565b60405180910390f35b61035e60048036038101906103599190611621565b610c11565b60405161036b91906118cf565b60405180910390f35b61037c610c34565b60405161038991906118b4565b60405180910390f35b6103ac60048036038101906103a7919061158e565b610c5a565b6040516103b99190611a4c565b60405180910390f35b6060600380546103d190611bba565b80601f01602080910402602001604051908101604052809291908181526020018280546103fd90611bba565b801561044a5780601f1061041f5761010080835404028352916020019161044a565b820191906000526020600020905b81548152906001019060200180831161042d57829003601f168201915b5050505050905090565b60008061045f610ce1565b905061046c818585610ce9565b600191505092915050565b600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141580156105235750600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614155b1561056557336040517fcdfcef9700000000000000000000000000000000000000000000000000000000815260040161055c91906118b4565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614806105cc5750600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16145b15610603576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b81600660006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555080600560006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505050565b6000600254905090565b600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461072557336040517f3fe32fba00000000000000000000000000000000000000000000000000000000815260040161071c91906118b4565b60405180910390fd5b61072f8383610eb4565b808373ffffffffffffffffffffffffffffffffffffffff167fc263b302aec62d29105026245f19e16f8e0137066ccd4a8bd941f716bd4096bb846040516107769190611a4c565b60405180910390a3505050565b60008061078e610ce1565b905061079b858285611014565b6107a68585856110a0565b60019150509392505050565b60006012905090565b600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000806107ec610ce1565b905061080d8185856107fe8589610c5a565b6108089190611a9e565b610ce9565b600191505092915050565b610829610823610ce1565b82611321565b50565b600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60008060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461092c57336040517fe700765e00000000000000000000000000000000000000000000000000000000815260040161092391906118b4565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff16600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614156109b5576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16600760006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610aac57336040517f3fe32fba000000000000000000000000000000000000000000000000000000008152600401610aa391906118b4565b60405180910390fd5b610ab682826114f8565b8173ffffffffffffffffffffffffffffffffffffffff167f919f7e2092ffcc9d09f599be18d8152860b0c054df788a33bc549cdd9d0f15b182604051610afc9190611a4c565b60405180910390a25050565b606060048054610b1790611bba565b80601f0160208091040260200160405190810160405280929190818152602001828054610b4390611bba565b8015610b905780601f10610b6557610100808354040283529160200191610b90565b820191906000526020600020905b815481529060010190602001808311610b7357829003601f168201915b5050505050905090565b600080610ba5610ce1565b90506000610bb38286610c5a565b905083811015610bf8576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610bef90611a0c565b60405180910390fd5b610c058286868403610ce9565b60019250505092915050565b600080610c1c610ce1565b9050610c298185856110a0565b600191505092915050565b600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415610d59576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610d50906119ec565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415610dc9576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610dc09061194c565b60405180910390fd5b80600160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92583604051610ea79190611a4c565b60405180910390a3505050565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415610f24576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610f1b90611a2c565b60405180910390fd5b610f3060008383611518565b8060026000828254610f429190611a9e565b92505081905550806000808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254610f979190611a9e565b925050819055508173ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef83604051610ffc9190611a4c565b60405180910390a36110106000838361151d565b5050565b60006110208484610c5a565b90507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff811461109a578181101561108c576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016110839061196c565b60405180910390fd5b6110998484848403610ce9565b5b50505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415611110576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611107906119cc565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611180576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016111779061190c565b60405180910390fd5b61118b838383611518565b60008060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905081811015611211576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016112089061198c565b60405180910390fd5b8181036000808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550816000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282546112a49190611a9e565b925050819055508273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040516113089190611a4c565b60405180910390a361131b84848461151d565b50505050565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611391576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611388906119ac565b60405180910390fd5b61139d82600083611518565b60008060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905081811015611423576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161141a9061192c565b60405180910390fd5b8181036000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550816002600082825461147a9190611af4565b92505081905550600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040516114df9190611a4c565b60405180910390a36114f38360008461151d565b505050565b61150a82611504610ce1565b83611014565b6115148282611321565b5050565b505050565b505050565b60008135905061153181611f2a565b92915050565b60008135905061154681611f41565b92915050565b60008135905061155b81611f58565b92915050565b60006020828403121561157757611576611c4a565b5b600061158584828501611522565b91505092915050565b600080604083850312156115a5576115a4611c4a565b5b60006115b385828601611522565b92505060206115c485828601611522565b9150509250929050565b6000806000606084860312156115e7576115e6611c4a565b5b60006115f586828701611522565b935050602061160686828701611522565b92505060406116178682870161154c565b9150509250925092565b6000806040838503121561163857611637611c4a565b5b600061164685828601611522565b92505060206116578582860161154c565b9150509250929050565b60008060006060848603121561167a57611679611c4a565b5b600061168886828701611522565b93505060206116998682870161154c565b92505060406116aa86828701611537565b9150509250925092565b6000602082840312156116ca576116c9611c4a565b5b60006116d88482850161154c565b91505092915050565b6116ea81611b28565b82525050565b6116f981611b3a565b82525050565b600061170a82611a82565b6117148185611a8d565b9350611724818560208601611b87565b61172d81611c4f565b840191505092915050565b6000611745602383611a8d565b915061175082611c60565b604082019050919050565b6000611768602283611a8d565b915061177382611caf565b604082019050919050565b600061178b602283611a8d565b915061179682611cfe565b604082019050919050565b60006117ae601d83611a8d565b91506117b982611d4d565b602082019050919050565b60006117d1602683611a8d565b91506117dc82611d76565b604082019050919050565b60006117f4602183611a8d565b91506117ff82611dc5565b604082019050919050565b6000611817602583611a8d565b915061182282611e14565b604082019050919050565b600061183a602483611a8d565b915061184582611e63565b604082019050919050565b600061185d602583611a8d565b915061186882611eb2565b604082019050919050565b6000611880601f83611a8d565b915061188b82611f01565b602082019050919050565b61189f81611b70565b82525050565b6118ae81611b7a565b82525050565b60006020820190506118c960008301846116e1565b92915050565b60006020820190506118e460008301846116f0565b92915050565b6000602082019050818103600083015261190481846116ff565b905092915050565b6000602082019050818103600083015261192581611738565b9050919050565b600060208201905081810360008301526119458161175b565b9050919050565b600060208201905081810360008301526119658161177e565b9050919050565b60006020820190508181036000830152611985816117a1565b9050919050565b600060208201905081810360008301526119a5816117c4565b9050919050565b600060208201905081810360008301526119c5816117e7565b9050919050565b600060208201905081810360008301526119e58161180a565b9050919050565b60006020820190508181036000830152611a058161182d565b9050919050565b60006020820190508181036000830152611a2581611850565b9050919050565b60006020820190508181036000830152611a4581611873565b9050919050565b6000602082019050611a616000830184611896565b92915050565b6000602082019050611a7c60008301846118a5565b92915050565b600081519050919050565b600082825260208201905092915050565b6000611aa982611b70565b9150611ab483611b70565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff03821115611ae957611ae8611bec565b5b828201905092915050565b6000611aff82611b70565b9150611b0a83611b70565b925082821015611b1d57611b1c611bec565b5b828203905092915050565b6000611b3382611b50565b9050919050565b60008115159050919050565b6000819050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b600060ff82169050919050565b60005b83811015611ba5578082015181840152602081019050611b8a565b83811115611bb4576000848401525b50505050565b60006002820490506001821680611bd257607f821691505b60208210811415611be657611be5611c1b565b5b50919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b600080fd5b6000601f19601f8301169050919050565b7f45524332303a207472616e7366657220746f20746865207a65726f206164647260008201527f6573730000000000000000000000000000000000000000000000000000000000602082015250565b7f45524332303a206275726e20616d6f756e7420657863656564732062616c616e60008201527f6365000000000000000000000000000000000000000000000000000000000000602082015250565b7f45524332303a20617070726f766520746f20746865207a65726f20616464726560008201527f7373000000000000000000000000000000000000000000000000000000000000602082015250565b7f45524332303a20696e73756666696369656e7420616c6c6f77616e6365000000600082015250565b7f45524332303a207472616e7366657220616d6f756e742065786365656473206260008201527f616c616e63650000000000000000000000000000000000000000000000000000602082015250565b7f45524332303a206275726e2066726f6d20746865207a65726f2061646472657360008201527f7300000000000000000000000000000000000000000000000000000000000000602082015250565b7f45524332303a207472616e736665722066726f6d20746865207a65726f20616460008201527f6472657373000000000000000000000000000000000000000000000000000000602082015250565b7f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460008201527f7265737300000000000000000000000000000000000000000000000000000000602082015250565b7f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f7760008201527f207a65726f000000000000000000000000000000000000000000000000000000602082015250565b7f45524332303a206d696e7420746f20746865207a65726f206164647265737300600082015250565b611f3381611b28565b8114611f3e57600080fd5b50565b611f4a81611b46565b8114611f5557600080fd5b50565b611f6181611b70565b8114611f6c57600080fd5b5056fea264697066735822122052e469a7dfcdffe4e3036c297d7df02a693d2ae3f67a8897f92a2edbe9af5a0c64736f6c63430008070033"; type ZetaNonEthConstructorParams = | [signer?: Signer] diff --git a/packages/interfaces/typechain-types/factories/contracts/ZetaConnector.base.sol/ZetaConnectorBase__factory.ts b/packages/interfaces/typechain-types/factories/contracts/ZetaConnector.base.sol/ZetaConnectorBase__factory.ts index aa667fde..0fff3a7f 100644 --- a/packages/interfaces/typechain-types/factories/contracts/ZetaConnector.base.sol/ZetaConnectorBase__factory.ts +++ b/packages/interfaces/typechain-types/factories/contracts/ZetaConnector.base.sol/ZetaConnectorBase__factory.ts @@ -552,7 +552,7 @@ const _abi = [ ]; const _bytecode = - "0x60a06040523480156200001157600080fd5b50604051620012af380380620012af83398181016040528101906200003791906200027c565b60008060006101000a81548160ff021916908315150217905550600073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff161480620000b95750600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16145b80620000f15750600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16145b80620001295750600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16145b1562000161576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8373ffffffffffffffffffffffffffffffffffffffff1660808173ffffffffffffffffffffffffffffffffffffffff1660601b8152505082600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555081600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555080600060016101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505050505062000341565b600081519050620002768162000327565b92915050565b6000806000806080858703121562000299576200029862000322565b5b6000620002a98782880162000265565b9450506020620002bc8782880162000265565b9350506040620002cf8782880162000265565b9250506060620002e28782880162000265565b91505092959194509250565b6000620002fb8262000302565b9050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600080fd5b6200033281620002ee565b81146200033e57600080fd5b50565b60805160601c610f4f6200036060003960006102160152610f4f6000f3fe608060405234801561001057600080fd5b50600436106100cf5760003560e01c80636128480f1161008c5780639122c344116100665780639122c344146101a2578063942a5e16146101be578063ec026901146101da578063f7fb869b146101f6576100cf565b80636128480f14610172578063779e3b631461018e5780638456cb5914610198576100cf565b806321e093b1146100d457806329dd214d146100f2578063328a01d01461010e5780633f4ba83a1461012c5780635b112591146101365780635c975abb14610154575b600080fd5b6100dc610214565b6040516100e99190610d62565b60405180910390f35b61010c60048036038101906101079190610be6565b610238565b005b610116610242565b6040516101239190610d62565b60405180910390f35b610134610268565b005b61013e610304565b60405161014b9190610d62565b60405180910390f35b61015c61032a565b6040516101699190610da6565b60405180910390f35b61018c60048036038101906101879190610ad7565b610340565b005b6101966104b6565b005b6101a0610636565b005b6101bc60048036038101906101b79190610ad7565b6106d2565b005b6101d860048036038101906101d39190610b04565b6108a4565b005b6101f460048036038101906101ef9190610cb5565b6108af565b005b6101fe6108b2565b60405161020b9190610d62565b60405180910390f35b7f000000000000000000000000000000000000000000000000000000000000000081565b5050505050505050565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146102fa57336040517f4677a0d30000000000000000000000000000000000000000000000000000000081526004016102f19190610d62565b60405180910390fd5b6103026108d8565b565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60008060009054906101000a900460ff16905090565b600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146103d257336040517f4677a0d30000000000000000000000000000000000000000000000000000000081526004016103c99190610d62565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415610439576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b80600060016101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055507fd41d83655d484bdf299598751c371b2d92088667266fe3774b25a97bdd5d039733826040516104ab929190610d7d565b60405180910390a150565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461054857336040517fe700765e00000000000000000000000000000000000000000000000000000000815260040161053f9190610d62565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff16600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614156105d1576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146106c857336040517f4677a0d30000000000000000000000000000000000000000000000000000000081526004016106bf9190610d62565b60405180910390fd5b6106d0610979565b565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415801561077e5750600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614155b156107c057336040517fcdfcef970000000000000000000000000000000000000000000000000000000081526004016107b79190610d62565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415610827576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b80600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055507fe79965b5c67dcfb2cf5fe152715e4a7256cee62a3d5dd8484fd8a8539eb8beff3382604051610899929190610d7d565b60405180910390a150565b505050505050505050565b50565b600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6108e061032a565b61091f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161091690610dc1565b60405180910390fd5b60008060006101000a81548160ff0219169083151502179055507f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa610962610a1b565b60405161096f9190610d62565b60405180910390a1565b61098161032a565b156109c1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016109b890610de1565b60405180910390fd5b60016000806101000a81548160ff0219169083151502179055507f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258610a04610a1b565b604051610a119190610d62565b60405180910390a1565b600033905090565b600081359050610a3281610ed4565b92915050565b600081359050610a4781610eeb565b92915050565b60008083601f840112610a6357610a62610e69565b5b8235905067ffffffffffffffff811115610a8057610a7f610e64565b5b602083019150836001820283011115610a9c57610a9b610e73565b5b9250929050565b600060c08284031215610ab957610ab8610e6e565b5b81905092915050565b600081359050610ad181610f02565b92915050565b600060208284031215610aed57610aec610e7d565b5b6000610afb84828501610a23565b91505092915050565b600080600080600080600080600060e08a8c031215610b2657610b25610e7d565b5b6000610b348c828d01610a23565b9950506020610b458c828d01610ac2565b98505060408a013567ffffffffffffffff811115610b6657610b65610e78565b5b610b728c828d01610a4d565b97509750506060610b858c828d01610ac2565b9550506080610b968c828d01610ac2565b94505060a08a013567ffffffffffffffff811115610bb757610bb6610e78565b5b610bc38c828d01610a4d565b935093505060c0610bd68c828d01610a38565b9150509295985092959850929598565b60008060008060008060008060c0898b031215610c0657610c05610e7d565b5b600089013567ffffffffffffffff811115610c2457610c23610e78565b5b610c308b828c01610a4d565b98509850506020610c438b828c01610ac2565b9650506040610c548b828c01610a23565b9550506060610c658b828c01610ac2565b945050608089013567ffffffffffffffff811115610c8657610c85610e78565b5b610c928b828c01610a4d565b935093505060a0610ca58b828c01610a38565b9150509295985092959890939650565b600060208284031215610ccb57610cca610e7d565b5b600082013567ffffffffffffffff811115610ce957610ce8610e78565b5b610cf584828501610aa3565b91505092915050565b610d0781610e12565b82525050565b610d1681610e24565b82525050565b6000610d29601483610e01565b9150610d3482610e82565b602082019050919050565b6000610d4c601083610e01565b9150610d5782610eab565b602082019050919050565b6000602082019050610d776000830184610cfe565b92915050565b6000604082019050610d926000830185610cfe565b610d9f6020830184610cfe565b9392505050565b6000602082019050610dbb6000830184610d0d565b92915050565b60006020820190508181036000830152610dda81610d1c565b9050919050565b60006020820190508181036000830152610dfa81610d3f565b9050919050565b600082825260208201905092915050565b6000610e1d82610e3a565b9050919050565b60008115159050919050565b6000819050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b7f5061757361626c653a206e6f7420706175736564000000000000000000000000600082015250565b7f5061757361626c653a2070617573656400000000000000000000000000000000600082015250565b610edd81610e12565b8114610ee857600080fd5b50565b610ef481610e30565b8114610eff57600080fd5b50565b610f0b81610e5a565b8114610f1657600080fd5b5056fea2646970667358221220d3ebad2506efc9ad19b36e88a9a310b27741c5170491eebcc6cac5563851dee464736f6c63430008070033"; + "0x60a06040523480156200001157600080fd5b50604051620012c3380380620012c383398181016040528101906200003791906200027c565b60008060006101000a81548160ff021916908315150217905550600073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff161480620000b95750600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16145b80620000f15750600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16145b80620001295750600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16145b1562000161576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8373ffffffffffffffffffffffffffffffffffffffff1660808173ffffffffffffffffffffffffffffffffffffffff1660601b8152505082600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555081600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555080600060016101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505050505062000341565b600081519050620002768162000327565b92915050565b6000806000806080858703121562000299576200029862000322565b5b6000620002a98782880162000265565b9450506020620002bc8782880162000265565b9350506040620002cf8782880162000265565b9250506060620002e28782880162000265565b91505092959194509250565b6000620002fb8262000302565b9050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600080fd5b6200033281620002ee565b81146200033e57600080fd5b50565b60805160601c610f636200036060003960006102160152610f636000f3fe608060405234801561001057600080fd5b50600436106100cf5760003560e01c80636128480f1161008c5780639122c344116100665780639122c344146101a2578063942a5e16146101be578063ec026901146101da578063f7fb869b146101f6576100cf565b80636128480f14610172578063779e3b631461018e5780638456cb5914610198576100cf565b806321e093b1146100d457806329dd214d146100f2578063328a01d01461010e5780633f4ba83a1461012c5780635b112591146101365780635c975abb14610154575b600080fd5b6100dc610214565b6040516100e99190610d76565b60405180910390f35b61010c60048036038101906101079190610bfa565b610238565b005b610116610242565b6040516101239190610d76565b60405180910390f35b610134610268565b005b61013e610304565b60405161014b9190610d76565b60405180910390f35b61015c61032a565b6040516101699190610dba565b60405180910390f35b61018c60048036038101906101879190610aeb565b610340565b005b6101966104b6565b005b6101a0610636565b005b6101bc60048036038101906101b79190610aeb565b6106d2565b005b6101d860048036038101906101d39190610b18565b6108a4565b005b6101f460048036038101906101ef9190610cc9565b6108af565b005b6101fe6108b2565b60405161020b9190610d76565b60405180910390f35b7f000000000000000000000000000000000000000000000000000000000000000081565b5050505050505050565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146102fa57336040517f4677a0d30000000000000000000000000000000000000000000000000000000081526004016102f19190610d76565b60405180910390fd5b6103026108d8565b565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60008060009054906101000a900460ff16905090565b600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146103d257336040517f4677a0d30000000000000000000000000000000000000000000000000000000081526004016103c99190610d76565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415610439576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b80600060016101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055507fd41d83655d484bdf299598751c371b2d92088667266fe3774b25a97bdd5d039733826040516104ab929190610d91565b60405180910390a150565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461054857336040517fe700765e00000000000000000000000000000000000000000000000000000000815260040161053f9190610d76565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff16600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614156105d1576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146106c857336040517f4677a0d30000000000000000000000000000000000000000000000000000000081526004016106bf9190610d76565b60405180910390fd5b6106d061093a565b565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415801561077e5750600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614155b156107c057336040517fcdfcef970000000000000000000000000000000000000000000000000000000081526004016107b79190610d76565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415610827576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b80600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055507fe79965b5c67dcfb2cf5fe152715e4a7256cee62a3d5dd8484fd8a8539eb8beff3382604051610899929190610d91565b60405180910390a150565b505050505050505050565b50565b600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6108e061099c565b60008060006101000a81548160ff0219169083151502179055507f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa6109236109e5565b6040516109309190610d76565b60405180910390a1565b6109426109ed565b60016000806101000a81548160ff0219169083151502179055507f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2586109856109e5565b6040516109929190610d76565b60405180910390a1565b6109a461032a565b6109e3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016109da90610dd5565b60405180910390fd5b565b600033905090565b6109f561032a565b15610a35576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610a2c90610df5565b60405180910390fd5b565b600081359050610a4681610ee8565b92915050565b600081359050610a5b81610eff565b92915050565b60008083601f840112610a7757610a76610e7d565b5b8235905067ffffffffffffffff811115610a9457610a93610e78565b5b602083019150836001820283011115610ab057610aaf610e87565b5b9250929050565b600060c08284031215610acd57610acc610e82565b5b81905092915050565b600081359050610ae581610f16565b92915050565b600060208284031215610b0157610b00610e91565b5b6000610b0f84828501610a37565b91505092915050565b600080600080600080600080600060e08a8c031215610b3a57610b39610e91565b5b6000610b488c828d01610a37565b9950506020610b598c828d01610ad6565b98505060408a013567ffffffffffffffff811115610b7a57610b79610e8c565b5b610b868c828d01610a61565b97509750506060610b998c828d01610ad6565b9550506080610baa8c828d01610ad6565b94505060a08a013567ffffffffffffffff811115610bcb57610bca610e8c565b5b610bd78c828d01610a61565b935093505060c0610bea8c828d01610a4c565b9150509295985092959850929598565b60008060008060008060008060c0898b031215610c1a57610c19610e91565b5b600089013567ffffffffffffffff811115610c3857610c37610e8c565b5b610c448b828c01610a61565b98509850506020610c578b828c01610ad6565b9650506040610c688b828c01610a37565b9550506060610c798b828c01610ad6565b945050608089013567ffffffffffffffff811115610c9a57610c99610e8c565b5b610ca68b828c01610a61565b935093505060a0610cb98b828c01610a4c565b9150509295985092959890939650565b600060208284031215610cdf57610cde610e91565b5b600082013567ffffffffffffffff811115610cfd57610cfc610e8c565b5b610d0984828501610ab7565b91505092915050565b610d1b81610e26565b82525050565b610d2a81610e38565b82525050565b6000610d3d601483610e15565b9150610d4882610e96565b602082019050919050565b6000610d60601083610e15565b9150610d6b82610ebf565b602082019050919050565b6000602082019050610d8b6000830184610d12565b92915050565b6000604082019050610da66000830185610d12565b610db36020830184610d12565b9392505050565b6000602082019050610dcf6000830184610d21565b92915050565b60006020820190508181036000830152610dee81610d30565b9050919050565b60006020820190508181036000830152610e0e81610d53565b9050919050565b600082825260208201905092915050565b6000610e3182610e4e565b9050919050565b60008115159050919050565b6000819050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b7f5061757361626c653a206e6f7420706175736564000000000000000000000000600082015250565b7f5061757361626c653a2070617573656400000000000000000000000000000000600082015250565b610ef181610e26565b8114610efc57600080fd5b50565b610f0881610e44565b8114610f1357600080fd5b50565b610f1f81610e6e565b8114610f2a57600080fd5b5056fea2646970667358221220c375137489548a3c1ee7a840e2abd35666df73012f23d94162d1b4c47171d05a64736f6c63430008070033"; type ZetaConnectorBaseConstructorParams = | [signer?: Signer] diff --git a/packages/interfaces/typechain-types/factories/contracts/ZetaConnector.eth.sol/ZetaConnectorEth__factory.ts b/packages/interfaces/typechain-types/factories/contracts/ZetaConnector.eth.sol/ZetaConnectorEth__factory.ts index ac343322..2f0d3da8 100644 --- a/packages/interfaces/typechain-types/factories/contracts/ZetaConnector.eth.sol/ZetaConnectorEth__factory.ts +++ b/packages/interfaces/typechain-types/factories/contracts/ZetaConnector.eth.sol/ZetaConnectorEth__factory.ts @@ -565,7 +565,7 @@ const _abi = [ ]; const _bytecode = - "0x60a06040523480156200001157600080fd5b506040516200213f3803806200213f833981810160405281019062000037919062000284565b8383838360008060006101000a81548160ff021916908315150217905550600073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff161480620000bd5750600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16145b80620000f55750600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16145b806200012d5750600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16145b1562000165576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8373ffffffffffffffffffffffffffffffffffffffff1660808173ffffffffffffffffffffffffffffffffffffffff1660601b8152505082600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555081600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555080600060016101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550505050505050505062000349565b6000815190506200027e816200032f565b92915050565b60008060008060808587031215620002a157620002a06200032a565b5b6000620002b1878288016200026d565b9450506020620002c4878288016200026d565b9350506040620002d7878288016200026d565b9250506060620002ea878288016200026d565b91505092959194509250565b600062000303826200030a565b9050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600080fd5b6200033a81620002f6565b81146200034657600080fd5b50565b60805160601c611dbb620003846000396000818161024f01528181610275015281816103ff01528181610dc201526110850152611dbb6000f3fe608060405234801561001057600080fd5b50600436106100ea5760003560e01c80636128480f1161008c5780639122c344116100665780639122c344146101db578063942a5e16146101f7578063ec02690114610213578063f7fb869b1461022f576100ea565b80636128480f146101ab578063779e3b63146101c75780638456cb59146101d1576100ea565b8063328a01d0116100c8578063328a01d0146101475780633f4ba83a146101655780635b1125911461016f5780635c975abb1461018d576100ea565b806321e093b1146100ef578063252bc8861461010d57806329dd214d1461012b575b600080fd5b6100f761024d565b60405161010491906118dc565b60405180910390f35b610115610271565b6040516101229190611b49565b60405180910390f35b61014560048036038101906101409190611593565b610321565b005b61014f610682565b60405161015c91906118dc565b60405180910390f35b61016d6106a8565b005b610177610744565b60405161018491906118dc565b60405180910390f35b61019561076a565b6040516101a29190611a61565b60405180910390f35b6101c560048036038101906101c09190611457565b610780565b005b6101cf6108f6565b005b6101d9610a76565b005b6101f560048036038101906101f09190611457565b610b12565b005b610211600480360381019061020c9190611484565b610ce4565b005b61022d60048036038101906102289190611662565b611039565b005b610237611208565b60405161024491906118dc565b60405180910390f35b7f000000000000000000000000000000000000000000000000000000000000000081565b60007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b81526004016102cc91906118dc565b60206040518083038186803b1580156102e457600080fd5b505afa1580156102f8573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061031c91906116ab565b905090565b61032961076a565b15610369576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161036090611ae5565b60405180910390fd5b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146103fb57336040517fff70ace20000000000000000000000000000000000000000000000000000000081526004016103f291906118dc565b60405180910390fd5b60007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663a9059cbb87876040518363ffffffff1660e01b81526004016104589291906119d3565b602060405180830381600087803b15801561047257600080fd5b505af1158015610486573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104aa9190611566565b9050806104e3576040517f20878f6200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600084849050111561061f578573ffffffffffffffffffffffffffffffffffffffff16633749c51a6040518060a001604052808c8c8080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f8201169050808301925050505050505081526020018a81526020018973ffffffffffffffffffffffffffffffffffffffff16815260200188815260200187878080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050508152506040518263ffffffff1660e01b81526004016105ec9190611b05565b600060405180830381600087803b15801561060657600080fd5b505af115801561061a573d6000803e3d6000fd5b505050505b818673ffffffffffffffffffffffffffffffffffffffff16887ff1302855733b40d8acb467ee990b6d56c05c80e28ebcabfa6e6f3f57cb50d6988c8c8a8a8a60405161066f959493929190611a7c565b60405180910390a4505050505050505050565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461073a57336040517f4677a0d300000000000000000000000000000000000000000000000000000000815260040161073191906118dc565b60405180910390fd5b61074261122e565b565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60008060009054906101000a900460ff16905090565b600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461081257336040517f4677a0d300000000000000000000000000000000000000000000000000000000815260040161080991906118dc565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415610879576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b80600060016101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055507fd41d83655d484bdf299598751c371b2d92088667266fe3774b25a97bdd5d039733826040516108eb9291906118f7565b60405180910390a150565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461098857336040517fe700765e00000000000000000000000000000000000000000000000000000000815260040161097f91906118dc565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff16600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161415610a11576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610b0857336040517f4677a0d3000000000000000000000000000000000000000000000000000000008152600401610aff91906118dc565b60405180910390fd5b610b106112cf565b565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614158015610bbe5750600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614155b15610c0057336040517fcdfcef97000000000000000000000000000000000000000000000000000000008152600401610bf791906118dc565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415610c67576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b80600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055507fe79965b5c67dcfb2cf5fe152715e4a7256cee62a3d5dd8484fd8a8539eb8beff3382604051610cd99291906118f7565b60405180910390a150565b610cec61076a565b15610d2c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610d2390611ae5565b60405180910390fd5b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610dbe57336040517fff70ace2000000000000000000000000000000000000000000000000000000008152600401610db591906118dc565b60405180910390fd5b60007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663a9059cbb8b876040518363ffffffff1660e01b8152600401610e1b9291906119d3565b602060405180830381600087803b158015610e3557600080fd5b505af1158015610e49573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e6d9190611566565b905080610ea6576040517f20878f6200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000848490501115610fe8578973ffffffffffffffffffffffffffffffffffffffff16633ff0693c6040518060c001604052808d73ffffffffffffffffffffffffffffffffffffffff1681526020018c81526020018b8b8080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f82011690508083019250505050505050815260200189815260200188815260200187878080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050508152506040518263ffffffff1660e01b8152600401610fb59190611b27565b600060405180830381600087803b158015610fcf57600080fd5b505af1158015610fe3573d6000803e3d6000fd5b505050505b81867f521fb0b407c2eb9b1375530e9b9a569889992140a688bc076aa72c1712012c888c8c8c8c8b8b8b60405161102597969594939291906119fc565b60405180910390a350505050505050505050565b61104161076a565b15611081576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161107890611ae5565b60405180910390fd5b60007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166323b872dd333085608001356040518463ffffffff1660e01b81526004016110e493929190611920565b602060405180830381600087803b1580156110fe57600080fd5b505af1158015611112573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111369190611566565b90508061116f576040517f20878f6200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b81600001353373ffffffffffffffffffffffffffffffffffffffff167f7ec1c94701e09b1652f3e1d307e60c4b9ebf99aff8c2079fd1d8c585e031c4e4328580602001906111bd9190611b64565b876080013588604001358980606001906111d79190611b64565b8b8060a001906111e79190611b64565b6040516111fc99989796959493929190611957565b60405180910390a35050565b600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b61123661076a565b611275576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161126c90611ac5565b60405180910390fd5b60008060006101000a81548160ff0219169083151502179055507f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa6112b8611371565b6040516112c591906118dc565b60405180910390a1565b6112d761076a565b15611317576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161130e90611ae5565b60405180910390fd5b60016000806101000a81548160ff0219169083151502179055507f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a25861135a611371565b60405161136791906118dc565b60405180910390a1565b600033905090565b60008135905061138881611d29565b92915050565b60008151905061139d81611d40565b92915050565b6000813590506113b281611d57565b92915050565b60008083601f8401126113ce576113cd611c9e565b5b8235905067ffffffffffffffff8111156113eb576113ea611c99565b5b60208301915083600182028301111561140757611406611cb2565b5b9250929050565b600060c0828403121561142457611423611ca8565b5b81905092915050565b60008135905061143c81611d6e565b92915050565b60008151905061145181611d6e565b92915050565b60006020828403121561146d5761146c611cc1565b5b600061147b84828501611379565b91505092915050565b600080600080600080600080600060e08a8c0312156114a6576114a5611cc1565b5b60006114b48c828d01611379565b99505060206114c58c828d0161142d565b98505060408a013567ffffffffffffffff8111156114e6576114e5611cbc565b5b6114f28c828d016113b8565b975097505060606115058c828d0161142d565b95505060806115168c828d0161142d565b94505060a08a013567ffffffffffffffff81111561153757611536611cbc565b5b6115438c828d016113b8565b935093505060c06115568c828d016113a3565b9150509295985092959850929598565b60006020828403121561157c5761157b611cc1565b5b600061158a8482850161138e565b91505092915050565b60008060008060008060008060c0898b0312156115b3576115b2611cc1565b5b600089013567ffffffffffffffff8111156115d1576115d0611cbc565b5b6115dd8b828c016113b8565b985098505060206115f08b828c0161142d565b96505060406116018b828c01611379565b95505060606116128b828c0161142d565b945050608089013567ffffffffffffffff81111561163357611632611cbc565b5b61163f8b828c016113b8565b935093505060a06116528b828c016113a3565b9150509295985092959890939650565b60006020828403121561167857611677611cc1565b5b600082013567ffffffffffffffff81111561169657611695611cbc565b5b6116a28482850161140e565b91505092915050565b6000602082840312156116c1576116c0611cc1565b5b60006116cf84828501611442565b91505092915050565b6116e181611c05565b82525050565b6116f081611c05565b82525050565b6116ff81611c17565b82525050565b60006117118385611be3565b935061171e838584611c57565b61172783611cc6565b840190509392505050565b600061173d82611bc7565b6117478185611bd2565b9350611757818560208601611c66565b61176081611cc6565b840191505092915050565b6000611778601483611bf4565b915061178382611cd7565b602082019050919050565b600061179b601083611bf4565b91506117a682611d00565b602082019050919050565b600060a08301600083015184820360008601526117ce8282611732565b91505060208301516117e360208601826118be565b5060408301516117f660408601826116d8565b50606083015161180960608601826118be565b50608083015184820360808601526118218282611732565b9150508091505092915050565b600060c08301600083015161184660008601826116d8565b50602083015161185960208601826118be565b50604083015184820360408601526118718282611732565b915050606083015161188660608601826118be565b50608083015161189960808601826118be565b5060a083015184820360a08601526118b18282611732565b9150508091505092915050565b6118c781611c4d565b82525050565b6118d681611c4d565b82525050565b60006020820190506118f160008301846116e7565b92915050565b600060408201905061190c60008301856116e7565b61191960208301846116e7565b9392505050565b600060608201905061193560008301866116e7565b61194260208301856116e7565b61194f60408301846118cd565b949350505050565b600060c08201905061196c600083018c6116e7565b818103602083015261197f818a8c611705565b905061198e60408301896118cd565b61199b60608301886118cd565b81810360808301526119ae818688611705565b905081810360a08301526119c3818486611705565b90509a9950505050505050505050565b60006040820190506119e860008301856116e7565b6119f560208301846118cd565b9392505050565b600060a082019050611a11600083018a6116e7565b611a1e60208301896118cd565b8181036040830152611a31818789611705565b9050611a4060608301866118cd565b8181036080830152611a53818486611705565b905098975050505050505050565b6000602082019050611a7660008301846116f6565b92915050565b60006060820190508181036000830152611a97818789611705565b9050611aa660208301866118cd565b8181036040830152611ab9818486611705565b90509695505050505050565b60006020820190508181036000830152611ade8161176b565b9050919050565b60006020820190508181036000830152611afe8161178e565b9050919050565b60006020820190508181036000830152611b1f81846117b1565b905092915050565b60006020820190508181036000830152611b41818461182e565b905092915050565b6000602082019050611b5e60008301846118cd565b92915050565b60008083356001602003843603038112611b8157611b80611cad565b5b80840192508235915067ffffffffffffffff821115611ba357611ba2611ca3565b5b602083019250600182023603831315611bbf57611bbe611cb7565b5b509250929050565b600081519050919050565b600082825260208201905092915050565b600082825260208201905092915050565b600082825260208201905092915050565b6000611c1082611c2d565b9050919050565b60008115159050919050565b6000819050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b82818337600083830152505050565b60005b83811015611c84578082015181840152602081019050611c69565b83811115611c93576000848401525b50505050565b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f5061757361626c653a206e6f7420706175736564000000000000000000000000600082015250565b7f5061757361626c653a2070617573656400000000000000000000000000000000600082015250565b611d3281611c05565b8114611d3d57600080fd5b50565b611d4981611c17565b8114611d5457600080fd5b50565b611d6081611c23565b8114611d6b57600080fd5b50565b611d7781611c4d565b8114611d8257600080fd5b5056fea26469706673582212204afae5ba3a424139ef405c884be1de5add9bbfcccb641fabd41c670b0fffb5db64736f6c63430008070033"; + "0x60a06040523480156200001157600080fd5b506040516200209338038062002093833981810160405281019062000037919062000284565b8383838360008060006101000a81548160ff021916908315150217905550600073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff161480620000bd5750600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16145b80620000f55750600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16145b806200012d5750600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16145b1562000165576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8373ffffffffffffffffffffffffffffffffffffffff1660808173ffffffffffffffffffffffffffffffffffffffff1660601b8152505082600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555081600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555080600060016101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550505050505050505062000349565b6000815190506200027e816200032f565b92915050565b60008060008060808587031215620002a157620002a06200032a565b5b6000620002b1878288016200026d565b9450506020620002c4878288016200026d565b9350506040620002d7878288016200026d565b9250506060620002ea878288016200026d565b91505092959194509250565b600062000303826200030a565b9050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600080fd5b6200033a81620002f6565b81146200034657600080fd5b50565b60805160601c611d0f620003846000396000818161024f01528181610275015281816103bf01528181610d420152610fc50152611d0f6000f3fe608060405234801561001057600080fd5b50600436106100ea5760003560e01c80636128480f1161008c5780639122c344116100665780639122c344146101db578063942a5e16146101f7578063ec02690114610213578063f7fb869b1461022f576100ea565b80636128480f146101ab578063779e3b63146101c75780638456cb59146101d1576100ea565b8063328a01d0116100c8578063328a01d0146101475780633f4ba83a146101655780635b1125911461016f5780635c975abb1461018d576100ea565b806321e093b1146100ef578063252bc8861461010d57806329dd214d1461012b575b600080fd5b6100f761024d565b6040516101049190611830565b60405180910390f35b610115610271565b6040516101229190611a9d565b60405180910390f35b610145600480360381019061014091906114e7565b610321565b005b61014f610642565b60405161015c9190611830565b60405180910390f35b61016d610668565b005b610177610704565b6040516101849190611830565b60405180910390f35b61019561072a565b6040516101a291906119b5565b60405180910390f35b6101c560048036038101906101c091906113ab565b610740565b005b6101cf6108b6565b005b6101d9610a36565b005b6101f560048036038101906101f091906113ab565b610ad2565b005b610211600480360381019061020c91906113d8565b610ca4565b005b61022d600480360381019061022891906115b6565b610fb9565b005b610237611148565b6040516102449190611830565b60405180910390f35b7f000000000000000000000000000000000000000000000000000000000000000081565b60007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b81526004016102cc9190611830565b60206040518083038186803b1580156102e457600080fd5b505afa1580156102f8573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061031c91906115ff565b905090565b61032961116e565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146103bb57336040517fff70ace20000000000000000000000000000000000000000000000000000000081526004016103b29190611830565b60405180910390fd5b60007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663a9059cbb87876040518363ffffffff1660e01b8152600401610418929190611927565b602060405180830381600087803b15801561043257600080fd5b505af1158015610446573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061046a91906114ba565b9050806104a3576040517f20878f6200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008484905011156105df578573ffffffffffffffffffffffffffffffffffffffff16633749c51a6040518060a001604052808c8c8080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f8201169050808301925050505050505081526020018a81526020018973ffffffffffffffffffffffffffffffffffffffff16815260200188815260200187878080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050508152506040518263ffffffff1660e01b81526004016105ac9190611a59565b600060405180830381600087803b1580156105c657600080fd5b505af11580156105da573d6000803e3d6000fd5b505050505b818673ffffffffffffffffffffffffffffffffffffffff16887ff1302855733b40d8acb467ee990b6d56c05c80e28ebcabfa6e6f3f57cb50d6988c8c8a8a8a60405161062f9594939291906119d0565b60405180910390a4505050505050505050565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146106fa57336040517f4677a0d30000000000000000000000000000000000000000000000000000000081526004016106f19190611830565b60405180910390fd5b6107026111b8565b565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60008060009054906101000a900460ff16905090565b600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146107d257336040517f4677a0d30000000000000000000000000000000000000000000000000000000081526004016107c99190611830565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415610839576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b80600060016101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055507fd41d83655d484bdf299598751c371b2d92088667266fe3774b25a97bdd5d039733826040516108ab92919061184b565b60405180910390a150565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461094857336040517fe700765e00000000000000000000000000000000000000000000000000000000815260040161093f9190611830565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff16600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614156109d1576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610ac857336040517f4677a0d3000000000000000000000000000000000000000000000000000000008152600401610abf9190611830565b60405180910390fd5b610ad061121a565b565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614158015610b7e5750600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614155b15610bc057336040517fcdfcef97000000000000000000000000000000000000000000000000000000008152600401610bb79190611830565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415610c27576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b80600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055507fe79965b5c67dcfb2cf5fe152715e4a7256cee62a3d5dd8484fd8a8539eb8beff3382604051610c9992919061184b565b60405180910390a150565b610cac61116e565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610d3e57336040517fff70ace2000000000000000000000000000000000000000000000000000000008152600401610d359190611830565b60405180910390fd5b60007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663a9059cbb8b876040518363ffffffff1660e01b8152600401610d9b929190611927565b602060405180830381600087803b158015610db557600080fd5b505af1158015610dc9573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ded91906114ba565b905080610e26576040517f20878f6200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000848490501115610f68578973ffffffffffffffffffffffffffffffffffffffff16633ff0693c6040518060c001604052808d73ffffffffffffffffffffffffffffffffffffffff1681526020018c81526020018b8b8080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f82011690508083019250505050505050815260200189815260200188815260200187878080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050508152506040518263ffffffff1660e01b8152600401610f359190611a7b565b600060405180830381600087803b158015610f4f57600080fd5b505af1158015610f63573d6000803e3d6000fd5b505050505b81867f521fb0b407c2eb9b1375530e9b9a569889992140a688bc076aa72c1712012c888c8c8c8c8b8b8b604051610fa59796959493929190611950565b60405180910390a350505050505050505050565b610fc161116e565b60007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166323b872dd333085608001356040518463ffffffff1660e01b815260040161102493929190611874565b602060405180830381600087803b15801561103e57600080fd5b505af1158015611052573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061107691906114ba565b9050806110af576040517f20878f6200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b81600001353373ffffffffffffffffffffffffffffffffffffffff167f7ec1c94701e09b1652f3e1d307e60c4b9ebf99aff8c2079fd1d8c585e031c4e4328580602001906110fd9190611ab8565b876080013588604001358980606001906111179190611ab8565b8b8060a001906111279190611ab8565b60405161113c999897969594939291906118ab565b60405180910390a35050565b600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b61117661072a565b156111b6576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016111ad90611a39565b60405180910390fd5b565b6111c061127c565b60008060006101000a81548160ff0219169083151502179055507f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa6112036112c5565b6040516112109190611830565b60405180910390a1565b61122261116e565b60016000806101000a81548160ff0219169083151502179055507f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2586112656112c5565b6040516112729190611830565b60405180910390a1565b61128461072a565b6112c3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016112ba90611a19565b60405180910390fd5b565b600033905090565b6000813590506112dc81611c7d565b92915050565b6000815190506112f181611c94565b92915050565b60008135905061130681611cab565b92915050565b60008083601f84011261132257611321611bf2565b5b8235905067ffffffffffffffff81111561133f5761133e611bed565b5b60208301915083600182028301111561135b5761135a611c06565b5b9250929050565b600060c0828403121561137857611377611bfc565b5b81905092915050565b60008135905061139081611cc2565b92915050565b6000815190506113a581611cc2565b92915050565b6000602082840312156113c1576113c0611c15565b5b60006113cf848285016112cd565b91505092915050565b600080600080600080600080600060e08a8c0312156113fa576113f9611c15565b5b60006114088c828d016112cd565b99505060206114198c828d01611381565b98505060408a013567ffffffffffffffff81111561143a57611439611c10565b5b6114468c828d0161130c565b975097505060606114598c828d01611381565b955050608061146a8c828d01611381565b94505060a08a013567ffffffffffffffff81111561148b5761148a611c10565b5b6114978c828d0161130c565b935093505060c06114aa8c828d016112f7565b9150509295985092959850929598565b6000602082840312156114d0576114cf611c15565b5b60006114de848285016112e2565b91505092915050565b60008060008060008060008060c0898b03121561150757611506611c15565b5b600089013567ffffffffffffffff81111561152557611524611c10565b5b6115318b828c0161130c565b985098505060206115448b828c01611381565b96505060406115558b828c016112cd565b95505060606115668b828c01611381565b945050608089013567ffffffffffffffff81111561158757611586611c10565b5b6115938b828c0161130c565b935093505060a06115a68b828c016112f7565b9150509295985092959890939650565b6000602082840312156115cc576115cb611c15565b5b600082013567ffffffffffffffff8111156115ea576115e9611c10565b5b6115f684828501611362565b91505092915050565b60006020828403121561161557611614611c15565b5b600061162384828501611396565b91505092915050565b61163581611b59565b82525050565b61164481611b59565b82525050565b61165381611b6b565b82525050565b60006116658385611b37565b9350611672838584611bab565b61167b83611c1a565b840190509392505050565b600061169182611b1b565b61169b8185611b26565b93506116ab818560208601611bba565b6116b481611c1a565b840191505092915050565b60006116cc601483611b48565b91506116d782611c2b565b602082019050919050565b60006116ef601083611b48565b91506116fa82611c54565b602082019050919050565b600060a08301600083015184820360008601526117228282611686565b91505060208301516117376020860182611812565b50604083015161174a604086018261162c565b50606083015161175d6060860182611812565b50608083015184820360808601526117758282611686565b9150508091505092915050565b600060c08301600083015161179a600086018261162c565b5060208301516117ad6020860182611812565b50604083015184820360408601526117c58282611686565b91505060608301516117da6060860182611812565b5060808301516117ed6080860182611812565b5060a083015184820360a08601526118058282611686565b9150508091505092915050565b61181b81611ba1565b82525050565b61182a81611ba1565b82525050565b6000602082019050611845600083018461163b565b92915050565b6000604082019050611860600083018561163b565b61186d602083018461163b565b9392505050565b6000606082019050611889600083018661163b565b611896602083018561163b565b6118a36040830184611821565b949350505050565b600060c0820190506118c0600083018c61163b565b81810360208301526118d3818a8c611659565b90506118e26040830189611821565b6118ef6060830188611821565b8181036080830152611902818688611659565b905081810360a0830152611917818486611659565b90509a9950505050505050505050565b600060408201905061193c600083018561163b565b6119496020830184611821565b9392505050565b600060a082019050611965600083018a61163b565b6119726020830189611821565b8181036040830152611985818789611659565b90506119946060830186611821565b81810360808301526119a7818486611659565b905098975050505050505050565b60006020820190506119ca600083018461164a565b92915050565b600060608201905081810360008301526119eb818789611659565b90506119fa6020830186611821565b8181036040830152611a0d818486611659565b90509695505050505050565b60006020820190508181036000830152611a32816116bf565b9050919050565b60006020820190508181036000830152611a52816116e2565b9050919050565b60006020820190508181036000830152611a738184611705565b905092915050565b60006020820190508181036000830152611a958184611782565b905092915050565b6000602082019050611ab26000830184611821565b92915050565b60008083356001602003843603038112611ad557611ad4611c01565b5b80840192508235915067ffffffffffffffff821115611af757611af6611bf7565b5b602083019250600182023603831315611b1357611b12611c0b565b5b509250929050565b600081519050919050565b600082825260208201905092915050565b600082825260208201905092915050565b600082825260208201905092915050565b6000611b6482611b81565b9050919050565b60008115159050919050565b6000819050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b82818337600083830152505050565b60005b83811015611bd8578082015181840152602081019050611bbd565b83811115611be7576000848401525b50505050565b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f5061757361626c653a206e6f7420706175736564000000000000000000000000600082015250565b7f5061757361626c653a2070617573656400000000000000000000000000000000600082015250565b611c8681611b59565b8114611c9157600080fd5b50565b611c9d81611b6b565b8114611ca857600080fd5b50565b611cb481611b77565b8114611cbf57600080fd5b50565b611ccb81611ba1565b8114611cd657600080fd5b5056fea26469706673582212204afecc5390ad266fc43f948210dde48d44dfd42ab1a0379d9c40b7ed6307342b64736f6c63430008070033"; type ZetaConnectorEthConstructorParams = | [signer?: Signer] diff --git a/packages/interfaces/typechain-types/factories/contracts/ZetaConnector.non-eth.sol/ZetaConnectorNonEth__factory.ts b/packages/interfaces/typechain-types/factories/contracts/ZetaConnector.non-eth.sol/ZetaConnectorNonEth__factory.ts index 2c5e0042..c7e9a3ee 100644 --- a/packages/interfaces/typechain-types/factories/contracts/ZetaConnector.non-eth.sol/ZetaConnectorNonEth__factory.ts +++ b/packages/interfaces/typechain-types/factories/contracts/ZetaConnector.non-eth.sol/ZetaConnectorNonEth__factory.ts @@ -591,7 +591,7 @@ const _abi = [ ]; const _bytecode = - "0x60a06040527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6003553480156200003557600080fd5b506040516200239b3803806200239b83398181016040528101906200005b9190620002a8565b8383838360008060006101000a81548160ff021916908315150217905550600073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff161480620000e15750600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16145b80620001195750600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16145b80620001515750600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16145b1562000189576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8373ffffffffffffffffffffffffffffffffffffffff1660808173ffffffffffffffffffffffffffffffffffffffff1660601b8152505082600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555081600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555080600060016101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050505050505050506200036d565b600081519050620002a28162000353565b92915050565b60008060008060808587031215620002c557620002c46200034e565b5b6000620002d58782880162000291565b9450506020620002e88782880162000291565b9350506040620002fb8782880162000291565b92505060606200030e8782880162000291565b91505092959194509250565b600062000327826200032e565b9050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600080fd5b6200035e816200031a565b81146200036a57600080fd5b50565b60805160601c611fe5620003b66000396000818161029f015281816102c5015281816104500152818161053e01528181610f460152818161103401526112a30152611fe56000f3fe608060405234801561001057600080fd5b50600436106101005760003560e01c80636f8b44b011610097578063942a5e1611610066578063942a5e1614610229578063d5abeb0114610245578063ec02690114610263578063f7fb869b1461027f57610100565b80636f8b44b0146101dd578063779e3b63146101f95780638456cb59146102035780639122c3441461020d57610100565b80633f4ba83a116100d35780633f4ba83a1461017b5780635b112591146101855780635c975abb146101a35780636128480f146101c157610100565b806321e093b114610105578063252bc8861461012357806329dd214d14610141578063328a01d01461015d575b600080fd5b61010d61029d565b60405161011a9190611a98565b60405180910390f35b61012b6102c1565b6040516101389190611d05565b60405180910390f35b61015b60048036038101906101569190611713565b610371565b005b610165610769565b6040516101729190611a98565b60405180910390f35b61018361078f565b005b61018d61082b565b60405161019a9190611a98565b60405180910390f35b6101ab610851565b6040516101b89190611c1d565b60405180910390f35b6101db60048036038101906101d69190611604565b610867565b005b6101f760048036038101906101f2919061182b565b6109dd565b005b610201610a79565b005b61020b610bf9565b005b61022760048036038101906102229190611604565b610c95565b005b610243600480360381019061023e9190611631565b610e67565b005b61024d611253565b60405161025a9190611d05565b60405180910390f35b61027d600480360381019061027891906117e2565b611259565b005b6102876113ca565b6040516102949190611a98565b60405180910390f35b7f000000000000000000000000000000000000000000000000000000000000000081565b60007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b815260040161031c9190611a98565b60206040518083038186803b15801561033457600080fd5b505afa158015610348573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061036c9190611858565b905090565b610379610851565b156103b9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016103b090611ca1565b60405180910390fd5b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461044b57336040517fff70ace20000000000000000000000000000000000000000000000000000000081526004016104429190611a98565b60405180910390fd5b6003547f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166318160ddd6040518163ffffffff1660e01b815260040160206040518083038186803b1580156104b457600080fd5b505afa1580156104c8573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104ec9190611858565b856104f79190611dc1565b111561053c576003546040517f3d3dbc830000000000000000000000000000000000000000000000000000000081526004016105339190611d05565b60405180910390fd5b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16631e458bee8686846040518463ffffffff1660e01b815260040161059993929190611b81565b600060405180830381600087803b1580156105b357600080fd5b505af11580156105c7573d6000803e3d6000fd5b505050506000838390501115610707578473ffffffffffffffffffffffffffffffffffffffff16633749c51a6040518060a001604052808b8b8080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f8201169050808301925050505050505081526020018981526020018873ffffffffffffffffffffffffffffffffffffffff16815260200187815260200186868080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050508152506040518263ffffffff1660e01b81526004016106d49190611cc1565b600060405180830381600087803b1580156106ee57600080fd5b505af1158015610702573d6000803e3d6000fd5b505050505b808573ffffffffffffffffffffffffffffffffffffffff16877ff1302855733b40d8acb467ee990b6d56c05c80e28ebcabfa6e6f3f57cb50d6988b8b898989604051610757959493929190611c38565b60405180910390a45050505050505050565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461082157336040517f4677a0d30000000000000000000000000000000000000000000000000000000081526004016108189190611a98565b60405180910390fd5b6108296113f0565b565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60008060009054906101000a900460ff16905090565b600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146108f957336040517f4677a0d30000000000000000000000000000000000000000000000000000000081526004016108f09190611a98565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415610960576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b80600060016101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055507fd41d83655d484bdf299598751c371b2d92088667266fe3774b25a97bdd5d039733826040516109d2929190611ab3565b60405180910390a150565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610a6f57336040517fff70ace2000000000000000000000000000000000000000000000000000000008152600401610a669190611a98565b60405180910390fd5b8060038190555050565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610b0b57336040517fe700765e000000000000000000000000000000000000000000000000000000008152600401610b029190611a98565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff16600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161415610b94576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610c8b57336040517f4677a0d3000000000000000000000000000000000000000000000000000000008152600401610c829190611a98565b60405180910390fd5b610c93611491565b565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614158015610d415750600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614155b15610d8357336040517fcdfcef97000000000000000000000000000000000000000000000000000000008152600401610d7a9190611a98565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415610dea576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b80600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055507fe79965b5c67dcfb2cf5fe152715e4a7256cee62a3d5dd8484fd8a8539eb8beff3382604051610e5c929190611ab3565b60405180910390a150565b610e6f610851565b15610eaf576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610ea690611ca1565b60405180910390fd5b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610f4157336040517fff70ace2000000000000000000000000000000000000000000000000000000008152600401610f389190611a98565b60405180910390fd5b6003547f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166318160ddd6040518163ffffffff1660e01b815260040160206040518083038186803b158015610faa57600080fd5b505afa158015610fbe573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610fe29190611858565b85610fed9190611dc1565b1115611032576003546040517f3d3dbc830000000000000000000000000000000000000000000000000000000081526004016110299190611d05565b60405180910390fd5b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16631e458bee8a86846040518463ffffffff1660e01b815260040161108f93929190611b81565b600060405180830381600087803b1580156110a957600080fd5b505af11580156110bd573d6000803e3d6000fd5b505050506000838390501115611203578873ffffffffffffffffffffffffffffffffffffffff16633ff0693c6040518060c001604052808c73ffffffffffffffffffffffffffffffffffffffff1681526020018b81526020018a8a8080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f82011690508083019250505050505050815260200188815260200187815260200186868080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050508152506040518263ffffffff1660e01b81526004016111d09190611ce3565b600060405180830381600087803b1580156111ea57600080fd5b505af11580156111fe573d6000803e3d6000fd5b505050505b80857f521fb0b407c2eb9b1375530e9b9a569889992140a688bc076aa72c1712012c888b8b8b8b8a8a8a6040516112409796959493929190611bb8565b60405180910390a3505050505050505050565b60035481565b611261610851565b156112a1576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161129890611ca1565b60405180910390fd5b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166379cc67903383608001356040518363ffffffff1660e01b8152600401611300929190611b58565b600060405180830381600087803b15801561131a57600080fd5b505af115801561132e573d6000803e3d6000fd5b5050505080600001353373ffffffffffffffffffffffffffffffffffffffff167f7ec1c94701e09b1652f3e1d307e60c4b9ebf99aff8c2079fd1d8c585e031c4e4328480602001906113809190611d20565b8660800135876040013588806060019061139a9190611d20565b8a8060a001906113aa9190611d20565b6040516113bf99989796959493929190611adc565b60405180910390a350565b600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6113f8610851565b611437576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161142e90611c81565b60405180910390fd5b60008060006101000a81548160ff0219169083151502179055507f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa61147a611533565b6040516114879190611a98565b60405180910390a1565b611499610851565b156114d9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016114d090611ca1565b60405180910390fd5b60016000806101000a81548160ff0219169083151502179055507f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a25861151c611533565b6040516115299190611a98565b60405180910390a1565b600033905090565b60008135905061154a81611f6a565b92915050565b60008135905061155f81611f81565b92915050565b60008083601f84011261157b5761157a611edf565b5b8235905067ffffffffffffffff81111561159857611597611eda565b5b6020830191508360018202830111156115b4576115b3611ef3565b5b9250929050565b600060c082840312156115d1576115d0611ee9565b5b81905092915050565b6000813590506115e981611f98565b92915050565b6000815190506115fe81611f98565b92915050565b60006020828403121561161a57611619611f02565b5b60006116288482850161153b565b91505092915050565b600080600080600080600080600060e08a8c03121561165357611652611f02565b5b60006116618c828d0161153b565b99505060206116728c828d016115da565b98505060408a013567ffffffffffffffff81111561169357611692611efd565b5b61169f8c828d01611565565b975097505060606116b28c828d016115da565b95505060806116c38c828d016115da565b94505060a08a013567ffffffffffffffff8111156116e4576116e3611efd565b5b6116f08c828d01611565565b935093505060c06117038c828d01611550565b9150509295985092959850929598565b60008060008060008060008060c0898b03121561173357611732611f02565b5b600089013567ffffffffffffffff81111561175157611750611efd565b5b61175d8b828c01611565565b985098505060206117708b828c016115da565b96505060406117818b828c0161153b565b95505060606117928b828c016115da565b945050608089013567ffffffffffffffff8111156117b3576117b2611efd565b5b6117bf8b828c01611565565b935093505060a06117d28b828c01611550565b9150509295985092959890939650565b6000602082840312156117f8576117f7611f02565b5b600082013567ffffffffffffffff81111561181657611815611efd565b5b611822848285016115bb565b91505092915050565b60006020828403121561184157611840611f02565b5b600061184f848285016115da565b91505092915050565b60006020828403121561186e5761186d611f02565b5b600061187c848285016115ef565b91505092915050565b61188e81611e17565b82525050565b61189d81611e17565b82525050565b6118ac81611e29565b82525050565b6118bb81611e35565b82525050565b60006118cd8385611d9f565b93506118da838584611e69565b6118e383611f07565b840190509392505050565b60006118f982611d83565b6119038185611d8e565b9350611913818560208601611e78565b61191c81611f07565b840191505092915050565b6000611934601483611db0565b915061193f82611f18565b602082019050919050565b6000611957601083611db0565b915061196282611f41565b602082019050919050565b600060a083016000830151848203600086015261198a82826118ee565b915050602083015161199f6020860182611a7a565b5060408301516119b26040860182611885565b5060608301516119c56060860182611a7a565b50608083015184820360808601526119dd82826118ee565b9150508091505092915050565b600060c083016000830151611a026000860182611885565b506020830151611a156020860182611a7a565b5060408301518482036040860152611a2d82826118ee565b9150506060830151611a426060860182611a7a565b506080830151611a556080860182611a7a565b5060a083015184820360a0860152611a6d82826118ee565b9150508091505092915050565b611a8381611e5f565b82525050565b611a9281611e5f565b82525050565b6000602082019050611aad6000830184611894565b92915050565b6000604082019050611ac86000830185611894565b611ad56020830184611894565b9392505050565b600060c082019050611af1600083018c611894565b8181036020830152611b04818a8c6118c1565b9050611b136040830189611a89565b611b206060830188611a89565b8181036080830152611b338186886118c1565b905081810360a0830152611b488184866118c1565b90509a9950505050505050505050565b6000604082019050611b6d6000830185611894565b611b7a6020830184611a89565b9392505050565b6000606082019050611b966000830186611894565b611ba36020830185611a89565b611bb060408301846118b2565b949350505050565b600060a082019050611bcd600083018a611894565b611bda6020830189611a89565b8181036040830152611bed8187896118c1565b9050611bfc6060830186611a89565b8181036080830152611c0f8184866118c1565b905098975050505050505050565b6000602082019050611c3260008301846118a3565b92915050565b60006060820190508181036000830152611c538187896118c1565b9050611c626020830186611a89565b8181036040830152611c758184866118c1565b90509695505050505050565b60006020820190508181036000830152611c9a81611927565b9050919050565b60006020820190508181036000830152611cba8161194a565b9050919050565b60006020820190508181036000830152611cdb818461196d565b905092915050565b60006020820190508181036000830152611cfd81846119ea565b905092915050565b6000602082019050611d1a6000830184611a89565b92915050565b60008083356001602003843603038112611d3d57611d3c611eee565b5b80840192508235915067ffffffffffffffff821115611d5f57611d5e611ee4565b5b602083019250600182023603831315611d7b57611d7a611ef8565b5b509250929050565b600081519050919050565b600082825260208201905092915050565b600082825260208201905092915050565b600082825260208201905092915050565b6000611dcc82611e5f565b9150611dd783611e5f565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff03821115611e0c57611e0b611eab565b5b828201905092915050565b6000611e2282611e3f565b9050919050565b60008115159050919050565b6000819050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b82818337600083830152505050565b60005b83811015611e96578082015181840152602081019050611e7b565b83811115611ea5576000848401525b50505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f5061757361626c653a206e6f7420706175736564000000000000000000000000600082015250565b7f5061757361626c653a2070617573656400000000000000000000000000000000600082015250565b611f7381611e17565b8114611f7e57600080fd5b50565b611f8a81611e35565b8114611f9557600080fd5b50565b611fa181611e5f565b8114611fac57600080fd5b5056fea26469706673582212207c81f3eda238f1aaea94a3be443049f79c941c060e4a8f0c9b2110fa6330805e64736f6c63430008070033"; + "0x60a06040527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6003553480156200003557600080fd5b50604051620022ef380380620022ef83398181016040528101906200005b9190620002a8565b8383838360008060006101000a81548160ff021916908315150217905550600073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff161480620000e15750600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16145b80620001195750600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16145b80620001515750600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16145b1562000189576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8373ffffffffffffffffffffffffffffffffffffffff1660808173ffffffffffffffffffffffffffffffffffffffff1660601b8152505082600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555081600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555080600060016101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050505050505050506200036d565b600081519050620002a28162000353565b92915050565b60008060008060808587031215620002c557620002c46200034e565b5b6000620002d58782880162000291565b9450506020620002e88782880162000291565b9350506040620002fb8782880162000291565b92505060606200030e8782880162000291565b91505092959194509250565b600062000327826200032e565b9050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600080fd5b6200035e816200031a565b81146200036a57600080fd5b50565b60805160601c611f39620003b66000396000818161029f015281816102c501528181610410015281816104fe01528181610ec601528181610fb401526111e30152611f396000f3fe608060405234801561001057600080fd5b50600436106101005760003560e01c80636f8b44b011610097578063942a5e1611610066578063942a5e1614610229578063d5abeb0114610245578063ec02690114610263578063f7fb869b1461027f57610100565b80636f8b44b0146101dd578063779e3b63146101f95780638456cb59146102035780639122c3441461020d57610100565b80633f4ba83a116100d35780633f4ba83a1461017b5780635b112591146101855780635c975abb146101a35780636128480f146101c157610100565b806321e093b114610105578063252bc8861461012357806329dd214d14610141578063328a01d01461015d575b600080fd5b61010d61029d565b60405161011a91906119ec565b60405180910390f35b61012b6102c1565b6040516101389190611c59565b60405180910390f35b61015b60048036038101906101569190611667565b610371565b005b610165610729565b60405161017291906119ec565b60405180910390f35b61018361074f565b005b61018d6107eb565b60405161019a91906119ec565b60405180910390f35b6101ab610811565b6040516101b89190611b71565b60405180910390f35b6101db60048036038101906101d69190611558565b610827565b005b6101f760048036038101906101f2919061177f565b61099d565b005b610201610a39565b005b61020b610bb9565b005b61022760048036038101906102229190611558565b610c55565b005b610243600480360381019061023e9190611585565b610e27565b005b61024d6111d3565b60405161025a9190611c59565b60405180910390f35b61027d60048036038101906102789190611736565b6111d9565b005b61028761130a565b60405161029491906119ec565b60405180910390f35b7f000000000000000000000000000000000000000000000000000000000000000081565b60007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b815260040161031c91906119ec565b60206040518083038186803b15801561033457600080fd5b505afa158015610348573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061036c91906117ac565b905090565b610379611330565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461040b57336040517fff70ace200000000000000000000000000000000000000000000000000000000815260040161040291906119ec565b60405180910390fd5b6003547f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166318160ddd6040518163ffffffff1660e01b815260040160206040518083038186803b15801561047457600080fd5b505afa158015610488573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104ac91906117ac565b856104b79190611d15565b11156104fc576003546040517f3d3dbc830000000000000000000000000000000000000000000000000000000081526004016104f39190611c59565b60405180910390fd5b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16631e458bee8686846040518463ffffffff1660e01b815260040161055993929190611ad5565b600060405180830381600087803b15801561057357600080fd5b505af1158015610587573d6000803e3d6000fd5b5050505060008383905011156106c7578473ffffffffffffffffffffffffffffffffffffffff16633749c51a6040518060a001604052808b8b8080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f8201169050808301925050505050505081526020018981526020018873ffffffffffffffffffffffffffffffffffffffff16815260200187815260200186868080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050508152506040518263ffffffff1660e01b81526004016106949190611c15565b600060405180830381600087803b1580156106ae57600080fd5b505af11580156106c2573d6000803e3d6000fd5b505050505b808573ffffffffffffffffffffffffffffffffffffffff16877ff1302855733b40d8acb467ee990b6d56c05c80e28ebcabfa6e6f3f57cb50d6988b8b898989604051610717959493929190611b8c565b60405180910390a45050505050505050565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146107e157336040517f4677a0d30000000000000000000000000000000000000000000000000000000081526004016107d891906119ec565b60405180910390fd5b6107e961137a565b565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60008060009054906101000a900460ff16905090565b600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146108b957336040517f4677a0d30000000000000000000000000000000000000000000000000000000081526004016108b091906119ec565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415610920576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b80600060016101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055507fd41d83655d484bdf299598751c371b2d92088667266fe3774b25a97bdd5d03973382604051610992929190611a07565b60405180910390a150565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610a2f57336040517fff70ace2000000000000000000000000000000000000000000000000000000008152600401610a2691906119ec565b60405180910390fd5b8060038190555050565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610acb57336040517fe700765e000000000000000000000000000000000000000000000000000000008152600401610ac291906119ec565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff16600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161415610b54576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610c4b57336040517f4677a0d3000000000000000000000000000000000000000000000000000000008152600401610c4291906119ec565b60405180910390fd5b610c536113dc565b565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614158015610d015750600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614155b15610d4357336040517fcdfcef97000000000000000000000000000000000000000000000000000000008152600401610d3a91906119ec565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415610daa576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b80600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055507fe79965b5c67dcfb2cf5fe152715e4a7256cee62a3d5dd8484fd8a8539eb8beff3382604051610e1c929190611a07565b60405180910390a150565b610e2f611330565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610ec157336040517fff70ace2000000000000000000000000000000000000000000000000000000008152600401610eb891906119ec565b60405180910390fd5b6003547f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166318160ddd6040518163ffffffff1660e01b815260040160206040518083038186803b158015610f2a57600080fd5b505afa158015610f3e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f6291906117ac565b85610f6d9190611d15565b1115610fb2576003546040517f3d3dbc83000000000000000000000000000000000000000000000000000000008152600401610fa99190611c59565b60405180910390fd5b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16631e458bee8a86846040518463ffffffff1660e01b815260040161100f93929190611ad5565b600060405180830381600087803b15801561102957600080fd5b505af115801561103d573d6000803e3d6000fd5b505050506000838390501115611183578873ffffffffffffffffffffffffffffffffffffffff16633ff0693c6040518060c001604052808c73ffffffffffffffffffffffffffffffffffffffff1681526020018b81526020018a8a8080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f82011690508083019250505050505050815260200188815260200187815260200186868080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050508152506040518263ffffffff1660e01b81526004016111509190611c37565b600060405180830381600087803b15801561116a57600080fd5b505af115801561117e573d6000803e3d6000fd5b505050505b80857f521fb0b407c2eb9b1375530e9b9a569889992140a688bc076aa72c1712012c888b8b8b8b8a8a8a6040516111c09796959493929190611b0c565b60405180910390a3505050505050505050565b60035481565b6111e1611330565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166379cc67903383608001356040518363ffffffff1660e01b8152600401611240929190611aac565b600060405180830381600087803b15801561125a57600080fd5b505af115801561126e573d6000803e3d6000fd5b5050505080600001353373ffffffffffffffffffffffffffffffffffffffff167f7ec1c94701e09b1652f3e1d307e60c4b9ebf99aff8c2079fd1d8c585e031c4e4328480602001906112c09190611c74565b866080013587604001358880606001906112da9190611c74565b8a8060a001906112ea9190611c74565b6040516112ff99989796959493929190611a30565b60405180910390a350565b600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b611338610811565b15611378576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161136f90611bf5565b60405180910390fd5b565b61138261143e565b60008060006101000a81548160ff0219169083151502179055507f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa6113c5611487565b6040516113d291906119ec565b60405180910390a1565b6113e4611330565b60016000806101000a81548160ff0219169083151502179055507f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258611427611487565b60405161143491906119ec565b60405180910390a1565b611446610811565b611485576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161147c90611bd5565b60405180910390fd5b565b600033905090565b60008135905061149e81611ebe565b92915050565b6000813590506114b381611ed5565b92915050565b60008083601f8401126114cf576114ce611e33565b5b8235905067ffffffffffffffff8111156114ec576114eb611e2e565b5b60208301915083600182028301111561150857611507611e47565b5b9250929050565b600060c0828403121561152557611524611e3d565b5b81905092915050565b60008135905061153d81611eec565b92915050565b60008151905061155281611eec565b92915050565b60006020828403121561156e5761156d611e56565b5b600061157c8482850161148f565b91505092915050565b600080600080600080600080600060e08a8c0312156115a7576115a6611e56565b5b60006115b58c828d0161148f565b99505060206115c68c828d0161152e565b98505060408a013567ffffffffffffffff8111156115e7576115e6611e51565b5b6115f38c828d016114b9565b975097505060606116068c828d0161152e565b95505060806116178c828d0161152e565b94505060a08a013567ffffffffffffffff81111561163857611637611e51565b5b6116448c828d016114b9565b935093505060c06116578c828d016114a4565b9150509295985092959850929598565b60008060008060008060008060c0898b03121561168757611686611e56565b5b600089013567ffffffffffffffff8111156116a5576116a4611e51565b5b6116b18b828c016114b9565b985098505060206116c48b828c0161152e565b96505060406116d58b828c0161148f565b95505060606116e68b828c0161152e565b945050608089013567ffffffffffffffff81111561170757611706611e51565b5b6117138b828c016114b9565b935093505060a06117268b828c016114a4565b9150509295985092959890939650565b60006020828403121561174c5761174b611e56565b5b600082013567ffffffffffffffff81111561176a57611769611e51565b5b6117768482850161150f565b91505092915050565b60006020828403121561179557611794611e56565b5b60006117a38482850161152e565b91505092915050565b6000602082840312156117c2576117c1611e56565b5b60006117d084828501611543565b91505092915050565b6117e281611d6b565b82525050565b6117f181611d6b565b82525050565b61180081611d7d565b82525050565b61180f81611d89565b82525050565b60006118218385611cf3565b935061182e838584611dbd565b61183783611e5b565b840190509392505050565b600061184d82611cd7565b6118578185611ce2565b9350611867818560208601611dcc565b61187081611e5b565b840191505092915050565b6000611888601483611d04565b915061189382611e6c565b602082019050919050565b60006118ab601083611d04565b91506118b682611e95565b602082019050919050565b600060a08301600083015184820360008601526118de8282611842565b91505060208301516118f360208601826119ce565b50604083015161190660408601826117d9565b50606083015161191960608601826119ce565b50608083015184820360808601526119318282611842565b9150508091505092915050565b600060c08301600083015161195660008601826117d9565b50602083015161196960208601826119ce565b50604083015184820360408601526119818282611842565b915050606083015161199660608601826119ce565b5060808301516119a960808601826119ce565b5060a083015184820360a08601526119c18282611842565b9150508091505092915050565b6119d781611db3565b82525050565b6119e681611db3565b82525050565b6000602082019050611a0160008301846117e8565b92915050565b6000604082019050611a1c60008301856117e8565b611a2960208301846117e8565b9392505050565b600060c082019050611a45600083018c6117e8565b8181036020830152611a58818a8c611815565b9050611a6760408301896119dd565b611a7460608301886119dd565b8181036080830152611a87818688611815565b905081810360a0830152611a9c818486611815565b90509a9950505050505050505050565b6000604082019050611ac160008301856117e8565b611ace60208301846119dd565b9392505050565b6000606082019050611aea60008301866117e8565b611af760208301856119dd565b611b046040830184611806565b949350505050565b600060a082019050611b21600083018a6117e8565b611b2e60208301896119dd565b8181036040830152611b41818789611815565b9050611b5060608301866119dd565b8181036080830152611b63818486611815565b905098975050505050505050565b6000602082019050611b8660008301846117f7565b92915050565b60006060820190508181036000830152611ba7818789611815565b9050611bb660208301866119dd565b8181036040830152611bc9818486611815565b90509695505050505050565b60006020820190508181036000830152611bee8161187b565b9050919050565b60006020820190508181036000830152611c0e8161189e565b9050919050565b60006020820190508181036000830152611c2f81846118c1565b905092915050565b60006020820190508181036000830152611c51818461193e565b905092915050565b6000602082019050611c6e60008301846119dd565b92915050565b60008083356001602003843603038112611c9157611c90611e42565b5b80840192508235915067ffffffffffffffff821115611cb357611cb2611e38565b5b602083019250600182023603831315611ccf57611cce611e4c565b5b509250929050565b600081519050919050565b600082825260208201905092915050565b600082825260208201905092915050565b600082825260208201905092915050565b6000611d2082611db3565b9150611d2b83611db3565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff03821115611d6057611d5f611dff565b5b828201905092915050565b6000611d7682611d93565b9050919050565b60008115159050919050565b6000819050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b82818337600083830152505050565b60005b83811015611dea578082015181840152602081019050611dcf565b83811115611df9576000848401525b50505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f5061757361626c653a206e6f7420706175736564000000000000000000000000600082015250565b7f5061757361626c653a2070617573656400000000000000000000000000000000600082015250565b611ec781611d6b565b8114611ed257600080fd5b50565b611ede81611d89565b8114611ee957600080fd5b50565b611ef581611db3565b8114611f0057600080fd5b5056fea2646970667358221220fe53c400648c437eb2c5cb4a54cddabf79a2d10b3ce92addc52a0ff55708801164736f6c63430008070033"; type ZetaConnectorNonEthConstructorParams = | [signer?: Signer] diff --git a/packages/interfaces/typechain-types/factories/contracts/ZetaTokenConsumerTrident.strategy.sol/ZetaTokenConsumerTrident__factory.ts b/packages/interfaces/typechain-types/factories/contracts/ZetaTokenConsumerTrident.strategy.sol/ZetaTokenConsumerTrident__factory.ts index c35c37d2..98f36bc3 100644 --- a/packages/interfaces/typechain-types/factories/contracts/ZetaTokenConsumerTrident.strategy.sol/ZetaTokenConsumerTrident__factory.ts +++ b/packages/interfaces/typechain-types/factories/contracts/ZetaTokenConsumerTrident.strategy.sol/ZetaTokenConsumerTrident__factory.ts @@ -310,7 +310,7 @@ const _abi = [ ]; const _bytecode = - "0x6101006040523480156200001257600080fd5b5060405162002add38038062002add833981810160405281019062000038919062000245565b600073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff161480620000a05750600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16145b80620000d85750600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16145b80620001105750600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16145b1562000148576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8373ffffffffffffffffffffffffffffffffffffffff1660a08173ffffffffffffffffffffffffffffffffffffffff1660601b815250508273ffffffffffffffffffffffffffffffffffffffff1660c08173ffffffffffffffffffffffffffffffffffffffff1660601b815250508073ffffffffffffffffffffffffffffffffffffffff1660e08173ffffffffffffffffffffffffffffffffffffffff1660601b815250508173ffffffffffffffffffffffffffffffffffffffff1660808173ffffffffffffffffffffffffffffffffffffffff1660601b81525050505050506200030a565b6000815190506200023f81620002f0565b92915050565b60008060008060808587031215620002625762000261620002eb565b5b600062000272878288016200022e565b945050602062000285878288016200022e565b935050604062000298878288016200022e565b9250506060620002ab878288016200022e565b91505092959194509250565b6000620002c482620002cb565b9050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600080fd5b620002fb81620002b7565b81146200030757600080fd5b50565b60805160601c60a05160601c60c05160601c60e05160601c6126c962000414600039600081816102e0015281816106ca015281816107d601528181610b0c01528181610cde015281816111a8015261129401526000818161042c0152818161064f01528181610a1201528181610c2301528181610e4901528181610f3e015281816110ed01526114f00152600081816102b401528181610521015281816107a601528181610bd901528181610c4501528181610c9101528181610da3015281816110a30152818161110f0152818161115b015261147b0152600081816102930152818161069e0152818161078501528181610cb20152818161117c015261126301526126c96000f3fe6080604052600436106100745760003560e01c80634219dc401161004e5780634219dc401461011857806354c49a2a1461014357806364b5528a14610180578063a53fb10b146101ab5761007b565b8063013b2ff81461008057806321e093b1146100b05780632405620a146100db5761007b565b3661007b57005b600080fd5b61009a60048036038101906100959190611bbd565b6101e8565b6040516100a7919061229d565b60405180910390f35b3480156100bc57600080fd5b506100c561051f565b6040516100d29190612068565b60405180910390f35b3480156100e757600080fd5b5061010260048036038101906100fd9190611bfd565b610543565b60405161010f919061229d565b60405180910390f35b34801561012457600080fd5b5061012d610b0a565b60405161013a9190612188565b60405180910390f35b34801561014f57600080fd5b5061016a60048036038101906101659190611c64565b610b2e565b604051610177919061229d565b60405180910390f35b34801561018c57600080fd5b50610195610f3c565b6040516101a291906121a3565b60405180910390f35b3480156101b757600080fd5b506101d260048036038101906101cd9190611bfd565b610f60565b6040516101df919061229d565b60405180910390f35b60008073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415610250576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600034141561028b576040517fb813f54900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000806102d87f00000000000000000000000000000000000000000000000000000000000000007f0000000000000000000000000000000000000000000000000000000000000000611602565b9150915060007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166371a258128484600060016040518563ffffffff1660e01b815260040161033f94939291906120ac565b60006040518083038186803b15801561035757600080fd5b505afa15801561036b573d6000803e3d6000fd5b505050506040513d6000823e3d601f19601f820116820180604052508101906103949190611cb7565b905060006040518060c00160405280600073ffffffffffffffffffffffffffffffffffffffff168152602001348152602001878152602001836000815181106103e0576103df6124b5565b5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1681526020018873ffffffffffffffffffffffffffffffffffffffff16815260200160001515815250905060007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663c07f5c3234846040518363ffffffff1660e01b81526004016104849190612282565b6020604051808303818588803b15801561049d57600080fd5b505af11580156104b1573d6000803e3d6000fd5b50505050506040513d601f19601f820116820180604052508101906104d69190611d2d565b90507f87890b0a30955b1db16cc894fbe24779ae05d9f337bfe8b6dfc0809b5bf9da1134826040516105099291906122b8565b60405180910390a1809550505050505092915050565b7f000000000000000000000000000000000000000000000000000000000000000081565b60008073ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff1614806105ab5750600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16145b156105e2576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600082141561061d576040517fb813f54900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61064a3330848673ffffffffffffffffffffffffffffffffffffffff16611652909392919063ffffffff16565b6106957f0000000000000000000000000000000000000000000000000000000000000000838573ffffffffffffffffffffffffffffffffffffffff166116db9092919063ffffffff16565b6000806106c2857f0000000000000000000000000000000000000000000000000000000000000000611602565b9150915060007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166371a258128484600060016040518563ffffffff1660e01b815260040161072994939291906120ac565b60006040518083038186803b15801561074157600080fd5b505afa158015610755573d6000803e3d6000fd5b505050506040513d6000823e3d601f19601f8201168201806040525081019061077e9190611cb7565b90506107ca7f00000000000000000000000000000000000000000000000000000000000000007f0000000000000000000000000000000000000000000000000000000000000000611602565b809350819450505060007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166371a258128585600060016040518563ffffffff1660e01b815260040161083594939291906120ac565b60006040518083038186803b15801561084d57600080fd5b505afa158015610861573d6000803e3d6000fd5b505050506040513d6000823e3d601f19601f8201168201806040525081019061088a9190611cb7565b90506000600267ffffffffffffffff8111156108a9576108a86124e4565b5b6040519080825280602002602001820160405280156108d75781602001602082028036833780820191505090505b509050826000815181106108ee576108ed6124b5565b5b60200260200101518160008151811061090a576109096124b5565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff168152505081600081518110610958576109576124b5565b5b602002602001015181600181518110610974576109736124b5565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff168152505060006040518060c001604052808a73ffffffffffffffffffffffffffffffffffffffff1681526020018981526020018b81526020018381526020018c73ffffffffffffffffffffffffffffffffffffffff16815260200160001515815250905060007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663363a9dba836040518263ffffffff1660e01b8152600401610a699190612260565b602060405180830381600087803b158015610a8357600080fd5b505af1158015610a97573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610abb9190611d2d565b90507f017190d3d99ee6d8dd0604ef1e71ff9802810c6485f57c9b2ed6169848dd119f8a8a83604051610af093929190612151565b60405180910390a180975050505050505050949350505050565b7f000000000000000000000000000000000000000000000000000000000000000081565b60008073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff161415610b96576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000821415610bd1576040517fb813f54900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610c1e3330847f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16611652909392919063ffffffff16565b610c897f0000000000000000000000000000000000000000000000000000000000000000837f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166116db9092919063ffffffff16565b600080610cd67f00000000000000000000000000000000000000000000000000000000000000007f0000000000000000000000000000000000000000000000000000000000000000611602565b9150915060007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166371a258128484600060016040518563ffffffff1660e01b8152600401610d3d94939291906120ac565b60006040518083038186803b158015610d5557600080fd5b505afa158015610d69573d6000803e3d6000fd5b505050506040513d6000823e3d601f19601f82011682018060405250810190610d929190611cb7565b905060006040518060c001604052807f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16815260200187815260200188815260200183600081518110610dfd57610dfc6124b5565b5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1681526020018973ffffffffffffffffffffffffffffffffffffffff16815260200160011515815250905060007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663c07f5c32836040518263ffffffff1660e01b8152600401610ea09190612282565b602060405180830381600087803b158015610eba57600080fd5b505af1158015610ece573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ef29190611d2d565b90507f74e171117e91660f493740924d8bad0caf48dc4fbccb767fb05935397a2c17ae8782604051610f259291906122b8565b60405180910390a180955050505050509392505050565b7f000000000000000000000000000000000000000000000000000000000000000081565b60008060009054906101000a900460ff1615610fa8576040517f29f745a700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60016000806101000a81548160ff021916908315150217905550600073ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff1614806110295750600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16145b15611060576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600082141561109b576040517fb813f54900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6110e83330847f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16611652909392919063ffffffff16565b6111537f0000000000000000000000000000000000000000000000000000000000000000837f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166116db9092919063ffffffff16565b6000806111a07f00000000000000000000000000000000000000000000000000000000000000007f0000000000000000000000000000000000000000000000000000000000000000611602565b9150915060007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166371a258128484600060016040518563ffffffff1660e01b815260040161120794939291906120ac565b60006040518083038186803b15801561121f57600080fd5b505afa158015611233573d6000803e3d6000fd5b505050506040513d6000823e3d601f19601f8201168201806040525081019061125c9190611cb7565b90506112887f000000000000000000000000000000000000000000000000000000000000000087611602565b809350819450505060007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166371a258128585600060016040518563ffffffff1660e01b81526004016112f394939291906120ac565b60006040518083038186803b15801561130b57600080fd5b505afa15801561131f573d6000803e3d6000fd5b505050506040513d6000823e3d601f19601f820116820180604052508101906113489190611cb7565b90506000600267ffffffffffffffff811115611367576113666124e4565b5b6040519080825280602002602001820160405280156113955781602001602082028036833780820191505090505b509050826000815181106113ac576113ab6124b5565b5b6020026020010151816000815181106113c8576113c76124b5565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff168152505081600081518110611416576114156124b5565b5b602002602001015181600181518110611432576114316124b5565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff168152505060006040518060c001604052807f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1681526020018981526020018b81526020018381526020018c73ffffffffffffffffffffffffffffffffffffffff16815260200160001515815250905060007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663363a9dba836040518263ffffffff1660e01b81526004016115479190612260565b602060405180830381600087803b15801561156157600080fd5b505af1158015611575573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115999190611d2d565b90507f0a7cb8f6e1d29e616c1209a3f418c17b3a9137005377f6dd072217b1ede2573b8a8a836040516115ce93929190612151565b60405180910390a18097505050505050505060008060006101000a81548160ff021916908315150217905550949350505050565b6000808273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1610156116445783839150915061164b565b8284915091505b9250929050565b6116d5846323b872dd60e01b858585604051602401611673939291906120f1565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050611839565b50505050565b6000811480611774575060008373ffffffffffffffffffffffffffffffffffffffff1663dd62ed3e30856040518363ffffffff1660e01b8152600401611722929190612083565b60206040518083038186803b15801561173a57600080fd5b505afa15801561174e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906117729190611d2d565b145b6117b3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016117aa90612240565b60405180910390fd5b6118348363095ea7b360e01b84846040516024016117d2929190612128565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050611839565b505050565b600061189b826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c65648152508573ffffffffffffffffffffffffffffffffffffffff166119009092919063ffffffff16565b90506000815111156118fb57808060200190518101906118bb9190611d00565b6118fa576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016118f190612220565b60405180910390fd5b5b505050565b606061190f8484600085611918565b90509392505050565b60608247101561195d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611954906121e0565b60405180910390fd5b61196685611a2c565b6119a5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161199c90612200565b60405180910390fd5b6000808673ffffffffffffffffffffffffffffffffffffffff1685876040516119ce9190612051565b60006040518083038185875af1925050503d8060008114611a0b576040519150601f19603f3d011682016040523d82523d6000602084013e611a10565b606091505b5091509150611a20828286611a4f565b92505050949350505050565b6000808273ffffffffffffffffffffffffffffffffffffffff163b119050919050565b60608315611a5f57829050611aaf565b600083511115611a725782518084602001fd5b816040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611aa691906121be565b60405180910390fd5b9392505050565b6000611ac9611ac484612306565b6122e1565b90508083825260208201905082856020860282011115611aec57611aeb612518565b5b60005b85811015611b1c5781611b028882611b3b565b845260208401935060208301925050600181019050611aef565b5050509392505050565b600081359050611b358161264e565b92915050565b600081519050611b4a8161264e565b92915050565b600082601f830112611b6557611b64612513565b5b8151611b75848260208601611ab6565b91505092915050565b600081519050611b8d81612665565b92915050565b600081359050611ba28161267c565b92915050565b600081519050611bb78161267c565b92915050565b60008060408385031215611bd457611bd3612522565b5b6000611be285828601611b26565b9250506020611bf385828601611b93565b9150509250929050565b60008060008060808587031215611c1757611c16612522565b5b6000611c2587828801611b26565b9450506020611c3687828801611b93565b9350506040611c4787828801611b26565b9250506060611c5887828801611b93565b91505092959194509250565b600080600060608486031215611c7d57611c7c612522565b5b6000611c8b86828701611b26565b9350506020611c9c86828701611b93565b9250506040611cad86828701611b93565b9150509250925092565b600060208284031215611ccd57611ccc612522565b5b600082015167ffffffffffffffff811115611ceb57611cea61251d565b5b611cf784828501611b50565b91505092915050565b600060208284031215611d1657611d15612522565b5b6000611d2484828501611b7e565b91505092915050565b600060208284031215611d4357611d42612522565b5b6000611d5184828501611ba8565b91505092915050565b6000611d668383611d72565b60208301905092915050565b611d7b8161239d565b82525050565b611d8a8161239d565b82525050565b6000611d9b82612342565b611da58185612370565b9350611db083612332565b8060005b83811015611de1578151611dc88882611d5a565b9750611dd383612363565b925050600181019050611db4565b5085935050505092915050565b611df7816123af565b82525050565b6000611e088261234d565b611e128185612381565b9350611e22818560208601612451565b80840191505092915050565b611e37816123e5565b82525050565b611e46816123f7565b82525050565b611e5581612409565b82525050565b611e648161241b565b82525050565b6000611e7582612358565b611e7f818561238c565b9350611e8f818560208601612451565b611e9881612527565b840191505092915050565b6000611eb060268361238c565b9150611ebb82612538565b604082019050919050565b6000611ed3601d8361238c565b9150611ede82612587565b602082019050919050565b6000611ef6602a8361238c565b9150611f01826125b0565b604082019050919050565b6000611f1960368361238c565b9150611f24826125ff565b604082019050919050565b600060c083016000830151611f476000860182611d72565b506020830151611f5a6020860182612033565b506040830151611f6d6040860182612033565b5060608301518482036060860152611f858282611d90565b9150506080830151611f9a6080860182611d72565b5060a0830151611fad60a0860182611dee565b508091505092915050565b60c082016000820151611fce6000850182611d72565b506020820151611fe16020850182612033565b506040820151611ff46040850182612033565b5060608201516120076060850182611d72565b50608082015161201a6080850182611d72565b5060a082015161202d60a0850182611dee565b50505050565b61203c816123db565b82525050565b61204b816123db565b82525050565b600061205d8284611dfd565b915081905092915050565b600060208201905061207d6000830184611d81565b92915050565b60006040820190506120986000830185611d81565b6120a56020830184611d81565b9392505050565b60006080820190506120c16000830187611d81565b6120ce6020830186611d81565b6120db6040830185611e4c565b6120e86060830184611e5b565b95945050505050565b60006060820190506121066000830186611d81565b6121136020830185611d81565b6121206040830184612042565b949350505050565b600060408201905061213d6000830185611d81565b61214a6020830184612042565b9392505050565b60006060820190506121666000830186611d81565b6121736020830185612042565b6121806040830184612042565b949350505050565b600060208201905061219d6000830184611e2e565b92915050565b60006020820190506121b86000830184611e3d565b92915050565b600060208201905081810360008301526121d88184611e6a565b905092915050565b600060208201905081810360008301526121f981611ea3565b9050919050565b6000602082019050818103600083015261221981611ec6565b9050919050565b6000602082019050818103600083015261223981611ee9565b9050919050565b6000602082019050818103600083015261225981611f0c565b9050919050565b6000602082019050818103600083015261227a8184611f2f565b905092915050565b600060c0820190506122976000830184611fb8565b92915050565b60006020820190506122b26000830184612042565b92915050565b60006040820190506122cd6000830185612042565b6122da6020830184612042565b9392505050565b60006122eb6122fc565b90506122f78282612484565b919050565b6000604051905090565b600067ffffffffffffffff821115612321576123206124e4565b5b602082029050602081019050919050565b6000819050602082019050919050565b600081519050919050565b600081519050919050565b600081519050919050565b6000602082019050919050565b600082825260208201905092915050565b600081905092915050565b600082825260208201905092915050565b60006123a8826123bb565b9050919050565b60008115159050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b60006123f08261242d565b9050919050565b60006124028261242d565b9050919050565b6000612414826123db565b9050919050565b6000612426826123db565b9050919050565b60006124388261243f565b9050919050565b600061244a826123bb565b9050919050565b60005b8381101561246f578082015181840152602081019050612454565b8381111561247e576000848401525b50505050565b61248d82612527565b810181811067ffffffffffffffff821117156124ac576124ab6124e4565b5b80604052505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600080fd5b600080fd5b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f416464726573733a20696e73756666696369656e742062616c616e636520666f60008201527f722063616c6c0000000000000000000000000000000000000000000000000000602082015250565b7f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000600082015250565b7f5361666545524332303a204552433230206f7065726174696f6e20646964206e60008201527f6f74207375636365656400000000000000000000000000000000000000000000602082015250565b7f5361666545524332303a20617070726f76652066726f6d206e6f6e2d7a65726f60008201527f20746f206e6f6e2d7a65726f20616c6c6f77616e636500000000000000000000602082015250565b6126578161239d565b811461266257600080fd5b50565b61266e816123af565b811461267957600080fd5b50565b612685816123db565b811461269057600080fd5b5056fea2646970667358221220a553569c9610a34e29e7a80e1bded855d026e48ea087596037ab14ad290b88b164736f6c63430008070033"; + "0x6101006040523480156200001257600080fd5b5060405162002add38038062002add833981810160405281019062000038919062000245565b600073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff161480620000a05750600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16145b80620000d85750600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16145b80620001105750600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16145b1562000148576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8373ffffffffffffffffffffffffffffffffffffffff1660a08173ffffffffffffffffffffffffffffffffffffffff1660601b815250508273ffffffffffffffffffffffffffffffffffffffff1660c08173ffffffffffffffffffffffffffffffffffffffff1660601b815250508073ffffffffffffffffffffffffffffffffffffffff1660e08173ffffffffffffffffffffffffffffffffffffffff1660601b815250508173ffffffffffffffffffffffffffffffffffffffff1660808173ffffffffffffffffffffffffffffffffffffffff1660601b81525050505050506200030a565b6000815190506200023f81620002f0565b92915050565b60008060008060808587031215620002625762000261620002eb565b5b600062000272878288016200022e565b945050602062000285878288016200022e565b935050604062000298878288016200022e565b9250506060620002ab878288016200022e565b91505092959194509250565b6000620002c482620002cb565b9050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600080fd5b620002fb81620002b7565b81146200030757600080fd5b50565b60805160601c60a05160601c60c05160601c60e05160601c6126c962000414600039600081816102e0015281816106ca015281816107d601528181610b0c01528181610cde015281816111a8015261129401526000818161042c0152818161064f01528181610a1201528181610c2301528181610e4901528181610f3e015281816110ed01526114f00152600081816102b401528181610521015281816107a601528181610bd901528181610c4501528181610c9101528181610da3015281816110a30152818161110f0152818161115b015261147b0152600081816102930152818161069e0152818161078501528181610cb20152818161117c015261126301526126c96000f3fe6080604052600436106100745760003560e01c80634219dc401161004e5780634219dc401461011857806354c49a2a1461014357806364b5528a14610180578063a53fb10b146101ab5761007b565b8063013b2ff81461008057806321e093b1146100b05780632405620a146100db5761007b565b3661007b57005b600080fd5b61009a60048036038101906100959190611bbd565b6101e8565b6040516100a7919061229d565b60405180910390f35b3480156100bc57600080fd5b506100c561051f565b6040516100d29190612068565b60405180910390f35b3480156100e757600080fd5b5061010260048036038101906100fd9190611bfd565b610543565b60405161010f919061229d565b60405180910390f35b34801561012457600080fd5b5061012d610b0a565b60405161013a9190612188565b60405180910390f35b34801561014f57600080fd5b5061016a60048036038101906101659190611c64565b610b2e565b604051610177919061229d565b60405180910390f35b34801561018c57600080fd5b50610195610f3c565b6040516101a291906121a3565b60405180910390f35b3480156101b757600080fd5b506101d260048036038101906101cd9190611bfd565b610f60565b6040516101df919061229d565b60405180910390f35b60008073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415610250576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600034141561028b576040517fb813f54900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000806102d87f00000000000000000000000000000000000000000000000000000000000000007f0000000000000000000000000000000000000000000000000000000000000000611602565b9150915060007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166371a258128484600060016040518563ffffffff1660e01b815260040161033f94939291906120ac565b60006040518083038186803b15801561035757600080fd5b505afa15801561036b573d6000803e3d6000fd5b505050506040513d6000823e3d601f19601f820116820180604052508101906103949190611cb7565b905060006040518060c00160405280600073ffffffffffffffffffffffffffffffffffffffff168152602001348152602001878152602001836000815181106103e0576103df6124b5565b5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1681526020018873ffffffffffffffffffffffffffffffffffffffff16815260200160001515815250905060007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663c07f5c3234846040518363ffffffff1660e01b81526004016104849190612282565b6020604051808303818588803b15801561049d57600080fd5b505af11580156104b1573d6000803e3d6000fd5b50505050506040513d601f19601f820116820180604052508101906104d69190611d2d565b90507f87890b0a30955b1db16cc894fbe24779ae05d9f337bfe8b6dfc0809b5bf9da1134826040516105099291906122b8565b60405180910390a1809550505050505092915050565b7f000000000000000000000000000000000000000000000000000000000000000081565b60008073ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff1614806105ab5750600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16145b156105e2576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600082141561061d576040517fb813f54900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61064a3330848673ffffffffffffffffffffffffffffffffffffffff16611652909392919063ffffffff16565b6106957f0000000000000000000000000000000000000000000000000000000000000000838573ffffffffffffffffffffffffffffffffffffffff166116db9092919063ffffffff16565b6000806106c2857f0000000000000000000000000000000000000000000000000000000000000000611602565b9150915060007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166371a258128484600060016040518563ffffffff1660e01b815260040161072994939291906120ac565b60006040518083038186803b15801561074157600080fd5b505afa158015610755573d6000803e3d6000fd5b505050506040513d6000823e3d601f19601f8201168201806040525081019061077e9190611cb7565b90506107ca7f00000000000000000000000000000000000000000000000000000000000000007f0000000000000000000000000000000000000000000000000000000000000000611602565b809350819450505060007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166371a258128585600060016040518563ffffffff1660e01b815260040161083594939291906120ac565b60006040518083038186803b15801561084d57600080fd5b505afa158015610861573d6000803e3d6000fd5b505050506040513d6000823e3d601f19601f8201168201806040525081019061088a9190611cb7565b90506000600267ffffffffffffffff8111156108a9576108a86124e4565b5b6040519080825280602002602001820160405280156108d75781602001602082028036833780820191505090505b509050826000815181106108ee576108ed6124b5565b5b60200260200101518160008151811061090a576109096124b5565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff168152505081600081518110610958576109576124b5565b5b602002602001015181600181518110610974576109736124b5565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff168152505060006040518060c001604052808a73ffffffffffffffffffffffffffffffffffffffff1681526020018981526020018b81526020018381526020018c73ffffffffffffffffffffffffffffffffffffffff16815260200160001515815250905060007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663363a9dba836040518263ffffffff1660e01b8152600401610a699190612260565b602060405180830381600087803b158015610a8357600080fd5b505af1158015610a97573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610abb9190611d2d565b90507f017190d3d99ee6d8dd0604ef1e71ff9802810c6485f57c9b2ed6169848dd119f8a8a83604051610af093929190612151565b60405180910390a180975050505050505050949350505050565b7f000000000000000000000000000000000000000000000000000000000000000081565b60008073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff161415610b96576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000821415610bd1576040517fb813f54900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610c1e3330847f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16611652909392919063ffffffff16565b610c897f0000000000000000000000000000000000000000000000000000000000000000837f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166116db9092919063ffffffff16565b600080610cd67f00000000000000000000000000000000000000000000000000000000000000007f0000000000000000000000000000000000000000000000000000000000000000611602565b9150915060007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166371a258128484600060016040518563ffffffff1660e01b8152600401610d3d94939291906120ac565b60006040518083038186803b158015610d5557600080fd5b505afa158015610d69573d6000803e3d6000fd5b505050506040513d6000823e3d601f19601f82011682018060405250810190610d929190611cb7565b905060006040518060c001604052807f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16815260200187815260200188815260200183600081518110610dfd57610dfc6124b5565b5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1681526020018973ffffffffffffffffffffffffffffffffffffffff16815260200160011515815250905060007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663c07f5c32836040518263ffffffff1660e01b8152600401610ea09190612282565b602060405180830381600087803b158015610eba57600080fd5b505af1158015610ece573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ef29190611d2d565b90507f74e171117e91660f493740924d8bad0caf48dc4fbccb767fb05935397a2c17ae8782604051610f259291906122b8565b60405180910390a180955050505050509392505050565b7f000000000000000000000000000000000000000000000000000000000000000081565b60008060009054906101000a900460ff1615610fa8576040517f29f745a700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60016000806101000a81548160ff021916908315150217905550600073ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff1614806110295750600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16145b15611060576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600082141561109b576040517fb813f54900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6110e83330847f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16611652909392919063ffffffff16565b6111537f0000000000000000000000000000000000000000000000000000000000000000837f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166116db9092919063ffffffff16565b6000806111a07f00000000000000000000000000000000000000000000000000000000000000007f0000000000000000000000000000000000000000000000000000000000000000611602565b9150915060007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166371a258128484600060016040518563ffffffff1660e01b815260040161120794939291906120ac565b60006040518083038186803b15801561121f57600080fd5b505afa158015611233573d6000803e3d6000fd5b505050506040513d6000823e3d601f19601f8201168201806040525081019061125c9190611cb7565b90506112887f000000000000000000000000000000000000000000000000000000000000000087611602565b809350819450505060007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166371a258128585600060016040518563ffffffff1660e01b81526004016112f394939291906120ac565b60006040518083038186803b15801561130b57600080fd5b505afa15801561131f573d6000803e3d6000fd5b505050506040513d6000823e3d601f19601f820116820180604052508101906113489190611cb7565b90506000600267ffffffffffffffff811115611367576113666124e4565b5b6040519080825280602002602001820160405280156113955781602001602082028036833780820191505090505b509050826000815181106113ac576113ab6124b5565b5b6020026020010151816000815181106113c8576113c76124b5565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff168152505081600081518110611416576114156124b5565b5b602002602001015181600181518110611432576114316124b5565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff168152505060006040518060c001604052807f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1681526020018981526020018b81526020018381526020018c73ffffffffffffffffffffffffffffffffffffffff16815260200160001515815250905060007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663363a9dba836040518263ffffffff1660e01b81526004016115479190612260565b602060405180830381600087803b15801561156157600080fd5b505af1158015611575573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115999190611d2d565b90507f0a7cb8f6e1d29e616c1209a3f418c17b3a9137005377f6dd072217b1ede2573b8a8a836040516115ce93929190612151565b60405180910390a18097505050505050505060008060006101000a81548160ff021916908315150217905550949350505050565b6000808273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1610156116445783839150915061164b565b8284915091505b9250929050565b6116d5846323b872dd60e01b858585604051602401611673939291906120f1565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050611839565b50505050565b6000811480611774575060008373ffffffffffffffffffffffffffffffffffffffff1663dd62ed3e30856040518363ffffffff1660e01b8152600401611722929190612083565b60206040518083038186803b15801561173a57600080fd5b505afa15801561174e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906117729190611d2d565b145b6117b3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016117aa90612240565b60405180910390fd5b6118348363095ea7b360e01b84846040516024016117d2929190612128565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050611839565b505050565b600061189b826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c65648152508573ffffffffffffffffffffffffffffffffffffffff166119009092919063ffffffff16565b90506000815111156118fb57808060200190518101906118bb9190611d00565b6118fa576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016118f190612220565b60405180910390fd5b5b505050565b606061190f8484600085611918565b90509392505050565b60608247101561195d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611954906121e0565b60405180910390fd5b61196685611a2c565b6119a5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161199c90612200565b60405180910390fd5b6000808673ffffffffffffffffffffffffffffffffffffffff1685876040516119ce9190612051565b60006040518083038185875af1925050503d8060008114611a0b576040519150601f19603f3d011682016040523d82523d6000602084013e611a10565b606091505b5091509150611a20828286611a4f565b92505050949350505050565b6000808273ffffffffffffffffffffffffffffffffffffffff163b119050919050565b60608315611a5f57829050611aaf565b600083511115611a725782518084602001fd5b816040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611aa691906121be565b60405180910390fd5b9392505050565b6000611ac9611ac484612306565b6122e1565b90508083825260208201905082856020860282011115611aec57611aeb612518565b5b60005b85811015611b1c5781611b028882611b3b565b845260208401935060208301925050600181019050611aef565b5050509392505050565b600081359050611b358161264e565b92915050565b600081519050611b4a8161264e565b92915050565b600082601f830112611b6557611b64612513565b5b8151611b75848260208601611ab6565b91505092915050565b600081519050611b8d81612665565b92915050565b600081359050611ba28161267c565b92915050565b600081519050611bb78161267c565b92915050565b60008060408385031215611bd457611bd3612522565b5b6000611be285828601611b26565b9250506020611bf385828601611b93565b9150509250929050565b60008060008060808587031215611c1757611c16612522565b5b6000611c2587828801611b26565b9450506020611c3687828801611b93565b9350506040611c4787828801611b26565b9250506060611c5887828801611b93565b91505092959194509250565b600080600060608486031215611c7d57611c7c612522565b5b6000611c8b86828701611b26565b9350506020611c9c86828701611b93565b9250506040611cad86828701611b93565b9150509250925092565b600060208284031215611ccd57611ccc612522565b5b600082015167ffffffffffffffff811115611ceb57611cea61251d565b5b611cf784828501611b50565b91505092915050565b600060208284031215611d1657611d15612522565b5b6000611d2484828501611b7e565b91505092915050565b600060208284031215611d4357611d42612522565b5b6000611d5184828501611ba8565b91505092915050565b6000611d668383611d72565b60208301905092915050565b611d7b8161239d565b82525050565b611d8a8161239d565b82525050565b6000611d9b82612342565b611da58185612370565b9350611db083612332565b8060005b83811015611de1578151611dc88882611d5a565b9750611dd383612363565b925050600181019050611db4565b5085935050505092915050565b611df7816123af565b82525050565b6000611e088261234d565b611e128185612381565b9350611e22818560208601612451565b80840191505092915050565b611e37816123e5565b82525050565b611e46816123f7565b82525050565b611e5581612409565b82525050565b611e648161241b565b82525050565b6000611e7582612358565b611e7f818561238c565b9350611e8f818560208601612451565b611e9881612527565b840191505092915050565b6000611eb060268361238c565b9150611ebb82612538565b604082019050919050565b6000611ed3601d8361238c565b9150611ede82612587565b602082019050919050565b6000611ef6602a8361238c565b9150611f01826125b0565b604082019050919050565b6000611f1960368361238c565b9150611f24826125ff565b604082019050919050565b600060c083016000830151611f476000860182611d72565b506020830151611f5a6020860182612033565b506040830151611f6d6040860182612033565b5060608301518482036060860152611f858282611d90565b9150506080830151611f9a6080860182611d72565b5060a0830151611fad60a0860182611dee565b508091505092915050565b60c082016000820151611fce6000850182611d72565b506020820151611fe16020850182612033565b506040820151611ff46040850182612033565b5060608201516120076060850182611d72565b50608082015161201a6080850182611d72565b5060a082015161202d60a0850182611dee565b50505050565b61203c816123db565b82525050565b61204b816123db565b82525050565b600061205d8284611dfd565b915081905092915050565b600060208201905061207d6000830184611d81565b92915050565b60006040820190506120986000830185611d81565b6120a56020830184611d81565b9392505050565b60006080820190506120c16000830187611d81565b6120ce6020830186611d81565b6120db6040830185611e4c565b6120e86060830184611e5b565b95945050505050565b60006060820190506121066000830186611d81565b6121136020830185611d81565b6121206040830184612042565b949350505050565b600060408201905061213d6000830185611d81565b61214a6020830184612042565b9392505050565b60006060820190506121666000830186611d81565b6121736020830185612042565b6121806040830184612042565b949350505050565b600060208201905061219d6000830184611e2e565b92915050565b60006020820190506121b86000830184611e3d565b92915050565b600060208201905081810360008301526121d88184611e6a565b905092915050565b600060208201905081810360008301526121f981611ea3565b9050919050565b6000602082019050818103600083015261221981611ec6565b9050919050565b6000602082019050818103600083015261223981611ee9565b9050919050565b6000602082019050818103600083015261225981611f0c565b9050919050565b6000602082019050818103600083015261227a8184611f2f565b905092915050565b600060c0820190506122976000830184611fb8565b92915050565b60006020820190506122b26000830184612042565b92915050565b60006040820190506122cd6000830185612042565b6122da6020830184612042565b9392505050565b60006122eb6122fc565b90506122f78282612484565b919050565b6000604051905090565b600067ffffffffffffffff821115612321576123206124e4565b5b602082029050602081019050919050565b6000819050602082019050919050565b600081519050919050565b600081519050919050565b600081519050919050565b6000602082019050919050565b600082825260208201905092915050565b600081905092915050565b600082825260208201905092915050565b60006123a8826123bb565b9050919050565b60008115159050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b60006123f08261242d565b9050919050565b60006124028261242d565b9050919050565b6000612414826123db565b9050919050565b6000612426826123db565b9050919050565b60006124388261243f565b9050919050565b600061244a826123bb565b9050919050565b60005b8381101561246f578082015181840152602081019050612454565b8381111561247e576000848401525b50505050565b61248d82612527565b810181811067ffffffffffffffff821117156124ac576124ab6124e4565b5b80604052505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600080fd5b600080fd5b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f416464726573733a20696e73756666696369656e742062616c616e636520666f60008201527f722063616c6c0000000000000000000000000000000000000000000000000000602082015250565b7f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000600082015250565b7f5361666545524332303a204552433230206f7065726174696f6e20646964206e60008201527f6f74207375636365656400000000000000000000000000000000000000000000602082015250565b7f5361666545524332303a20617070726f76652066726f6d206e6f6e2d7a65726f60008201527f20746f206e6f6e2d7a65726f20616c6c6f77616e636500000000000000000000602082015250565b6126578161239d565b811461266257600080fd5b50565b61266e816123af565b811461267957600080fd5b50565b612685816123db565b811461269057600080fd5b5056fea2646970667358221220c48bbb0e60356e945436838a0833d9efad43a4ccf55e6682b812d5f3d3ef759064736f6c63430008070033"; type ZetaTokenConsumerTridentConstructorParams = | [signer?: Signer] diff --git a/packages/interfaces/typechain-types/factories/contracts/ZetaTokenConsumerUniV2.strategy.sol/ZetaTokenConsumerUniV2__factory.ts b/packages/interfaces/typechain-types/factories/contracts/ZetaTokenConsumerUniV2.strategy.sol/ZetaTokenConsumerUniV2__factory.ts index d48587b7..1e2a027b 100644 --- a/packages/interfaces/typechain-types/factories/contracts/ZetaTokenConsumerUniV2.strategy.sol/ZetaTokenConsumerUniV2__factory.ts +++ b/packages/interfaces/typechain-types/factories/contracts/ZetaTokenConsumerUniV2.strategy.sol/ZetaTokenConsumerUniV2__factory.ts @@ -260,7 +260,7 @@ const _abi = [ ]; const _bytecode = - "0x60e06040523480156200001157600080fd5b50604051620026aa380380620026aa83398181016040528101906200003791906200024e565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614806200009f5750600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16145b15620000d7576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8173ffffffffffffffffffffffffffffffffffffffff1660a08173ffffffffffffffffffffffffffffffffffffffff1660601b815250508073ffffffffffffffffffffffffffffffffffffffff1660c08173ffffffffffffffffffffffffffffffffffffffff1660601b815250508073ffffffffffffffffffffffffffffffffffffffff1663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b1580156200018c57600080fd5b505afa158015620001a1573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620001c791906200021c565b73ffffffffffffffffffffffffffffffffffffffff1660808173ffffffffffffffffffffffffffffffffffffffff1660601b815250505050620002e8565b6000815190506200021681620002ce565b92915050565b600060208284031215620002355762000234620002c9565b5b6000620002458482850162000205565b91505092915050565b60008060408385031215620002685762000267620002c9565b5b6000620002788582860162000205565b92505060206200028b8582860162000205565b9150509250929050565b6000620002a282620002a9565b9050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600080fd5b620002d98162000295565b8114620002e557600080fd5b50565b60805160601c60a05160601c60c05160601c6122e8620003c26000396000818161033401528181610598015281816108e101528181610b0f01528181610ca501528181610f0701526112700152600081816102c30152818161046a015281816106f10152818161086f01528181610ac501528181610b3101528181610bc501528181610ebd01528181610f29015281816110110152611140015260008181610254015281816105e2015281816106820152818161080001528181610c3401528181610f710152818161108001526111af01526122e86000f3fe60806040526004361061004a5760003560e01c8063013b2ff81461004f57806321e093b11461007f5780632405620a146100aa57806354c49a2a146100e7578063a53fb10b14610124575b600080fd5b610069600480360381019061006491906118ff565b610161565b6040516100769190611dc9565b60405180910390f35b34801561008b57600080fd5b50610094610468565b6040516100a19190611c4c565b60405180910390f35b3480156100b657600080fd5b506100d160048036038101906100cc919061193f565b61048c565b6040516100de9190611dc9565b60405180910390f35b3480156100f357600080fd5b5061010e600480360381019061010991906119a6565b610a1a565b60405161011b9190611dc9565b60405180910390f35b34801561013057600080fd5b5061014b6004803603810190610146919061193f565b610ddb565b6040516101589190611dc9565b60405180910390f35b60008073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614156101c9576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000341415610204576040517fb813f54900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000600267ffffffffffffffff81111561022157610220612103565b5b60405190808252806020026020018201604052801561024f5781602001602082028036833780820191505090505b5090507f000000000000000000000000000000000000000000000000000000000000000081600081518110610287576102866120d4565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff16815250507f0000000000000000000000000000000000000000000000000000000000000000816001815181106102f6576102f56120d4565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff168152505060007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16637ff36ab53486858960c84261037f9190611f6f565b6040518663ffffffff1660e01b815260040161039e9493929190611de4565b6000604051808303818588803b1580156103b757600080fd5b505af11580156103cb573d6000803e3d6000fd5b50505050506040513d6000823e3d601f19601f820116820180604052508101906103f591906119f9565b9050600081600184516104089190611fc5565b81518110610419576104186120d4565b5b602002602001015190507f87890b0a30955b1db16cc894fbe24779ae05d9f337bfe8b6dfc0809b5bf9da113482604051610454929190611e30565b60405180910390a180935050505092915050565b7f000000000000000000000000000000000000000000000000000000000000000081565b60008073ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff1614806104f45750600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16145b1561052b576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000821415610566576040517fb813f54900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6105933330848673ffffffffffffffffffffffffffffffffffffffff166113a9909392919063ffffffff16565b6105de7f0000000000000000000000000000000000000000000000000000000000000000838573ffffffffffffffffffffffffffffffffffffffff166114329092919063ffffffff16565b60607f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff16141561076357600267ffffffffffffffff81111561064f5761064e612103565b5b60405190808252806020026020018201604052801561067d5781602001602082028036833780820191505090505b5090507f0000000000000000000000000000000000000000000000000000000000000000816000815181106106b5576106b46120d4565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff16815250507f000000000000000000000000000000000000000000000000000000000000000081600181518110610724576107236120d4565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff16815250506108dd565b600367ffffffffffffffff81111561077e5761077d612103565b5b6040519080825280602002602001820160405280156107ac5781602001602082028036833780820191505090505b50905083816000815181106107c4576107c36120d4565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff16815250507f000000000000000000000000000000000000000000000000000000000000000081600181518110610833576108326120d4565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff16815250507f0000000000000000000000000000000000000000000000000000000000000000816002815181106108a2576108a16120d4565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff16815250505b60007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166338ed17398588858b60c84261092c9190611f6f565b6040518663ffffffff1660e01b815260040161094c959493929190611e59565b600060405180830381600087803b15801561096657600080fd5b505af115801561097a573d6000803e3d6000fd5b505050506040513d6000823e3d601f19601f820116820180604052508101906109a391906119f9565b9050600081600184516109b69190611fc5565b815181106109c7576109c66120d4565b5b602002602001015190507f017190d3d99ee6d8dd0604ef1e71ff9802810c6485f57c9b2ed6169848dd119f868683604051610a0493929190611cf0565b60405180910390a1809350505050949350505050565b60008073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff161415610a82576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000821415610abd576040517fb813f54900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610b0a3330847f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166113a9909392919063ffffffff16565b610b757f0000000000000000000000000000000000000000000000000000000000000000837f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166114329092919063ffffffff16565b6000600267ffffffffffffffff811115610b9257610b91612103565b5b604051908082528060200260200182016040528015610bc05781602001602082028036833780820191505090505b5090507f000000000000000000000000000000000000000000000000000000000000000081600081518110610bf857610bf76120d4565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff16815250507f000000000000000000000000000000000000000000000000000000000000000081600181518110610c6757610c666120d4565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff168152505060007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166318cbafe58587858a60c842610cf09190611f6f565b6040518663ffffffff1660e01b8152600401610d10959493929190611e59565b600060405180830381600087803b158015610d2a57600080fd5b505af1158015610d3e573d6000803e3d6000fd5b505050506040513d6000823e3d601f19601f82011682018060405250810190610d6791906119f9565b905060008160018451610d7a9190611fc5565b81518110610d8b57610d8a6120d4565b5b602002602001015190507f74e171117e91660f493740924d8bad0caf48dc4fbccb767fb05935397a2c17ae8582604051610dc6929190611e30565b60405180910390a18093505050509392505050565b60008073ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff161480610e435750600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16145b15610e7a576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000821415610eb5576040517fb813f54900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610f023330847f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166113a9909392919063ffffffff16565b610f6d7f0000000000000000000000000000000000000000000000000000000000000000837f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166114329092919063ffffffff16565b60607f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1614156110f257600267ffffffffffffffff811115610fde57610fdd612103565b5b60405190808252806020026020018201604052801561100c5781602001602082028036833780820191505090505b5090507f000000000000000000000000000000000000000000000000000000000000000081600081518110611044576110436120d4565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff16815250507f0000000000000000000000000000000000000000000000000000000000000000816001815181106110b3576110b26120d4565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff168152505061126c565b600367ffffffffffffffff81111561110d5761110c612103565b5b60405190808252806020026020018201604052801561113b5781602001602082028036833780820191505090505b5090507f000000000000000000000000000000000000000000000000000000000000000081600081518110611173576111726120d4565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff16815250507f0000000000000000000000000000000000000000000000000000000000000000816001815181106111e2576111e16120d4565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff16815250508381600281518110611231576112306120d4565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff16815250505b60007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166338ed17398588858b60c8426112bb9190611f6f565b6040518663ffffffff1660e01b81526004016112db959493929190611e59565b600060405180830381600087803b1580156112f557600080fd5b505af1158015611309573d6000803e3d6000fd5b505050506040513d6000823e3d601f19601f8201168201806040525081019061133291906119f9565b9050600081600184516113459190611fc5565b81518110611356576113556120d4565b5b602002602001015190507f0a7cb8f6e1d29e616c1209a3f418c17b3a9137005377f6dd072217b1ede2573b86868360405161139393929190611cf0565b60405180910390a1809350505050949350505050565b61142c846323b872dd60e01b8585856040516024016113ca93929190611c90565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050611590565b50505050565b60008114806114cb575060008373ffffffffffffffffffffffffffffffffffffffff1663dd62ed3e30856040518363ffffffff1660e01b8152600401611479929190611c67565b60206040518083038186803b15801561149157600080fd5b505afa1580156114a5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114c99190611a6f565b145b61150a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161150190611da9565b60405180910390fd5b61158b8363095ea7b360e01b8484604051602401611529929190611cc7565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050611590565b505050565b60006115f2826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c65648152508573ffffffffffffffffffffffffffffffffffffffff166116579092919063ffffffff16565b905060008151111561165257808060200190518101906116129190611a42565b611651576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161164890611d89565b60405180910390fd5b5b505050565b6060611666848460008561166f565b90509392505050565b6060824710156116b4576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016116ab90611d49565b60405180910390fd5b6116bd85611783565b6116fc576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016116f390611d69565b60405180910390fd5b6000808673ffffffffffffffffffffffffffffffffffffffff1685876040516117259190611c35565b60006040518083038185875af1925050503d8060008114611762576040519150601f19603f3d011682016040523d82523d6000602084013e611767565b606091505b50915091506117778282866117a6565b92505050949350505050565b6000808273ffffffffffffffffffffffffffffffffffffffff163b119050919050565b606083156117b657829050611806565b6000835111156117c95782518084602001fd5b816040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016117fd9190611d27565b60405180910390fd5b9392505050565b600061182061181b84611ed8565b611eb3565b9050808382526020820190508285602086028201111561184357611842612137565b5b60005b85811015611873578161185988826118ea565b845260208401935060208301925050600181019050611846565b5050509392505050565b60008135905061188c8161226d565b92915050565b600082601f8301126118a7576118a6612132565b5b81516118b784826020860161180d565b91505092915050565b6000815190506118cf81612284565b92915050565b6000813590506118e48161229b565b92915050565b6000815190506118f98161229b565b92915050565b6000806040838503121561191657611915612141565b5b60006119248582860161187d565b9250506020611935858286016118d5565b9150509250929050565b6000806000806080858703121561195957611958612141565b5b60006119678782880161187d565b9450506020611978878288016118d5565b93505060406119898782880161187d565b925050606061199a878288016118d5565b91505092959194509250565b6000806000606084860312156119bf576119be612141565b5b60006119cd8682870161187d565b93505060206119de868287016118d5565b92505060406119ef868287016118d5565b9150509250925092565b600060208284031215611a0f57611a0e612141565b5b600082015167ffffffffffffffff811115611a2d57611a2c61213c565b5b611a3984828501611892565b91505092915050565b600060208284031215611a5857611a57612141565b5b6000611a66848285016118c0565b91505092915050565b600060208284031215611a8557611a84612141565b5b6000611a93848285016118ea565b91505092915050565b6000611aa88383611ab4565b60208301905092915050565b611abd81611ff9565b82525050565b611acc81611ff9565b82525050565b6000611add82611f14565b611ae78185611f42565b9350611af283611f04565b8060005b83811015611b23578151611b0a8882611a9c565b9750611b1583611f35565b925050600181019050611af6565b5085935050505092915050565b6000611b3b82611f1f565b611b458185611f53565b9350611b55818560208601612041565b80840191505092915050565b6000611b6c82611f2a565b611b768185611f5e565b9350611b86818560208601612041565b611b8f81612146565b840191505092915050565b6000611ba7602683611f5e565b9150611bb282612157565b604082019050919050565b6000611bca601d83611f5e565b9150611bd5826121a6565b602082019050919050565b6000611bed602a83611f5e565b9150611bf8826121cf565b604082019050919050565b6000611c10603683611f5e565b9150611c1b8261221e565b604082019050919050565b611c2f81612037565b82525050565b6000611c418284611b30565b915081905092915050565b6000602082019050611c616000830184611ac3565b92915050565b6000604082019050611c7c6000830185611ac3565b611c896020830184611ac3565b9392505050565b6000606082019050611ca56000830186611ac3565b611cb26020830185611ac3565b611cbf6040830184611c26565b949350505050565b6000604082019050611cdc6000830185611ac3565b611ce96020830184611c26565b9392505050565b6000606082019050611d056000830186611ac3565b611d126020830185611c26565b611d1f6040830184611c26565b949350505050565b60006020820190508181036000830152611d418184611b61565b905092915050565b60006020820190508181036000830152611d6281611b9a565b9050919050565b60006020820190508181036000830152611d8281611bbd565b9050919050565b60006020820190508181036000830152611da281611be0565b9050919050565b60006020820190508181036000830152611dc281611c03565b9050919050565b6000602082019050611dde6000830184611c26565b92915050565b6000608082019050611df96000830187611c26565b8181036020830152611e0b8186611ad2565b9050611e1a6040830185611ac3565b611e276060830184611c26565b95945050505050565b6000604082019050611e456000830185611c26565b611e526020830184611c26565b9392505050565b600060a082019050611e6e6000830188611c26565b611e7b6020830187611c26565b8181036040830152611e8d8186611ad2565b9050611e9c6060830185611ac3565b611ea96080830184611c26565b9695505050505050565b6000611ebd611ece565b9050611ec98282612074565b919050565b6000604051905090565b600067ffffffffffffffff821115611ef357611ef2612103565b5b602082029050602081019050919050565b6000819050602082019050919050565b600081519050919050565b600081519050919050565b600081519050919050565b6000602082019050919050565b600082825260208201905092915050565b600081905092915050565b600082825260208201905092915050565b6000611f7a82612037565b9150611f8583612037565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff03821115611fba57611fb96120a5565b5b828201905092915050565b6000611fd082612037565b9150611fdb83612037565b925082821015611fee57611fed6120a5565b5b828203905092915050565b600061200482612017565b9050919050565b60008115159050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b60005b8381101561205f578082015181840152602081019050612044565b8381111561206e576000848401525b50505050565b61207d82612146565b810181811067ffffffffffffffff8211171561209c5761209b612103565b5b80604052505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600080fd5b600080fd5b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f416464726573733a20696e73756666696369656e742062616c616e636520666f60008201527f722063616c6c0000000000000000000000000000000000000000000000000000602082015250565b7f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000600082015250565b7f5361666545524332303a204552433230206f7065726174696f6e20646964206e60008201527f6f74207375636365656400000000000000000000000000000000000000000000602082015250565b7f5361666545524332303a20617070726f76652066726f6d206e6f6e2d7a65726f60008201527f20746f206e6f6e2d7a65726f20616c6c6f77616e636500000000000000000000602082015250565b61227681611ff9565b811461228157600080fd5b50565b61228d8161200b565b811461229857600080fd5b50565b6122a481612037565b81146122af57600080fd5b5056fea2646970667358221220d6f74d0903b8170eb0faadde1b2a7b45fd6545417f220764d9b6a6645cfe1a1964736f6c63430008070033"; + "0x60e06040523480156200001157600080fd5b50604051620026aa380380620026aa83398181016040528101906200003791906200024e565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614806200009f5750600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16145b15620000d7576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8173ffffffffffffffffffffffffffffffffffffffff1660a08173ffffffffffffffffffffffffffffffffffffffff1660601b815250508073ffffffffffffffffffffffffffffffffffffffff1660c08173ffffffffffffffffffffffffffffffffffffffff1660601b815250508073ffffffffffffffffffffffffffffffffffffffff1663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b1580156200018c57600080fd5b505afa158015620001a1573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620001c791906200021c565b73ffffffffffffffffffffffffffffffffffffffff1660808173ffffffffffffffffffffffffffffffffffffffff1660601b815250505050620002e8565b6000815190506200021681620002ce565b92915050565b600060208284031215620002355762000234620002c9565b5b6000620002458482850162000205565b91505092915050565b60008060408385031215620002685762000267620002c9565b5b6000620002788582860162000205565b92505060206200028b8582860162000205565b9150509250929050565b6000620002a282620002a9565b9050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600080fd5b620002d98162000295565b8114620002e557600080fd5b50565b60805160601c60a05160601c60c05160601c6122e8620003c26000396000818161033401528181610598015281816108e101528181610b0f01528181610ca501528181610f0701526112700152600081816102c30152818161046a015281816106f10152818161086f01528181610ac501528181610b3101528181610bc501528181610ebd01528181610f29015281816110110152611140015260008181610254015281816105e2015281816106820152818161080001528181610c3401528181610f710152818161108001526111af01526122e86000f3fe60806040526004361061004a5760003560e01c8063013b2ff81461004f57806321e093b11461007f5780632405620a146100aa57806354c49a2a146100e7578063a53fb10b14610124575b600080fd5b610069600480360381019061006491906118ff565b610161565b6040516100769190611dc9565b60405180910390f35b34801561008b57600080fd5b50610094610468565b6040516100a19190611c4c565b60405180910390f35b3480156100b657600080fd5b506100d160048036038101906100cc919061193f565b61048c565b6040516100de9190611dc9565b60405180910390f35b3480156100f357600080fd5b5061010e600480360381019061010991906119a6565b610a1a565b60405161011b9190611dc9565b60405180910390f35b34801561013057600080fd5b5061014b6004803603810190610146919061193f565b610ddb565b6040516101589190611dc9565b60405180910390f35b60008073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614156101c9576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000341415610204576040517fb813f54900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000600267ffffffffffffffff81111561022157610220612103565b5b60405190808252806020026020018201604052801561024f5781602001602082028036833780820191505090505b5090507f000000000000000000000000000000000000000000000000000000000000000081600081518110610287576102866120d4565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff16815250507f0000000000000000000000000000000000000000000000000000000000000000816001815181106102f6576102f56120d4565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff168152505060007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16637ff36ab53486858960c84261037f9190611f6f565b6040518663ffffffff1660e01b815260040161039e9493929190611de4565b6000604051808303818588803b1580156103b757600080fd5b505af11580156103cb573d6000803e3d6000fd5b50505050506040513d6000823e3d601f19601f820116820180604052508101906103f591906119f9565b9050600081600184516104089190611fc5565b81518110610419576104186120d4565b5b602002602001015190507f87890b0a30955b1db16cc894fbe24779ae05d9f337bfe8b6dfc0809b5bf9da113482604051610454929190611e30565b60405180910390a180935050505092915050565b7f000000000000000000000000000000000000000000000000000000000000000081565b60008073ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff1614806104f45750600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16145b1561052b576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000821415610566576040517fb813f54900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6105933330848673ffffffffffffffffffffffffffffffffffffffff166113a9909392919063ffffffff16565b6105de7f0000000000000000000000000000000000000000000000000000000000000000838573ffffffffffffffffffffffffffffffffffffffff166114329092919063ffffffff16565b60607f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff16141561076357600267ffffffffffffffff81111561064f5761064e612103565b5b60405190808252806020026020018201604052801561067d5781602001602082028036833780820191505090505b5090507f0000000000000000000000000000000000000000000000000000000000000000816000815181106106b5576106b46120d4565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff16815250507f000000000000000000000000000000000000000000000000000000000000000081600181518110610724576107236120d4565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff16815250506108dd565b600367ffffffffffffffff81111561077e5761077d612103565b5b6040519080825280602002602001820160405280156107ac5781602001602082028036833780820191505090505b50905083816000815181106107c4576107c36120d4565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff16815250507f000000000000000000000000000000000000000000000000000000000000000081600181518110610833576108326120d4565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff16815250507f0000000000000000000000000000000000000000000000000000000000000000816002815181106108a2576108a16120d4565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff16815250505b60007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166338ed17398588858b60c84261092c9190611f6f565b6040518663ffffffff1660e01b815260040161094c959493929190611e59565b600060405180830381600087803b15801561096657600080fd5b505af115801561097a573d6000803e3d6000fd5b505050506040513d6000823e3d601f19601f820116820180604052508101906109a391906119f9565b9050600081600184516109b69190611fc5565b815181106109c7576109c66120d4565b5b602002602001015190507f017190d3d99ee6d8dd0604ef1e71ff9802810c6485f57c9b2ed6169848dd119f868683604051610a0493929190611cf0565b60405180910390a1809350505050949350505050565b60008073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff161415610a82576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000821415610abd576040517fb813f54900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610b0a3330847f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166113a9909392919063ffffffff16565b610b757f0000000000000000000000000000000000000000000000000000000000000000837f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166114329092919063ffffffff16565b6000600267ffffffffffffffff811115610b9257610b91612103565b5b604051908082528060200260200182016040528015610bc05781602001602082028036833780820191505090505b5090507f000000000000000000000000000000000000000000000000000000000000000081600081518110610bf857610bf76120d4565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff16815250507f000000000000000000000000000000000000000000000000000000000000000081600181518110610c6757610c666120d4565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff168152505060007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166318cbafe58587858a60c842610cf09190611f6f565b6040518663ffffffff1660e01b8152600401610d10959493929190611e59565b600060405180830381600087803b158015610d2a57600080fd5b505af1158015610d3e573d6000803e3d6000fd5b505050506040513d6000823e3d601f19601f82011682018060405250810190610d6791906119f9565b905060008160018451610d7a9190611fc5565b81518110610d8b57610d8a6120d4565b5b602002602001015190507f74e171117e91660f493740924d8bad0caf48dc4fbccb767fb05935397a2c17ae8582604051610dc6929190611e30565b60405180910390a18093505050509392505050565b60008073ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff161480610e435750600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16145b15610e7a576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000821415610eb5576040517fb813f54900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610f023330847f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166113a9909392919063ffffffff16565b610f6d7f0000000000000000000000000000000000000000000000000000000000000000837f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166114329092919063ffffffff16565b60607f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1614156110f257600267ffffffffffffffff811115610fde57610fdd612103565b5b60405190808252806020026020018201604052801561100c5781602001602082028036833780820191505090505b5090507f000000000000000000000000000000000000000000000000000000000000000081600081518110611044576110436120d4565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff16815250507f0000000000000000000000000000000000000000000000000000000000000000816001815181106110b3576110b26120d4565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff168152505061126c565b600367ffffffffffffffff81111561110d5761110c612103565b5b60405190808252806020026020018201604052801561113b5781602001602082028036833780820191505090505b5090507f000000000000000000000000000000000000000000000000000000000000000081600081518110611173576111726120d4565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff16815250507f0000000000000000000000000000000000000000000000000000000000000000816001815181106111e2576111e16120d4565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff16815250508381600281518110611231576112306120d4565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff16815250505b60007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166338ed17398588858b60c8426112bb9190611f6f565b6040518663ffffffff1660e01b81526004016112db959493929190611e59565b600060405180830381600087803b1580156112f557600080fd5b505af1158015611309573d6000803e3d6000fd5b505050506040513d6000823e3d601f19601f8201168201806040525081019061133291906119f9565b9050600081600184516113459190611fc5565b81518110611356576113556120d4565b5b602002602001015190507f0a7cb8f6e1d29e616c1209a3f418c17b3a9137005377f6dd072217b1ede2573b86868360405161139393929190611cf0565b60405180910390a1809350505050949350505050565b61142c846323b872dd60e01b8585856040516024016113ca93929190611c90565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050611590565b50505050565b60008114806114cb575060008373ffffffffffffffffffffffffffffffffffffffff1663dd62ed3e30856040518363ffffffff1660e01b8152600401611479929190611c67565b60206040518083038186803b15801561149157600080fd5b505afa1580156114a5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114c99190611a6f565b145b61150a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161150190611da9565b60405180910390fd5b61158b8363095ea7b360e01b8484604051602401611529929190611cc7565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050611590565b505050565b60006115f2826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c65648152508573ffffffffffffffffffffffffffffffffffffffff166116579092919063ffffffff16565b905060008151111561165257808060200190518101906116129190611a42565b611651576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161164890611d89565b60405180910390fd5b5b505050565b6060611666848460008561166f565b90509392505050565b6060824710156116b4576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016116ab90611d49565b60405180910390fd5b6116bd85611783565b6116fc576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016116f390611d69565b60405180910390fd5b6000808673ffffffffffffffffffffffffffffffffffffffff1685876040516117259190611c35565b60006040518083038185875af1925050503d8060008114611762576040519150601f19603f3d011682016040523d82523d6000602084013e611767565b606091505b50915091506117778282866117a6565b92505050949350505050565b6000808273ffffffffffffffffffffffffffffffffffffffff163b119050919050565b606083156117b657829050611806565b6000835111156117c95782518084602001fd5b816040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016117fd9190611d27565b60405180910390fd5b9392505050565b600061182061181b84611ed8565b611eb3565b9050808382526020820190508285602086028201111561184357611842612137565b5b60005b85811015611873578161185988826118ea565b845260208401935060208301925050600181019050611846565b5050509392505050565b60008135905061188c8161226d565b92915050565b600082601f8301126118a7576118a6612132565b5b81516118b784826020860161180d565b91505092915050565b6000815190506118cf81612284565b92915050565b6000813590506118e48161229b565b92915050565b6000815190506118f98161229b565b92915050565b6000806040838503121561191657611915612141565b5b60006119248582860161187d565b9250506020611935858286016118d5565b9150509250929050565b6000806000806080858703121561195957611958612141565b5b60006119678782880161187d565b9450506020611978878288016118d5565b93505060406119898782880161187d565b925050606061199a878288016118d5565b91505092959194509250565b6000806000606084860312156119bf576119be612141565b5b60006119cd8682870161187d565b93505060206119de868287016118d5565b92505060406119ef868287016118d5565b9150509250925092565b600060208284031215611a0f57611a0e612141565b5b600082015167ffffffffffffffff811115611a2d57611a2c61213c565b5b611a3984828501611892565b91505092915050565b600060208284031215611a5857611a57612141565b5b6000611a66848285016118c0565b91505092915050565b600060208284031215611a8557611a84612141565b5b6000611a93848285016118ea565b91505092915050565b6000611aa88383611ab4565b60208301905092915050565b611abd81611ff9565b82525050565b611acc81611ff9565b82525050565b6000611add82611f14565b611ae78185611f42565b9350611af283611f04565b8060005b83811015611b23578151611b0a8882611a9c565b9750611b1583611f35565b925050600181019050611af6565b5085935050505092915050565b6000611b3b82611f1f565b611b458185611f53565b9350611b55818560208601612041565b80840191505092915050565b6000611b6c82611f2a565b611b768185611f5e565b9350611b86818560208601612041565b611b8f81612146565b840191505092915050565b6000611ba7602683611f5e565b9150611bb282612157565b604082019050919050565b6000611bca601d83611f5e565b9150611bd5826121a6565b602082019050919050565b6000611bed602a83611f5e565b9150611bf8826121cf565b604082019050919050565b6000611c10603683611f5e565b9150611c1b8261221e565b604082019050919050565b611c2f81612037565b82525050565b6000611c418284611b30565b915081905092915050565b6000602082019050611c616000830184611ac3565b92915050565b6000604082019050611c7c6000830185611ac3565b611c896020830184611ac3565b9392505050565b6000606082019050611ca56000830186611ac3565b611cb26020830185611ac3565b611cbf6040830184611c26565b949350505050565b6000604082019050611cdc6000830185611ac3565b611ce96020830184611c26565b9392505050565b6000606082019050611d056000830186611ac3565b611d126020830185611c26565b611d1f6040830184611c26565b949350505050565b60006020820190508181036000830152611d418184611b61565b905092915050565b60006020820190508181036000830152611d6281611b9a565b9050919050565b60006020820190508181036000830152611d8281611bbd565b9050919050565b60006020820190508181036000830152611da281611be0565b9050919050565b60006020820190508181036000830152611dc281611c03565b9050919050565b6000602082019050611dde6000830184611c26565b92915050565b6000608082019050611df96000830187611c26565b8181036020830152611e0b8186611ad2565b9050611e1a6040830185611ac3565b611e276060830184611c26565b95945050505050565b6000604082019050611e456000830185611c26565b611e526020830184611c26565b9392505050565b600060a082019050611e6e6000830188611c26565b611e7b6020830187611c26565b8181036040830152611e8d8186611ad2565b9050611e9c6060830185611ac3565b611ea96080830184611c26565b9695505050505050565b6000611ebd611ece565b9050611ec98282612074565b919050565b6000604051905090565b600067ffffffffffffffff821115611ef357611ef2612103565b5b602082029050602081019050919050565b6000819050602082019050919050565b600081519050919050565b600081519050919050565b600081519050919050565b6000602082019050919050565b600082825260208201905092915050565b600081905092915050565b600082825260208201905092915050565b6000611f7a82612037565b9150611f8583612037565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff03821115611fba57611fb96120a5565b5b828201905092915050565b6000611fd082612037565b9150611fdb83612037565b925082821015611fee57611fed6120a5565b5b828203905092915050565b600061200482612017565b9050919050565b60008115159050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b60005b8381101561205f578082015181840152602081019050612044565b8381111561206e576000848401525b50505050565b61207d82612146565b810181811067ffffffffffffffff8211171561209c5761209b612103565b5b80604052505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600080fd5b600080fd5b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f416464726573733a20696e73756666696369656e742062616c616e636520666f60008201527f722063616c6c0000000000000000000000000000000000000000000000000000602082015250565b7f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000600082015250565b7f5361666545524332303a204552433230206f7065726174696f6e20646964206e60008201527f6f74207375636365656400000000000000000000000000000000000000000000602082015250565b7f5361666545524332303a20617070726f76652066726f6d206e6f6e2d7a65726f60008201527f20746f206e6f6e2d7a65726f20616c6c6f77616e636500000000000000000000602082015250565b61227681611ff9565b811461228157600080fd5b50565b61228d8161200b565b811461229857600080fd5b50565b6122a481612037565b81146122af57600080fd5b5056fea264697066735822122096bbf433ab5f9af6cea73831cc6f3b262fcabb5666aa2844c4d0d980bbd96a2c64736f6c63430008070033"; type ZetaTokenConsumerUniV2ConstructorParams = | [signer?: Signer] diff --git a/packages/interfaces/typechain-types/factories/contracts/ZetaTokenConsumerUniV3.strategy.sol/ZetaTokenConsumerUniV3__factory.ts b/packages/interfaces/typechain-types/factories/contracts/ZetaTokenConsumerUniV3.strategy.sol/ZetaTokenConsumerUniV3__factory.ts index 45b9c450..af1385dc 100644 --- a/packages/interfaces/typechain-types/factories/contracts/ZetaTokenConsumerUniV3.strategy.sol/ZetaTokenConsumerUniV3__factory.ts +++ b/packages/interfaces/typechain-types/factories/contracts/ZetaTokenConsumerUniV3.strategy.sol/ZetaTokenConsumerUniV3__factory.ts @@ -353,7 +353,7 @@ const _abi = [ ]; const _bytecode = - "0x6101406040523480156200001257600080fd5b50604051620025af380380620025af83398181016040528101906200003891906200028a565b600073ffffffffffffffffffffffffffffffffffffffff168673ffffffffffffffffffffffffffffffffffffffff161480620000a05750600073ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff16145b80620000d85750600073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff16145b80620001105750600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16145b1562000148576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8573ffffffffffffffffffffffffffffffffffffffff1660e08173ffffffffffffffffffffffffffffffffffffffff1660601b815250508473ffffffffffffffffffffffffffffffffffffffff166101008173ffffffffffffffffffffffffffffffffffffffff1660601b815250508373ffffffffffffffffffffffffffffffffffffffff166101208173ffffffffffffffffffffffffffffffffffffffff1660601b815250508273ffffffffffffffffffffffffffffffffffffffff1660c08173ffffffffffffffffffffffffffffffffffffffff1660601b815250508162ffffff1660808162ffffff1660e81b815250508062ffffff1660a08162ffffff1660e81b81525050505050505050620003a2565b6000815190506200026d816200036e565b92915050565b600081519050620002848162000388565b92915050565b60008060008060008060c08789031215620002aa57620002a962000369565b5b6000620002ba89828a016200025c565b9650506020620002cd89828a016200025c565b9550506040620002e089828a016200025c565b9450506060620002f389828a016200025c565b93505060806200030689828a0162000273565b92505060a06200031989828a0162000273565b9150509295509295509295565b600062000333826200033a565b9050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600062ffffff82169050919050565b600080fd5b620003798162000326565b81146200038557600080fd5b50565b62000393816200035a565b81146200039f57600080fd5b50565b60805160e81c60a05160e81c60c05160601c60e05160601c6101005160601c6101205160601c6120fc620004b360003960006111400152600081816104030152818161062301528181610761015281816108560152818161099101528181610b0301528181610ed30152611031015260008181610343015281816104f5015281816106dc01528181610947015281816109b301528181610a0701528181610e8901528181610ef50152610f480152600081816103070152818161069a01528181610a4301528181610bb00152610f8a01526000818161067901528181610d240152610fab01526000818161037f015281816106bb0152818161087a01528181610a7f0152610f6901526120fc6000f3fe60806040526004361061008a5760003560e01c80633cbd7005116100595780633cbd70051461015957806354c49a2a146101845780635d9dfdde146101c1578063a53fb10b146101ec578063c6bbd5a71461022957610091565b8063013b2ff81461009657806321e093b1146100c65780632405620a146100f15780632c76d7a61461012e57610091565b3661009157005b600080fd5b6100b060048036038101906100ab919061161a565b610254565b6040516100bd9190611d24565b60405180910390f35b3480156100d257600080fd5b506100db6104f3565b6040516100e89190611b18565b60405180910390f35b3480156100fd57600080fd5b506101186004803603810190610113919061165a565b610517565b6040516101259190611d24565b60405180910390f35b34801561013a57600080fd5b50610143610854565b6040516101509190611c0e565b60405180910390f35b34801561016557600080fd5b5061016e610878565b60405161017b9190611d09565b60405180910390f35b34801561019057600080fd5b506101ab60048036038101906101a691906116c1565b61089c565b6040516101b89190611d24565b60405180910390f35b3480156101cd57600080fd5b506101d6610d22565b6040516101e39190611d09565b60405180910390f35b3480156101f857600080fd5b50610213600480360381019061020e919061165a565b610d46565b6040516102209190611d24565b60405180910390f35b34801561023557600080fd5b5061023e61113e565b60405161024b9190611bf3565b60405180910390f35b60008073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614156102bc576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60003414156102f7576040517fb813f54900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60006040518061010001604052807f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1681526020017f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1681526020017f000000000000000000000000000000000000000000000000000000000000000062ffffff1681526020018573ffffffffffffffffffffffffffffffffffffffff16815260200160c8426103d19190611dab565b8152602001348152602001848152602001600073ffffffffffffffffffffffffffffffffffffffff16815250905060007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663414bf38934846040518363ffffffff1660e01b815260040161045b9190611ced565b6020604051808303818588803b15801561047457600080fd5b505af1158015610488573d6000803e3d6000fd5b50505050506040513d601f19601f820116820180604052508101906104ad9190611741565b90507f87890b0a30955b1db16cc894fbe24779ae05d9f337bfe8b6dfc0809b5bf9da1134826040516104e0929190611d3f565b60405180910390a1809250505092915050565b7f000000000000000000000000000000000000000000000000000000000000000081565b60008073ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff16148061057f5750600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16145b156105b6576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008214156105f1576040517fb813f54900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61061e3330848673ffffffffffffffffffffffffffffffffffffffff16611162909392919063ffffffff16565b6106697f0000000000000000000000000000000000000000000000000000000000000000838573ffffffffffffffffffffffffffffffffffffffff166111eb9092919063ffffffff16565b60006040518060a00160405280857f00000000000000000000000000000000000000000000000000000000000000007f00000000000000000000000000000000000000000000000000000000000000007f00000000000000000000000000000000000000000000000000000000000000007f000000000000000000000000000000000000000000000000000000000000000060405160200161070f959493929190611a8d565b60405160208183030381529060405281526020018773ffffffffffffffffffffffffffffffffffffffff16815260200160c84261074c9190611dab565b815260200184815260200186815250905060007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663c04b8d59836040518263ffffffff1660e01b81526004016107b89190611ccb565b602060405180830381600087803b1580156107d257600080fd5b505af11580156107e6573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061080a9190611741565b90507f017190d3d99ee6d8dd0604ef1e71ff9802810c6485f57c9b2ed6169848dd119f85858360405161083f93929190611bbc565b60405180910390a18092505050949350505050565b7f000000000000000000000000000000000000000000000000000000000000000081565b7f000000000000000000000000000000000000000000000000000000000000000081565b60008073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff161415610904576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600082141561093f576040517fb813f54900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61098c3330847f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16611162909392919063ffffffff16565b6109f77f0000000000000000000000000000000000000000000000000000000000000000837f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166111eb9092919063ffffffff16565b60006040518061010001604052807f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1681526020017f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1681526020017f000000000000000000000000000000000000000000000000000000000000000062ffffff1681526020013073ffffffffffffffffffffffffffffffffffffffff16815260200160c842610ad19190611dab565b8152602001848152602001858152602001600073ffffffffffffffffffffffffffffffffffffffff16815250905060007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663414bf389836040518263ffffffff1660e01b8152600401610b5a9190611ced565b602060405180830381600087803b158015610b7457600080fd5b505af1158015610b88573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610bac9190611741565b90507f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16632e1a7d4d826040518263ffffffff1660e01b8152600401610c079190611d24565b600060405180830381600087803b158015610c2157600080fd5b505af1158015610c35573d6000803e3d6000fd5b505050507f74e171117e91660f493740924d8bad0caf48dc4fbccb767fb05935397a2c17ae8482604051610c6a929190611d3f565b60405180910390a160008673ffffffffffffffffffffffffffffffffffffffff1682604051610c9890611b03565b60006040518083038185875af1925050503d8060008114610cd5576040519150601f19603f3d011682016040523d82523d6000602084013e610cda565b606091505b5050905080610d15576040517f3794aeaf00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8193505050509392505050565b7f000000000000000000000000000000000000000000000000000000000000000081565b60008060009054906101000a900460ff1615610d8e576040517f29f745a700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60016000806101000a81548160ff021916908315150217905550600073ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff161480610e0f5750600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16145b15610e46576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000821415610e81576040517fb813f54900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610ece3330847f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16611162909392919063ffffffff16565b610f397f0000000000000000000000000000000000000000000000000000000000000000837f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166111eb9092919063ffffffff16565b60006040518060a001604052807f00000000000000000000000000000000000000000000000000000000000000007f00000000000000000000000000000000000000000000000000000000000000007f00000000000000000000000000000000000000000000000000000000000000007f000000000000000000000000000000000000000000000000000000000000000089604051602001610fdf959493929190611a8d565b60405160208183030381529060405281526020018773ffffffffffffffffffffffffffffffffffffffff16815260200160c84261101c9190611dab565b815260200184815260200186815250905060007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663c04b8d59836040518263ffffffff1660e01b81526004016110889190611ccb565b602060405180830381600087803b1580156110a257600080fd5b505af11580156110b6573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110da9190611741565b90507f0a7cb8f6e1d29e616c1209a3f418c17b3a9137005377f6dd072217b1ede2573b85858360405161110f93929190611bbc565b60405180910390a1809250505060008060006101000a81548160ff021916908315150217905550949350505050565b7f000000000000000000000000000000000000000000000000000000000000000081565b6111e5846323b872dd60e01b85858560405160240161118393929190611b5c565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050611349565b50505050565b6000811480611284575060008373ffffffffffffffffffffffffffffffffffffffff1663dd62ed3e30856040518363ffffffff1660e01b8152600401611232929190611b33565b60206040518083038186803b15801561124a57600080fd5b505afa15801561125e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112829190611741565b145b6112c3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016112ba90611cab565b60405180910390fd5b6113448363095ea7b360e01b84846040516024016112e2929190611b93565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050611349565b505050565b60006113ab826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c65648152508573ffffffffffffffffffffffffffffffffffffffff166114109092919063ffffffff16565b905060008151111561140b57808060200190518101906113cb9190611714565b61140a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161140190611c8b565b60405180910390fd5b5b505050565b606061141f8484600085611428565b90509392505050565b60608247101561146d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161146490611c4b565b60405180910390fd5b6114768561153c565b6114b5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016114ac90611c6b565b60405180910390fd5b6000808673ffffffffffffffffffffffffffffffffffffffff1685876040516114de9190611aec565b60006040518083038185875af1925050503d806000811461151b576040519150601f19603f3d011682016040523d82523d6000602084013e611520565b606091505b509150915061153082828661155f565b92505050949350505050565b6000808273ffffffffffffffffffffffffffffffffffffffff163b119050919050565b6060831561156f578290506115bf565b6000835111156115825782518084602001fd5b816040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016115b69190611c29565b60405180910390fd5b9392505050565b6000813590506115d581612081565b92915050565b6000815190506115ea81612098565b92915050565b6000813590506115ff816120af565b92915050565b600081519050611614816120af565b92915050565b6000806040838503121561163157611630611f38565b5b600061163f858286016115c6565b9250506020611650858286016115f0565b9150509250929050565b6000806000806080858703121561167457611673611f38565b5b6000611682878288016115c6565b9450506020611693878288016115f0565b93505060406116a4878288016115c6565b92505060606116b5878288016115f0565b91505092959194509250565b6000806000606084860312156116da576116d9611f38565b5b60006116e8868287016115c6565b93505060206116f9868287016115f0565b925050604061170a868287016115f0565b9150509250925092565b60006020828403121561172a57611729611f38565b5b6000611738848285016115db565b91505092915050565b60006020828403121561175757611756611f38565b5b600061176584828501611605565b91505092915050565b61177781611e01565b82525050565b61178681611e01565b82525050565b61179d61179882611e01565b611ed3565b82525050565b60006117ae82611d68565b6117b88185611d7e565b93506117c8818560208601611ea0565b6117d181611f3d565b840191505092915050565b60006117e782611d68565b6117f18185611d8f565b9350611801818560208601611ea0565b80840191505092915050565b61181681611e58565b82525050565b61182581611e6a565b82525050565b600061183682611d73565b6118408185611d9a565b9350611850818560208601611ea0565b61185981611f3d565b840191505092915050565b6000611871602683611d9a565b915061187c82611f68565b604082019050919050565b6000611894600083611d8f565b915061189f82611fb7565b600082019050919050565b60006118b7601d83611d9a565b91506118c282611fba565b602082019050919050565b60006118da602a83611d9a565b91506118e582611fe3565b604082019050919050565b60006118fd603683611d9a565b915061190882612032565b604082019050919050565b600060a083016000830151848203600086015261193082826117a3565b9150506020830151611945602086018261176e565b5060408301516119586040860182611a6f565b50606083015161196b6060860182611a6f565b50608083015161197e6080860182611a6f565b508091505092915050565b610100820160008201516119a0600085018261176e565b5060208201516119b3602085018261176e565b5060408201516119c66040850182611a3a565b5060608201516119d9606085018261176e565b5060808201516119ec6080850182611a6f565b5060a08201516119ff60a0850182611a6f565b5060c0820151611a1260c0850182611a6f565b5060e0820151611a2560e0850182611a2b565b50505050565b611a3481611e1f565b82525050565b611a4381611e3f565b82525050565b611a5281611e3f565b82525050565b611a69611a6482611e3f565b611ef7565b82525050565b611a7881611e4e565b82525050565b611a8781611e4e565b82525050565b6000611a99828861178c565b601482019150611aa98287611a58565b600382019150611ab9828661178c565b601482019150611ac98285611a58565b600382019150611ad9828461178c565b6014820191508190509695505050505050565b6000611af882846117dc565b915081905092915050565b6000611b0e82611887565b9150819050919050565b6000602082019050611b2d600083018461177d565b92915050565b6000604082019050611b48600083018561177d565b611b55602083018461177d565b9392505050565b6000606082019050611b71600083018661177d565b611b7e602083018561177d565b611b8b6040830184611a7e565b949350505050565b6000604082019050611ba8600083018561177d565b611bb56020830184611a7e565b9392505050565b6000606082019050611bd1600083018661177d565b611bde6020830185611a7e565b611beb6040830184611a7e565b949350505050565b6000602082019050611c08600083018461180d565b92915050565b6000602082019050611c23600083018461181c565b92915050565b60006020820190508181036000830152611c43818461182b565b905092915050565b60006020820190508181036000830152611c6481611864565b9050919050565b60006020820190508181036000830152611c84816118aa565b9050919050565b60006020820190508181036000830152611ca4816118cd565b9050919050565b60006020820190508181036000830152611cc4816118f0565b9050919050565b60006020820190508181036000830152611ce58184611913565b905092915050565b600061010082019050611d036000830184611989565b92915050565b6000602082019050611d1e6000830184611a49565b92915050565b6000602082019050611d396000830184611a7e565b92915050565b6000604082019050611d546000830185611a7e565b611d616020830184611a7e565b9392505050565b600081519050919050565b600081519050919050565b600082825260208201905092915050565b600081905092915050565b600082825260208201905092915050565b6000611db682611e4e565b9150611dc183611e4e565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff03821115611df657611df5611f09565b5b828201905092915050565b6000611e0c82611e1f565b9050919050565b60008115159050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600062ffffff82169050919050565b6000819050919050565b6000611e6382611e7c565b9050919050565b6000611e7582611e7c565b9050919050565b6000611e8782611e8e565b9050919050565b6000611e9982611e1f565b9050919050565b60005b83811015611ebe578082015181840152602081019050611ea3565b83811115611ecd576000848401525b50505050565b6000611ede82611ee5565b9050919050565b6000611ef082611f5b565b9050919050565b6000611f0282611f4e565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b600080fd5b6000601f19601f8301169050919050565b60008160e81b9050919050565b60008160601b9050919050565b7f416464726573733a20696e73756666696369656e742062616c616e636520666f60008201527f722063616c6c0000000000000000000000000000000000000000000000000000602082015250565b50565b7f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000600082015250565b7f5361666545524332303a204552433230206f7065726174696f6e20646964206e60008201527f6f74207375636365656400000000000000000000000000000000000000000000602082015250565b7f5361666545524332303a20617070726f76652066726f6d206e6f6e2d7a65726f60008201527f20746f206e6f6e2d7a65726f20616c6c6f77616e636500000000000000000000602082015250565b61208a81611e01565b811461209557600080fd5b50565b6120a181611e13565b81146120ac57600080fd5b50565b6120b881611e4e565b81146120c357600080fd5b5056fea264697066735822122039a694c0158622ee75b5f35cba659638056a539d34b56459f55502d38bab836564736f6c63430008070033"; + "0x6101406040523480156200001257600080fd5b50604051620025af380380620025af83398181016040528101906200003891906200028a565b600073ffffffffffffffffffffffffffffffffffffffff168673ffffffffffffffffffffffffffffffffffffffff161480620000a05750600073ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff16145b80620000d85750600073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff16145b80620001105750600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16145b1562000148576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8573ffffffffffffffffffffffffffffffffffffffff1660e08173ffffffffffffffffffffffffffffffffffffffff1660601b815250508473ffffffffffffffffffffffffffffffffffffffff166101008173ffffffffffffffffffffffffffffffffffffffff1660601b815250508373ffffffffffffffffffffffffffffffffffffffff166101208173ffffffffffffffffffffffffffffffffffffffff1660601b815250508273ffffffffffffffffffffffffffffffffffffffff1660c08173ffffffffffffffffffffffffffffffffffffffff1660601b815250508162ffffff1660808162ffffff1660e81b815250508062ffffff1660a08162ffffff1660e81b81525050505050505050620003a2565b6000815190506200026d816200036e565b92915050565b600081519050620002848162000388565b92915050565b60008060008060008060c08789031215620002aa57620002a962000369565b5b6000620002ba89828a016200025c565b9650506020620002cd89828a016200025c565b9550506040620002e089828a016200025c565b9450506060620002f389828a016200025c565b93505060806200030689828a0162000273565b92505060a06200031989828a0162000273565b9150509295509295509295565b600062000333826200033a565b9050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600062ffffff82169050919050565b600080fd5b620003798162000326565b81146200038557600080fd5b50565b62000393816200035a565b81146200039f57600080fd5b50565b60805160e81c60a05160e81c60c05160601c60e05160601c6101005160601c6101205160601c6120fc620004b360003960006111400152600081816104030152818161062301528181610761015281816108560152818161099101528181610b0301528181610ed30152611031015260008181610343015281816104f5015281816106dc01528181610947015281816109b301528181610a0701528181610e8901528181610ef50152610f480152600081816103070152818161069a01528181610a4301528181610bb00152610f8a01526000818161067901528181610d240152610fab01526000818161037f015281816106bb0152818161087a01528181610a7f0152610f6901526120fc6000f3fe60806040526004361061008a5760003560e01c80633cbd7005116100595780633cbd70051461015957806354c49a2a146101845780635d9dfdde146101c1578063a53fb10b146101ec578063c6bbd5a71461022957610091565b8063013b2ff81461009657806321e093b1146100c65780632405620a146100f15780632c76d7a61461012e57610091565b3661009157005b600080fd5b6100b060048036038101906100ab919061161a565b610254565b6040516100bd9190611d24565b60405180910390f35b3480156100d257600080fd5b506100db6104f3565b6040516100e89190611b18565b60405180910390f35b3480156100fd57600080fd5b506101186004803603810190610113919061165a565b610517565b6040516101259190611d24565b60405180910390f35b34801561013a57600080fd5b50610143610854565b6040516101509190611c0e565b60405180910390f35b34801561016557600080fd5b5061016e610878565b60405161017b9190611d09565b60405180910390f35b34801561019057600080fd5b506101ab60048036038101906101a691906116c1565b61089c565b6040516101b89190611d24565b60405180910390f35b3480156101cd57600080fd5b506101d6610d22565b6040516101e39190611d09565b60405180910390f35b3480156101f857600080fd5b50610213600480360381019061020e919061165a565b610d46565b6040516102209190611d24565b60405180910390f35b34801561023557600080fd5b5061023e61113e565b60405161024b9190611bf3565b60405180910390f35b60008073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614156102bc576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60003414156102f7576040517fb813f54900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60006040518061010001604052807f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1681526020017f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1681526020017f000000000000000000000000000000000000000000000000000000000000000062ffffff1681526020018573ffffffffffffffffffffffffffffffffffffffff16815260200160c8426103d19190611dab565b8152602001348152602001848152602001600073ffffffffffffffffffffffffffffffffffffffff16815250905060007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663414bf38934846040518363ffffffff1660e01b815260040161045b9190611ced565b6020604051808303818588803b15801561047457600080fd5b505af1158015610488573d6000803e3d6000fd5b50505050506040513d601f19601f820116820180604052508101906104ad9190611741565b90507f87890b0a30955b1db16cc894fbe24779ae05d9f337bfe8b6dfc0809b5bf9da1134826040516104e0929190611d3f565b60405180910390a1809250505092915050565b7f000000000000000000000000000000000000000000000000000000000000000081565b60008073ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff16148061057f5750600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16145b156105b6576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008214156105f1576040517fb813f54900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61061e3330848673ffffffffffffffffffffffffffffffffffffffff16611162909392919063ffffffff16565b6106697f0000000000000000000000000000000000000000000000000000000000000000838573ffffffffffffffffffffffffffffffffffffffff166111eb9092919063ffffffff16565b60006040518060a00160405280857f00000000000000000000000000000000000000000000000000000000000000007f00000000000000000000000000000000000000000000000000000000000000007f00000000000000000000000000000000000000000000000000000000000000007f000000000000000000000000000000000000000000000000000000000000000060405160200161070f959493929190611a8d565b60405160208183030381529060405281526020018773ffffffffffffffffffffffffffffffffffffffff16815260200160c84261074c9190611dab565b815260200184815260200186815250905060007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663c04b8d59836040518263ffffffff1660e01b81526004016107b89190611ccb565b602060405180830381600087803b1580156107d257600080fd5b505af11580156107e6573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061080a9190611741565b90507f017190d3d99ee6d8dd0604ef1e71ff9802810c6485f57c9b2ed6169848dd119f85858360405161083f93929190611bbc565b60405180910390a18092505050949350505050565b7f000000000000000000000000000000000000000000000000000000000000000081565b7f000000000000000000000000000000000000000000000000000000000000000081565b60008073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff161415610904576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600082141561093f576040517fb813f54900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61098c3330847f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16611162909392919063ffffffff16565b6109f77f0000000000000000000000000000000000000000000000000000000000000000837f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166111eb9092919063ffffffff16565b60006040518061010001604052807f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1681526020017f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1681526020017f000000000000000000000000000000000000000000000000000000000000000062ffffff1681526020013073ffffffffffffffffffffffffffffffffffffffff16815260200160c842610ad19190611dab565b8152602001848152602001858152602001600073ffffffffffffffffffffffffffffffffffffffff16815250905060007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663414bf389836040518263ffffffff1660e01b8152600401610b5a9190611ced565b602060405180830381600087803b158015610b7457600080fd5b505af1158015610b88573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610bac9190611741565b90507f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16632e1a7d4d826040518263ffffffff1660e01b8152600401610c079190611d24565b600060405180830381600087803b158015610c2157600080fd5b505af1158015610c35573d6000803e3d6000fd5b505050507f74e171117e91660f493740924d8bad0caf48dc4fbccb767fb05935397a2c17ae8482604051610c6a929190611d3f565b60405180910390a160008673ffffffffffffffffffffffffffffffffffffffff1682604051610c9890611b03565b60006040518083038185875af1925050503d8060008114610cd5576040519150601f19603f3d011682016040523d82523d6000602084013e610cda565b606091505b5050905080610d15576040517f3794aeaf00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8193505050509392505050565b7f000000000000000000000000000000000000000000000000000000000000000081565b60008060009054906101000a900460ff1615610d8e576040517f29f745a700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60016000806101000a81548160ff021916908315150217905550600073ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff161480610e0f5750600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16145b15610e46576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000821415610e81576040517fb813f54900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610ece3330847f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16611162909392919063ffffffff16565b610f397f0000000000000000000000000000000000000000000000000000000000000000837f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166111eb9092919063ffffffff16565b60006040518060a001604052807f00000000000000000000000000000000000000000000000000000000000000007f00000000000000000000000000000000000000000000000000000000000000007f00000000000000000000000000000000000000000000000000000000000000007f000000000000000000000000000000000000000000000000000000000000000089604051602001610fdf959493929190611a8d565b60405160208183030381529060405281526020018773ffffffffffffffffffffffffffffffffffffffff16815260200160c84261101c9190611dab565b815260200184815260200186815250905060007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663c04b8d59836040518263ffffffff1660e01b81526004016110889190611ccb565b602060405180830381600087803b1580156110a257600080fd5b505af11580156110b6573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110da9190611741565b90507f0a7cb8f6e1d29e616c1209a3f418c17b3a9137005377f6dd072217b1ede2573b85858360405161110f93929190611bbc565b60405180910390a1809250505060008060006101000a81548160ff021916908315150217905550949350505050565b7f000000000000000000000000000000000000000000000000000000000000000081565b6111e5846323b872dd60e01b85858560405160240161118393929190611b5c565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050611349565b50505050565b6000811480611284575060008373ffffffffffffffffffffffffffffffffffffffff1663dd62ed3e30856040518363ffffffff1660e01b8152600401611232929190611b33565b60206040518083038186803b15801561124a57600080fd5b505afa15801561125e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112829190611741565b145b6112c3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016112ba90611cab565b60405180910390fd5b6113448363095ea7b360e01b84846040516024016112e2929190611b93565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050611349565b505050565b60006113ab826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c65648152508573ffffffffffffffffffffffffffffffffffffffff166114109092919063ffffffff16565b905060008151111561140b57808060200190518101906113cb9190611714565b61140a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161140190611c8b565b60405180910390fd5b5b505050565b606061141f8484600085611428565b90509392505050565b60608247101561146d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161146490611c4b565b60405180910390fd5b6114768561153c565b6114b5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016114ac90611c6b565b60405180910390fd5b6000808673ffffffffffffffffffffffffffffffffffffffff1685876040516114de9190611aec565b60006040518083038185875af1925050503d806000811461151b576040519150601f19603f3d011682016040523d82523d6000602084013e611520565b606091505b509150915061153082828661155f565b92505050949350505050565b6000808273ffffffffffffffffffffffffffffffffffffffff163b119050919050565b6060831561156f578290506115bf565b6000835111156115825782518084602001fd5b816040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016115b69190611c29565b60405180910390fd5b9392505050565b6000813590506115d581612081565b92915050565b6000815190506115ea81612098565b92915050565b6000813590506115ff816120af565b92915050565b600081519050611614816120af565b92915050565b6000806040838503121561163157611630611f38565b5b600061163f858286016115c6565b9250506020611650858286016115f0565b9150509250929050565b6000806000806080858703121561167457611673611f38565b5b6000611682878288016115c6565b9450506020611693878288016115f0565b93505060406116a4878288016115c6565b92505060606116b5878288016115f0565b91505092959194509250565b6000806000606084860312156116da576116d9611f38565b5b60006116e8868287016115c6565b93505060206116f9868287016115f0565b925050604061170a868287016115f0565b9150509250925092565b60006020828403121561172a57611729611f38565b5b6000611738848285016115db565b91505092915050565b60006020828403121561175757611756611f38565b5b600061176584828501611605565b91505092915050565b61177781611e01565b82525050565b61178681611e01565b82525050565b61179d61179882611e01565b611ed3565b82525050565b60006117ae82611d68565b6117b88185611d7e565b93506117c8818560208601611ea0565b6117d181611f3d565b840191505092915050565b60006117e782611d68565b6117f18185611d8f565b9350611801818560208601611ea0565b80840191505092915050565b61181681611e58565b82525050565b61182581611e6a565b82525050565b600061183682611d73565b6118408185611d9a565b9350611850818560208601611ea0565b61185981611f3d565b840191505092915050565b6000611871602683611d9a565b915061187c82611f68565b604082019050919050565b6000611894600083611d8f565b915061189f82611fb7565b600082019050919050565b60006118b7601d83611d9a565b91506118c282611fba565b602082019050919050565b60006118da602a83611d9a565b91506118e582611fe3565b604082019050919050565b60006118fd603683611d9a565b915061190882612032565b604082019050919050565b600060a083016000830151848203600086015261193082826117a3565b9150506020830151611945602086018261176e565b5060408301516119586040860182611a6f565b50606083015161196b6060860182611a6f565b50608083015161197e6080860182611a6f565b508091505092915050565b610100820160008201516119a0600085018261176e565b5060208201516119b3602085018261176e565b5060408201516119c66040850182611a3a565b5060608201516119d9606085018261176e565b5060808201516119ec6080850182611a6f565b5060a08201516119ff60a0850182611a6f565b5060c0820151611a1260c0850182611a6f565b5060e0820151611a2560e0850182611a2b565b50505050565b611a3481611e1f565b82525050565b611a4381611e3f565b82525050565b611a5281611e3f565b82525050565b611a69611a6482611e3f565b611ef7565b82525050565b611a7881611e4e565b82525050565b611a8781611e4e565b82525050565b6000611a99828861178c565b601482019150611aa98287611a58565b600382019150611ab9828661178c565b601482019150611ac98285611a58565b600382019150611ad9828461178c565b6014820191508190509695505050505050565b6000611af882846117dc565b915081905092915050565b6000611b0e82611887565b9150819050919050565b6000602082019050611b2d600083018461177d565b92915050565b6000604082019050611b48600083018561177d565b611b55602083018461177d565b9392505050565b6000606082019050611b71600083018661177d565b611b7e602083018561177d565b611b8b6040830184611a7e565b949350505050565b6000604082019050611ba8600083018561177d565b611bb56020830184611a7e565b9392505050565b6000606082019050611bd1600083018661177d565b611bde6020830185611a7e565b611beb6040830184611a7e565b949350505050565b6000602082019050611c08600083018461180d565b92915050565b6000602082019050611c23600083018461181c565b92915050565b60006020820190508181036000830152611c43818461182b565b905092915050565b60006020820190508181036000830152611c6481611864565b9050919050565b60006020820190508181036000830152611c84816118aa565b9050919050565b60006020820190508181036000830152611ca4816118cd565b9050919050565b60006020820190508181036000830152611cc4816118f0565b9050919050565b60006020820190508181036000830152611ce58184611913565b905092915050565b600061010082019050611d036000830184611989565b92915050565b6000602082019050611d1e6000830184611a49565b92915050565b6000602082019050611d396000830184611a7e565b92915050565b6000604082019050611d546000830185611a7e565b611d616020830184611a7e565b9392505050565b600081519050919050565b600081519050919050565b600082825260208201905092915050565b600081905092915050565b600082825260208201905092915050565b6000611db682611e4e565b9150611dc183611e4e565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff03821115611df657611df5611f09565b5b828201905092915050565b6000611e0c82611e1f565b9050919050565b60008115159050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600062ffffff82169050919050565b6000819050919050565b6000611e6382611e7c565b9050919050565b6000611e7582611e7c565b9050919050565b6000611e8782611e8e565b9050919050565b6000611e9982611e1f565b9050919050565b60005b83811015611ebe578082015181840152602081019050611ea3565b83811115611ecd576000848401525b50505050565b6000611ede82611ee5565b9050919050565b6000611ef082611f5b565b9050919050565b6000611f0282611f4e565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b600080fd5b6000601f19601f8301169050919050565b60008160e81b9050919050565b60008160601b9050919050565b7f416464726573733a20696e73756666696369656e742062616c616e636520666f60008201527f722063616c6c0000000000000000000000000000000000000000000000000000602082015250565b50565b7f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000600082015250565b7f5361666545524332303a204552433230206f7065726174696f6e20646964206e60008201527f6f74207375636365656400000000000000000000000000000000000000000000602082015250565b7f5361666545524332303a20617070726f76652066726f6d206e6f6e2d7a65726f60008201527f20746f206e6f6e2d7a65726f20616c6c6f77616e636500000000000000000000602082015250565b61208a81611e01565b811461209557600080fd5b50565b6120a181611e13565b81146120ac57600080fd5b50565b6120b881611e4e565b81146120c357600080fd5b5056fea2646970667358221220ba1deb60c4dd172fd2aeafe06e35fd018f28f0cff1638cf114f21634020115e364736f6c63430008070033"; type ZetaTokenConsumerUniV3ConstructorParams = | [signer?: Signer] diff --git a/packages/interfaces/typechain-types/factories/contracts/testing/ZetaInteractorMock__factory.ts b/packages/interfaces/typechain-types/factories/contracts/testing/ZetaInteractorMock__factory.ts index 2f263147..a344caf7 100644 --- a/packages/interfaces/typechain-types/factories/contracts/testing/ZetaInteractorMock__factory.ts +++ b/packages/interfaces/typechain-types/factories/contracts/testing/ZetaInteractorMock__factory.ts @@ -280,7 +280,7 @@ const _abi = [ ]; const _bytecode = - "0x60c06040523480156200001157600080fd5b506040516200131a3803806200131a833981810160405281019062000037919062000228565b80620000586200004c6200010760201b60201c565b6200010f60201b60201c565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415620000c0576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b46608081815250508073ffffffffffffffffffffffffffffffffffffffff1660a08173ffffffffffffffffffffffffffffffffffffffff1660601b815250505050620002ad565b600033905090565b600160006101000a81549073ffffffffffffffffffffffffffffffffffffffff02191690556200014a816200014d60201b620007191760201c565b50565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050816000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b600081519050620002228162000293565b92915050565b6000602082840312156200024157620002406200028e565b5b6000620002518482850162000211565b91505092915050565b600062000267826200026e565b9050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600080fd5b6200029e816200025a565b8114620002aa57600080fd5b50565b60805160a05160601c61103d620002dd6000396000818161058301526107df01526000610369015261103d6000f3fe608060405234801561001057600080fd5b506004361061009e5760003560e01c806379ba50971161006657806379ba50971461013157806383f3084f1461013b5780638da5cb5b14610159578063e30c397814610177578063f2fde38b146101955761009e565b80632618143f146100a35780633749c51a146100d35780633ff0693c146100ef5780634fd3f7d71461010b578063715018a614610127575b600080fd5b6100bd60048036038101906100b89190610ac8565b6101b1565b6040516100ca9190610ce1565b60405180910390f35b6100ed60048036038101906100e89190610a36565b610251565b005b61010960048036038101906101049190610a7f565b6102e7565b005b61012560048036038101906101209190610af5565b6103c8565b005b61012f61046c565b005b6101396104f4565b005b610143610581565b6040516101509190610d03565b60405180910390f35b6101616105a5565b60405161016e9190610cc6565b60405180910390f35b61017f6105ce565b60405161018c9190610cc6565b60405180910390f35b6101af60048036038101906101aa9190610a09565b6105f8565b005b600260205280600052604060002060009150905080546101d090610ec2565b80601f01602080910402602001604051908101604052809291908181526020018280546101fc90610ec2565b80156102495780601f1061021e57610100808354040283529160200191610249565b820191906000526020600020905b81548152906001019060200180831161022c57829003601f168201915b505050505081565b8061025a6107dd565b600260008260200135815260200190815260200160002060405161027e9190610caf565b60405180910390208180600001906102969190610d5e565b6040516102a4929190610c96565b6040518091039020146102e3576040517fb473eb0a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5050565b806102f06107dd565b3073ffffffffffffffffffffffffffffffffffffffff1681600001602081019061031a9190610a09565b73ffffffffffffffffffffffffffffffffffffffff1614610367576040517fc03e9c3f00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b7f00000000000000000000000000000000000000000000000000000000000000008160200135146103c4576040517fc03e9c3f00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5050565b6103d061086f565b73ffffffffffffffffffffffffffffffffffffffff166103ee6105a5565b73ffffffffffffffffffffffffffffffffffffffff1614610444576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161043b90610d3e565b60405180910390fd5b81816002600086815260200190815260200160002091906104669291906108a8565b50505050565b61047461086f565b73ffffffffffffffffffffffffffffffffffffffff166104926105a5565b73ffffffffffffffffffffffffffffffffffffffff16146104e8576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016104df90610d3e565b60405180910390fd5b6104f26000610877565b565b60006104fe61086f565b90508073ffffffffffffffffffffffffffffffffffffffff1661051f6105ce565b73ffffffffffffffffffffffffffffffffffffffff1614610575576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161056c90610d1e565b60405180910390fd5b61057e81610877565b50565b7f000000000000000000000000000000000000000000000000000000000000000081565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b6000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b61060061086f565b73ffffffffffffffffffffffffffffffffffffffff1661061e6105a5565b73ffffffffffffffffffffffffffffffffffffffff1614610674576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161066b90610d3e565b60405180910390fd5b80600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508073ffffffffffffffffffffffffffffffffffffffff166106d46105a5565b73ffffffffffffffffffffffffffffffffffffffff167f38d16b8cac22d99fc7c124b9cd0de2d3fa1faef420bfe791d8c362d765e2270060405160405180910390a350565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050816000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461086d57336040517fcbd9d2e00000000000000000000000000000000000000000000000000000000081526004016108649190610cc6565b60405180910390fd5b565b600033905090565b600160006101000a81549073ffffffffffffffffffffffffffffffffffffffff02191690556108a581610719565b50565b8280546108b490610ec2565b90600052602060002090601f0160209004810192826108d6576000855561091d565b82601f106108ef57803560ff191683800117855561091d565b8280016001018555821561091d579182015b8281111561091c578235825591602001919060010190610901565b5b50905061092a919061092e565b5090565b5b8082111561094757600081600090555060010161092f565b5090565b60008135905061095a81610fd9565b92915050565b60008083601f84011261097657610975610f28565b5b8235905067ffffffffffffffff81111561099357610992610f23565b5b6020830191508360018202830111156109af576109ae610f3c565b5b9250929050565b600060a082840312156109cc576109cb610f32565b5b81905092915050565b600060c082840312156109eb576109ea610f32565b5b81905092915050565b600081359050610a0381610ff0565b92915050565b600060208284031215610a1f57610a1e610f4b565b5b6000610a2d8482850161094b565b91505092915050565b600060208284031215610a4c57610a4b610f4b565b5b600082013567ffffffffffffffff811115610a6a57610a69610f46565b5b610a76848285016109b6565b91505092915050565b600060208284031215610a9557610a94610f4b565b5b600082013567ffffffffffffffff811115610ab357610ab2610f46565b5b610abf848285016109d5565b91505092915050565b600060208284031215610ade57610add610f4b565b5b6000610aec848285016109f4565b91505092915050565b600080600060408486031215610b0e57610b0d610f4b565b5b6000610b1c868287016109f4565b935050602084013567ffffffffffffffff811115610b3d57610b3c610f46565b5b610b4986828701610960565b92509250509250925092565b610b5e81610e0e565b82525050565b6000610b708385610df2565b9350610b7d838584610e80565b82840190509392505050565b6000610b9482610dd6565b610b9e8185610de1565b9350610bae818560208601610e8f565b610bb781610f50565b840191505092915050565b60008154610bcf81610ec2565b610bd98186610df2565b94506001821660008114610bf45760018114610c0557610c38565b60ff19831686528186019350610c38565b610c0e85610dc1565b60005b83811015610c3057815481890152600182019150602081019050610c11565b838801955050505b50505092915050565b610c4a81610e4a565b82525050565b6000610c5d602983610dfd565b9150610c6882610f61565b604082019050919050565b6000610c80602083610dfd565b9150610c8b82610fb0565b602082019050919050565b6000610ca3828486610b64565b91508190509392505050565b6000610cbb8284610bc2565b915081905092915050565b6000602082019050610cdb6000830184610b55565b92915050565b60006020820190508181036000830152610cfb8184610b89565b905092915050565b6000602082019050610d186000830184610c41565b92915050565b60006020820190508181036000830152610d3781610c50565b9050919050565b60006020820190508181036000830152610d5781610c73565b9050919050565b60008083356001602003843603038112610d7b57610d7a610f37565b5b80840192508235915067ffffffffffffffff821115610d9d57610d9c610f2d565b5b602083019250600182023603831315610db957610db8610f41565b5b509250929050565b60008190508160005260206000209050919050565b600081519050919050565b600082825260208201905092915050565b600081905092915050565b600082825260208201905092915050565b6000610e1982610e20565b9050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b6000610e5582610e5c565b9050919050565b6000610e6782610e6e565b9050919050565b6000610e7982610e20565b9050919050565b82818337600083830152505050565b60005b83811015610ead578082015181840152602081019050610e92565b83811115610ebc576000848401525b50505050565b60006002820490506001821680610eda57607f821691505b60208210811415610eee57610eed610ef4565b5b50919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f4f776e61626c6532537465703a2063616c6c6572206973206e6f74207468652060008201527f6e6577206f776e65720000000000000000000000000000000000000000000000602082015250565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b610fe281610e0e565b8114610fed57600080fd5b50565b610ff981610e40565b811461100457600080fd5b5056fea264697066735822122031dbc47d254d071d88a7ccc0c6e8c79ccd7fd28f9597f2524870fb4bf2785f8364736f6c63430008070033"; + "0x60c06040523480156200001157600080fd5b506040516200123c3803806200123c833981810160405281019062000037919062000228565b80620000586200004c6200010760201b60201c565b6200010f60201b60201c565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415620000c0576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b46608081815250508073ffffffffffffffffffffffffffffffffffffffff1660a08173ffffffffffffffffffffffffffffffffffffffff1660601b815250505050620002ad565b600033905090565b600160006101000a81549073ffffffffffffffffffffffffffffffffffffffff02191690556200014a816200014d60201b620005bd1760201c565b50565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050816000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b600081519050620002228162000293565b92915050565b6000602082840312156200024157620002406200028e565b5b6000620002518482850162000211565b91505092915050565b600062000267826200026e565b9050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600080fd5b6200029e816200025a565b8114620002aa57600080fd5b50565b60805160a05160601c610f5f620002dd6000396000818161049b0152610683015260006103690152610f5f6000f3fe608060405234801561001057600080fd5b506004361061009e5760003560e01c806379ba50971161006657806379ba50971461013157806383f3084f1461013b5780638da5cb5b14610159578063e30c397814610177578063f2fde38b146101955761009e565b80632618143f146100a35780633749c51a146100d35780633ff0693c146100ef5780634fd3f7d71461010b578063715018a614610127575b600080fd5b6100bd60048036038101906100b891906109ea565b6101b1565b6040516100ca9190610c03565b60405180910390f35b6100ed60048036038101906100e89190610958565b610251565b005b610109600480360381019061010491906109a1565b6102e7565b005b61012560048036038101906101209190610a17565b6103c8565b005b61012f6103f8565b005b61013961040c565b005b610143610499565b6040516101509190610c25565b60405180910390f35b6101616104bd565b60405161016e9190610be8565b60405180910390f35b61017f6104e6565b60405161018c9190610be8565b60405180910390f35b6101af60048036038101906101aa919061092b565b610510565b005b600260205280600052604060002060009150905080546101d090610de4565b80601f01602080910402602001604051908101604052809291908181526020018280546101fc90610de4565b80156102495780601f1061021e57610100808354040283529160200191610249565b820191906000526020600020905b81548152906001019060200180831161022c57829003601f168201915b505050505081565b8061025a610681565b600260008260200135815260200190815260200160002060405161027e9190610bd1565b60405180910390208180600001906102969190610c80565b6040516102a4929190610bb8565b6040518091039020146102e3576040517fb473eb0a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5050565b806102f0610681565b3073ffffffffffffffffffffffffffffffffffffffff1681600001602081019061031a919061092b565b73ffffffffffffffffffffffffffffffffffffffff1614610367576040517fc03e9c3f00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b7f00000000000000000000000000000000000000000000000000000000000000008160200135146103c4576040517fc03e9c3f00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5050565b6103d0610713565b81816002600086815260200190815260200160002091906103f29291906107ca565b50505050565b610400610713565b61040a6000610791565b565b60006104166107c2565b90508073ffffffffffffffffffffffffffffffffffffffff166104376104e6565b73ffffffffffffffffffffffffffffffffffffffff161461048d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161048490610c40565b60405180910390fd5b61049681610791565b50565b7f000000000000000000000000000000000000000000000000000000000000000081565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b6000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b610518610713565b80600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508073ffffffffffffffffffffffffffffffffffffffff166105786104bd565b73ffffffffffffffffffffffffffffffffffffffff167f38d16b8cac22d99fc7c124b9cd0de2d3fa1faef420bfe791d8c362d765e2270060405160405180910390a350565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050816000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461071157336040517fcbd9d2e00000000000000000000000000000000000000000000000000000000081526004016107089190610be8565b60405180910390fd5b565b61071b6107c2565b73ffffffffffffffffffffffffffffffffffffffff166107396104bd565b73ffffffffffffffffffffffffffffffffffffffff161461078f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161078690610c60565b60405180910390fd5b565b600160006101000a81549073ffffffffffffffffffffffffffffffffffffffff02191690556107bf816105bd565b50565b600033905090565b8280546107d690610de4565b90600052602060002090601f0160209004810192826107f8576000855561083f565b82601f1061081157803560ff191683800117855561083f565b8280016001018555821561083f579182015b8281111561083e578235825591602001919060010190610823565b5b50905061084c9190610850565b5090565b5b80821115610869576000816000905550600101610851565b5090565b60008135905061087c81610efb565b92915050565b60008083601f84011261089857610897610e4a565b5b8235905067ffffffffffffffff8111156108b5576108b4610e45565b5b6020830191508360018202830111156108d1576108d0610e5e565b5b9250929050565b600060a082840312156108ee576108ed610e54565b5b81905092915050565b600060c0828403121561090d5761090c610e54565b5b81905092915050565b60008135905061092581610f12565b92915050565b60006020828403121561094157610940610e6d565b5b600061094f8482850161086d565b91505092915050565b60006020828403121561096e5761096d610e6d565b5b600082013567ffffffffffffffff81111561098c5761098b610e68565b5b610998848285016108d8565b91505092915050565b6000602082840312156109b7576109b6610e6d565b5b600082013567ffffffffffffffff8111156109d5576109d4610e68565b5b6109e1848285016108f7565b91505092915050565b600060208284031215610a00576109ff610e6d565b5b6000610a0e84828501610916565b91505092915050565b600080600060408486031215610a3057610a2f610e6d565b5b6000610a3e86828701610916565b935050602084013567ffffffffffffffff811115610a5f57610a5e610e68565b5b610a6b86828701610882565b92509250509250925092565b610a8081610d30565b82525050565b6000610a928385610d14565b9350610a9f838584610da2565b82840190509392505050565b6000610ab682610cf8565b610ac08185610d03565b9350610ad0818560208601610db1565b610ad981610e72565b840191505092915050565b60008154610af181610de4565b610afb8186610d14565b94506001821660008114610b165760018114610b2757610b5a565b60ff19831686528186019350610b5a565b610b3085610ce3565b60005b83811015610b5257815481890152600182019150602081019050610b33565b838801955050505b50505092915050565b610b6c81610d6c565b82525050565b6000610b7f602983610d1f565b9150610b8a82610e83565b604082019050919050565b6000610ba2602083610d1f565b9150610bad82610ed2565b602082019050919050565b6000610bc5828486610a86565b91508190509392505050565b6000610bdd8284610ae4565b915081905092915050565b6000602082019050610bfd6000830184610a77565b92915050565b60006020820190508181036000830152610c1d8184610aab565b905092915050565b6000602082019050610c3a6000830184610b63565b92915050565b60006020820190508181036000830152610c5981610b72565b9050919050565b60006020820190508181036000830152610c7981610b95565b9050919050565b60008083356001602003843603038112610c9d57610c9c610e59565b5b80840192508235915067ffffffffffffffff821115610cbf57610cbe610e4f565b5b602083019250600182023603831315610cdb57610cda610e63565b5b509250929050565b60008190508160005260206000209050919050565b600081519050919050565b600082825260208201905092915050565b600081905092915050565b600082825260208201905092915050565b6000610d3b82610d42565b9050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b6000610d7782610d7e565b9050919050565b6000610d8982610d90565b9050919050565b6000610d9b82610d42565b9050919050565b82818337600083830152505050565b60005b83811015610dcf578082015181840152602081019050610db4565b83811115610dde576000848401525b50505050565b60006002820490506001821680610dfc57607f821691505b60208210811415610e1057610e0f610e16565b5b50919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f4f776e61626c6532537465703a2063616c6c6572206973206e6f74207468652060008201527f6e6577206f776e65720000000000000000000000000000000000000000000000602082015250565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b610f0481610d30565b8114610f0f57600080fd5b50565b610f1b81610d62565b8114610f2657600080fd5b5056fea2646970667358221220c968b4310b80d53da5d57a8b75ec93498378e1d9ed40671288aca2faa05871f464736f6c63430008070033"; type ZetaInteractorMockConstructorParams = | [signer?: Signer] diff --git a/packages/interfaces/typechain-types/hardhat.d.ts b/packages/interfaces/typechain-types/hardhat.d.ts index a1fa138c..f6d041f6 100644 --- a/packages/interfaces/typechain-types/hardhat.d.ts +++ b/packages/interfaces/typechain-types/hardhat.d.ts @@ -24,6 +24,10 @@ declare module "hardhat/types/runtime" { name: "ERC20", signerOrOptions?: ethers.Signer | FactoryOptions ): Promise; + getContractFactory( + name: "IERC20Permit", + signerOrOptions?: ethers.Signer | FactoryOptions + ): Promise; getContractFactory( name: "ERC20Burnable", signerOrOptions?: ethers.Signer | FactoryOptions @@ -216,6 +220,11 @@ declare module "hardhat/types/runtime" { address: string, signer?: ethers.Signer ): Promise; + getContractAt( + name: "IERC20Permit", + address: string, + signer?: ethers.Signer + ): Promise; getContractAt( name: "ERC20Burnable", address: string, diff --git a/packages/interfaces/typechain-types/index.ts b/packages/interfaces/typechain-types/index.ts index 13e82824..f4d94337 100644 --- a/packages/interfaces/typechain-types/index.ts +++ b/packages/interfaces/typechain-types/index.ts @@ -14,6 +14,8 @@ export type { Pausable } from "./@openzeppelin/contracts/security/Pausable"; export { Pausable__factory } from "./factories/@openzeppelin/contracts/security/Pausable__factory"; export type { ERC20 } from "./@openzeppelin/contracts/token/ERC20/ERC20"; export { ERC20__factory } from "./factories/@openzeppelin/contracts/token/ERC20/ERC20__factory"; +export type { IERC20Permit } from "./@openzeppelin/contracts/token/ERC20/extensions/draft-IERC20Permit.sol/IERC20Permit"; +export { IERC20Permit__factory } from "./factories/@openzeppelin/contracts/token/ERC20/extensions/draft-IERC20Permit.sol/IERC20Permit__factory"; export type { ERC20Burnable } from "./@openzeppelin/contracts/token/ERC20/extensions/ERC20Burnable"; export { ERC20Burnable__factory } from "./factories/@openzeppelin/contracts/token/ERC20/extensions/ERC20Burnable__factory"; export type { IERC20Metadata } from "./@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata"; From 76f566c09b3388b1ade44ddbc4f7ee9fcd093d7d Mon Sep 17 00:00:00 2001 From: Andres Martin Aiello <50411235+andresaiello@users.noreply.github.com> Date: Tue, 7 Feb 2023 15:19:55 -0300 Subject: [PATCH 054/115] Update waffle and mocha to latest (#66) --- package.json | 11 +- packages/example-contracts/package.json | 2 +- .../test/CrossChainCounter.spec.ts | 18 +- .../test/CrossChainMessage.spec.ts | 8 +- .../test/CrossChainWarriors.spec.ts | 8 +- .../test/MultiChainSwap.spec.ts | 24 +- .../test/MultiChainSwapUniswapV3.spec.ts | 18 +- .../test/MultiChainValue.spec.ts | 12 +- .../example-contracts/test/test.helpers.ts | 16 - .../test/ZetaConnector.spec.ts | 104 +- .../test/ZetaInteractor.spec.ts | 19 +- .../protocol-contracts/test/test.helpers.ts | 20 +- packages/zevm-contracts/package.json | 1 - .../test/MultipleOutput.spec.ts | 4 +- yarn.lock | 5638 ++++------------- 15 files changed, 1244 insertions(+), 4659 deletions(-) diff --git a/package.json b/package.json index c9021750..4c6b9ad1 100644 --- a/package.json +++ b/package.json @@ -34,12 +34,11 @@ "@typechain/hardhat": "^6.0.0", "@types/chai": "^4.3.1", "@types/inquirer": "^8.2.1", - "@types/mocha": "^9.1.1", + "@types/mocha": "^10.0.1", "@types/node": "^17.0.25", "@typescript-eslint/eslint-plugin": "^5.20.0", "@typescript-eslint/parser": "^5.20.0", "chai": "^4.3.6", - "chai-bignumber": "^3.0.0", "dotenv": "^16.0.0", "eslint": "^8.13.0", "eslint-config-prettier": "^8.5.0", @@ -52,13 +51,13 @@ "eslint-plugin-simple-import-sort": "7.0.0", "eslint-plugin-sort-keys-fix": "1.1.2", "eslint-plugin-typescript-sort-keys": "2.1.0", - "ethereum-waffle": "^3.4.4", + "ethereum-waffle": "^4.0.9", "ethereumjs-utils": "^5.2.5", "ethers": "5.6.8", - "hardhat": "2.9.7", + "hardhat": "2.12.6", "inquirer": "^8.2.4", - "mocha": "^9.2.2", - "ts-mocha": "^9.0.2", + "mocha": "^10.2.0", + "ts-mocha": "^10.0.0", "ts-node": "10.8.1", "typechain": "^8.0.0", "typescript": "^4.6.3" diff --git a/packages/example-contracts/package.json b/packages/example-contracts/package.json index bd4c1c55..80a6ef9f 100644 --- a/packages/example-contracts/package.json +++ b/packages/example-contracts/package.json @@ -24,7 +24,7 @@ "tsc:watch": "npx tsc --watch" }, "devDependencies": { - "@defi-wonderland/smock": "^2.0.7", + "@defi-wonderland/smock": "^2.3.4", "hardhat-gas-reporter": "^1.0.8", "solidity-coverage": "^0.7.20", "tsconfig-paths": "^3.14.1" diff --git a/packages/example-contracts/test/CrossChainCounter.spec.ts b/packages/example-contracts/test/CrossChainCounter.spec.ts index 66f3ad67..77480c51 100644 --- a/packages/example-contracts/test/CrossChainCounter.spec.ts +++ b/packages/example-contracts/test/CrossChainCounter.spec.ts @@ -4,7 +4,7 @@ import { ethers } from "hardhat"; import { deployTestCrossChainCounter, - deployZetaConnectorMock, + deployZetaConnectorMock } from "../lib/cross-chain-counter/CrossChainCounter.helpers"; import { CounterZetaConnectorMock, CrossChainCounter } from "../typechain-types"; @@ -26,10 +26,10 @@ describe("CrossChainCounter tests", () => { beforeEach(async () => { zetaConnectorMockContract = await deployZetaConnectorMock(); crossChainCounterContractA = await deployTestCrossChainCounter({ - zetaConnectorMockAddress: zetaConnectorMockContract.address, + zetaConnectorMockAddress: zetaConnectorMockContract.address }); crossChainCounterContractB = await deployTestCrossChainCounter({ - zetaConnectorMockAddress: zetaConnectorMockContract.address, + zetaConnectorMockAddress: zetaConnectorMockContract.address }); await crossChainCounterContractA.setInteractorByChainId( @@ -49,10 +49,10 @@ describe("CrossChainCounter tests", () => { describe("crossChainCount", () => { it("Should revert if the cross chain address wasn't set", async () => { const unsetContract = await deployTestCrossChainCounter({ - zetaConnectorMockAddress: zetaConnectorMockContract.address, + zetaConnectorMockAddress: zetaConnectorMockContract.address }); - await expect(unsetContract.crossChainCount(chainAId)).to.be.revertedWith("InvalidDestinationChainId()"); + await expect(unsetContract.crossChainCount(chainAId)).to.be.revertedWith("InvalidDestinationChainId"); }); }); @@ -64,9 +64,11 @@ describe("CrossChainCounter tests", () => { message: encoder.encode(["address"], [deployerAddress]), sourceChainId: 1, zetaTxSenderAddress: ethers.utils.solidityPack(["address"], [crossChainCounterContractA.address]), - zetaValue: 0, + zetaValue: 0 }) - ).to.be.revertedWith(`InvalidCaller("${deployer.address}")`); + ) + .to.be.revertedWith("InvalidCaller") + .withArgs(deployer.address); }); it("Should revert if the cross-chain address doesn't match with the stored one", async () => { @@ -78,7 +80,7 @@ describe("CrossChainCounter tests", () => { 0, encoder.encode(["address"], [zetaConnectorMockContract.address]) ) - ).to.be.revertedWith("InvalidZetaMessageCall()"); + ).to.be.revertedWith("InvalidZetaMessageCall"); }); describe("Given a valid message", () => { diff --git a/packages/example-contracts/test/CrossChainMessage.spec.ts b/packages/example-contracts/test/CrossChainMessage.spec.ts index c794ec76..a302f1b2 100644 --- a/packages/example-contracts/test/CrossChainMessage.spec.ts +++ b/packages/example-contracts/test/CrossChainMessage.spec.ts @@ -82,7 +82,7 @@ describe("CrossChainMessage tests", () => { zetaTokenMockAddress: zetaEthTokenMockContract.address }); - await expect(unsetContract.sendHelloWorld(chainAId)).to.be.revertedWith("InvalidDestinationChainId()"); + await expect(unsetContract.sendHelloWorld(chainAId)).to.be.revertedWith("InvalidDestinationChainId"); }); it("Should send hello world", async () => { @@ -101,7 +101,9 @@ describe("CrossChainMessage tests", () => { zetaTxSenderAddress: ethers.utils.solidityPack(["address"], [crossChainMessageContractChainA.address]), zetaValue: 0 }) - ).to.be.revertedWith(`InvalidCaller("${deployer.address}")`); + ) + .to.be.revertedWith("InvalidCaller") + .withArgs(deployer.address); }); it("Should revert if the cross-chain address doesn't match with the stored one", async () => { @@ -113,7 +115,7 @@ describe("CrossChainMessage tests", () => { 0, encoder.encode(["address", "string"], [zetaConnectorMockContract.address, SAMPLE_TEXT]) ) - ).to.be.revertedWith("InvalidZetaMessageCall()"); + ).to.be.revertedWith("InvalidZetaMessageCall"); }); describe("Given a valid message", () => { diff --git a/packages/example-contracts/test/CrossChainWarriors.spec.ts b/packages/example-contracts/test/CrossChainWarriors.spec.ts index 01c2dae5..86343711 100644 --- a/packages/example-contracts/test/CrossChainWarriors.spec.ts +++ b/packages/example-contracts/test/CrossChainWarriors.spec.ts @@ -172,7 +172,9 @@ describe("CrossChainWarriors tests", () => { zetaTxSenderAddress: ethers.utils.solidityPack(["address"], [crossChainWarriorsContractChainA.address]), zetaValue: 0 }) - ).to.be.revertedWith(`InvalidCaller("${deployer.address}")`); + ) + .to.be.revertedWith("InvalidCaller") + .withArgs(deployer.address); }); it("Should revert if the cross-chain address doesn't match with the stored one", async () => { @@ -184,7 +186,7 @@ describe("CrossChainWarriors tests", () => { 0, encoder.encode(["address"], [zetaConnectorMockContract.address]) ) - ).to.be.revertedWith("InvalidZetaMessageCall()"); + ).to.be.revertedWith("InvalidZetaMessageCall"); }); it("Should revert if the message type doesn't match with CROSS_CHAIN_TRANSFER_MESSAGE", async () => { @@ -203,7 +205,7 @@ describe("CrossChainWarriors tests", () => { [invalidMessageType, 1, deployerAddress, deployerAddress] ) ) - ).to.be.revertedWith("InvalidMessageType()"); + ).to.be.revertedWith("InvalidMessageType"); }); it("Should revert if the token already exists", async () => { diff --git a/packages/example-contracts/test/MultiChainSwap.spec.ts b/packages/example-contracts/test/MultiChainSwap.spec.ts index 8893721f..f7856d0e 100644 --- a/packages/example-contracts/test/MultiChainSwap.spec.ts +++ b/packages/example-contracts/test/MultiChainSwap.spec.ts @@ -18,7 +18,7 @@ import { UniswapV2Router02__factory } from "../typechain-types"; import { USDC_ADDR } from "./MultiChainSwap.constants"; -import { getCustomErrorMessage, parseUniswapLog, parseZetaLog } from "./test.helpers"; +import { parseUniswapLog, parseZetaLog } from "./test.helpers"; chai.should(); chai.use(smock.matchers); @@ -139,7 +139,7 @@ describe("MultiChainSwap tests", () => { value: parseUnits("1") } ) - ).to.be.revertedWith(getCustomErrorMessage("InvalidDestinationChainId")); + ).to.be.revertedWith("InvalidDestinationChainId"); }); it("Should revert if the sourceInputToken isn't provided", async () => { @@ -154,7 +154,7 @@ describe("MultiChainSwap tests", () => { chainBId, MaxUint256 ) - ).to.be.revertedWith(getCustomErrorMessage("MissingSourceInputTokenAddress")); + ).to.be.revertedWith("MissingSourceInputTokenAddress"); }); it("Should revert if the destinationOutToken isn't provided", async () => { @@ -169,7 +169,7 @@ describe("MultiChainSwap tests", () => { chainBId, MaxUint256 ) - ).to.be.revertedWith(getCustomErrorMessage("OutTokenInvariant")); + ).to.be.revertedWith("OutTokenInvariant"); }); it("Should not perform any trade if the input token is Zeta", async () => { @@ -364,7 +364,7 @@ describe("MultiChainSwap tests", () => { MaxUint256 ); - await expect(call).to.be.revertedWith(getCustomErrorMessage("InvalidDestinationChainId")); + await expect(call).to.be.revertedWith("InvalidDestinationChainId"); }); it("Should revert if the sourceInputToken isn't provided", async () => { @@ -379,7 +379,7 @@ describe("MultiChainSwap tests", () => { MaxUint256 ); - await expect(call).to.be.revertedWith(getCustomErrorMessage("MissingSourceInputTokenAddress")); + await expect(call).to.be.revertedWith("MissingSourceInputTokenAddress"); }); it("Should revert if the destinationOutToken isn't provided", async () => { @@ -394,7 +394,7 @@ describe("MultiChainSwap tests", () => { MaxUint256 ); - await expect(call).to.be.revertedWith(getCustomErrorMessage("OutTokenInvariant")); + await expect(call).to.be.revertedWith("OutTokenInvariant"); }); }); @@ -408,7 +408,9 @@ describe("MultiChainSwap tests", () => { zetaTxSenderAddress: ethers.utils.solidityPack(["address"], [multiChainSwapContractA.address]), zetaValue: 0 }) - ).to.be.revertedWith(getCustomErrorMessage("InvalidCaller", [deployer.address])); + ) + .to.be.revertedWith("InvalidCaller") + .withArgs(deployer.address); }); it("Should revert if the zetaTxSenderAddress it not in interactorsByChainId", async () => { @@ -420,7 +422,7 @@ describe("MultiChainSwap tests", () => { 0, encoder.encode(["address"], [multiChainSwapContractB.address]) ) - ).to.be.revertedWith(getCustomErrorMessage("InvalidZetaMessageCall")); + ).to.be.revertedWith("InvalidZetaMessageCall"); }); }); @@ -435,7 +437,9 @@ describe("MultiChainSwap tests", () => { sourceChainId: chainAId, zetaTxSenderAddress: deployer.address }) - ).to.be.revertedWith(getCustomErrorMessage("InvalidCaller", [deployer.address])); + ) + .to.be.revertedWith("InvalidCaller") + .withArgs(deployer.address); }); it("Should trade the returned Zeta back for the input zeta token", async () => { diff --git a/packages/example-contracts/test/MultiChainSwapUniswapV3.spec.ts b/packages/example-contracts/test/MultiChainSwapUniswapV3.spec.ts index f007b220..ad89e7dc 100644 --- a/packages/example-contracts/test/MultiChainSwapUniswapV3.spec.ts +++ b/packages/example-contracts/test/MultiChainSwapUniswapV3.spec.ts @@ -17,7 +17,7 @@ import { MultiChainSwapZetaConnector, UniswapV2Router02__factory } from "../typechain-types"; -import { getCustomErrorMessage, parseInteractorLog } from "./test.helpers"; +import { parseInteractorLog } from "./test.helpers"; chai.should(); chai.use(smock.matchers); @@ -157,7 +157,7 @@ describe("MultiChainSwap tests", () => { value: parseUnits("1") } ) - ).to.be.revertedWith(getCustomErrorMessage("InvalidDestinationChainId")); + ).to.be.revertedWith("InvalidDestinationChainId"); }); it("Should revert if the sourceInputToken isn't provided", async () => { @@ -172,7 +172,7 @@ describe("MultiChainSwap tests", () => { chainBId, MaxUint256 ) - ).to.be.revertedWith(getCustomErrorMessage("MissingSourceInputTokenAddress")); + ).to.be.revertedWith("MissingSourceInputTokenAddress"); }); it("Should revert if the destinationOutToken isn't provided", async () => { @@ -187,7 +187,7 @@ describe("MultiChainSwap tests", () => { chainBId, MaxUint256 ) - ).to.be.revertedWith(getCustomErrorMessage("OutTokenInvariant")); + ).to.be.revertedWith("OutTokenInvariant"); }); it("Should trade ETH for Zeta", async () => { @@ -461,7 +461,9 @@ describe("MultiChainSwap tests", () => { zetaTxSenderAddress: ethers.utils.solidityPack(["address"], [multiChainSwapContractA.address]), zetaValue: 0 }) - ).to.be.revertedWith(getCustomErrorMessage("InvalidCaller", [deployer.address])); + ) + .to.be.revertedWith("InvalidCaller") + .withArgs(deployer.address); }); it("Should revert if the zetaTxSenderAddress it not in interactorsByChainId", async () => { @@ -473,7 +475,7 @@ describe("MultiChainSwap tests", () => { 0, encoder.encode(["address"], [multiChainSwapContractB.address]) ) - ).to.be.revertedWith(getCustomErrorMessage("InvalidZetaMessageCall")); + ).to.be.revertedWith("InvalidZetaMessageCall"); }); }); @@ -488,7 +490,9 @@ describe("MultiChainSwap tests", () => { sourceChainId: chainAId, zetaTxSenderAddress: deployer.address }) - ).to.be.revertedWith(getCustomErrorMessage("InvalidCaller", [deployer.address])); + ) + .to.be.revertedWith("InvalidCaller") + .withArgs(deployer.address); }); it("Should trade the returned Zeta back for the input zeta token", async () => { diff --git a/packages/example-contracts/test/MultiChainValue.spec.ts b/packages/example-contracts/test/MultiChainValue.spec.ts index 744a7934..609dea12 100644 --- a/packages/example-contracts/test/MultiChainValue.spec.ts +++ b/packages/example-contracts/test/MultiChainValue.spec.ts @@ -6,7 +6,7 @@ import { ethers } from "hardhat"; import { deployMultiChainValueMock, deployZetaConnectorMock, - deployZetaEthMock, + deployZetaEthMock } from "../lib/multi-chain-value/MultiChainValue.helpers"; import { MultiChainValueMock, ZetaConnectorMockValue } from "../typechain-types"; @@ -29,7 +29,7 @@ describe("MultiChainValue tests", () => { zetaEthMockContract = await deployZetaEthMock(); multiChainValueContractA = await deployMultiChainValueMock({ zetaConnectorMockAddress: zetaConnectorMockContract.address, - zetaTokenMockAddress: zetaEthMockContract.address, + zetaTokenMockAddress: zetaEthMockContract.address }); await multiChainValueContractA.addAvailableChainId(chainBId); @@ -44,7 +44,7 @@ describe("MultiChainValue tests", () => { it("Should prevent enabling a chainId that's already enabled", async () => { await (await multiChainValueContractA.addAvailableChainId(1)).wait(); - await expect(multiChainValueContractA.addAvailableChainId(1)).to.be.revertedWith("ChainIdAlreadyEnabled()"); + await expect(multiChainValueContractA.addAvailableChainId(1)).to.be.revertedWith("ChainIdAlreadyEnabled"); }); it("Should enable the provided chainId", async () => { @@ -56,7 +56,7 @@ describe("MultiChainValue tests", () => { describe("removeAvailableChainId", () => { it("Should prevent disabling a chainId that's already disabled", async () => { - await expect(multiChainValueContractA.removeAvailableChainId(1)).to.be.revertedWith("ChainIdNotAvailable()"); + await expect(multiChainValueContractA.removeAvailableChainId(1)).to.be.revertedWith("ChainIdNotAvailable"); }); it("Should disable the provided chainId", async () => { @@ -71,14 +71,14 @@ describe("MultiChainValue tests", () => { describe("send", () => { it("Should prevent sending value to a disabled chainId", async () => { await expect(multiChainValueContractA.send(1, account1Address, 100_000)).to.be.revertedWith( - "InvalidDestinationChainId()" + "InvalidDestinationChainId" ); }); it("Should prevent sending 0 value", async () => { await (await multiChainValueContractA.addAvailableChainId(1)).wait(); - await expect(multiChainValueContractA.send(1, account1Address, 0)).to.be.revertedWith("InvalidZetaValueAndGas()"); + await expect(multiChainValueContractA.send(1, account1Address, 0)).to.be.revertedWith("InvalidZetaValueAndGas"); }); it("Should prevent sending if the account has no Zeta balance", async () => { diff --git a/packages/example-contracts/test/test.helpers.ts b/packages/example-contracts/test/test.helpers.ts index 46bcf0be..1546e52c 100644 --- a/packages/example-contracts/test/test.helpers.ts +++ b/packages/example-contracts/test/test.helpers.ts @@ -62,22 +62,6 @@ export const parseInteractorLog = (logs: ContractReceipt["logs"]) => { return eventNames; }; -type CustomErrorParamType = BigNumber | number | string; -export const getCustomErrorMessage = (errorMethod: string, params?: [CustomErrorParamType]) => { - const stringParams = params - ? params - .map((p: CustomErrorParamType) => { - if (typeof p === "number") { - return p; - } - - return `"${p.toString()}"`; - }) - .join(", ") - : ""; - return `VM Exception while processing transaction: reverted with custom error '${errorMethod}(${stringParams})'`; -}; - export const addZetaEthLiquidityTest = async ( zetaTokenAddress: string, zetaToAdd: BigNumber, diff --git a/packages/protocol-contracts/test/ZetaConnector.spec.ts b/packages/protocol-contracts/test/ZetaConnector.spec.ts index 237f6142..74aacbbc 100644 --- a/packages/protocol-contracts/test/ZetaConnector.spec.ts +++ b/packages/protocol-contracts/test/ZetaConnector.spec.ts @@ -5,7 +5,7 @@ import { ZetaConnectorNonEth, ZetaEth, ZetaNonEth, - ZetaReceiverMock, + ZetaReceiverMock } from "@zetachain/interfaces/typechain-types"; import { expect } from "chai"; import { parseEther } from "ethers/lib/utils"; @@ -17,7 +17,7 @@ import { deployZetaConnectorNonEth, deployZetaEth, deployZetaNonEth, - deployZetaReceiverMock, + deployZetaReceiverMock } from "../lib/contracts.helpers"; describe("ZetaConnector tests", () => { @@ -66,22 +66,22 @@ describe("ZetaConnector tests", () => { [tssUpdater, tssSigner, randomSigner, pauserSigner] = accounts; zetaTokenEthContract = await deployZetaEth({ - args: [100_000], + args: [100_000] }); zetaTokenNonEthContract = await deployZetaNonEth({ - args: [tssSigner.address, tssUpdater.address], + args: [tssSigner.address, tssUpdater.address] }); zetaReceiverMockContract = await deployZetaReceiverMock(); zetaConnectorBaseContract = await deployZetaConnectorBase({ - args: [zetaTokenEthContract.address, tssSigner.address, tssUpdater.address, pauserSigner.address], + args: [zetaTokenEthContract.address, tssSigner.address, tssUpdater.address, pauserSigner.address] }); zetaConnectorEthContract = await deployZetaConnectorEth({ - args: [zetaTokenEthContract.address, tssSigner.address, tssUpdater.address, pauserSigner.address], + args: [zetaTokenEthContract.address, tssSigner.address, tssUpdater.address, pauserSigner.address] }); zetaConnectorNonEthContract = await deployZetaConnectorNonEth({ - args: [zetaTokenNonEthContract.address, tssSigner.address, tssUpdater.address, pauserSigner.address], + args: [zetaTokenNonEthContract.address, tssSigner.address, tssUpdater.address, pauserSigner.address] }); await zetaTokenNonEthContract.updateTssAndConnectorAddresses( @@ -95,15 +95,15 @@ describe("ZetaConnector tests", () => { describe("ZetaConnector.base", () => { describe("updateTssAddress", () => { it("Should revert if the caller is not TSS or TSS updater", async () => { - await expect( - zetaConnectorBaseContract.connect(randomSigner).updateTssAddress(randomSigner.address) - ).to.revertedWith(`CallerIsNotTssOrUpdater("${randomSigner.address}")`); + await expect(zetaConnectorBaseContract.connect(randomSigner).updateTssAddress(randomSigner.address)) + .to.revertedWith("CallerIsNotTssOrUpdater") + .withArgs(randomSigner.address); }); it("Should revert if the new TSS address is invalid", async () => { await expect( zetaConnectorBaseContract.updateTssAddress("0x0000000000000000000000000000000000000000") - ).to.revertedWith(`InvalidAddress()`); + ).to.revertedWith("InvalidAddress"); }); it("Should change the TSS address if called by TSS", async () => { @@ -125,9 +125,9 @@ describe("ZetaConnector tests", () => { describe("updatePauserAddress", () => { it("Should revert if the caller is not the Pauser", async () => { - await expect( - zetaConnectorBaseContract.connect(randomSigner).updatePauserAddress(randomSigner.address) - ).to.revertedWith(`CallerIsNotPauser("${randomSigner.address}")`); + await expect(zetaConnectorBaseContract.connect(randomSigner).updatePauserAddress(randomSigner.address)) + .to.revertedWith("CallerIsNotPauser") + .withArgs(randomSigner.address); }); it("Should revert if the new Pauser address is invalid", async () => { @@ -135,7 +135,7 @@ describe("ZetaConnector tests", () => { zetaConnectorBaseContract .connect(pauserSigner) .updatePauserAddress("0x0000000000000000000000000000000000000000") - ).to.revertedWith(`InvalidAddress()`); + ).to.revertedWith("InvalidAddress"); }); it("Should change the Pauser address if called by Pauser", async () => { @@ -164,13 +164,13 @@ describe("ZetaConnector tests", () => { describe("pause, unpause", () => { it("Should revert if not called by the Pauser", async () => { - await expect(zetaConnectorBaseContract.connect(randomSigner).pause()).to.revertedWith( - `CallerIsNotPauser("${randomSigner.address}")` - ); + await expect(zetaConnectorBaseContract.connect(randomSigner).pause()) + .to.revertedWith("CallerIsNotPauser") + .withArgs(randomSigner.address); - await expect(zetaConnectorBaseContract.connect(randomSigner).unpause()).to.revertedWith( - `CallerIsNotPauser("${randomSigner.address}")` - ); + await expect(zetaConnectorBaseContract.connect(randomSigner).unpause()) + .to.revertedWith("CallerIsNotPauser") + .withArgs(randomSigner.address); }); it("Should pause if called by the Pauser", async () => { @@ -199,7 +199,7 @@ describe("ZetaConnector tests", () => { destinationGasLimit: 2500000, message: new ethers.utils.AbiCoder().encode(["string"], ["hello"]), zetaParams: new ethers.utils.AbiCoder().encode(["string"], ["hello"]), - zetaValueAndGas: 1000, + zetaValueAndGas: 1000 }) ).to.revertedWith("Pausable: paused"); }); @@ -216,7 +216,7 @@ describe("ZetaConnector tests", () => { destinationGasLimit: 2500000, message: new ethers.utils.AbiCoder().encode(["string"], ["hello"]), zetaParams: new ethers.utils.AbiCoder().encode(["string"], ["hello"]), - zetaValueAndGas: 1000, + zetaValueAndGas: 1000 }) ).to.revertedWith("ERC20: transfer amount exceeds balance"); }); @@ -229,7 +229,7 @@ describe("ZetaConnector tests", () => { destinationGasLimit: 2500000, message: new ethers.utils.AbiCoder().encode(["string"], ["hello"]), zetaParams: new ethers.utils.AbiCoder().encode(["string"], ["hello"]), - zetaValueAndGas: 1000, + zetaValueAndGas: 1000 }) ).to.revertedWith("ERC20: insufficient allowance"); }); @@ -250,7 +250,7 @@ describe("ZetaConnector tests", () => { destinationGasLimit: 2500000, message: new ethers.utils.AbiCoder().encode(["string"], ["hello"]), zetaParams: new ethers.utils.AbiCoder().encode(["string"], ["hello"]), - zetaValueAndGas: 1000, + zetaValueAndGas: 1000 }) ).wait(); @@ -272,7 +272,7 @@ describe("ZetaConnector tests", () => { destinationGasLimit: 2500000, message: new ethers.utils.AbiCoder().encode(["string"], ["hello"]), zetaParams: new ethers.utils.AbiCoder().encode(["string"], ["hello"]), - zetaValueAndGas: 0, + zetaValueAndGas: 0 }); const e2 = await zetaConnectorEthContract.queryFilter(zetaSentFilter); @@ -290,7 +290,7 @@ describe("ZetaConnector tests", () => { destinationGasLimit: 2500000, message: new ethers.utils.AbiCoder().encode(["string"], ["hello"]), zetaParams: new ethers.utils.AbiCoder().encode(["string"], ["hello"]), - zetaValueAndGas: 0, + zetaValueAndGas: 0 }); const e2 = await zetaConnectorEthContract.queryFilter(zetaSentFilter); @@ -326,7 +326,9 @@ describe("ZetaConnector tests", () => { new ethers.utils.AbiCoder().encode(["string"], ["hello"]), ethers.constants.HashZero ) - ).to.revertedWith(`CallerIsNotTss("${tssUpdater.address}")'`); + ) + .to.revertedWith("CallerIsNotTss") + .withArgs(tssUpdater.address); }); it("Should revert if Zeta transfer fails", async () => { @@ -427,7 +429,9 @@ describe("ZetaConnector tests", () => { new ethers.utils.AbiCoder().encode(["string"], ["hello"]), ethers.constants.HashZero ) - ).to.revertedWith(`CallerIsNotTss("${tssUpdater.address}")`); + ) + .to.revertedWith("CallerIsNotTss") + .withArgs(tssUpdater.address); }); it("Should transfer to the zetaTxSender address", async () => { @@ -500,7 +504,7 @@ describe("ZetaConnector tests", () => { destinationGasLimit: 2500000, message: new ethers.utils.AbiCoder().encode(["string"], ["hello"]), zetaParams: new ethers.utils.AbiCoder().encode(["string"], ["hello"]), - zetaValueAndGas: 1000, + zetaValueAndGas: 1000 }) ).to.revertedWith("Pausable: paused"); }); @@ -517,7 +521,7 @@ describe("ZetaConnector tests", () => { destinationGasLimit: 2500000, message: new ethers.utils.AbiCoder().encode(["string"], ["hello"]), zetaParams: new ethers.utils.AbiCoder().encode(["string"], ["hello"]), - zetaValueAndGas: 1000, + zetaValueAndGas: 1000 }) ).to.revertedWith("ERC20: insufficient allowance"); }); @@ -530,7 +534,7 @@ describe("ZetaConnector tests", () => { destinationGasLimit: 2500000, message: new ethers.utils.AbiCoder().encode(["string"], ["hello"]), zetaParams: new ethers.utils.AbiCoder().encode(["string"], ["hello"]), - zetaValueAndGas: 1000, + zetaValueAndGas: 1000 }) ).to.revertedWith("ERC20: insufficient allowance"); }); @@ -548,7 +552,7 @@ describe("ZetaConnector tests", () => { destinationGasLimit: 2500000, message: new ethers.utils.AbiCoder().encode(["string"], ["hello"]), zetaParams: new ethers.utils.AbiCoder().encode(["string"], ["hello"]), - zetaValueAndGas: parseEther("1"), + zetaValueAndGas: parseEther("1") }) ).wait(); @@ -567,7 +571,7 @@ describe("ZetaConnector tests", () => { destinationGasLimit: 2500000, message: new ethers.utils.AbiCoder().encode(["string"], ["hello"]), zetaParams: new ethers.utils.AbiCoder().encode(["string"], ["hello"]), - zetaValueAndGas: 0, + zetaValueAndGas: 0 }); const e2 = await zetaConnectorNonEthContract.queryFilter(zetaSentFilter); @@ -585,7 +589,7 @@ describe("ZetaConnector tests", () => { destinationGasLimit: 2500000, message: new ethers.utils.AbiCoder().encode(["string"], ["hello"]), zetaParams: new ethers.utils.AbiCoder().encode(["string"], ["hello"]), - zetaValueAndGas: 0, + zetaValueAndGas: 0 }); const e2 = await zetaConnectorNonEthContract.queryFilter(zetaSentFilter); @@ -621,7 +625,9 @@ describe("ZetaConnector tests", () => { new ethers.utils.AbiCoder().encode(["string"], ["hello"]), ethers.constants.HashZero ) - ).to.revertedWith(`CallerIsNotTss("${tssUpdater.address}")'`); + ) + .to.revertedWith("CallerIsNotTss") + .withArgs(tssUpdater.address); }); it("Should revert if mint fails", async () => { @@ -641,7 +647,9 @@ describe("ZetaConnector tests", () => { new ethers.utils.AbiCoder().encode(["string"], ["hello"]), ethers.constants.HashZero ) - ).to.revertedWith(`CallerIsNotConnector("${zetaConnectorNonEthContract.address}")`); + ) + .to.revertedWith("CallerIsNotConnector") + .withArgs(zetaConnectorNonEthContract.address); }); it("Should mint on the receiver address", async () => { @@ -719,7 +727,9 @@ describe("ZetaConnector tests", () => { new ethers.utils.AbiCoder().encode(["string"], ["hello"]), ethers.constants.HashZero ) - ).to.revertedWith(`CallerIsNotTss("${tssUpdater.address}")`); + ) + .to.revertedWith("CallerIsNotTss") + .withArgs(tssUpdater.address); }); it("Should mint on the zetaTxSender address", async () => { @@ -773,9 +783,9 @@ describe("ZetaConnector tests", () => { describe("MaxSupply", () => { describe("setMaxSupply", () => { it("Should revert if the caller is not the TSS address", async () => { - await expect(zetaConnectorNonEthContract.connect(randomSigner).setMaxSupply(0)).to.revertedWith( - `CallerIsNotTss("${randomSigner.address}")` - ); + await expect(zetaConnectorNonEthContract.connect(randomSigner).setMaxSupply(0)) + .to.revertedWith("CallerIsNotTss") + .withArgs(randomSigner.address); }); it("Should revert if want to mint more than MaxSupply", async () => { @@ -791,7 +801,9 @@ describe("ZetaConnector tests", () => { new ethers.utils.AbiCoder().encode(["string"], ["hello"]), ethers.constants.HashZero ) - ).to.revertedWith(`ExceedsMaxSupply(999)`); + ) + .to.revertedWith("ExceedsMaxSupply") + .withArgs(999); }); }); @@ -830,7 +842,9 @@ describe("ZetaConnector tests", () => { new ethers.utils.AbiCoder().encode(["string"], ["hello"]), ethers.constants.HashZero ) - ).to.revertedWith(`ExceedsMaxSupply(${initialSupply.add(supplyToAdd)})`); + ) + .to.revertedWith("ExceedsMaxSupply") + .withArgs(initialSupply.add(supplyToAdd)); await expect( zetaConnectorNonEthContract @@ -844,7 +858,9 @@ describe("ZetaConnector tests", () => { new ethers.utils.AbiCoder().encode(["string"], ["hello"]), ethers.constants.HashZero ) - ).to.revertedWith(`ExceedsMaxSupply(${initialSupply.add(supplyToAdd)})`); + ) + .to.revertedWith("ExceedsMaxSupply") + .withArgs(initialSupply.add(supplyToAdd)); }); }); }); diff --git a/packages/protocol-contracts/test/ZetaInteractor.spec.ts b/packages/protocol-contracts/test/ZetaInteractor.spec.ts index 73a27cb9..1448c3b6 100644 --- a/packages/protocol-contracts/test/ZetaInteractor.spec.ts +++ b/packages/protocol-contracts/test/ZetaInteractor.spec.ts @@ -1,10 +1,9 @@ import { SignerWithAddress } from "@nomiclabs/hardhat-ethers/signers"; -import { ZetaInteractorMock, ZetaInteractorMock__factory } from "@zetachain/interfaces/typechain-types"; +import { ZetaInteractorMock } from "@zetachain/interfaces/typechain-types"; import chai, { expect } from "chai"; import { ethers } from "hardhat"; import { getZetaInteractorMock } from "../lib/contracts.helpers"; -import { getCustomErrorMessage } from "./test.helpers"; chai.should(); @@ -33,9 +32,7 @@ describe("ZetaInteractor tests", () => { describe("onCreate", () => { it("Should revert if constructor param is zero address", async () => { const Factory = await ethers.getContractFactory("ZetaInteractorMock"); - await expect(Factory.deploy(ethers.constants.AddressZero)).to.be.revertedWith( - getCustomErrorMessage("InvalidAddress") - ); + await expect(Factory.deploy(ethers.constants.AddressZero)).to.be.revertedWith("InvalidAddress"); }); it("Should revert if the zetaTxSenderAddress it not in interactorsByChainId", async () => { @@ -47,7 +44,7 @@ describe("ZetaInteractor tests", () => { zetaTxSenderAddress: ethers.utils.solidityPack(["address"], [zetaInteractorMock.address]), zetaValue: 0 }) - ).to.be.revertedWith(getCustomErrorMessage("InvalidZetaMessageCall")); + ).to.be.revertedWith("InvalidZetaMessageCall"); }); }); @@ -61,7 +58,9 @@ describe("ZetaInteractor tests", () => { zetaTxSenderAddress: ethers.utils.solidityPack(["address"], [zetaInteractorMock.address]), zetaValue: 0 }) - ).to.be.revertedWith(getCustomErrorMessage("InvalidCaller", [deployer.address])); + ) + .to.be.revertedWith("InvalidCaller") + .withArgs(deployer.address); }); it("Should revert if the zetaTxSenderAddress it not in interactorsByChainId", async () => { @@ -73,7 +72,7 @@ describe("ZetaInteractor tests", () => { zetaTxSenderAddress: ethers.utils.solidityPack(["address"], [zetaInteractorMock.address]), zetaValue: 0 }) - ).to.be.revertedWith(getCustomErrorMessage("InvalidZetaMessageCall")); + ).to.be.revertedWith("InvalidZetaMessageCall"); }); }); @@ -88,7 +87,9 @@ describe("ZetaInteractor tests", () => { sourceChainId: chainAId, zetaTxSenderAddress: deployer.address }) - ).to.be.revertedWith(getCustomErrorMessage("InvalidCaller", [deployer.address])); + ) + .to.be.revertedWith("InvalidCaller") + .withArgs(deployer.address); }); }); diff --git a/packages/protocol-contracts/test/test.helpers.ts b/packages/protocol-contracts/test/test.helpers.ts index 7ffe5ea1..4f0950b2 100644 --- a/packages/protocol-contracts/test/test.helpers.ts +++ b/packages/protocol-contracts/test/test.helpers.ts @@ -1,31 +1,15 @@ import { ZetaTokenConsumer__factory } from "@zetachain/interfaces/typechain-types"; import { BigNumber, ContractReceipt } from "ethers"; -type CustomErrorParamType = BigNumber | number | string; -export const getCustomErrorMessage = (errorMethod: string, params?: [CustomErrorParamType]) => { - const stringParams = params - ? params - .map((p: CustomErrorParamType) => { - if (typeof p === "number") { - return p; - } - - return `"${p.toString()}"`; - }) - .join(", ") - : ""; - return `VM Exception while processing transaction: reverted with custom error '${errorMethod}(${stringParams})'`; -}; - export const parseZetaConsumerLog = (logs: ContractReceipt["logs"]) => { const iface = ZetaTokenConsumer__factory.createInterface(); - const eventNames = logs.map((log) => { + const eventNames = logs.map(log => { try { const parsedLog = iface.parseLog(log); return parsedLog.name; - } catch (e: any) { + } catch (e) { return "NO_ZETA_LOG"; } }); diff --git a/packages/zevm-contracts/package.json b/packages/zevm-contracts/package.json index b7846ac1..a868e549 100644 --- a/packages/zevm-contracts/package.json +++ b/packages/zevm-contracts/package.json @@ -24,7 +24,6 @@ "tsc:watch": "npx tsc --watch" }, "devDependencies": { - "@defi-wonderland/smock": "^2.0.7", "hardhat-gas-reporter": "^1.0.8", "solidity-coverage": "^0.7.20", "tsconfig-paths": "^3.14.1" diff --git a/packages/zevm-contracts/test/MultipleOutput.spec.ts b/packages/zevm-contracts/test/MultipleOutput.spec.ts index 99fd902a..4523d602 100644 --- a/packages/zevm-contracts/test/MultipleOutput.spec.ts +++ b/packages/zevm-contracts/test/MultipleOutput.spec.ts @@ -90,7 +90,7 @@ describe("ZetaSwap tests", () => { const params = getMultiOutputForTest(deployer.address); await expect( zetaMultiOutputContract.onCrossChainCall(ZRC20Contracts[0].address, amount, params) - ).to.be.revertedWith("NoAvailableTransfers()"); + ).to.be.revertedWith("NoAvailableTransfers"); }); it("Should throw error if there's no transfer to do", async () => { @@ -105,7 +105,7 @@ describe("ZetaSwap tests", () => { const params = getMultiOutputForTest(deployer.address); await expect( zetaMultiOutputContract.onCrossChainCall(ZRC20Contracts[0].address, amount, params) - ).to.be.revertedWith("NoAvailableTransfers()"); + ).to.be.revertedWith("NoAvailableTransfers"); }); }); }); diff --git a/yarn.lock b/yarn.lock index 78110386..262c8b8d 100644 --- a/yarn.lock +++ b/yarn.lock @@ -285,11 +285,13 @@ __metadata: languageName: node linkType: hard -"@defi-wonderland/smock@npm:^2.0.7": - version: 2.0.7 - resolution: "@defi-wonderland/smock@npm:2.0.7" +"@defi-wonderland/smock@npm:^2.3.4": + version: 2.3.4 + resolution: "@defi-wonderland/smock@npm:2.3.4" dependencies: - "@nomiclabs/ethereumjs-vm": ^4.2.2 + "@nomicfoundation/ethereumjs-evm": ^1.0.0-rc.3 + "@nomicfoundation/ethereumjs-util": ^8.0.0-rc.3 + "@nomicfoundation/ethereumjs-vm": ^6.0.0-rc.3 diff: ^5.0.0 lodash.isequal: ^4.5.0 lodash.isequalwith: ^4.4.0 @@ -302,27 +304,7 @@ __metadata: "@nomiclabs/hardhat-ethers": ^2 ethers: ^5 hardhat: ^2 - checksum: 2f4aa6c4a95f889d14c02c6b6041434b5a5f1b1558344e8d613246168b89d9f60f1cc0431d5bd0123d59a779f9f3f147e05048cefdabbab0e397215bbf8d3f2a - languageName: node - linkType: hard - -"@ensdomains/ens@npm:^0.4.4": - version: 0.4.5 - resolution: "@ensdomains/ens@npm:0.4.5" - dependencies: - bluebird: ^3.5.2 - eth-ens-namehash: ^2.0.8 - solc: ^0.4.20 - testrpc: 0.0.1 - web3-utils: ^1.0.0-beta.31 - checksum: 3b4f6e34f3376f1b3cc60927d53d5951c4da0a9ff0f8856aaedba5a73bceccb7c08632bf6709b3bb9e43d6e83223d23928f574fc62dec12b2b1a692bcd3d45c6 - languageName: node - linkType: hard - -"@ensdomains/resolver@npm:^0.2.4": - version: 0.2.4 - resolution: "@ensdomains/resolver@npm:0.2.4" - checksum: 3827a3430cc8935a0839dac9dafcfa6011c6f71af229ff91cbc6cdcbaa35d20c6dbb1a8a901cdb00e66428578ce1675bd6fe6901778b5d0d828321fbec9e0f7f + checksum: 316026d672364a02c5d83c15110b2d5df4358768a6f645e9fd0786fbb230c0c7983a39b928521ee7d0b917a478e07c454b7d7bdf22ff10ed140f520340c28267 languageName: node linkType: hard @@ -350,66 +332,69 @@ __metadata: languageName: node linkType: hard -"@ethereum-waffle/chai@npm:^3.4.4": - version: 3.4.4 - resolution: "@ethereum-waffle/chai@npm:3.4.4" +"@ethereum-waffle/chai@npm:4.0.9": + version: 4.0.9 + resolution: "@ethereum-waffle/chai@npm:4.0.9" dependencies: - "@ethereum-waffle/provider": ^3.4.4 - ethers: ^5.5.2 - checksum: b2b9b6b839c3f6b4abf8489fe50549e6fda07bd81ae8e4250b20d9a76ce4a729ef47c741364387b1d2dbc7fac14b46a5d6dcc4d404344b9cce5f9698ff012251 + "@ethereum-waffle/provider": 4.0.5 + debug: ^4.3.4 + json-bigint: ^1.0.0 + peerDependencies: + ethers: "*" + checksum: 93c90c268e96ee10f74f8c90fc685bcb35a94f3138b51c648ae1fcf4194785732e71b5cf9158791808a7486d5f7b3ebf5683360fd59ab058d7176e47efe5f7af languageName: node linkType: hard -"@ethereum-waffle/compiler@npm:^3.4.4": - version: 3.4.4 - resolution: "@ethereum-waffle/compiler@npm:3.4.4" +"@ethereum-waffle/compiler@npm:4.0.3": + version: 4.0.3 + resolution: "@ethereum-waffle/compiler@npm:4.0.3" dependencies: "@resolver-engine/imports": ^0.3.3 "@resolver-engine/imports-fs": ^0.3.3 - "@typechain/ethers-v5": ^2.0.0 + "@typechain/ethers-v5": ^10.0.0 "@types/mkdirp": ^0.5.2 - "@types/node-fetch": ^2.5.5 - ethers: ^5.0.1 + "@types/node-fetch": ^2.6.1 mkdirp: ^0.5.1 - node-fetch: ^2.6.1 - solc: ^0.6.3 - ts-generator: ^0.1.1 - typechain: ^3.0.0 - checksum: ebffca732969253934c1e8cca6cc1f12d6294f848d44e6595af81460bc3230bc69096d0965b9deb2c7eecd472a1d536d8cbe993f95bfc76fbbe2114ddbabff70 + node-fetch: ^2.6.7 + peerDependencies: + ethers: "*" + solc: "*" + typechain: ^8.0.0 + checksum: ec7839b0f79a40a77fa05bb6941e00b2b3b1e0aa5514a617400c988b302bbbc5e9373b25ba52c7319bb00b83923dce42011384883c7a234c52f8c44eb5b571fc languageName: node linkType: hard -"@ethereum-waffle/ens@npm:^3.4.4": - version: 3.4.4 - resolution: "@ethereum-waffle/ens@npm:3.4.4" - dependencies: +"@ethereum-waffle/ens@npm:4.0.3": + version: 4.0.3 + resolution: "@ethereum-waffle/ens@npm:4.0.3" + peerDependencies: "@ensdomains/ens": ^0.4.4 "@ensdomains/resolver": ^0.2.4 - ethers: ^5.5.2 - checksum: 71d93c09ef3ab89a46f05b9e2a06e129e2109d160c3a819e4bf3b4414fc4707e7fc646c87c1d82f9ba769dc1ac3c6f4934fd72499654fcfc9db4abf46c21d118 + ethers: "*" + checksum: 84435c3dda78c416b332c481cfa9322f5bf06168d5887607d320cb30f20283ccde52eabd18adb5791485125d44d99ff7b5f84bd7bbdb1fde86465abb40a81966 languageName: node linkType: hard -"@ethereum-waffle/mock-contract@npm:^3.4.4": - version: 3.4.4 - resolution: "@ethereum-waffle/mock-contract@npm:3.4.4" - dependencies: - "@ethersproject/abi": ^5.5.0 - ethers: ^5.5.2 - checksum: 6e5c62b342e424cd1937f2f7eb424056ad143b238320880f378c0db61c6d694617f968687321a2f030d546aa5b4dde42681cbb419589d7f87452c82844a4488b +"@ethereum-waffle/mock-contract@npm:4.0.3": + version: 4.0.3 + resolution: "@ethereum-waffle/mock-contract@npm:4.0.3" + peerDependencies: + ethers: "*" + checksum: 7a9350fc859b674d91c7476bc3f1c825948f423f4fb9fa018c87a0d5e3870a9ffec7ff875bb4121042194469e0e33087f884d1e7faf98da1f0722bb7b2b62242 languageName: node linkType: hard -"@ethereum-waffle/provider@npm:^3.4.4": - version: 3.4.4 - resolution: "@ethereum-waffle/provider@npm:3.4.4" +"@ethereum-waffle/provider@npm:4.0.5": + version: 4.0.5 + resolution: "@ethereum-waffle/provider@npm:4.0.5" dependencies: - "@ethereum-waffle/ens": ^3.4.4 - ethers: ^5.5.2 - ganache-core: ^2.13.2 - patch-package: ^6.2.2 - postinstall-postinstall: ^2.1.0 - checksum: 9e251d7b0198c22e337b18368e3893de766a821e818702dbef0e0d603bad550c6e3a29676cff11272bc82762833586ee9659593d957ec8759a8cc93c2b0f3d00 + "@ethereum-waffle/ens": 4.0.3 + "@ganache/ethereum-options": 0.1.4 + debug: ^4.3.4 + ganache: 7.4.3 + peerDependencies: + ethers: "*" + checksum: b1282ea28cbfba05343cc101bceab3f72fdd9ed391f7c7e0f252aead81aec46b6a0ab7d7ca8504e080e306d6554c21e5420765965d92ed5b303a12543dc85cf4 languageName: node linkType: hard @@ -425,19 +410,41 @@ __metadata: languageName: node linkType: hard -"@ethereumjs/blockchain@npm:^5.5.2": - version: 5.5.2 - resolution: "@ethereumjs/blockchain@npm:5.5.2" +"@ethereumjs/block@npm:^3.6.0": + version: 3.6.3 + resolution: "@ethereumjs/block@npm:3.6.3" + dependencies: + "@ethereumjs/common": ^2.6.5 + "@ethereumjs/tx": ^3.5.2 + ethereumjs-util: ^7.1.5 + merkle-patricia-tree: ^4.2.4 + checksum: d08c78134d15bc09c08b9a355ab736faa0f6b04ab87d2962e60df9c8bf977ebc68fe10aec6ca50bc2486532f489d7968fb5046defcd839b3b5ce28ca9dbce40f + languageName: node + linkType: hard + +"@ethereumjs/blockchain@npm:^5.5.0": + version: 5.5.3 + resolution: "@ethereumjs/blockchain@npm:5.5.3" dependencies: "@ethereumjs/block": ^3.6.2 - "@ethereumjs/common": ^2.6.3 + "@ethereumjs/common": ^2.6.4 "@ethereumjs/ethash": ^1.1.0 debug: ^4.3.3 - ethereumjs-util: ^7.1.4 + ethereumjs-util: ^7.1.5 level-mem: ^5.0.1 lru-cache: ^5.1.1 semaphore-async-await: ^1.5.1 - checksum: 08402287dd70e316b23505ab37218c63b4a8ed285dadf55b5699e5e2819e184e6bf9cab8e0c1c5f4949975792e969487860f680971d9a745b0d01635d60c06b4 + checksum: eeefb4735ac06e6fe5ec5457eb9ac7aa26ced8651093d05067aee264f23704d79eacb1b2742e0651b73d2528aa8a9a40f3cc9e479f1837253c2dbb784a7a8e59 + languageName: node + linkType: hard + +"@ethereumjs/common@npm:2.6.0": + version: 2.6.0 + resolution: "@ethereumjs/common@npm:2.6.0" + dependencies: + crc-32: ^1.2.0 + ethereumjs-util: ^7.1.3 + checksum: f1e775f0d3963011f84cd6f6de985b342064331c8fd41bc81a6497abe959078704bf4febd8c59a3fc51c3527b1261441436d55d032f85f0453ff1af4a8dbccb3 languageName: node linkType: hard @@ -451,6 +458,16 @@ __metadata: languageName: node linkType: hard +"@ethereumjs/common@npm:^2.6.0, @ethereumjs/common@npm:^2.6.5": + version: 2.6.5 + resolution: "@ethereumjs/common@npm:2.6.5" + dependencies: + crc-32: ^1.2.0 + ethereumjs-util: ^7.1.5 + checksum: 0143386f267ef01b7a8bb1847596f964ad58643c084e5fd8e3a0271a7bf8428605dbf38cbb92c84f6622080ad095abeb765f178c02d86ec52abf9e8a4c0e4ecf + languageName: node + linkType: hard + "@ethereumjs/common@npm:^2.6.4": version: 2.6.4 resolution: "@ethereumjs/common@npm:2.6.4" @@ -474,6 +491,16 @@ __metadata: languageName: node linkType: hard +"@ethereumjs/tx@npm:3.4.0": + version: 3.4.0 + resolution: "@ethereumjs/tx@npm:3.4.0" + dependencies: + "@ethereumjs/common": ^2.6.0 + ethereumjs-util: ^7.1.3 + checksum: 381cbb872edb0ae83a56bf5d5657ac4f594f43ca0956b6577fb762840033081252345d67151d4feafde3f97caaab9a9826348780553c05d5a8ca2984259ad555 + languageName: node + linkType: hard + "@ethereumjs/tx@npm:^3.2.1, @ethereumjs/tx@npm:^3.5.1": version: 3.5.1 resolution: "@ethereumjs/tx@npm:3.5.1" @@ -484,7 +511,7 @@ __metadata: languageName: node linkType: hard -"@ethereumjs/tx@npm:^3.5.2": +"@ethereumjs/tx@npm:^3.4.0, @ethereumjs/tx@npm:^3.5.2": version: 3.5.2 resolution: "@ethereumjs/tx@npm:3.5.2" dependencies: @@ -494,40 +521,23 @@ __metadata: languageName: node linkType: hard -"@ethereumjs/vm@npm:^5.9.0": - version: 5.9.1 - resolution: "@ethereumjs/vm@npm:5.9.1" +"@ethereumjs/vm@npm:5.6.0": + version: 5.6.0 + resolution: "@ethereumjs/vm@npm:5.6.0" dependencies: - "@ethereumjs/block": ^3.6.2 - "@ethereumjs/blockchain": ^5.5.2 - "@ethereumjs/common": ^2.6.4 - "@ethereumjs/tx": ^3.5.2 + "@ethereumjs/block": ^3.6.0 + "@ethereumjs/blockchain": ^5.5.0 + "@ethereumjs/common": ^2.6.0 + "@ethereumjs/tx": ^3.4.0 async-eventemitter: ^0.2.4 core-js-pure: ^3.0.1 - debug: ^4.3.3 - ethereumjs-util: ^7.1.5 + debug: ^2.2.0 + ethereumjs-util: ^7.1.3 functional-red-black-tree: ^1.0.1 mcl-wasm: ^0.7.1 - merkle-patricia-tree: ^4.2.4 + merkle-patricia-tree: ^4.2.2 rustbn.js: ~0.2.0 - checksum: a978e23cc0c557cb58984f17a0108206e3d3fdf3f5903501db54d4d8d087acd7688a60c7f02987622d2296fd064ce7516608e37eb14bdf3fa12aac0e3228414a - languageName: node - linkType: hard - -"@ethersproject/abi@npm:5.0.0-beta.153": - version: 5.0.0-beta.153 - resolution: "@ethersproject/abi@npm:5.0.0-beta.153" - dependencies: - "@ethersproject/address": ">=5.0.0-beta.128" - "@ethersproject/bignumber": ">=5.0.0-beta.130" - "@ethersproject/bytes": ">=5.0.0-beta.129" - "@ethersproject/constants": ">=5.0.0-beta.128" - "@ethersproject/hash": ">=5.0.0-beta.128" - "@ethersproject/keccak256": ">=5.0.0-beta.127" - "@ethersproject/logger": ">=5.0.0-beta.129" - "@ethersproject/properties": ">=5.0.0-beta.131" - "@ethersproject/strings": ">=5.0.0-beta.130" - checksum: 9f5c3c986a47c2bcc066e0ea1d8190be4358de6722d0eb75eaaacbc1f7610169691cc369085aa390bd88c731c6e539f309cb81face594feffac9336e369444c5 + checksum: 67f803f7dc851aeed9996cdab6751dc3f7565146ff8a24982526d33a07c173e84dd449b2fbb9202a479c7446b628105af41465b75c1f9143e1e68cf573fed4c3 languageName: node linkType: hard @@ -548,23 +558,6 @@ __metadata: languageName: node linkType: hard -"@ethersproject/abi@npm:5.6.0, @ethersproject/abi@npm:^5.0.0-beta.146, @ethersproject/abi@npm:^5.1.2, @ethersproject/abi@npm:^5.5.0, @ethersproject/abi@npm:^5.6.0": - version: 5.6.0 - resolution: "@ethersproject/abi@npm:5.6.0" - dependencies: - "@ethersproject/address": ^5.6.0 - "@ethersproject/bignumber": ^5.6.0 - "@ethersproject/bytes": ^5.6.0 - "@ethersproject/constants": ^5.6.0 - "@ethersproject/hash": ^5.6.0 - "@ethersproject/keccak256": ^5.6.0 - "@ethersproject/logger": ^5.6.0 - "@ethersproject/properties": ^5.6.0 - "@ethersproject/strings": ^5.6.0 - checksum: d0cf0450d21ff5beff5593ac4b1749eb64d67fdd7d0e2d489ab1996218ec7242b9dadcd7a9896687e84784c83bf3e39cba6e77b3e813165d6b400e584a96f2fc - languageName: node - linkType: hard - "@ethersproject/abi@npm:5.6.3, @ethersproject/abi@npm:^5.6.3": version: 5.6.3 resolution: "@ethersproject/abi@npm:5.6.3" @@ -582,18 +575,20 @@ __metadata: languageName: node linkType: hard -"@ethersproject/abstract-provider@npm:5.6.0, @ethersproject/abstract-provider@npm:^5.6.0": +"@ethersproject/abi@npm:^5.0.0-beta.146, @ethersproject/abi@npm:^5.1.2, @ethersproject/abi@npm:^5.5.0": version: 5.6.0 - resolution: "@ethersproject/abstract-provider@npm:5.6.0" + resolution: "@ethersproject/abi@npm:5.6.0" dependencies: + "@ethersproject/address": ^5.6.0 "@ethersproject/bignumber": ^5.6.0 "@ethersproject/bytes": ^5.6.0 + "@ethersproject/constants": ^5.6.0 + "@ethersproject/hash": ^5.6.0 + "@ethersproject/keccak256": ^5.6.0 "@ethersproject/logger": ^5.6.0 - "@ethersproject/networks": ^5.6.0 "@ethersproject/properties": ^5.6.0 - "@ethersproject/transactions": ^5.6.0 - "@ethersproject/web": ^5.6.0 - checksum: 42ec4148217f7643f667f46235266100a1b31b8e87b6d540b6e8667703f56f633d25ec2e5d9b0f95556de0d0620189488e9d77dafc058c61e45872fef620ac5a + "@ethersproject/strings": ^5.6.0 + checksum: d0cf0450d21ff5beff5593ac4b1749eb64d67fdd7d0e2d489ab1996218ec7242b9dadcd7a9896687e84784c83bf3e39cba6e77b3e813165d6b400e584a96f2fc languageName: node linkType: hard @@ -612,16 +607,18 @@ __metadata: languageName: node linkType: hard -"@ethersproject/abstract-signer@npm:5.6.0, @ethersproject/abstract-signer@npm:^5.6.0": +"@ethersproject/abstract-provider@npm:^5.6.0": version: 5.6.0 - resolution: "@ethersproject/abstract-signer@npm:5.6.0" + resolution: "@ethersproject/abstract-provider@npm:5.6.0" dependencies: - "@ethersproject/abstract-provider": ^5.6.0 "@ethersproject/bignumber": ^5.6.0 "@ethersproject/bytes": ^5.6.0 "@ethersproject/logger": ^5.6.0 + "@ethersproject/networks": ^5.6.0 "@ethersproject/properties": ^5.6.0 - checksum: 91722f3ad449da1a26898132b53e0130deac19ab8dbef55c5fd3c6d2b9ddb0428f539021c9b7085f3fc5e8615bdf1fddcbe4f6c5365f6b6cfd5d3952816d27b7 + "@ethersproject/transactions": ^5.6.0 + "@ethersproject/web": ^5.6.0 + checksum: 42ec4148217f7643f667f46235266100a1b31b8e87b6d540b6e8667703f56f633d25ec2e5d9b0f95556de0d0620189488e9d77dafc058c61e45872fef620ac5a languageName: node linkType: hard @@ -638,16 +635,16 @@ __metadata: languageName: node linkType: hard -"@ethersproject/address@npm:5.6.0, @ethersproject/address@npm:>=5.0.0-beta.128, @ethersproject/address@npm:^5.0.2, @ethersproject/address@npm:^5.0.4, @ethersproject/address@npm:^5.6.0": +"@ethersproject/abstract-signer@npm:^5.6.0": version: 5.6.0 - resolution: "@ethersproject/address@npm:5.6.0" + resolution: "@ethersproject/abstract-signer@npm:5.6.0" dependencies: + "@ethersproject/abstract-provider": ^5.6.0 "@ethersproject/bignumber": ^5.6.0 "@ethersproject/bytes": ^5.6.0 - "@ethersproject/keccak256": ^5.6.0 "@ethersproject/logger": ^5.6.0 - "@ethersproject/rlp": ^5.6.0 - checksum: 504cddd422ec9890eda61da0421991ace7c5cd9f365cbc9761305013621915dc5ff5247f4b04699b7060fc272a7a8c9dc88f993bc6fa6e0f6e9e4fa30d6f3c0f + "@ethersproject/properties": ^5.6.0 + checksum: 91722f3ad449da1a26898132b53e0130deac19ab8dbef55c5fd3c6d2b9ddb0428f539021c9b7085f3fc5e8615bdf1fddcbe4f6c5365f6b6cfd5d3952816d27b7 languageName: node linkType: hard @@ -664,12 +661,16 @@ __metadata: languageName: node linkType: hard -"@ethersproject/base64@npm:5.6.0, @ethersproject/base64@npm:^5.6.0": +"@ethersproject/address@npm:^5.0.2, @ethersproject/address@npm:^5.0.4, @ethersproject/address@npm:^5.6.0": version: 5.6.0 - resolution: "@ethersproject/base64@npm:5.6.0" + resolution: "@ethersproject/address@npm:5.6.0" dependencies: + "@ethersproject/bignumber": ^5.6.0 "@ethersproject/bytes": ^5.6.0 - checksum: 5f316367acf18fdba82d50868171251f75218740a1c9bad8b11c6c3372c86ae323f91bc6727e78e527866357974d19fcced12f666fb067ffba2be638d54d36f7 + "@ethersproject/keccak256": ^5.6.0 + "@ethersproject/logger": ^5.6.0 + "@ethersproject/rlp": ^5.6.0 + checksum: 504cddd422ec9890eda61da0421991ace7c5cd9f365cbc9761305013621915dc5ff5247f4b04699b7060fc272a7a8c9dc88f993bc6fa6e0f6e9e4fa30d6f3c0f languageName: node linkType: hard @@ -682,13 +683,12 @@ __metadata: languageName: node linkType: hard -"@ethersproject/basex@npm:5.6.0, @ethersproject/basex@npm:^5.6.0": +"@ethersproject/base64@npm:^5.6.0": version: 5.6.0 - resolution: "@ethersproject/basex@npm:5.6.0" + resolution: "@ethersproject/base64@npm:5.6.0" dependencies: "@ethersproject/bytes": ^5.6.0 - "@ethersproject/properties": ^5.6.0 - checksum: 144bb1d500ffd111045aee376ee86cacba6bc0b4169941f5532c3598aaa7590db0679793f4a6572585fae91a5e2200e0b8c782b155855138654aa6917527c975 + checksum: 5f316367acf18fdba82d50868171251f75218740a1c9bad8b11c6c3372c86ae323f91bc6727e78e527866357974d19fcced12f666fb067ffba2be638d54d36f7 languageName: node linkType: hard @@ -702,17 +702,6 @@ __metadata: languageName: node linkType: hard -"@ethersproject/bignumber@npm:5.6.0, @ethersproject/bignumber@npm:>=5.0.0-beta.130, @ethersproject/bignumber@npm:^5.0.7, @ethersproject/bignumber@npm:^5.6.0": - version: 5.6.0 - resolution: "@ethersproject/bignumber@npm:5.6.0" - dependencies: - "@ethersproject/bytes": ^5.6.0 - "@ethersproject/logger": ^5.6.0 - bn.js: ^4.11.9 - checksum: cb1e0d712a1d991d7c74c66d34522413a2fd832e10bc15158b24e07f61e80a221689947936790334137c11c582f3f4d184d3ccf3036e09e4df1b2026923962b4 - languageName: node - linkType: hard - "@ethersproject/bignumber@npm:5.6.2, @ethersproject/bignumber@npm:^5.6.2": version: 5.6.2 resolution: "@ethersproject/bignumber@npm:5.6.2" @@ -724,21 +713,23 @@ __metadata: languageName: node linkType: hard -"@ethersproject/bytes@npm:5.6.1, @ethersproject/bytes@npm:>=5.0.0-beta.129, @ethersproject/bytes@npm:^5.0.4, @ethersproject/bytes@npm:^5.6.0, @ethersproject/bytes@npm:^5.6.1": - version: 5.6.1 - resolution: "@ethersproject/bytes@npm:5.6.1" +"@ethersproject/bignumber@npm:^5.0.7, @ethersproject/bignumber@npm:^5.6.0": + version: 5.6.0 + resolution: "@ethersproject/bignumber@npm:5.6.0" dependencies: + "@ethersproject/bytes": ^5.6.0 "@ethersproject/logger": ^5.6.0 - checksum: d06ffe3bf12aa8a6588d99b82e40b46a2cbb8b057fc650aad836e3e8c95d4559773254eeeb8fed652066dcf8082e527e37cd2b9fff7ac8cabc4de7c49459a7eb + bn.js: ^4.11.9 + checksum: cb1e0d712a1d991d7c74c66d34522413a2fd832e10bc15158b24e07f61e80a221689947936790334137c11c582f3f4d184d3ccf3036e09e4df1b2026923962b4 languageName: node linkType: hard -"@ethersproject/constants@npm:5.6.0, @ethersproject/constants@npm:>=5.0.0-beta.128, @ethersproject/constants@npm:^5.0.4, @ethersproject/constants@npm:^5.6.0": - version: 5.6.0 - resolution: "@ethersproject/constants@npm:5.6.0" +"@ethersproject/bytes@npm:5.6.1, @ethersproject/bytes@npm:^5.0.4, @ethersproject/bytes@npm:^5.6.0, @ethersproject/bytes@npm:^5.6.1": + version: 5.6.1 + resolution: "@ethersproject/bytes@npm:5.6.1" dependencies: - "@ethersproject/bignumber": ^5.6.0 - checksum: da54458a0133b64c02052b86fefa6118ed88c449b02a61ba57745bf08029658214291935b0500461bde3f734ea98e6d8edc586eed9ce9fa7e6a16d9397716ff7 + "@ethersproject/logger": ^5.6.0 + checksum: d06ffe3bf12aa8a6588d99b82e40b46a2cbb8b057fc650aad836e3e8c95d4559773254eeeb8fed652066dcf8082e527e37cd2b9fff7ac8cabc4de7c49459a7eb languageName: node linkType: hard @@ -751,21 +742,12 @@ __metadata: languageName: node linkType: hard -"@ethersproject/contracts@npm:5.6.0": +"@ethersproject/constants@npm:^5.0.4, @ethersproject/constants@npm:^5.6.0": version: 5.6.0 - resolution: "@ethersproject/contracts@npm:5.6.0" + resolution: "@ethersproject/constants@npm:5.6.0" dependencies: - "@ethersproject/abi": ^5.6.0 - "@ethersproject/abstract-provider": ^5.6.0 - "@ethersproject/abstract-signer": ^5.6.0 - "@ethersproject/address": ^5.6.0 "@ethersproject/bignumber": ^5.6.0 - "@ethersproject/bytes": ^5.6.0 - "@ethersproject/constants": ^5.6.0 - "@ethersproject/logger": ^5.6.0 - "@ethersproject/properties": ^5.6.0 - "@ethersproject/transactions": ^5.6.0 - checksum: 9b149da295f0c063252185b94a907bbb3af2faac5a464947bca383a620b9cf8a4faa0e742c16d37a89d262547c645609ab91fbf87266a9e50ad4c17e65569e0d + checksum: da54458a0133b64c02052b86fefa6118ed88c449b02a61ba57745bf08029658214291935b0500461bde3f734ea98e6d8edc586eed9ce9fa7e6a16d9397716ff7 languageName: node linkType: hard @@ -787,22 +769,6 @@ __metadata: languageName: node linkType: hard -"@ethersproject/hash@npm:5.6.0, @ethersproject/hash@npm:>=5.0.0-beta.128, @ethersproject/hash@npm:^5.0.4, @ethersproject/hash@npm:^5.6.0": - version: 5.6.0 - resolution: "@ethersproject/hash@npm:5.6.0" - dependencies: - "@ethersproject/abstract-signer": ^5.6.0 - "@ethersproject/address": ^5.6.0 - "@ethersproject/bignumber": ^5.6.0 - "@ethersproject/bytes": ^5.6.0 - "@ethersproject/keccak256": ^5.6.0 - "@ethersproject/logger": ^5.6.0 - "@ethersproject/properties": ^5.6.0 - "@ethersproject/strings": ^5.6.0 - checksum: 7a3b9180963765fff1a307adeb2138219d1585fc979ee2d14888739102ae2b223759cf456a88da554b4043475ec459d3a8dd67a844e39a896f0584c5a9556a06 - languageName: node - linkType: hard - "@ethersproject/hash@npm:5.6.1, @ethersproject/hash@npm:^5.6.1": version: 5.6.1 resolution: "@ethersproject/hash@npm:5.6.1" @@ -819,23 +785,19 @@ __metadata: languageName: node linkType: hard -"@ethersproject/hdnode@npm:5.6.0, @ethersproject/hdnode@npm:^5.6.0": +"@ethersproject/hash@npm:^5.0.4, @ethersproject/hash@npm:^5.6.0": version: 5.6.0 - resolution: "@ethersproject/hdnode@npm:5.6.0" + resolution: "@ethersproject/hash@npm:5.6.0" dependencies: "@ethersproject/abstract-signer": ^5.6.0 - "@ethersproject/basex": ^5.6.0 + "@ethersproject/address": ^5.6.0 "@ethersproject/bignumber": ^5.6.0 "@ethersproject/bytes": ^5.6.0 + "@ethersproject/keccak256": ^5.6.0 "@ethersproject/logger": ^5.6.0 - "@ethersproject/pbkdf2": ^5.6.0 "@ethersproject/properties": ^5.6.0 - "@ethersproject/sha2": ^5.6.0 - "@ethersproject/signing-key": ^5.6.0 "@ethersproject/strings": ^5.6.0 - "@ethersproject/transactions": ^5.6.0 - "@ethersproject/wordlists": ^5.6.0 - checksum: 399919d8d43ed18e2ebfa7b9c1fab469d817d2146187b4a12eaa76508b8ec95ec80d1d64048831b7cbd7f7163b35fb13f8c26a1fe078319f7365d74e23c1c117 + checksum: 7a3b9180963765fff1a307adeb2138219d1585fc979ee2d14888739102ae2b223759cf456a88da554b4043475ec459d3a8dd67a844e39a896f0584c5a9556a06 languageName: node linkType: hard @@ -859,27 +821,6 @@ __metadata: languageName: node linkType: hard -"@ethersproject/json-wallets@npm:5.6.0, @ethersproject/json-wallets@npm:^5.6.0": - version: 5.6.0 - resolution: "@ethersproject/json-wallets@npm:5.6.0" - dependencies: - "@ethersproject/abstract-signer": ^5.6.0 - "@ethersproject/address": ^5.6.0 - "@ethersproject/bytes": ^5.6.0 - "@ethersproject/hdnode": ^5.6.0 - "@ethersproject/keccak256": ^5.6.0 - "@ethersproject/logger": ^5.6.0 - "@ethersproject/pbkdf2": ^5.6.0 - "@ethersproject/properties": ^5.6.0 - "@ethersproject/random": ^5.6.0 - "@ethersproject/strings": ^5.6.0 - "@ethersproject/transactions": ^5.6.0 - aes-js: 3.0.0 - scrypt-js: 3.0.1 - checksum: 8dda507745736bf37708af93df72727b4f375ff0f548e9496a39725fee5618955b3c4ce4850e667eca8b5b8576face747bb79be2f49a445b3228f99456675d3d - languageName: node - linkType: hard - "@ethersproject/json-wallets@npm:5.6.1, @ethersproject/json-wallets@npm:^5.6.1": version: 5.6.1 resolution: "@ethersproject/json-wallets@npm:5.6.1" @@ -901,16 +842,6 @@ __metadata: languageName: node linkType: hard -"@ethersproject/keccak256@npm:5.6.0, @ethersproject/keccak256@npm:>=5.0.0-beta.127, @ethersproject/keccak256@npm:^5.0.3, @ethersproject/keccak256@npm:^5.6.0": - version: 5.6.0 - resolution: "@ethersproject/keccak256@npm:5.6.0" - dependencies: - "@ethersproject/bytes": ^5.6.0 - js-sha3: 0.8.0 - checksum: 8683ee5c665ae23c9e1a46be4efb9f208f256abc1885844ec653452ad6dd58d08e5df0d78fc01eef33dc10bca38e27a94390b71a86fae666ef7eddf49860e047 - languageName: node - linkType: hard - "@ethersproject/keccak256@npm:5.6.1, @ethersproject/keccak256@npm:^5.6.1": version: 5.6.1 resolution: "@ethersproject/keccak256@npm:5.6.1" @@ -921,19 +852,20 @@ __metadata: languageName: node linkType: hard -"@ethersproject/logger@npm:5.6.0, @ethersproject/logger@npm:>=5.0.0-beta.129, @ethersproject/logger@npm:^5.0.5, @ethersproject/logger@npm:^5.6.0": +"@ethersproject/keccak256@npm:^5.0.3, @ethersproject/keccak256@npm:^5.6.0": version: 5.6.0 - resolution: "@ethersproject/logger@npm:5.6.0" - checksum: 6eee38a973c7a458552278971c109a3e5df3c257e433cb959da9a287ea04628d1f510d41b83bd5f9da5ddc05d97d307ed2162a9ba1b4fcc50664e4f60061636c + resolution: "@ethersproject/keccak256@npm:5.6.0" + dependencies: + "@ethersproject/bytes": ^5.6.0 + js-sha3: 0.8.0 + checksum: 8683ee5c665ae23c9e1a46be4efb9f208f256abc1885844ec653452ad6dd58d08e5df0d78fc01eef33dc10bca38e27a94390b71a86fae666ef7eddf49860e047 languageName: node linkType: hard -"@ethersproject/networks@npm:5.6.1, @ethersproject/networks@npm:^5.6.0": - version: 5.6.1 - resolution: "@ethersproject/networks@npm:5.6.1" - dependencies: - "@ethersproject/logger": ^5.6.0 - checksum: e894369e58b45563653155df6f6db9a919448fc077a74a8fcc3fa10423335250372243868bcc2cc08857f081af6320a3a62d322340d2e5364fb25c258c978b9e +"@ethersproject/logger@npm:5.6.0, @ethersproject/logger@npm:^5.0.5, @ethersproject/logger@npm:^5.6.0": + version: 5.6.0 + resolution: "@ethersproject/logger@npm:5.6.0" + checksum: 6eee38a973c7a458552278971c109a3e5df3c257e433cb959da9a287ea04628d1f510d41b83bd5f9da5ddc05d97d307ed2162a9ba1b4fcc50664e4f60061636c languageName: node linkType: hard @@ -946,13 +878,12 @@ __metadata: languageName: node linkType: hard -"@ethersproject/pbkdf2@npm:5.6.0, @ethersproject/pbkdf2@npm:^5.6.0": - version: 5.6.0 - resolution: "@ethersproject/pbkdf2@npm:5.6.0" +"@ethersproject/networks@npm:^5.6.0": + version: 5.6.1 + resolution: "@ethersproject/networks@npm:5.6.1" dependencies: - "@ethersproject/bytes": ^5.6.0 - "@ethersproject/sha2": ^5.6.0 - checksum: 7d70b46f39373a07abb5512f38ce2c9f3e05640a07c658b584909e22d51c8c47882396427b9ab6ce80a1aa3f2074fd0a2aa6ac03290e2d7505089aa5ebccb55c + "@ethersproject/logger": ^5.6.0 + checksum: e894369e58b45563653155df6f6db9a919448fc077a74a8fcc3fa10423335250372243868bcc2cc08857f081af6320a3a62d322340d2e5364fb25c258c978b9e languageName: node linkType: hard @@ -966,7 +897,7 @@ __metadata: languageName: node linkType: hard -"@ethersproject/properties@npm:5.6.0, @ethersproject/properties@npm:>=5.0.0-beta.131, @ethersproject/properties@npm:^5.0.3, @ethersproject/properties@npm:^5.6.0": +"@ethersproject/properties@npm:5.6.0, @ethersproject/properties@npm:^5.0.3, @ethersproject/properties@npm:^5.6.0": version: 5.6.0 resolution: "@ethersproject/properties@npm:5.6.0" dependencies: @@ -975,33 +906,6 @@ __metadata: languageName: node linkType: hard -"@ethersproject/providers@npm:5.6.2": - version: 5.6.2 - resolution: "@ethersproject/providers@npm:5.6.2" - dependencies: - "@ethersproject/abstract-provider": ^5.6.0 - "@ethersproject/abstract-signer": ^5.6.0 - "@ethersproject/address": ^5.6.0 - "@ethersproject/basex": ^5.6.0 - "@ethersproject/bignumber": ^5.6.0 - "@ethersproject/bytes": ^5.6.0 - "@ethersproject/constants": ^5.6.0 - "@ethersproject/hash": ^5.6.0 - "@ethersproject/logger": ^5.6.0 - "@ethersproject/networks": ^5.6.0 - "@ethersproject/properties": ^5.6.0 - "@ethersproject/random": ^5.6.0 - "@ethersproject/rlp": ^5.6.0 - "@ethersproject/sha2": ^5.6.0 - "@ethersproject/strings": ^5.6.0 - "@ethersproject/transactions": ^5.6.0 - "@ethersproject/web": ^5.6.0 - bech32: 1.1.4 - ws: 7.4.6 - checksum: 30409755c227eab65a94ec3d7834560af5d0c7a2359855e597c0ecdfd312e851324ab8d47d0afcf60efa7a008b75c23be1a1a9d219872f99aa165283139f543a - languageName: node - linkType: hard - "@ethersproject/providers@npm:5.6.8": version: 5.6.8 resolution: "@ethersproject/providers@npm:5.6.8" @@ -1030,16 +934,6 @@ __metadata: languageName: node linkType: hard -"@ethersproject/random@npm:5.6.0, @ethersproject/random@npm:^5.6.0": - version: 5.6.0 - resolution: "@ethersproject/random@npm:5.6.0" - dependencies: - "@ethersproject/bytes": ^5.6.0 - "@ethersproject/logger": ^5.6.0 - checksum: 0d21ce97503f2764b01402093ba73afec69d2631611fe0bda35690e1e2aea0eda39f32dc868123c87505cf5e0618dd32c4aed933203d8011e234889e455212b3 - languageName: node - linkType: hard - "@ethersproject/random@npm:5.6.1, @ethersproject/random@npm:^5.6.1": version: 5.6.1 resolution: "@ethersproject/random@npm:5.6.1" @@ -1050,16 +944,6 @@ __metadata: languageName: node linkType: hard -"@ethersproject/rlp@npm:5.6.0, @ethersproject/rlp@npm:^5.6.0": - version: 5.6.0 - resolution: "@ethersproject/rlp@npm:5.6.0" - dependencies: - "@ethersproject/bytes": ^5.6.0 - "@ethersproject/logger": ^5.6.0 - checksum: 3697871cec540e3bf3fd7a6a65ef3e5ca223f684ac928ecf028619eee251c6c5427b02493c152f057f5e9b07ea216d24f807ec84e5df80414511f8aff5505359 - languageName: node - linkType: hard - "@ethersproject/rlp@npm:5.6.1, @ethersproject/rlp@npm:^5.6.1": version: 5.6.1 resolution: "@ethersproject/rlp@npm:5.6.1" @@ -1070,14 +954,13 @@ __metadata: languageName: node linkType: hard -"@ethersproject/sha2@npm:5.6.0, @ethersproject/sha2@npm:^5.6.0": +"@ethersproject/rlp@npm:^5.6.0": version: 5.6.0 - resolution: "@ethersproject/sha2@npm:5.6.0" + resolution: "@ethersproject/rlp@npm:5.6.0" dependencies: "@ethersproject/bytes": ^5.6.0 "@ethersproject/logger": ^5.6.0 - hash.js: 1.1.7 - checksum: 8f424f52720e9127e015afca948412289f97444bc9c3e38c06a43fb1635aa29a7e98976ee4dab7044ba51b25836092377c0691ccbcae6fe7349ca38ca3ab8d80 + checksum: 3697871cec540e3bf3fd7a6a65ef3e5ca223f684ac928ecf028619eee251c6c5427b02493c152f057f5e9b07ea216d24f807ec84e5df80414511f8aff5505359 languageName: node linkType: hard @@ -1092,20 +975,6 @@ __metadata: languageName: node linkType: hard -"@ethersproject/signing-key@npm:5.6.0, @ethersproject/signing-key@npm:^5.6.0": - version: 5.6.0 - resolution: "@ethersproject/signing-key@npm:5.6.0" - dependencies: - "@ethersproject/bytes": ^5.6.0 - "@ethersproject/logger": ^5.6.0 - "@ethersproject/properties": ^5.6.0 - bn.js: ^4.11.9 - elliptic: 6.5.4 - hash.js: 1.1.7 - checksum: c61118ff1ff89560da59cf77ca6553762e94b9d2757542be15dcf7eb4962327faede941d8461272afb8550cc2e28d38e7e89d199650ebae07a596df3c2059e08 - languageName: node - linkType: hard - "@ethersproject/signing-key@npm:5.6.2, @ethersproject/signing-key@npm:^5.6.2": version: 5.6.2 resolution: "@ethersproject/signing-key@npm:5.6.2" @@ -1120,17 +989,17 @@ __metadata: languageName: node linkType: hard -"@ethersproject/solidity@npm:5.6.0": +"@ethersproject/signing-key@npm:^5.6.0": version: 5.6.0 - resolution: "@ethersproject/solidity@npm:5.6.0" + resolution: "@ethersproject/signing-key@npm:5.6.0" dependencies: - "@ethersproject/bignumber": ^5.6.0 "@ethersproject/bytes": ^5.6.0 - "@ethersproject/keccak256": ^5.6.0 "@ethersproject/logger": ^5.6.0 - "@ethersproject/sha2": ^5.6.0 - "@ethersproject/strings": ^5.6.0 - checksum: e23475603167291b0589cc7d1187e45f3bc5042de958153503e7a259a5d1677ce336d5cdb570805529e50d0bb5b9ade6ce6c0553ec7ea7bed5ecae603262701d + "@ethersproject/properties": ^5.6.0 + bn.js: ^4.11.9 + elliptic: 6.5.4 + hash.js: 1.1.7 + checksum: c61118ff1ff89560da59cf77ca6553762e94b9d2757542be15dcf7eb4962327faede941d8461272afb8550cc2e28d38e7e89d199650ebae07a596df3c2059e08 languageName: node linkType: hard @@ -1148,17 +1017,6 @@ __metadata: languageName: node linkType: hard -"@ethersproject/strings@npm:5.6.0, @ethersproject/strings@npm:>=5.0.0-beta.130, @ethersproject/strings@npm:^5.0.4, @ethersproject/strings@npm:^5.6.0": - version: 5.6.0 - resolution: "@ethersproject/strings@npm:5.6.0" - dependencies: - "@ethersproject/bytes": ^5.6.0 - "@ethersproject/constants": ^5.6.0 - "@ethersproject/logger": ^5.6.0 - checksum: 0b69bdd2c2767049599e1b6bbf34782166a1b901fd00a09b2dab0f4a92a6a1e85bb28d498f40f138a68baf62714831b6398e170358c861b4b1e54bfac375b655 - languageName: node - linkType: hard - "@ethersproject/strings@npm:5.6.1, @ethersproject/strings@npm:^5.6.1": version: 5.6.1 resolution: "@ethersproject/strings@npm:5.6.1" @@ -1170,20 +1028,14 @@ __metadata: languageName: node linkType: hard -"@ethersproject/transactions@npm:5.6.0, @ethersproject/transactions@npm:^5.0.0-beta.135, @ethersproject/transactions@npm:^5.6.0": +"@ethersproject/strings@npm:^5.0.4, @ethersproject/strings@npm:^5.6.0": version: 5.6.0 - resolution: "@ethersproject/transactions@npm:5.6.0" + resolution: "@ethersproject/strings@npm:5.6.0" dependencies: - "@ethersproject/address": ^5.6.0 - "@ethersproject/bignumber": ^5.6.0 "@ethersproject/bytes": ^5.6.0 "@ethersproject/constants": ^5.6.0 - "@ethersproject/keccak256": ^5.6.0 "@ethersproject/logger": ^5.6.0 - "@ethersproject/properties": ^5.6.0 - "@ethersproject/rlp": ^5.6.0 - "@ethersproject/signing-key": ^5.6.0 - checksum: b01a3a9ce1e2d945825adbecfc71b992293e0274b77caf2c0b3c45bb76919ce64aa888a5705e6745a84448c50fc4eb58ff5e0ad11c37b1aae33c7a7d3b8af883 + checksum: 0b69bdd2c2767049599e1b6bbf34782166a1b901fd00a09b2dab0f4a92a6a1e85bb28d498f40f138a68baf62714831b6398e170358c861b4b1e54bfac375b655 languageName: node linkType: hard @@ -1204,14 +1056,20 @@ __metadata: languageName: node linkType: hard -"@ethersproject/units@npm:5.6.0": +"@ethersproject/transactions@npm:^5.0.0-beta.135, @ethersproject/transactions@npm:^5.6.0": version: 5.6.0 - resolution: "@ethersproject/units@npm:5.6.0" + resolution: "@ethersproject/transactions@npm:5.6.0" dependencies: + "@ethersproject/address": ^5.6.0 "@ethersproject/bignumber": ^5.6.0 + "@ethersproject/bytes": ^5.6.0 "@ethersproject/constants": ^5.6.0 + "@ethersproject/keccak256": ^5.6.0 "@ethersproject/logger": ^5.6.0 - checksum: 4bca3d4797de2f204d6c23f64e417f60580008139067cf971ff0da3c03c20921f006933a6ae035b53df0e2522f8f999596dcd9df385b22b4b6f9479409f46b13 + "@ethersproject/properties": ^5.6.0 + "@ethersproject/rlp": ^5.6.0 + "@ethersproject/signing-key": ^5.6.0 + checksum: b01a3a9ce1e2d945825adbecfc71b992293e0274b77caf2c0b3c45bb76919ce64aa888a5705e6745a84448c50fc4eb58ff5e0ad11c37b1aae33c7a7d3b8af883 languageName: node linkType: hard @@ -1226,29 +1084,6 @@ __metadata: languageName: node linkType: hard -"@ethersproject/wallet@npm:5.6.0": - version: 5.6.0 - resolution: "@ethersproject/wallet@npm:5.6.0" - dependencies: - "@ethersproject/abstract-provider": ^5.6.0 - "@ethersproject/abstract-signer": ^5.6.0 - "@ethersproject/address": ^5.6.0 - "@ethersproject/bignumber": ^5.6.0 - "@ethersproject/bytes": ^5.6.0 - "@ethersproject/hash": ^5.6.0 - "@ethersproject/hdnode": ^5.6.0 - "@ethersproject/json-wallets": ^5.6.0 - "@ethersproject/keccak256": ^5.6.0 - "@ethersproject/logger": ^5.6.0 - "@ethersproject/properties": ^5.6.0 - "@ethersproject/random": ^5.6.0 - "@ethersproject/signing-key": ^5.6.0 - "@ethersproject/transactions": ^5.6.0 - "@ethersproject/wordlists": ^5.6.0 - checksum: 2e0900f136ffd0418a161d708116d6b966596c001a7f55861ceeea28282ce6ad61180cce24589c9b4df001d096352d57128a401edfc613af9daed3724b2a0ec9 - languageName: node - linkType: hard - "@ethersproject/wallet@npm:5.6.2": version: 5.6.2 resolution: "@ethersproject/wallet@npm:5.6.2" @@ -1272,19 +1107,6 @@ __metadata: languageName: node linkType: hard -"@ethersproject/web@npm:5.6.0, @ethersproject/web@npm:^5.6.0": - version: 5.6.0 - resolution: "@ethersproject/web@npm:5.6.0" - dependencies: - "@ethersproject/base64": ^5.6.0 - "@ethersproject/bytes": ^5.6.0 - "@ethersproject/logger": ^5.6.0 - "@ethersproject/properties": ^5.6.0 - "@ethersproject/strings": ^5.6.0 - checksum: 42b6e71658393e5abf8341c6bea0deb22cc744b4d22b3a979ed876bc772723b800c18e5180e223f77c47fb045828ef16ba5a01e8dd346474cf430533d1f053bc - languageName: node - linkType: hard - "@ethersproject/web@npm:5.6.1, @ethersproject/web@npm:^5.6.1": version: 5.6.1 resolution: "@ethersproject/web@npm:5.6.1" @@ -1298,16 +1120,16 @@ __metadata: languageName: node linkType: hard -"@ethersproject/wordlists@npm:5.6.0, @ethersproject/wordlists@npm:^5.6.0": +"@ethersproject/web@npm:^5.6.0": version: 5.6.0 - resolution: "@ethersproject/wordlists@npm:5.6.0" + resolution: "@ethersproject/web@npm:5.6.0" dependencies: + "@ethersproject/base64": ^5.6.0 "@ethersproject/bytes": ^5.6.0 - "@ethersproject/hash": ^5.6.0 "@ethersproject/logger": ^5.6.0 "@ethersproject/properties": ^5.6.0 "@ethersproject/strings": ^5.6.0 - checksum: 648d948d884aff09cfc11f1db404fff0489a49d50f4d878f2dbda14e02214c24e2e2efec7a3215929a5e433232413c435e41d47f2f405a46408cfd79c7f2ae78 + checksum: 42b6e71658393e5abf8341c6bea0deb22cc744b4d22b3a979ed876bc772723b800c18e5180e223f77c47fb045828ef16ba5a01e8dd346474cf430533d1f053bc languageName: node linkType: hard @@ -1324,6 +1146,82 @@ __metadata: languageName: node linkType: hard +"@ganache/ethereum-address@npm:0.1.4": + version: 0.1.4 + resolution: "@ganache/ethereum-address@npm:0.1.4" + dependencies: + "@ganache/utils": 0.1.4 + checksum: 0e07102c67aa2c25233e30f8ca359cbd012ad0e0b9580b8e6aff6f87dd46daee89bbc60d9518f2204f36f943e7bd5d20e571646c85e6a68a98784c3ede2ccec0 + languageName: node + linkType: hard + +"@ganache/ethereum-options@npm:0.1.4": + version: 0.1.4 + resolution: "@ganache/ethereum-options@npm:0.1.4" + dependencies: + "@ganache/ethereum-address": 0.1.4 + "@ganache/ethereum-utils": 0.1.4 + "@ganache/options": 0.1.4 + "@ganache/utils": 0.1.4 + bip39: 3.0.4 + seedrandom: 3.0.5 + checksum: 597b32502654ce9f3fec02fdf308f1e6b2c657b5e25c6d4219d71ecbea94e45faa4135c6d4e25cacf1faac1509f2b7546f3d8bbdba1e9121975d820999d3aa76 + languageName: node + linkType: hard + +"@ganache/ethereum-utils@npm:0.1.4": + version: 0.1.4 + resolution: "@ganache/ethereum-utils@npm:0.1.4" + dependencies: + "@ethereumjs/common": 2.6.0 + "@ethereumjs/tx": 3.4.0 + "@ethereumjs/vm": 5.6.0 + "@ganache/ethereum-address": 0.1.4 + "@ganache/rlp": 0.1.4 + "@ganache/utils": 0.1.4 + emittery: 0.10.0 + ethereumjs-abi: 0.6.8 + ethereumjs-util: 7.1.3 + checksum: 74bc7b7fb62e9dc2f114f6f428c465d9365c0bb84c85144d34935d24a2893c5471c8cae263ae4bea51f1335803b6b1771f57c25a276e9c0539a08a90c3289bca + languageName: node + linkType: hard + +"@ganache/options@npm:0.1.4": + version: 0.1.4 + resolution: "@ganache/options@npm:0.1.4" + dependencies: + "@ganache/utils": 0.1.4 + bip39: 3.0.4 + seedrandom: 3.0.5 + checksum: 4f1cda646f5599b18a0eeaf27286499c78c3e2e0eb2541db756c27f2ca16e58539c9db99aab8441e593f9fe586269940d800900f63312fcb10231ab95ebdc3dc + languageName: node + linkType: hard + +"@ganache/rlp@npm:0.1.4": + version: 0.1.4 + resolution: "@ganache/rlp@npm:0.1.4" + dependencies: + "@ganache/utils": 0.1.4 + rlp: 2.2.6 + checksum: 425c5d4a0a36b834cfac005d05679b3df970a6d8d953f385a5f9bd003a326ba23c1bce06095729879136699b70389d7f2627f939f712ed8897c96e542766771f + languageName: node + linkType: hard + +"@ganache/utils@npm:0.1.4": + version: 0.1.4 + resolution: "@ganache/utils@npm:0.1.4" + dependencies: + "@trufflesuite/bigint-buffer": 1.1.9 + emittery: 0.10.0 + keccak: 3.0.1 + seedrandom: 3.0.5 + dependenciesMeta: + "@trufflesuite/bigint-buffer": + optional: true + checksum: c81b7380d56292a44e9cdb0e581d815b9510fb1be87661fe135e2d3611b495f1cd01aa4b91e287bfc28d08d1b4b4210f7b54e32ea28e054faa006cf232fb3dcc + languageName: node + linkType: hard + "@gar/promisify@npm:^1.1.3": version: 1.1.3 resolution: "@gar/promisify@npm:1.1.3" @@ -1505,26 +1403,268 @@ __metadata: languageName: node linkType: hard -"@nomiclabs/ethereumjs-vm@npm:^4.2.2": - version: 4.2.2 - resolution: "@nomiclabs/ethereumjs-vm@npm:4.2.2" +"@nomicfoundation/ethereumjs-block@npm:^4.0.0": + version: 4.0.0 + resolution: "@nomicfoundation/ethereumjs-block@npm:4.0.0" dependencies: - async: ^2.1.2 - async-eventemitter: ^0.2.2 - core-js-pure: ^3.0.1 - ethereumjs-account: ^3.0.0 - ethereumjs-block: ^2.2.2 - ethereumjs-blockchain: ^4.0.3 - ethereumjs-common: ^1.5.0 - ethereumjs-tx: ^2.1.2 - ethereumjs-util: ^6.2.0 - fake-merkle-patricia-tree: ^1.0.1 + "@nomicfoundation/ethereumjs-common": ^3.0.0 + "@nomicfoundation/ethereumjs-rlp": ^4.0.0 + "@nomicfoundation/ethereumjs-trie": ^5.0.0 + "@nomicfoundation/ethereumjs-tx": ^4.0.0 + "@nomicfoundation/ethereumjs-util": ^8.0.0 + ethereum-cryptography: 0.1.3 + checksum: a57a33dda7724f0a46ef2e0ca0dbb1b427268f4135e8c23eee9ab5730a79369d52122faba7a010d71bca3046f7ce644ed95e4a34d5f2221ecaa5d94886d84b11 + languageName: node + linkType: hard + +"@nomicfoundation/ethereumjs-blockchain@npm:^6.0.0": + version: 6.0.0 + resolution: "@nomicfoundation/ethereumjs-blockchain@npm:6.0.0" + dependencies: + "@nomicfoundation/ethereumjs-block": ^4.0.0 + "@nomicfoundation/ethereumjs-common": ^3.0.0 + "@nomicfoundation/ethereumjs-ethash": ^2.0.0 + "@nomicfoundation/ethereumjs-rlp": ^4.0.0 + "@nomicfoundation/ethereumjs-trie": ^5.0.0 + "@nomicfoundation/ethereumjs-util": ^8.0.0 + abstract-level: ^1.0.3 + debug: ^4.3.3 + ethereum-cryptography: 0.1.3 + level: ^8.0.0 + lru-cache: ^5.1.1 + memory-level: ^1.0.0 + checksum: 5605c1d249924321de98c1728b5b832ee6488b690a42c829db21afa96f5c152c73afdec6aa4758cb9b24ec7ac19ec9f3146b63cf837e1b91d364e4c37b497881 + languageName: node + linkType: hard + +"@nomicfoundation/ethereumjs-common@npm:^3.0.0": + version: 3.0.0 + resolution: "@nomicfoundation/ethereumjs-common@npm:3.0.0" + dependencies: + "@nomicfoundation/ethereumjs-util": ^8.0.0 + crc-32: ^1.2.0 + checksum: 6a62908e5ccd8a4f56b841bd6ba9eef21dffafdd505f18b6b886d86ba4287cd12a2c632d521c5fddf2c6fca5a840f580d7601d89820098f6c1f8311db41e496b + languageName: node + linkType: hard + +"@nomicfoundation/ethereumjs-ethash@npm:^2.0.0": + version: 2.0.0 + resolution: "@nomicfoundation/ethereumjs-ethash@npm:2.0.0" + dependencies: + "@nomicfoundation/ethereumjs-block": ^4.0.0 + "@nomicfoundation/ethereumjs-rlp": ^4.0.0 + "@nomicfoundation/ethereumjs-util": ^8.0.0 + abstract-level: ^1.0.3 + bigint-crypto-utils: ^3.0.23 + ethereum-cryptography: 0.1.3 + checksum: 60133df2d450179f2ab26e8784b1bd79b37411bb047a7dace655499749893750f0f8d6d573f182ebcf4dba35f2da6301b0ad1b80dbe7637bb0d5155ccb189fda + languageName: node + linkType: hard + +"@nomicfoundation/ethereumjs-evm@npm:^1.0.0, @nomicfoundation/ethereumjs-evm@npm:^1.0.0-rc.3": + version: 1.0.0 + resolution: "@nomicfoundation/ethereumjs-evm@npm:1.0.0" + dependencies: + "@nomicfoundation/ethereumjs-common": ^3.0.0 + "@nomicfoundation/ethereumjs-util": ^8.0.0 + "@types/async-eventemitter": ^0.2.1 + async-eventemitter: ^0.2.4 + debug: ^4.3.3 + ethereum-cryptography: 0.1.3 + mcl-wasm: ^0.7.1 + rustbn.js: ~0.2.0 + checksum: d1ffaa1a02c1f78099a5cfe802f2738c498063e383a51ede4b7194c809d7bdb8d322edfea4d83090c8c1b83b42fa9febbd571c35f5cf27f18d47fb664f3ab61e + languageName: node + linkType: hard + +"@nomicfoundation/ethereumjs-rlp@npm:^4.0.0, @nomicfoundation/ethereumjs-rlp@npm:^4.0.0-beta.2": + version: 4.0.0 + resolution: "@nomicfoundation/ethereumjs-rlp@npm:4.0.0" + bin: + rlp: bin/rlp + checksum: b358d239e5a24884f0446d52159c8115b0eb1d6907179dc968df5054dccea7eff72f2d12522c911b6e08bb4b5d3f5f8e1d86a45cb1a24a4831cbb109743d4407 + languageName: node + linkType: hard + +"@nomicfoundation/ethereumjs-statemanager@npm:^1.0.0": + version: 1.0.0 + resolution: "@nomicfoundation/ethereumjs-statemanager@npm:1.0.0" + dependencies: + "@nomicfoundation/ethereumjs-common": ^3.0.0 + "@nomicfoundation/ethereumjs-rlp": ^4.0.0 + "@nomicfoundation/ethereumjs-trie": ^5.0.0 + "@nomicfoundation/ethereumjs-util": ^8.0.0 + debug: ^4.3.3 + ethereum-cryptography: 0.1.3 + functional-red-black-tree: ^1.0.1 + checksum: fad02ea922fbe25328186ea2eb43bdba63def57822f373ce213be26125ee8d3c90cf3b6f626e6876637cdb842e3c2b788fb8891fcf1aca3fd655e1c0d9a7e936 + languageName: node + linkType: hard + +"@nomicfoundation/ethereumjs-trie@npm:^5.0.0": + version: 5.0.0 + resolution: "@nomicfoundation/ethereumjs-trie@npm:5.0.0" + dependencies: + "@nomicfoundation/ethereumjs-rlp": ^4.0.0 + "@nomicfoundation/ethereumjs-util": ^8.0.0 + ethereum-cryptography: 0.1.3 + readable-stream: ^3.6.0 + checksum: 468de7ffe05473f0f05940e74bba01652dd9a4ff155a13e0a5395551e53557afde47d98f496f6323824bccfaeee8de4e22fef9b7f88d3bbd4e97cadc54e2e4f9 + languageName: node + linkType: hard + +"@nomicfoundation/ethereumjs-tx@npm:^4.0.0": + version: 4.0.0 + resolution: "@nomicfoundation/ethereumjs-tx@npm:4.0.0" + dependencies: + "@nomicfoundation/ethereumjs-common": ^3.0.0 + "@nomicfoundation/ethereumjs-rlp": ^4.0.0 + "@nomicfoundation/ethereumjs-util": ^8.0.0 + ethereum-cryptography: 0.1.3 + checksum: d2c0e3384aaa9f3b58232c531a4efd524be257e7257f23c3beed6ec9cf5fba6345cb632b3a464ae0a2aa99fd9e4a2d3e2d5c501593c5466e6ab629f05255791e + languageName: node + linkType: hard + +"@nomicfoundation/ethereumjs-util@npm:^8.0.0, @nomicfoundation/ethereumjs-util@npm:^8.0.0-rc.3": + version: 8.0.0 + resolution: "@nomicfoundation/ethereumjs-util@npm:8.0.0" + dependencies: + "@nomicfoundation/ethereumjs-rlp": ^4.0.0-beta.2 + ethereum-cryptography: 0.1.3 + checksum: a39be4c8d3dea4fae1e969b47138d718cac31bf248bb517766a42c97ca5850ca3ddf16c66d8e404fa0a0363fd6898ae2e716d75da2ed4113e610d26026e4cefb + languageName: node + linkType: hard + +"@nomicfoundation/ethereumjs-vm@npm:^6.0.0, @nomicfoundation/ethereumjs-vm@npm:^6.0.0-rc.3": + version: 6.0.0 + resolution: "@nomicfoundation/ethereumjs-vm@npm:6.0.0" + dependencies: + "@nomicfoundation/ethereumjs-block": ^4.0.0 + "@nomicfoundation/ethereumjs-blockchain": ^6.0.0 + "@nomicfoundation/ethereumjs-common": ^3.0.0 + "@nomicfoundation/ethereumjs-evm": ^1.0.0 + "@nomicfoundation/ethereumjs-rlp": ^4.0.0 + "@nomicfoundation/ethereumjs-statemanager": ^1.0.0 + "@nomicfoundation/ethereumjs-trie": ^5.0.0 + "@nomicfoundation/ethereumjs-tx": ^4.0.0 + "@nomicfoundation/ethereumjs-util": ^8.0.0 + "@types/async-eventemitter": ^0.2.1 + async-eventemitter: ^0.2.4 + debug: ^4.3.3 + ethereum-cryptography: 0.1.3 functional-red-black-tree: ^1.0.1 - merkle-patricia-tree: 3.0.0 + mcl-wasm: ^0.7.1 rustbn.js: ~0.2.0 - safe-buffer: ^5.1.1 - util.promisify: ^1.0.0 - checksum: 958e003813081947db14579af83f20139dc72c826fc128fade44cb87856eac32b9ff04be7ee20e708aa9ab8f2050df625d8edf298fbed5fbdbcc316c69ddd2fa + checksum: 3c0e10b377579d74bfdcfd056d5545b605f767982e41038d036c8219a50fe3564c7f146fdd04385d64f48f94b9d95c378d7a37955c5100c46c568a29f54ea737 + languageName: node + linkType: hard + +"@nomicfoundation/solidity-analyzer-darwin-arm64@npm:0.1.0": + version: 0.1.0 + resolution: "@nomicfoundation/solidity-analyzer-darwin-arm64@npm:0.1.0" + conditions: os=darwin & cpu=arm64 + languageName: node + linkType: hard + +"@nomicfoundation/solidity-analyzer-darwin-x64@npm:0.1.0": + version: 0.1.0 + resolution: "@nomicfoundation/solidity-analyzer-darwin-x64@npm:0.1.0" + conditions: os=darwin & cpu=x64 + languageName: node + linkType: hard + +"@nomicfoundation/solidity-analyzer-freebsd-x64@npm:0.1.0": + version: 0.1.0 + resolution: "@nomicfoundation/solidity-analyzer-freebsd-x64@npm:0.1.0" + conditions: os=freebsd & cpu=x64 + languageName: node + linkType: hard + +"@nomicfoundation/solidity-analyzer-linux-arm64-gnu@npm:0.1.0": + version: 0.1.0 + resolution: "@nomicfoundation/solidity-analyzer-linux-arm64-gnu@npm:0.1.0" + conditions: os=linux & cpu=arm64 & libc=glibc + languageName: node + linkType: hard + +"@nomicfoundation/solidity-analyzer-linux-arm64-musl@npm:0.1.0": + version: 0.1.0 + resolution: "@nomicfoundation/solidity-analyzer-linux-arm64-musl@npm:0.1.0" + conditions: os=linux & cpu=arm64 & libc=musl + languageName: node + linkType: hard + +"@nomicfoundation/solidity-analyzer-linux-x64-gnu@npm:0.1.0": + version: 0.1.0 + resolution: "@nomicfoundation/solidity-analyzer-linux-x64-gnu@npm:0.1.0" + conditions: os=linux & cpu=x64 & libc=glibc + languageName: node + linkType: hard + +"@nomicfoundation/solidity-analyzer-linux-x64-musl@npm:0.1.0": + version: 0.1.0 + resolution: "@nomicfoundation/solidity-analyzer-linux-x64-musl@npm:0.1.0" + conditions: os=linux & cpu=x64 & libc=musl + languageName: node + linkType: hard + +"@nomicfoundation/solidity-analyzer-win32-arm64-msvc@npm:0.1.0": + version: 0.1.0 + resolution: "@nomicfoundation/solidity-analyzer-win32-arm64-msvc@npm:0.1.0" + conditions: os=win32 & cpu=arm64 + languageName: node + linkType: hard + +"@nomicfoundation/solidity-analyzer-win32-ia32-msvc@npm:0.1.0": + version: 0.1.0 + resolution: "@nomicfoundation/solidity-analyzer-win32-ia32-msvc@npm:0.1.0" + conditions: os=win32 & cpu=ia32 + languageName: node + linkType: hard + +"@nomicfoundation/solidity-analyzer-win32-x64-msvc@npm:0.1.0": + version: 0.1.0 + resolution: "@nomicfoundation/solidity-analyzer-win32-x64-msvc@npm:0.1.0" + conditions: os=win32 & cpu=x64 + languageName: node + linkType: hard + +"@nomicfoundation/solidity-analyzer@npm:^0.1.0": + version: 0.1.0 + resolution: "@nomicfoundation/solidity-analyzer@npm:0.1.0" + dependencies: + "@nomicfoundation/solidity-analyzer-darwin-arm64": 0.1.0 + "@nomicfoundation/solidity-analyzer-darwin-x64": 0.1.0 + "@nomicfoundation/solidity-analyzer-freebsd-x64": 0.1.0 + "@nomicfoundation/solidity-analyzer-linux-arm64-gnu": 0.1.0 + "@nomicfoundation/solidity-analyzer-linux-arm64-musl": 0.1.0 + "@nomicfoundation/solidity-analyzer-linux-x64-gnu": 0.1.0 + "@nomicfoundation/solidity-analyzer-linux-x64-musl": 0.1.0 + "@nomicfoundation/solidity-analyzer-win32-arm64-msvc": 0.1.0 + "@nomicfoundation/solidity-analyzer-win32-ia32-msvc": 0.1.0 + "@nomicfoundation/solidity-analyzer-win32-x64-msvc": 0.1.0 + dependenciesMeta: + "@nomicfoundation/solidity-analyzer-darwin-arm64": + optional: true + "@nomicfoundation/solidity-analyzer-darwin-x64": + optional: true + "@nomicfoundation/solidity-analyzer-freebsd-x64": + optional: true + "@nomicfoundation/solidity-analyzer-linux-arm64-gnu": + optional: true + "@nomicfoundation/solidity-analyzer-linux-arm64-musl": + optional: true + "@nomicfoundation/solidity-analyzer-linux-x64-gnu": + optional: true + "@nomicfoundation/solidity-analyzer-linux-x64-musl": + optional: true + "@nomicfoundation/solidity-analyzer-win32-arm64-msvc": + optional: true + "@nomicfoundation/solidity-analyzer-win32-ia32-msvc": + optional: true + "@nomicfoundation/solidity-analyzer-win32-x64-msvc": + optional: true + checksum: 42dc5ba40e76bf14945fb6a423554bbbc6c99596675065d7d6f3c9a49ec39e37f3f77ecfedcf906fdb1bb33b033a5d92a90c645c886d6ff23334c8af8b14ff67 languageName: node linkType: hard @@ -1804,7 +1944,7 @@ __metadata: languageName: node linkType: hard -"@solidity-parser/parser@npm:^0.14.0, @solidity-parser/parser@npm:^0.14.1": +"@solidity-parser/parser@npm:^0.14.0": version: 0.14.1 resolution: "@solidity-parser/parser@npm:0.14.1" dependencies: @@ -1858,13 +1998,33 @@ __metadata: languageName: node linkType: hard -"@ts-morph/common@npm:~0.13.0": - version: 0.13.0 - resolution: "@ts-morph/common@npm:0.13.0" +"@trufflesuite/bigint-buffer@npm:1.1.10": + version: 1.1.10 + resolution: "@trufflesuite/bigint-buffer@npm:1.1.10" dependencies: - fast-glob: ^3.2.11 - minimatch: ^5.0.1 - mkdirp: ^1.0.4 + node-gyp: latest + node-gyp-build: 4.4.0 + checksum: e1dc5e4fbf348a55e660c0055267021eb04cbbdb7f6b0ee983ad32cd4aae1200be448a2ca3963c7d19c7c936d42f66c1ff8b5e4e2332cb1a9e3f870ff818dce4 + languageName: node + linkType: hard + +"@trufflesuite/bigint-buffer@npm:1.1.9": + version: 1.1.9 + resolution: "@trufflesuite/bigint-buffer@npm:1.1.9" + dependencies: + node-gyp: latest + node-gyp-build: 4.3.0 + checksum: 627dcff2cae7afe31432646232518363869e89b300f90f88ca68d903d0bdc79119975a5bc338223c03c1a4484cfac6d9cf4413ef20933a69eee48dd925519165 + languageName: node + linkType: hard + +"@ts-morph/common@npm:~0.13.0": + version: 0.13.0 + resolution: "@ts-morph/common@npm:0.13.0" + dependencies: + fast-glob: ^3.2.11 + minimatch: ^5.0.1 + mkdirp: ^1.0.4 path-browserify: ^1.0.1 checksum: 88b3d4b82dc6aca12741e55c6bf037f2243d14f4b9c42bbe28ed4a773ae9cd8d3ca6a6f9f827b5830c188037b0781d881a002ddb73e094fa5d5ff2a3352dc842 languageName: node @@ -1915,18 +2075,6 @@ __metadata: languageName: node linkType: hard -"@typechain/ethers-v5@npm:^2.0.0": - version: 2.0.0 - resolution: "@typechain/ethers-v5@npm:2.0.0" - dependencies: - ethers: ^5.0.2 - peerDependencies: - ethers: ^5.0.0 - typechain: ^3.0.0 - checksum: 785430547f11de358c4018338f6f72aac113ece70d743aad410fff4eacbc3b4876d2e0d3389e1a56123afcf156f5c044ee72275342e45218448c23fe93d23915 - languageName: node - linkType: hard - "@typechain/hardhat@npm:^6.0.0": version: 6.0.0 resolution: "@typechain/hardhat@npm:6.0.0" @@ -1958,6 +2106,13 @@ __metadata: languageName: node linkType: hard +"@types/async-eventemitter@npm:^0.2.1": + version: 0.2.1 + resolution: "@types/async-eventemitter@npm:0.2.1" + checksum: 36ba0a6f52082f76b19b9123a2fa0497f94fe15218fa54040cc45f0edff483ec3be93a38c177cd4dab79f5e32333fbdf3682d4dc94197438e86694b1fddd6896 + languageName: node + linkType: hard + "@types/bn.js@npm:*, @types/bn.js@npm:^5.1.0": version: 5.1.0 resolution: "@types/bn.js@npm:5.1.0" @@ -2078,7 +2233,7 @@ __metadata: languageName: node linkType: hard -"@types/lru-cache@npm:^5.1.0": +"@types/lru-cache@npm:5.1.1, @types/lru-cache@npm:^5.1.0": version: 5.1.1 resolution: "@types/lru-cache@npm:5.1.1" checksum: e1d6c0085f61b16ec5b3073ec76ad1be4844ea036561c3f145fc19f71f084b58a6eb600b14128aa95809d057d28f1d147c910186ae51219f58366ffd2ff2e118 @@ -2108,20 +2263,20 @@ __metadata: languageName: node linkType: hard -"@types/mocha@npm:^9.1.1": - version: 9.1.1 - resolution: "@types/mocha@npm:9.1.1" - checksum: 516077c0acd9806dc78317f88aaac0df5aaf0bdc2f63dfdadeabdf0b0137953b6ca65472e6ff7c30bc93ce4e0ae76eae70e8d46764b9a8eae4877a928b6ef49a +"@types/mocha@npm:^10.0.1": + version: 10.0.1 + resolution: "@types/mocha@npm:10.0.1" + checksum: 224ea9fce7b1734ccdb9aa99a622d902a538ce1847bca7fd22c5fb38adcf3ed536f50f48f587085db988a4bb3c2eb68f4b98e1cd6a38bc5547bd3bbbedc54495 languageName: node linkType: hard -"@types/node-fetch@npm:^2.5.5": - version: 2.6.1 - resolution: "@types/node-fetch@npm:2.6.1" +"@types/node-fetch@npm:^2.6.1": + version: 2.6.2 + resolution: "@types/node-fetch@npm:2.6.2" dependencies: "@types/node": "*" form-data: ^3.0.0 - checksum: a3e5d7f413d1638d795dff03f7b142b1b0e0c109ed210479000ce7b3ea11f9a6d89d9a024c96578d9249570c5fe5287a5f0f4aaba98199222230196ff2d6b283 + checksum: 6f73b1470000d303d25a6fb92875ea837a216656cb7474f66cdd67bb014aa81a5a11e7ac9c21fe19bee9ecb2ef87c1962bceeaec31386119d1ac86e4c30ad7a6 languageName: node linkType: hard @@ -2132,6 +2287,13 @@ __metadata: languageName: node linkType: hard +"@types/node@npm:11.11.6": + version: 11.11.6 + resolution: "@types/node@npm:11.11.6" + checksum: 075f1c011cf568e49701419acbcb55c24906b3bb5a34d9412a3b88f228a7a78401a5ad4d3e1cd6855c99aaea5ef96e37fc86ca097e50f06da92cf822befc1fff + languageName: node + linkType: hard + "@types/node@npm:12.20.24": version: 12.20.24 resolution: "@types/node@npm:12.20.24" @@ -2204,15 +2366,6 @@ __metadata: languageName: node linkType: hard -"@types/resolve@npm:^0.0.8": - version: 0.0.8 - resolution: "@types/resolve@npm:0.0.8" - dependencies: - "@types/node": "*" - checksum: f241bb773ab14b14500623ac3b57c52006ce32b20426b6d8bf2fe5fdc0344f42c77ac0f94ff57b443ae1d320a1a86c62b4e47239f0321699404402fbeb24bad6 - languageName: node - linkType: hard - "@types/responselike@npm:^1.0.0": version: 1.0.0 resolution: "@types/responselike@npm:1.0.0" @@ -2231,6 +2384,13 @@ __metadata: languageName: node linkType: hard +"@types/seedrandom@npm:3.0.1": + version: 3.0.1 + resolution: "@types/seedrandom@npm:3.0.1" + checksum: d9755452f224a4f5072a1d8738da6c9de3039fc59a2a449b1f658e51087be7b48ada49bcabc8b0f16633c095f55598c32fcd072c448858422a2f6a0566569e4c + languageName: node + linkType: hard + "@types/semver@npm:^6.0.0": version: 6.2.3 resolution: "@types/semver@npm:6.2.3" @@ -2479,13 +2639,6 @@ __metadata: languageName: node linkType: hard -"@ungap/promise-all-settled@npm:1.1.2": - version: 1.1.2 - resolution: "@ungap/promise-all-settled@npm:1.1.2" - checksum: 08d37fdfa23a6fe8139f1305313562ebad973f3fac01bcce2773b2bda5bcb0146dfdcf3cb6a722cf0a5f2ca0bc56a827eac8f1e7b3beddc548f654addf1fc34c - languageName: node - linkType: hard - "@uniswap/lib@npm:1.1.1": version: 1.1.1 resolution: "@uniswap/lib@npm:1.1.1" @@ -2545,13 +2698,6 @@ __metadata: languageName: node linkType: hard -"@yarnpkg/lockfile@npm:^1.1.0": - version: 1.1.0 - resolution: "@yarnpkg/lockfile@npm:1.1.0" - checksum: 05b881b4866a3546861fee756e6d3812776ea47fa6eb7098f983d6d0eefa02e12b66c3fff931574120f196286a7ad4879ce02743c8bb2be36c6a576c7852083a - languageName: node - linkType: hard - "@zetachain/addresses-tools@workspace:^, @zetachain/addresses-tools@workspace:packages/addresses-tools": version: 0.0.0-use.local resolution: "@zetachain/addresses-tools@workspace:packages/addresses-tools" @@ -2573,7 +2719,7 @@ __metadata: version: 0.0.0-use.local resolution: "@zetachain/example-contracts@workspace:packages/example-contracts" dependencies: - "@defi-wonderland/smock": ^2.0.7 + "@defi-wonderland/smock": ^2.3.4 "@openzeppelin/contracts": 4.7.3 "@uniswap/v2-periphery": 1.1.0-beta.0 "@uniswap/v3-periphery": 1.1.0 @@ -2614,7 +2760,6 @@ __metadata: version: 0.0.0-use.local resolution: "@zetachain/zevm-contracts@workspace:packages/zevm-contracts" dependencies: - "@defi-wonderland/smock": ^2.0.7 "@openzeppelin/contracts": 4.7.3 "@uniswap/v2-periphery": 1.1.0-beta.0 "@zetachain/addresses": "workspace:^" @@ -2651,30 +2796,18 @@ __metadata: languageName: node linkType: hard -"abstract-leveldown@npm:3.0.0": - version: 3.0.0 - resolution: "abstract-leveldown@npm:3.0.0" - dependencies: - xtend: ~4.0.0 - checksum: 1d3e65fc2288fd17955df3b0887fdd3d4fa7fcd816062014f872ea12a1e86e886151cbdc36abd2f243a810b7999252eaa30adf636ffe1be3103493ab37277e49 - languageName: node - linkType: hard - -"abstract-leveldown@npm:^2.4.1, abstract-leveldown@npm:~2.7.1": - version: 2.7.2 - resolution: "abstract-leveldown@npm:2.7.2" - dependencies: - xtend: ~4.0.0 - checksum: 97c45a05d8b5d24edf3855c1f9a19f919c4a189e387929745289a53116c80638339a7d4e50ad76d0ad2900166adaeaf2e0350dcdcd453e783cd8f04fd9bea17a - languageName: node - linkType: hard - -"abstract-leveldown@npm:^5.0.0, abstract-leveldown@npm:~5.0.0": - version: 5.0.0 - resolution: "abstract-leveldown@npm:5.0.0" +"abstract-level@npm:^1.0.0, abstract-level@npm:^1.0.2, abstract-level@npm:^1.0.3": + version: 1.0.3 + resolution: "abstract-level@npm:1.0.3" dependencies: - xtend: ~4.0.0 - checksum: d55d03cc7fad011d5fea30d26504b1a76123ec8edd3623d21f80ce0561c610b7ed1e00eb037c14746ec2b7ad8638586024f11d4a1476beee2c470c8cf27e3586 + buffer: ^6.0.3 + catering: ^2.1.0 + is-buffer: ^2.0.5 + level-supports: ^4.0.0 + level-transcoder: ^1.0.1 + module-error: ^1.0.1 + queue-microtask: ^1.2.3 + checksum: 70d61a3924526ebc257b138992052f9ff571a6cee5a7660836e37a1cc7081273c3acf465dd2f5e1897b38dc743a6fd9dba14a5d8a2a9d39e5787cd3da99f301d languageName: node linkType: hard @@ -2691,12 +2824,17 @@ __metadata: languageName: node linkType: hard -"abstract-leveldown@npm:~2.6.0": - version: 2.6.3 - resolution: "abstract-leveldown@npm:2.6.3" +"abstract-leveldown@npm:^7.2.0": + version: 7.2.0 + resolution: "abstract-leveldown@npm:7.2.0" dependencies: - xtend: ~4.0.0 - checksum: 87b18580467c303c34c305620e2c3227010f64187d6b1cd60c2d1b9adc058b0c4de716e111e9493aaad0080cb7836601032c5084990cd713f86b6a78f1fab791 + buffer: ^6.0.3 + catering: ^2.0.0 + is-buffer: ^2.0.5 + level-concat-iterator: ^3.0.0 + level-supports: ^2.0.1 + queue-microtask: ^1.2.3 + checksum: d558111f2d123da95ac80b8ba3b9b0a5bc8cd87296e64b05dca693f5f4839aa0e2fc97bad56a101766f499824e2962611750f8a76bbac4a5db35801968fbbe02 languageName: node linkType: hard @@ -2787,13 +2925,6 @@ __metadata: languageName: node linkType: hard -"aes-js@npm:^3.1.1": - version: 3.1.2 - resolution: "aes-js@npm:3.1.2" - checksum: 062154d50b1e433cc8c3b8ca7879f3a6375d5e79c2a507b2b6c4ec920b4cd851bf2afa7f65c98761a9da89c0ab618cbe6529e8e9a1c71f93290b53128fb8f712 - languageName: node - linkType: hard - "agent-base@npm:6, agent-base@npm:^6.0.2": version: 6.0.2 resolution: "agent-base@npm:6.0.2" @@ -2873,13 +3004,6 @@ __metadata: languageName: node linkType: hard -"ansi-regex@npm:^2.0.0": - version: 2.1.1 - resolution: "ansi-regex@npm:2.1.1" - checksum: 190abd03e4ff86794f338a31795d262c1dfe8c91f7e01d04f13f646f1dcb16c5800818f886047876f1272f065570ab86b24b99089f8b68a0e11ff19aed4ca8f1 - languageName: node - linkType: hard - "ansi-regex@npm:^3.0.0": version: 3.0.1 resolution: "ansi-regex@npm:3.0.1" @@ -2901,13 +3025,6 @@ __metadata: languageName: node linkType: hard -"ansi-styles@npm:^2.2.1": - version: 2.2.1 - resolution: "ansi-styles@npm:2.2.1" - checksum: ebc0e00381f2a29000d1dac8466a640ce11943cef3bda3cd0020dc042e31e1058ab59bf6169cd794a54c3a7338a61ebc404b7c91e004092dd20e028c432c9c2c - languageName: node - linkType: hard - "ansi-styles@npm:^3.2.0, ansi-styles@npm:^3.2.1": version: 3.2.1 resolution: "ansi-styles@npm:3.2.1" @@ -2983,45 +3100,6 @@ __metadata: languageName: node linkType: hard -"arr-diff@npm:^4.0.0": - version: 4.0.0 - resolution: "arr-diff@npm:4.0.0" - checksum: ea7c8834842ad3869297f7915689bef3494fd5b102ac678c13ffccab672d3d1f35802b79e90c4cfec2f424af3392e44112d1ccf65da34562ed75e049597276a0 - languageName: node - linkType: hard - -"arr-flatten@npm:^1.1.0": - version: 1.1.0 - resolution: "arr-flatten@npm:1.1.0" - checksum: 963fe12564fca2f72c055f3f6c206b9e031f7c433a0c66ca9858b484821f248c5b1e5d53c8e4989d80d764cd776cf6d9b160ad05f47bdc63022bfd63b5455e22 - languageName: node - linkType: hard - -"arr-union@npm:^3.1.0": - version: 3.1.0 - resolution: "arr-union@npm:3.1.0" - checksum: b5b0408c6eb7591143c394f3be082fee690ddd21f0fdde0a0a01106799e847f67fcae1b7e56b0a0c173290e29c6aca9562e82b300708a268bc8f88f3d6613cb9 - languageName: node - linkType: hard - -"array-back@npm:^1.0.3, array-back@npm:^1.0.4": - version: 1.0.4 - resolution: "array-back@npm:1.0.4" - dependencies: - typical: ^2.6.0 - checksum: 37a8be4cd4920b3d07bdbef40dae83bb37948f5d49601da98a6e48ba5496e9a0008e7f3f2184bcf4d3501bd371a048c9bdca7dc3cc5c3d5b1eb189bbba7b55db - languageName: node - linkType: hard - -"array-back@npm:^2.0.0": - version: 2.0.0 - resolution: "array-back@npm:2.0.0" - dependencies: - typical: ^2.6.1 - checksum: ab36ab3504b25116b47541fb0ac78ff13d1e991f33d98c361edd3aada3ed818a900b619bd67b195dd4e41b9256c27e8cdd6a69ece507e482f1207d07670ed6bd - languageName: node - linkType: hard - "array-back@npm:^3.0.1, array-back@npm:^3.1.0": version: 3.1.0 resolution: "array-back@npm:3.1.0" @@ -3070,13 +3148,6 @@ __metadata: languageName: node linkType: hard -"array-unique@npm:^0.3.2": - version: 0.3.2 - resolution: "array-unique@npm:0.3.2" - checksum: da344b89cfa6b0a5c221f965c21638bfb76b57b45184a01135382186924f55973cd9b171d4dad6bf606c6d9d36b0d721d091afdc9791535ead97ccbe78f8a888 - languageName: node - linkType: hard - "array.prototype.flat@npm:^1.2.3": version: 1.3.0 resolution: "array.prototype.flat@npm:1.3.0" @@ -3136,746 +3207,83 @@ __metadata: linkType: hard "assert-plus@npm:1.0.0, assert-plus@npm:^1.0.0": - version: 1.0.0 - resolution: "assert-plus@npm:1.0.0" - checksum: 19b4340cb8f0e6a981c07225eacac0e9d52c2644c080198765d63398f0075f83bbc0c8e95474d54224e297555ad0d631c1dcd058adb1ddc2437b41a6b424ac64 - languageName: node - linkType: hard - -"assertion-error@npm:^1.1.0": - version: 1.1.0 - resolution: "assertion-error@npm:1.1.0" - checksum: fd9429d3a3d4fd61782eb3962ae76b6d08aa7383123fca0596020013b3ebd6647891a85b05ce821c47d1471ed1271f00b0545cf6a4326cf2fc91efcc3b0fbecf - languageName: node - linkType: hard - -"assign-symbols@npm:^1.0.0": - version: 1.0.0 - resolution: "assign-symbols@npm:1.0.0" - checksum: c0eb895911d05b6b2d245154f70461c5e42c107457972e5ebba38d48967870dee53bcdf6c7047990586daa80fab8dab3cc6300800fbd47b454247fdedd859a2c - languageName: node - linkType: hard - -"async-eventemitter@npm:^0.2.2, async-eventemitter@npm:^0.2.4": - version: 0.2.4 - resolution: "async-eventemitter@npm:0.2.4" - dependencies: - async: ^2.4.0 - checksum: b9e77e0f58ebd7188c50c23d613d1263e0ab501f5e677e02b57cc97d7032beaf60aafa189887e7105569c791e212df4af00b608be1e9a4c425911d577124911e - languageName: node - linkType: hard - -"async-limiter@npm:~1.0.0": - version: 1.0.1 - resolution: "async-limiter@npm:1.0.1" - checksum: 2b849695b465d93ad44c116220dee29a5aeb63adac16c1088983c339b0de57d76e82533e8e364a93a9f997f28bbfc6a92948cefc120652bd07f3b59f8d75cf2b - languageName: node - linkType: hard - -"async@npm:1.x, async@npm:^1.4.2": - version: 1.5.2 - resolution: "async@npm:1.5.2" - checksum: fe5d6214d8f15bd51eee5ae8ec5079b228b86d2d595f47b16369dec2e11b3ff75a567bb5f70d12d79006665fbbb7ee0a7ec0e388524eefd454ecbe651c124ebd - languageName: node - linkType: hard - -"async@npm:2.6.2": - version: 2.6.2 - resolution: "async@npm:2.6.2" - dependencies: - lodash: ^4.17.11 - checksum: e5e90a3bcc4d9bf964bfc6b77d63b8f5bee8c14e9a51c3317dbcace44d5b6b1fe01cd4fd347449704a107da7fcd25e1382ee8545957b2702782ae720605cf7a4 - languageName: node - linkType: hard - -"async@npm:^2.0.1, async@npm:^2.1.2, async@npm:^2.4.0, async@npm:^2.5.0, async@npm:^2.6.1": - version: 2.6.3 - resolution: "async@npm:2.6.3" - dependencies: - lodash: ^4.17.14 - checksum: 5e5561ff8fca807e88738533d620488ac03a5c43fce6c937451f7e35f943d33ad06c24af3f681a48cca3d2b0002b3118faff0a128dc89438a9bf0226f712c499 - languageName: node - linkType: hard - -"asynckit@npm:^0.4.0": - version: 0.4.0 - resolution: "asynckit@npm:0.4.0" - checksum: 7b78c451df768adba04e2d02e63e2d0bf3b07adcd6e42b4cf665cb7ce899bedd344c69a1dcbce355b5f972d597b25aaa1c1742b52cffd9caccb22f348114f6be - languageName: node - linkType: hard - -"at-least-node@npm:^1.0.0": - version: 1.0.0 - resolution: "at-least-node@npm:1.0.0" - checksum: 463e2f8e43384f1afb54bc68485c436d7622acec08b6fad269b421cb1d29cebb5af751426793d0961ed243146fe4dc983402f6d5a51b720b277818dbf6f2e49e - languageName: node - linkType: hard - -"atob@npm:^2.1.2": - version: 2.1.2 - resolution: "atob@npm:2.1.2" - bin: - atob: bin/atob.js - checksum: dfeeeb70090c5ebea7be4b9f787f866686c645d9f39a0d184c817252d0cf08455ed25267d79c03254d3be1f03ac399992a792edcd5ffb9c91e097ab5ef42833a - languageName: node - linkType: hard - -"available-typed-arrays@npm:^1.0.5": - version: 1.0.5 - resolution: "available-typed-arrays@npm:1.0.5" - checksum: 20eb47b3cefd7db027b9bbb993c658abd36d4edd3fe1060e83699a03ee275b0c9b216cc076ff3f2db29073225fb70e7613987af14269ac1fe2a19803ccc97f1a - languageName: node - linkType: hard - -"aws-sign2@npm:~0.7.0": - version: 0.7.0 - resolution: "aws-sign2@npm:0.7.0" - checksum: b148b0bb0778098ad8cf7e5fc619768bcb51236707ca1d3e5b49e41b171166d8be9fdc2ea2ae43d7decf02989d0aaa3a9c4caa6f320af95d684de9b548a71525 - languageName: node - linkType: hard - -"aws4@npm:^1.8.0": - version: 1.11.0 - resolution: "aws4@npm:1.11.0" - checksum: 5a00d045fd0385926d20ebebcfba5ec79d4482fe706f63c27b324d489a04c68edb0db99ed991e19eda09cb8c97dc2452059a34d97545cebf591d7a2b5a10999f - languageName: node - linkType: hard - -"babel-code-frame@npm:^6.26.0": - version: 6.26.0 - resolution: "babel-code-frame@npm:6.26.0" - dependencies: - chalk: ^1.1.3 - esutils: ^2.0.2 - js-tokens: ^3.0.2 - checksum: 9410c3d5a921eb02fa409675d1a758e493323a49e7b9dddb7a2a24d47e61d39ab1129dd29f9175836eac9ce8b1d4c0a0718fcdc57ce0b865b529fd250dbab313 - languageName: node - linkType: hard - -"babel-core@npm:^6.0.14, babel-core@npm:^6.26.0": - version: 6.26.3 - resolution: "babel-core@npm:6.26.3" - dependencies: - babel-code-frame: ^6.26.0 - babel-generator: ^6.26.0 - babel-helpers: ^6.24.1 - babel-messages: ^6.23.0 - babel-register: ^6.26.0 - babel-runtime: ^6.26.0 - babel-template: ^6.26.0 - babel-traverse: ^6.26.0 - babel-types: ^6.26.0 - babylon: ^6.18.0 - convert-source-map: ^1.5.1 - debug: ^2.6.9 - json5: ^0.5.1 - lodash: ^4.17.4 - minimatch: ^3.0.4 - path-is-absolute: ^1.0.1 - private: ^0.1.8 - slash: ^1.0.0 - source-map: ^0.5.7 - checksum: 3d6a37e5c69ea7f7d66c2a261cbd7219197f2f938700e6ebbabb6d84a03f2bf86691ffa066866dcb49ba6c4bd702d347c9e0e147660847d709705cf43c964752 - languageName: node - linkType: hard - -"babel-generator@npm:^6.26.0": - version: 6.26.1 - resolution: "babel-generator@npm:6.26.1" - dependencies: - babel-messages: ^6.23.0 - babel-runtime: ^6.26.0 - babel-types: ^6.26.0 - detect-indent: ^4.0.0 - jsesc: ^1.3.0 - lodash: ^4.17.4 - source-map: ^0.5.7 - trim-right: ^1.0.1 - checksum: 5397f4d4d1243e7157e3336be96c10fcb1f29f73bf2d9842229c71764d9a6431397d249483a38c4d8b1581459e67be4df6f32d26b1666f02d0f5bfc2c2f25193 - languageName: node - linkType: hard - -"babel-helper-builder-binary-assignment-operator-visitor@npm:^6.24.1": - version: 6.24.1 - resolution: "babel-helper-builder-binary-assignment-operator-visitor@npm:6.24.1" - dependencies: - babel-helper-explode-assignable-expression: ^6.24.1 - babel-runtime: ^6.22.0 - babel-types: ^6.24.1 - checksum: 6ef49597837d042980e78284df014972daac7f1f1f2635d978bb2d13990304322f5135f27b8f2d6eb8c4c2459b496ec76e21544e26afbb5dec88f53089e17476 - languageName: node - linkType: hard - -"babel-helper-call-delegate@npm:^6.24.1": - version: 6.24.1 - resolution: "babel-helper-call-delegate@npm:6.24.1" - dependencies: - babel-helper-hoist-variables: ^6.24.1 - babel-runtime: ^6.22.0 - babel-traverse: ^6.24.1 - babel-types: ^6.24.1 - checksum: b6277d6e48c10cf416632f6dfbac77bdf6ba8ec4ac2f6359a77d6b731dae941c2a3ec7f35e1eba78aad2a7e0838197731d1ef75af529055096c4cb7d96432c88 - languageName: node - linkType: hard - -"babel-helper-define-map@npm:^6.24.1": - version: 6.26.0 - resolution: "babel-helper-define-map@npm:6.26.0" - dependencies: - babel-helper-function-name: ^6.24.1 - babel-runtime: ^6.26.0 - babel-types: ^6.26.0 - lodash: ^4.17.4 - checksum: 08e201eb009a7dbd020232fb7468ac772ebb8cfd33ec9a41113a54f4c90fd1e3474497783d635b8f87d797706323ca0c1758c516a630b0c95277112fc2fe4f13 - languageName: node - linkType: hard - -"babel-helper-explode-assignable-expression@npm:^6.24.1": - version: 6.24.1 - resolution: "babel-helper-explode-assignable-expression@npm:6.24.1" - dependencies: - babel-runtime: ^6.22.0 - babel-traverse: ^6.24.1 - babel-types: ^6.24.1 - checksum: 1bafdb51ce3dd95cf25d712d24a0c3c2ae02ff58118c77462f14ede4d8161aaee42c5c759c3d3a3344a5851b8b0f8d16b395713413b8194e1c3264fc5b12b754 - languageName: node - linkType: hard - -"babel-helper-function-name@npm:^6.24.1": - version: 6.24.1 - resolution: "babel-helper-function-name@npm:6.24.1" - dependencies: - babel-helper-get-function-arity: ^6.24.1 - babel-runtime: ^6.22.0 - babel-template: ^6.24.1 - babel-traverse: ^6.24.1 - babel-types: ^6.24.1 - checksum: d651db9e0b29e135877e90e7858405750a684220d22a6f7c78bb163305a1b322cc1c8bea1bc617625c34d92d0927fdbaa49ee46822e2f86b524eced4c88c7ff0 - languageName: node - linkType: hard - -"babel-helper-get-function-arity@npm:^6.24.1": - version: 6.24.1 - resolution: "babel-helper-get-function-arity@npm:6.24.1" - dependencies: - babel-runtime: ^6.22.0 - babel-types: ^6.24.1 - checksum: 37e344d6c5c00b67a3b378490a5d7ba924bab1c2ccd6ecf1b7da96ca679be12d75fbec6279366ae9772e482fb06a7b48293954dd79cbeba9b947e2db67252fbd - languageName: node - linkType: hard - -"babel-helper-hoist-variables@npm:^6.24.1": - version: 6.24.1 - resolution: "babel-helper-hoist-variables@npm:6.24.1" - dependencies: - babel-runtime: ^6.22.0 - babel-types: ^6.24.1 - checksum: 6af1c165d5f0ad192df07daa194d13de77572bd914d2fc9a270d56b93b2705d98eebabf412b1211505535af131fbe95886fcfad8b3a07b4d501c24b9cb8e57fe - languageName: node - linkType: hard - -"babel-helper-optimise-call-expression@npm:^6.24.1": - version: 6.24.1 - resolution: "babel-helper-optimise-call-expression@npm:6.24.1" - dependencies: - babel-runtime: ^6.22.0 - babel-types: ^6.24.1 - checksum: 16e6aba819b473dbf013391f759497df9f57bc7060bc4e5f7f6b60fb03670eb1dec65dd2227601d58f151e9d647e1f676a12466f5e6674379978820fa02c0fbb - languageName: node - linkType: hard - -"babel-helper-regex@npm:^6.24.1": - version: 6.26.0 - resolution: "babel-helper-regex@npm:6.26.0" - dependencies: - babel-runtime: ^6.26.0 - babel-types: ^6.26.0 - lodash: ^4.17.4 - checksum: ab949a4c90ab255abaafd9ec11a4a6dc77dba360875af2bb0822b699c058858773792c1e969c425c396837f61009f30c9ee5ba4b9a8ca87b0779ae1622f89fb3 - languageName: node - linkType: hard - -"babel-helper-remap-async-to-generator@npm:^6.24.1": - version: 6.24.1 - resolution: "babel-helper-remap-async-to-generator@npm:6.24.1" - dependencies: - babel-helper-function-name: ^6.24.1 - babel-runtime: ^6.22.0 - babel-template: ^6.24.1 - babel-traverse: ^6.24.1 - babel-types: ^6.24.1 - checksum: f330943104b61e7f9248d222bd5fe5d3238904ee20643b76197571e14a724723d64a8096b292a60f64788f0efe30176882c376eeebde00657925678e304324f0 - languageName: node - linkType: hard - -"babel-helper-replace-supers@npm:^6.24.1": - version: 6.24.1 - resolution: "babel-helper-replace-supers@npm:6.24.1" - dependencies: - babel-helper-optimise-call-expression: ^6.24.1 - babel-messages: ^6.23.0 - babel-runtime: ^6.22.0 - babel-template: ^6.24.1 - babel-traverse: ^6.24.1 - babel-types: ^6.24.1 - checksum: ca1d216c5c6afc6af2ef55ea16777ba99e108780ea25da61d93edb09fd85f5e96c756306e2a21e737c3b0c7a16c99762b62a0e5f529d3865b14029fef7351cba - languageName: node - linkType: hard - -"babel-helpers@npm:^6.24.1": - version: 6.24.1 - resolution: "babel-helpers@npm:6.24.1" - dependencies: - babel-runtime: ^6.22.0 - babel-template: ^6.24.1 - checksum: 751c6010e18648eebae422adfea5f3b5eff70d592d693bfe0f53346227d74b38e6cd2553c4c18de1e64faac585de490eccbd3ab86ba0885bdac42ed4478bc6b0 - languageName: node - linkType: hard - -"babel-messages@npm:^6.23.0": - version: 6.23.0 - resolution: "babel-messages@npm:6.23.0" - dependencies: - babel-runtime: ^6.22.0 - checksum: c8075c17587a33869e1a5bd0a5b73bbe395b68188362dacd5418debbc7c8fd784bcd3295e81ee7e410dc2c2655755add6af03698c522209f6a68334c15e6d6ca - languageName: node - linkType: hard - -"babel-plugin-check-es2015-constants@npm:^6.22.0": - version: 6.22.0 - resolution: "babel-plugin-check-es2015-constants@npm:6.22.0" - dependencies: - babel-runtime: ^6.22.0 - checksum: 39168cb4ff078911726bfaf9d111d1e18f3e99d8b6f6101d343249b28346c3869e415c97fe7e857e7f34b913f8a052634b2b9dcfb4c0272e5f64ed22df69c735 - languageName: node - linkType: hard - -"babel-plugin-syntax-async-functions@npm:^6.8.0": - version: 6.13.0 - resolution: "babel-plugin-syntax-async-functions@npm:6.13.0" - checksum: e982d9756869fa83eb6a4502490a90b0d31e8a41e2ee582045934f022ac8ff5fa6a3386366976fab3a391d5a7ab8ea5f9da623f35ed8ab328b8ab6d9b2feb1d3 - languageName: node - linkType: hard - -"babel-plugin-syntax-exponentiation-operator@npm:^6.8.0": - version: 6.13.0 - resolution: "babel-plugin-syntax-exponentiation-operator@npm:6.13.0" - checksum: cbcb3aeae7005240325f72d55c3c90575033123e8a1ddfa6bf9eac4ee7e246c2a23f5b5ab1144879590d947a3ed1d88838169d125e5d7c4f53678526482b020e - languageName: node - linkType: hard - -"babel-plugin-syntax-trailing-function-commas@npm:^6.22.0": - version: 6.22.0 - resolution: "babel-plugin-syntax-trailing-function-commas@npm:6.22.0" - checksum: d8b9039ded835bb128e8e14eeeb6e0ac2a876b85250924bdc3a8dc2a6984d3bfade4de04d40fb15ea04a86d561ac280ae0d7306d7d4ef7a8c52c43b6a23909c6 - languageName: node - linkType: hard - -"babel-plugin-transform-async-to-generator@npm:^6.22.0": - version: 6.24.1 - resolution: "babel-plugin-transform-async-to-generator@npm:6.24.1" - dependencies: - babel-helper-remap-async-to-generator: ^6.24.1 - babel-plugin-syntax-async-functions: ^6.8.0 - babel-runtime: ^6.22.0 - checksum: ffe8b4b2ed6db1f413ede385bd1a36f39e02a64ed79ce02779440049af75215c98f8debdc70eb01430bfd889f792682b0136576fe966f7f9e1b30e2a54695a8d - languageName: node - linkType: hard - -"babel-plugin-transform-es2015-arrow-functions@npm:^6.22.0": - version: 6.22.0 - resolution: "babel-plugin-transform-es2015-arrow-functions@npm:6.22.0" - dependencies: - babel-runtime: ^6.22.0 - checksum: 746e2be0fed20771c07f0984ba79ef0bab37d6e98434267ec96cef57272014fe53a180bfb9047bf69ed149d367a2c97baad54d6057531cd037684f371aab2333 - languageName: node - linkType: hard - -"babel-plugin-transform-es2015-block-scoped-functions@npm:^6.22.0": - version: 6.22.0 - resolution: "babel-plugin-transform-es2015-block-scoped-functions@npm:6.22.0" - dependencies: - babel-runtime: ^6.22.0 - checksum: f251611f723d94b4068d2a873a2783e019bd81bd7144cfdbcfc31ef166f4d82fa2f1efba64342ba2630dab93a2b12284067725c0aa08315712419a2bc3b92a75 - languageName: node - linkType: hard - -"babel-plugin-transform-es2015-block-scoping@npm:^6.23.0": - version: 6.26.0 - resolution: "babel-plugin-transform-es2015-block-scoping@npm:6.26.0" - dependencies: - babel-runtime: ^6.26.0 - babel-template: ^6.26.0 - babel-traverse: ^6.26.0 - babel-types: ^6.26.0 - lodash: ^4.17.4 - checksum: 5e4dee33bf4aab0ce7751a9ae845c25d3bf03944ffdfc8d784e1de2123a3eec19657dd59274c9969461757f5e2ab75c517e978bafe5309a821a41e278ad38a63 - languageName: node - linkType: hard - -"babel-plugin-transform-es2015-classes@npm:^6.23.0": - version: 6.24.1 - resolution: "babel-plugin-transform-es2015-classes@npm:6.24.1" - dependencies: - babel-helper-define-map: ^6.24.1 - babel-helper-function-name: ^6.24.1 - babel-helper-optimise-call-expression: ^6.24.1 - babel-helper-replace-supers: ^6.24.1 - babel-messages: ^6.23.0 - babel-runtime: ^6.22.0 - babel-template: ^6.24.1 - babel-traverse: ^6.24.1 - babel-types: ^6.24.1 - checksum: 999392b47a83cf9297e49fbde00bc9b15fb6d71bc041f7b3d621ac45361486ec4b66f55c47f98dca6c398ceaa8bfc9f3c21257854822c4523e7475a92e6c000a - languageName: node - linkType: hard - -"babel-plugin-transform-es2015-computed-properties@npm:^6.22.0": - version: 6.24.1 - resolution: "babel-plugin-transform-es2015-computed-properties@npm:6.24.1" - dependencies: - babel-runtime: ^6.22.0 - babel-template: ^6.24.1 - checksum: 34e466bfd4b021aa3861db66cf10a9093fa6a4fcedbc8c82a55f6ca1fcbd212a9967f2df6c5f9e9a20046fa43c8967633a476f2bbc15cb8d3769cbba948a5c16 - languageName: node - linkType: hard - -"babel-plugin-transform-es2015-destructuring@npm:^6.23.0": - version: 6.23.0 - resolution: "babel-plugin-transform-es2015-destructuring@npm:6.23.0" - dependencies: - babel-runtime: ^6.22.0 - checksum: 1343d27f09846e6e1e48da7b83d0d4f2d5571559c468ad8ad4c3715b8ff3e21b2d553e90ad420dc6840de260b7f3b9f9c057606d527e3d838a52a3a7c5fffdbe - languageName: node - linkType: hard - -"babel-plugin-transform-es2015-duplicate-keys@npm:^6.22.0": - version: 6.24.1 - resolution: "babel-plugin-transform-es2015-duplicate-keys@npm:6.24.1" - dependencies: - babel-runtime: ^6.22.0 - babel-types: ^6.24.1 - checksum: 756a7a13517c3e80c8312137b9872b9bc32fbfbb905e9f1e45bf321e2b464d0e6a6e6deca22c61b62377225bd8136b73580897cccb394995d6e00bc8ce882ba4 - languageName: node - linkType: hard - -"babel-plugin-transform-es2015-for-of@npm:^6.23.0": - version: 6.23.0 - resolution: "babel-plugin-transform-es2015-for-of@npm:6.23.0" - dependencies: - babel-runtime: ^6.22.0 - checksum: 0124e320c32b25de84ddaba951a6f0ad031fa5019de54de32bd317d2a97b3f967026008f32e8c88728330c1cce7c4f1d0ecb15007020d50bd5ca1438a882e205 - languageName: node - linkType: hard - -"babel-plugin-transform-es2015-function-name@npm:^6.22.0": - version: 6.24.1 - resolution: "babel-plugin-transform-es2015-function-name@npm:6.24.1" - dependencies: - babel-helper-function-name: ^6.24.1 - babel-runtime: ^6.22.0 - babel-types: ^6.24.1 - checksum: 629ecd824d53ec973a3ef85e74d9fd8c710203084ca2f7ac833879ddfa3b83a28f0270fe2ee5f3b8c078bb4b3e4b843173a646a7cd4abc49e8c1c563d31fb711 - languageName: node - linkType: hard - -"babel-plugin-transform-es2015-literals@npm:^6.22.0": - version: 6.22.0 - resolution: "babel-plugin-transform-es2015-literals@npm:6.22.0" - dependencies: - babel-runtime: ^6.22.0 - checksum: 40e270580a0236990f2555f5dc7ae24b4db9f4709ca455ed1a6724b0078592482274be7448579b14122bd06481641a38e7b2e48d0b49b8c81c88e154a26865b4 - languageName: node - linkType: hard - -"babel-plugin-transform-es2015-modules-amd@npm:^6.22.0, babel-plugin-transform-es2015-modules-amd@npm:^6.24.1": - version: 6.24.1 - resolution: "babel-plugin-transform-es2015-modules-amd@npm:6.24.1" - dependencies: - babel-plugin-transform-es2015-modules-commonjs: ^6.24.1 - babel-runtime: ^6.22.0 - babel-template: ^6.24.1 - checksum: 084c7a1ef3bd0b2b9f4851b27cfb65f8ea1408349af05b4d88f994c23844a0754abfa4799bbc5f3f0ec94232b3a54a2e46d7f1dff1bdd40fa66a46f645197dfa - languageName: node - linkType: hard - -"babel-plugin-transform-es2015-modules-commonjs@npm:^6.23.0, babel-plugin-transform-es2015-modules-commonjs@npm:^6.24.1": - version: 6.26.2 - resolution: "babel-plugin-transform-es2015-modules-commonjs@npm:6.26.2" - dependencies: - babel-plugin-transform-strict-mode: ^6.24.1 - babel-runtime: ^6.26.0 - babel-template: ^6.26.0 - babel-types: ^6.26.0 - checksum: 9cd93a84037855c1879bcc100229bee25b44c4805a9a9f040e8927f772c4732fa17a0706c81ea0db77b357dd9baf84388eec03ceb36597932c48fe32fb3d4171 - languageName: node - linkType: hard - -"babel-plugin-transform-es2015-modules-systemjs@npm:^6.23.0": - version: 6.24.1 - resolution: "babel-plugin-transform-es2015-modules-systemjs@npm:6.24.1" - dependencies: - babel-helper-hoist-variables: ^6.24.1 - babel-runtime: ^6.22.0 - babel-template: ^6.24.1 - checksum: b34877e201d7b4d293d87c04962a3575fe7727a9593e99ce3a7f8deea3da8883a08bd87a6a12927083ac26f47f6944a31cdbfe3d6eb4d18dd884cb2d304ee943 - languageName: node - linkType: hard - -"babel-plugin-transform-es2015-modules-umd@npm:^6.23.0": - version: 6.24.1 - resolution: "babel-plugin-transform-es2015-modules-umd@npm:6.24.1" - dependencies: - babel-plugin-transform-es2015-modules-amd: ^6.24.1 - babel-runtime: ^6.22.0 - babel-template: ^6.24.1 - checksum: 735857b9f2ad0c41ceda31a1594fe2a063025f4428f9e243885a437b5bd415aca445a5e8495ff34b7120617735b1c3a2158033f0be23f1f5a90e655fff742a01 - languageName: node - linkType: hard - -"babel-plugin-transform-es2015-object-super@npm:^6.22.0": - version: 6.24.1 - resolution: "babel-plugin-transform-es2015-object-super@npm:6.24.1" - dependencies: - babel-helper-replace-supers: ^6.24.1 - babel-runtime: ^6.22.0 - checksum: 97b2968f699ac94cb55f4f1e7ea53dc9e4264ec99cab826f40f181da9f6db5980cd8b4985f05c7b6f1e19fbc31681e6e63894dfc5ecf4b3a673d736c4ef0f9db - languageName: node - linkType: hard - -"babel-plugin-transform-es2015-parameters@npm:^6.23.0": - version: 6.24.1 - resolution: "babel-plugin-transform-es2015-parameters@npm:6.24.1" - dependencies: - babel-helper-call-delegate: ^6.24.1 - babel-helper-get-function-arity: ^6.24.1 - babel-runtime: ^6.22.0 - babel-template: ^6.24.1 - babel-traverse: ^6.24.1 - babel-types: ^6.24.1 - checksum: bb6c047dc10499be8ccebdffac22c77f14aee5d3106da8f2e96c801d2746403c809d8c6922e8ebd2eb31d8827b4bb2321ba43378fcdc9dca206417bb345c4f93 - languageName: node - linkType: hard - -"babel-plugin-transform-es2015-shorthand-properties@npm:^6.22.0": - version: 6.24.1 - resolution: "babel-plugin-transform-es2015-shorthand-properties@npm:6.24.1" - dependencies: - babel-runtime: ^6.22.0 - babel-types: ^6.24.1 - checksum: 9302c5de158a28432e932501a783560094c624c3659f4e0a472b6b2e9d6e8ab2634f82ef74d3e75363d46ccff6aad119267dbc34f67464c70625e24a651ad9e5 - languageName: node - linkType: hard - -"babel-plugin-transform-es2015-spread@npm:^6.22.0": - version: 6.22.0 - resolution: "babel-plugin-transform-es2015-spread@npm:6.22.0" - dependencies: - babel-runtime: ^6.22.0 - checksum: 8694a8a7802d905503194ab81c155354b36d39fc819ad2148f83146518dd37d2c6926c8568712f5aa890169afc9353fd4bcc49397959c6dc9da3480b449c0ae9 - languageName: node - linkType: hard - -"babel-plugin-transform-es2015-sticky-regex@npm:^6.22.0": - version: 6.24.1 - resolution: "babel-plugin-transform-es2015-sticky-regex@npm:6.24.1" - dependencies: - babel-helper-regex: ^6.24.1 - babel-runtime: ^6.22.0 - babel-types: ^6.24.1 - checksum: d9c45401caf0d74779a1170e886976d4c865b7de2e90dfffc7557481b9e73b6e37e9f1028aa07b813896c4df88f4d7e89968249a74547c7875e6c499c90c801d - languageName: node - linkType: hard - -"babel-plugin-transform-es2015-template-literals@npm:^6.22.0": - version: 6.22.0 - resolution: "babel-plugin-transform-es2015-template-literals@npm:6.22.0" - dependencies: - babel-runtime: ^6.22.0 - checksum: 4fad2b7b383a2e784858ee7bf837419ee8ff9602afe218e1472f8c33a0c008f01d06f23ff2f2322fb23e1ed17e37237a818575fe88ecc5417d85331973b0ea4d - languageName: node - linkType: hard - -"babel-plugin-transform-es2015-typeof-symbol@npm:^6.23.0": - version: 6.23.0 - resolution: "babel-plugin-transform-es2015-typeof-symbol@npm:6.23.0" - dependencies: - babel-runtime: ^6.22.0 - checksum: 68a1609c6abcddf5f138c56bafcd9fad7c6b3b404fe40910148ab70eb21d6c7807a343a64eb81ce45daf4b70c384c528c55fad45e0d581e4b09efa4d574a6a1b - languageName: node - linkType: hard - -"babel-plugin-transform-es2015-unicode-regex@npm:^6.22.0": - version: 6.24.1 - resolution: "babel-plugin-transform-es2015-unicode-regex@npm:6.24.1" - dependencies: - babel-helper-regex: ^6.24.1 - babel-runtime: ^6.22.0 - regexpu-core: ^2.0.0 - checksum: 739ddb02e5f77904f83ea45323c9a636e3aed34b2a49c7c68208b5f2834eecb6b655e772f870f16a7aaf09ac8219f754ad69d61741d088f5b681d13cda69265d - languageName: node - linkType: hard - -"babel-plugin-transform-exponentiation-operator@npm:^6.22.0": - version: 6.24.1 - resolution: "babel-plugin-transform-exponentiation-operator@npm:6.24.1" - dependencies: - babel-helper-builder-binary-assignment-operator-visitor: ^6.24.1 - babel-plugin-syntax-exponentiation-operator: ^6.8.0 - babel-runtime: ^6.22.0 - checksum: 533ad53ba2cd6ff3c0f751563e1beea429c620038dc2efeeb8348ab4752ebcc95d1521857abfd08047400f1921b2d4df5e0cd266e65ddbe4c3edc58b9ad6fd3c + version: 1.0.0 + resolution: "assert-plus@npm:1.0.0" + checksum: 19b4340cb8f0e6a981c07225eacac0e9d52c2644c080198765d63398f0075f83bbc0c8e95474d54224e297555ad0d631c1dcd058adb1ddc2437b41a6b424ac64 languageName: node linkType: hard -"babel-plugin-transform-regenerator@npm:^6.22.0": - version: 6.26.0 - resolution: "babel-plugin-transform-regenerator@npm:6.26.0" - dependencies: - regenerator-transform: ^0.10.0 - checksum: 41a51d8f692bf4a5cbd705fa70f3cb6abebae66d9ba3dccfb5921da262f8c30f630e1fe9f7b132e29b96fe0d99385a801f6aa204278c5bd0af4284f7f93a665a +"assertion-error@npm:^1.1.0": + version: 1.1.0 + resolution: "assertion-error@npm:1.1.0" + checksum: fd9429d3a3d4fd61782eb3962ae76b6d08aa7383123fca0596020013b3ebd6647891a85b05ce821c47d1471ed1271f00b0545cf6a4326cf2fc91efcc3b0fbecf languageName: node linkType: hard -"babel-plugin-transform-strict-mode@npm:^6.24.1": - version: 6.24.1 - resolution: "babel-plugin-transform-strict-mode@npm:6.24.1" +"async-eventemitter@npm:^0.2.4": + version: 0.2.4 + resolution: "async-eventemitter@npm:0.2.4" dependencies: - babel-runtime: ^6.22.0 - babel-types: ^6.24.1 - checksum: 32d70ce9d8c8918a6a840e46df03dfe1e265eb9b25df5a800fedb5065ef1b4b5f24d7c62d92fca0e374db8b0b9b6f84e68edd02ad21883d48f608583ec29f638 + async: ^2.4.0 + checksum: b9e77e0f58ebd7188c50c23d613d1263e0ab501f5e677e02b57cc97d7032beaf60aafa189887e7105569c791e212df4af00b608be1e9a4c425911d577124911e languageName: node linkType: hard -"babel-preset-env@npm:^1.7.0": - version: 1.7.0 - resolution: "babel-preset-env@npm:1.7.0" - dependencies: - babel-plugin-check-es2015-constants: ^6.22.0 - babel-plugin-syntax-trailing-function-commas: ^6.22.0 - babel-plugin-transform-async-to-generator: ^6.22.0 - babel-plugin-transform-es2015-arrow-functions: ^6.22.0 - babel-plugin-transform-es2015-block-scoped-functions: ^6.22.0 - babel-plugin-transform-es2015-block-scoping: ^6.23.0 - babel-plugin-transform-es2015-classes: ^6.23.0 - babel-plugin-transform-es2015-computed-properties: ^6.22.0 - babel-plugin-transform-es2015-destructuring: ^6.23.0 - babel-plugin-transform-es2015-duplicate-keys: ^6.22.0 - babel-plugin-transform-es2015-for-of: ^6.23.0 - babel-plugin-transform-es2015-function-name: ^6.22.0 - babel-plugin-transform-es2015-literals: ^6.22.0 - babel-plugin-transform-es2015-modules-amd: ^6.22.0 - babel-plugin-transform-es2015-modules-commonjs: ^6.23.0 - babel-plugin-transform-es2015-modules-systemjs: ^6.23.0 - babel-plugin-transform-es2015-modules-umd: ^6.23.0 - babel-plugin-transform-es2015-object-super: ^6.22.0 - babel-plugin-transform-es2015-parameters: ^6.23.0 - babel-plugin-transform-es2015-shorthand-properties: ^6.22.0 - babel-plugin-transform-es2015-spread: ^6.22.0 - babel-plugin-transform-es2015-sticky-regex: ^6.22.0 - babel-plugin-transform-es2015-template-literals: ^6.22.0 - babel-plugin-transform-es2015-typeof-symbol: ^6.23.0 - babel-plugin-transform-es2015-unicode-regex: ^6.22.0 - babel-plugin-transform-exponentiation-operator: ^6.22.0 - babel-plugin-transform-regenerator: ^6.22.0 - browserslist: ^3.2.6 - invariant: ^2.2.2 - semver: ^5.3.0 - checksum: 6e459a6c76086a2a377707680148b94c3d0aba425b039b427ca01171ebada7f5db5d336b309548462f6ba015e13176a4724f912875c15084d4aa88d77020d185 - languageName: node - linkType: hard - -"babel-register@npm:^6.26.0": - version: 6.26.0 - resolution: "babel-register@npm:6.26.0" - dependencies: - babel-core: ^6.26.0 - babel-runtime: ^6.26.0 - core-js: ^2.5.0 - home-or-tmp: ^2.0.0 - lodash: ^4.17.4 - mkdirp: ^0.5.1 - source-map-support: ^0.4.15 - checksum: 75d5fe060e4850dbdbd5f56db2928cd0b6b6c93a65ba5f2a991465af4dc3f4adf46d575138f228b2169b1e25e3b4a7cdd16515a355fea41b873321bf56467583 +"async-limiter@npm:~1.0.0": + version: 1.0.1 + resolution: "async-limiter@npm:1.0.1" + checksum: 2b849695b465d93ad44c116220dee29a5aeb63adac16c1088983c339b0de57d76e82533e8e364a93a9f997f28bbfc6a92948cefc120652bd07f3b59f8d75cf2b languageName: node linkType: hard -"babel-runtime@npm:^6.18.0, babel-runtime@npm:^6.22.0, babel-runtime@npm:^6.26.0": - version: 6.26.0 - resolution: "babel-runtime@npm:6.26.0" - dependencies: - core-js: ^2.4.0 - regenerator-runtime: ^0.11.0 - checksum: 8aeade94665e67a73c1ccc10f6fd42ba0c689b980032b70929de7a6d9a12eb87ef51902733f8fefede35afea7a5c3ef7e916a64d503446c1eedc9e3284bd3d50 +"async@npm:1.x": + version: 1.5.2 + resolution: "async@npm:1.5.2" + checksum: fe5d6214d8f15bd51eee5ae8ec5079b228b86d2d595f47b16369dec2e11b3ff75a567bb5f70d12d79006665fbbb7ee0a7ec0e388524eefd454ecbe651c124ebd languageName: node linkType: hard -"babel-template@npm:^6.24.1, babel-template@npm:^6.26.0": - version: 6.26.0 - resolution: "babel-template@npm:6.26.0" +"async@npm:^2.4.0": + version: 2.6.3 + resolution: "async@npm:2.6.3" dependencies: - babel-runtime: ^6.26.0 - babel-traverse: ^6.26.0 - babel-types: ^6.26.0 - babylon: ^6.18.0 - lodash: ^4.17.4 - checksum: 028dd57380f09b5641b74874a19073c53c4fb3f1696e849575aae18f8c80eaf21db75209057db862f3b893ce2cd9b795d539efa591b58f4a0fb011df0a56fbed + lodash: ^4.17.14 + checksum: 5e5561ff8fca807e88738533d620488ac03a5c43fce6c937451f7e35f943d33ad06c24af3f681a48cca3d2b0002b3118faff0a128dc89438a9bf0226f712c499 languageName: node linkType: hard -"babel-traverse@npm:^6.24.1, babel-traverse@npm:^6.26.0": - version: 6.26.0 - resolution: "babel-traverse@npm:6.26.0" - dependencies: - babel-code-frame: ^6.26.0 - babel-messages: ^6.23.0 - babel-runtime: ^6.26.0 - babel-types: ^6.26.0 - babylon: ^6.18.0 - debug: ^2.6.8 - globals: ^9.18.0 - invariant: ^2.2.2 - lodash: ^4.17.4 - checksum: fca037588d2791ae0409f1b7aa56075b798699cccc53ea04d82dd1c0f97b9e7ab17065f7dd3ecd69101d7874c9c8fd5e0f88fa53abbae1fe94e37e6b81ebcb8d +"asynckit@npm:^0.4.0": + version: 0.4.0 + resolution: "asynckit@npm:0.4.0" + checksum: 7b78c451df768adba04e2d02e63e2d0bf3b07adcd6e42b4cf665cb7ce899bedd344c69a1dcbce355b5f972d597b25aaa1c1742b52cffd9caccb22f348114f6be languageName: node linkType: hard -"babel-types@npm:^6.19.0, babel-types@npm:^6.24.1, babel-types@npm:^6.26.0": - version: 6.26.0 - resolution: "babel-types@npm:6.26.0" - dependencies: - babel-runtime: ^6.26.0 - esutils: ^2.0.2 - lodash: ^4.17.4 - to-fast-properties: ^1.0.3 - checksum: d16b0fa86e9b0e4c2623be81d0a35679faff24dd2e43cde4ca58baf49f3e39415a011a889e6c2259ff09e1228e4c3a3db6449a62de59e80152fe1ce7398fde76 +"at-least-node@npm:^1.0.0": + version: 1.0.0 + resolution: "at-least-node@npm:1.0.0" + checksum: 463e2f8e43384f1afb54bc68485c436d7622acec08b6fad269b421cb1d29cebb5af751426793d0961ed243146fe4dc983402f6d5a51b720b277818dbf6f2e49e languageName: node linkType: hard -"babelify@npm:^7.3.0": - version: 7.3.0 - resolution: "babelify@npm:7.3.0" - dependencies: - babel-core: ^6.0.14 - object-assign: ^4.0.0 - checksum: 4e169606ed0f2ff6f886d2367c72243d36b3b354490ccc916b913f6b4afd14102c91f771d71d485857feb134581dd48702f25431e19b5c7035f474f9898c3c2e +"available-typed-arrays@npm:^1.0.5": + version: 1.0.5 + resolution: "available-typed-arrays@npm:1.0.5" + checksum: 20eb47b3cefd7db027b9bbb993c658abd36d4edd3fe1060e83699a03ee275b0c9b216cc076ff3f2db29073225fb70e7613987af14269ac1fe2a19803ccc97f1a languageName: node linkType: hard -"babylon@npm:^6.18.0": - version: 6.18.0 - resolution: "babylon@npm:6.18.0" - bin: - babylon: ./bin/babylon.js - checksum: 0777ae0c735ce1cbfc856d627589ed9aae212b84fb0c03c368b55e6c5d3507841780052808d0ad46e18a2ba516e93d55eeed8cd967f3b2938822dfeccfb2a16d +"aws-sign2@npm:~0.7.0": + version: 0.7.0 + resolution: "aws-sign2@npm:0.7.0" + checksum: b148b0bb0778098ad8cf7e5fc619768bcb51236707ca1d3e5b49e41b171166d8be9fdc2ea2ae43d7decf02989d0aaa3a9c4caa6f320af95d684de9b548a71525 languageName: node linkType: hard -"backoff@npm:^2.5.0": - version: 2.5.0 - resolution: "backoff@npm:2.5.0" - dependencies: - precond: 0.2 - checksum: ccdcf2a26acd9379d0d4f09e3fb3b7ee34dee94f07ab74d1e38b38f89a3675d9f3cbebb142d9c61c655f4c9eb63f1d6ec28cebeb3dc9215efd8fe7cef92725b9 +"aws4@npm:^1.8.0": + version: 1.11.0 + resolution: "aws4@npm:1.11.0" + checksum: 5a00d045fd0385926d20ebebcfba5ec79d4482fe706f63c27b324d489a04c68edb0db99ed991e19eda09cb8c97dc2452059a34d97545cebf591d7a2b5a10999f languageName: node linkType: hard @@ -3909,21 +3317,6 @@ __metadata: languageName: node linkType: hard -"base@npm:^0.11.1": - version: 0.11.2 - resolution: "base@npm:0.11.2" - dependencies: - cache-base: ^1.0.1 - class-utils: ^0.3.5 - component-emitter: ^1.2.1 - define-property: ^1.0.0 - isobject: ^3.0.1 - mixin-deep: ^1.2.0 - pascalcase: ^0.1.1 - checksum: a4a146b912e27eea8f66d09cb0c9eab666f32ce27859a7dfd50f38cd069a2557b39f16dba1bc2aecb3b44bf096738dd207b7970d99b0318423285ab1b1994edd - languageName: node - linkType: hard - "bcrypt-pbkdf@npm:^1.0.0": version: 1.0.2 resolution: "bcrypt-pbkdf@npm:1.0.2" @@ -3949,6 +3342,22 @@ __metadata: languageName: node linkType: hard +"bigint-crypto-utils@npm:^3.0.23": + version: 3.1.8 + resolution: "bigint-crypto-utils@npm:3.1.8" + dependencies: + bigint-mod-arith: ^3.1.0 + checksum: deb004aacf0ac6150b3cebe472c8166a7a315c411260d6c20e43c8c9b1e48831879e5a2e8e7af1ef1aefc542ad7d842a1de4bef12b98e50c825d9243321efe52 + languageName: node + linkType: hard + +"bigint-mod-arith@npm:^3.1.0": + version: 3.1.2 + resolution: "bigint-mod-arith@npm:3.1.2" + checksum: badddd745f6e6c45674b22335d26a9ea83250e749abde20c5f84b24afbc747e259bc36798530953332349ed898f38ec39125b326cae8b8ee2dddfaea7ddf8448 + languageName: node + linkType: hard + "bignumber.js@npm:^9.0.0, bignumber.js@npm:^9.0.1": version: 9.0.2 resolution: "bignumber.js@npm:9.0.2" @@ -3972,16 +3381,15 @@ __metadata: languageName: node linkType: hard -"bip39@npm:2.5.0": - version: 2.5.0 - resolution: "bip39@npm:2.5.0" +"bip39@npm:3.0.4": + version: 3.0.4 + resolution: "bip39@npm:3.0.4" dependencies: + "@types/node": 11.11.6 create-hash: ^1.1.0 pbkdf2: ^3.0.9 randombytes: ^2.0.1 - safe-buffer: ^5.0.1 - unorm: ^1.3.3 - checksum: 26e83583c43a8430afea1c385328b447005c74ddaf997cd8d3e416057f4968360b08ebf7de32374d605295c3abdd7ddd448d8078a2aa3d951735f4499c23875b + checksum: 79ce1600a03d1ba5053bdd4e6323f9463ec340764c7e52918b6c6b9dca81221940f2d9a65656447f108f9bc2c8d9ae8df319cca83bbd1dad63f53ef2768d9bae languageName: node linkType: hard @@ -4012,7 +3420,7 @@ __metadata: languageName: node linkType: hard -"bluebird@npm:^3.5.0, bluebird@npm:^3.5.2": +"bluebird@npm:^3.5.0": version: 3.7.2 resolution: "bluebird@npm:3.7.2" checksum: 869417503c722e7dc54ca46715f70e15f4d9c602a423a02c825570862d12935be59ed9c7ba34a9b31f186c017c23cac6b54e35446f8353059c101da73eac22ef @@ -4026,7 +3434,7 @@ __metadata: languageName: node linkType: hard -"bn.js@npm:^4.0.0, bn.js@npm:^4.1.0, bn.js@npm:^4.10.0, bn.js@npm:^4.11.0, bn.js@npm:^4.11.6, bn.js@npm:^4.11.8, bn.js@npm:^4.11.9, bn.js@npm:^4.8.0": +"bn.js@npm:^4.0.0, bn.js@npm:^4.1.0, bn.js@npm:^4.11.0, bn.js@npm:^4.11.1, bn.js@npm:^4.11.6, bn.js@npm:^4.11.8, bn.js@npm:^4.11.9": version: 4.12.0 resolution: "bn.js@npm:4.12.0" checksum: 39afb4f15f4ea537b55eaf1446c896af28ac948fdcf47171961475724d1bb65118cca49fa6e3d67706e4790955ec0e74de584e45c8f1ef89f46c812bee5b5a12 @@ -4104,24 +3512,6 @@ __metadata: languageName: node linkType: hard -"braces@npm:^2.3.1": - version: 2.3.2 - resolution: "braces@npm:2.3.2" - dependencies: - arr-flatten: ^1.1.0 - array-unique: ^0.3.2 - extend-shallow: ^2.0.1 - fill-range: ^4.0.0 - isobject: ^3.0.1 - repeat-element: ^1.1.2 - snapdragon: ^0.8.1 - snapdragon-node: ^2.0.1 - split-string: ^3.0.2 - to-regex: ^3.0.1 - checksum: e30dcb6aaf4a31c8df17d848aa283a65699782f75ad61ae93ec25c9729c66cf58e66f0000a9fec84e4add1135bb7da40f7cb9601b36bebcfa9ca58e8d5c07de0 - languageName: node - linkType: hard - "braces@npm:^3.0.2, braces@npm:~3.0.2": version: 3.0.2 resolution: "braces@npm:3.0.2" @@ -4147,6 +3537,18 @@ __metadata: languageName: node linkType: hard +"browser-level@npm:^1.0.1": + version: 1.0.1 + resolution: "browser-level@npm:1.0.1" + dependencies: + abstract-level: ^1.0.2 + catering: ^2.1.1 + module-error: ^1.0.2 + run-parallel-limit: ^1.1.0 + checksum: 67fbc77ce832940bfa25073eccff279f512ad56f545deb996a5b23b02316f5e76f4a79d381acc27eda983f5c9a2566aaf9c97e4fdd0748288c4407307537a29b + languageName: node + linkType: hard + "browser-stdout@npm:1.3.1": version: 1.3.1 resolution: "browser-stdout@npm:1.3.1" @@ -4218,18 +3620,6 @@ __metadata: languageName: node linkType: hard -"browserslist@npm:^3.2.6": - version: 3.2.8 - resolution: "browserslist@npm:3.2.8" - dependencies: - caniuse-lite: ^1.0.30000844 - electron-to-chromium: ^1.3.47 - bin: - browserslist: ./cli.js - checksum: 74d9ab1089a3813f54a7c4f9f6612faa6256799c8e42c7e00e4aae626c17f199049a01707a525a05b1673cd1493936583e51aad295e25249166e7e8fbd0273ba - languageName: node - linkType: hard - "bs58@npm:^4.0.0": version: 4.0.1 resolution: "bs58@npm:4.0.1" @@ -4280,7 +3670,7 @@ __metadata: languageName: node linkType: hard -"buffer@npm:^5.0.5, buffer@npm:^5.2.1, buffer@npm:^5.5.0, buffer@npm:^5.6.0": +"buffer@npm:^5.0.5, buffer@npm:^5.5.0, buffer@npm:^5.6.0": version: 5.7.1 resolution: "buffer@npm:5.7.1" dependencies: @@ -4290,6 +3680,26 @@ __metadata: languageName: node linkType: hard +"buffer@npm:^6.0.3": + version: 6.0.3 + resolution: "buffer@npm:6.0.3" + dependencies: + base64-js: ^1.3.1 + ieee754: ^1.2.1 + checksum: 5ad23293d9a731e4318e420025800b42bf0d264004c0286c8cc010af7a270c7a0f6522e84f54b9ad65cbd6db20b8badbfd8d2ebf4f80fa03dab093b89e68c3f9 + languageName: node + linkType: hard + +"bufferutil@npm:4.0.5": + version: 4.0.5 + resolution: "bufferutil@npm:4.0.5" + dependencies: + node-gyp: latest + node-gyp-build: ^4.3.0 + checksum: 37d5bef7cb38d29f9377b8891ff8a57f53ae6057313d77a8aa2a7417df37a72f16987100796cb2f1e1862f3eb80057705f3c052615ec076a0dcc7aa6c83b68c9 + languageName: node + linkType: hard + "bufferutil@npm:^4.0.1": version: 4.0.6 resolution: "bufferutil@npm:4.0.6" @@ -4300,29 +3710,19 @@ __metadata: languageName: node linkType: hard -"bytes@npm:3.1.2": - version: 3.1.2 - resolution: "bytes@npm:3.1.2" - checksum: e4bcd3948d289c5127591fbedf10c0b639ccbf00243504e4e127374a15c3bc8eed0d28d4aaab08ff6f1cf2abc0cce6ba3085ed32f4f90e82a5683ce0014e1b6e - languageName: node - linkType: hard - -"bytewise-core@npm:^1.2.2": - version: 1.2.3 - resolution: "bytewise-core@npm:1.2.3" +"busboy@npm:^1.6.0": + version: 1.6.0 + resolution: "busboy@npm:1.6.0" dependencies: - typewise-core: ^1.2 - checksum: e0d28fb7ff5bb6fd9320eef31c6b37e98da3b9a24d9893e2c17e0ee544457e0c76c2d3fc642c99d82daa0f18dcd49e7dce8dcc338711200e9ced79107cb78e8e + streamsearch: ^1.1.0 + checksum: 32801e2c0164e12106bf236291a00795c3c4e4b709ae02132883fe8478ba2ae23743b11c5735a0aae8afe65ac4b6ca4568b91f0d9fed1fdbc32ede824a73746e languageName: node linkType: hard -"bytewise@npm:~1.1.0": - version: 1.1.0 - resolution: "bytewise@npm:1.1.0" - dependencies: - bytewise-core: ^1.2.2 - typewise: ^1.0.3 - checksum: 20d7387ecf8c29adc4740e626fb02eaa27f34ae4c5ca881657d403e792730c0625ba4fed824462b3ddb7d3ebe41b7abbfe24f1cd3bf07cecc5a631f154d2d8d2 +"bytes@npm:3.1.2": + version: 3.1.2 + resolution: "bytes@npm:3.1.2" + checksum: e4bcd3948d289c5127591fbedf10c0b639ccbf00243504e4e127374a15c3bc8eed0d28d4aaab08ff6f1cf2abc0cce6ba3085ed32f4f90e82a5683ce0014e1b6e languageName: node linkType: hard @@ -4352,23 +3752,6 @@ __metadata: languageName: node linkType: hard -"cache-base@npm:^1.0.1": - version: 1.0.1 - resolution: "cache-base@npm:1.0.1" - dependencies: - collection-visit: ^1.0.0 - component-emitter: ^1.2.1 - get-value: ^2.0.6 - has-value: ^1.0.0 - isobject: ^3.0.1 - set-value: ^2.0.0 - to-object-path: ^0.3.0 - union-value: ^1.0.0 - unset-value: ^1.0.0 - checksum: 9114b8654fe2366eedc390bad0bcf534e2f01b239a888894e2928cb58cdc1e6ea23a73c6f3450dcfd2058aa73a8a981e723cd1e7c670c047bf11afdc65880107 - languageName: node - linkType: hard - "cacheable-request@npm:^6.0.0": version: 6.1.0 resolution: "cacheable-request@npm:6.1.0" @@ -4384,17 +3767,7 @@ __metadata: languageName: node linkType: hard -"cachedown@npm:1.0.0": - version: 1.0.0 - resolution: "cachedown@npm:1.0.0" - dependencies: - abstract-leveldown: ^2.4.1 - lru-cache: ^3.2.0 - checksum: ffd229839ca7efbfa14e35321fb8df444421e192bdf7be16048a303d2a24f3ed86cbe6c7a8cca91761423e4c53c3ed1098d337bbb9d3448801d4792172b4ab3e - languageName: node - linkType: hard - -"call-bind@npm:^1.0.0, call-bind@npm:^1.0.2, call-bind@npm:~1.0.2": +"call-bind@npm:^1.0.0, call-bind@npm:^1.0.2": version: 1.0.2 resolution: "call-bind@npm:1.0.2" dependencies: @@ -4422,13 +3795,6 @@ __metadata: languageName: node linkType: hard -"camelcase@npm:^3.0.0": - version: 3.0.0 - resolution: "camelcase@npm:3.0.0" - checksum: ae4fe1c17c8442a3a345a6b7d2393f028ab7a7601af0c352ad15d1ab97ca75112e19e29c942b2a214898e160194829b68923bce30e018d62149c6d84187f1673 - languageName: node - linkType: hard - "camelcase@npm:^5.0.0, camelcase@npm:^5.3.1": version: 5.3.1 resolution: "camelcase@npm:5.3.1" @@ -4443,13 +3809,6 @@ __metadata: languageName: node linkType: hard -"caniuse-lite@npm:^1.0.30000844": - version: 1.0.30001327 - resolution: "caniuse-lite@npm:1.0.30001327" - checksum: 789076fb889bd03515c4a3e2bfa09cd5b28439645173445147eb6ddfd8105c755e46dfda3de4b75edd2b71490864188bbfe8a2efe920c7998960b4e98916f518 - languageName: node - linkType: hard - "caseless@npm:^0.12.0, caseless@npm:~0.12.0": version: 0.12.0 resolution: "caseless@npm:0.12.0" @@ -4457,6 +3816,13 @@ __metadata: languageName: node linkType: hard +"catering@npm:^2.0.0, catering@npm:^2.1.0, catering@npm:^2.1.1": + version: 2.1.1 + resolution: "catering@npm:2.1.1" + checksum: 205daefa69c935b0c19f3d8f2e0a520dd69aebe9bda55902958003f7c9cff8f967dfb90071b421bd6eb618576f657a89d2bc0986872c9bc04bbd66655e9d4bd6 + languageName: node + linkType: hard + "cbor@npm:^5.0.2": version: 5.2.0 resolution: "cbor@npm:5.2.0" @@ -4467,13 +3833,6 @@ __metadata: languageName: node linkType: hard -"chai-bignumber@npm:^3.0.0": - version: 3.0.0 - resolution: "chai-bignumber@npm:3.0.0" - checksum: 1a671beb93cf9775abf1a0640c6ec938b2952a89793b2c9dab9a5fa24fb7df5520cc9a20db84446f622ae5d28029e2bac140601786e0d9e821b4c37e22e9d433 - languageName: node - linkType: hard - "chai@npm:^4.3.6": version: 4.3.6 resolution: "chai@npm:4.3.6" @@ -4489,20 +3848,7 @@ __metadata: languageName: node linkType: hard -"chalk@npm:^1.1.3": - version: 1.1.3 - resolution: "chalk@npm:1.1.3" - dependencies: - ansi-styles: ^2.2.1 - escape-string-regexp: ^1.0.2 - has-ansi: ^2.0.0 - strip-ansi: ^3.0.0 - supports-color: ^2.0.0 - checksum: 9d2ea6b98fc2b7878829eec223abcf404622db6c48396a9b9257f6d0ead2acf18231ae368d6a664a83f272b0679158da12e97b5229f794939e555cc574478acd - languageName: node - linkType: hard - -"chalk@npm:^2.0.0, chalk@npm:^2.1.0, chalk@npm:^2.4.1, chalk@npm:^2.4.2": +"chalk@npm:^2.0.0, chalk@npm:^2.1.0, chalk@npm:^2.4.2": version: 2.4.2 resolution: "chalk@npm:2.4.2" dependencies: @@ -4544,15 +3890,6 @@ __metadata: languageName: node linkType: hard -"checkpoint-store@npm:^1.1.0": - version: 1.1.0 - resolution: "checkpoint-store@npm:1.1.0" - dependencies: - functional-red-black-tree: ^1.0.1 - checksum: 94e921ccb222c7970615e8b2bcd956dbd52f15a1c397af0447dbdef8ecd32ffe342e394d39e55f2912278a460f3736de777b5b57a5baf229c0a6bd04d2465511 - languageName: node - linkType: hard - "chokidar@npm:3.3.0": version: 3.3.0 resolution: "chokidar@npm:3.3.0" @@ -4649,15 +3986,17 @@ __metadata: languageName: node linkType: hard -"class-utils@npm:^0.3.5": - version: 0.3.6 - resolution: "class-utils@npm:0.3.6" +"classic-level@npm:^1.2.0": + version: 1.2.0 + resolution: "classic-level@npm:1.2.0" dependencies: - arr-union: ^3.1.0 - define-property: ^0.2.5 - isobject: ^3.0.0 - static-extend: ^0.1.1 - checksum: be108900801e639e50f96a7e4bfa8867c753a7750a7603879f3981f8b0a89cba657497a2d5f40cd4ea557ff15d535a100818bb486baf6e26fe5d7872e75f1078 + abstract-level: ^1.0.2 + catering: ^2.1.0 + module-error: ^1.0.1 + napi-macros: ~2.0.0 + node-gyp: latest + node-gyp-build: ^4.3.0 + checksum: 88ddd12f2192c2775107d5e462998ac01095cb0222ca01dc2be77d8dcbbf9883c4c0a0248529cceee40a2f1232c68027b1aca731da9f767ad8e9483cbd61dd37 languageName: node linkType: hard @@ -4705,17 +4044,6 @@ __metadata: languageName: node linkType: hard -"cliui@npm:^3.2.0": - version: 3.2.0 - resolution: "cliui@npm:3.2.0" - dependencies: - string-width: ^1.0.1 - strip-ansi: ^3.0.1 - wrap-ansi: ^2.0.0 - checksum: c68d1dbc3e347bfe79ed19cc7f48007d5edd6cd8438342e32073e0b4e311e3c44e1f4f19221462bc6590de56c2df520e427533a9dde95dee25710bec322746ad - languageName: node - linkType: hard - "cliui@npm:^5.0.0": version: 5.0.0 resolution: "cliui@npm:5.0.0" @@ -4758,13 +4086,6 @@ __metadata: languageName: node linkType: hard -"clone@npm:2.1.2, clone@npm:^2.0.0": - version: 2.1.2 - resolution: "clone@npm:2.1.2" - checksum: aaf106e9bc025b21333e2f4c12da539b568db4925c0501a1bf4070836c9e848c892fa22c35548ce0d1132b08bbbfa17a00144fe58fccdab6fa900fec4250f67d - languageName: node - linkType: hard - "clone@npm:^1.0.2": version: 1.0.4 resolution: "clone@npm:1.0.4" @@ -4779,23 +4100,6 @@ __metadata: languageName: node linkType: hard -"code-point-at@npm:^1.0.0": - version: 1.1.0 - resolution: "code-point-at@npm:1.1.0" - checksum: 17d5666611f9b16d64fdf48176d9b7fb1c7d1c1607a189f7e600040a11a6616982876af148230336adb7d8fe728a559f743a4e29db3747e3b1a32fa7f4529681 - languageName: node - linkType: hard - -"collection-visit@npm:^1.0.0": - version: 1.0.0 - resolution: "collection-visit@npm:1.0.0" - dependencies: - map-visit: ^1.0.0 - object-visit: ^1.0.0 - checksum: 15d9658fe6eb23594728346adad5433b86bb7a04fd51bbab337755158722f9313a5376ef479de5b35fbc54140764d0d39de89c339f5d25b959ed221466981da9 - languageName: node - linkType: hard - "color-convert@npm:^1.9.0": version: 1.9.3 resolution: "color-convert@npm:1.9.3" @@ -4867,19 +4171,6 @@ __metadata: languageName: node linkType: hard -"command-line-args@npm:^4.0.7": - version: 4.0.7 - resolution: "command-line-args@npm:4.0.7" - dependencies: - array-back: ^2.0.0 - find-replace: ^1.0.3 - typical: ^2.6.1 - bin: - command-line-args: bin/cli.js - checksum: 618109143fbca741048d54a5d31a2a5e166fbda318ed1419c1ca66877ce92ed80d6768a52a2e6392eb751f16ca7755d4014ced6f5f858a68d0cbe793bab6e3ee - languageName: node - linkType: hard - "command-line-args@npm:^5.1.1": version: 5.2.1 resolution: "command-line-args@npm:5.2.1" @@ -4918,10 +4209,10 @@ __metadata: languageName: node linkType: hard -"component-emitter@npm:^1.2.1": - version: 1.3.0 - resolution: "component-emitter@npm:1.3.0" - checksum: b3c46de38ffd35c57d1c02488355be9f218e582aec72d72d1b8bbec95a3ac1b38c96cd6e03ff015577e68f550fbb361a3bfdbd9bb248be9390b7b3745691be6b +"commander@npm:^8.1.0": + version: 8.3.0 + resolution: "commander@npm:8.3.0" + checksum: 0f82321821fc27b83bd409510bb9deeebcfa799ff0bf5d102128b500b7af22872c0c92cb6a0ebc5a4cf19c6b550fba9cedfa7329d18c6442a625f851377bacf0 languageName: node linkType: hard @@ -4932,7 +4223,7 @@ __metadata: languageName: node linkType: hard -"concat-stream@npm:^1.5.1, concat-stream@npm:^1.6.0, concat-stream@npm:^1.6.2": +"concat-stream@npm:^1.6.0, concat-stream@npm:^1.6.2": version: 1.6.2 resolution: "concat-stream@npm:1.6.2" dependencies: @@ -4978,15 +4269,6 @@ __metadata: languageName: node linkType: hard -"convert-source-map@npm:^1.5.1": - version: 1.8.0 - resolution: "convert-source-map@npm:1.8.0" - dependencies: - safe-buffer: ~5.1.1 - checksum: 985d974a2d33e1a2543ada51c93e1ba2f73eaed608dc39f229afc78f71dcc4c8b7d7c684aa647e3c6a3a204027444d69e53e169ce94e8d1fa8d7dee80c9c8fed - languageName: node - linkType: hard - "cookie-signature@npm:1.0.6": version: 1.0.6 resolution: "cookie-signature@npm:1.0.6" @@ -5008,13 +4290,6 @@ __metadata: languageName: node linkType: hard -"copy-descriptor@npm:^0.1.0": - version: 0.1.1 - resolution: "copy-descriptor@npm:0.1.1" - checksum: d4b7b57b14f1d256bb9aa0b479241048afd7f5bcf22035fc7b94e8af757adeae247ea23c1a774fe44869fd5694efba4a969b88d966766c5245fdee59837fe45b - languageName: node - linkType: hard - "core-js-pure@npm:^3.0.1": version: 3.21.1 resolution: "core-js-pure@npm:3.21.1" @@ -5022,13 +4297,6 @@ __metadata: languageName: node linkType: hard -"core-js@npm:^2.4.0, core-js@npm:^2.5.0": - version: 2.6.12 - resolution: "core-js@npm:2.6.12" - checksum: 44fa9934a85f8c78d61e0c8b7b22436330471ffe59ec5076fe7f324d6e8cf7f824b14b1c81ca73608b13bdb0fef035bd820989bf059767ad6fa13123bb8bd016 - languageName: node - linkType: hard - "core-util-is@npm:1.0.2": version: 1.0.2 resolution: "core-util-is@npm:1.0.2" @@ -5106,16 +4374,6 @@ __metadata: languageName: node linkType: hard -"cross-fetch@npm:^2.1.0, cross-fetch@npm:^2.1.1": - version: 2.2.6 - resolution: "cross-fetch@npm:2.2.6" - dependencies: - node-fetch: ^2.6.7 - whatwg-fetch: ^2.0.4 - checksum: df9c6728b314ff96022dca468a3d2a05b4546cd318d82a7e1f1445e7160472d39029bccbe5f20d319b8ba3793930592b0b956244aef6a87a133fbcfed85fc8ca - languageName: node - linkType: hard - "cross-spawn@npm:^5.1.0": version: 5.1.0 resolution: "cross-spawn@npm:5.1.0" @@ -5127,19 +4385,6 @@ __metadata: languageName: node linkType: hard -"cross-spawn@npm:^6.0.5": - version: 6.0.5 - resolution: "cross-spawn@npm:6.0.5" - dependencies: - nice-try: ^1.0.4 - path-key: ^2.0.1 - semver: ^5.5.0 - shebang-command: ^1.2.0 - which: ^1.2.9 - checksum: f893bb0d96cd3d5751d04e67145bdddf25f99449531a72e82dcbbd42796bbc8268c1076c6b3ea51d4d455839902804b94bc45dfb37ecbb32ea8e54a6741c3ab9 - languageName: node - linkType: hard - "cross-spawn@npm:^7.0.2": version: 7.0.3 resolution: "cross-spawn@npm:7.0.3" @@ -5236,7 +4481,7 @@ __metadata: languageName: node linkType: hard -"debug@npm:2.6.9, debug@npm:^2.2.0, debug@npm:^2.3.3, debug@npm:^2.6.0, debug@npm:^2.6.8, debug@npm:^2.6.9": +"debug@npm:2.6.9, debug@npm:^2.2.0, debug@npm:^2.6.0, debug@npm:^2.6.9": version: 2.6.9 resolution: "debug@npm:2.6.9" dependencies: @@ -5254,7 +4499,7 @@ __metadata: languageName: node linkType: hard -"debug@npm:4, debug@npm:^4.1.0, debug@npm:^4.1.1, debug@npm:^4.3.1, debug@npm:^4.3.2, debug@npm:^4.3.3, debug@npm:^4.3.4": +"debug@npm:4, debug@npm:4.3.4, debug@npm:^4.1.0, debug@npm:^4.1.1, debug@npm:^4.3.1, debug@npm:^4.3.2, debug@npm:^4.3.3, debug@npm:^4.3.4": version: 4.3.4 resolution: "debug@npm:4.3.4" dependencies: @@ -5266,18 +4511,6 @@ __metadata: languageName: node linkType: hard -"debug@npm:4.3.3": - version: 4.3.3 - resolution: "debug@npm:4.3.3" - dependencies: - ms: 2.1.2 - peerDependenciesMeta: - supports-color: - optional: true - checksum: 14472d56fe4a94dbcfaa6dbed2dd3849f1d72ba78104a1a328047bb564643ca49df0224c3a17fa63533fd11dd3d4c8636cd861191232a2c6735af00cc2d4de16 - languageName: node - linkType: hard - "debug@npm:^3.1.0, debug@npm:^3.2.7": version: 3.2.7 resolution: "debug@npm:3.2.7" @@ -5297,7 +4530,7 @@ __metadata: languageName: node linkType: hard -"decamelize@npm:^1.1.0, decamelize@npm:^1.1.1, decamelize@npm:^1.2.0": +"decamelize@npm:^1.1.0, decamelize@npm:^1.2.0": version: 1.2.0 resolution: "decamelize@npm:1.2.0" checksum: ad8c51a7e7e0720c70ec2eeb1163b66da03e7616d7b98c9ef43cce2416395e84c1e9548dd94f5f6ffecfee9f8b94251fc57121a8b021f2ff2469b2bae247b8aa @@ -5336,20 +4569,6 @@ __metadata: languageName: node linkType: hard -"deep-equal@npm:~1.1.1": - version: 1.1.1 - resolution: "deep-equal@npm:1.1.1" - dependencies: - is-arguments: ^1.0.4 - is-date-object: ^1.0.1 - is-regex: ^1.0.4 - object-is: ^1.0.1 - object-keys: ^1.1.1 - regexp.prototype.flags: ^1.2.0 - checksum: f92686f2c5bcdf714a75a5fa7a9e47cb374a8ec9307e717b8d1ce61f56a75aaebf5619c2a12b8087a705b5a2f60d0292c35f8b58cb1f72e3268a3a15cab9f78d - languageName: node - linkType: hard - "deep-extend@npm:~0.6.0": version: 0.6.0 resolution: "deep-extend@npm:0.6.0" @@ -5380,25 +4599,6 @@ __metadata: languageName: node linkType: hard -"deferred-leveldown@npm:~1.2.1": - version: 1.2.2 - resolution: "deferred-leveldown@npm:1.2.2" - dependencies: - abstract-leveldown: ~2.6.0 - checksum: ad3a26d20dc80c702c85c4795cbb52ef25d8e500728c98098b468c499ca745051e6cc03bd12be97ff38c43466a7895879db76ffb761a75b0f009829d990a0ea9 - languageName: node - linkType: hard - -"deferred-leveldown@npm:~4.0.0": - version: 4.0.2 - resolution: "deferred-leveldown@npm:4.0.2" - dependencies: - abstract-leveldown: ~5.0.0 - inherits: ^2.0.3 - checksum: 6b3649bbb7a2617e08eecdddb516d0bde215bd376a37089df203ad78627f59c424c785afbcbfd3e53488d4f9e5d27d9d126d5645b7da53e8760cc34df2d2f13e - languageName: node - linkType: hard - "deferred-leveldown@npm:~5.3.0": version: 5.3.0 resolution: "deferred-leveldown@npm:5.3.0" @@ -5413,53 +4613,18 @@ __metadata: version: 1.1.3 resolution: "define-properties@npm:1.1.3" dependencies: - object-keys: ^1.0.12 - checksum: da80dba55d0cd76a5a7ab71ef6ea0ebcb7b941f803793e4e0257b384cb772038faa0c31659d244e82c4342edef841c1a1212580006a05a5068ee48223d787317 - languageName: node - linkType: hard - -"define-properties@npm:^1.1.4": - version: 1.1.4 - resolution: "define-properties@npm:1.1.4" - dependencies: - has-property-descriptors: ^1.0.0 - object-keys: ^1.1.1 - checksum: ce0aef3f9eb193562b5cfb79b2d2c86b6a109dfc9fdcb5f45d680631a1a908c06824ddcdb72b7573b54e26ace07f0a23420aaba0d5c627b34d2c1de8ef527e2b - languageName: node - linkType: hard - -"define-property@npm:^0.2.5": - version: 0.2.5 - resolution: "define-property@npm:0.2.5" - dependencies: - is-descriptor: ^0.1.0 - checksum: 85af107072b04973b13f9e4128ab74ddfda48ec7ad2e54b193c0ffb57067c4ce5b7786a7b4ae1f24bd03e87c5d18766b094571810b314d7540f86d4354dbd394 - languageName: node - linkType: hard - -"define-property@npm:^1.0.0": - version: 1.0.0 - resolution: "define-property@npm:1.0.0" - dependencies: - is-descriptor: ^1.0.0 - checksum: 5fbed11dace44dd22914035ba9ae83ad06008532ca814d7936a53a09e897838acdad5b108dd0688cc8d2a7cf0681acbe00ee4136cf36743f680d10517379350a - languageName: node - linkType: hard - -"define-property@npm:^2.0.2": - version: 2.0.2 - resolution: "define-property@npm:2.0.2" - dependencies: - is-descriptor: ^1.0.2 - isobject: ^3.0.1 - checksum: 3217ed53fc9eed06ba8da6f4d33e28c68a82e2f2a8ab4d562c4920d8169a166fe7271453675e6c69301466f36a65d7f47edf0cf7f474b9aa52a5ead9c1b13c99 + object-keys: ^1.0.12 + checksum: da80dba55d0cd76a5a7ab71ef6ea0ebcb7b941f803793e4e0257b384cb772038faa0c31659d244e82c4342edef841c1a1212580006a05a5068ee48223d787317 languageName: node linkType: hard -"defined@npm:~1.0.0": - version: 1.0.0 - resolution: "defined@npm:1.0.0" - checksum: 77672997c5001773371c4dbcce98da0b3dc43089d6da2ad87c4b800adb727633cea8723ea3889fe0c2112a2404e2fd07e3bfd0e55f7426aa6441d8992045dbd5 +"define-properties@npm:^1.1.4": + version: 1.1.4 + resolution: "define-properties@npm:1.1.4" + dependencies: + has-property-descriptors: ^1.0.0 + object-keys: ^1.1.1 + checksum: ce0aef3f9eb193562b5cfb79b2d2c86b6a109dfc9fdcb5f45d680631a1a908c06824ddcdb72b7573b54e26ace07f0a23420aaba0d5c627b34d2c1de8ef527e2b languageName: node linkType: hard @@ -5529,15 +4694,6 @@ __metadata: languageName: node linkType: hard -"detect-indent@npm:^4.0.0": - version: 4.0.0 - resolution: "detect-indent@npm:4.0.0" - dependencies: - repeating: ^2.0.0 - checksum: 328f273915c1610899bc7d4784ce874413d0a698346364cd3ee5d79afba1c5cf4dbc97b85a801e20f4d903c0598bd5096af32b800dfb8696b81464ccb3dfda2c - languageName: node - linkType: hard - "detect-indent@npm:^6.0.0": version: 6.1.0 resolution: "detect-indent@npm:6.1.0" @@ -5631,17 +4787,6 @@ __metadata: languageName: node linkType: hard -"dotignore@npm:~0.1.2": - version: 0.1.2 - resolution: "dotignore@npm:0.1.2" - dependencies: - minimatch: ^3.0.4 - bin: - ignored: bin/ignored - checksum: 06bab15e2a2400c6f823a0edbcd73661180f6245a4041a3fe3b9fde4b22ae74b896604df4520a877093f05c656bd080087376c9f605bccdea847664c59910f37 - languageName: node - linkType: hard - "drbg.js@npm:^1.0.1": version: 1.0.1 resolution: "drbg.js@npm:1.0.1" @@ -5677,13 +4822,6 @@ __metadata: languageName: node linkType: hard -"electron-to-chromium@npm:^1.3.47": - version: 1.4.106 - resolution: "electron-to-chromium@npm:1.4.106" - checksum: 79eae050a775f6f674a24d4541d54cdb1c35e956d6e112ee9ec8d752fa9bcd94739e5f86c58d8e04f85199cf720146aee301b2e397932ad5c8d8e8cffe65a2ee - languageName: node - linkType: hard - "elliptic@npm:6.5.4, elliptic@npm:^6.4.0, elliptic@npm:^6.5.2, elliptic@npm:^6.5.3, elliptic@npm:^6.5.4": version: 6.5.4 resolution: "elliptic@npm:6.5.4" @@ -5699,6 +4837,13 @@ __metadata: languageName: node linkType: hard +"emittery@npm:0.10.0": + version: 0.10.0 + resolution: "emittery@npm:0.10.0" + checksum: 2616a802df51e3f412b9b33f1b43161f7bc96037142cada6ecdbf35ddef1368e30d4f8e47fddc10b0753ccf91d3483b20ebca535b4b1e47526440e13150e2bc7 + languageName: node + linkType: hard + "emoji-regex@npm:^7.0.1": version: 7.0.3 resolution: "emoji-regex@npm:7.0.3" @@ -5720,19 +4865,6 @@ __metadata: languageName: node linkType: hard -"encoding-down@npm:5.0.4, encoding-down@npm:~5.0.0": - version: 5.0.4 - resolution: "encoding-down@npm:5.0.4" - dependencies: - abstract-leveldown: ^5.0.0 - inherits: ^2.0.3 - level-codec: ^9.0.0 - level-errors: ^2.0.0 - xtend: ^4.0.1 - checksum: b8d9d4b058622c11e33d8ec0fb6432194925e109ed8e44e93555406496e8b77b294c8c338dd5ed9ab8d7bc50250a48bb93f9af62ecee3ce8d82f4ef78b2ca880 - languageName: node - linkType: hard - "encoding-down@npm:^6.3.0": version: 6.3.0 resolution: "encoding-down@npm:6.3.0" @@ -5745,7 +4877,7 @@ __metadata: languageName: node linkType: hard -"encoding@npm:^0.1.11, encoding@npm:^0.1.13": +"encoding@npm:^0.1.13": version: 0.1.13 resolution: "encoding@npm:0.1.13" dependencies: @@ -5797,7 +4929,7 @@ __metadata: languageName: node linkType: hard -"error-ex@npm:^1.2.0, error-ex@npm:^1.3.1": +"error-ex@npm:^1.3.1": version: 1.3.2 resolution: "error-ex@npm:1.3.2" dependencies: @@ -6145,7 +5277,7 @@ __metadata: languageName: node linkType: hard -"escape-string-regexp@npm:1.0.5, escape-string-regexp@npm:^1.0.2, escape-string-regexp@npm:^1.0.5": +"escape-string-regexp@npm:1.0.5, escape-string-regexp@npm:^1.0.5": version: 1.0.5 resolution: "escape-string-regexp@npm:1.0.5" checksum: 6092fda75c63b110c706b6a9bfde8a612ad595b628f0bd2147eea1d3406723020810e591effc7db1da91d80a71a737a313567c5abb3813e8d9c71f4aa595b410 @@ -6549,22 +5681,7 @@ __metadata: languageName: node linkType: hard -"eth-block-tracker@npm:^3.0.0": - version: 3.0.1 - resolution: "eth-block-tracker@npm:3.0.1" - dependencies: - eth-query: ^2.1.0 - ethereumjs-tx: ^1.3.3 - ethereumjs-util: ^5.1.3 - ethjs-util: ^0.1.3 - json-rpc-engine: ^3.6.0 - pify: ^2.3.0 - tape: ^4.6.3 - checksum: b68dda7a60e2c15fa7097f31277ebfce08852de83229c2c65879a5482db28610bc85248cfe6578971ad2357552d5ce6124fb0c2a29d18fd30c70f092beeda3b8 - languageName: node - linkType: hard - -"eth-ens-namehash@npm:2.0.8, eth-ens-namehash@npm:^2.0.8": +"eth-ens-namehash@npm:2.0.8": version: 2.0.8 resolution: "eth-ens-namehash@npm:2.0.8" dependencies: @@ -6602,39 +5719,6 @@ __metadata: languageName: node linkType: hard -"eth-json-rpc-infura@npm:^3.1.0": - version: 3.2.1 - resolution: "eth-json-rpc-infura@npm:3.2.1" - dependencies: - cross-fetch: ^2.1.1 - eth-json-rpc-middleware: ^1.5.0 - json-rpc-engine: ^3.4.0 - json-rpc-error: ^2.0.0 - checksum: 393e825986c0eedb9a1bb771b84e5b7c4037d8f870ab92cdba9dbaa52b5c7d5755ed02fd80d2a07b5db7a3af2c0b30d37756eb39cd7d2ae39173c6c2ea138e7d - languageName: node - linkType: hard - -"eth-json-rpc-middleware@npm:^1.5.0": - version: 1.6.0 - resolution: "eth-json-rpc-middleware@npm:1.6.0" - dependencies: - async: ^2.5.0 - eth-query: ^2.1.2 - eth-tx-summary: ^3.1.2 - ethereumjs-block: ^1.6.0 - ethereumjs-tx: ^1.3.3 - ethereumjs-util: ^5.1.2 - ethereumjs-vm: ^2.1.0 - fetch-ponyfill: ^4.0.0 - json-rpc-engine: ^3.6.0 - json-rpc-error: ^2.0.0 - json-stable-stringify: ^1.0.1 - promise-to-callback: ^1.0.0 - tape: ^4.6.3 - checksum: 0f6c146bdb277b3be9eef68f7424e1709a57f58330a3ae076153313be60f5026a5eee0de16d1ee6e41515e76cb1d38ef590948dd55d4b3ab1b3659af61337922 - languageName: node - linkType: hard - "eth-lib@npm:0.2.8": version: 0.2.8 resolution: "eth-lib@npm:0.2.8" @@ -6660,70 +5744,6 @@ __metadata: languageName: node linkType: hard -"eth-query@npm:^2.0.2, eth-query@npm:^2.1.0, eth-query@npm:^2.1.2": - version: 2.1.2 - resolution: "eth-query@npm:2.1.2" - dependencies: - json-rpc-random-id: ^1.0.0 - xtend: ^4.0.1 - checksum: 83daa0e28452c54722aec78cd24d036bad5b6e7c08035d98e10d4bea11f71662f12cab63ebd8a848d4df46ad316503d54ecccb41c9244d2ea8b29364b0a20201 - languageName: node - linkType: hard - -"eth-sig-util@npm:3.0.0": - version: 3.0.0 - resolution: "eth-sig-util@npm:3.0.0" - dependencies: - buffer: ^5.2.1 - elliptic: ^6.4.0 - ethereumjs-abi: 0.6.5 - ethereumjs-util: ^5.1.1 - tweetnacl: ^1.0.0 - tweetnacl-util: ^0.15.0 - checksum: fbe44efb7909737b070e1e1d8c7096da3bdbd1356de242fc3458849e042e39c83a4e2dd1cbce0dc21ff3e5eca1843981751428bc160dcf3a6fcca2f1e8161be4 - languageName: node - linkType: hard - -"eth-sig-util@npm:^1.4.2": - version: 1.4.2 - resolution: "eth-sig-util@npm:1.4.2" - dependencies: - ethereumjs-abi: "git+https://github.com/ethereumjs/ethereumjs-abi.git" - ethereumjs-util: ^5.1.1 - checksum: 578f5c571c1bb0a86dc1bd4a5b56b8073b37823496d7afa74d772cf91ae6860f91bafcbee931be39a3d13f0c195df9f026a27fce350605ad5d15901a5a4ea94a - languageName: node - linkType: hard - -"eth-tx-summary@npm:^3.1.2": - version: 3.2.4 - resolution: "eth-tx-summary@npm:3.2.4" - dependencies: - async: ^2.1.2 - clone: ^2.0.0 - concat-stream: ^1.5.1 - end-of-stream: ^1.1.0 - eth-query: ^2.0.2 - ethereumjs-block: ^1.4.1 - ethereumjs-tx: ^1.1.1 - ethereumjs-util: ^5.0.1 - ethereumjs-vm: ^2.6.0 - through2: ^2.0.3 - checksum: 7df8b91bc2bd3f6941e2a5b3230cad5c5523ca3750190cd06af07983feba1bb4af893f226f01072958b00aa626869846894bcb1bfaa451d9c8f7f5b8cdf5ce0a - languageName: node - linkType: hard - -"ethashjs@npm:~0.0.7": - version: 0.0.8 - resolution: "ethashjs@npm:0.0.8" - dependencies: - async: ^2.1.2 - buffer-xor: ^2.0.1 - ethereumjs-util: ^7.0.2 - miller-rabin: ^4.0.0 - checksum: d9b6b47d32cbe017848ce5d8aec86eb6416300c6f52a68029bf6fc8fcf5429a45c14f2033d514435acd02047af16f6f804056e81587b30ed677039ac678b15f8 - languageName: node - linkType: hard - "ethereum-bloom-filters@npm:^1.0.6": version: 1.0.10 resolution: "ethereum-bloom-filters@npm:1.0.10" @@ -6733,21 +5753,7 @@ __metadata: languageName: node linkType: hard -"ethereum-common@npm:0.2.0": - version: 0.2.0 - resolution: "ethereum-common@npm:0.2.0" - checksum: 5e80af27482530ac700676502cd4c02a7248c064999d01dced302f5f40a180c86f57caaab347dbd12482c2869539d321c8c0039db9e3dfb1411e6ad3d57b2547 - languageName: node - linkType: hard - -"ethereum-common@npm:^0.0.18": - version: 0.0.18 - resolution: "ethereum-common@npm:0.0.18" - checksum: 2244126199604abc17508ca249c6f8a66a2ed02e9c97115f234e311f42e2d67aedff08128569fa3dfb8a2d09e1c194eace39a1ce61bfeb2338b6d3f2ac324ee8 - languageName: node - linkType: hard - -"ethereum-cryptography@npm:^0.1.2, ethereum-cryptography@npm:^0.1.3": +"ethereum-cryptography@npm:0.1.3, ethereum-cryptography@npm:^0.1.3": version: 0.1.3 resolution: "ethereum-cryptography@npm:0.1.3" dependencies: @@ -6782,38 +5788,21 @@ __metadata: languageName: node linkType: hard -"ethereum-waffle@npm:^3.4.4": - version: 3.4.4 - resolution: "ethereum-waffle@npm:3.4.4" +"ethereum-waffle@npm:^4.0.9": + version: 4.0.9 + resolution: "ethereum-waffle@npm:4.0.9" dependencies: - "@ethereum-waffle/chai": ^3.4.4 - "@ethereum-waffle/compiler": ^3.4.4 - "@ethereum-waffle/mock-contract": ^3.4.4 - "@ethereum-waffle/provider": ^3.4.4 - ethers: ^5.0.1 + "@ethereum-waffle/chai": 4.0.9 + "@ethereum-waffle/compiler": 4.0.3 + "@ethereum-waffle/mock-contract": 4.0.3 + "@ethereum-waffle/provider": 4.0.5 + solc: 0.8.15 + typechain: ^8.0.0 + peerDependencies: + ethers: "*" bin: waffle: bin/waffle - checksum: 5a181b52f66f1b3c89ed1b68ef44cbd9acd4d743262de9edbe1fd57b0925576dd62c3436b1e65434d5ac03ab16da0df283972cd9aae726de0b8b9cdd7876b917 - languageName: node - linkType: hard - -"ethereumjs-abi@git+https://github.com/ethereumjs/ethereumjs-abi.git": - version: 0.6.8 - resolution: "ethereumjs-abi@https://github.com/ethereumjs/ethereumjs-abi.git#commit=ee3994657fa7a427238e6ba92a84d0b529bbcde0" - dependencies: - bn.js: ^4.11.8 - ethereumjs-util: ^6.0.0 - checksum: ae074be0bb012857ab5d3ae644d1163b908a48dd724b7d2567cfde309dc72222d460438f2411936a70dc949dc604ce1ef7118f7273bd525815579143c907e336 - languageName: node - linkType: hard - -"ethereumjs-abi@npm:0.6.5": - version: 0.6.5 - resolution: "ethereumjs-abi@npm:0.6.5" - dependencies: - bn.js: ^4.10.0 - ethereumjs-util: ^4.3.0 - checksum: 3abdc79dc60614d30b1cefb5e6bfbdab3ca8252b4e742330544103f86d6e49a55921d9b8822a0a47fee3efd9dd2493ec93448b1869d82479a4c71a44001e8337 + checksum: a61a03f444eea75c4f1d1d9a98a7d0059b498da96c52639e1445c591a8fc67e48b07166d6f7523160c19485c6b03350521119c47648c6b46b8368ac75c24450b languageName: node linkType: hard @@ -6827,107 +5816,20 @@ __metadata: languageName: node linkType: hard -"ethereumjs-account@npm:3.0.0, ethereumjs-account@npm:^3.0.0": - version: 3.0.0 - resolution: "ethereumjs-account@npm:3.0.0" - dependencies: - ethereumjs-util: ^6.0.0 - rlp: ^2.2.1 - safe-buffer: ^5.1.1 - checksum: 64dbe026d29aca12c79596cf4085fb27e209988f11b7d5bf3a1f2aadaaa517d90d722680c8b525144c26a2d9cd8494aa26ac088fa80b358cc3e28024f7ddbe81 - languageName: node - linkType: hard - -"ethereumjs-account@npm:^2.0.3": - version: 2.0.5 - resolution: "ethereumjs-account@npm:2.0.5" - dependencies: - ethereumjs-util: ^5.0.0 - rlp: ^2.0.0 - safe-buffer: ^5.1.1 - checksum: 2e4546b8b0213168eebd3a5296da904b6f55470e39b4c742d252748927d2b268f8d6374b0178c1d5b7188646f97dae74a7ac1c7485fe96ea557c152b52223f18 - languageName: node - linkType: hard - -"ethereumjs-block@npm:2.2.2, ethereumjs-block@npm:^2.2.2, ethereumjs-block@npm:~2.2.0, ethereumjs-block@npm:~2.2.2": - version: 2.2.2 - resolution: "ethereumjs-block@npm:2.2.2" - dependencies: - async: ^2.0.1 - ethereumjs-common: ^1.5.0 - ethereumjs-tx: ^2.1.1 - ethereumjs-util: ^5.0.0 - merkle-patricia-tree: ^2.1.2 - checksum: 91f7f60820394e072c9a115da2871a096414644109d2449d4a79b30be67b0080bc848dfa7e2ae7b2ab255de3be4f6736c6cb2b418c29eada794d018cc384e189 - languageName: node - linkType: hard - -"ethereumjs-block@npm:^1.2.2, ethereumjs-block@npm:^1.4.1, ethereumjs-block@npm:^1.6.0": - version: 1.7.1 - resolution: "ethereumjs-block@npm:1.7.1" - dependencies: - async: ^2.0.1 - ethereum-common: 0.2.0 - ethereumjs-tx: ^1.2.2 - ethereumjs-util: ^5.0.0 - merkle-patricia-tree: ^2.1.2 - checksum: 9967c3674af77ea8475a3c023fa160ef6b614450ec50fa32ac083909ead22d3d1c3148f9407b6593d3ccfbe0c51f889c26aa1c15b17026fc2d35cbc542822af8 - languageName: node - linkType: hard - -"ethereumjs-blockchain@npm:^4.0.3": - version: 4.0.4 - resolution: "ethereumjs-blockchain@npm:4.0.4" - dependencies: - async: ^2.6.1 - ethashjs: ~0.0.7 - ethereumjs-block: ~2.2.2 - ethereumjs-common: ^1.5.0 - ethereumjs-util: ^6.1.0 - flow-stoplight: ^1.0.0 - level-mem: ^3.0.1 - lru-cache: ^5.1.1 - rlp: ^2.2.2 - semaphore: ^1.1.0 - checksum: efa04b2e2d02ce9c524f246f862b1ca779bbfd9f795cc7a9e471f0d96229de5188f1f6b17e54948f640100116b646ed03242494c23cd66f0f7e8384a4f217ba4 - languageName: node - linkType: hard - -"ethereumjs-common@npm:1.5.0": - version: 1.5.0 - resolution: "ethereumjs-common@npm:1.5.0" - checksum: a30474986a88b8f3ee53f9fb34027528f12d1bc7ecee8b80aa8060a09ccde3b2af4dd24c928287018003e4e206cd4f6311cdd508442d1452d02ec3d8e7a0601e - languageName: node - linkType: hard - -"ethereumjs-common@npm:^1.1.0, ethereumjs-common@npm:^1.3.2, ethereumjs-common@npm:^1.5.0": - version: 1.5.2 - resolution: "ethereumjs-common@npm:1.5.2" - checksum: 3fc64faced268e0c61da50c5db76d18cfd44325d5706792f32ac8c85c0e800d52db284f042c3bd0623daf59b946176ef7dbea476d1b0252492137fa4549a3349 - languageName: node - linkType: hard - -"ethereumjs-tx@npm:2.1.2, ethereumjs-tx@npm:^2.1.1, ethereumjs-tx@npm:^2.1.2": - version: 2.1.2 - resolution: "ethereumjs-tx@npm:2.1.2" - dependencies: - ethereumjs-common: ^1.5.0 - ethereumjs-util: ^6.0.0 - checksum: a5b607b4e125ed696d76a9e4db8a95e03a967323c66694912d799619b16fa43985336924221f9e7582dc1b09ff88a62116bf2290ee14d952bf7e6715e5728525 - languageName: node - linkType: hard - -"ethereumjs-tx@npm:^1.1.1, ethereumjs-tx@npm:^1.2.0, ethereumjs-tx@npm:^1.2.2, ethereumjs-tx@npm:^1.3.3": - version: 1.3.7 - resolution: "ethereumjs-tx@npm:1.3.7" +"ethereumjs-util@npm:7.1.3": + version: 7.1.3 + resolution: "ethereumjs-util@npm:7.1.3" dependencies: - ethereum-common: ^0.0.18 - ethereumjs-util: ^5.0.0 - checksum: fe2323fe7db7f5dda85715dc67c31dd1f2925bf5a88e393ba939dbe699b73df008f1332f711b1aa37e943193acf3b6976202a33f2fab1f7675b6d2dd70f424d4 + "@types/bn.js": ^5.1.0 + bn.js: ^5.1.2 + create-hash: ^1.1.2 + ethereum-cryptography: ^0.1.3 + rlp: ^2.2.4 + checksum: 6de7a32af05c7265c96163ecd15ad97327afab9deb36092ef26250616657a8c0b5df8e698328247c8193e7b87c643c967f64f0b3cff2b2937cafa870ff5fcb41 languageName: node linkType: hard -"ethereumjs-util@npm:6.2.1, ethereumjs-util@npm:^6.0.0, ethereumjs-util@npm:^6.1.0, ethereumjs-util@npm:^6.2.0, ethereumjs-util@npm:^6.2.1": +"ethereumjs-util@npm:^6.0.0, ethereumjs-util@npm:^6.2.1": version: 6.2.1 resolution: "ethereumjs-util@npm:6.2.1" dependencies: @@ -6942,35 +5844,7 @@ __metadata: languageName: node linkType: hard -"ethereumjs-util@npm:^4.3.0": - version: 4.5.1 - resolution: "ethereumjs-util@npm:4.5.1" - dependencies: - bn.js: ^4.8.0 - create-hash: ^1.1.2 - elliptic: ^6.5.2 - ethereum-cryptography: ^0.1.3 - rlp: ^2.0.0 - checksum: ee91fbd29634d40cad9adf90f202158324c089bbc10b405d2ef139f4542090e6f76a616d16c601b52d6b5c5d59ddb6c8387cf60cc732884e732dad9a62b8a539 - languageName: node - linkType: hard - -"ethereumjs-util@npm:^5.0.0, ethereumjs-util@npm:^5.0.1, ethereumjs-util@npm:^5.1.1, ethereumjs-util@npm:^5.1.2, ethereumjs-util@npm:^5.1.3, ethereumjs-util@npm:^5.1.5, ethereumjs-util@npm:^5.2.0": - version: 5.2.1 - resolution: "ethereumjs-util@npm:5.2.1" - dependencies: - bn.js: ^4.11.0 - create-hash: ^1.1.2 - elliptic: ^6.5.2 - ethereum-cryptography: ^0.1.3 - ethjs-util: ^0.1.3 - rlp: ^2.0.0 - safe-buffer: ^5.1.1 - checksum: 20db6c639d92b35739fd5f7a71e64a92e85442ea0d176b59b5cd5828265b6cf42bd4868cf81a9b20a83738db1ffa7a2f778f1d850d663627a1a5209f7904b44f - languageName: node - linkType: hard - -"ethereumjs-util@npm:^7.0.10, ethereumjs-util@npm:^7.0.2, ethereumjs-util@npm:^7.1.0, ethereumjs-util@npm:^7.1.1, ethereumjs-util@npm:^7.1.4": +"ethereumjs-util@npm:^7.0.10, ethereumjs-util@npm:^7.1.0, ethereumjs-util@npm:^7.1.1, ethereumjs-util@npm:^7.1.4": version: 7.1.4 resolution: "ethereumjs-util@npm:7.1.4" dependencies: @@ -6983,7 +5857,7 @@ __metadata: languageName: node linkType: hard -"ethereumjs-util@npm:^7.1.5": +"ethereumjs-util@npm:^7.1.3, ethereumjs-util@npm:^7.1.5": version: 7.1.5 resolution: "ethereumjs-util@npm:7.1.5" dependencies: @@ -7011,65 +5885,6 @@ __metadata: languageName: node linkType: hard -"ethereumjs-vm@npm:4.2.0": - version: 4.2.0 - resolution: "ethereumjs-vm@npm:4.2.0" - dependencies: - async: ^2.1.2 - async-eventemitter: ^0.2.2 - core-js-pure: ^3.0.1 - ethereumjs-account: ^3.0.0 - ethereumjs-block: ^2.2.2 - ethereumjs-blockchain: ^4.0.3 - ethereumjs-common: ^1.5.0 - ethereumjs-tx: ^2.1.2 - ethereumjs-util: ^6.2.0 - fake-merkle-patricia-tree: ^1.0.1 - functional-red-black-tree: ^1.0.1 - merkle-patricia-tree: ^2.3.2 - rustbn.js: ~0.2.0 - safe-buffer: ^5.1.1 - util.promisify: ^1.0.0 - checksum: ca73c406d55baefacafbdd8cefce80740098e5834096042e93285dc386ee670b4fed2f7846b78e3078fdf41231d04b3f1c40e435e639d072e0529ccb560b797b - languageName: node - linkType: hard - -"ethereumjs-vm@npm:^2.1.0, ethereumjs-vm@npm:^2.3.4, ethereumjs-vm@npm:^2.6.0": - version: 2.6.0 - resolution: "ethereumjs-vm@npm:2.6.0" - dependencies: - async: ^2.1.2 - async-eventemitter: ^0.2.2 - ethereumjs-account: ^2.0.3 - ethereumjs-block: ~2.2.0 - ethereumjs-common: ^1.1.0 - ethereumjs-util: ^6.0.0 - fake-merkle-patricia-tree: ^1.0.1 - functional-red-black-tree: ^1.0.1 - merkle-patricia-tree: ^2.3.2 - rustbn.js: ~0.2.0 - safe-buffer: ^5.1.1 - checksum: 3b3098b2ac3d5335797e4d73fceb76d1b776e453abb5fa4d1cd94f6391f493e95e3c89a8ee602558bc2a3b36b89977e66473de73faa87c8540b1954aa7b8c3fd - languageName: node - linkType: hard - -"ethereumjs-wallet@npm:0.6.5": - version: 0.6.5 - resolution: "ethereumjs-wallet@npm:0.6.5" - dependencies: - aes-js: ^3.1.1 - bs58check: ^2.1.2 - ethereum-cryptography: ^0.1.3 - ethereumjs-util: ^6.0.0 - randombytes: ^2.0.6 - safe-buffer: ^5.1.2 - scryptsy: ^1.2.1 - utf8: ^3.0.0 - uuid: ^3.3.2 - checksum: 54a9cc8beb8ea55e9be9b024b6ed09349423145fd8c49b8662d60d9258039330163c830fec055f92becc71ea54b430d2ef29f6bd73fa49d93ea854af01d13e58 - languageName: node - linkType: hard - "ethers@npm:5.6.8": version: 5.6.8 resolution: "ethers@npm:5.6.8" @@ -7125,44 +5940,6 @@ __metadata: languageName: node linkType: hard -"ethers@npm:^5.0.1, ethers@npm:^5.0.2, ethers@npm:^5.5.2": - version: 5.6.2 - resolution: "ethers@npm:5.6.2" - dependencies: - "@ethersproject/abi": 5.6.0 - "@ethersproject/abstract-provider": 5.6.0 - "@ethersproject/abstract-signer": 5.6.0 - "@ethersproject/address": 5.6.0 - "@ethersproject/base64": 5.6.0 - "@ethersproject/basex": 5.6.0 - "@ethersproject/bignumber": 5.6.0 - "@ethersproject/bytes": 5.6.1 - "@ethersproject/constants": 5.6.0 - "@ethersproject/contracts": 5.6.0 - "@ethersproject/hash": 5.6.0 - "@ethersproject/hdnode": 5.6.0 - "@ethersproject/json-wallets": 5.6.0 - "@ethersproject/keccak256": 5.6.0 - "@ethersproject/logger": 5.6.0 - "@ethersproject/networks": 5.6.1 - "@ethersproject/pbkdf2": 5.6.0 - "@ethersproject/properties": 5.6.0 - "@ethersproject/providers": 5.6.2 - "@ethersproject/random": 5.6.0 - "@ethersproject/rlp": 5.6.0 - "@ethersproject/sha2": 5.6.0 - "@ethersproject/signing-key": 5.6.0 - "@ethersproject/solidity": 5.6.0 - "@ethersproject/strings": 5.6.0 - "@ethersproject/transactions": 5.6.0 - "@ethersproject/units": 5.6.0 - "@ethersproject/wallet": 5.6.0 - "@ethersproject/web": 5.6.0 - "@ethersproject/wordlists": 5.6.0 - checksum: 47458ba83140bff55e884ae4e7f1558b0bb3a4d90b98c002d60387cfc1fe7c5cac7a6903930880e6d7e791ebdc5409a16c634e77bcb0cc56d85ccd6b5441c7ad - languageName: node - linkType: hard - "ethjs-unit@npm:0.1.6": version: 0.1.6 resolution: "ethjs-unit@npm:0.1.6" @@ -7197,13 +5974,6 @@ __metadata: languageName: node linkType: hard -"events@npm:^3.0.0": - version: 3.3.0 - resolution: "events@npm:3.3.0" - checksum: f6f487ad2198aa41d878fa31452f1a3c00958f46e9019286ff4787c84aac329332ab45c9cdc8c445928fc6d7ded294b9e005a7fce9426488518017831b272780 - languageName: node - linkType: hard - "evp_bytestokey@npm:^1.0.0, evp_bytestokey@npm:^1.0.3": version: 1.0.3 resolution: "evp_bytestokey@npm:1.0.3" @@ -7215,21 +5985,6 @@ __metadata: languageName: node linkType: hard -"expand-brackets@npm:^2.1.4": - version: 2.1.4 - resolution: "expand-brackets@npm:2.1.4" - dependencies: - debug: ^2.3.3 - define-property: ^0.2.5 - extend-shallow: ^2.0.1 - posix-character-classes: ^0.1.0 - regex-not: ^1.0.0 - snapdragon: ^0.8.1 - to-regex: ^3.0.1 - checksum: 1781d422e7edfa20009e2abda673cadb040a6037f0bd30fcd7357304f4f0c284afd420d7622722ca4a016f39b6d091841ab57b401c1f7e2e5131ac65b9f14fa1 - languageName: node - linkType: hard - "express@npm:^4.14.0": version: 4.17.3 resolution: "express@npm:4.17.3" @@ -7277,25 +6032,6 @@ __metadata: languageName: node linkType: hard -"extend-shallow@npm:^2.0.1": - version: 2.0.1 - resolution: "extend-shallow@npm:2.0.1" - dependencies: - is-extendable: ^0.1.0 - checksum: 8fb58d9d7a511f4baf78d383e637bd7d2e80843bd9cd0853649108ea835208fb614da502a553acc30208e1325240bb7cc4a68473021612496bb89725483656d8 - languageName: node - linkType: hard - -"extend-shallow@npm:^3.0.0, extend-shallow@npm:^3.0.2": - version: 3.0.2 - resolution: "extend-shallow@npm:3.0.2" - dependencies: - assign-symbols: ^1.0.0 - is-extendable: ^1.0.1 - checksum: a920b0cd5838a9995ace31dfd11ab5e79bf6e295aa566910ce53dff19f4b1c0fda2ef21f26b28586c7a2450ca2b42d97bd8c0f5cec9351a819222bf861e02461 - languageName: node - linkType: hard - "extend@npm:~3.0.2": version: 3.0.2 resolution: "extend@npm:3.0.2" @@ -7321,22 +6057,6 @@ __metadata: languageName: node linkType: hard -"extglob@npm:^2.0.4": - version: 2.0.4 - resolution: "extglob@npm:2.0.4" - dependencies: - array-unique: ^0.3.2 - define-property: ^1.0.0 - expand-brackets: ^2.1.4 - extend-shallow: ^2.0.1 - fragment-cache: ^0.2.1 - regex-not: ^1.0.0 - snapdragon: ^0.8.1 - to-regex: ^3.0.1 - checksum: a41531b8934735b684cef5e8c5a01d0f298d7d384500ceca38793a9ce098125aab04ee73e2d75d5b2901bc5dddd2b64e1b5e3bf19139ea48bac52af4a92f1d00 - languageName: node - linkType: hard - "extsprintf@npm:1.3.0": version: 1.3.0 resolution: "extsprintf@npm:1.3.0" @@ -7351,15 +6071,6 @@ __metadata: languageName: node linkType: hard -"fake-merkle-patricia-tree@npm:^1.0.1": - version: 1.0.1 - resolution: "fake-merkle-patricia-tree@npm:1.0.1" - dependencies: - checkpoint-store: ^1.1.0 - checksum: 8f9fe05bb5beabb31e4fbb8d2cfe83cfb36fd9f6ba78193dea8fab7a679470d45bb04c6f052d4f79da03e81129c5b5bed528902430184e1e11b4959f397019ac - languageName: node - linkType: hard - "fast-deep-equal@npm:^3.1.1, fast-deep-equal@npm:^3.1.3": version: 3.1.3 resolution: "fast-deep-equal@npm:3.1.3" @@ -7410,15 +6121,6 @@ __metadata: languageName: node linkType: hard -"fetch-ponyfill@npm:^4.0.0": - version: 4.1.0 - resolution: "fetch-ponyfill@npm:4.1.0" - dependencies: - node-fetch: ~1.7.1 - checksum: 00c85b661a8314e18cb314640b69d3b6e9635517d54290c8f366ddcb21b506ac8fa5d92f899c0fe21bc2163238130be2cf73ffd9d5a8a41a9866a55c52f57f16 - languageName: node - linkType: hard - "figures@npm:^3.0.0": version: 3.2.0 resolution: "figures@npm:3.2.0" @@ -7444,18 +6146,6 @@ __metadata: languageName: node linkType: hard -"fill-range@npm:^4.0.0": - version: 4.0.0 - resolution: "fill-range@npm:4.0.0" - dependencies: - extend-shallow: ^2.0.1 - is-number: ^3.0.0 - repeat-string: ^1.6.1 - to-regex-range: ^2.1.0 - checksum: dbb5102467786ab42bc7a3ec7380ae5d6bfd1b5177b2216de89e4a541193f8ba599a6db84651bd2c58c8921db41b8cc3d699ea83b477342d3ce404020f73c298 - languageName: node - linkType: hard - "fill-range@npm:^7.0.1": version: 7.0.1 resolution: "fill-range@npm:7.0.1" @@ -7480,16 +6170,6 @@ __metadata: languageName: node linkType: hard -"find-replace@npm:^1.0.3": - version: 1.0.3 - resolution: "find-replace@npm:1.0.3" - dependencies: - array-back: ^1.0.4 - test-value: ^2.1.0 - checksum: fd95f44e59bd54ea1c0169480952b339a4642cd62d81236fef7f87146d3bc00a042b17d81f896712e8542e01fe5c84e82ac37b6b77b4e3422abbcf7c13bbacfd - languageName: node - linkType: hard - "find-replace@npm:^3.0.0": version: 3.0.0 resolution: "find-replace@npm:3.0.0" @@ -7512,19 +6192,9 @@ __metadata: version: 5.0.0 resolution: "find-up@npm:5.0.0" dependencies: - locate-path: ^6.0.0 - path-exists: ^4.0.0 - checksum: 07955e357348f34660bde7920783204ff5a26ac2cafcaa28bace494027158a97b9f56faaf2d89a6106211a8174db650dd9f503f9c0d526b1202d5554a00b9095 - languageName: node - linkType: hard - -"find-up@npm:^1.0.0": - version: 1.1.2 - resolution: "find-up@npm:1.1.2" - dependencies: - path-exists: ^2.0.0 - pinkie-promise: ^2.0.0 - checksum: a2cb9f4c9f06ee3a1e92ed71d5aed41ac8ae30aefa568132f6c556fac7678a5035126153b59eaec68da78ac409eef02503b2b059706bdbf232668d7245e3240a + locate-path: ^6.0.0 + path-exists: ^4.0.0 + checksum: 07955e357348f34660bde7920783204ff5a26ac2cafcaa28bace494027158a97b9f56faaf2d89a6106211a8174db650dd9f503f9c0d526b1202d5554a00b9095 languageName: node linkType: hard @@ -7557,25 +6227,6 @@ __metadata: languageName: node linkType: hard -"find-yarn-workspace-root@npm:^1.2.1": - version: 1.2.1 - resolution: "find-yarn-workspace-root@npm:1.2.1" - dependencies: - fs-extra: ^4.0.3 - micromatch: ^3.1.4 - checksum: a8f4565fb1ead6122acc0d324fa3257c20f7b0c91b7b266dab9eee7251fb5558fcff5b35dbfd301bfd1cbb91c1cdd1799b28ffa5b9a92efd8c7ded3663652bbe - languageName: node - linkType: hard - -"find-yarn-workspace-root@npm:^2.0.0": - version: 2.0.0 - resolution: "find-yarn-workspace-root@npm:2.0.0" - dependencies: - micromatch: ^4.0.2 - checksum: fa5ca8f9d08fe7a54ce7c0a5931ff9b7e36f9ee7b9475fb13752bcea80ec6b5f180fa5102d60b376d5526ce924ea3fc6b19301262efa0a5d248dd710f3644242 - languageName: node - linkType: hard - "flat-cache@npm:^3.0.4": version: 3.0.4 resolution: "flat-cache@npm:3.0.4" @@ -7613,13 +6264,6 @@ __metadata: languageName: node linkType: hard -"flow-stoplight@npm:^1.0.0": - version: 1.0.0 - resolution: "flow-stoplight@npm:1.0.0" - checksum: 2f1f34629e724afe7de7b6cb7b5f9ef1b37fa5a4b8a10e24b9c1043872777c41f4c7e09994ecfd5bc70138a04966c3153c4e15187a24771f5d5151a325a96a2e - languageName: node - linkType: hard - "follow-redirects@npm:^1.12.1": version: 1.14.9 resolution: "follow-redirects@npm:1.14.9" @@ -7630,22 +6274,6 @@ __metadata: languageName: node linkType: hard -"for-each@npm:^0.3.3, for-each@npm:~0.3.3": - version: 0.3.3 - resolution: "for-each@npm:0.3.3" - dependencies: - is-callable: ^1.1.3 - checksum: 6c48ff2bc63362319c65e2edca4a8e1e3483a2fabc72fbe7feaf8c73db94fc7861bd53bc02c8a66a0c1dd709da6b04eec42e0abdd6b40ce47305ae92a25e5d28 - languageName: node - linkType: hard - -"for-in@npm:^1.0.2": - version: 1.0.2 - resolution: "for-in@npm:1.0.2" - checksum: 09f4ae93ce785d253ac963d94c7f3432d89398bf25ac7a24ed034ca393bf74380bdeccc40e0f2d721a895e54211b07c8fad7132e8157827f6f7f059b70b4043d - languageName: node - linkType: hard - "foreach@npm:^2.0.5": version: 2.0.5 resolution: "foreach@npm:2.0.5" @@ -7714,15 +6342,6 @@ __metadata: languageName: node linkType: hard -"fragment-cache@npm:^0.2.1": - version: 0.2.1 - resolution: "fragment-cache@npm:0.2.1" - dependencies: - map-cache: ^0.2.2 - checksum: 1cbbd0b0116b67d5790175de0038a11df23c1cd2e8dcdbade58ebba5594c2d641dade6b4f126d82a7b4a6ffc2ea12e3d387dbb64ea2ae97cf02847d436f60fdc - languageName: node - linkType: hard - "fresh@npm:0.5.2": version: 0.5.2 resolution: "fresh@npm:0.5.2" @@ -7754,7 +6373,7 @@ __metadata: languageName: node linkType: hard -"fs-extra@npm:^4.0.2, fs-extra@npm:^4.0.3": +"fs-extra@npm:^4.0.2": version: 4.0.3 resolution: "fs-extra@npm:4.0.3" dependencies: @@ -7902,46 +6521,29 @@ __metadata: languageName: node linkType: hard -"ganache-core@npm:^2.13.2": - version: 2.13.2 - resolution: "ganache-core@npm:2.13.2" +"ganache@npm:7.4.3": + version: 7.4.3 + resolution: "ganache@npm:7.4.3" dependencies: - abstract-leveldown: 3.0.0 - async: 2.6.2 - bip39: 2.5.0 - cachedown: 1.0.0 - clone: 2.1.2 - debug: 3.2.6 - encoding-down: 5.0.4 - eth-sig-util: 3.0.0 - ethereumjs-abi: 0.6.8 - ethereumjs-account: 3.0.0 - ethereumjs-block: 2.2.2 - ethereumjs-common: 1.5.0 - ethereumjs-tx: 2.1.2 - ethereumjs-util: 6.2.1 - ethereumjs-vm: 4.2.0 - ethereumjs-wallet: 0.6.5 - heap: 0.2.6 - keccak: 3.0.1 - level-sublevel: 6.6.4 - levelup: 3.1.1 - lodash: 4.17.20 - lru-cache: 5.1.1 - merkle-patricia-tree: 3.0.0 - patch-package: 6.2.2 - seedrandom: 3.0.1 - source-map-support: 0.5.12 - tmp: 0.1.0 - web3: 1.2.11 - web3-provider-engine: 14.2.1 - websocket: 1.0.32 + "@trufflesuite/bigint-buffer": 1.1.10 + "@types/bn.js": ^5.1.0 + "@types/lru-cache": 5.1.1 + "@types/seedrandom": 3.0.1 + bufferutil: 4.0.5 + emittery: 0.10.0 + keccak: 3.0.2 + leveldown: 6.1.0 + secp256k1: 4.0.3 + utf-8-validate: 5.0.7 dependenciesMeta: - ethereumjs-wallet: + bufferutil: optional: true - web3: + utf-8-validate: optional: true - checksum: 799b275abd09259c88a4e78c335e807d14cc12d3a1ceb9d7cdeef484cf5fab541847edf9cf209f448190199dbd0796393d308d50e6823565154c17dd0c3a4048 + bin: + ganache: dist/node/cli.js + ganache-cli: dist/node/cli.js + checksum: 170dde8c2ecd88e7f02a92bf582149e6497a2fdfb05abe9ab63a5b7cf33c061d71390f9719ef3d716dad4149299f8a87c71612ab4b40d1c57c55d7a185314630 languageName: node linkType: hard @@ -7961,13 +6563,6 @@ __metadata: languageName: node linkType: hard -"get-caller-file@npm:^1.0.1": - version: 1.0.3 - resolution: "get-caller-file@npm:1.0.3" - checksum: 2b90a7f848896abcebcdc0acc627a435bcf05b9cd280599bc980ebfcdc222416c3df12c24c4845f69adc4346728e8966f70b758f9369f3534182791dfbc25c05 - languageName: node - linkType: hard - "get-caller-file@npm:^2.0.1, get-caller-file@npm:^2.0.5": version: 2.0.5 resolution: "get-caller-file@npm:2.0.5" @@ -8035,13 +6630,6 @@ __metadata: languageName: node linkType: hard -"get-value@npm:^2.0.3, get-value@npm:^2.0.6": - version: 2.0.6 - resolution: "get-value@npm:2.0.6" - checksum: 5c3b99cb5398ea8016bf46ff17afc5d1d286874d2ad38ca5edb6e87d75c0965b0094cb9a9dddef2c59c23d250702323539a7fbdd870620db38c7e7d7ec87c1eb - languageName: node - linkType: hard - "getpass@npm:^0.1.1": version: 0.1.7 resolution: "getpass@npm:0.1.7" @@ -8109,7 +6697,7 @@ __metadata: languageName: node linkType: hard -"glob@npm:7.2.0, glob@npm:^7.0.0, glob@npm:^7.1.2, glob@npm:^7.1.3, glob@npm:^7.1.4, glob@npm:^7.2.0, glob@npm:~7.2.0": +"glob@npm:7.2.0, glob@npm:^7.0.0, glob@npm:^7.1.3, glob@npm:^7.1.4, glob@npm:^7.2.0": version: 7.2.0 resolution: "glob@npm:7.2.0" dependencies: @@ -8175,13 +6763,6 @@ __metadata: languageName: node linkType: hard -"globals@npm:^9.18.0": - version: 9.18.0 - resolution: "globals@npm:9.18.0" - checksum: e9c066aecfdc5ea6f727344a4246ecc243aaf66ede3bffee10ddc0c73351794c25e727dd046090dcecd821199a63b9de6af299a6e3ba292c8b22f0a80ea32073 - languageName: node - linkType: hard - "globby@npm:^10.0.1": version: 10.0.2 resolution: "globby@npm:10.0.2" @@ -8253,7 +6834,7 @@ __metadata: languageName: node linkType: hard -"graceful-fs@npm:^4.1.11, graceful-fs@npm:^4.1.2, graceful-fs@npm:^4.1.5, graceful-fs@npm:^4.1.6, graceful-fs@npm:^4.1.9, graceful-fs@npm:^4.2.0, graceful-fs@npm:^4.2.6": +"graceful-fs@npm:^4.1.2, graceful-fs@npm:^4.1.5, graceful-fs@npm:^4.1.6, graceful-fs@npm:^4.1.9, graceful-fs@npm:^4.2.0, graceful-fs@npm:^4.2.6": version: 4.2.10 resolution: "graceful-fs@npm:4.2.10" checksum: 3f109d70ae123951905d85032ebeae3c2a5a7a997430df00ea30df0e3a6c60cf6689b109654d6fdacd28810a053348c4d14642da1d075049e6be1ba5216218da @@ -8352,19 +6933,24 @@ __metadata: languageName: node linkType: hard -"hardhat@npm:2.9.7": - version: 2.9.7 - resolution: "hardhat@npm:2.9.7" +"hardhat@npm:2.12.6": + version: 2.12.6 + resolution: "hardhat@npm:2.12.6" dependencies: - "@ethereumjs/block": ^3.6.2 - "@ethereumjs/blockchain": ^5.5.2 - "@ethereumjs/common": ^2.6.4 - "@ethereumjs/tx": ^3.5.1 - "@ethereumjs/vm": ^5.9.0 "@ethersproject/abi": ^5.1.2 "@metamask/eth-sig-util": ^4.0.0 + "@nomicfoundation/ethereumjs-block": ^4.0.0 + "@nomicfoundation/ethereumjs-blockchain": ^6.0.0 + "@nomicfoundation/ethereumjs-common": ^3.0.0 + "@nomicfoundation/ethereumjs-evm": ^1.0.0 + "@nomicfoundation/ethereumjs-rlp": ^4.0.0 + "@nomicfoundation/ethereumjs-statemanager": ^1.0.0 + "@nomicfoundation/ethereumjs-trie": ^5.0.0 + "@nomicfoundation/ethereumjs-tx": ^4.0.0 + "@nomicfoundation/ethereumjs-util": ^8.0.0 + "@nomicfoundation/ethereumjs-vm": ^6.0.0 + "@nomicfoundation/solidity-analyzer": ^0.1.0 "@sentry/node": ^5.18.1 - "@solidity-parser/parser": ^0.14.1 "@types/bn.js": ^5.1.0 "@types/lru-cache": ^5.1.0 abort-controller: ^3.0.0 @@ -8377,47 +6963,41 @@ __metadata: debug: ^4.1.1 enquirer: ^2.3.0 env-paths: ^2.2.0 - ethereum-cryptography: ^0.1.2 + ethereum-cryptography: ^1.0.3 ethereumjs-abi: ^0.6.8 - ethereumjs-util: ^7.1.4 find-up: ^2.1.0 fp-ts: 1.19.3 fs-extra: ^7.0.1 glob: 7.2.0 immutable: ^4.0.0-rc.12 io-ts: 1.10.4 + keccak: ^3.0.2 lodash: ^4.17.11 - merkle-patricia-tree: ^4.2.4 mnemonist: ^0.38.0 - mocha: ^9.2.0 + mocha: ^10.0.0 p-map: ^4.0.0 qs: ^6.7.0 raw-body: ^2.4.1 resolve: 1.17.0 semver: ^6.3.0 - slash: ^3.0.0 solc: 0.7.3 source-map-support: ^0.5.13 stacktrace-parser: ^0.1.10 - true-case-path: ^2.2.1 tsort: 0.0.1 - undici: ^4.14.1 + undici: ^5.14.0 uuid: ^8.3.2 ws: ^7.4.6 peerDependencies: - chai: ^4.2.0 + ts-node: "*" + typescript: "*" + peerDependenciesMeta: + ts-node: + optional: true + typescript: + optional: true bin: hardhat: internal/cli/cli.js - checksum: 7435cdeb375a07078c89d43b4f28702c68203524be85510985838d7d2becba43613b271cf3d6b1739dbe3528d3a9921f95b22a166337d52dc9622bfd219b6253 - languageName: node - linkType: hard - -"has-ansi@npm:^2.0.0": - version: 2.0.0 - resolution: "has-ansi@npm:2.0.0" - dependencies: - ansi-regex: ^2.0.0 - checksum: 1b51daa0214440db171ff359d0a2d17bc20061164c57e76234f614c91dbd2a79ddd68dfc8ee73629366f7be45a6df5f2ea9de83f52e1ca24433f2cc78c35d8ec + checksum: c97c5ed2336541e8b0a3034dc5c94319cffbf93fa1b6385091858f8eefb392129c6109cbaca0837fd4dff4d627b3e3ccb931706257a5d0bee71fc7f7fe90a536 languageName: node linkType: hard @@ -8504,46 +7084,7 @@ __metadata: languageName: node linkType: hard -"has-value@npm:^0.3.1": - version: 0.3.1 - resolution: "has-value@npm:0.3.1" - dependencies: - get-value: ^2.0.3 - has-values: ^0.1.4 - isobject: ^2.0.0 - checksum: 29e2a1e6571dad83451b769c7ce032fce6009f65bccace07c2962d3ad4d5530b6743d8f3229e4ecf3ea8e905d23a752c5f7089100c1f3162039fa6dc3976558f - languageName: node - linkType: hard - -"has-value@npm:^1.0.0": - version: 1.0.0 - resolution: "has-value@npm:1.0.0" - dependencies: - get-value: ^2.0.6 - has-values: ^1.0.0 - isobject: ^3.0.0 - checksum: b9421d354e44f03d3272ac39fd49f804f19bc1e4fa3ceef7745df43d6b402053f828445c03226b21d7d934a21ac9cf4bc569396dc312f496ddff873197bbd847 - languageName: node - linkType: hard - -"has-values@npm:^0.1.4": - version: 0.1.4 - resolution: "has-values@npm:0.1.4" - checksum: ab1c4bcaf811ccd1856c11cfe90e62fca9e2b026ebe474233a3d282d8d67e3b59ed85b622c7673bac3db198cb98bd1da2b39300a2f98e453729b115350af49bc - languageName: node - linkType: hard - -"has-values@npm:^1.0.0": - version: 1.0.0 - resolution: "has-values@npm:1.0.0" - dependencies: - is-number: ^3.0.0 - kind-of: ^4.0.0 - checksum: 77e6693f732b5e4cf6c38dfe85fdcefad0fab011af74995c3e83863fabf5e3a836f406d83565816baa0bc0a523c9410db8b990fe977074d61aeb6d8f4fcffa11 - languageName: node - linkType: hard - -"has@npm:^1.0.3, has@npm:~1.0.3": +"has@npm:^1.0.3": version: 1.0.3 resolution: "has@npm:1.0.3" dependencies: @@ -8592,13 +7133,6 @@ __metadata: languageName: node linkType: hard -"heap@npm:0.2.6": - version: 0.2.6 - resolution: "heap@npm:0.2.6" - checksum: 1291b9b9efb5090d01c6d04a89c91ca6e0e0eb7f3694d8254f7a5effcc5ab9249bc3d16767b276645ffe86d9b2bbd82ed977f8988f55375e9f2a2c80647ebbdc - languageName: node - linkType: hard - "hmac-drbg@npm:^1.0.1": version: 1.0.1 resolution: "hmac-drbg@npm:1.0.1" @@ -8610,16 +7144,6 @@ __metadata: languageName: node linkType: hard -"home-or-tmp@npm:^2.0.0": - version: 2.0.0 - resolution: "home-or-tmp@npm:2.0.0" - dependencies: - os-homedir: ^1.0.0 - os-tmpdir: ^1.0.1 - checksum: b783c6ffd22f716d82f53e8c781cbe49bc9f4109a89ea86a27951e54c0bd335caf06bd828be2958cd9f4681986df1739558ae786abda6298cdd6d3edc2c362f1 - languageName: node - linkType: hard - "hosted-git-info@npm:^2.1.4, hosted-git-info@npm:^2.6.0": version: 2.8.9 resolution: "hosted-git-info@npm:2.8.9" @@ -8763,7 +7287,7 @@ __metadata: languageName: node linkType: hard -"ieee754@npm:^1.1.13": +"ieee754@npm:^1.1.13, ieee754@npm:^1.2.1": version: 1.2.1 resolution: "ieee754@npm:1.2.1" checksum: 5144c0c9815e54ada181d80a0b810221a253562422e7c6c3a60b1901154184f49326ec239d618c416c1c5945a2e197107aee8d986a3dd836b53dffefd99b5e7e @@ -8846,7 +7370,7 @@ __metadata: languageName: node linkType: hard -"inherits@npm:2, inherits@npm:2.0.4, inherits@npm:^2.0.1, inherits@npm:^2.0.3, inherits@npm:^2.0.4, inherits@npm:~2.0.1, inherits@npm:~2.0.3, inherits@npm:~2.0.4": +"inherits@npm:2, inherits@npm:2.0.4, inherits@npm:^2.0.1, inherits@npm:^2.0.3, inherits@npm:^2.0.4, inherits@npm:~2.0.1, inherits@npm:~2.0.3": version: 2.0.4 resolution: "inherits@npm:2.0.4" checksum: 4a48a733847879d6cf6691860a6b1e3f0f4754176e4d71494c41f3475553768b10f84b5ce1d40fbd0e34e6bfbb864ee35858ad4dd2cf31e02fc4a154b724d7f1 @@ -8901,22 +7425,6 @@ __metadata: languageName: node linkType: hard -"invariant@npm:^2.2.2": - version: 2.2.4 - resolution: "invariant@npm:2.2.4" - dependencies: - loose-envify: ^1.0.0 - checksum: cc3182d793aad82a8d1f0af697b462939cb46066ec48bbf1707c150ad5fad6406137e91a262022c269702e01621f35ef60269f6c0d7fd178487959809acdfb14 - languageName: node - linkType: hard - -"invert-kv@npm:^1.0.0": - version: 1.0.0 - resolution: "invert-kv@npm:1.0.0" - checksum: aebeee31dda3b3d25ffd242e9a050926e7fe5df642d60953ab183aca1a7d1ffb39922eb2618affb0e850cf2923116f0da1345367759d88d097df5da1f1e1590e - languageName: node - linkType: hard - "io-ts@npm:1.10.4": version: 1.10.4 resolution: "io-ts@npm:1.10.4" @@ -8940,24 +7448,6 @@ __metadata: languageName: node linkType: hard -"is-accessor-descriptor@npm:^0.1.6": - version: 0.1.6 - resolution: "is-accessor-descriptor@npm:0.1.6" - dependencies: - kind-of: ^3.0.2 - checksum: 3d629a086a9585bc16a83a8e8a3416f400023301855cafb7ccc9a1d63145b7480f0ad28877dcc2cce09492c4ec1c39ef4c071996f24ee6ac626be4217b8ffc8a - languageName: node - linkType: hard - -"is-accessor-descriptor@npm:^1.0.0": - version: 1.0.0 - resolution: "is-accessor-descriptor@npm:1.0.0" - dependencies: - kind-of: ^6.0.0 - checksum: 8e475968e9b22f9849343c25854fa24492dbe8ba0dea1a818978f9f1b887339190b022c9300d08c47fe36f1b913d70ce8cbaca00369c55a56705fdb7caed37fe - languageName: node - linkType: hard - "is-arguments@npm:^1.0.4": version: 1.1.1 resolution: "is-arguments@npm:1.1.1" @@ -9003,38 +7493,20 @@ __metadata: languageName: node linkType: hard -"is-buffer@npm:^1.1.5": - version: 1.1.6 - resolution: "is-buffer@npm:1.1.6" - checksum: 4a186d995d8bbf9153b4bd9ff9fd04ae75068fe695d29025d25e592d9488911eeece84eefbd8fa41b8ddcc0711058a71d4c466dcf6f1f6e1d83830052d8ca707 - languageName: node - linkType: hard - -"is-buffer@npm:~2.0.3": +"is-buffer@npm:^2.0.5, is-buffer@npm:~2.0.3": version: 2.0.5 resolution: "is-buffer@npm:2.0.5" checksum: 764c9ad8b523a9f5a32af29bdf772b08eb48c04d2ad0a7240916ac2688c983bf5f8504bf25b35e66240edeb9d9085461f9b5dae1f3d2861c6b06a65fe983de42 languageName: node linkType: hard -"is-callable@npm:^1.1.3, is-callable@npm:^1.1.4, is-callable@npm:^1.2.4": +"is-callable@npm:^1.1.4, is-callable@npm:^1.2.4": version: 1.2.4 resolution: "is-callable@npm:1.2.4" checksum: 1a28d57dc435797dae04b173b65d6d1e77d4f16276e9eff973f994eadcfdc30a017e6a597f092752a083c1103cceb56c91e3dadc6692fedb9898dfaba701575f languageName: node linkType: hard -"is-ci@npm:^2.0.0": - version: 2.0.0 - resolution: "is-ci@npm:2.0.0" - dependencies: - ci-info: ^2.0.0 - bin: - is-ci: bin.js - checksum: 77b869057510f3efa439bbb36e9be429d53b3f51abd4776eeea79ab3b221337fe1753d1e50058a9e2c650d38246108beffb15ccfd443929d77748d8c0cc90144 - languageName: node - linkType: hard - "is-ci@npm:^3.0.1": version: 3.0.1 resolution: "is-ci@npm:3.0.1" @@ -9064,24 +7536,6 @@ __metadata: languageName: node linkType: hard -"is-data-descriptor@npm:^0.1.4": - version: 0.1.4 - resolution: "is-data-descriptor@npm:0.1.4" - dependencies: - kind-of: ^3.0.2 - checksum: 5c622e078ba933a78338ae398a3d1fc5c23332b395312daf4f74bab4afb10d061cea74821add726cb4db8b946ba36217ee71a24fe71dd5bca4632edb7f6aad87 - languageName: node - linkType: hard - -"is-data-descriptor@npm:^1.0.0": - version: 1.0.0 - resolution: "is-data-descriptor@npm:1.0.0" - dependencies: - kind-of: ^6.0.0 - checksum: e705e6816241c013b05a65dc452244ee378d1c3e3842bd140beabe6e12c0d700ef23c91803f971aa7b091fb0573c5da8963af34a2b573337d87bc3e1f53a4e6d - languageName: node - linkType: hard - "is-date-object@npm:^1.0.1": version: 1.0.5 resolution: "is-date-object@npm:1.0.5" @@ -9091,53 +7545,6 @@ __metadata: languageName: node linkType: hard -"is-descriptor@npm:^0.1.0": - version: 0.1.6 - resolution: "is-descriptor@npm:0.1.6" - dependencies: - is-accessor-descriptor: ^0.1.6 - is-data-descriptor: ^0.1.4 - kind-of: ^5.0.0 - checksum: 0f780c1b46b465f71d970fd7754096ffdb7b69fd8797ca1f5069c163eaedcd6a20ec4a50af669075c9ebcfb5266d2e53c8b227e485eefdb0d1fee09aa1dd8ab6 - languageName: node - linkType: hard - -"is-descriptor@npm:^1.0.0, is-descriptor@npm:^1.0.2": - version: 1.0.2 - resolution: "is-descriptor@npm:1.0.2" - dependencies: - is-accessor-descriptor: ^1.0.0 - is-data-descriptor: ^1.0.0 - kind-of: ^6.0.2 - checksum: 2ed623560bee035fb67b23e32ce885700bef8abe3fbf8c909907d86507b91a2c89a9d3a4d835a4d7334dd5db0237a0aeae9ca109c1e4ef1c0e7b577c0846ab5a - languageName: node - linkType: hard - -"is-docker@npm:^2.0.0": - version: 2.2.1 - resolution: "is-docker@npm:2.2.1" - bin: - is-docker: cli.js - checksum: 3fef7ddbf0be25958e8991ad941901bf5922ab2753c46980b60b05c1bf9c9c2402d35e6dc32e4380b980ef5e1970a5d9d5e5aa2e02d77727c3b6b5e918474c56 - languageName: node - linkType: hard - -"is-extendable@npm:^0.1.0, is-extendable@npm:^0.1.1": - version: 0.1.1 - resolution: "is-extendable@npm:0.1.1" - checksum: 3875571d20a7563772ecc7a5f36cb03167e9be31ad259041b4a8f73f33f885441f778cee1f1fe0085eb4bc71679b9d8c923690003a36a6a5fdf8023e6e3f0672 - languageName: node - linkType: hard - -"is-extendable@npm:^1.0.1": - version: 1.0.1 - resolution: "is-extendable@npm:1.0.1" - dependencies: - is-plain-object: ^2.0.4 - checksum: db07bc1e9de6170de70eff7001943691f05b9d1547730b11be01c0ebfe67362912ba743cf4be6fd20a5e03b4180c685dad80b7c509fe717037e3eee30ad8e84f - languageName: node - linkType: hard - "is-extglob@npm:^2.1.1": version: 2.1.1 resolution: "is-extglob@npm:2.1.1" @@ -9145,29 +7552,6 @@ __metadata: languageName: node linkType: hard -"is-finite@npm:^1.0.0": - version: 1.1.0 - resolution: "is-finite@npm:1.1.0" - checksum: 532b97ed3d03e04c6bd203984d9e4ba3c0c390efee492bad5d1d1cd1802a68ab27adbd3ef6382f6312bed6c8bb1bd3e325ea79a8dc8fe080ed7a06f5f97b93e7 - languageName: node - linkType: hard - -"is-fn@npm:^1.0.0": - version: 1.0.0 - resolution: "is-fn@npm:1.0.0" - checksum: eeea1e536716f93a92dc1a8550b2c0909fe74bb5144d0fb6d65e0d31eb9c06c30559f69d83a9351d2288cc7293b43bc074e0fab5fae19e312ff38aa0c7672827 - languageName: node - linkType: hard - -"is-fullwidth-code-point@npm:^1.0.0": - version: 1.0.0 - resolution: "is-fullwidth-code-point@npm:1.0.0" - dependencies: - number-is-nan: ^1.0.0 - checksum: 4d46a7465a66a8aebcc5340d3b63a56602133874af576a9ca42c6f0f4bd787a743605771c5f246db77da96605fefeffb65fc1dbe862dcc7328f4b4d03edf5a57 - languageName: node - linkType: hard - "is-fullwidth-code-point@npm:^2.0.0": version: 2.0.0 resolution: "is-fullwidth-code-point@npm:2.0.0" @@ -9244,15 +7628,6 @@ __metadata: languageName: node linkType: hard -"is-number@npm:^3.0.0": - version: 3.0.0 - resolution: "is-number@npm:3.0.0" - dependencies: - kind-of: ^3.0.2 - checksum: 0c62bf8e9d72c4dd203a74d8cfc751c746e75513380fef420cda8237e619a988ee43e678ddb23c87ac24d91ac0fe9f22e4ffb1301a50310c697e9d73ca3994e9 - languageName: node - linkType: hard - "is-number@npm:^7.0.0": version: 7.0.0 resolution: "is-number@npm:7.0.0" @@ -9281,16 +7656,7 @@ __metadata: languageName: node linkType: hard -"is-plain-object@npm:^2.0.3, is-plain-object@npm:^2.0.4": - version: 2.0.4 - resolution: "is-plain-object@npm:2.0.4" - dependencies: - isobject: ^3.0.1 - checksum: 2a401140cfd86cabe25214956ae2cfee6fbd8186809555cd0e84574f88de7b17abacb2e477a6a658fa54c6083ecbda1e6ae404c7720244cd198903848fca70ca - languageName: node - linkType: hard - -"is-regex@npm:^1.0.4, is-regex@npm:^1.1.4, is-regex@npm:~1.1.4": +"is-regex@npm:^1.1.4": version: 1.1.4 resolution: "is-regex@npm:1.1.4" dependencies: @@ -9316,7 +7682,7 @@ __metadata: languageName: node linkType: hard -"is-stream@npm:^1.0.0, is-stream@npm:^1.0.1": +"is-stream@npm:^1.0.0": version: 1.1.0 resolution: "is-stream@npm:1.1.0" checksum: 063c6bec9d5647aa6d42108d4c59723d2bd4ae42135a2d4db6eadbd49b7ea05b750fd69d279e5c7c45cf9da753ad2c00d8978be354d65aa9f6bb434969c6a2ae @@ -9384,13 +7750,6 @@ __metadata: languageName: node linkType: hard -"is-utf8@npm:^0.2.0": - version: 0.2.1 - resolution: "is-utf8@npm:0.2.1" - checksum: 167ccd2be869fc228cc62c1a28df4b78c6b5485d15a29027d3b5dceb09b383e86a3522008b56dcac14b592b22f0a224388718c2505027a994fd8471465de54b3 - languageName: node - linkType: hard - "is-weakref@npm:^1.0.2": version: 1.0.2 resolution: "is-weakref@npm:1.0.2" @@ -9400,30 +7759,14 @@ __metadata: languageName: node linkType: hard -"is-windows@npm:^1.0.0, is-windows@npm:^1.0.2": +"is-windows@npm:^1.0.0": version: 1.0.2 resolution: "is-windows@npm:1.0.2" checksum: 438b7e52656fe3b9b293b180defb4e448088e7023a523ec21a91a80b9ff8cdb3377ddb5b6e60f7c7de4fa8b63ab56e121b6705fe081b3cf1b828b0a380009ad7 languageName: node linkType: hard -"is-wsl@npm:^2.1.1": - version: 2.2.0 - resolution: "is-wsl@npm:2.2.0" - dependencies: - is-docker: ^2.0.0 - checksum: 20849846ae414997d290b75e16868e5261e86ff5047f104027026fd61d8b5a9b0b3ade16239f35e1a067b3c7cc02f70183cb661010ed16f4b6c7c93dad1b19d8 - languageName: node - linkType: hard - -"isarray@npm:0.0.1": - version: 0.0.1 - resolution: "isarray@npm:0.0.1" - checksum: 49191f1425681df4a18c2f0f93db3adb85573bcdd6a4482539d98eac9e705d8961317b01175627e860516a2fc45f8f9302db26e5a380a97a520e272e2a40a8d4 - languageName: node - linkType: hard - -"isarray@npm:1.0.0, isarray@npm:~1.0.0": +"isarray@npm:~1.0.0": version: 1.0.0 resolution: "isarray@npm:1.0.0" checksum: f032df8e02dce8ec565cf2eb605ea939bdccea528dbcf565cdf92bfa2da9110461159d86a537388ef1acef8815a330642d7885b29010e8f7eac967c9993b65ab @@ -9437,22 +7780,6 @@ __metadata: languageName: node linkType: hard -"isobject@npm:^2.0.0": - version: 2.1.0 - resolution: "isobject@npm:2.1.0" - dependencies: - isarray: 1.0.0 - checksum: 811c6f5a866877d31f0606a88af4a45f282544de886bf29f6a34c46616a1ae2ed17076cc6bf34c0128f33eecf7e1fcaa2c82cf3770560d3e26810894e96ae79f - languageName: node - linkType: hard - -"isobject@npm:^3.0.0, isobject@npm:^3.0.1": - version: 3.0.1 - resolution: "isobject@npm:3.0.1" - checksum: db85c4c970ce30693676487cca0e61da2ca34e8d4967c2e1309143ff910c207133a969f9e4ddb2dc6aba670aabce4e0e307146c310350b298e74a31f7d464703 - languageName: node - linkType: hard - "isstream@npm:~0.1.2": version: 0.1.2 resolution: "isstream@npm:0.1.2" @@ -9491,20 +7818,13 @@ __metadata: languageName: node linkType: hard -"js-tokens@npm:^3.0.0 || ^4.0.0, js-tokens@npm:^4.0.0": +"js-tokens@npm:^4.0.0": version: 4.0.0 resolution: "js-tokens@npm:4.0.0" checksum: 8a95213a5a77deb6cbe94d86340e8d9ace2b93bc367790b260101d2f36a2eaf4e4e22d9fa9cf459b38af3a32fb4190e638024cf82ec95ef708680e405ea7cc78 languageName: node linkType: hard -"js-tokens@npm:^3.0.2": - version: 3.0.2 - resolution: "js-tokens@npm:3.0.2" - checksum: ff24cf90e6e4ac446eba56e604781c1aaf3bdaf9b13a00596a0ebd972fa3b25dc83c0f0f67289c33252abb4111e0d14e952a5d9ffb61f5c22532d555ebd8d8a9 - languageName: node - linkType: hard - "js-yaml@npm:3.13.1": version: 3.13.1 resolution: "js-yaml@npm:3.13.1" @@ -9547,21 +7867,12 @@ __metadata: languageName: node linkType: hard -"jsesc@npm:^1.3.0": - version: 1.3.0 - resolution: "jsesc@npm:1.3.0" - bin: - jsesc: bin/jsesc - checksum: 9384cc72bf8ef7f2eb75fea64176b8b0c1c5e77604854c72cb4670b7072e112e3baaa69ef134be98cb078834a7812b0bfe676ad441ccd749a59427f5ed2127f1 - languageName: node - linkType: hard - -"jsesc@npm:~0.5.0": - version: 0.5.0 - resolution: "jsesc@npm:0.5.0" - bin: - jsesc: bin/jsesc - checksum: b8b44cbfc92f198ad972fba706ee6a1dfa7485321ee8c0b25f5cedd538dcb20cde3197de16a7265430fce8277a12db066219369e3d51055038946039f6e20e17 +"json-bigint@npm:^1.0.0": + version: 1.0.0 + resolution: "json-bigint@npm:1.0.0" + dependencies: + bignumber.js: ^9.0.0 + checksum: c67bb93ccb3c291e60eb4b62931403e378906aab113ec1c2a8dd0f9a7f065ad6fd9713d627b732abefae2e244ac9ce1721c7a3142b2979532f12b258634ce6f6 languageName: node linkType: hard @@ -9579,36 +7890,6 @@ __metadata: languageName: node linkType: hard -"json-rpc-engine@npm:^3.4.0, json-rpc-engine@npm:^3.6.0": - version: 3.8.0 - resolution: "json-rpc-engine@npm:3.8.0" - dependencies: - async: ^2.0.1 - babel-preset-env: ^1.7.0 - babelify: ^7.3.0 - json-rpc-error: ^2.0.0 - promise-to-callback: ^1.0.0 - safe-event-emitter: ^1.0.1 - checksum: 4a02ddda196b68717cdcdf9bc8eac91f956b717431daf1f317e016d564bd5b8974e8a66f75fd1f069d63b8e944128020ec7c371f28cf29ac0951d3338b2f667c - languageName: node - linkType: hard - -"json-rpc-error@npm:^2.0.0": - version: 2.0.0 - resolution: "json-rpc-error@npm:2.0.0" - dependencies: - inherits: ^2.0.1 - checksum: bbfb1ff82d0605b4dfd4ac6d093e863a8f623e0e83a098ccab5711a08d2ae09ea603260d4573a524e596701e64733690a5c31901e99daebe05b09053d8702d0c - languageName: node - linkType: hard - -"json-rpc-random-id@npm:^1.0.0": - version: 1.0.1 - resolution: "json-rpc-random-id@npm:1.0.1" - checksum: fcd2e884193a129ace4002bd65a86e9cdb206733b4693baea77bd8b372cf8de3043fbea27716a2c9a716581a908ca8d978d9dfec4847eb2cf77edb4cf4b2252c - languageName: node - linkType: hard - "json-schema-traverse@npm:^0.4.1": version: 0.4.1 resolution: "json-schema-traverse@npm:0.4.1" @@ -9630,15 +7911,6 @@ __metadata: languageName: node linkType: hard -"json-stable-stringify@npm:^1.0.1": - version: 1.0.1 - resolution: "json-stable-stringify@npm:1.0.1" - dependencies: - jsonify: ~0.0.0 - checksum: 65d6cbf0fca72a4136999f65f4401cf39a129f7aeff0fdd987ac3d3423a2113659294045fb8377e6e20d865cac32b1b8d70f3d87346c9786adcee60661d96ca5 - languageName: node - linkType: hard - "json-stringify-safe@npm:~5.0.1": version: 5.0.1 resolution: "json-stringify-safe@npm:5.0.1" @@ -9646,15 +7918,6 @@ __metadata: languageName: node linkType: hard -"json5@npm:^0.5.1": - version: 0.5.1 - resolution: "json5@npm:0.5.1" - bin: - json5: lib/cli.js - checksum: 9b85bf06955b23eaa4b7328aa8892e3887e81ca731dd27af04a5f5f1458fbc5e1de57a24442e3272f8a888dd1abe1cb68eb693324035f6b3aeba4fcab7667d62 - languageName: node - linkType: hard - "json5@npm:^1.0.1": version: 1.0.1 resolution: "json5@npm:1.0.1" @@ -9703,13 +7966,6 @@ __metadata: languageName: node linkType: hard -"jsonify@npm:~0.0.0": - version: 0.0.0 - resolution: "jsonify@npm:0.0.0" - checksum: d8d4ed476c116e6987a460dcb82f22284686caae9f498ac87b0502c1765ac1522f4f450a4cad4cc368d202fd3b27a3860735140a82867fc6d558f5f199c38bce - languageName: node - linkType: hard - "jsonschema@npm:^1.2.4": version: 1.4.0 resolution: "jsonschema@npm:1.4.0" @@ -9736,7 +7992,19 @@ __metadata: node-addon-api: ^2.0.0 node-gyp: latest node-gyp-build: ^4.2.0 - checksum: 1de1b62fbb3e035ee186232b11f154bd5c2c12a2d910bc8ec313dab412b6f39ddc51d3a105618dd8de752875da0ead21abb0eb1d4e7d7b17771a4acbb7159390 + checksum: 1de1b62fbb3e035ee186232b11f154bd5c2c12a2d910bc8ec313dab412b6f39ddc51d3a105618dd8de752875da0ead21abb0eb1d4e7d7b17771a4acbb7159390 + languageName: node + linkType: hard + +"keccak@npm:3.0.2, keccak@npm:^3.0.0": + version: 3.0.2 + resolution: "keccak@npm:3.0.2" + dependencies: + node-addon-api: ^2.0.0 + node-gyp: latest + node-gyp-build: ^4.2.0 + readable-stream: ^3.6.0 + checksum: 39a7d6128b8ee4cb7dcd186fc7e20c6087cc39f573a0f81b147c323f688f1f7c2b34f62c4ae189fe9b81c6730b2d1228d8a399cdc1f3d8a4c8f030cdc4f20272 languageName: node linkType: hard @@ -9753,15 +8021,15 @@ __metadata: languageName: node linkType: hard -"keccak@npm:^3.0.0": - version: 3.0.2 - resolution: "keccak@npm:3.0.2" +"keccak@npm:^3.0.2": + version: 3.0.3 + resolution: "keccak@npm:3.0.3" dependencies: node-addon-api: ^2.0.0 node-gyp: latest node-gyp-build: ^4.2.0 readable-stream: ^3.6.0 - checksum: 39a7d6128b8ee4cb7dcd186fc7e20c6087cc39f573a0f81b147c323f688f1f7c2b34f62c4ae189fe9b81c6730b2d1228d8a399cdc1f3d8a4c8f030cdc4f20272 + checksum: f08f04f5cc87013a3fc9e87262f761daff38945c86dd09c01a7f7930a15ae3e14f93b310ef821dcc83675a7b814eb1c983222399a2f263ad980251201d1b9a99 languageName: node linkType: hard @@ -9774,47 +8042,13 @@ __metadata: languageName: node linkType: hard -"kind-of@npm:^3.0.2, kind-of@npm:^3.0.3, kind-of@npm:^3.2.0": - version: 3.2.2 - resolution: "kind-of@npm:3.2.2" - dependencies: - is-buffer: ^1.1.5 - checksum: e898df8ca2f31038f27d24f0b8080da7be274f986bc6ed176f37c77c454d76627619e1681f6f9d2e8d2fd7557a18ecc419a6bb54e422abcbb8da8f1a75e4b386 - languageName: node - linkType: hard - -"kind-of@npm:^4.0.0": - version: 4.0.0 - resolution: "kind-of@npm:4.0.0" - dependencies: - is-buffer: ^1.1.5 - checksum: 1b9e7624a8771b5a2489026e820f3bbbcc67893e1345804a56b23a91e9069965854d2a223a7c6ee563c45be9d8c6ff1ef87f28ed5f0d1a8d00d9dcbb067c529f - languageName: node - linkType: hard - -"kind-of@npm:^5.0.0": - version: 5.1.0 - resolution: "kind-of@npm:5.1.0" - checksum: f2a0102ae0cf19c4a953397e552571bad2b588b53282874f25fca7236396e650e2db50d41f9f516bd402536e4df968dbb51b8e69e4d5d4a7173def78448f7bab - languageName: node - linkType: hard - -"kind-of@npm:^6.0.0, kind-of@npm:^6.0.2, kind-of@npm:^6.0.3": +"kind-of@npm:^6.0.2, kind-of@npm:^6.0.3": version: 6.0.3 resolution: "kind-of@npm:6.0.3" checksum: 3ab01e7b1d440b22fe4c31f23d8d38b4d9b91d9f291df683476576493d5dfd2e03848a8b05813dd0c3f0e835bc63f433007ddeceb71f05cb25c45ae1b19c6d3b languageName: node linkType: hard -"klaw-sync@npm:^6.0.0": - version: 6.0.0 - resolution: "klaw-sync@npm:6.0.0" - dependencies: - graceful-fs: ^4.1.11 - checksum: 0da397f8961313c3ef8f79fb63af9002cde5a8fb2aeb1a37351feff0dd6006129c790400c3f5c3b4e757bedcabb13d21ec0a5eaef5a593d59515d4f2c291e475 - languageName: node - linkType: hard - "klaw@npm:^1.0.0": version: 1.3.1 resolution: "klaw@npm:1.3.1" @@ -9834,15 +8068,6 @@ __metadata: languageName: node linkType: hard -"lcid@npm:^1.0.0": - version: 1.0.0 - resolution: "lcid@npm:1.0.0" - dependencies: - invert-kv: ^1.0.0 - checksum: e8c7a4db07663068c5c44b650938a2bc41aa992037eebb69376214320f202c1250e70b50c32f939e28345fd30c2d35b8e8cd9a19d5932c398246a864ce54843d - languageName: node - linkType: hard - "level-codec@npm:^9.0.0": version: 9.0.2 resolution: "level-codec@npm:9.0.2" @@ -9852,10 +8077,12 @@ __metadata: languageName: node linkType: hard -"level-codec@npm:~7.0.0": - version: 7.0.1 - resolution: "level-codec@npm:7.0.1" - checksum: 2565c131d93aea0786af5eda9bb907e3f5152fade03fd7a7751e2f95301fc5241063eb927c2f7df086fac33592523aab8df86bcf7ecc46ed53de11453b600329 +"level-concat-iterator@npm:^3.0.0": + version: 3.1.0 + resolution: "level-concat-iterator@npm:3.1.0" + dependencies: + catering: ^2.1.0 + checksum: a15bc4c5fbbb30c1efa7fad06b72feaac84d90990b356b461593c198a833336f31f6daff8f40c3908fabd14cfd8856d1c5ecae9e1cb0575037b65fa607e760e9 languageName: node linkType: hard @@ -9866,15 +8093,6 @@ __metadata: languageName: node linkType: hard -"level-errors@npm:^1.0.3": - version: 1.1.2 - resolution: "level-errors@npm:1.1.2" - dependencies: - errno: ~0.1.1 - checksum: 18c22fd574ff31567642a85d9a306604a32cbe969b8469fee29620c10488214a6b5e6bbf19e3b5e2042859e4b81041af537319c18132a1aaa56d4ed5981157b7 - languageName: node - linkType: hard - "level-errors@npm:^2.0.0, level-errors@npm:~2.0.0": version: 2.0.1 resolution: "level-errors@npm:2.0.1" @@ -9884,49 +8102,6 @@ __metadata: languageName: node linkType: hard -"level-errors@npm:~1.0.3": - version: 1.0.5 - resolution: "level-errors@npm:1.0.5" - dependencies: - errno: ~0.1.1 - checksum: a62df2a24987c0100855ec03f03655ddc6170b33a83987a53858ba0a7dbe125b4b5382e01068a1dc899ccf7f9d12b824702da15488bd06b4b3ee7a1e4232cb0a - languageName: node - linkType: hard - -"level-iterator-stream@npm:^2.0.3": - version: 2.0.3 - resolution: "level-iterator-stream@npm:2.0.3" - dependencies: - inherits: ^2.0.1 - readable-stream: ^2.0.5 - xtend: ^4.0.0 - checksum: dd4211798d032a06ebc3e9c5a3a969b003cb15f1fe6398d9c50c87dc8b0bf8b07197cada253fd7f8c4a933f3c86e12bb041df1561c89b749ac4b991d6e68b17f - languageName: node - linkType: hard - -"level-iterator-stream@npm:~1.3.0": - version: 1.3.1 - resolution: "level-iterator-stream@npm:1.3.1" - dependencies: - inherits: ^2.0.1 - level-errors: ^1.0.3 - readable-stream: ^1.0.33 - xtend: ^4.0.0 - checksum: bf57d8dcee6e7ec68e6c580edc768d2e3960f93e741d7d4adcc7d86f267c741ebcfba5353b3b6551ca10d12e30939c90f1a13303313b1b719325111f0ff14540 - languageName: node - linkType: hard - -"level-iterator-stream@npm:~3.0.0": - version: 3.0.1 - resolution: "level-iterator-stream@npm:3.0.1" - dependencies: - inherits: ^2.0.1 - readable-stream: ^2.3.6 - xtend: ^4.0.0 - checksum: f3348316907c70163ea15319ef7e28c21c6b4b948616e11dcbbb8e3dab9ec5b39f7bf13e0d53f7d23c69641b7a2985a4911c5c9a03bd57a07f1af469aba6e3a8 - languageName: node - linkType: hard - "level-iterator-stream@npm:~4.0.0": version: 4.0.2 resolution: "level-iterator-stream@npm:4.0.2" @@ -9938,16 +8113,6 @@ __metadata: languageName: node linkType: hard -"level-mem@npm:^3.0.1": - version: 3.0.1 - resolution: "level-mem@npm:3.0.1" - dependencies: - level-packager: ~4.0.0 - memdown: ~3.0.0 - checksum: e4c680922afc3c8cd4502d761ab610c8aa7bcacde2550a0a463e1db069eeb55b6b7bec0bb7fda564cec82422944776f9909fe101b0d7746ad8f4f7446ec2a5cd - languageName: node - linkType: hard - "level-mem@npm:^5.0.1": version: 5.0.1 resolution: "level-mem@npm:5.0.1" @@ -9968,40 +8133,17 @@ __metadata: languageName: node linkType: hard -"level-packager@npm:~4.0.0": - version: 4.0.1 - resolution: "level-packager@npm:4.0.1" - dependencies: - encoding-down: ~5.0.0 - levelup: ^3.0.0 - checksum: af33054cfdf1f3cb409941c2e6a67190c0437f8b57a518fa1d40d3f9fd75edbb72c2c17595a52b10030fe2d64c8ef474ddb570f925d88402c94cfc95263865cb - languageName: node - linkType: hard - -"level-post@npm:^1.0.7": - version: 1.0.7 - resolution: "level-post@npm:1.0.7" - dependencies: - ltgt: ^2.1.2 - checksum: 27239cfebe2004036d7ed0ace860d03f829f099de62baf727cce53bd99cb06bfc4a202fa7cb828847fa01c421bab13d9d3e79c9554f5cffff681541dda575218 +"level-supports@npm:^2.0.1": + version: 2.1.0 + resolution: "level-supports@npm:2.1.0" + checksum: f7b16aea7ddd13326ee4fbc2c1099bcaf8a74dc95346af9ebedea4e02518c6f7a438e829b79b7890d67489b59f615a9428369a0a065021797aa7cb6b6bd84d75 languageName: node linkType: hard -"level-sublevel@npm:6.6.4": - version: 6.6.4 - resolution: "level-sublevel@npm:6.6.4" - dependencies: - bytewise: ~1.1.0 - level-codec: ^9.0.0 - level-errors: ^2.0.0 - level-iterator-stream: ^2.0.3 - ltgt: ~2.1.1 - pull-defer: ^0.2.2 - pull-level: ^2.0.3 - pull-stream: ^3.6.8 - typewiselite: ~1.0.0 - xtend: ~4.0.0 - checksum: 8370e6fbf67bf08daa23de07699d3d2ccf6a349a28db4025a890d4c07857811808372fdf5029c4afedf24e2ff828be6bb7cd9fd0b676090daba38981b2e75cff +"level-supports@npm:^4.0.0": + version: 4.0.1 + resolution: "level-supports@npm:4.0.1" + checksum: d4552b42bb8cdeada07b0f6356c7a90fefe76279147331f291aceae26e3e56d5f927b09ce921647c0230bfe03ddfbdcef332be921e5c2194421ae2bfa3cf6368 languageName: node linkType: hard @@ -10014,24 +8156,13 @@ __metadata: languageName: node linkType: hard -"level-ws@npm:0.0.0": - version: 0.0.0 - resolution: "level-ws@npm:0.0.0" - dependencies: - readable-stream: ~1.0.15 - xtend: ~2.1.1 - checksum: fcc3e6993b538ed8931612a74ef26cf32b53d71c059a819bb1006c075f0c1198afb79026a69aeeafcbd4598c45b4b214315b4216b44eca68587fce1b5ad61b75 - languageName: node - linkType: hard - -"level-ws@npm:^1.0.0": - version: 1.0.0 - resolution: "level-ws@npm:1.0.0" +"level-transcoder@npm:^1.0.1": + version: 1.0.1 + resolution: "level-transcoder@npm:1.0.1" dependencies: - inherits: ^2.0.3 - readable-stream: ^2.2.8 - xtend: ^4.0.1 - checksum: 752fd0f89eb1ccf811c09de24ca8987437ea84f88e672d0037324fb5d71c5bc022c25ba64d6a00fca33beec48a81e3cd1ef99c2f9fff267b3a4f2233939fad35 + buffer: ^6.0.3 + module-error: ^1.0.1 + checksum: 304f08d802faf3491a533b6d87ad8be3cabfd27f2713bbe9d4c633bf50fcb9460eab5a6776bf015e101ead7ba1c1853e05e7f341112f17a9d0cb37ee5a421a25 languageName: node linkType: hard @@ -10046,30 +8177,25 @@ __metadata: languageName: node linkType: hard -"levelup@npm:3.1.1, levelup@npm:^3.0.0": - version: 3.1.1 - resolution: "levelup@npm:3.1.1" +"level@npm:^8.0.0": + version: 8.0.0 + resolution: "level@npm:8.0.0" dependencies: - deferred-leveldown: ~4.0.0 - level-errors: ~2.0.0 - level-iterator-stream: ~3.0.0 - xtend: ~4.0.0 - checksum: cddcac2cf5eddcf85ade62efd21f11326cd83559619db6a78696725eac5c5cd16f62d8d49f6594fd3097d9329a1d04847f6d7df23bf4d69f18c16e49afd4a416 + browser-level: ^1.0.1 + classic-level: ^1.2.0 + checksum: 13eb25bd71bfdca6cd714d1233adf9da97de9a8a4bf9f28d62a390b5c96d0250abaf983eb90eb8c4e89c7a985bb330750683d106f12670e5ea8fba1d7e608a1f languageName: node linkType: hard -"levelup@npm:^1.2.1": - version: 1.3.9 - resolution: "levelup@npm:1.3.9" +"leveldown@npm:6.1.0": + version: 6.1.0 + resolution: "leveldown@npm:6.1.0" dependencies: - deferred-leveldown: ~1.2.1 - level-codec: ~7.0.0 - level-errors: ~1.0.3 - level-iterator-stream: ~1.3.0 - prr: ~1.0.1 - semver: ~5.4.1 - xtend: ~4.0.0 - checksum: df3b534b948c17d724050f6ecc2b21eb2fde357bd0c68582cd3a5eb4bf943a3057cd2e9db6bd7253020fcb853c83a70943bff9264f5132afa8cf3c25c3c7cd8e + abstract-leveldown: ^7.2.0 + napi-macros: ~2.0.0 + node-gyp: latest + node-gyp-build: ^4.3.0 + checksum: e984b61e9fbe057cfd5c81ac0afe5d7e35d695ff130a95991e0ecb66390e4c4ff6aa3980a65b6c53edaba80527a47790bb26e3cfbd52a054957b3546d9941fe4 languageName: node linkType: hard @@ -10113,19 +8239,6 @@ __metadata: languageName: node linkType: hard -"load-json-file@npm:^1.0.0": - version: 1.1.0 - resolution: "load-json-file@npm:1.1.0" - dependencies: - graceful-fs: ^4.1.2 - parse-json: ^2.2.0 - pify: ^2.0.0 - pinkie-promise: ^2.0.0 - strip-bom: ^2.0.0 - checksum: 0e4e4f380d897e13aa236246a917527ea5a14e4fc34d49e01ce4e7e2a1e08e2740ee463a03fb021c04f594f29a178f4adb994087549d7c1c5315fcd29bf9934b - languageName: node - linkType: hard - "load-yaml-file@npm:^0.2.0": version: 0.2.0 resolution: "load-yaml-file@npm:0.2.0" @@ -10176,13 +8289,6 @@ __metadata: languageName: node linkType: hard -"lodash.assign@npm:^4.0.3, lodash.assign@npm:^4.0.6": - version: 4.2.0 - resolution: "lodash.assign@npm:4.2.0" - checksum: 75bbc6733c9f577c448031b4051f990f068802708891f94be9d4c2faffd6a9ec67a2c49671dafc908a068d35687765464853282842b4560b662e6c903d11cc90 - languageName: node - linkType: hard - "lodash.camelcase@npm:^4.3.0": version: 4.3.0 resolution: "lodash.camelcase@npm:4.3.0" @@ -10225,14 +8331,7 @@ __metadata: languageName: node linkType: hard -"lodash@npm:4.17.20": - version: 4.17.20 - resolution: "lodash@npm:4.17.20" - checksum: b31afa09739b7292a88ec49ffdb2fcaeb41f690def010f7a067eeedffece32da6b6847bfe4d38a77e6f41778b9b2bca75eeab91209936518173271f0b69376ea - languageName: node - linkType: hard - -"lodash@npm:^4.17.11, lodash@npm:^4.17.14, lodash@npm:^4.17.15, lodash@npm:^4.17.19, lodash@npm:^4.17.21, lodash@npm:^4.17.4, lodash@npm:~4.17.15": +"lodash@npm:^4.17.11, lodash@npm:^4.17.14, lodash@npm:^4.17.15, lodash@npm:^4.17.19, lodash@npm:^4.17.21, lodash@npm:~4.17.15": version: 4.17.21 resolution: "lodash@npm:4.17.21" checksum: eb835a2e51d381e561e508ce932ea50a8e5a68f4ebdd771ea240d3048244a8d13658acbd502cd4829768c56f2e16bdd4340b9ea141297d472517b83868e677f7 @@ -10258,31 +8357,6 @@ __metadata: languageName: node linkType: hard -"looper@npm:^2.0.0": - version: 2.0.0 - resolution: "looper@npm:2.0.0" - checksum: ee5124d54c97cd9e778e602e297ed37dd6405b7c36830f90bb1aaa6adb8d64f2a228aa341459e6bf2db9a8d7dc9eb8c16ec9c6bffeab1c47f91efe213858ce36 - languageName: node - linkType: hard - -"looper@npm:^3.0.0": - version: 3.0.0 - resolution: "looper@npm:3.0.0" - checksum: 2ec29b4161e95d33f2257867b0b9ab7f2fef5425582362c966f8f9041a2a6032466b8be159af99323655aca9e6fe1c9da086cf208f6346bd97c9f83ab77ccce0 - languageName: node - linkType: hard - -"loose-envify@npm:^1.0.0": - version: 1.4.0 - resolution: "loose-envify@npm:1.4.0" - dependencies: - js-tokens: ^3.0.0 || ^4.0.0 - bin: - loose-envify: cli.js - checksum: 6517e24e0cad87ec9888f500c5b5947032cdfe6ef65e1c1936a0c48a524b81e65542c9c3edc91c97d5bddc806ee2a985dbc79be89215d613b1de5db6d1cfe6f4 - languageName: node - linkType: hard - "loupe@npm:^2.3.1": version: 2.3.4 resolution: "loupe@npm:2.3.4" @@ -10306,24 +8380,6 @@ __metadata: languageName: node linkType: hard -"lru-cache@npm:5.1.1, lru-cache@npm:^5.1.1": - version: 5.1.1 - resolution: "lru-cache@npm:5.1.1" - dependencies: - yallist: ^3.0.2 - checksum: c154ae1cbb0c2206d1501a0e94df349653c92c8cbb25236d7e85190bcaf4567a03ac6eb43166fabfa36fd35623694da7233e88d9601fbf411a9a481d85dbd2cb - languageName: node - linkType: hard - -"lru-cache@npm:^3.2.0": - version: 3.2.0 - resolution: "lru-cache@npm:3.2.0" - dependencies: - pseudomap: ^1.0.1 - checksum: 8e5fb3d7a83401165b8dc9fe16d74828df5754aaeda1061e4f2ea1d0e984b9071a6487f1c3f6f034f935429629f94366abbfb753827ab2977a56b3f5c276e736 - languageName: node - linkType: hard - "lru-cache@npm:^4.0.1": version: 4.1.5 resolution: "lru-cache@npm:4.1.5" @@ -10334,6 +8390,15 @@ __metadata: languageName: node linkType: hard +"lru-cache@npm:^5.1.1": + version: 5.1.1 + resolution: "lru-cache@npm:5.1.1" + dependencies: + yallist: ^3.0.2 + checksum: c154ae1cbb0c2206d1501a0e94df349653c92c8cbb25236d7e85190bcaf4567a03ac6eb43166fabfa36fd35623694da7233e88d9601fbf411a9a481d85dbd2cb + languageName: node + linkType: hard + "lru-cache@npm:^6.0.0": version: 6.0.0 resolution: "lru-cache@npm:6.0.0" @@ -10357,20 +8422,13 @@ __metadata: languageName: node linkType: hard -"ltgt@npm:^2.1.2, ltgt@npm:~2.2.0": +"ltgt@npm:~2.2.0": version: 2.2.1 resolution: "ltgt@npm:2.2.1" checksum: 7e3874296f7538bc8087b428ac4208008d7b76916354b34a08818ca7c83958c1df10ec427eeeaad895f6b81e41e24745b18d30f89abcc21d228b94f6961d50a2 languageName: node linkType: hard -"ltgt@npm:~2.1.1": - version: 2.1.3 - resolution: "ltgt@npm:2.1.3" - checksum: b09281f6aeccb34eda52588d21f9116f6e5b7ae1c79f6180bba06edcdcba50de9c6d199be7f817a7ae59819064e3ca7d066fe0bcc67e2458006e4e45cd05cb11 - languageName: node - linkType: hard - "make-error@npm:^1.1.1": version: 1.3.6 resolution: "make-error@npm:1.3.6" @@ -10402,13 +8460,6 @@ __metadata: languageName: node linkType: hard -"map-cache@npm:^0.2.2": - version: 0.2.2 - resolution: "map-cache@npm:0.2.2" - checksum: 3067cea54285c43848bb4539f978a15dedc63c03022abeec6ef05c8cb6829f920f13b94bcaf04142fc6a088318e564c4785704072910d120d55dbc2e0c421969 - languageName: node - linkType: hard - "map-obj@npm:^1.0.0": version: 1.0.1 resolution: "map-obj@npm:1.0.1" @@ -10423,15 +8474,6 @@ __metadata: languageName: node linkType: hard -"map-visit@npm:^1.0.0": - version: 1.0.0 - resolution: "map-visit@npm:1.0.0" - dependencies: - object-visit: ^1.0.0 - checksum: c27045a5021c344fc19b9132eb30313e441863b2951029f8f8b66f79d3d8c1e7e5091578075a996f74e417479506fe9ede28c44ca7bc351a61c9d8073daec36a - languageName: node - linkType: hard - "markdown-table@npm:^1.1.3": version: 1.1.3 resolution: "markdown-table@npm:1.1.3" @@ -10464,20 +8506,6 @@ __metadata: languageName: node linkType: hard -"memdown@npm:^1.0.0": - version: 1.4.1 - resolution: "memdown@npm:1.4.1" - dependencies: - abstract-leveldown: ~2.7.1 - functional-red-black-tree: ^1.0.1 - immediate: ^3.2.3 - inherits: ~2.0.1 - ltgt: ~2.2.0 - safe-buffer: ~5.1.1 - checksum: 3f89142a12389b1ebfc7adaf3be19ed57cd073f84160eb7419b61c8e188e2b82eb787dad168d7b00ca68355b6b952067d9badaa5ac88c8ee014e4b0af2bfaea0 - languageName: node - linkType: hard - "memdown@npm:^5.0.0": version: 5.1.0 resolution: "memdown@npm:5.1.0" @@ -10492,17 +8520,14 @@ __metadata: languageName: node linkType: hard -"memdown@npm:~3.0.0": - version: 3.0.0 - resolution: "memdown@npm:3.0.0" +"memory-level@npm:^1.0.0": + version: 1.0.0 + resolution: "memory-level@npm:1.0.0" dependencies: - abstract-leveldown: ~5.0.0 - functional-red-black-tree: ~1.0.1 - immediate: ~3.2.3 - inherits: ~2.0.1 - ltgt: ~2.2.0 - safe-buffer: ~5.1.1 - checksum: 4446fdf7198dcdbae764324200526f41738c9f2a32decb59b5a4dbb1bdfc72e2fc046e9bbe016469ab8a0a52e5d5c8b36bf3829e90dd4674a5f4c961e059d4de + abstract-level: ^1.0.0 + functional-red-black-tree: ^1.0.1 + module-error: ^1.0.1 + checksum: 80b1b7aedaf936e754adbcd7b9303018c3684fb32f9992fd967c448f145d177f16c724fbba9ed3c3590a9475fd563151eae664d69b83d2ad48714852e9fc5c72 languageName: node linkType: hard @@ -10546,38 +8571,7 @@ __metadata: languageName: node linkType: hard -"merkle-patricia-tree@npm:3.0.0": - version: 3.0.0 - resolution: "merkle-patricia-tree@npm:3.0.0" - dependencies: - async: ^2.6.1 - ethereumjs-util: ^5.2.0 - level-mem: ^3.0.1 - level-ws: ^1.0.0 - readable-stream: ^3.0.6 - rlp: ^2.0.0 - semaphore: ">=1.0.1" - checksum: a500f00e7954eea132309310c48ee2635e9a190e0a775811236a0dc375465ff7e01b230ac0ee213ca13bb995399066719eedb4218e0f47596e9cab79cebc575e - languageName: node - linkType: hard - -"merkle-patricia-tree@npm:^2.1.2, merkle-patricia-tree@npm:^2.3.2": - version: 2.3.2 - resolution: "merkle-patricia-tree@npm:2.3.2" - dependencies: - async: ^1.4.2 - ethereumjs-util: ^5.0.0 - level-ws: 0.0.0 - levelup: ^1.2.1 - memdown: ^1.0.0 - readable-stream: ^2.0.0 - rlp: ^2.0.0 - semaphore: ">=1.0.1" - checksum: f6066a16e08190b9e8d3aa28d8e861a3e884ee0be8109c4f5e879965fdfb8181cfc04bae3aaf97c7fb6d07446d94b4f3e1cce502dde4a5699a03acf6df518b12 - languageName: node - linkType: hard - -"merkle-patricia-tree@npm:^4.2.4": +"merkle-patricia-tree@npm:^4.2.2, merkle-patricia-tree@npm:^4.2.4": version: 4.2.4 resolution: "merkle-patricia-tree@npm:4.2.4" dependencies: @@ -10598,27 +8592,6 @@ __metadata: languageName: node linkType: hard -"micromatch@npm:^3.1.4": - version: 3.1.10 - resolution: "micromatch@npm:3.1.10" - dependencies: - arr-diff: ^4.0.0 - array-unique: ^0.3.2 - braces: ^2.3.1 - define-property: ^2.0.2 - extend-shallow: ^3.0.2 - extglob: ^2.0.4 - fragment-cache: ^0.2.1 - kind-of: ^6.0.2 - nanomatch: ^1.2.9 - object.pick: ^1.3.0 - regex-not: ^1.0.0 - snapdragon: ^0.8.1 - to-regex: ^3.0.2 - checksum: ad226cba4daa95b4eaf47b2ca331c8d2e038d7b41ae7ed0697cde27f3f1d6142881ab03d4da51b65d9d315eceb5e4cdddb3fbb55f5f72cfa19cf3ea469d054dc - languageName: node - linkType: hard - "micromatch@npm:^4.0.2, micromatch@npm:^4.0.4": version: 4.0.5 resolution: "micromatch@npm:4.0.5" @@ -10728,12 +8701,12 @@ __metadata: languageName: node linkType: hard -"minimatch@npm:4.2.1": - version: 4.2.1 - resolution: "minimatch@npm:4.2.1" +"minimatch@npm:5.0.1": + version: 5.0.1 + resolution: "minimatch@npm:5.0.1" dependencies: - brace-expansion: ^1.1.7 - checksum: 2b1514e3d0f29a549912f0db7ae7b82c5cab4a8f2dd0369f1c6451a325b3f12b2cf473c95873b6157bb8df183d6cf6db82ff03614b6adaaf1d7e055beccdfd01 + brace-expansion: ^2.0.1 + checksum: b34b98463da4754bc526b244d680c69d4d6089451ebe512edaf6dd9eeed0279399cfa3edb19233513b8f830bf4bfcad911dddcdf125e75074100d52f724774f0 languageName: node linkType: hard @@ -10757,7 +8730,7 @@ __metadata: languageName: node linkType: hard -"minimist@npm:^1.2.0, minimist@npm:^1.2.5, minimist@npm:^1.2.6, minimist@npm:~1.2.6": +"minimist@npm:^1.2.0, minimist@npm:^1.2.5, minimist@npm:^1.2.6": version: 1.2.6 resolution: "minimist@npm:1.2.6" checksum: d15428cd1e11eb14e1233bcfb88ae07ed7a147de251441d61158619dfb32c4d7e9061d09cab4825fdee18ecd6fce323228c8c47b5ba7cd20af378ca4048fb3fb @@ -10853,16 +8826,6 @@ __metadata: languageName: node linkType: hard -"mixin-deep@npm:^1.2.0": - version: 1.3.2 - resolution: "mixin-deep@npm:1.3.2" - dependencies: - for-in: ^1.0.2 - is-extendable: ^1.0.1 - checksum: 820d5a51fcb7479f2926b97f2c3bb223546bc915e6b3a3eb5d906dda871bba569863595424a76682f2b15718252954644f3891437cb7e3f220949bed54b1750d - languageName: node - linkType: hard - "mixme@npm:^0.5.1": version: 0.5.4 resolution: "mixme@npm:0.5.4" @@ -10919,6 +8882,38 @@ __metadata: languageName: node linkType: hard +"mocha@npm:^10.0.0, mocha@npm:^10.2.0": + version: 10.2.0 + resolution: "mocha@npm:10.2.0" + dependencies: + ansi-colors: 4.1.1 + browser-stdout: 1.3.1 + chokidar: 3.5.3 + debug: 4.3.4 + diff: 5.0.0 + escape-string-regexp: 4.0.0 + find-up: 5.0.0 + glob: 7.2.0 + he: 1.2.0 + js-yaml: 4.1.0 + log-symbols: 4.1.0 + minimatch: 5.0.1 + ms: 2.1.3 + nanoid: 3.3.3 + serialize-javascript: 6.0.0 + strip-json-comments: 3.1.1 + supports-color: 8.1.1 + workerpool: 6.2.1 + yargs: 16.2.0 + yargs-parser: 20.2.4 + yargs-unparser: 2.0.0 + bin: + _mocha: bin/_mocha + mocha: bin/mocha.js + checksum: 406c45eab122ffd6ea2003c2f108b2bc35ba036225eee78e0c784b6fa2c7f34e2b13f1dbacef55a4fdf523255d76e4f22d1b5aacda2394bd11666febec17c719 + languageName: node + linkType: hard + "mocha@npm:^7.1.1": version: 7.2.0 resolution: "mocha@npm:7.2.0" @@ -10954,41 +8949,6 @@ __metadata: languageName: node linkType: hard -"mocha@npm:^9.2.0, mocha@npm:^9.2.2": - version: 9.2.2 - resolution: "mocha@npm:9.2.2" - dependencies: - "@ungap/promise-all-settled": 1.1.2 - ansi-colors: 4.1.1 - browser-stdout: 1.3.1 - chokidar: 3.5.3 - debug: 4.3.3 - diff: 5.0.0 - escape-string-regexp: 4.0.0 - find-up: 5.0.0 - glob: 7.2.0 - growl: 1.10.5 - he: 1.2.0 - js-yaml: 4.1.0 - log-symbols: 4.1.0 - minimatch: 4.2.1 - ms: 2.1.3 - nanoid: 3.3.1 - serialize-javascript: 6.0.0 - strip-json-comments: 3.1.1 - supports-color: 8.1.1 - which: 2.0.2 - workerpool: 6.2.0 - yargs: 16.2.0 - yargs-parser: 20.2.4 - yargs-unparser: 2.0.0 - bin: - _mocha: bin/_mocha - mocha: bin/mocha - checksum: 4d5ca4ce33fc66627e63acdf09a634e2358c9a00f61de7788b1091b6aad430da04f97f9ecb82d56dc034b623cb833b65576136fd010d77679c03fcea5bc1e12d - languageName: node - linkType: hard - "mock-fs@npm:^4.1.0": version: 4.14.0 resolution: "mock-fs@npm:4.14.0" @@ -10996,6 +8956,13 @@ __metadata: languageName: node linkType: hard +"module-error@npm:^1.0.1, module-error@npm:^1.0.2": + version: 1.0.2 + resolution: "module-error@npm:1.0.2" + checksum: 5d653e35bd55b3e95f8aee2cdac108082ea892e71b8f651be92cde43e4ee86abee4fa8bd7fc3fe5e68b63926d42f63c54cd17b87a560c31f18739295575a3962 + languageName: node + linkType: hard + "ms@npm:2.0.0": version: 2.0.0 resolution: "ms@npm:2.0.0" @@ -11097,12 +9064,12 @@ __metadata: languageName: node linkType: hard -"nanoid@npm:3.3.1": - version: 3.3.1 - resolution: "nanoid@npm:3.3.1" +"nanoid@npm:3.3.3": + version: 3.3.3 + resolution: "nanoid@npm:3.3.3" bin: nanoid: bin/nanoid.cjs - checksum: 4ef0969e1bbe866fc223eb32276cbccb0961900bfe79104fa5abe34361979dead8d0e061410a5c03bc3d47455685adf32c09d6f27790f4a6898fb51f7df7ec86 + checksum: ada019402a07464a694553c61d2dca8a4353645a7d92f2830f0d487fedff403678a0bee5323a46522752b2eab95a0bc3da98b6cccaa7c0c55cd9975130e6d6f0 languageName: node linkType: hard @@ -11115,22 +9082,10 @@ __metadata: languageName: node linkType: hard -"nanomatch@npm:^1.2.9": - version: 1.2.13 - resolution: "nanomatch@npm:1.2.13" - dependencies: - arr-diff: ^4.0.0 - array-unique: ^0.3.2 - define-property: ^2.0.2 - extend-shallow: ^3.0.2 - fragment-cache: ^0.2.1 - is-windows: ^1.0.2 - kind-of: ^6.0.2 - object.pick: ^1.3.0 - regex-not: ^1.0.0 - snapdragon: ^0.8.1 - to-regex: ^3.0.1 - checksum: 54d4166d6ef08db41252eb4e96d4109ebcb8029f0374f9db873bd91a1f896c32ec780d2a2ea65c0b2d7caf1f28d5e1ea33746a470f32146ac8bba821d80d38d8 +"napi-macros@npm:~2.0.0": + version: 2.0.0 + resolution: "napi-macros@npm:2.0.0" + checksum: 30384819386977c1f82034757014163fa60ab3c5a538094f778d38788bebb52534966279956f796a92ea771c7f8ae072b975df65de910d051ffbdc927f62320c languageName: node linkType: hard @@ -11169,13 +9124,6 @@ __metadata: languageName: node linkType: hard -"nice-try@npm:^1.0.4": - version: 1.0.5 - resolution: "nice-try@npm:1.0.5" - checksum: 0b4af3b5bb5d86c289f7a026303d192a7eb4417231fe47245c460baeabae7277bcd8fd9c728fb6bd62c30b3e15cd6620373e2cf33353b095d8b403d3e8a15aff - languageName: node - linkType: hard - "node-addon-api@npm:^2.0.0": version: 2.0.2 resolution: "node-addon-api@npm:2.0.2" @@ -11204,7 +9152,7 @@ __metadata: languageName: node linkType: hard -"node-fetch@npm:^2.6.1, node-fetch@npm:^2.6.7": +"node-fetch@npm:^2.6.7": version: 2.6.7 resolution: "node-fetch@npm:2.6.7" dependencies: @@ -11218,17 +9166,18 @@ __metadata: languageName: node linkType: hard -"node-fetch@npm:~1.7.1": - version: 1.7.3 - resolution: "node-fetch@npm:1.7.3" - dependencies: - encoding: ^0.1.11 - is-stream: ^1.0.1 - checksum: 3bb0528c05d541316ebe52770d71ee25a6dce334df4231fd55df41a644143e07f068637488c18a5b0c43f05041dbd3346752f9e19b50df50569a802484544d5b +"node-gyp-build@npm:4.3.0": + version: 4.3.0 + resolution: "node-gyp-build@npm:4.3.0" + bin: + node-gyp-build: bin.js + node-gyp-build-optional: optional.js + node-gyp-build-test: build-test.js + checksum: 1ecab16d9f275174d516e223f60f65ebe07540347d5c04a6a7d6921060b7f2e3af4f19463d9d1dcedc452e275c2ae71354a99405e55ebd5b655bb2f38025c728 languageName: node linkType: hard -"node-gyp-build@npm:^4.2.0, node-gyp-build@npm:^4.3.0": +"node-gyp-build@npm:4.4.0, node-gyp-build@npm:^4.2.0, node-gyp-build@npm:^4.3.0": version: 4.4.0 resolution: "node-gyp-build@npm:4.4.0" bin: @@ -11288,7 +9237,7 @@ __metadata: languageName: node linkType: hard -"normalize-package-data@npm:^2.3.2, normalize-package-data@npm:^2.5.0": +"normalize-package-data@npm:^2.5.0": version: 2.5.0 resolution: "normalize-package-data@npm:2.5.0" dependencies: @@ -11326,13 +9275,6 @@ __metadata: languageName: node linkType: hard -"number-is-nan@npm:^1.0.0": - version: 1.0.1 - resolution: "number-is-nan@npm:1.0.1" - checksum: 13656bc9aa771b96cef209ffca31c31a03b507ca6862ba7c3f638a283560620d723d52e626d57892c7fff475f4c36ac07f0600f14544692ff595abff214b9ffb - languageName: node - linkType: hard - "number-to-bn@npm:1.7.0": version: 1.7.0 resolution: "number-to-bn@npm:1.7.0" @@ -11350,41 +9292,20 @@ __metadata: languageName: node linkType: hard -"object-assign@npm:^4, object-assign@npm:^4.0.0, object-assign@npm:^4.1.0, object-assign@npm:^4.1.1": +"object-assign@npm:^4, object-assign@npm:^4.1.0, object-assign@npm:^4.1.1": version: 4.1.1 resolution: "object-assign@npm:4.1.1" checksum: fcc6e4ea8c7fe48abfbb552578b1c53e0d194086e2e6bbbf59e0a536381a292f39943c6e9628af05b5528aa5e3318bb30d6b2e53cadaf5b8fe9e12c4b69af23f languageName: node linkType: hard -"object-copy@npm:^0.1.0": - version: 0.1.0 - resolution: "object-copy@npm:0.1.0" - dependencies: - copy-descriptor: ^0.1.0 - define-property: ^0.2.5 - kind-of: ^3.0.3 - checksum: a9e35f07e3a2c882a7e979090360d1a20ab51d1fa19dfdac3aa8873b328a7c4c7683946ee97c824ae40079d848d6740a3788fa14f2185155dab7ed970a72c783 - languageName: node - linkType: hard - -"object-inspect@npm:^1.12.0, object-inspect@npm:^1.9.0, object-inspect@npm:~1.12.0": +"object-inspect@npm:^1.12.0, object-inspect@npm:^1.9.0": version: 1.12.0 resolution: "object-inspect@npm:1.12.0" checksum: 2b36d4001a9c921c6b342e2965734519c9c58c355822243c3207fbf0aac271f8d44d30d2d570d450b2cc6f0f00b72bcdba515c37827d2560e5f22b1899a31cf4 languageName: node linkType: hard -"object-is@npm:^1.0.1": - version: 1.1.5 - resolution: "object-is@npm:1.1.5" - dependencies: - call-bind: ^1.0.2 - define-properties: ^1.1.3 - checksum: 989b18c4cba258a6b74dc1d74a41805c1a1425bce29f6cabb50dcb1a6a651ea9104a1b07046739a49a5bb1bc49727bcb00efd5c55f932f6ea04ec8927a7901fe - languageName: node - linkType: hard - "object-keys@npm:^1.0.11, object-keys@npm:^1.0.12, object-keys@npm:^1.1.1": version: 1.1.1 resolution: "object-keys@npm:1.1.1" @@ -11392,22 +9313,6 @@ __metadata: languageName: node linkType: hard -"object-keys@npm:~0.4.0": - version: 0.4.0 - resolution: "object-keys@npm:0.4.0" - checksum: 1be3ebe9b48c0d5eda8e4a30657d887a748cb42435e0e2eaf49faf557bdd602cd2b7558b8ce90a4eb2b8592d16b875a1900bce859cbb0f35b21c67e11a45313c - languageName: node - linkType: hard - -"object-visit@npm:^1.0.0": - version: 1.0.1 - resolution: "object-visit@npm:1.0.1" - dependencies: - isobject: ^3.0.0 - checksum: b0ee07f5bf3bb881b881ff53b467ebbde2b37ebb38649d6944a6cd7681b32eedd99da9bd1e01c55facf81f54ed06b13af61aba6ad87f0052982995e09333f790 - languageName: node - linkType: hard - "object.assign@npm:4.1.0": version: 4.1.0 resolution: "object.assign@npm:4.1.0" @@ -11432,7 +9337,7 @@ __metadata: languageName: node linkType: hard -"object.getownpropertydescriptors@npm:^2.0.3, object.getownpropertydescriptors@npm:^2.1.1": +"object.getownpropertydescriptors@npm:^2.0.3": version: 2.1.3 resolution: "object.getownpropertydescriptors@npm:2.1.3" dependencies: @@ -11443,15 +9348,6 @@ __metadata: languageName: node linkType: hard -"object.pick@npm:^1.3.0": - version: 1.3.0 - resolution: "object.pick@npm:1.3.0" - dependencies: - isobject: ^3.0.1 - checksum: 77fb6eed57c67adf75e9901187e37af39f052ef601cb4480386436561357eb9e459e820762f01fd02c5c1b42ece839ad393717a6d1850d848ee11fbabb3e580a - languageName: node - linkType: hard - "object.values@npm:^1.1.5": version: 1.1.5 resolution: "object.values@npm:1.1.5" @@ -11470,15 +9366,6 @@ __metadata: languageName: node linkType: hard -"oboe@npm:2.1.4": - version: 2.1.4 - resolution: "oboe@npm:2.1.4" - dependencies: - http-https: ^1.0.0 - checksum: b9172453fba362aec86c45d7bcb4f512302bb23ef34c7c9c498974dc4e7ec0e298931bac5a093445fd946d5604e5dd16563e2d2ae922101ac4b47be2e18e30cc - languageName: node - linkType: hard - "oboe@npm:2.1.5": version: 2.1.5 resolution: "oboe@npm:2.1.5" @@ -11524,16 +9411,6 @@ __metadata: languageName: node linkType: hard -"open@npm:^7.4.2": - version: 7.4.2 - resolution: "open@npm:7.4.2" - dependencies: - is-docker: ^2.0.0 - is-wsl: ^2.1.1 - checksum: 3333900ec0e420d64c23b831bc3467e57031461d843c801f569b2204a1acc3cd7b3ec3c7897afc9dde86491dfa289708eb92bba164093d8bd88fb2c231843c91 - languageName: node - linkType: hard - "optionator@npm:^0.8.1": version: 0.8.3 resolution: "optionator@npm:0.8.3" @@ -11579,23 +9456,7 @@ __metadata: languageName: node linkType: hard -"os-homedir@npm:^1.0.0": - version: 1.0.2 - resolution: "os-homedir@npm:1.0.2" - checksum: af609f5a7ab72de2f6ca9be6d6b91a599777afc122ac5cad47e126c1f67c176fe9b52516b9eeca1ff6ca0ab8587fe66208bc85e40a3940125f03cdb91408e9d2 - languageName: node - linkType: hard - -"os-locale@npm:^1.4.0": - version: 1.4.0 - resolution: "os-locale@npm:1.4.0" - dependencies: - lcid: ^1.0.0 - checksum: 0161a1b6b5a8492f99f4b47fe465df9fc521c55ba5414fce6444c45e2500487b8ed5b40a47a98a2363fe83ff04ab033785300ed8df717255ec4c3b625e55b1fb - languageName: node - linkType: hard - -"os-tmpdir@npm:^1.0.1, os-tmpdir@npm:~1.0.2": +"os-tmpdir@npm:~1.0.2": version: 1.0.2 resolution: "os-tmpdir@npm:1.0.2" checksum: 5666560f7b9f10182548bf7013883265be33620b1c1b4a4d405c25be2636f970c5488ff3e6c48de75b55d02bde037249fe5dbfbb4c0fb7714953d56aed062e6d @@ -11777,15 +9638,6 @@ __metadata: languageName: node linkType: hard -"parse-json@npm:^2.2.0": - version: 2.2.0 - resolution: "parse-json@npm:2.2.0" - dependencies: - error-ex: ^1.2.0 - checksum: dda78a63e57a47b713a038630868538f718a7ca0cd172a36887b0392ccf544ed0374902eb28f8bf3409e8b71d62b79d17062f8543afccf2745f9b0b2d2bb80ca - languageName: node - linkType: hard - "parse-json@npm:^5.0.0": version: 5.2.0 resolution: "parse-json@npm:5.2.0" @@ -11805,58 +9657,6 @@ __metadata: languageName: node linkType: hard -"pascalcase@npm:^0.1.1": - version: 0.1.1 - resolution: "pascalcase@npm:0.1.1" - checksum: f83681c3c8ff75fa473a2bb2b113289952f802ff895d435edd717e7cb898b0408cbdb247117a938edcbc5d141020909846cc2b92c47213d764e2a94d2ad2b925 - languageName: node - linkType: hard - -"patch-package@npm:6.2.2": - version: 6.2.2 - resolution: "patch-package@npm:6.2.2" - dependencies: - "@yarnpkg/lockfile": ^1.1.0 - chalk: ^2.4.2 - cross-spawn: ^6.0.5 - find-yarn-workspace-root: ^1.2.1 - fs-extra: ^7.0.1 - is-ci: ^2.0.0 - klaw-sync: ^6.0.0 - minimist: ^1.2.0 - rimraf: ^2.6.3 - semver: ^5.6.0 - slash: ^2.0.0 - tmp: ^0.0.33 - bin: - patch-package: index.js - checksum: 5e2f49457b0dc56b5ce0a9d23e281e062e9f225d87a832540f02ffed29ffa7f298b1877daf13c16500ef8a759109c975e3d28d6bd63b0d953f349177abee1767 - languageName: node - linkType: hard - -"patch-package@npm:^6.2.2": - version: 6.4.7 - resolution: "patch-package@npm:6.4.7" - dependencies: - "@yarnpkg/lockfile": ^1.1.0 - chalk: ^2.4.2 - cross-spawn: ^6.0.5 - find-yarn-workspace-root: ^2.0.0 - fs-extra: ^7.0.1 - is-ci: ^2.0.0 - klaw-sync: ^6.0.0 - minimist: ^1.2.0 - open: ^7.4.2 - rimraf: ^2.6.3 - semver: ^5.6.0 - slash: ^2.0.0 - tmp: ^0.0.33 - bin: - patch-package: index.js - checksum: f36d5324da3b69ee635e7cd2c68f4d3dd89dc91d60ffdaad3b602fd953277f4da901c91033683bf6ff31c14799bc049849af3a389455c25d0435fe9cfb0d4088 - languageName: node - linkType: hard - "path-browserify@npm:^1.0.0, path-browserify@npm:^1.0.1": version: 1.0.1 resolution: "path-browserify@npm:1.0.1" @@ -11864,15 +9664,6 @@ __metadata: languageName: node linkType: hard -"path-exists@npm:^2.0.0": - version: 2.1.0 - resolution: "path-exists@npm:2.1.0" - dependencies: - pinkie-promise: ^2.0.0 - checksum: fdb734f1d00f225f7a0033ce6d73bff6a7f76ea08936abf0e5196fa6e54a645103538cd8aedcb90d6d8c3fa3705ded0c58a4da5948ae92aa8834892c1ab44a84 - languageName: node - linkType: hard - "path-exists@npm:^3.0.0": version: 3.0.0 resolution: "path-exists@npm:3.0.0" @@ -11887,20 +9678,13 @@ __metadata: languageName: node linkType: hard -"path-is-absolute@npm:^1.0.0, path-is-absolute@npm:^1.0.1": +"path-is-absolute@npm:^1.0.0": version: 1.0.1 resolution: "path-is-absolute@npm:1.0.1" checksum: 060840f92cf8effa293bcc1bea81281bd7d363731d214cbe5c227df207c34cd727430f70c6037b5159c8a870b9157cba65e775446b0ab06fd5ecc7e54615a3b8 languageName: node linkType: hard -"path-key@npm:^2.0.1": - version: 2.0.1 - resolution: "path-key@npm:2.0.1" - checksum: f7ab0ad42fe3fb8c7f11d0c4f849871e28fbd8e1add65c370e422512fc5887097b9cf34d09c1747d45c942a8c1e26468d6356e2df3f740bf177ab8ca7301ebfd - languageName: node - linkType: hard - "path-key@npm:^3.1.0": version: 3.1.1 resolution: "path-key@npm:3.1.1" @@ -11929,17 +9713,6 @@ __metadata: languageName: node linkType: hard -"path-type@npm:^1.0.0": - version: 1.1.0 - resolution: "path-type@npm:1.1.0" - dependencies: - graceful-fs: ^4.1.2 - pify: ^2.0.0 - pinkie-promise: ^2.0.0 - checksum: 59a4b2c0e566baf4db3021a1ed4ec09a8b36fca960a490b54a6bcefdb9987dafe772852982b6011cd09579478a96e57960a01f75fa78a794192853c9d468fc79 - languageName: node - linkType: hard - "path-type@npm:^4.0.0": version: 4.0.0 resolution: "path-type@npm:4.0.0" @@ -11988,13 +9761,6 @@ __metadata: languageName: node linkType: hard -"pify@npm:^2.0.0, pify@npm:^2.3.0": - version: 2.3.0 - resolution: "pify@npm:2.3.0" - checksum: 9503aaeaf4577acc58642ad1d25c45c6d90288596238fb68f82811c08104c800e5a7870398e9f015d82b44ecbcbef3dc3d4251a1cbb582f6e5959fe09884b2ba - languageName: node - linkType: hard - "pify@npm:^4.0.1": version: 4.0.1 resolution: "pify@npm:4.0.1" @@ -12002,22 +9768,6 @@ __metadata: languageName: node linkType: hard -"pinkie-promise@npm:^2.0.0": - version: 2.0.1 - resolution: "pinkie-promise@npm:2.0.1" - dependencies: - pinkie: ^2.0.0 - checksum: b53a4a2e73bf56b6f421eef711e7bdcb693d6abb474d57c5c413b809f654ba5ee750c6a96dd7225052d4b96c4d053cdcb34b708a86fceed4663303abee52fcca - languageName: node - linkType: hard - -"pinkie@npm:^2.0.0": - version: 2.0.4 - resolution: "pinkie@npm:2.0.4" - checksum: b12b10afea1177595aab036fc220785488f67b4b0fc49e7a27979472592e971614fa1c728e63ad3e7eb748b4ec3c3dbd780819331dad6f7d635c77c10537b9db - languageName: node - linkType: hard - "pkg-dir@npm:^4.2.0": version: 4.2.0 resolution: "pkg-dir@npm:4.2.0" @@ -12027,13 +9777,6 @@ __metadata: languageName: node linkType: hard -"posix-character-classes@npm:^0.1.0": - version: 0.1.1 - resolution: "posix-character-classes@npm:0.1.1" - checksum: dedb99913c60625a16050cfed2fb5c017648fc075be41ac18474e1c6c3549ef4ada201c8bd9bd006d36827e289c571b6092e1ef6e756cdbab2fd7046b25c6442 - languageName: node - linkType: hard - "postcss@npm:^8.4.16": version: 8.4.16 resolution: "postcss@npm:8.4.16" @@ -12045,20 +9788,6 @@ __metadata: languageName: node linkType: hard -"postinstall-postinstall@npm:^2.1.0": - version: 2.1.0 - resolution: "postinstall-postinstall@npm:2.1.0" - checksum: e1d34252cf8d2c5641c7d2db7426ec96e3d7a975f01c174c68f09ef5b8327bc8d5a9aa2001a45e693db2cdbf69577094d3fe6597b564ad2d2202b65fba76134b - languageName: node - linkType: hard - -"precond@npm:0.2": - version: 0.2.3 - resolution: "precond@npm:0.2.3" - checksum: c613e7d68af3e0b43a294a994bf067cc2bc44b03fd17bc4fb133e30617a4f5b49414b08e9b392d52d7c6822d8a71f66a7fe93a8a1e7d02240177202cff3f63ef - languageName: node - linkType: hard - "preferred-pm@npm:^3.0.0": version: 3.0.3 resolution: "preferred-pm@npm:3.0.3" @@ -12117,7 +9846,7 @@ __metadata: languageName: node linkType: hard -"prettier@npm:^2.1.2, prettier@npm:^2.3.1": +"prettier@npm:^2.3.1": version: 2.6.2 resolution: "prettier@npm:2.6.2" bin: @@ -12126,13 +9855,6 @@ __metadata: languageName: node linkType: hard -"private@npm:^0.1.6, private@npm:^0.1.8": - version: 0.1.8 - resolution: "private@npm:0.1.8" - checksum: a00abd713d25389f6de7294f0e7879b8a5d09a9ec5fd81cc2f21b29d4f9a80ec53bc4222927d3a281d4aadd4cd373d9a28726fca3935921950dc75fd71d1fdbb - languageName: node - linkType: hard - "process-nextick-args@npm:~2.0.0": version: 2.0.1 resolution: "process-nextick-args@npm:2.0.1" @@ -12164,16 +9886,6 @@ __metadata: languageName: node linkType: hard -"promise-to-callback@npm:^1.0.0": - version: 1.0.0 - resolution: "promise-to-callback@npm:1.0.0" - dependencies: - is-fn: ^1.0.0 - set-immediate-shim: ^1.0.1 - checksum: 8c9e1327386e00f799589cdf96fff2586a13b52b0185222bc3199e1305ba9344589eedfd4038dcbaf5592d85d567097d1507b81e948b7fff6ffdd3de49d54e14 - languageName: node - linkType: hard - "promise@npm:^8.0.0": version: 8.1.0 resolution: "promise@npm:8.1.0" @@ -12200,7 +9912,7 @@ __metadata: languageName: node linkType: hard -"pseudomap@npm:^1.0.1, pseudomap@npm:^1.0.2": +"pseudomap@npm:^1.0.2": version: 1.0.2 resolution: "pseudomap@npm:1.0.2" checksum: 856c0aae0ff2ad60881168334448e898ad7a0e45fe7386d114b150084254c01e200c957cf378378025df4e052c7890c5bd933939b0e0d2ecfcc1dc2f0b2991f5 @@ -12228,68 +9940,6 @@ __metadata: languageName: node linkType: hard -"pull-cat@npm:^1.1.9": - version: 1.1.11 - resolution: "pull-cat@npm:1.1.11" - checksum: 785173d94732ba5e6e65f27ee128542522aeb87519c5d72aa9b8bc510f6c4f67b91fcfd565782a20aafc116e57354f2dd0fa8fd039b45a61b8da89b0253a7440 - languageName: node - linkType: hard - -"pull-defer@npm:^0.2.2": - version: 0.2.3 - resolution: "pull-defer@npm:0.2.3" - checksum: 4ea99ed64a2d79167e87293aba5088cde91f210a319c690a65aa6704d829be33b76cecc732f8d4ed3eee47e7eb09a6f77042897ea6414862bacbd722ce182d66 - languageName: node - linkType: hard - -"pull-level@npm:^2.0.3": - version: 2.0.4 - resolution: "pull-level@npm:2.0.4" - dependencies: - level-post: ^1.0.7 - pull-cat: ^1.1.9 - pull-live: ^1.0.1 - pull-pushable: ^2.0.0 - pull-stream: ^3.4.0 - pull-window: ^2.1.4 - stream-to-pull-stream: ^1.7.1 - checksum: f4e0573b3ff3f3659eb50ac86b505aee12d5f4c1d8bafc3bf6fd67d173b3b39a3fe5161d8bfa5eba8a0c5873fbda75f3b160276cfa678d5edd517dcd3349ecc2 - languageName: node - linkType: hard - -"pull-live@npm:^1.0.1": - version: 1.0.1 - resolution: "pull-live@npm:1.0.1" - dependencies: - pull-cat: ^1.1.9 - pull-stream: ^3.4.0 - checksum: e4328771e811aec1e03996d1070ec8fecb2560cc48b96814cd9f4aebd870a710903f8693e423765d3d65d8021b3b9ccc38c8660baef3df45e217c9b1bbc5581a - languageName: node - linkType: hard - -"pull-pushable@npm:^2.0.0": - version: 2.2.0 - resolution: "pull-pushable@npm:2.2.0" - checksum: 1c88ef55f6f14799ae5cf060415d089d15452ef865d874f075c155f8224c321371cb7f04a10b3fba263b6f128158c78253efd18bcb54afbb99f9cae846f883a6 - languageName: node - linkType: hard - -"pull-stream@npm:^3.2.3, pull-stream@npm:^3.4.0, pull-stream@npm:^3.6.8": - version: 3.6.14 - resolution: "pull-stream@npm:3.6.14" - checksum: fc3d86d488894cdf1f980848886be54d8c9cf16a982e9f651098e673bf0134dd1be9b02435f59afe5b48d479c6bafb828348f7fac95fd4593633bffefdfb7503 - languageName: node - linkType: hard - -"pull-window@npm:^2.1.4": - version: 2.1.4 - resolution: "pull-window@npm:2.1.4" - dependencies: - looper: ^2.0.0 - checksum: e006995108a80c81eea93dfaadf68285dc5b9b3cbaf654da39731ca3f308376f15b0546c61730cd0fa38303e273a1845c6d65f0fda35ed9c66252a65e446df18 - languageName: node - linkType: hard - "pump@npm:^3.0.0": version: 3.0.0 resolution: "pump@npm:3.0.0" @@ -12362,7 +10012,7 @@ __metadata: languageName: node linkType: hard -"queue-microtask@npm:^1.2.2": +"queue-microtask@npm:^1.2.2, queue-microtask@npm:^1.2.3": version: 1.2.3 resolution: "queue-microtask@npm:1.2.3" checksum: b676f8c040cdc5b12723ad2f91414d267605b26419d5c821ff03befa817ddd10e238d22b25d604920340fd73efd8ba795465a0377c4adf45a4a41e4234e42dc4 @@ -12376,7 +10026,7 @@ __metadata: languageName: node linkType: hard -"randombytes@npm:^2.0.0, randombytes@npm:^2.0.1, randombytes@npm:^2.0.5, randombytes@npm:^2.0.6, randombytes@npm:^2.1.0": +"randombytes@npm:^2.0.0, randombytes@npm:^2.0.1, randombytes@npm:^2.0.5, randombytes@npm:^2.1.0": version: 2.1.0 resolution: "randombytes@npm:2.1.0" dependencies: @@ -12426,16 +10076,6 @@ __metadata: languageName: node linkType: hard -"read-pkg-up@npm:^1.0.1": - version: 1.0.1 - resolution: "read-pkg-up@npm:1.0.1" - dependencies: - find-up: ^1.0.0 - read-pkg: ^1.0.0 - checksum: d18399a0f46e2da32beb2f041edd0cda49d2f2cc30195a05c759ef3ed9b5e6e19ba1ad1bae2362bdec8c6a9f2c3d18f4d5e8c369e808b03d498d5781cb9122c7 - languageName: node - linkType: hard - "read-pkg-up@npm:^7.0.1": version: 7.0.1 resolution: "read-pkg-up@npm:7.0.1" @@ -12447,17 +10087,6 @@ __metadata: languageName: node linkType: hard -"read-pkg@npm:^1.0.0": - version: 1.1.0 - resolution: "read-pkg@npm:1.1.0" - dependencies: - load-json-file: ^1.0.0 - normalize-package-data: ^2.3.2 - path-type: ^1.0.0 - checksum: a0f5d5e32227ec8e6a028dd5c5134eab229768dcb7a5d9a41a284ed28ad4b9284fecc47383dc1593b5694f4de603a7ffaee84b738956b9b77e0999567485a366 - languageName: node - linkType: hard - "read-pkg@npm:^5.2.0": version: 5.2.0 resolution: "read-pkg@npm:5.2.0" @@ -12482,19 +10111,7 @@ __metadata: languageName: node linkType: hard -"readable-stream@npm:^1.0.33": - version: 1.1.14 - resolution: "readable-stream@npm:1.1.14" - dependencies: - core-util-is: ~1.0.0 - inherits: ~2.0.1 - isarray: 0.0.1 - string_decoder: ~0.10.x - checksum: 17dfeae3e909945a4a1abc5613ea92d03269ef54c49288599507fc98ff4615988a1c39a999dcf9aacba70233d9b7040bc11a5f2bfc947e262dedcc0a8b32b5a0 - languageName: node - linkType: hard - -"readable-stream@npm:^2.0.0, readable-stream@npm:^2.0.5, readable-stream@npm:^2.2.2, readable-stream@npm:^2.2.8, readable-stream@npm:^2.2.9, readable-stream@npm:^2.3.6, readable-stream@npm:~2.3.6": +"readable-stream@npm:^2.2.2": version: 2.3.7 resolution: "readable-stream@npm:2.3.7" dependencies: @@ -12509,7 +10126,7 @@ __metadata: languageName: node linkType: hard -"readable-stream@npm:^3.0.6, readable-stream@npm:^3.1.0, readable-stream@npm:^3.4.0, readable-stream@npm:^3.6.0": +"readable-stream@npm:^3.1.0, readable-stream@npm:^3.4.0, readable-stream@npm:^3.6.0": version: 3.6.0 resolution: "readable-stream@npm:3.6.0" dependencies: @@ -12520,18 +10137,6 @@ __metadata: languageName: node linkType: hard -"readable-stream@npm:~1.0.15": - version: 1.0.34 - resolution: "readable-stream@npm:1.0.34" - dependencies: - core-util-is: ~1.0.0 - inherits: ~2.0.1 - isarray: 0.0.1 - string_decoder: ~0.10.x - checksum: 85042c537e4f067daa1448a7e257a201070bfec3dd2706abdbd8ebc7f3418eb4d3ed4b8e5af63e2544d69f88ab09c28d5da3c0b77dc76185fddd189a59863b60 - languageName: node - linkType: hard - "readdirp@npm:~3.2.0": version: 3.2.0 resolution: "readdirp@npm:3.2.0" @@ -12579,131 +10184,34 @@ __metadata: linkType: hard "reduce-flatten@npm:^2.0.0": - version: 2.0.0 - resolution: "reduce-flatten@npm:2.0.0" - checksum: 64393ef99a16b20692acfd60982d7fdbd7ff8d9f8f185c6023466444c6dd2abb929d67717a83cec7f7f8fb5f46a25d515b3b2bf2238fdbfcdbfd01d2a9e73cb8 - languageName: node - linkType: hard - -"regenerate@npm:^1.2.1": - version: 1.4.2 - resolution: "regenerate@npm:1.4.2" - checksum: 3317a09b2f802da8db09aa276e469b57a6c0dd818347e05b8862959c6193408242f150db5de83c12c3fa99091ad95fb42a6db2c3329bfaa12a0ea4cbbeb30cb0 - languageName: node - linkType: hard - -"regenerator-runtime@npm:^0.11.0": - version: 0.11.1 - resolution: "regenerator-runtime@npm:0.11.1" - checksum: 3c97bd2c7b2b3247e6f8e2147a002eb78c995323732dad5dc70fac8d8d0b758d0295e7015b90d3d444446ae77cbd24b9f9123ec3a77018e81d8999818301b4f4 - languageName: node - linkType: hard - -"regenerator-runtime@npm:^0.13.4": - version: 0.13.9 - resolution: "regenerator-runtime@npm:0.13.9" - checksum: 65ed455fe5afd799e2897baf691ca21c2772e1a969d19bb0c4695757c2d96249eb74ee3553ea34a91062b2a676beedf630b4c1551cc6299afb937be1426ec55e - languageName: node - linkType: hard - -"regenerator-transform@npm:^0.10.0": - version: 0.10.1 - resolution: "regenerator-transform@npm:0.10.1" - dependencies: - babel-runtime: ^6.18.0 - babel-types: ^6.19.0 - private: ^0.1.6 - checksum: bd366a3b0fa0d0975c48fb9eff250363a9ab28c25b472ecdc397bb19a836746640a30d8f641718a895f9178564bd8a01a0179a9c8e5813f76fc29e62a115d9d7 - languageName: node - linkType: hard - -"regex-not@npm:^1.0.0, regex-not@npm:^1.0.2": - version: 1.0.2 - resolution: "regex-not@npm:1.0.2" - dependencies: - extend-shallow: ^3.0.2 - safe-regex: ^1.1.0 - checksum: 3081403de79559387a35ef9d033740e41818a559512668cef3d12da4e8a29ef34ee13c8ed1256b07e27ae392790172e8a15c8a06b72962fd4550476cde3d8f77 - languageName: node - linkType: hard - -"regexp.prototype.flags@npm:^1.2.0": - version: 1.4.1 - resolution: "regexp.prototype.flags@npm:1.4.1" - dependencies: - call-bind: ^1.0.2 - define-properties: ^1.1.3 - checksum: 77944a3ea5ae84f391fa80bff9babfedc47eadc9dc38e282b5fd746368fb787deec89c68ce3114195bf6b5782b160280a278b62d41ccc6e125afab1a7f816de8 - languageName: node - linkType: hard - -"regexp.prototype.flags@npm:^1.4.3": - version: 1.4.3 - resolution: "regexp.prototype.flags@npm:1.4.3" - dependencies: - call-bind: ^1.0.2 - define-properties: ^1.1.3 - functions-have-names: ^1.2.2 - checksum: 51228bae732592adb3ededd5e15426be25f289e9c4ef15212f4da73f4ec3919b6140806374b8894036a86020d054a8d2657d3fee6bb9b4d35d8939c20030b7a6 - languageName: node - linkType: hard - -"regexpp@npm:^3.0.0, regexpp@npm:^3.2.0": - version: 3.2.0 - resolution: "regexpp@npm:3.2.0" - checksum: a78dc5c7158ad9ddcfe01aa9144f46e192ddbfa7b263895a70a5c6c73edd9ce85faf7c0430e59ac38839e1734e275b9c3de5c57ee3ab6edc0e0b1bdebefccef8 - languageName: node - linkType: hard - -"regexpu-core@npm:^2.0.0": - version: 2.0.0 - resolution: "regexpu-core@npm:2.0.0" - dependencies: - regenerate: ^1.2.1 - regjsgen: ^0.2.0 - regjsparser: ^0.1.4 - checksum: 14a78eb4608fa991ded6a1433ee6a570f95a4cfb7fe312145a44d6ecbb3dc8c707016a099494c741aa0ac75a1329b40814d30ff134c0d67679c80187029c7d2d - languageName: node - linkType: hard - -"regjsgen@npm:^0.2.0": - version: 0.2.0 - resolution: "regjsgen@npm:0.2.0" - checksum: 1f3ae570151e2c29193cdc5a5890c0b83cd8c5029ed69315b0ea303bc2644f9ab5d536d2288fd9b70293fd351d7dd7fc1fc99ebe24554015c894dbce883bcf2b - languageName: node - linkType: hard - -"regjsparser@npm:^0.1.4": - version: 0.1.5 - resolution: "regjsparser@npm:0.1.5" - dependencies: - jsesc: ~0.5.0 - bin: - regjsparser: bin/parser - checksum: 1feba2f3f2d4f1ef9f5f4e0f20c827cf866d4f65c51502eb64db4d4dd9c656f8c70f6c79537c892bf0fc9592c96f732519f7d8ad4a82f3b622756118ac737970 + version: 2.0.0 + resolution: "reduce-flatten@npm:2.0.0" + checksum: 64393ef99a16b20692acfd60982d7fdbd7ff8d9f8f185c6023466444c6dd2abb929d67717a83cec7f7f8fb5f46a25d515b3b2bf2238fdbfcdbfd01d2a9e73cb8 languageName: node linkType: hard -"repeat-element@npm:^1.1.2": - version: 1.1.4 - resolution: "repeat-element@npm:1.1.4" - checksum: 1edd0301b7edad71808baad226f0890ba709443f03a698224c9ee4f2494c317892dc5211b2ba8cbea7194a9ddbcac01e283bd66de0467ab24ee1fc1a3711d8a9 +"regenerator-runtime@npm:^0.13.4": + version: 0.13.9 + resolution: "regenerator-runtime@npm:0.13.9" + checksum: 65ed455fe5afd799e2897baf691ca21c2772e1a969d19bb0c4695757c2d96249eb74ee3553ea34a91062b2a676beedf630b4c1551cc6299afb937be1426ec55e languageName: node linkType: hard -"repeat-string@npm:^1.6.1": - version: 1.6.1 - resolution: "repeat-string@npm:1.6.1" - checksum: 1b809fc6db97decdc68f5b12c4d1a671c8e3f65ec4a40c238bc5200e44e85bcc52a54f78268ab9c29fcf5fe4f1343e805420056d1f30fa9a9ee4c2d93e3cc6c0 +"regexp.prototype.flags@npm:^1.4.3": + version: 1.4.3 + resolution: "regexp.prototype.flags@npm:1.4.3" + dependencies: + call-bind: ^1.0.2 + define-properties: ^1.1.3 + functions-have-names: ^1.2.2 + checksum: 51228bae732592adb3ededd5e15426be25f289e9c4ef15212f4da73f4ec3919b6140806374b8894036a86020d054a8d2657d3fee6bb9b4d35d8939c20030b7a6 languageName: node linkType: hard -"repeating@npm:^2.0.0": - version: 2.0.1 - resolution: "repeating@npm:2.0.1" - dependencies: - is-finite: ^1.0.0 - checksum: d2db0b69c5cb0c14dd750036e0abcd6b3c3f7b2da3ee179786b755cf737ca15fa0fff417ca72de33d6966056f4695440e680a352401fc02c95ade59899afbdd0 +"regexpp@npm:^3.0.0, regexpp@npm:^3.2.0": + version: 3.2.0 + resolution: "regexpp@npm:3.2.0" + checksum: a78dc5c7158ad9ddcfe01aa9144f46e192ddbfa7b263895a70a5c6c73edd9ce85faf7c0430e59ac38839e1734e275b9c3de5c57ee3ab6edc0e0b1bdebefccef8 languageName: node linkType: hard @@ -12784,13 +10292,6 @@ __metadata: languageName: node linkType: hard -"require-from-string@npm:^1.1.0": - version: 1.2.1 - resolution: "require-from-string@npm:1.2.1" - checksum: d2e0b0c798fe45d86456a32425635bd9d2a75a20e87f67294fa5cce5ed61fdf41e0c7c57afa981fb836299bfb0c37c915adb4d22478dc8d12edbf80a304e9324 - languageName: node - linkType: hard - "require-from-string@npm:^2.0.0": version: 2.0.2 resolution: "require-from-string@npm:2.0.2" @@ -12798,13 +10299,6 @@ __metadata: languageName: node linkType: hard -"require-main-filename@npm:^1.0.1": - version: 1.0.1 - resolution: "require-main-filename@npm:1.0.1" - checksum: 1fef30754da961f4e13c450c3eb60c7ae898a529c6ad6fa708a70bd2eed01564ceb299187b2899f5562804d797a059f39a5789884d0ac7b7ae1defc68fba4abf - languageName: node - linkType: hard - "require-main-filename@npm:^2.0.0": version: 2.0.0 resolution: "require-main-filename@npm:2.0.0" @@ -12840,13 +10334,6 @@ __metadata: languageName: node linkType: hard -"resolve-url@npm:^0.2.1": - version: 0.2.1 - resolution: "resolve-url@npm:0.2.1" - checksum: 7b7035b9ed6e7bc7d289e90aef1eab5a43834539695dac6416ca6e91f1a94132ae4796bbd173cdacfdc2ade90b5f38a3fb6186bebc1b221cd157777a23b9ad14 - languageName: node - linkType: hard - "resolve@npm:1.1.x": version: 1.1.7 resolution: "resolve@npm:1.1.7" @@ -12863,7 +10350,7 @@ __metadata: languageName: node linkType: hard -"resolve@npm:^1.1.6, resolve@npm:^1.10.0, resolve@npm:^1.10.1, resolve@npm:^1.20.0, resolve@npm:^1.22.0, resolve@npm:^1.8.1, resolve@npm:~1.22.0": +"resolve@npm:^1.1.6, resolve@npm:^1.10.0, resolve@npm:^1.10.1, resolve@npm:^1.20.0, resolve@npm:^1.22.0": version: 1.22.0 resolution: "resolve@npm:1.22.0" dependencies: @@ -12915,7 +10402,7 @@ __metadata: languageName: node linkType: hard -"resolve@patch:resolve@^1.1.6#~builtin, resolve@patch:resolve@^1.10.0#~builtin, resolve@patch:resolve@^1.10.1#~builtin, resolve@patch:resolve@^1.20.0#~builtin, resolve@patch:resolve@^1.22.0#~builtin, resolve@patch:resolve@^1.8.1#~builtin, resolve@patch:resolve@~1.22.0#~builtin": +"resolve@patch:resolve@^1.1.6#~builtin, resolve@patch:resolve@^1.10.0#~builtin, resolve@patch:resolve@^1.10.1#~builtin, resolve@patch:resolve@^1.20.0#~builtin, resolve@patch:resolve@^1.22.0#~builtin": version: 1.22.0 resolution: "resolve@patch:resolve@npm%3A1.22.0#~builtin::version=1.22.0&hash=07638b" dependencies: @@ -12970,22 +10457,6 @@ __metadata: languageName: node linkType: hard -"resumer@npm:~0.0.0": - version: 0.0.0 - resolution: "resumer@npm:0.0.0" - dependencies: - through: ~2.3.4 - checksum: 21b1c257aac24840643fae9bc99ca6447a71a0039e7c6dcf64d0ead447ce511eff158d529f1b6258ad12668e66ee3e49ff14932d2b88a3bd578f483e79708104 - languageName: node - linkType: hard - -"ret@npm:~0.1.10": - version: 0.1.15 - resolution: "ret@npm:0.1.15" - checksum: d76a9159eb8c946586567bd934358dfc08a36367b3257f7a3d7255fdd7b56597235af23c6afa0d7f0254159e8051f93c918809962ebd6df24ca2a83dbe4d4151 - languageName: node - linkType: hard - "retry@npm:^0.12.0": version: 0.12.0 resolution: "retry@npm:0.12.0" @@ -13000,7 +10471,7 @@ __metadata: languageName: node linkType: hard -"rimraf@npm:^2.2.8, rimraf@npm:^2.6.2, rimraf@npm:^2.6.3": +"rimraf@npm:^2.2.8, rimraf@npm:^2.6.2": version: 2.7.1 resolution: "rimraf@npm:2.7.1" dependencies: @@ -13032,7 +10503,18 @@ __metadata: languageName: node linkType: hard -"rlp@npm:^2.0.0, rlp@npm:^2.2.1, rlp@npm:^2.2.2, rlp@npm:^2.2.3, rlp@npm:^2.2.4": +"rlp@npm:2.2.6": + version: 2.2.6 + resolution: "rlp@npm:2.2.6" + dependencies: + bn.js: ^4.11.1 + bin: + rlp: bin/rlp + checksum: 2601225df0fe7aa3b497b33a12fd9fbaf8fb1d2989ecc5c091918ed93ee77d1c3fab20ddd3891a9ca66a8ba66d993e6079be6fb31f450fcf38ba30873102ca46 + languageName: node + linkType: hard + +"rlp@npm:^2.0.0, rlp@npm:^2.2.3, rlp@npm:^2.2.4": version: 2.2.7 resolution: "rlp@npm:2.2.7" dependencies: @@ -13064,6 +10546,15 @@ __metadata: languageName: node linkType: hard +"run-parallel-limit@npm:^1.1.0": + version: 1.1.0 + resolution: "run-parallel-limit@npm:1.1.0" + dependencies: + queue-microtask: ^1.2.2 + checksum: 672c3b87e7f939c684b9965222b361421db0930223ed1e43ebf0e7e48ccc1a022ea4de080bef4d5468434e2577c33b7681e3f03b7593fdc49ad250a55381123c + languageName: node + linkType: hard + "run-parallel@npm:^1.1.9": version: 1.2.0 resolution: "run-parallel@npm:1.2.0" @@ -13103,24 +10594,6 @@ __metadata: languageName: node linkType: hard -"safe-event-emitter@npm:^1.0.1": - version: 1.0.1 - resolution: "safe-event-emitter@npm:1.0.1" - dependencies: - events: ^3.0.0 - checksum: 2a15094bd28b0966571693f219b5a846949ae24f7ba87c6024f0ed552bef63ebe72970a784b85b77b1f03f1c95e78fabe19306d44538dbc4a3a685bed31c18c4 - languageName: node - linkType: hard - -"safe-regex@npm:^1.1.0": - version: 1.1.0 - resolution: "safe-regex@npm:1.1.0" - dependencies: - ret: ~0.1.10 - checksum: 9a8bba57c87a841f7997b3b951e8e403b1128c1a4fd1182f40cc1a20e2d490593d7c2a21030fadfea320c8e859219019e136f678c6689ed5960b391b822f01d5 - languageName: node - linkType: hard - "safer-buffer@npm:>= 2.1.2 < 3, safer-buffer@npm:>= 2.1.2 < 3.0.0, safer-buffer@npm:^2.0.2, safer-buffer@npm:^2.1.0, safer-buffer@npm:~2.1.0": version: 2.1.2 resolution: "safer-buffer@npm:2.1.2" @@ -13166,12 +10639,15 @@ __metadata: languageName: node linkType: hard -"scryptsy@npm:^1.2.1": - version: 1.2.1 - resolution: "scryptsy@npm:1.2.1" +"secp256k1@npm:4.0.3, secp256k1@npm:^4.0.1": + version: 4.0.3 + resolution: "secp256k1@npm:4.0.3" dependencies: - pbkdf2: ^3.0.3 - checksum: e09cf253b0974171bbcb77fa46405bb07cb8e241e2851fc5f23b38526a33105f0f7748a4d60027642f40bd4518ada30b1dce5005c05d17a25cbcefad371d4259 + elliptic: ^6.5.4 + node-addon-api: ^2.0.0 + node-gyp: latest + node-gyp-build: ^4.2.0 + checksum: 21e219adc0024fbd75021001358780a3cc6ac21273c3fcaef46943af73969729709b03f1df7c012a0baab0830fb9a06ccc6b42f8d50050c665cb98078eab477b languageName: node linkType: hard @@ -13192,22 +10668,10 @@ __metadata: languageName: node linkType: hard -"secp256k1@npm:^4.0.1": - version: 4.0.3 - resolution: "secp256k1@npm:4.0.3" - dependencies: - elliptic: ^6.5.4 - node-addon-api: ^2.0.0 - node-gyp: latest - node-gyp-build: ^4.2.0 - checksum: 21e219adc0024fbd75021001358780a3cc6ac21273c3fcaef46943af73969729709b03f1df7c012a0baab0830fb9a06ccc6b42f8d50050c665cb98078eab477b - languageName: node - linkType: hard - -"seedrandom@npm:3.0.1": - version: 3.0.1 - resolution: "seedrandom@npm:3.0.1" - checksum: a8f5bd0e918c4d4b59afd6f5dbd28f5ab8d5f118ee59892c3712f581de51574ac6622aa38fa2d03476b661f8407e98d6ff32af3d7cfdb02c90d046e7f5f91952 +"seedrandom@npm:3.0.5": + version: 3.0.5 + resolution: "seedrandom@npm:3.0.5" + checksum: 728b56bc3bc1b9ddeabd381e449b51cb31bdc0aa86e27fcd0190cea8c44613d5bcb2f6bb63ed79f78180cbe791c20b8ec31a9627f7b7fc7f476fd2bdb7e2da9f languageName: node linkType: hard @@ -13218,14 +10682,7 @@ __metadata: languageName: node linkType: hard -"semaphore@npm:>=1.0.1, semaphore@npm:^1.0.3, semaphore@npm:^1.1.0": - version: 1.1.0 - resolution: "semaphore@npm:1.1.0" - checksum: d2445d232ad9959048d4748ef54eb01bc7b60436be2b42fb7de20c4cffacf70eafeeecd3772c1baf408cfdce3805fa6618a4389590335671f18cde54ef3cfae4 - languageName: node - linkType: hard - -"semver@npm:2 || 3 || 4 || 5, semver@npm:^5.3.0, semver@npm:^5.4.1, semver@npm:^5.5.0, semver@npm:^5.6.0, semver@npm:^5.7.0": +"semver@npm:2 || 3 || 4 || 5, semver@npm:^5.4.1, semver@npm:^5.5.0, semver@npm:^5.7.0": version: 5.7.1 resolution: "semver@npm:5.7.1" bin: @@ -13265,15 +10722,6 @@ __metadata: languageName: node linkType: hard -"semver@npm:~5.4.1": - version: 5.4.1 - resolution: "semver@npm:5.4.1" - bin: - semver: ./bin/semver - checksum: d4bf8cc6a95b065a545ab35082b6ac6c5f4ebe1e1c570f72c252afe9b7e622f2479fb2a5cef3e937d8807d37bfdad2d1feebcc8610e06f556e552c22cad070a2 - languageName: node - linkType: hard - "send@npm:0.17.2": version: 0.17.2 resolution: "send@npm:0.17.2" @@ -13336,25 +10784,6 @@ __metadata: languageName: node linkType: hard -"set-immediate-shim@npm:^1.0.1": - version: 1.0.1 - resolution: "set-immediate-shim@npm:1.0.1" - checksum: 5085c84039d1e5eee73d2bf48ce765fcec76159021d0cc7b40e23bcdf62cb6d450ffb781e3c62c1118425242c48eae96df712cba0a20a437e86b0d4a15d51a11 - languageName: node - linkType: hard - -"set-value@npm:^2.0.0, set-value@npm:^2.0.1": - version: 2.0.1 - resolution: "set-value@npm:2.0.1" - dependencies: - extend-shallow: ^2.0.1 - is-extendable: ^0.1.1 - is-plain-object: ^2.0.3 - split-string: ^3.0.1 - checksum: 09a4bc72c94641aeae950eb60dc2755943b863780fcc32e441eda964b64df5e3f50603d5ebdd33394ede722528bd55ed43aae26e9df469b4d32e2292b427b601 - languageName: node - linkType: hard - "setimmediate@npm:1.0.4": version: 1.0.4 resolution: "setimmediate@npm:1.0.4" @@ -13479,20 +10908,6 @@ __metadata: languageName: node linkType: hard -"slash@npm:^1.0.0": - version: 1.0.0 - resolution: "slash@npm:1.0.0" - checksum: 4b6e21b1fba6184a7e2efb1dd173f692d8a845584c1bbf9dc818ff86f5a52fc91b413008223d17cc684604ee8bb9263a420b1182027ad9762e35388434918860 - languageName: node - linkType: hard - -"slash@npm:^2.0.0": - version: 2.0.0 - resolution: "slash@npm:2.0.0" - checksum: 512d4350735375bd11647233cb0e2f93beca6f53441015eea241fe784d8068281c3987fbaa93e7ef1c38df68d9c60013045c92837423c69115297d6169aa85e6 - languageName: node - linkType: hard - "slash@npm:^3.0.0": version: 3.0.0 resolution: "slash@npm:3.0.0" @@ -13523,42 +10938,6 @@ __metadata: languageName: node linkType: hard -"snapdragon-node@npm:^2.0.1": - version: 2.1.1 - resolution: "snapdragon-node@npm:2.1.1" - dependencies: - define-property: ^1.0.0 - isobject: ^3.0.0 - snapdragon-util: ^3.0.1 - checksum: 9bb57d759f9e2a27935dbab0e4a790137adebace832b393e350a8bf5db461ee9206bb642d4fe47568ee0b44080479c8b4a9ad0ebe3712422d77edf9992a672fd - languageName: node - linkType: hard - -"snapdragon-util@npm:^3.0.1": - version: 3.0.1 - resolution: "snapdragon-util@npm:3.0.1" - dependencies: - kind-of: ^3.2.0 - checksum: 684997dbe37ec995c03fd3f412fba2b711fc34cb4010452b7eb668be72e8811a86a12938b511e8b19baf853b325178c56d8b78d655305e5cfb0bb8b21677e7b7 - languageName: node - linkType: hard - -"snapdragon@npm:^0.8.1": - version: 0.8.2 - resolution: "snapdragon@npm:0.8.2" - dependencies: - base: ^0.11.1 - debug: ^2.2.0 - define-property: ^0.2.5 - extend-shallow: ^2.0.1 - map-cache: ^0.2.2 - source-map: ^0.5.6 - source-map-resolve: ^0.5.0 - use: ^3.1.0 - checksum: a197f242a8f48b11036563065b2487e9b7068f50a20dd81d9161eca6af422174fc158b8beeadbe59ce5ef172aa5718143312b3aebaae551c124b7824387c8312 - languageName: node - linkType: hard - "socks-proxy-agent@npm:^6.1.1": version: 6.1.1 resolution: "socks-proxy-agent@npm:6.1.1" @@ -13599,36 +10978,20 @@ __metadata: languageName: node linkType: hard -"solc@npm:^0.4.20": - version: 0.4.26 - resolution: "solc@npm:0.4.26" - dependencies: - fs-extra: ^0.30.0 - memorystream: ^0.3.1 - require-from-string: ^1.1.0 - semver: ^5.3.0 - yargs: ^4.7.1 - bin: - solcjs: solcjs - checksum: 041da7ff725c19023ef34a17f83b3303971d2e62bcea9d0fd3c7af728d6f40ff7cdf2b806d0208a3336d3c9be18c321955e1712ab39ee57390ba00d512def946 - languageName: node - linkType: hard - -"solc@npm:^0.6.3": - version: 0.6.12 - resolution: "solc@npm:0.6.12" +"solc@npm:0.8.15": + version: 0.8.15 + resolution: "solc@npm:0.8.15" dependencies: command-exists: ^1.2.8 - commander: 3.0.2 - fs-extra: ^0.30.0 + commander: ^8.1.0 + follow-redirects: ^1.12.1 js-sha3: 0.8.0 memorystream: ^0.3.1 - require-from-string: ^2.0.0 semver: ^5.5.0 tmp: 0.0.33 bin: - solcjs: solcjs - checksum: 1e2bf927f3ef4f3b195b7619ff64f715916d94dc59091a8a710e47bdd4b18e0bd92b55ea43a04ce7fabce9ad7a3e4e73ccaf127a50ebbf963a9de9046576e3b6 + solcjs: solc.js + checksum: a11de198bc5d481485a4a4803fb08a81a56dd9ffa7cdc62f8d6d5fc669f72e7cb4b22789004d54481353463421f6e6e3d1dffe7365b6d0ed5f37baee303266db languageName: node linkType: hard @@ -13667,38 +11030,6 @@ __metadata: languageName: node linkType: hard -"source-map-resolve@npm:^0.5.0": - version: 0.5.3 - resolution: "source-map-resolve@npm:0.5.3" - dependencies: - atob: ^2.1.2 - decode-uri-component: ^0.2.0 - resolve-url: ^0.2.1 - source-map-url: ^0.4.0 - urix: ^0.1.0 - checksum: c73fa44ac00783f025f6ad9e038ab1a2e007cd6a6b86f47fe717c3d0765b4a08d264f6966f3bd7cd9dbcd69e4832783d5472e43247775b2a550d6f2155d24bae - languageName: node - linkType: hard - -"source-map-support@npm:0.5.12": - version: 0.5.12 - resolution: "source-map-support@npm:0.5.12" - dependencies: - buffer-from: ^1.0.0 - source-map: ^0.6.0 - checksum: abf93e6201f54bd5713d6f6d5aa32b3752d750ce3c68044733295622ea0c346177505a615e87c073a1e0ad9b1d17b87a58f81152a31d6459658e4e9c17132db6 - languageName: node - linkType: hard - -"source-map-support@npm:^0.4.15": - version: 0.4.18 - resolution: "source-map-support@npm:0.4.18" - dependencies: - source-map: ^0.5.6 - checksum: 669aa7e992fec586fac0ba9a8dea8ce81b7328f92806335f018ffac5709afb2920e3870b4e56c68164282607229f04b8bbcf5d0e5c845eb1b5119b092e7585c0 - languageName: node - linkType: hard - "source-map-support@npm:^0.5.13, source-map-support@npm:^0.5.6": version: 0.5.21 resolution: "source-map-support@npm:0.5.21" @@ -13709,20 +11040,6 @@ __metadata: languageName: node linkType: hard -"source-map-url@npm:^0.4.0": - version: 0.4.1 - resolution: "source-map-url@npm:0.4.1" - checksum: 64c5c2c77aff815a6e61a4120c309ae4cac01298d9bcbb3deb1b46a4dd4c46d4a1eaeda79ec9f684766ae80e8dc86367b89326ce9dd2b89947bd9291fc1ac08c - languageName: node - linkType: hard - -"source-map@npm:^0.5.6, source-map@npm:^0.5.7": - version: 0.5.7 - resolution: "source-map@npm:0.5.7" - checksum: 5dc2043b93d2f194142c7f38f74a24670cd7a0063acdaf4bf01d2964b402257ae843c2a8fa822ad5b71013b5fcafa55af7421383da919752f22ff488bc553f4d - languageName: node - linkType: hard - "source-map@npm:^0.6.0, source-map@npm:^0.6.1, source-map@npm:~0.6.1": version: 0.6.1 resolution: "source-map@npm:0.6.1" @@ -13783,15 +11100,6 @@ __metadata: languageName: node linkType: hard -"split-string@npm:^3.0.1, split-string@npm:^3.0.2": - version: 3.1.0 - resolution: "split-string@npm:3.1.0" - dependencies: - extend-shallow: ^3.0.0 - checksum: ae5af5c91bdc3633628821bde92fdf9492fa0e8a63cf6a0376ed6afde93c701422a1610916f59be61972717070119e848d10dfbbd5024b7729d6a71972d2a84c - languageName: node - linkType: hard - "sprintf-js@npm:~1.0.2": version: 1.0.3 resolution: "sprintf-js@npm:1.0.3" @@ -13838,16 +11146,6 @@ __metadata: languageName: node linkType: hard -"static-extend@npm:^0.1.1": - version: 0.1.2 - resolution: "static-extend@npm:0.1.2" - dependencies: - define-property: ^0.2.5 - object-copy: ^0.1.0 - checksum: 8657485b831f79e388a437260baf22784540417a9b29e11572c87735df24c22b84eda42107403a64b30861b2faf13df9f7fc5525d51f9d1d2303aba5cbf4e12c - languageName: node - linkType: hard - "statuses@npm:2.0.1": version: 2.0.1 resolution: "statuses@npm:2.0.1" @@ -13869,16 +11167,6 @@ __metadata: languageName: node linkType: hard -"stream-to-pull-stream@npm:^1.7.1": - version: 1.7.3 - resolution: "stream-to-pull-stream@npm:1.7.3" - dependencies: - looper: ^3.0.0 - pull-stream: ^3.2.3 - checksum: 2b878e3b3d5f435802866bfec8897361b9de4ce69f77669da1103cfc45f54833e7c183922468f30c046d375a1642f5a4801a808a8da0d3927c5de41d42a59bc0 - languageName: node - linkType: hard - "stream-transform@npm:^2.1.3": version: 2.1.3 resolution: "stream-transform@npm:2.1.3" @@ -13888,6 +11176,13 @@ __metadata: languageName: node linkType: hard +"streamsearch@npm:^1.1.0": + version: 1.1.0 + resolution: "streamsearch@npm:1.1.0" + checksum: 1cce16cea8405d7a233d32ca5e00a00169cc0e19fbc02aa839959985f267335d435c07f96e5e0edd0eadc6d39c98d5435fb5bbbdefc62c41834eadc5622ad942 + languageName: node + linkType: hard + "strict-uri-encode@npm:^1.0.0": version: 1.1.0 resolution: "strict-uri-encode@npm:1.1.0" @@ -13909,17 +11204,6 @@ __metadata: languageName: node linkType: hard -"string-width@npm:^1.0.1": - version: 1.0.2 - resolution: "string-width@npm:1.0.2" - dependencies: - code-point-at: ^1.0.0 - is-fullwidth-code-point: ^1.0.0 - strip-ansi: ^3.0.0 - checksum: 5c79439e95bc3bd7233a332c5f5926ab2ee90b23816ed4faa380ce3b2576d7800b0a5bb15ae88ed28737acc7ea06a518c2eef39142dd727adad0e45c776cd37e - languageName: node - linkType: hard - "string-width@npm:^1.0.2 || 2 || 3 || 4, string-width@npm:^4.1.0, string-width@npm:^4.2.0, string-width@npm:^4.2.3": version: 4.2.3 resolution: "string-width@npm:4.2.3" @@ -13952,17 +11236,6 @@ __metadata: languageName: node linkType: hard -"string.prototype.trim@npm:~1.2.5": - version: 1.2.5 - resolution: "string.prototype.trim@npm:1.2.5" - dependencies: - call-bind: ^1.0.2 - define-properties: ^1.1.3 - es-abstract: ^1.19.1 - checksum: d9f748ffca2a3ce722c421f7c2993b6490ec0cf19d9cb0904598c744e9367e54a3f13c7b99c8c0966c8a76484bd656a60281daa5d0534cc222cd72193fd63034 - languageName: node - linkType: hard - "string.prototype.trimend@npm:^1.0.4": version: 1.0.4 resolution: "string.prototype.trimend@npm:1.0.4" @@ -14014,13 +11287,6 @@ __metadata: languageName: node linkType: hard -"string_decoder@npm:~0.10.x": - version: 0.10.31 - resolution: "string_decoder@npm:0.10.31" - checksum: fe00f8e303647e5db919948ccb5ce0da7dea209ab54702894dd0c664edd98e5d4df4b80d6fabf7b9e92b237359d21136c95bf068b2f7760b772ca974ba970202 - languageName: node - linkType: hard - "string_decoder@npm:~1.1.1": version: 1.1.1 resolution: "string_decoder@npm:1.1.1" @@ -14030,15 +11296,6 @@ __metadata: languageName: node linkType: hard -"strip-ansi@npm:^3.0.0, strip-ansi@npm:^3.0.1": - version: 3.0.1 - resolution: "strip-ansi@npm:3.0.1" - dependencies: - ansi-regex: ^2.0.0 - checksum: 9b974de611ce5075c70629c00fa98c46144043db92ae17748fb780f706f7a789e9989fd10597b7c2053ae8d1513fd707816a91f1879b2f71e6ac0b6a863db465 - languageName: node - linkType: hard - "strip-ansi@npm:^4.0.0": version: 4.0.0 resolution: "strip-ansi@npm:4.0.0" @@ -14066,15 +11323,6 @@ __metadata: languageName: node linkType: hard -"strip-bom@npm:^2.0.0": - version: 2.0.0 - resolution: "strip-bom@npm:2.0.0" - dependencies: - is-utf8: ^0.2.0 - checksum: 08efb746bc67b10814cd03d79eb31bac633393a782e3f35efbc1b61b5165d3806d03332a97f362822cf0d4dd14ba2e12707fcff44fe1c870c48a063a0c9e4944 - languageName: node - linkType: hard - "strip-bom@npm:^3.0.0": version: 3.0.0 resolution: "strip-bom@npm:3.0.0" @@ -14132,13 +11380,6 @@ __metadata: languageName: node linkType: hard -"supports-color@npm:^2.0.0": - version: 2.0.0 - resolution: "supports-color@npm:2.0.0" - checksum: 602538c5812b9006404370b5a4b885d3e2a1f6567d314f8b4a41974ffe7d08e525bf92ae0f9c7030e3b4c78e4e34ace55d6a67a74f1571bc205959f5972f88f0 - languageName: node - linkType: hard - "supports-color@npm:^3.1.0": version: 3.2.3 resolution: "supports-color@npm:3.2.3" @@ -14224,31 +11465,6 @@ __metadata: languageName: node linkType: hard -"tape@npm:^4.6.3": - version: 4.15.1 - resolution: "tape@npm:4.15.1" - dependencies: - call-bind: ~1.0.2 - deep-equal: ~1.1.1 - defined: ~1.0.0 - dotignore: ~0.1.2 - for-each: ~0.3.3 - glob: ~7.2.0 - has: ~1.0.3 - inherits: ~2.0.4 - is-regex: ~1.1.4 - minimist: ~1.2.6 - object-inspect: ~1.12.0 - resolve: ~1.22.0 - resumer: ~0.0.0 - string.prototype.trim: ~1.2.5 - through: ~2.3.8 - bin: - tape: bin/tape - checksum: 3726aa5979cbffe057455db9fd353c88ff26a1d8d3addc7d479fcbb8202caf12cb3e122492e203db00195b6fdfbc1f9c06762a4aeead7efc710ff46955be550f - languageName: node - linkType: hard - "tar@npm:^4.0.2": version: 4.4.19 resolution: "tar@npm:4.4.19" @@ -14285,23 +11501,6 @@ __metadata: languageName: node linkType: hard -"test-value@npm:^2.1.0": - version: 2.1.0 - resolution: "test-value@npm:2.1.0" - dependencies: - array-back: ^1.0.3 - typical: ^2.6.0 - checksum: ce41ef4100c9ac84630e78d1ca06706714587faf255e44296ace1fc7bf5b888c160b8c0229d31467252a3b2b57197965194391f6ee0c54f33e0b8e3af3a33a0c - languageName: node - linkType: hard - -"testrpc@npm:0.0.1": - version: 0.0.1 - resolution: "testrpc@npm:0.0.1" - checksum: e27778552df2d0b938b062fdf41d44557f0eb3de75903cb90b87909f55a82a6345dd13e40d1498e718272b4e5225872dca66da73646c35df1031486bb0ed0fda - languageName: node - linkType: hard - "text-table@npm:^0.2.0": version: 0.2.0 resolution: "text-table@npm:0.2.0" @@ -14328,17 +11527,7 @@ __metadata: languageName: node linkType: hard -"through2@npm:^2.0.3": - version: 2.0.5 - resolution: "through2@npm:2.0.5" - dependencies: - readable-stream: ~2.3.6 - xtend: ~4.0.1 - checksum: beb0f338aa2931e5660ec7bf3ad949e6d2e068c31f4737b9525e5201b824ac40cac6a337224856b56bd1ddd866334bbfb92a9f57cd6f66bc3f18d3d86fc0fe50 - languageName: node - linkType: hard - -"through@npm:^2.3.6, through@npm:~2.3.4, through@npm:~2.3.8": +"through@npm:^2.3.6": version: 2.3.8 resolution: "through@npm:2.3.8" checksum: a38c3e059853c494af95d50c072b83f8b676a9ba2818dcc5b108ef252230735c54e0185437618596c790bbba8fcdaef5b290405981ffa09dce67b1f1bf190cbd @@ -14361,31 +11550,6 @@ __metadata: languageName: node linkType: hard -"tmp@npm:0.1.0": - version: 0.1.0 - resolution: "tmp@npm:0.1.0" - dependencies: - rimraf: ^2.6.3 - checksum: 6bab8431de9d245d4264bd8cd6bb216f9d22f179f935dada92a11d1315572c8eb7c3334201e00594b4708608bd536fad3a63bfb037e7804d827d66aa53a1afcd - languageName: node - linkType: hard - -"to-fast-properties@npm:^1.0.3": - version: 1.0.3 - resolution: "to-fast-properties@npm:1.0.3" - checksum: bd0abb58c4722851df63419de3f6d901d5118f0440d3f71293ed776dd363f2657edaaf2dc470e3f6b7b48eb84aa411193b60db8a4a552adac30de9516c5cc580 - languageName: node - linkType: hard - -"to-object-path@npm:^0.3.0": - version: 0.3.0 - resolution: "to-object-path@npm:0.3.0" - dependencies: - kind-of: ^3.0.2 - checksum: 9425effee5b43e61d720940fa2b889623f77473d459c2ce3d4a580a4405df4403eec7be6b857455908070566352f9e2417304641ed158dda6f6a365fe3e66d70 - languageName: node - linkType: hard - "to-readable-stream@npm:^1.0.0": version: 1.0.0 resolution: "to-readable-stream@npm:1.0.0" @@ -14393,16 +11557,6 @@ __metadata: languageName: node linkType: hard -"to-regex-range@npm:^2.1.0": - version: 2.1.1 - resolution: "to-regex-range@npm:2.1.1" - dependencies: - is-number: ^3.0.0 - repeat-string: ^1.6.1 - checksum: 46093cc14be2da905cc931e442d280b2e544e2bfdb9a24b3cf821be8d342f804785e5736c108d5be026021a05d7b38144980a61917eee3c88de0a5e710e10320 - languageName: node - linkType: hard - "to-regex-range@npm:^5.0.1": version: 5.0.1 resolution: "to-regex-range@npm:5.0.1" @@ -14412,18 +11566,6 @@ __metadata: languageName: node linkType: hard -"to-regex@npm:^3.0.1, to-regex@npm:^3.0.2": - version: 3.0.2 - resolution: "to-regex@npm:3.0.2" - dependencies: - define-property: ^2.0.2 - extend-shallow: ^3.0.2 - regex-not: ^1.0.2 - safe-regex: ^1.1.0 - checksum: 4ed4a619059b64e204aad84e4e5f3ea82d97410988bcece7cf6cbfdbf193d11bff48cf53842d88b8bb00b1bfc0d048f61f20f0709e6f393fd8fe0122662d9db4 - languageName: node - linkType: hard - "toidentifier@npm:1.0.1": version: 1.0.1 resolution: "toidentifier@npm:1.0.1" @@ -14455,20 +11597,6 @@ __metadata: languageName: node linkType: hard -"trim-right@npm:^1.0.1": - version: 1.0.1 - resolution: "trim-right@npm:1.0.1" - checksum: 9120af534e006a7424a4f9358710e6e707887b6ccf7ea69e50d6ac6464db1fe22268400def01752f09769025d480395159778153fb98d4a2f6f40d4cf5d4f3b6 - languageName: node - linkType: hard - -"true-case-path@npm:^2.2.1": - version: 2.2.1 - resolution: "true-case-path@npm:2.2.1" - checksum: fd5f1c2a87a122a65ffb1f84b580366be08dac7f552ea0fa4b5a6ab0a013af950b0e752beddb1c6c1652e6d6a2b293b7b3fd86a5a1706242ad365b68f1b5c6f1 - languageName: node - linkType: hard - "ts-command-line-args@npm:^2.2.0": version: 2.2.1 resolution: "ts-command-line-args@npm:2.2.1" @@ -14483,22 +11611,6 @@ __metadata: languageName: node linkType: hard -"ts-essentials@npm:^1.0.0": - version: 1.0.4 - resolution: "ts-essentials@npm:1.0.4" - checksum: 2e19bbe51203707ca732dcc6c3f238b2cf22bb9213d26ae0246c02325fb3e5f17c32505ac79c1bd538b7951a798155b07422e263a95cb295070a48233e45a1b5 - languageName: node - linkType: hard - -"ts-essentials@npm:^6.0.3": - version: 6.0.7 - resolution: "ts-essentials@npm:6.0.7" - peerDependencies: - typescript: ">=3.7.0" - checksum: b47a1793df9ea997d50d2cc9155433952b189cfca0c534a6f3f3dce6aa782a37574d2179dee6d55ed918835aa17addda49619ff2bd2eb3e60e331db3ce30a79b - languageName: node - linkType: hard - "ts-essentials@npm:^7.0.1": version: 7.0.3 resolution: "ts-essentials@npm:7.0.3" @@ -14508,39 +11620,20 @@ __metadata: languageName: node linkType: hard -"ts-generator@npm:^0.1.1": - version: 0.1.1 - resolution: "ts-generator@npm:0.1.1" - dependencies: - "@types/mkdirp": ^0.5.2 - "@types/prettier": ^2.1.1 - "@types/resolve": ^0.0.8 - chalk: ^2.4.1 - glob: ^7.1.2 - mkdirp: ^0.5.1 - prettier: ^2.1.2 - resolve: ^1.8.1 - ts-essentials: ^1.0.0 - bin: - ts-generator: dist/cli/run.js - checksum: 3add2e76afd7a4d9d9aee1ff26477ee4e8b4cc740b35787f9ea780c11aefc88e6c7833837eacc12b944c1883680639dc9cc47fe173eff95c62112f3a41132146 - languageName: node - linkType: hard - -"ts-mocha@npm:^9.0.2": - version: 9.0.2 - resolution: "ts-mocha@npm:9.0.2" +"ts-mocha@npm:^10.0.0": + version: 10.0.0 + resolution: "ts-mocha@npm:10.0.0" dependencies: ts-node: 7.0.1 tsconfig-paths: ^3.5.0 peerDependencies: - mocha: ^3.X.X || ^4.X.X || ^5.X.X || ^6.X.X || ^7.X.X || ^8.X.X || ^9.X.X + mocha: ^3.X.X || ^4.X.X || ^5.X.X || ^6.X.X || ^7.X.X || ^8.X.X || ^9.X.X || ^10.X.X dependenciesMeta: tsconfig-paths: optional: true bin: ts-mocha: bin/ts-mocha - checksum: 142a7fc2b7be156e2933b31ec0577d092789d4c55e5be0e42c038b92644983e970fdc3fd7b2fb12b007288e2be749d5897c064ecf7c48cb021f38401f5a95a67 + checksum: b11f2a8ceecf195b0db724da429159982fef12e4357088fe900289223587217e8c126ead7929679edd58bf19ad96c5da5911535d26f535386632e18fbff10c40 languageName: node linkType: hard @@ -14680,7 +11773,7 @@ __metadata: languageName: node linkType: hard -"tweetnacl-util@npm:^0.15.0, tweetnacl-util@npm:^0.15.1": +"tweetnacl-util@npm:^0.15.1": version: 0.15.1 resolution: "tweetnacl-util@npm:0.15.1" checksum: ae6aa8a52cdd21a95103a4cc10657d6a2040b36c7a6da7b9d3ab811c6750a2d5db77e8c36969e75fdee11f511aa2b91c552496c6e8e989b6e490e54aca2864fc @@ -14694,7 +11787,7 @@ __metadata: languageName: node linkType: hard -"tweetnacl@npm:^1.0.0, tweetnacl@npm:^1.0.3": +"tweetnacl@npm:^1.0.3": version: 1.0.3 resolution: "tweetnacl@npm:1.0.3" checksum: e4a57cac188f0c53f24c7a33279e223618a2bfb5fea426231991652a13247bea06b081fd745d71291fcae0f4428d29beba1b984b1f1ce6f66b06a6d1ab90645c @@ -14792,23 +11885,6 @@ __metadata: languageName: node linkType: hard -"typechain@npm:^3.0.0": - version: 3.0.0 - resolution: "typechain@npm:3.0.0" - dependencies: - command-line-args: ^4.0.7 - debug: ^4.1.1 - fs-extra: ^7.0.0 - js-sha3: ^0.8.0 - lodash: ^4.17.15 - ts-essentials: ^6.0.3 - ts-generator: ^0.1.1 - bin: - typechain: ./dist/cli/cli.js - checksum: a38aff5e89c41e20e2c3a1f7b5f04666dbc94b5592eba70ba7d1e0aeb49089d22ed3d35e55a0b0d1f0bfdcea9818157fa4ee3854ef818f46f6aa899520fe7c25 - languageName: node - linkType: hard - "typechain@npm:^8.0.0": version: 8.0.0 resolution: "typechain@npm:8.0.0" @@ -14887,36 +11963,6 @@ __metadata: languageName: node linkType: hard -"typewise-core@npm:^1.2, typewise-core@npm:^1.2.0": - version: 1.2.0 - resolution: "typewise-core@npm:1.2.0" - checksum: c21e83544546d1aba2f17377c25ae0eb571c2153b2e3705932515bef103dbe43e05d2286f238ad139341b1000da40583115a44cb5e69a2ef408572b13dab844b - languageName: node - linkType: hard - -"typewise@npm:^1.0.3": - version: 1.0.3 - resolution: "typewise@npm:1.0.3" - dependencies: - typewise-core: ^1.2.0 - checksum: eb3452b1387df8bf8e3b620720d240425a50ce402d7c064c21ac4b5d88c551ee4d1f26cd649b8a17a6d06f7a3675733de841723f8e06bb3edabfeacc4924af4a - languageName: node - linkType: hard - -"typewiselite@npm:~1.0.0": - version: 1.0.0 - resolution: "typewiselite@npm:1.0.0" - checksum: 2e13a652c041680e9e37501129715f97c2ff2b8f52b5e82acd9355c070ca7c126633ff96d2ad03945254c271c0d1cf9f4956090c93ad750717e00d100cbd0c87 - languageName: node - linkType: hard - -"typical@npm:^2.6.0, typical@npm:^2.6.1": - version: 2.6.1 - resolution: "typical@npm:2.6.1" - checksum: 6af04fefe50d90d3471f058b2cdc0f49b7436bdd605cd00acea7965926ff388a5a7d692ef144f45fccee6f8e896c065702ecc44b69057e2ce88c09e897c7d3a4 - languageName: node - linkType: hard - "typical@npm:^4.0.0": version: 4.0.0 resolution: "typical@npm:4.0.0" @@ -14971,13 +12017,6 @@ __metadata: languageName: node linkType: hard -"underscore@npm:1.9.1": - version: 1.9.1 - resolution: "underscore@npm:1.9.1" - checksum: bee6f587661a6a9ca2f77e611896141e0287af51d8ca6034b11d0d4163ddbdd181a9720078ddbe94d265b7694f4880bc7f4c2ad260cfb8985ee2f9adcf13df03 - languageName: node - linkType: hard - "undici@npm:^4.14.1": version: 4.16.0 resolution: "undici@npm:4.16.0" @@ -14985,15 +12024,12 @@ __metadata: languageName: node linkType: hard -"union-value@npm:^1.0.0": - version: 1.0.1 - resolution: "union-value@npm:1.0.1" +"undici@npm:^5.14.0": + version: 5.16.0 + resolution: "undici@npm:5.16.0" dependencies: - arr-union: ^3.1.0 - get-value: ^2.0.6 - is-extendable: ^0.1.1 - set-value: ^2.0.1 - checksum: a3464097d3f27f6aa90cf103ed9387541bccfc006517559381a10e0dffa62f465a9d9a09c9b9c3d26d0f4cbe61d4d010e2fbd710fd4bf1267a768ba8a774b0ba + busboy: ^1.6.0 + checksum: bc22e797cbf469351713c88af33e65e21952a75f431b78b0e75fb2411426ab38b888ec0761d4b81eadf8f6e8872ed23fb75641cc7319c6a7f08bd083899fa1cc languageName: node linkType: hard @@ -15029,13 +12065,6 @@ __metadata: languageName: node linkType: hard -"unorm@npm:^1.3.3": - version: 1.6.0 - resolution: "unorm@npm:1.6.0" - checksum: 9a86546256a45f855b6cfe719086785d6aada94f63778cecdecece8d814ac26af76cb6da70130da0a08b8803bbf0986e56c7ec4249038198f3de02607fffd811 - languageName: node - linkType: hard - "unpipe@npm:1.0.0, unpipe@npm:~1.0.0": version: 1.0.0 resolution: "unpipe@npm:1.0.0" @@ -15043,16 +12072,6 @@ __metadata: languageName: node linkType: hard -"unset-value@npm:^1.0.0": - version: 1.0.0 - resolution: "unset-value@npm:1.0.0" - dependencies: - has-value: ^0.3.1 - isobject: ^3.0.0 - checksum: 5990ecf660672be2781fc9fb322543c4aa592b68ed9a3312fa4df0e9ba709d42e823af090fc8f95775b4cd2c9a5169f7388f0cec39238b6d0d55a69fc2ab6b29 - languageName: node - linkType: hard - "uri-js@npm:^4.2.2": version: 4.4.1 resolution: "uri-js@npm:4.4.1" @@ -15062,13 +12081,6 @@ __metadata: languageName: node linkType: hard -"urix@npm:^0.1.0": - version: 0.1.0 - resolution: "urix@npm:0.1.0" - checksum: 4c076ecfbf3411e888547fe844e52378ab5ada2d2f27625139011eada79925e77f7fbf0e4016d45e6a9e9adb6b7e64981bd49b22700c7c401c5fc15f423303b3 - languageName: node - linkType: hard - "url-parse-lax@npm:^1.0.0": version: 1.0.0 resolution: "url-parse-lax@npm:1.0.0" @@ -15111,10 +12123,13 @@ __metadata: languageName: node linkType: hard -"use@npm:^3.1.0": - version: 3.1.1 - resolution: "use@npm:3.1.1" - checksum: 08a130289f5238fcbf8f59a18951286a6e660d17acccc9d58d9b69dfa0ee19aa038e8f95721b00b432c36d1629a9e32a464bf2e7e0ae6a244c42ddb30bdd8b33 +"utf-8-validate@npm:5.0.7": + version: 5.0.7 + resolution: "utf-8-validate@npm:5.0.7" + dependencies: + node-gyp: latest + node-gyp-build: ^4.3.0 + checksum: 588d272b359bf555a0c4c2ffe97286edc73126de132f63f4f0c80110bd06b67d3ce44d2b3d24feea6da13ced50c04d774ba4d25fe28576371cd714cd013bd3b7 languageName: node linkType: hard @@ -15128,7 +12143,7 @@ __metadata: languageName: node linkType: hard -"utf8@npm:3.0.0, utf8@npm:^3.0.0": +"utf8@npm:3.0.0": version: 3.0.0 resolution: "utf8@npm:3.0.0" checksum: cb89a69ad9ab393e3eae9b25305b3ff08bebca9adc839191a34f90777eb2942f86a96369d2839925fea58f8f722f7e27031d697f10f5f39690f8c5047303e62d @@ -15142,19 +12157,6 @@ __metadata: languageName: node linkType: hard -"util.promisify@npm:^1.0.0": - version: 1.1.1 - resolution: "util.promisify@npm:1.1.1" - dependencies: - call-bind: ^1.0.0 - define-properties: ^1.1.3 - for-each: ^0.3.3 - has-symbols: ^1.0.1 - object.getownpropertydescriptors: ^2.1.1 - checksum: ea371c30b90576862487ae4efd7182aa5855019549a4019d82629acc2709e8ccb0f38944403eebec622fff8ebb44ac3f46a52d745d5f543d30606132a4905f96 - languageName: node - linkType: hard - "util@npm:^0.12.0": version: 0.12.4 resolution: "util@npm:0.12.4" @@ -15324,18 +12326,6 @@ __metadata: languageName: node linkType: hard -"web3-bzz@npm:1.2.11": - version: 1.2.11 - resolution: "web3-bzz@npm:1.2.11" - dependencies: - "@types/node": ^12.12.6 - got: 9.6.0 - swarm-js: ^0.1.40 - underscore: 1.9.1 - checksum: 45136e7282819260357efdcdf6d81cb7b733b212aa1e46f1bbcaff70a33a2e3f6558936e6e1fc3bf75bb4c3220f844fc6b9d5bfaaa68a2f6ed0e8c0b02c97523 - languageName: node - linkType: hard - "web3-bzz@npm:1.5.3": version: 1.5.3 resolution: "web3-bzz@npm:1.5.3" @@ -15347,17 +12337,6 @@ __metadata: languageName: node linkType: hard -"web3-core-helpers@npm:1.2.11": - version: 1.2.11 - resolution: "web3-core-helpers@npm:1.2.11" - dependencies: - underscore: 1.9.1 - web3-eth-iban: 1.2.11 - web3-utils: 1.2.11 - checksum: dac2ab85b8bec8251647d40f1dc5fcf30b2245de6d216328c51c9d619d12a567906c5bf8b542846552a56bf969edcfcb16fb67e3780461195df85cd506591f68 - languageName: node - linkType: hard - "web3-core-helpers@npm:1.5.3": version: 1.5.3 resolution: "web3-core-helpers@npm:1.5.3" @@ -15368,20 +12347,6 @@ __metadata: languageName: node linkType: hard -"web3-core-method@npm:1.2.11": - version: 1.2.11 - resolution: "web3-core-method@npm:1.2.11" - dependencies: - "@ethersproject/transactions": ^5.0.0-beta.135 - underscore: 1.9.1 - web3-core-helpers: 1.2.11 - web3-core-promievent: 1.2.11 - web3-core-subscriptions: 1.2.11 - web3-utils: 1.2.11 - checksum: 7533c5b8c42df49969b9c95a2c9cb0abcd55a304ef4b276a5cc43673d27ffd9767a0caabe09271979b5afd0f788a51416f7018bc704d734ad78846c68dba15a7 - languageName: node - linkType: hard - "web3-core-method@npm:1.5.3": version: 1.5.3 resolution: "web3-core-method@npm:1.5.3" @@ -15396,15 +12361,6 @@ __metadata: languageName: node linkType: hard -"web3-core-promievent@npm:1.2.11": - version: 1.2.11 - resolution: "web3-core-promievent@npm:1.2.11" - dependencies: - eventemitter3: 4.0.4 - checksum: bd3661978f252ec0033881b32a5d4dec1bfeb7fb0f018d77c077c77b60c0f965215dcbd54c5fcbef739441dd7efbdbd6c9b20e275e05f5b4d2cee762937d95cc - languageName: node - linkType: hard - "web3-core-promievent@npm:1.5.3": version: 1.5.3 resolution: "web3-core-promievent@npm:1.5.3" @@ -15414,19 +12370,6 @@ __metadata: languageName: node linkType: hard -"web3-core-requestmanager@npm:1.2.11": - version: 1.2.11 - resolution: "web3-core-requestmanager@npm:1.2.11" - dependencies: - underscore: 1.9.1 - web3-core-helpers: 1.2.11 - web3-providers-http: 1.2.11 - web3-providers-ipc: 1.2.11 - web3-providers-ws: 1.2.11 - checksum: 84898bfec26319d06ccf7ae63821b7fbea8efc8a76015921530cc4eb85db39598c16598f1e51f95ed79146d7defafe7b924b5c6f6927fb2a153d01eb0862182c - languageName: node - linkType: hard - "web3-core-requestmanager@npm:1.5.3": version: 1.5.3 resolution: "web3-core-requestmanager@npm:1.5.3" @@ -15440,17 +12383,6 @@ __metadata: languageName: node linkType: hard -"web3-core-subscriptions@npm:1.2.11": - version: 1.2.11 - resolution: "web3-core-subscriptions@npm:1.2.11" - dependencies: - eventemitter3: 4.0.4 - underscore: 1.9.1 - web3-core-helpers: 1.2.11 - checksum: 7c8c07ea79fc9cf4ecb15ea37c5db38cc38e4b0545247d9ccc7ff6f4257565c03bcee569695a93abe02b8a98a6a9c227df880911ae324c0c6218a9571a3811f6 - languageName: node - linkType: hard - "web3-core-subscriptions@npm:1.5.3": version: 1.5.3 resolution: "web3-core-subscriptions@npm:1.5.3" @@ -15461,21 +12393,6 @@ __metadata: languageName: node linkType: hard -"web3-core@npm:1.2.11": - version: 1.2.11 - resolution: "web3-core@npm:1.2.11" - dependencies: - "@types/bn.js": ^4.11.5 - "@types/node": ^12.12.6 - bignumber.js: ^9.0.0 - web3-core-helpers: 1.2.11 - web3-core-method: 1.2.11 - web3-core-requestmanager: 1.2.11 - web3-utils: 1.2.11 - checksum: 1793affddb4fa811f9781dc644b4017d95c6084a21bb866e0dc626f6d48bfc29eacf02237608b587ca49094e9342da878b64173510d99a6e9171f7a697e8cb36 - languageName: node - linkType: hard - "web3-core@npm:1.5.3": version: 1.5.3 resolution: "web3-core@npm:1.5.3" @@ -15491,17 +12408,6 @@ __metadata: languageName: node linkType: hard -"web3-eth-abi@npm:1.2.11": - version: 1.2.11 - resolution: "web3-eth-abi@npm:1.2.11" - dependencies: - "@ethersproject/abi": 5.0.0-beta.153 - underscore: 1.9.1 - web3-utils: 1.2.11 - checksum: ef96c9c0faad2634d69f1c6dbf3414d0f292c0e534e477f47a1b14512c7099237a09d6b6ba91b624cea348e51e759106b128b0fe463d62f17f447e0a47071d76 - languageName: node - linkType: hard - "web3-eth-abi@npm:1.5.3": version: 1.5.3 resolution: "web3-eth-abi@npm:1.5.3" @@ -15512,25 +12418,6 @@ __metadata: languageName: node linkType: hard -"web3-eth-accounts@npm:1.2.11": - version: 1.2.11 - resolution: "web3-eth-accounts@npm:1.2.11" - dependencies: - crypto-browserify: 3.12.0 - eth-lib: 0.2.8 - ethereumjs-common: ^1.3.2 - ethereumjs-tx: ^2.1.1 - scrypt-js: ^3.0.1 - underscore: 1.9.1 - uuid: 3.3.2 - web3-core: 1.2.11 - web3-core-helpers: 1.2.11 - web3-core-method: 1.2.11 - web3-utils: 1.2.11 - checksum: 1653a7548337b538b280ced0d25dbf8b105954a5bf61726d5def25128ffc87c49d0d38b678a32e7d259e687f5e72cc452d92e14eaa8c9976a9153347e4afe7eb - languageName: node - linkType: hard - "web3-eth-accounts@npm:1.5.3": version: 1.5.3 resolution: "web3-eth-accounts@npm:1.5.3" @@ -15550,23 +12437,6 @@ __metadata: languageName: node linkType: hard -"web3-eth-contract@npm:1.2.11": - version: 1.2.11 - resolution: "web3-eth-contract@npm:1.2.11" - dependencies: - "@types/bn.js": ^4.11.5 - underscore: 1.9.1 - web3-core: 1.2.11 - web3-core-helpers: 1.2.11 - web3-core-method: 1.2.11 - web3-core-promievent: 1.2.11 - web3-core-subscriptions: 1.2.11 - web3-eth-abi: 1.2.11 - web3-utils: 1.2.11 - checksum: 1dc74e11f09c895bd5b26c5dfb3a0818d6a38a573de9252a3a943acf6ba88a058313e2977c95564ab56c3696f1ca975237ae4f10c93d34d2978f11bb1119b4d7 - languageName: node - linkType: hard - "web3-eth-contract@npm:1.5.3": version: 1.5.3 resolution: "web3-eth-contract@npm:1.5.3" @@ -15583,23 +12453,6 @@ __metadata: languageName: node linkType: hard -"web3-eth-ens@npm:1.2.11": - version: 1.2.11 - resolution: "web3-eth-ens@npm:1.2.11" - dependencies: - content-hash: ^2.5.2 - eth-ens-namehash: 2.0.8 - underscore: 1.9.1 - web3-core: 1.2.11 - web3-core-helpers: 1.2.11 - web3-core-promievent: 1.2.11 - web3-eth-abi: 1.2.11 - web3-eth-contract: 1.2.11 - web3-utils: 1.2.11 - checksum: 987999713c5c79f23a67ad244813212e9582566f6a7665312f887ce0eda77d91b85d3c0df21af14ef6ab6e970626d5d02129a2df3a8c257151f9540d6968a748 - languageName: node - linkType: hard - "web3-eth-ens@npm:1.5.3": version: 1.5.3 resolution: "web3-eth-ens@npm:1.5.3" @@ -15616,16 +12469,6 @@ __metadata: languageName: node linkType: hard -"web3-eth-iban@npm:1.2.11": - version: 1.2.11 - resolution: "web3-eth-iban@npm:1.2.11" - dependencies: - bn.js: ^4.11.9 - web3-utils: 1.2.11 - checksum: 1c28b3ad2cad2af0a76b051fe2c05ed933476eaa99f2c245862f66d4e3d56e60ad26cf55120513f78648ab1ff2b8a6b751e63448cdb01b53b542334bf148286f - languageName: node - linkType: hard - "web3-eth-iban@npm:1.5.3": version: 1.5.3 resolution: "web3-eth-iban@npm:1.5.3" @@ -15636,20 +12479,6 @@ __metadata: languageName: node linkType: hard -"web3-eth-personal@npm:1.2.11": - version: 1.2.11 - resolution: "web3-eth-personal@npm:1.2.11" - dependencies: - "@types/node": ^12.12.6 - web3-core: 1.2.11 - web3-core-helpers: 1.2.11 - web3-core-method: 1.2.11 - web3-net: 1.2.11 - web3-utils: 1.2.11 - checksum: a754a16aaed1e97baf963f594b69c83bc4c1cf3f5b181b18720ce292583b4a1b70c7a5c22433679c3e66166773bb43731535d085db3bcfc72af48290553f5122 - languageName: node - linkType: hard - "web3-eth-personal@npm:1.5.3": version: 1.5.3 resolution: "web3-eth-personal@npm:1.5.3" @@ -15664,27 +12493,6 @@ __metadata: languageName: node linkType: hard -"web3-eth@npm:1.2.11": - version: 1.2.11 - resolution: "web3-eth@npm:1.2.11" - dependencies: - underscore: 1.9.1 - web3-core: 1.2.11 - web3-core-helpers: 1.2.11 - web3-core-method: 1.2.11 - web3-core-subscriptions: 1.2.11 - web3-eth-abi: 1.2.11 - web3-eth-accounts: 1.2.11 - web3-eth-contract: 1.2.11 - web3-eth-ens: 1.2.11 - web3-eth-iban: 1.2.11 - web3-eth-personal: 1.2.11 - web3-net: 1.2.11 - web3-utils: 1.2.11 - checksum: eaf361bc59859e7e9078e57f438564f10ea5c0cc00404d3ccf537f3c8d11d963b74f8c3981f4160f1ed2e3c4d9d97a5ff85b33744d5083afde8dfd5dde887034 - languageName: node - linkType: hard - "web3-eth@npm:1.5.3": version: 1.5.3 resolution: "web3-eth@npm:1.5.3" @@ -15705,17 +12513,6 @@ __metadata: languageName: node linkType: hard -"web3-net@npm:1.2.11": - version: 1.2.11 - resolution: "web3-net@npm:1.2.11" - dependencies: - web3-core: 1.2.11 - web3-core-method: 1.2.11 - web3-utils: 1.2.11 - checksum: 76a99815699674709b869b60bf950d20167b999fe93f7d091b01ce3fd0e3dd9c30ef3519156c04eb01703791c049b19b295e6901dd41d208ea600149961f7ee6 - languageName: node - linkType: hard - "web3-net@npm:1.5.3": version: 1.5.3 resolution: "web3-net@npm:1.5.3" @@ -15727,44 +12524,6 @@ __metadata: languageName: node linkType: hard -"web3-provider-engine@npm:14.2.1": - version: 14.2.1 - resolution: "web3-provider-engine@npm:14.2.1" - dependencies: - async: ^2.5.0 - backoff: ^2.5.0 - clone: ^2.0.0 - cross-fetch: ^2.1.0 - eth-block-tracker: ^3.0.0 - eth-json-rpc-infura: ^3.1.0 - eth-sig-util: ^1.4.2 - ethereumjs-block: ^1.2.2 - ethereumjs-tx: ^1.2.0 - ethereumjs-util: ^5.1.5 - ethereumjs-vm: ^2.3.4 - json-rpc-error: ^2.0.0 - json-stable-stringify: ^1.0.1 - promise-to-callback: ^1.0.0 - readable-stream: ^2.2.9 - request: ^2.85.0 - semaphore: ^1.0.3 - ws: ^5.1.1 - xhr: ^2.2.0 - xtend: ^4.0.1 - checksum: 45441e22633184bd5f6ea645e20f99c8002b3b64d3e564cd9d0f65bad7f0755ad2cdf9a88fcac9585e908aacea28cc6e80c0939498ee4f4c6c49107d16e011bf - languageName: node - linkType: hard - -"web3-providers-http@npm:1.2.11": - version: 1.2.11 - resolution: "web3-providers-http@npm:1.2.11" - dependencies: - web3-core-helpers: 1.2.11 - xhr2-cookies: 1.1.0 - checksum: 64760032d68826865de084c31d81be70bebc54cd82138ef724da13b60f7b341d4c0c6716912616b928680756ea6f2cef42be7d16fa9dd143a09ac55701232193 - languageName: node - linkType: hard - "web3-providers-http@npm:1.5.3": version: 1.5.3 resolution: "web3-providers-http@npm:1.5.3" @@ -15775,17 +12534,6 @@ __metadata: languageName: node linkType: hard -"web3-providers-ipc@npm:1.2.11": - version: 1.2.11 - resolution: "web3-providers-ipc@npm:1.2.11" - dependencies: - oboe: 2.1.4 - underscore: 1.9.1 - web3-core-helpers: 1.2.11 - checksum: 0fab2f824e4c7f080fee26b76c9c8448eb51abfd285a04f3c9efe92c3b9a8742096804ec02f56bc8297e375ea12f0f2205bb6c0ae376c44c005cdfeec65d0b7e - languageName: node - linkType: hard - "web3-providers-ipc@npm:1.5.3": version: 1.5.3 resolution: "web3-providers-ipc@npm:1.5.3" @@ -15796,18 +12544,6 @@ __metadata: languageName: node linkType: hard -"web3-providers-ws@npm:1.2.11": - version: 1.2.11 - resolution: "web3-providers-ws@npm:1.2.11" - dependencies: - eventemitter3: 4.0.4 - underscore: 1.9.1 - web3-core-helpers: 1.2.11 - websocket: ^1.0.31 - checksum: 4a4c591c2bd9724748e9dba124e59048b91239aa7cd435394f2a1d8e7914132920a17e56bc646f46912844fcfbbc38333b7023ebec298af36106ec4814d2ff5c - languageName: node - linkType: hard - "web3-providers-ws@npm:1.5.3": version: 1.5.3 resolution: "web3-providers-ws@npm:1.5.3" @@ -15819,18 +12555,6 @@ __metadata: languageName: node linkType: hard -"web3-shh@npm:1.2.11": - version: 1.2.11 - resolution: "web3-shh@npm:1.2.11" - dependencies: - web3-core: 1.2.11 - web3-core-method: 1.2.11 - web3-core-subscriptions: 1.2.11 - web3-net: 1.2.11 - checksum: 64c4a1f03bc3975a2baff9fa6d89a0050a06f179f1ec4d6e28f480b761d0efe56a9a79a5a320821e1dd503e82d44e73dd69b883b9e69d96cced3f979e0a3f4ff - languageName: node - linkType: hard - "web3-shh@npm:1.5.3": version: 1.5.3 resolution: "web3-shh@npm:1.5.3" @@ -15843,22 +12567,6 @@ __metadata: languageName: node linkType: hard -"web3-utils@npm:1.2.11": - version: 1.2.11 - resolution: "web3-utils@npm:1.2.11" - dependencies: - bn.js: ^4.11.9 - eth-lib: 0.2.8 - ethereum-bloom-filters: ^1.0.6 - ethjs-unit: 0.1.6 - number-to-bn: 1.7.0 - randombytes: ^2.1.0 - underscore: 1.9.1 - utf8: 3.0.0 - checksum: 1e43235963d5176e447b20b201a66fabccbe7bd4ef8bbb2edfa5ea80a41e8202a8e8f3db128b2a1662855a627a52d100e3207b81a739b937b5b3b4f9114c008f - languageName: node - linkType: hard - "web3-utils@npm:1.5.3": version: 1.5.3 resolution: "web3-utils@npm:1.5.3" @@ -15874,7 +12582,7 @@ __metadata: languageName: node linkType: hard -"web3-utils@npm:^1.0.0-beta.31, web3-utils@npm:^1.3.0": +"web3-utils@npm:^1.3.0": version: 1.7.3 resolution: "web3-utils@npm:1.7.3" dependencies: @@ -15889,21 +12597,6 @@ __metadata: languageName: node linkType: hard -"web3@npm:1.2.11": - version: 1.2.11 - resolution: "web3@npm:1.2.11" - dependencies: - web3-bzz: 1.2.11 - web3-core: 1.2.11 - web3-eth: 1.2.11 - web3-eth-personal: 1.2.11 - web3-net: 1.2.11 - web3-shh: 1.2.11 - web3-utils: 1.2.11 - checksum: c4fa6ddaddc2de31c561590eb3703e9446c0a9bd87155f536fd72c3c22337056bbd045baf36fec6152e58ae67e552fffad29e794030cd87634becb99a079e91f - languageName: node - linkType: hard - "web3@npm:1.5.3": version: 1.5.3 resolution: "web3@npm:1.5.3" @@ -15926,21 +12619,7 @@ __metadata: languageName: node linkType: hard -"websocket@npm:1.0.32": - version: 1.0.32 - resolution: "websocket@npm:1.0.32" - dependencies: - bufferutil: ^4.0.1 - debug: ^2.2.0 - es5-ext: ^0.10.50 - typedarray-to-buffer: ^3.1.5 - utf-8-validate: ^5.0.2 - yaeti: ^0.0.6 - checksum: a29777a1942bf802f955782c7cf948797d19731a911b81adb957873e74b1d5356c621f217a972b075ecf04417a76897ea98dbfc19394007c4cf5e97cd4d494ac - languageName: node - linkType: hard - -"websocket@npm:^1.0.31, websocket@npm:^1.0.32": +"websocket@npm:^1.0.32": version: 1.0.34 resolution: "websocket@npm:1.0.34" dependencies: @@ -15954,13 +12633,6 @@ __metadata: languageName: node linkType: hard -"whatwg-fetch@npm:^2.0.4": - version: 2.0.4 - resolution: "whatwg-fetch@npm:2.0.4" - checksum: de7c65a68d7d62e2f144a6b30293370b3ad82b65ebcd68f2ac8e8bbe7ede90febd98ba9486b78c1cbc950e0e8838fa5c2727f939899ab3fc7b71a04be52d33a5 - languageName: node - linkType: hard - "whatwg-url@npm:^5.0.0": version: 5.0.0 resolution: "whatwg-url@npm:5.0.0" @@ -15984,13 +12656,6 @@ __metadata: languageName: node linkType: hard -"which-module@npm:^1.0.0": - version: 1.0.0 - resolution: "which-module@npm:1.0.0" - checksum: 98434f7deb36350cb543c1f15612188541737e1f12d39b23b1c371dff5cf4aa4746210f2bdec202d5fe9da8682adaf8e3f7c44c520687d30948cfc59d5534edb - languageName: node - linkType: hard - "which-module@npm:^2.0.0": version: 2.0.0 resolution: "which-module@npm:2.0.0" @@ -16033,7 +12698,7 @@ __metadata: languageName: node linkType: hard -"which@npm:2.0.2, which@npm:^2.0.1, which@npm:^2.0.2": +"which@npm:^2.0.1, which@npm:^2.0.2": version: 2.0.2 resolution: "which@npm:2.0.2" dependencies: @@ -16062,15 +12727,6 @@ __metadata: languageName: node linkType: hard -"window-size@npm:^0.2.0": - version: 0.2.0 - resolution: "window-size@npm:0.2.0" - bin: - window-size: cli.js - checksum: a85e2acf156cfa194301294809867bdadd8a48ee5d972d9fa8e3e1b3420a1d0201b13ac8eb0348a0d14bbf2c3316565b6a749749c2384c5d286caf8a064c4f90 - languageName: node - linkType: hard - "word-wrap@npm:^1.2.3, word-wrap@npm:~1.2.3": version: 1.2.3 resolution: "word-wrap@npm:1.2.3" @@ -16095,20 +12751,10 @@ __metadata: languageName: node linkType: hard -"workerpool@npm:6.2.0": - version: 6.2.0 - resolution: "workerpool@npm:6.2.0" - checksum: 3493b4f0ef979a23d2c1583d7ef85f62fc9463cc02f82829d3e7e663b517f8ae9707da0249b382e46ac58986deb0ca2232ee1081713741211bda9254b429c9bb - languageName: node - linkType: hard - -"wrap-ansi@npm:^2.0.0": - version: 2.1.0 - resolution: "wrap-ansi@npm:2.1.0" - dependencies: - string-width: ^1.0.1 - strip-ansi: ^3.0.1 - checksum: 2dacd4b3636f7a53ee13d4d0fe7fa2ed9ad81e9967e17231924ea88a286ec4619a78288de8d41881ee483f4449ab2c0287cde8154ba1bd0126c10271101b2ee3 +"workerpool@npm:6.2.1": + version: 6.2.1 + resolution: "workerpool@npm:6.2.1" + checksum: c2c6eebbc5225f10f758d599a5c016fa04798bcc44e4c1dffb34050cd361d7be2e97891aa44419e7afe647b1f767b1dc0b85a5e046c409d890163f655028b09d languageName: node linkType: hard @@ -16178,15 +12824,6 @@ __metadata: languageName: node linkType: hard -"ws@npm:^5.1.1": - version: 5.2.3 - resolution: "ws@npm:5.2.3" - dependencies: - async-limiter: ~1.0.0 - checksum: bdb2223a40c2c68cf91b25a6c9b8c67d5275378ec6187f343314d3df7530e55b77cb9fe79fb1c6a9758389ac5aefc569d24236924b5c65c5dbbaff409ef739fc - languageName: node - linkType: hard - "ws@npm:^7.4.6": version: 7.5.7 resolution: "ws@npm:7.5.7" @@ -16235,7 +12872,7 @@ __metadata: languageName: node linkType: hard -"xhr@npm:^2.0.4, xhr@npm:^2.2.0, xhr@npm:^2.3.3": +"xhr@npm:^2.0.4, xhr@npm:^2.3.3": version: 2.6.0 resolution: "xhr@npm:2.6.0" dependencies: @@ -16254,29 +12891,13 @@ __metadata: languageName: node linkType: hard -"xtend@npm:^4.0.0, xtend@npm:^4.0.1, xtend@npm:^4.0.2, xtend@npm:~4.0.0, xtend@npm:~4.0.1": +"xtend@npm:^4.0.0, xtend@npm:^4.0.1, xtend@npm:^4.0.2, xtend@npm:~4.0.0": version: 4.0.2 resolution: "xtend@npm:4.0.2" checksum: ac5dfa738b21f6e7f0dd6e65e1b3155036d68104e67e5d5d1bde74892e327d7e5636a076f625599dc394330a731861e87343ff184b0047fef1360a7ec0a5a36a languageName: node linkType: hard -"xtend@npm:~2.1.1": - version: 2.1.2 - resolution: "xtend@npm:2.1.2" - dependencies: - object-keys: ~0.4.0 - checksum: a8b79f31502c163205984eaa2b196051cd2fab0882b49758e30f2f9018255bc6c462e32a090bf3385d1bda04755ad8cc0052a09e049b0038f49eb9b950d9c447 - languageName: node - linkType: hard - -"y18n@npm:^3.2.1": - version: 3.2.2 - resolution: "y18n@npm:3.2.2" - checksum: 6154fd7544f8bbf5b18cdf77692ed88d389be49c87238ecb4e0d6a5276446cd2a5c29cc4bdbdddfc7e4e498b08df9d7e38df4a1453cf75eecfead392246ea74a - languageName: node - linkType: hard - "y18n@npm:^4.0.0": version: 4.0.3 resolution: "y18n@npm:4.0.3" @@ -16346,16 +12967,6 @@ __metadata: languageName: node linkType: hard -"yargs-parser@npm:^2.4.1": - version: 2.4.1 - resolution: "yargs-parser@npm:2.4.1" - dependencies: - camelcase: ^3.0.0 - lodash.assign: ^4.0.6 - checksum: f57946a93a9e0986fccbc7999a3fc8179d4693e4551ef0ace3d599c38ec004a3783efb9eed9fa5d738b30db1cfa1d3a07f4dd6ae060cfce6fe61c3ae7b7a347b - languageName: node - linkType: hard - "yargs-parser@npm:^20.2.2": version: 20.2.9 resolution: "yargs-parser@npm:20.2.9" @@ -16460,28 +13071,6 @@ __metadata: languageName: node linkType: hard -"yargs@npm:^4.7.1": - version: 4.8.1 - resolution: "yargs@npm:4.8.1" - dependencies: - cliui: ^3.2.0 - decamelize: ^1.1.1 - get-caller-file: ^1.0.1 - lodash.assign: ^4.0.3 - os-locale: ^1.4.0 - read-pkg-up: ^1.0.1 - require-directory: ^2.1.1 - require-main-filename: ^1.0.1 - set-blocking: ^2.0.0 - string-width: ^1.0.1 - which-module: ^1.0.0 - window-size: ^0.2.0 - y18n: ^3.2.1 - yargs-parser: ^2.4.1 - checksum: 5d0a45dceaf8cff1c6a7164b2c944755a09cced3cb1d585bbc79ffed758ef9f9b54ead0879e3dacfc696ccd15fec9e6e29183c24517d7f578b47cd0614a3851d - languageName: node - linkType: hard - "yn@npm:3.1.1": version: 3.1.1 resolution: "yn@npm:3.1.1" @@ -16532,12 +13121,11 @@ __metadata: "@typechain/hardhat": ^6.0.0 "@types/chai": ^4.3.1 "@types/inquirer": ^8.2.1 - "@types/mocha": ^9.1.1 + "@types/mocha": ^10.0.1 "@types/node": ^17.0.25 "@typescript-eslint/eslint-plugin": ^5.20.0 "@typescript-eslint/parser": ^5.20.0 chai: ^4.3.6 - chai-bignumber: ^3.0.0 dotenv: ^16.0.0 eslint: ^8.13.0 eslint-config-prettier: ^8.5.0 @@ -16550,13 +13138,13 @@ __metadata: eslint-plugin-simple-import-sort: 7.0.0 eslint-plugin-sort-keys-fix: 1.1.2 eslint-plugin-typescript-sort-keys: 2.1.0 - ethereum-waffle: ^3.4.4 + ethereum-waffle: ^4.0.9 ethereumjs-utils: ^5.2.5 ethers: 5.6.8 - hardhat: 2.9.7 + hardhat: 2.12.6 inquirer: ^8.2.4 - mocha: ^9.2.2 - ts-mocha: ^9.0.2 + mocha: ^10.2.0 + ts-mocha: ^10.0.0 ts-node: 10.8.1 typechain: ^8.0.0 typescript: ^4.6.3 From fc15ef5471f240e9bd677f1ac6ec509c6e523bd7 Mon Sep 17 00:00:00 2001 From: Charlie <31941002+CharlieMc0@users.noreply.github.com> Date: Wed, 8 Feb 2023 11:15:19 -0700 Subject: [PATCH 055/115] Charlie/docker_container (#61) * Added Dockerfile --- .dockerignore | 8 +++++ Dockerfile | 29 +++++++++++++++++++ .../scripts/test-zeta-send.ts | 10 +++---- 3 files changed, 42 insertions(+), 5 deletions(-) create mode 100644 .dockerignore create mode 100644 Dockerfile diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 00000000..a00e9e97 --- /dev/null +++ b/.dockerignore @@ -0,0 +1,8 @@ +**/node_modules/ +**/cache +**/.env +Dockerfile +.github +.vscode +.changeset +.dockerignore \ No newline at end of file diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 00000000..e264b053 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,29 @@ + +FROM node:16.14-alpine + +ENV SHELL /bin/ash +ENV EXECUTE_PROGRAMMATICALLY=true + +RUN apk add --update python3 yarn git nodejs make g++ + +## Install node modules before the code is copied to the container +WORKDIR /home/zetachain/ +COPY package*.json ./ +RUN yarn install + +COPY . ./ +RUN yarn install + +RUN yarn add solc@0.5.10 +RUN yarn add solc@0.6.6 +RUN yarn add solc@0.7.6 +RUN yarn add solc@0.8.7 + +RUN cd packages/protocol-contracts && npx hardhat compile && cd - +RUN cd packages/example-contracts && npx hardhat compile && cd - +RUN cd packages/zevm-contracts && npx hardhat compile && cd - + +WORKDIR /home/zetachain/ + +ENTRYPOINT ["ash"] + diff --git a/packages/protocol-contracts/scripts/test-zeta-send.ts b/packages/protocol-contracts/scripts/test-zeta-send.ts index 8829a112..7ebed773 100644 --- a/packages/protocol-contracts/scripts/test-zeta-send.ts +++ b/packages/protocol-contracts/scripts/test-zeta-send.ts @@ -9,18 +9,18 @@ const encoder = new AbiCoder(); async function main() { const factory = (await ethers.getContractFactory("ZetaConnectorEth")) as ZetaConnectorEthFactory; - + const accounts = await ethers.getSigners(); const contract = factory.attach(getAddress("connector")); - console.log("Sending"); + console.log(`Sending To ${accounts[0].address}`); await ( await contract.send({ - destinationAddress: encoder.encode(["address"], ["0x09b80BEcBe709Dd354b1363727514309d1Ac3C7b"]), + destinationAddress: encoder.encode(["address"], [accounts[0].address]), destinationChainId: getChainId("bsc-testnet"), destinationGasLimit: 1_000_000, - message: encoder.encode(["address"], ["0x09b80BEcBe709Dd354b1363727514309d1Ac3C7b"]), + message: encoder.encode(["address"], [accounts[0].address]), zetaParams: [], - zetaValueAndGas: 0 + zetaValueAndGas: "10000000000000000000" }) ).wait(); console.log("Sent"); From 1193d17fa932e14ebb4b15db458dd7590e994dfc Mon Sep 17 00:00:00 2001 From: Charlie <31941002+CharlieMc0@users.noreply.github.com> Date: Wed, 8 Feb 2023 13:09:49 -0700 Subject: [PATCH 056/115] enabled gitguardian check (#68) --- .github/workflows/gitguardian.yml | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 .github/workflows/gitguardian.yml diff --git a/.github/workflows/gitguardian.yml b/.github/workflows/gitguardian.yml new file mode 100644 index 00000000..43cee265 --- /dev/null +++ b/.github/workflows/gitguardian.yml @@ -0,0 +1,21 @@ +name: GitGuardian scan + +on: [push, pull_request] + +jobs: + scanning: + name: GitGuardian scan + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v2 + with: + fetch-depth: 0 # fetch all history so multiple commits can be scanned + - name: GitGuardian scan + uses: GitGuardian/ggshield-action@master + env: + GITHUB_PUSH_BEFORE_SHA: ${{ github.event.before }} + GITHUB_PUSH_BASE_SHA: ${{ github.event.base }} + GITHUB_PULL_BASE_SHA: ${{ github.event.pull_request.base.sha }} + GITHUB_DEFAULT_BRANCH: ${{ github.event.repository.default_branch }} + GITGUARDIAN_API_KEY: ${{ secrets.GITGUARDIAN_API_KEY }} \ No newline at end of file From d4c41538ae796b9929ce8684f07a6d4fb211f2a2 Mon Sep 17 00:00:00 2001 From: Andres Martin Aiello <50411235+andresaiello@users.noreply.github.com> Date: Mon, 13 Feb 2023 13:22:00 -0300 Subject: [PATCH 057/115] Bug smart contracts script zeta swap deploy (#69) --- packages/addresses-tools/src/networks.ts | 6 +++--- packages/example-contracts/.env.example | 3 ++- packages/protocol-contracts/.env.example | 3 ++- packages/zevm-contracts/.env.example | 3 ++- packages/zevm-contracts/scripts/zeta-swap/deploy.ts | 9 ++++++++- 5 files changed, 17 insertions(+), 7 deletions(-) diff --git a/packages/addresses-tools/src/networks.ts b/packages/addresses-tools/src/networks.ts index 478f1694..5797c684 100644 --- a/packages/addresses-tools/src/networks.ts +++ b/packages/addresses-tools/src/networks.ts @@ -32,13 +32,13 @@ export const getHardhatConfigNetworks = (PRIVATE_KEYS: string[]): NetworksUserCo accounts: PRIVATE_KEYS, gas: 2100000, gasPrice: 38000000000, - url: `https://goerli.infura.io/v3/${process.env.INFURA_KEY}`, + url: `https://eth-goerli.g.alchemy.com/v2/${process.env.ALCHEMY_API_KEY_GOERLI}`, }, hardhat: { chainId: 1337, forking: { blockNumber: 14672712, - url: `https://eth-mainnet.alchemyapi.io/v2/${process.env.ALCHEMY_API_KEY}`, + url: `https://eth-mainnet.alchemyapi.io/v2/${process.env.ALCHEMY_API_KEY_MAINNET}`, }, }, "klaytn-baobab": { @@ -70,7 +70,7 @@ export const getHardhatConfigNetworks = (PRIVATE_KEYS: string[]): NetworksUserCo accounts: PRIVATE_KEYS, gas: 9000000, gasPrice: 80000000000, - url: "https://ropsten.infura.io/v3/9aa3d95b3bc440fa88ea12eaa4456161", + url: "https://ropsten.infura.io/v3/", }, }); diff --git a/packages/example-contracts/.env.example b/packages/example-contracts/.env.example index 008f7836..09bb3086 100644 --- a/packages/example-contracts/.env.example +++ b/packages/example-contracts/.env.example @@ -1,4 +1,5 @@ -ALCHEMY_API_KEY= +ALCHEMY_API_KEY_MAINNET= +ALCHEMY_API_KEY_GOERLI= PUBLIC_KEY_1= diff --git a/packages/protocol-contracts/.env.example b/packages/protocol-contracts/.env.example index a7a45554..fa720306 100644 --- a/packages/protocol-contracts/.env.example +++ b/packages/protocol-contracts/.env.example @@ -1,4 +1,5 @@ -ALCHEMY_API_KEY= +ALCHEMY_API_KEY_MAINNET= +ALCHEMY_API_KEY_GOERLI= PRIVATE_KEY= diff --git a/packages/zevm-contracts/.env.example b/packages/zevm-contracts/.env.example index 01c40bd1..d53e3d1a 100644 --- a/packages/zevm-contracts/.env.example +++ b/packages/zevm-contracts/.env.example @@ -1 +1,2 @@ -INFURA_KEY= \ No newline at end of file +ALCHEMY_API_KEY_MAINNET= +ALCHEMY_API_KEY_GOERLI= \ No newline at end of file diff --git a/packages/zevm-contracts/scripts/zeta-swap/deploy.ts b/packages/zevm-contracts/scripts/zeta-swap/deploy.ts index 6b055105..565caa3b 100644 --- a/packages/zevm-contracts/scripts/zeta-swap/deploy.ts +++ b/packages/zevm-contracts/scripts/zeta-swap/deploy.ts @@ -14,6 +14,12 @@ const main = async () => { zetaNetwork: "athens" }); + const UNISWAP_FACTORY_ADDRESS = getAddress({ + address: "uniswapV2Factory", + networkName: "athens", + zetaNetwork: "athens" + }); + const UNISWAP_ROUTER_ADDRESS = getAddress({ address: "uniswapV2Router02", networkName: "athens", @@ -21,7 +27,7 @@ const main = async () => { }); const Factory = (await ethers.getContractFactory("ZetaSwap")) as ZetaSwap__factory; - const contract = (await Factory.deploy(WZETA_ADDRESS, UNISWAP_ROUTER_ADDRESS)) as ZetaSwap; + const contract = (await Factory.deploy(WZETA_ADDRESS, UNISWAP_FACTORY_ADDRESS, UNISWAP_ROUTER_ADDRESS)) as ZetaSwap; await contract.deployed(); console.log("Deployed ZetaSwap. Address:", contract.address); @@ -30,6 +36,7 @@ const main = async () => { const FactoryBTC = (await ethers.getContractFactory("ZetaSwapBtcInbound")) as ZetaSwapBtcInbound__factory; const contractBTC = (await FactoryBTC.deploy( WZETA_ADDRESS, + UNISWAP_FACTORY_ADDRESS, UNISWAP_ROUTER_ADDRESS, SYSTEM_CONTRACT )) as ZetaSwapBtcInbound; From 399358e0f9be38534e02100c4f43defa60942a68 Mon Sep 17 00:00:00 2001 From: Andres Martin Aiello <50411235+andresaiello@users.noreply.github.com> Date: Fri, 24 Feb 2023 12:05:32 -0300 Subject: [PATCH 058/115] Adjust pause functionality to only apply to send (#70) --- .../ZetaConnectorEth__factory.ts | 2 +- .../ZetaConnectorNonEth__factory.ts | 2 +- .../contracts/ZetaConnector.eth.sol | 2 +- .../contracts/ZetaConnector.non-eth.sol | 4 +- .../test/ZetaConnector.spec.ts | 44 ++++++++++--------- 5 files changed, 29 insertions(+), 25 deletions(-) diff --git a/packages/interfaces/typechain-types/factories/contracts/ZetaConnector.eth.sol/ZetaConnectorEth__factory.ts b/packages/interfaces/typechain-types/factories/contracts/ZetaConnector.eth.sol/ZetaConnectorEth__factory.ts index 2f0d3da8..417553de 100644 --- a/packages/interfaces/typechain-types/factories/contracts/ZetaConnector.eth.sol/ZetaConnectorEth__factory.ts +++ b/packages/interfaces/typechain-types/factories/contracts/ZetaConnector.eth.sol/ZetaConnectorEth__factory.ts @@ -565,7 +565,7 @@ const _abi = [ ]; const _bytecode = - "0x60a06040523480156200001157600080fd5b506040516200209338038062002093833981810160405281019062000037919062000284565b8383838360008060006101000a81548160ff021916908315150217905550600073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff161480620000bd5750600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16145b80620000f55750600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16145b806200012d5750600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16145b1562000165576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8373ffffffffffffffffffffffffffffffffffffffff1660808173ffffffffffffffffffffffffffffffffffffffff1660601b8152505082600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555081600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555080600060016101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550505050505050505062000349565b6000815190506200027e816200032f565b92915050565b60008060008060808587031215620002a157620002a06200032a565b5b6000620002b1878288016200026d565b9450506020620002c4878288016200026d565b9350506040620002d7878288016200026d565b9250506060620002ea878288016200026d565b91505092959194509250565b600062000303826200030a565b9050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600080fd5b6200033a81620002f6565b81146200034657600080fd5b50565b60805160601c611d0f620003846000396000818161024f01528181610275015281816103bf01528181610d420152610fc50152611d0f6000f3fe608060405234801561001057600080fd5b50600436106100ea5760003560e01c80636128480f1161008c5780639122c344116100665780639122c344146101db578063942a5e16146101f7578063ec02690114610213578063f7fb869b1461022f576100ea565b80636128480f146101ab578063779e3b63146101c75780638456cb59146101d1576100ea565b8063328a01d0116100c8578063328a01d0146101475780633f4ba83a146101655780635b1125911461016f5780635c975abb1461018d576100ea565b806321e093b1146100ef578063252bc8861461010d57806329dd214d1461012b575b600080fd5b6100f761024d565b6040516101049190611830565b60405180910390f35b610115610271565b6040516101229190611a9d565b60405180910390f35b610145600480360381019061014091906114e7565b610321565b005b61014f610642565b60405161015c9190611830565b60405180910390f35b61016d610668565b005b610177610704565b6040516101849190611830565b60405180910390f35b61019561072a565b6040516101a291906119b5565b60405180910390f35b6101c560048036038101906101c091906113ab565b610740565b005b6101cf6108b6565b005b6101d9610a36565b005b6101f560048036038101906101f091906113ab565b610ad2565b005b610211600480360381019061020c91906113d8565b610ca4565b005b61022d600480360381019061022891906115b6565b610fb9565b005b610237611148565b6040516102449190611830565b60405180910390f35b7f000000000000000000000000000000000000000000000000000000000000000081565b60007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b81526004016102cc9190611830565b60206040518083038186803b1580156102e457600080fd5b505afa1580156102f8573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061031c91906115ff565b905090565b61032961116e565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146103bb57336040517fff70ace20000000000000000000000000000000000000000000000000000000081526004016103b29190611830565b60405180910390fd5b60007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663a9059cbb87876040518363ffffffff1660e01b8152600401610418929190611927565b602060405180830381600087803b15801561043257600080fd5b505af1158015610446573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061046a91906114ba565b9050806104a3576040517f20878f6200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008484905011156105df578573ffffffffffffffffffffffffffffffffffffffff16633749c51a6040518060a001604052808c8c8080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f8201169050808301925050505050505081526020018a81526020018973ffffffffffffffffffffffffffffffffffffffff16815260200188815260200187878080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050508152506040518263ffffffff1660e01b81526004016105ac9190611a59565b600060405180830381600087803b1580156105c657600080fd5b505af11580156105da573d6000803e3d6000fd5b505050505b818673ffffffffffffffffffffffffffffffffffffffff16887ff1302855733b40d8acb467ee990b6d56c05c80e28ebcabfa6e6f3f57cb50d6988c8c8a8a8a60405161062f9594939291906119d0565b60405180910390a4505050505050505050565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146106fa57336040517f4677a0d30000000000000000000000000000000000000000000000000000000081526004016106f19190611830565b60405180910390fd5b6107026111b8565b565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60008060009054906101000a900460ff16905090565b600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146107d257336040517f4677a0d30000000000000000000000000000000000000000000000000000000081526004016107c99190611830565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415610839576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b80600060016101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055507fd41d83655d484bdf299598751c371b2d92088667266fe3774b25a97bdd5d039733826040516108ab92919061184b565b60405180910390a150565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461094857336040517fe700765e00000000000000000000000000000000000000000000000000000000815260040161093f9190611830565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff16600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614156109d1576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610ac857336040517f4677a0d3000000000000000000000000000000000000000000000000000000008152600401610abf9190611830565b60405180910390fd5b610ad061121a565b565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614158015610b7e5750600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614155b15610bc057336040517fcdfcef97000000000000000000000000000000000000000000000000000000008152600401610bb79190611830565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415610c27576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b80600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055507fe79965b5c67dcfb2cf5fe152715e4a7256cee62a3d5dd8484fd8a8539eb8beff3382604051610c9992919061184b565b60405180910390a150565b610cac61116e565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610d3e57336040517fff70ace2000000000000000000000000000000000000000000000000000000008152600401610d359190611830565b60405180910390fd5b60007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663a9059cbb8b876040518363ffffffff1660e01b8152600401610d9b929190611927565b602060405180830381600087803b158015610db557600080fd5b505af1158015610dc9573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ded91906114ba565b905080610e26576040517f20878f6200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000848490501115610f68578973ffffffffffffffffffffffffffffffffffffffff16633ff0693c6040518060c001604052808d73ffffffffffffffffffffffffffffffffffffffff1681526020018c81526020018b8b8080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f82011690508083019250505050505050815260200189815260200188815260200187878080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050508152506040518263ffffffff1660e01b8152600401610f359190611a7b565b600060405180830381600087803b158015610f4f57600080fd5b505af1158015610f63573d6000803e3d6000fd5b505050505b81867f521fb0b407c2eb9b1375530e9b9a569889992140a688bc076aa72c1712012c888c8c8c8c8b8b8b604051610fa59796959493929190611950565b60405180910390a350505050505050505050565b610fc161116e565b60007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166323b872dd333085608001356040518463ffffffff1660e01b815260040161102493929190611874565b602060405180830381600087803b15801561103e57600080fd5b505af1158015611052573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061107691906114ba565b9050806110af576040517f20878f6200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b81600001353373ffffffffffffffffffffffffffffffffffffffff167f7ec1c94701e09b1652f3e1d307e60c4b9ebf99aff8c2079fd1d8c585e031c4e4328580602001906110fd9190611ab8565b876080013588604001358980606001906111179190611ab8565b8b8060a001906111279190611ab8565b60405161113c999897969594939291906118ab565b60405180910390a35050565b600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b61117661072a565b156111b6576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016111ad90611a39565b60405180910390fd5b565b6111c061127c565b60008060006101000a81548160ff0219169083151502179055507f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa6112036112c5565b6040516112109190611830565b60405180910390a1565b61122261116e565b60016000806101000a81548160ff0219169083151502179055507f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2586112656112c5565b6040516112729190611830565b60405180910390a1565b61128461072a565b6112c3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016112ba90611a19565b60405180910390fd5b565b600033905090565b6000813590506112dc81611c7d565b92915050565b6000815190506112f181611c94565b92915050565b60008135905061130681611cab565b92915050565b60008083601f84011261132257611321611bf2565b5b8235905067ffffffffffffffff81111561133f5761133e611bed565b5b60208301915083600182028301111561135b5761135a611c06565b5b9250929050565b600060c0828403121561137857611377611bfc565b5b81905092915050565b60008135905061139081611cc2565b92915050565b6000815190506113a581611cc2565b92915050565b6000602082840312156113c1576113c0611c15565b5b60006113cf848285016112cd565b91505092915050565b600080600080600080600080600060e08a8c0312156113fa576113f9611c15565b5b60006114088c828d016112cd565b99505060206114198c828d01611381565b98505060408a013567ffffffffffffffff81111561143a57611439611c10565b5b6114468c828d0161130c565b975097505060606114598c828d01611381565b955050608061146a8c828d01611381565b94505060a08a013567ffffffffffffffff81111561148b5761148a611c10565b5b6114978c828d0161130c565b935093505060c06114aa8c828d016112f7565b9150509295985092959850929598565b6000602082840312156114d0576114cf611c15565b5b60006114de848285016112e2565b91505092915050565b60008060008060008060008060c0898b03121561150757611506611c15565b5b600089013567ffffffffffffffff81111561152557611524611c10565b5b6115318b828c0161130c565b985098505060206115448b828c01611381565b96505060406115558b828c016112cd565b95505060606115668b828c01611381565b945050608089013567ffffffffffffffff81111561158757611586611c10565b5b6115938b828c0161130c565b935093505060a06115a68b828c016112f7565b9150509295985092959890939650565b6000602082840312156115cc576115cb611c15565b5b600082013567ffffffffffffffff8111156115ea576115e9611c10565b5b6115f684828501611362565b91505092915050565b60006020828403121561161557611614611c15565b5b600061162384828501611396565b91505092915050565b61163581611b59565b82525050565b61164481611b59565b82525050565b61165381611b6b565b82525050565b60006116658385611b37565b9350611672838584611bab565b61167b83611c1a565b840190509392505050565b600061169182611b1b565b61169b8185611b26565b93506116ab818560208601611bba565b6116b481611c1a565b840191505092915050565b60006116cc601483611b48565b91506116d782611c2b565b602082019050919050565b60006116ef601083611b48565b91506116fa82611c54565b602082019050919050565b600060a08301600083015184820360008601526117228282611686565b91505060208301516117376020860182611812565b50604083015161174a604086018261162c565b50606083015161175d6060860182611812565b50608083015184820360808601526117758282611686565b9150508091505092915050565b600060c08301600083015161179a600086018261162c565b5060208301516117ad6020860182611812565b50604083015184820360408601526117c58282611686565b91505060608301516117da6060860182611812565b5060808301516117ed6080860182611812565b5060a083015184820360a08601526118058282611686565b9150508091505092915050565b61181b81611ba1565b82525050565b61182a81611ba1565b82525050565b6000602082019050611845600083018461163b565b92915050565b6000604082019050611860600083018561163b565b61186d602083018461163b565b9392505050565b6000606082019050611889600083018661163b565b611896602083018561163b565b6118a36040830184611821565b949350505050565b600060c0820190506118c0600083018c61163b565b81810360208301526118d3818a8c611659565b90506118e26040830189611821565b6118ef6060830188611821565b8181036080830152611902818688611659565b905081810360a0830152611917818486611659565b90509a9950505050505050505050565b600060408201905061193c600083018561163b565b6119496020830184611821565b9392505050565b600060a082019050611965600083018a61163b565b6119726020830189611821565b8181036040830152611985818789611659565b90506119946060830186611821565b81810360808301526119a7818486611659565b905098975050505050505050565b60006020820190506119ca600083018461164a565b92915050565b600060608201905081810360008301526119eb818789611659565b90506119fa6020830186611821565b8181036040830152611a0d818486611659565b90509695505050505050565b60006020820190508181036000830152611a32816116bf565b9050919050565b60006020820190508181036000830152611a52816116e2565b9050919050565b60006020820190508181036000830152611a738184611705565b905092915050565b60006020820190508181036000830152611a958184611782565b905092915050565b6000602082019050611ab26000830184611821565b92915050565b60008083356001602003843603038112611ad557611ad4611c01565b5b80840192508235915067ffffffffffffffff821115611af757611af6611bf7565b5b602083019250600182023603831315611b1357611b12611c0b565b5b509250929050565b600081519050919050565b600082825260208201905092915050565b600082825260208201905092915050565b600082825260208201905092915050565b6000611b6482611b81565b9050919050565b60008115159050919050565b6000819050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b82818337600083830152505050565b60005b83811015611bd8578082015181840152602081019050611bbd565b83811115611be7576000848401525b50505050565b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f5061757361626c653a206e6f7420706175736564000000000000000000000000600082015250565b7f5061757361626c653a2070617573656400000000000000000000000000000000600082015250565b611c8681611b59565b8114611c9157600080fd5b50565b611c9d81611b6b565b8114611ca857600080fd5b50565b611cb481611b77565b8114611cbf57600080fd5b50565b611ccb81611ba1565b8114611cd657600080fd5b5056fea26469706673582212204afecc5390ad266fc43f948210dde48d44dfd42ab1a0379d9c40b7ed6307342b64736f6c63430008070033"; + "0x60a06040523480156200001157600080fd5b506040516200208b3803806200208b833981810160405281019062000037919062000284565b8383838360008060006101000a81548160ff021916908315150217905550600073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff161480620000bd5750600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16145b80620000f55750600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16145b806200012d5750600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16145b1562000165576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8373ffffffffffffffffffffffffffffffffffffffff1660808173ffffffffffffffffffffffffffffffffffffffff1660601b8152505082600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555081600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555080600060016101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550505050505050505062000349565b6000815190506200027e816200032f565b92915050565b60008060008060808587031215620002a157620002a06200032a565b5b6000620002b1878288016200026d565b9450506020620002c4878288016200026d565b9350506040620002d7878288016200026d565b9250506060620002ea878288016200026d565b91505092959194509250565b600062000303826200030a565b9050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600080fd5b6200033a81620002f6565b81146200034657600080fd5b50565b60805160601c611d07620003846000396000818161024f01528181610275015281816103b701528181610d3a0152610fbd0152611d076000f3fe608060405234801561001057600080fd5b50600436106100ea5760003560e01c80636128480f1161008c5780639122c344116100665780639122c344146101db578063942a5e16146101f7578063ec02690114610213578063f7fb869b1461022f576100ea565b80636128480f146101ab578063779e3b63146101c75780638456cb59146101d1576100ea565b8063328a01d0116100c8578063328a01d0146101475780633f4ba83a146101655780635b1125911461016f5780635c975abb1461018d576100ea565b806321e093b1146100ef578063252bc8861461010d57806329dd214d1461012b575b600080fd5b6100f761024d565b6040516101049190611828565b60405180910390f35b610115610271565b6040516101229190611a95565b60405180910390f35b610145600480360381019061014091906114df565b610321565b005b61014f61063a565b60405161015c9190611828565b60405180910390f35b61016d610660565b005b6101776106fc565b6040516101849190611828565b60405180910390f35b610195610722565b6040516101a291906119ad565b60405180910390f35b6101c560048036038101906101c091906113a3565b610738565b005b6101cf6108ae565b005b6101d9610a2e565b005b6101f560048036038101906101f091906113a3565b610aca565b005b610211600480360381019061020c91906113d0565b610c9c565b005b61022d600480360381019061022891906115ae565b610fb1565b005b610237611140565b6040516102449190611828565b60405180910390f35b7f000000000000000000000000000000000000000000000000000000000000000081565b60007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b81526004016102cc9190611828565b60206040518083038186803b1580156102e457600080fd5b505afa1580156102f8573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061031c91906115f7565b905090565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146103b357336040517fff70ace20000000000000000000000000000000000000000000000000000000081526004016103aa9190611828565b60405180910390fd5b60007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663a9059cbb87876040518363ffffffff1660e01b815260040161041092919061191f565b602060405180830381600087803b15801561042a57600080fd5b505af115801561043e573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061046291906114b2565b90508061049b576040517f20878f6200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008484905011156105d7578573ffffffffffffffffffffffffffffffffffffffff16633749c51a6040518060a001604052808c8c8080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f8201169050808301925050505050505081526020018a81526020018973ffffffffffffffffffffffffffffffffffffffff16815260200188815260200187878080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050508152506040518263ffffffff1660e01b81526004016105a49190611a51565b600060405180830381600087803b1580156105be57600080fd5b505af11580156105d2573d6000803e3d6000fd5b505050505b818673ffffffffffffffffffffffffffffffffffffffff16887ff1302855733b40d8acb467ee990b6d56c05c80e28ebcabfa6e6f3f57cb50d6988c8c8a8a8a6040516106279594939291906119c8565b60405180910390a4505050505050505050565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146106f257336040517f4677a0d30000000000000000000000000000000000000000000000000000000081526004016106e99190611828565b60405180910390fd5b6106fa611166565b565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60008060009054906101000a900460ff16905090565b600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146107ca57336040517f4677a0d30000000000000000000000000000000000000000000000000000000081526004016107c19190611828565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415610831576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b80600060016101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055507fd41d83655d484bdf299598751c371b2d92088667266fe3774b25a97bdd5d039733826040516108a3929190611843565b60405180910390a150565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461094057336040517fe700765e0000000000000000000000000000000000000000000000000000000081526004016109379190611828565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff16600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614156109c9576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610ac057336040517f4677a0d3000000000000000000000000000000000000000000000000000000008152600401610ab79190611828565b60405180910390fd5b610ac86111c8565b565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614158015610b765750600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614155b15610bb857336040517fcdfcef97000000000000000000000000000000000000000000000000000000008152600401610baf9190611828565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415610c1f576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b80600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055507fe79965b5c67dcfb2cf5fe152715e4a7256cee62a3d5dd8484fd8a8539eb8beff3382604051610c91929190611843565b60405180910390a150565b610ca461122a565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610d3657336040517fff70ace2000000000000000000000000000000000000000000000000000000008152600401610d2d9190611828565b60405180910390fd5b60007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663a9059cbb8b876040518363ffffffff1660e01b8152600401610d9392919061191f565b602060405180830381600087803b158015610dad57600080fd5b505af1158015610dc1573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610de591906114b2565b905080610e1e576040517f20878f6200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000848490501115610f60578973ffffffffffffffffffffffffffffffffffffffff16633ff0693c6040518060c001604052808d73ffffffffffffffffffffffffffffffffffffffff1681526020018c81526020018b8b8080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f82011690508083019250505050505050815260200189815260200188815260200187878080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050508152506040518263ffffffff1660e01b8152600401610f2d9190611a73565b600060405180830381600087803b158015610f4757600080fd5b505af1158015610f5b573d6000803e3d6000fd5b505050505b81867f521fb0b407c2eb9b1375530e9b9a569889992140a688bc076aa72c1712012c888c8c8c8c8b8b8b604051610f9d9796959493929190611948565b60405180910390a350505050505050505050565b610fb961122a565b60007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166323b872dd333085608001356040518463ffffffff1660e01b815260040161101c9392919061186c565b602060405180830381600087803b15801561103657600080fd5b505af115801561104a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061106e91906114b2565b9050806110a7576040517f20878f6200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b81600001353373ffffffffffffffffffffffffffffffffffffffff167f7ec1c94701e09b1652f3e1d307e60c4b9ebf99aff8c2079fd1d8c585e031c4e4328580602001906110f59190611ab0565b8760800135886040013589806060019061110f9190611ab0565b8b8060a0019061111f9190611ab0565b604051611134999897969594939291906118a3565b60405180910390a35050565b600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b61116e611274565b60008060006101000a81548160ff0219169083151502179055507f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa6111b16112bd565b6040516111be9190611828565b60405180910390a1565b6111d061122a565b60016000806101000a81548160ff0219169083151502179055507f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2586112136112bd565b6040516112209190611828565b60405180910390a1565b611232610722565b15611272576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161126990611a31565b60405180910390fd5b565b61127c610722565b6112bb576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016112b290611a11565b60405180910390fd5b565b600033905090565b6000813590506112d481611c75565b92915050565b6000815190506112e981611c8c565b92915050565b6000813590506112fe81611ca3565b92915050565b60008083601f84011261131a57611319611bea565b5b8235905067ffffffffffffffff81111561133757611336611be5565b5b60208301915083600182028301111561135357611352611bfe565b5b9250929050565b600060c082840312156113705761136f611bf4565b5b81905092915050565b60008135905061138881611cba565b92915050565b60008151905061139d81611cba565b92915050565b6000602082840312156113b9576113b8611c0d565b5b60006113c7848285016112c5565b91505092915050565b600080600080600080600080600060e08a8c0312156113f2576113f1611c0d565b5b60006114008c828d016112c5565b99505060206114118c828d01611379565b98505060408a013567ffffffffffffffff81111561143257611431611c08565b5b61143e8c828d01611304565b975097505060606114518c828d01611379565b95505060806114628c828d01611379565b94505060a08a013567ffffffffffffffff81111561148357611482611c08565b5b61148f8c828d01611304565b935093505060c06114a28c828d016112ef565b9150509295985092959850929598565b6000602082840312156114c8576114c7611c0d565b5b60006114d6848285016112da565b91505092915050565b60008060008060008060008060c0898b0312156114ff576114fe611c0d565b5b600089013567ffffffffffffffff81111561151d5761151c611c08565b5b6115298b828c01611304565b9850985050602061153c8b828c01611379565b965050604061154d8b828c016112c5565b955050606061155e8b828c01611379565b945050608089013567ffffffffffffffff81111561157f5761157e611c08565b5b61158b8b828c01611304565b935093505060a061159e8b828c016112ef565b9150509295985092959890939650565b6000602082840312156115c4576115c3611c0d565b5b600082013567ffffffffffffffff8111156115e2576115e1611c08565b5b6115ee8482850161135a565b91505092915050565b60006020828403121561160d5761160c611c0d565b5b600061161b8482850161138e565b91505092915050565b61162d81611b51565b82525050565b61163c81611b51565b82525050565b61164b81611b63565b82525050565b600061165d8385611b2f565b935061166a838584611ba3565b61167383611c12565b840190509392505050565b600061168982611b13565b6116938185611b1e565b93506116a3818560208601611bb2565b6116ac81611c12565b840191505092915050565b60006116c4601483611b40565b91506116cf82611c23565b602082019050919050565b60006116e7601083611b40565b91506116f282611c4c565b602082019050919050565b600060a083016000830151848203600086015261171a828261167e565b915050602083015161172f602086018261180a565b5060408301516117426040860182611624565b506060830151611755606086018261180a565b506080830151848203608086015261176d828261167e565b9150508091505092915050565b600060c0830160008301516117926000860182611624565b5060208301516117a5602086018261180a565b50604083015184820360408601526117bd828261167e565b91505060608301516117d2606086018261180a565b5060808301516117e5608086018261180a565b5060a083015184820360a08601526117fd828261167e565b9150508091505092915050565b61181381611b99565b82525050565b61182281611b99565b82525050565b600060208201905061183d6000830184611633565b92915050565b60006040820190506118586000830185611633565b6118656020830184611633565b9392505050565b60006060820190506118816000830186611633565b61188e6020830185611633565b61189b6040830184611819565b949350505050565b600060c0820190506118b8600083018c611633565b81810360208301526118cb818a8c611651565b90506118da6040830189611819565b6118e76060830188611819565b81810360808301526118fa818688611651565b905081810360a083015261190f818486611651565b90509a9950505050505050505050565b60006040820190506119346000830185611633565b6119416020830184611819565b9392505050565b600060a08201905061195d600083018a611633565b61196a6020830189611819565b818103604083015261197d818789611651565b905061198c6060830186611819565b818103608083015261199f818486611651565b905098975050505050505050565b60006020820190506119c26000830184611642565b92915050565b600060608201905081810360008301526119e3818789611651565b90506119f26020830186611819565b8181036040830152611a05818486611651565b90509695505050505050565b60006020820190508181036000830152611a2a816116b7565b9050919050565b60006020820190508181036000830152611a4a816116da565b9050919050565b60006020820190508181036000830152611a6b81846116fd565b905092915050565b60006020820190508181036000830152611a8d818461177a565b905092915050565b6000602082019050611aaa6000830184611819565b92915050565b60008083356001602003843603038112611acd57611acc611bf9565b5b80840192508235915067ffffffffffffffff821115611aef57611aee611bef565b5b602083019250600182023603831315611b0b57611b0a611c03565b5b509250929050565b600081519050919050565b600082825260208201905092915050565b600082825260208201905092915050565b600082825260208201905092915050565b6000611b5c82611b79565b9050919050565b60008115159050919050565b6000819050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b82818337600083830152505050565b60005b83811015611bd0578082015181840152602081019050611bb5565b83811115611bdf576000848401525b50505050565b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f5061757361626c653a206e6f7420706175736564000000000000000000000000600082015250565b7f5061757361626c653a2070617573656400000000000000000000000000000000600082015250565b611c7e81611b51565b8114611c8957600080fd5b50565b611c9581611b63565b8114611ca057600080fd5b50565b611cac81611b6f565b8114611cb757600080fd5b50565b611cc381611b99565b8114611cce57600080fd5b5056fea2646970667358221220d2e7d407d896bdfd48007009af0b4d7ffaf3855f30e9fb3a4cf50048a381ca1b64736f6c63430008070033"; type ZetaConnectorEthConstructorParams = | [signer?: Signer] diff --git a/packages/interfaces/typechain-types/factories/contracts/ZetaConnector.non-eth.sol/ZetaConnectorNonEth__factory.ts b/packages/interfaces/typechain-types/factories/contracts/ZetaConnector.non-eth.sol/ZetaConnectorNonEth__factory.ts index c7e9a3ee..252f0138 100644 --- a/packages/interfaces/typechain-types/factories/contracts/ZetaConnector.non-eth.sol/ZetaConnectorNonEth__factory.ts +++ b/packages/interfaces/typechain-types/factories/contracts/ZetaConnector.non-eth.sol/ZetaConnectorNonEth__factory.ts @@ -591,7 +591,7 @@ const _abi = [ ]; const _bytecode = - "0x60a06040527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6003553480156200003557600080fd5b50604051620022ef380380620022ef83398181016040528101906200005b9190620002a8565b8383838360008060006101000a81548160ff021916908315150217905550600073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff161480620000e15750600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16145b80620001195750600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16145b80620001515750600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16145b1562000189576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8373ffffffffffffffffffffffffffffffffffffffff1660808173ffffffffffffffffffffffffffffffffffffffff1660601b8152505082600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555081600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555080600060016101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050505050505050506200036d565b600081519050620002a28162000353565b92915050565b60008060008060808587031215620002c557620002c46200034e565b5b6000620002d58782880162000291565b9450506020620002e88782880162000291565b9350506040620002fb8782880162000291565b92505060606200030e8782880162000291565b91505092959194509250565b600062000327826200032e565b9050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600080fd5b6200035e816200031a565b81146200036a57600080fd5b50565b60805160601c611f39620003b66000396000818161029f015281816102c501528181610410015281816104fe01528181610ec601528181610fb401526111e30152611f396000f3fe608060405234801561001057600080fd5b50600436106101005760003560e01c80636f8b44b011610097578063942a5e1611610066578063942a5e1614610229578063d5abeb0114610245578063ec02690114610263578063f7fb869b1461027f57610100565b80636f8b44b0146101dd578063779e3b63146101f95780638456cb59146102035780639122c3441461020d57610100565b80633f4ba83a116100d35780633f4ba83a1461017b5780635b112591146101855780635c975abb146101a35780636128480f146101c157610100565b806321e093b114610105578063252bc8861461012357806329dd214d14610141578063328a01d01461015d575b600080fd5b61010d61029d565b60405161011a91906119ec565b60405180910390f35b61012b6102c1565b6040516101389190611c59565b60405180910390f35b61015b60048036038101906101569190611667565b610371565b005b610165610729565b60405161017291906119ec565b60405180910390f35b61018361074f565b005b61018d6107eb565b60405161019a91906119ec565b60405180910390f35b6101ab610811565b6040516101b89190611b71565b60405180910390f35b6101db60048036038101906101d69190611558565b610827565b005b6101f760048036038101906101f2919061177f565b61099d565b005b610201610a39565b005b61020b610bb9565b005b61022760048036038101906102229190611558565b610c55565b005b610243600480360381019061023e9190611585565b610e27565b005b61024d6111d3565b60405161025a9190611c59565b60405180910390f35b61027d60048036038101906102789190611736565b6111d9565b005b61028761130a565b60405161029491906119ec565b60405180910390f35b7f000000000000000000000000000000000000000000000000000000000000000081565b60007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b815260040161031c91906119ec565b60206040518083038186803b15801561033457600080fd5b505afa158015610348573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061036c91906117ac565b905090565b610379611330565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461040b57336040517fff70ace200000000000000000000000000000000000000000000000000000000815260040161040291906119ec565b60405180910390fd5b6003547f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166318160ddd6040518163ffffffff1660e01b815260040160206040518083038186803b15801561047457600080fd5b505afa158015610488573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104ac91906117ac565b856104b79190611d15565b11156104fc576003546040517f3d3dbc830000000000000000000000000000000000000000000000000000000081526004016104f39190611c59565b60405180910390fd5b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16631e458bee8686846040518463ffffffff1660e01b815260040161055993929190611ad5565b600060405180830381600087803b15801561057357600080fd5b505af1158015610587573d6000803e3d6000fd5b5050505060008383905011156106c7578473ffffffffffffffffffffffffffffffffffffffff16633749c51a6040518060a001604052808b8b8080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f8201169050808301925050505050505081526020018981526020018873ffffffffffffffffffffffffffffffffffffffff16815260200187815260200186868080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050508152506040518263ffffffff1660e01b81526004016106949190611c15565b600060405180830381600087803b1580156106ae57600080fd5b505af11580156106c2573d6000803e3d6000fd5b505050505b808573ffffffffffffffffffffffffffffffffffffffff16877ff1302855733b40d8acb467ee990b6d56c05c80e28ebcabfa6e6f3f57cb50d6988b8b898989604051610717959493929190611b8c565b60405180910390a45050505050505050565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146107e157336040517f4677a0d30000000000000000000000000000000000000000000000000000000081526004016107d891906119ec565b60405180910390fd5b6107e961137a565b565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60008060009054906101000a900460ff16905090565b600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146108b957336040517f4677a0d30000000000000000000000000000000000000000000000000000000081526004016108b091906119ec565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415610920576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b80600060016101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055507fd41d83655d484bdf299598751c371b2d92088667266fe3774b25a97bdd5d03973382604051610992929190611a07565b60405180910390a150565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610a2f57336040517fff70ace2000000000000000000000000000000000000000000000000000000008152600401610a2691906119ec565b60405180910390fd5b8060038190555050565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610acb57336040517fe700765e000000000000000000000000000000000000000000000000000000008152600401610ac291906119ec565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff16600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161415610b54576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610c4b57336040517f4677a0d3000000000000000000000000000000000000000000000000000000008152600401610c4291906119ec565b60405180910390fd5b610c536113dc565b565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614158015610d015750600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614155b15610d4357336040517fcdfcef97000000000000000000000000000000000000000000000000000000008152600401610d3a91906119ec565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415610daa576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b80600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055507fe79965b5c67dcfb2cf5fe152715e4a7256cee62a3d5dd8484fd8a8539eb8beff3382604051610e1c929190611a07565b60405180910390a150565b610e2f611330565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610ec157336040517fff70ace2000000000000000000000000000000000000000000000000000000008152600401610eb891906119ec565b60405180910390fd5b6003547f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166318160ddd6040518163ffffffff1660e01b815260040160206040518083038186803b158015610f2a57600080fd5b505afa158015610f3e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f6291906117ac565b85610f6d9190611d15565b1115610fb2576003546040517f3d3dbc83000000000000000000000000000000000000000000000000000000008152600401610fa99190611c59565b60405180910390fd5b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16631e458bee8a86846040518463ffffffff1660e01b815260040161100f93929190611ad5565b600060405180830381600087803b15801561102957600080fd5b505af115801561103d573d6000803e3d6000fd5b505050506000838390501115611183578873ffffffffffffffffffffffffffffffffffffffff16633ff0693c6040518060c001604052808c73ffffffffffffffffffffffffffffffffffffffff1681526020018b81526020018a8a8080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f82011690508083019250505050505050815260200188815260200187815260200186868080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050508152506040518263ffffffff1660e01b81526004016111509190611c37565b600060405180830381600087803b15801561116a57600080fd5b505af115801561117e573d6000803e3d6000fd5b505050505b80857f521fb0b407c2eb9b1375530e9b9a569889992140a688bc076aa72c1712012c888b8b8b8b8a8a8a6040516111c09796959493929190611b0c565b60405180910390a3505050505050505050565b60035481565b6111e1611330565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166379cc67903383608001356040518363ffffffff1660e01b8152600401611240929190611aac565b600060405180830381600087803b15801561125a57600080fd5b505af115801561126e573d6000803e3d6000fd5b5050505080600001353373ffffffffffffffffffffffffffffffffffffffff167f7ec1c94701e09b1652f3e1d307e60c4b9ebf99aff8c2079fd1d8c585e031c4e4328480602001906112c09190611c74565b866080013587604001358880606001906112da9190611c74565b8a8060a001906112ea9190611c74565b6040516112ff99989796959493929190611a30565b60405180910390a350565b600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b611338610811565b15611378576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161136f90611bf5565b60405180910390fd5b565b61138261143e565b60008060006101000a81548160ff0219169083151502179055507f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa6113c5611487565b6040516113d291906119ec565b60405180910390a1565b6113e4611330565b60016000806101000a81548160ff0219169083151502179055507f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258611427611487565b60405161143491906119ec565b60405180910390a1565b611446610811565b611485576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161147c90611bd5565b60405180910390fd5b565b600033905090565b60008135905061149e81611ebe565b92915050565b6000813590506114b381611ed5565b92915050565b60008083601f8401126114cf576114ce611e33565b5b8235905067ffffffffffffffff8111156114ec576114eb611e2e565b5b60208301915083600182028301111561150857611507611e47565b5b9250929050565b600060c0828403121561152557611524611e3d565b5b81905092915050565b60008135905061153d81611eec565b92915050565b60008151905061155281611eec565b92915050565b60006020828403121561156e5761156d611e56565b5b600061157c8482850161148f565b91505092915050565b600080600080600080600080600060e08a8c0312156115a7576115a6611e56565b5b60006115b58c828d0161148f565b99505060206115c68c828d0161152e565b98505060408a013567ffffffffffffffff8111156115e7576115e6611e51565b5b6115f38c828d016114b9565b975097505060606116068c828d0161152e565b95505060806116178c828d0161152e565b94505060a08a013567ffffffffffffffff81111561163857611637611e51565b5b6116448c828d016114b9565b935093505060c06116578c828d016114a4565b9150509295985092959850929598565b60008060008060008060008060c0898b03121561168757611686611e56565b5b600089013567ffffffffffffffff8111156116a5576116a4611e51565b5b6116b18b828c016114b9565b985098505060206116c48b828c0161152e565b96505060406116d58b828c0161148f565b95505060606116e68b828c0161152e565b945050608089013567ffffffffffffffff81111561170757611706611e51565b5b6117138b828c016114b9565b935093505060a06117268b828c016114a4565b9150509295985092959890939650565b60006020828403121561174c5761174b611e56565b5b600082013567ffffffffffffffff81111561176a57611769611e51565b5b6117768482850161150f565b91505092915050565b60006020828403121561179557611794611e56565b5b60006117a38482850161152e565b91505092915050565b6000602082840312156117c2576117c1611e56565b5b60006117d084828501611543565b91505092915050565b6117e281611d6b565b82525050565b6117f181611d6b565b82525050565b61180081611d7d565b82525050565b61180f81611d89565b82525050565b60006118218385611cf3565b935061182e838584611dbd565b61183783611e5b565b840190509392505050565b600061184d82611cd7565b6118578185611ce2565b9350611867818560208601611dcc565b61187081611e5b565b840191505092915050565b6000611888601483611d04565b915061189382611e6c565b602082019050919050565b60006118ab601083611d04565b91506118b682611e95565b602082019050919050565b600060a08301600083015184820360008601526118de8282611842565b91505060208301516118f360208601826119ce565b50604083015161190660408601826117d9565b50606083015161191960608601826119ce565b50608083015184820360808601526119318282611842565b9150508091505092915050565b600060c08301600083015161195660008601826117d9565b50602083015161196960208601826119ce565b50604083015184820360408601526119818282611842565b915050606083015161199660608601826119ce565b5060808301516119a960808601826119ce565b5060a083015184820360a08601526119c18282611842565b9150508091505092915050565b6119d781611db3565b82525050565b6119e681611db3565b82525050565b6000602082019050611a0160008301846117e8565b92915050565b6000604082019050611a1c60008301856117e8565b611a2960208301846117e8565b9392505050565b600060c082019050611a45600083018c6117e8565b8181036020830152611a58818a8c611815565b9050611a6760408301896119dd565b611a7460608301886119dd565b8181036080830152611a87818688611815565b905081810360a0830152611a9c818486611815565b90509a9950505050505050505050565b6000604082019050611ac160008301856117e8565b611ace60208301846119dd565b9392505050565b6000606082019050611aea60008301866117e8565b611af760208301856119dd565b611b046040830184611806565b949350505050565b600060a082019050611b21600083018a6117e8565b611b2e60208301896119dd565b8181036040830152611b41818789611815565b9050611b5060608301866119dd565b8181036080830152611b63818486611815565b905098975050505050505050565b6000602082019050611b8660008301846117f7565b92915050565b60006060820190508181036000830152611ba7818789611815565b9050611bb660208301866119dd565b8181036040830152611bc9818486611815565b90509695505050505050565b60006020820190508181036000830152611bee8161187b565b9050919050565b60006020820190508181036000830152611c0e8161189e565b9050919050565b60006020820190508181036000830152611c2f81846118c1565b905092915050565b60006020820190508181036000830152611c51818461193e565b905092915050565b6000602082019050611c6e60008301846119dd565b92915050565b60008083356001602003843603038112611c9157611c90611e42565b5b80840192508235915067ffffffffffffffff821115611cb357611cb2611e38565b5b602083019250600182023603831315611ccf57611cce611e4c565b5b509250929050565b600081519050919050565b600082825260208201905092915050565b600082825260208201905092915050565b600082825260208201905092915050565b6000611d2082611db3565b9150611d2b83611db3565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff03821115611d6057611d5f611dff565b5b828201905092915050565b6000611d7682611d93565b9050919050565b60008115159050919050565b6000819050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b82818337600083830152505050565b60005b83811015611dea578082015181840152602081019050611dcf565b83811115611df9576000848401525b50505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f5061757361626c653a206e6f7420706175736564000000000000000000000000600082015250565b7f5061757361626c653a2070617573656400000000000000000000000000000000600082015250565b611ec781611d6b565b8114611ed257600080fd5b50565b611ede81611d89565b8114611ee957600080fd5b50565b611ef581611db3565b8114611f0057600080fd5b5056fea2646970667358221220fe53c400648c437eb2c5cb4a54cddabf79a2d10b3ce92addc52a0ff55708801164736f6c63430008070033"; + "0x60a06040527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6003553480156200003557600080fd5b50604051620022e7380380620022e783398181016040528101906200005b9190620002a8565b8383838360008060006101000a81548160ff021916908315150217905550600073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff161480620000e15750600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16145b80620001195750600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16145b80620001515750600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16145b1562000189576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8373ffffffffffffffffffffffffffffffffffffffff1660808173ffffffffffffffffffffffffffffffffffffffff1660601b8152505082600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555081600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555080600060016101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050505050505050506200036d565b600081519050620002a28162000353565b92915050565b60008060008060808587031215620002c557620002c46200034e565b5b6000620002d58782880162000291565b9450506020620002e88782880162000291565b9350506040620002fb8782880162000291565b92505060606200030e8782880162000291565b91505092959194509250565b600062000327826200032e565b9050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600080fd5b6200035e816200031a565b81146200036a57600080fd5b50565b60805160601c611f31620003b66000396000818161029f015281816102c501528181610408015281816104f601528181610ebe01528181610fac01526111db0152611f316000f3fe608060405234801561001057600080fd5b50600436106101005760003560e01c80636f8b44b011610097578063942a5e1611610066578063942a5e1614610229578063d5abeb0114610245578063ec02690114610263578063f7fb869b1461027f57610100565b80636f8b44b0146101dd578063779e3b63146101f95780638456cb59146102035780639122c3441461020d57610100565b80633f4ba83a116100d35780633f4ba83a1461017b5780635b112591146101855780635c975abb146101a35780636128480f146101c157610100565b806321e093b114610105578063252bc8861461012357806329dd214d14610141578063328a01d01461015d575b600080fd5b61010d61029d565b60405161011a91906119e4565b60405180910390f35b61012b6102c1565b6040516101389190611c51565b60405180910390f35b61015b6004803603810190610156919061165f565b610371565b005b610165610721565b60405161017291906119e4565b60405180910390f35b610183610747565b005b61018d6107e3565b60405161019a91906119e4565b60405180910390f35b6101ab610809565b6040516101b89190611b69565b60405180910390f35b6101db60048036038101906101d69190611550565b61081f565b005b6101f760048036038101906101f29190611777565b610995565b005b610201610a31565b005b61020b610bb1565b005b61022760048036038101906102229190611550565b610c4d565b005b610243600480360381019061023e919061157d565b610e1f565b005b61024d6111cb565b60405161025a9190611c51565b60405180910390f35b61027d6004803603810190610278919061172e565b6111d1565b005b610287611302565b60405161029491906119e4565b60405180910390f35b7f000000000000000000000000000000000000000000000000000000000000000081565b60007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b815260040161031c91906119e4565b60206040518083038186803b15801561033457600080fd5b505afa158015610348573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061036c91906117a4565b905090565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461040357336040517fff70ace20000000000000000000000000000000000000000000000000000000081526004016103fa91906119e4565b60405180910390fd5b6003547f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166318160ddd6040518163ffffffff1660e01b815260040160206040518083038186803b15801561046c57600080fd5b505afa158015610480573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104a491906117a4565b856104af9190611d0d565b11156104f4576003546040517f3d3dbc830000000000000000000000000000000000000000000000000000000081526004016104eb9190611c51565b60405180910390fd5b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16631e458bee8686846040518463ffffffff1660e01b815260040161055193929190611acd565b600060405180830381600087803b15801561056b57600080fd5b505af115801561057f573d6000803e3d6000fd5b5050505060008383905011156106bf578473ffffffffffffffffffffffffffffffffffffffff16633749c51a6040518060a001604052808b8b8080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f8201169050808301925050505050505081526020018981526020018873ffffffffffffffffffffffffffffffffffffffff16815260200187815260200186868080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050508152506040518263ffffffff1660e01b815260040161068c9190611c0d565b600060405180830381600087803b1580156106a657600080fd5b505af11580156106ba573d6000803e3d6000fd5b505050505b808573ffffffffffffffffffffffffffffffffffffffff16877ff1302855733b40d8acb467ee990b6d56c05c80e28ebcabfa6e6f3f57cb50d6988b8b89898960405161070f959493929190611b84565b60405180910390a45050505050505050565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146107d957336040517f4677a0d30000000000000000000000000000000000000000000000000000000081526004016107d091906119e4565b60405180910390fd5b6107e1611328565b565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60008060009054906101000a900460ff16905090565b600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146108b157336040517f4677a0d30000000000000000000000000000000000000000000000000000000081526004016108a891906119e4565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415610918576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b80600060016101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055507fd41d83655d484bdf299598751c371b2d92088667266fe3774b25a97bdd5d0397338260405161098a9291906119ff565b60405180910390a150565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610a2757336040517fff70ace2000000000000000000000000000000000000000000000000000000008152600401610a1e91906119e4565b60405180910390fd5b8060038190555050565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610ac357336040517fe700765e000000000000000000000000000000000000000000000000000000008152600401610aba91906119e4565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff16600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161415610b4c576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610c4357336040517f4677a0d3000000000000000000000000000000000000000000000000000000008152600401610c3a91906119e4565b60405180910390fd5b610c4b61138a565b565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614158015610cf95750600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614155b15610d3b57336040517fcdfcef97000000000000000000000000000000000000000000000000000000008152600401610d3291906119e4565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415610da2576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b80600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055507fe79965b5c67dcfb2cf5fe152715e4a7256cee62a3d5dd8484fd8a8539eb8beff3382604051610e149291906119ff565b60405180910390a150565b610e276113ec565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610eb957336040517fff70ace2000000000000000000000000000000000000000000000000000000008152600401610eb091906119e4565b60405180910390fd5b6003547f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166318160ddd6040518163ffffffff1660e01b815260040160206040518083038186803b158015610f2257600080fd5b505afa158015610f36573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f5a91906117a4565b85610f659190611d0d565b1115610faa576003546040517f3d3dbc83000000000000000000000000000000000000000000000000000000008152600401610fa19190611c51565b60405180910390fd5b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16631e458bee8a86846040518463ffffffff1660e01b815260040161100793929190611acd565b600060405180830381600087803b15801561102157600080fd5b505af1158015611035573d6000803e3d6000fd5b50505050600083839050111561117b578873ffffffffffffffffffffffffffffffffffffffff16633ff0693c6040518060c001604052808c73ffffffffffffffffffffffffffffffffffffffff1681526020018b81526020018a8a8080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f82011690508083019250505050505050815260200188815260200187815260200186868080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050508152506040518263ffffffff1660e01b81526004016111489190611c2f565b600060405180830381600087803b15801561116257600080fd5b505af1158015611176573d6000803e3d6000fd5b505050505b80857f521fb0b407c2eb9b1375530e9b9a569889992140a688bc076aa72c1712012c888b8b8b8b8a8a8a6040516111b89796959493929190611b04565b60405180910390a3505050505050505050565b60035481565b6111d96113ec565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166379cc67903383608001356040518363ffffffff1660e01b8152600401611238929190611aa4565b600060405180830381600087803b15801561125257600080fd5b505af1158015611266573d6000803e3d6000fd5b5050505080600001353373ffffffffffffffffffffffffffffffffffffffff167f7ec1c94701e09b1652f3e1d307e60c4b9ebf99aff8c2079fd1d8c585e031c4e4328480602001906112b89190611c6c565b866080013587604001358880606001906112d29190611c6c565b8a8060a001906112e29190611c6c565b6040516112f799989796959493929190611a28565b60405180910390a350565b600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b611330611436565b60008060006101000a81548160ff0219169083151502179055507f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa61137361147f565b60405161138091906119e4565b60405180910390a1565b6113926113ec565b60016000806101000a81548160ff0219169083151502179055507f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2586113d561147f565b6040516113e291906119e4565b60405180910390a1565b6113f4610809565b15611434576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161142b90611bed565b60405180910390fd5b565b61143e610809565b61147d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161147490611bcd565b60405180910390fd5b565b600033905090565b60008135905061149681611eb6565b92915050565b6000813590506114ab81611ecd565b92915050565b60008083601f8401126114c7576114c6611e2b565b5b8235905067ffffffffffffffff8111156114e4576114e3611e26565b5b602083019150836001820283011115611500576114ff611e3f565b5b9250929050565b600060c0828403121561151d5761151c611e35565b5b81905092915050565b60008135905061153581611ee4565b92915050565b60008151905061154a81611ee4565b92915050565b60006020828403121561156657611565611e4e565b5b600061157484828501611487565b91505092915050565b600080600080600080600080600060e08a8c03121561159f5761159e611e4e565b5b60006115ad8c828d01611487565b99505060206115be8c828d01611526565b98505060408a013567ffffffffffffffff8111156115df576115de611e49565b5b6115eb8c828d016114b1565b975097505060606115fe8c828d01611526565b955050608061160f8c828d01611526565b94505060a08a013567ffffffffffffffff8111156116305761162f611e49565b5b61163c8c828d016114b1565b935093505060c061164f8c828d0161149c565b9150509295985092959850929598565b60008060008060008060008060c0898b03121561167f5761167e611e4e565b5b600089013567ffffffffffffffff81111561169d5761169c611e49565b5b6116a98b828c016114b1565b985098505060206116bc8b828c01611526565b96505060406116cd8b828c01611487565b95505060606116de8b828c01611526565b945050608089013567ffffffffffffffff8111156116ff576116fe611e49565b5b61170b8b828c016114b1565b935093505060a061171e8b828c0161149c565b9150509295985092959890939650565b60006020828403121561174457611743611e4e565b5b600082013567ffffffffffffffff81111561176257611761611e49565b5b61176e84828501611507565b91505092915050565b60006020828403121561178d5761178c611e4e565b5b600061179b84828501611526565b91505092915050565b6000602082840312156117ba576117b9611e4e565b5b60006117c88482850161153b565b91505092915050565b6117da81611d63565b82525050565b6117e981611d63565b82525050565b6117f881611d75565b82525050565b61180781611d81565b82525050565b60006118198385611ceb565b9350611826838584611db5565b61182f83611e53565b840190509392505050565b600061184582611ccf565b61184f8185611cda565b935061185f818560208601611dc4565b61186881611e53565b840191505092915050565b6000611880601483611cfc565b915061188b82611e64565b602082019050919050565b60006118a3601083611cfc565b91506118ae82611e8d565b602082019050919050565b600060a08301600083015184820360008601526118d6828261183a565b91505060208301516118eb60208601826119c6565b5060408301516118fe60408601826117d1565b50606083015161191160608601826119c6565b5060808301518482036080860152611929828261183a565b9150508091505092915050565b600060c08301600083015161194e60008601826117d1565b50602083015161196160208601826119c6565b5060408301518482036040860152611979828261183a565b915050606083015161198e60608601826119c6565b5060808301516119a160808601826119c6565b5060a083015184820360a08601526119b9828261183a565b9150508091505092915050565b6119cf81611dab565b82525050565b6119de81611dab565b82525050565b60006020820190506119f960008301846117e0565b92915050565b6000604082019050611a1460008301856117e0565b611a2160208301846117e0565b9392505050565b600060c082019050611a3d600083018c6117e0565b8181036020830152611a50818a8c61180d565b9050611a5f60408301896119d5565b611a6c60608301886119d5565b8181036080830152611a7f81868861180d565b905081810360a0830152611a9481848661180d565b90509a9950505050505050505050565b6000604082019050611ab960008301856117e0565b611ac660208301846119d5565b9392505050565b6000606082019050611ae260008301866117e0565b611aef60208301856119d5565b611afc60408301846117fe565b949350505050565b600060a082019050611b19600083018a6117e0565b611b2660208301896119d5565b8181036040830152611b3981878961180d565b9050611b4860608301866119d5565b8181036080830152611b5b81848661180d565b905098975050505050505050565b6000602082019050611b7e60008301846117ef565b92915050565b60006060820190508181036000830152611b9f81878961180d565b9050611bae60208301866119d5565b8181036040830152611bc181848661180d565b90509695505050505050565b60006020820190508181036000830152611be681611873565b9050919050565b60006020820190508181036000830152611c0681611896565b9050919050565b60006020820190508181036000830152611c2781846118b9565b905092915050565b60006020820190508181036000830152611c498184611936565b905092915050565b6000602082019050611c6660008301846119d5565b92915050565b60008083356001602003843603038112611c8957611c88611e3a565b5b80840192508235915067ffffffffffffffff821115611cab57611caa611e30565b5b602083019250600182023603831315611cc757611cc6611e44565b5b509250929050565b600081519050919050565b600082825260208201905092915050565b600082825260208201905092915050565b600082825260208201905092915050565b6000611d1882611dab565b9150611d2383611dab565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff03821115611d5857611d57611df7565b5b828201905092915050565b6000611d6e82611d8b565b9050919050565b60008115159050919050565b6000819050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b82818337600083830152505050565b60005b83811015611de2578082015181840152602081019050611dc7565b83811115611df1576000848401525b50505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f5061757361626c653a206e6f7420706175736564000000000000000000000000600082015250565b7f5061757361626c653a2070617573656400000000000000000000000000000000600082015250565b611ebf81611d63565b8114611eca57600080fd5b50565b611ed681611d81565b8114611ee157600080fd5b50565b611eed81611dab565b8114611ef857600080fd5b5056fea2646970667358221220ea4ce36ac5bd8e5a2dccb7294f409461e73e51ee4a817b222cf2cf63a329848e64736f6c63430008070033"; type ZetaConnectorNonEthConstructorParams = | [signer?: Signer] diff --git a/packages/protocol-contracts/contracts/ZetaConnector.eth.sol b/packages/protocol-contracts/contracts/ZetaConnector.eth.sol index bc3ffcf1..03cccb73 100644 --- a/packages/protocol-contracts/contracts/ZetaConnector.eth.sol +++ b/packages/protocol-contracts/contracts/ZetaConnector.eth.sol @@ -42,7 +42,7 @@ contract ZetaConnectorEth is ZetaConnectorBase { uint256 zetaValue, bytes calldata message, bytes32 internalSendHash - ) external override whenNotPaused onlyTssAddress { + ) external override onlyTssAddress { bool success = IERC20(zetaToken).transfer(destinationAddress, zetaValue); if (!success) revert ZetaTransferError(); diff --git a/packages/protocol-contracts/contracts/ZetaConnector.non-eth.sol b/packages/protocol-contracts/contracts/ZetaConnector.non-eth.sol index 4b891023..af95b8b5 100644 --- a/packages/protocol-contracts/contracts/ZetaConnector.non-eth.sol +++ b/packages/protocol-contracts/contracts/ZetaConnector.non-eth.sol @@ -8,7 +8,7 @@ import "./interfaces/ZetaInterfaces.sol"; import "./interfaces/ZetaNonEthInterface.sol"; contract ZetaConnectorNonEth is ZetaConnectorBase { - uint256 public maxSupply = 2**256 - 1; + uint256 public maxSupply = 2 ** 256 - 1; constructor( address zetaTokenAddress_, @@ -47,7 +47,7 @@ contract ZetaConnectorNonEth is ZetaConnectorBase { uint256 zetaValue, bytes calldata message, bytes32 internalSendHash - ) external override whenNotPaused onlyTssAddress { + ) external override onlyTssAddress { if (zetaValue + ZetaNonEthInterface(zetaToken).totalSupply() > maxSupply) revert ExceedsMaxSupply(maxSupply); ZetaNonEthInterface(zetaToken).mint(destinationAddress, zetaValue, internalSendHash); diff --git a/packages/protocol-contracts/test/ZetaConnector.spec.ts b/packages/protocol-contracts/test/ZetaConnector.spec.ts index 74aacbbc..19ec83cd 100644 --- a/packages/protocol-contracts/test/ZetaConnector.spec.ts +++ b/packages/protocol-contracts/test/ZetaConnector.spec.ts @@ -299,21 +299,23 @@ describe("ZetaConnector tests", () => { }); describe("onReceive", () => { - it("Should revert if the contract is paused", async () => { + it("Should not revert if the contract is paused", async () => { await (await zetaConnectorEthContract.connect(pauserSigner).pause()).wait(); const paused1 = await zetaConnectorEthContract.paused(); expect(paused1).to.equal(true); await expect( - zetaConnectorEthContract.onReceive( - tssUpdater.address, - 1, - randomSigner.address, - 1000, - new ethers.utils.AbiCoder().encode(["string"], ["hello"]), - ethers.constants.HashZero - ) - ).to.revertedWith("Pausable: paused"); + zetaConnectorEthContract + .connect(tssSigner) + .onReceive( + tssUpdater.address, + 1, + zetaReceiverMockContract.address, + 0, + new ethers.utils.AbiCoder().encode(["string"], ["hello"]), + ethers.constants.HashZero + ) + ).to.be.not.reverted; }); it("Should revert if not called by TSS address", async () => { @@ -598,21 +600,23 @@ describe("ZetaConnector tests", () => { }); describe("onReceive", () => { - it("Should revert if the contract is paused", async () => { + it("Should not revert if the contract is paused", async () => { await (await zetaConnectorNonEthContract.connect(pauserSigner).pause()).wait(); const paused1 = await zetaConnectorNonEthContract.paused(); expect(paused1).to.equal(true); await expect( - zetaConnectorNonEthContract.onReceive( - tssUpdater.address, - 1, - randomSigner.address, - 1000, - new ethers.utils.AbiCoder().encode(["string"], ["hello"]), - ethers.constants.HashZero - ) - ).to.revertedWith("Pausable: paused"); + zetaConnectorNonEthContract + .connect(tssSigner) + .onReceive( + tssUpdater.address, + 1, + zetaReceiverMockContract.address, + 0, + new ethers.utils.AbiCoder().encode(["string"], ["hello"]), + ethers.constants.HashZero + ) + ).to.be.not.reverted; }); it("Should revert if not called by TSS address", async () => { From 95ef8e6c65ec10ec4d01ad60c5be85275dc68119 Mon Sep 17 00:00:00 2001 From: Andres Martin Aiello <50411235+andresaiello@users.noreply.github.com> Date: Mon, 27 Feb 2023 12:11:37 -0300 Subject: [PATCH 059/115] Split smart contracts repo adding zeta app (#71) * Split smart contracts repo adding zeta app * remove unsed code * remove unused code * split zevm pkg --- packages/zeta-app-contracts/.env.example | 18 +++++ .../.eslintrc.js | 0 packages/zeta-app-contracts/README.md | 16 ++++ .../multi-chain-value/MultiChainValue.sol | 0 .../test/MultiChainValueMock.sol | 0 .../test/ZetaConnectorMock.sol | 0 .../shared/ImmutableCreate2Factory.sol | 8 ++ .../contracts/shared/ZetaEthMock.sol | 12 +++ .../docs/multi-chain-value.md | 0 .../hardhat.config.ts | 0 .../MultiChainValue.helpers.ts | 0 .../shared/ImmutableCreate2Factory.helpers.ts | 75 +++++++++++++++++++ .../lib/shared/address.helpers.ts | 23 ++++++ .../lib/shared/deploy.helpers.ts | 39 ++++++++++ packages/zeta-app-contracts/package.json | 38 ++++++++++ .../scripts/multi-chain-value/deploy.ts | 0 .../multi-chain-value/deterministic-deploy.ts | 2 +- .../scripts/multi-chain-value/send-value.ts | 0 .../multi-chain-value/verify-contract.ts | 0 .../test/MultiChainValue.spec.ts | 0 .../tsconfig.json | 0 .../.env.example | 0 packages/zevm-example-contracts/.eslintrc.js | 23 ++++++ .../README.md | 2 +- .../multi-output/ZetaMultiOutput.sol | 4 +- .../contracts/shared/BytesHelperLib.sol | 0 .../contracts/shared/SwapHelperLib.sol | 2 +- .../contracts/shared/TestContracts.sol | 0 .../contracts/shared/TestSystemContract.sol | 4 +- .../contracts/shared/TestUniswapContracts.sol | 0 .../contracts/shared/TestZRC20.sol | 0 .../contracts/zeta-swap/ZetaCurveSwapDemo.sol | 4 +- .../contracts/zeta-swap/ZetaSwap.sol | 4 +- .../zeta-swap/ZetaSwapBtcInbound.sol | 2 +- .../zeta-swap/ZetaSwapBtcInboundV2.sol | 5 +- .../contracts/zeta-swap/ZetaSwapV2.sol | 5 +- .../zevm-example-contracts/hardhat.config.ts | 46 ++++++++++++ packages/zevm-example-contracts/package.json | 41 ++++++++++ .../scripts/systemConstants.ts | 0 .../zeta-swap/add-liquidity-zeta-uniswap.ts | 0 .../scripts/zeta-swap/deploy.ts | 0 .../scripts/zeta-swap/get-system-data.ts | 0 .../scripts/zeta-swap/helpers.ts | 0 .../scripts/zeta-swap/send.ts | 0 .../scripts/zeta-swap/stress-swap.ts | 0 .../scripts/zeta-swap/swap-on-zevm.ts | 0 .../scripts/zeta-swap/swap.ts | 0 .../test/MultipleOutput.spec.ts | 0 .../test/Swap.spec.ts | 0 .../test/test.helpers.ts | 0 packages/zevm-example-contracts/tsconfig.json | 14 ++++ packages/zevm-protocol-contracts/.env.example | 2 + packages/zevm-protocol-contracts/.eslintrc.js | 23 ++++++ packages/zevm-protocol-contracts/README.md | 16 ++++ .../contracts/interfaces/IZRC20.sol | 0 .../contracts/interfaces/zContract.sol | 0 .../contracts/system/SystemContract.sol | 0 .../zevm-protocol-contracts/hardhat.config.ts | 46 ++++++++++++ .../package.json | 2 +- .../zevm-protocol-contracts/tsconfig.json | 14 ++++ yarn.lock | 39 +++++++++- 61 files changed, 509 insertions(+), 20 deletions(-) create mode 100644 packages/zeta-app-contracts/.env.example rename packages/{zevm-contracts => zeta-app-contracts}/.eslintrc.js (100%) create mode 100644 packages/zeta-app-contracts/README.md rename packages/{example-contracts => zeta-app-contracts}/contracts/multi-chain-value/MultiChainValue.sol (100%) rename packages/{example-contracts => zeta-app-contracts}/contracts/multi-chain-value/test/MultiChainValueMock.sol (100%) rename packages/{example-contracts => zeta-app-contracts}/contracts/multi-chain-value/test/ZetaConnectorMock.sol (100%) create mode 100644 packages/zeta-app-contracts/contracts/shared/ImmutableCreate2Factory.sol create mode 100644 packages/zeta-app-contracts/contracts/shared/ZetaEthMock.sol rename packages/{example-contracts => zeta-app-contracts}/docs/multi-chain-value.md (100%) rename packages/{zevm-contracts => zeta-app-contracts}/hardhat.config.ts (100%) rename packages/{example-contracts => zeta-app-contracts}/lib/multi-chain-value/MultiChainValue.helpers.ts (100%) create mode 100644 packages/zeta-app-contracts/lib/shared/ImmutableCreate2Factory.helpers.ts create mode 100644 packages/zeta-app-contracts/lib/shared/address.helpers.ts create mode 100644 packages/zeta-app-contracts/lib/shared/deploy.helpers.ts create mode 100644 packages/zeta-app-contracts/package.json rename packages/{example-contracts => zeta-app-contracts}/scripts/multi-chain-value/deploy.ts (100%) rename packages/{example-contracts => zeta-app-contracts}/scripts/multi-chain-value/deterministic-deploy.ts (96%) rename packages/{example-contracts => zeta-app-contracts}/scripts/multi-chain-value/send-value.ts (100%) rename packages/{example-contracts => zeta-app-contracts}/scripts/multi-chain-value/verify-contract.ts (100%) rename packages/{example-contracts => zeta-app-contracts}/test/MultiChainValue.spec.ts (100%) rename packages/{zevm-contracts => zeta-app-contracts}/tsconfig.json (100%) rename packages/{zevm-contracts => zevm-example-contracts}/.env.example (100%) create mode 100644 packages/zevm-example-contracts/.eslintrc.js rename packages/{zevm-contracts => zevm-example-contracts}/README.md (91%) rename packages/{zevm-contracts => zevm-example-contracts}/contracts/multi-output/ZetaMultiOutput.sol (95%) rename packages/{zevm-contracts => zevm-example-contracts}/contracts/shared/BytesHelperLib.sol (100%) rename packages/{zevm-contracts => zevm-example-contracts}/contracts/shared/SwapHelperLib.sol (97%) rename packages/{zevm-contracts => zevm-example-contracts}/contracts/shared/TestContracts.sol (100%) rename packages/{zevm-contracts => zevm-example-contracts}/contracts/shared/TestSystemContract.sol (91%) rename packages/{zevm-contracts => zevm-example-contracts}/contracts/shared/TestUniswapContracts.sol (100%) rename packages/{zevm-contracts => zevm-example-contracts}/contracts/shared/TestZRC20.sol (100%) rename packages/{zevm-contracts => zevm-example-contracts}/contracts/zeta-swap/ZetaCurveSwapDemo.sol (93%) rename packages/{zevm-contracts => zevm-example-contracts}/contracts/zeta-swap/ZetaSwap.sol (96%) rename packages/{zevm-contracts => zevm-example-contracts}/contracts/zeta-swap/ZetaSwapBtcInbound.sol (94%) rename packages/{zevm-contracts => zevm-example-contracts}/contracts/zeta-swap/ZetaSwapBtcInboundV2.sol (87%) rename packages/{zevm-contracts => zevm-example-contracts}/contracts/zeta-swap/ZetaSwapV2.sol (85%) create mode 100644 packages/zevm-example-contracts/hardhat.config.ts create mode 100644 packages/zevm-example-contracts/package.json rename packages/{zevm-contracts => zevm-example-contracts}/scripts/systemConstants.ts (100%) rename packages/{zevm-contracts => zevm-example-contracts}/scripts/zeta-swap/add-liquidity-zeta-uniswap.ts (100%) rename packages/{zevm-contracts => zevm-example-contracts}/scripts/zeta-swap/deploy.ts (100%) rename packages/{zevm-contracts => zevm-example-contracts}/scripts/zeta-swap/get-system-data.ts (100%) rename packages/{zevm-contracts => zevm-example-contracts}/scripts/zeta-swap/helpers.ts (100%) rename packages/{zevm-contracts => zevm-example-contracts}/scripts/zeta-swap/send.ts (100%) rename packages/{zevm-contracts => zevm-example-contracts}/scripts/zeta-swap/stress-swap.ts (100%) rename packages/{zevm-contracts => zevm-example-contracts}/scripts/zeta-swap/swap-on-zevm.ts (100%) rename packages/{zevm-contracts => zevm-example-contracts}/scripts/zeta-swap/swap.ts (100%) rename packages/{zevm-contracts => zevm-example-contracts}/test/MultipleOutput.spec.ts (100%) rename packages/{zevm-contracts => zevm-example-contracts}/test/Swap.spec.ts (100%) rename packages/{zevm-contracts => zevm-example-contracts}/test/test.helpers.ts (100%) create mode 100644 packages/zevm-example-contracts/tsconfig.json create mode 100644 packages/zevm-protocol-contracts/.env.example create mode 100644 packages/zevm-protocol-contracts/.eslintrc.js create mode 100644 packages/zevm-protocol-contracts/README.md rename packages/{zevm-contracts => zevm-protocol-contracts}/contracts/interfaces/IZRC20.sol (100%) rename packages/{zevm-contracts => zevm-protocol-contracts}/contracts/interfaces/zContract.sol (100%) rename packages/{zevm-contracts => zevm-protocol-contracts}/contracts/system/SystemContract.sol (100%) create mode 100644 packages/zevm-protocol-contracts/hardhat.config.ts rename packages/{zevm-contracts => zevm-protocol-contracts}/package.json (97%) create mode 100644 packages/zevm-protocol-contracts/tsconfig.json diff --git a/packages/zeta-app-contracts/.env.example b/packages/zeta-app-contracts/.env.example new file mode 100644 index 00000000..09bb3086 --- /dev/null +++ b/packages/zeta-app-contracts/.env.example @@ -0,0 +1,18 @@ +ALCHEMY_API_KEY_MAINNET= +ALCHEMY_API_KEY_GOERLI= + +PUBLIC_KEY_1= + +PRIVATE_KEY= + +# ETHER +ETHERSCAN_API_KEY=<...> + +# POLYGON +POYLGONSCAN_API_KEY=<...> + +# BSC +BSCSCAN_API_KEY=<...> + +# Deployer address. This is needed to calculate salt in deterministic deployments +DEPLOYER_ADDRESS= diff --git a/packages/zevm-contracts/.eslintrc.js b/packages/zeta-app-contracts/.eslintrc.js similarity index 100% rename from packages/zevm-contracts/.eslintrc.js rename to packages/zeta-app-contracts/.eslintrc.js diff --git a/packages/zeta-app-contracts/README.md b/packages/zeta-app-contracts/README.md new file mode 100644 index 00000000..89cb5448 --- /dev/null +++ b/packages/zeta-app-contracts/README.md @@ -0,0 +1,16 @@ +# ZetaChain App contracts + +This package include the contracts used by different ZetaChain Apps like ZetaHub + +## Environment variables + +Follow the template in `.env.example`. + +* The private key should **not** include `0x`. +* To verify your contracts, you'll need api keys both in BSCScan and Etherscan. + +## Running Tests + +```bash + yarn test +``` diff --git a/packages/example-contracts/contracts/multi-chain-value/MultiChainValue.sol b/packages/zeta-app-contracts/contracts/multi-chain-value/MultiChainValue.sol similarity index 100% rename from packages/example-contracts/contracts/multi-chain-value/MultiChainValue.sol rename to packages/zeta-app-contracts/contracts/multi-chain-value/MultiChainValue.sol diff --git a/packages/example-contracts/contracts/multi-chain-value/test/MultiChainValueMock.sol b/packages/zeta-app-contracts/contracts/multi-chain-value/test/MultiChainValueMock.sol similarity index 100% rename from packages/example-contracts/contracts/multi-chain-value/test/MultiChainValueMock.sol rename to packages/zeta-app-contracts/contracts/multi-chain-value/test/MultiChainValueMock.sol diff --git a/packages/example-contracts/contracts/multi-chain-value/test/ZetaConnectorMock.sol b/packages/zeta-app-contracts/contracts/multi-chain-value/test/ZetaConnectorMock.sol similarity index 100% rename from packages/example-contracts/contracts/multi-chain-value/test/ZetaConnectorMock.sol rename to packages/zeta-app-contracts/contracts/multi-chain-value/test/ZetaConnectorMock.sol diff --git a/packages/zeta-app-contracts/contracts/shared/ImmutableCreate2Factory.sol b/packages/zeta-app-contracts/contracts/shared/ImmutableCreate2Factory.sol new file mode 100644 index 00000000..9e47166d --- /dev/null +++ b/packages/zeta-app-contracts/contracts/shared/ImmutableCreate2Factory.sol @@ -0,0 +1,8 @@ +// SPDX-License-Identifier: MIT +pragma solidity 0.5.10; + +/** + * @dev Contracts that need to be compiled for testing purposes + */ + +import "@zetachain/protocol-contracts/contracts/ImmutableCreate2Factory.sol"; diff --git a/packages/zeta-app-contracts/contracts/shared/ZetaEthMock.sol b/packages/zeta-app-contracts/contracts/shared/ZetaEthMock.sol new file mode 100644 index 00000000..17d9e2eb --- /dev/null +++ b/packages/zeta-app-contracts/contracts/shared/ZetaEthMock.sol @@ -0,0 +1,12 @@ +// SPDX-License-Identifier: MIT +pragma solidity 0.8.7; + +import "@openzeppelin/contracts/token/ERC20/ERC20.sol"; +import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; +import "@openzeppelin/contracts/utils/Context.sol"; + +contract ZetaEthMock is ERC20("Zeta", "ZETA") { + constructor(uint256 initialSupply) { + _mint(msg.sender, initialSupply * (10**uint256(decimals()))); + } +} diff --git a/packages/example-contracts/docs/multi-chain-value.md b/packages/zeta-app-contracts/docs/multi-chain-value.md similarity index 100% rename from packages/example-contracts/docs/multi-chain-value.md rename to packages/zeta-app-contracts/docs/multi-chain-value.md diff --git a/packages/zevm-contracts/hardhat.config.ts b/packages/zeta-app-contracts/hardhat.config.ts similarity index 100% rename from packages/zevm-contracts/hardhat.config.ts rename to packages/zeta-app-contracts/hardhat.config.ts diff --git a/packages/example-contracts/lib/multi-chain-value/MultiChainValue.helpers.ts b/packages/zeta-app-contracts/lib/multi-chain-value/MultiChainValue.helpers.ts similarity index 100% rename from packages/example-contracts/lib/multi-chain-value/MultiChainValue.helpers.ts rename to packages/zeta-app-contracts/lib/multi-chain-value/MultiChainValue.helpers.ts diff --git a/packages/zeta-app-contracts/lib/shared/ImmutableCreate2Factory.helpers.ts b/packages/zeta-app-contracts/lib/shared/ImmutableCreate2Factory.helpers.ts new file mode 100644 index 00000000..e180e84f --- /dev/null +++ b/packages/zeta-app-contracts/lib/shared/ImmutableCreate2Factory.helpers.ts @@ -0,0 +1,75 @@ +import { Provider, TransactionReceipt } from "@ethersproject/providers"; +import { ImmutableCreate2Factory__factory } from "@zetachain/interfaces/typechain-types"; +import { ethers, Signer } from "ethers"; + +export const buildBytecode = (constructorTypes: any[], constructorArgs: any[], contractBytecode: string) => + `${contractBytecode}${encodeParams(constructorTypes, constructorArgs).slice(2)}`; + +export const buildCreate2Address = (saltHex: string, byteCode: string, factoryAddress: string) => { + const payload = ethers.utils.keccak256( + `0x${["ff", factoryAddress, saltHex, ethers.utils.keccak256(byteCode)].map((x) => x.replace(/0x/, "")).join("")}` + ); + + return `0x${payload.slice(-40)}`.toLowerCase(); +}; + +export const numberToUint256 = (value: number) => { + const hex = value.toString(16); + return `0x${"0".repeat(64 - hex.length)}${hex}`; +}; + +export const saltToHex = (salt: string, signerAddress: string) => { + let salthex = ethers.utils.formatBytes32String(salt); + return `${signerAddress}${salthex.slice(2)}`.substring(0, salthex.length); +}; + +export const encodeParam = (dataType: any, data: any) => { + const abiCoder = ethers.utils.defaultAbiCoder; + return abiCoder.encode([dataType], [data]); +}; + +export const encodeParams = (dataTypes: any[], data: any[]) => { + const abiCoder = ethers.utils.defaultAbiCoder; + return abiCoder.encode(dataTypes, data); +}; + +export async function deployContractToAddress({ + factoryAddress, + salt, + contractBytecode, + constructorTypes = [] as string[], + constructorArgs = [] as any[], + signer, +}: { + constructorArgs?: any[]; + constructorTypes?: string[]; + contractBytecode: string; + factoryAddress: string; + salt: string; + signer: Signer; +}) { + const factory = ImmutableCreate2Factory__factory.connect(factoryAddress, signer); + + const bytecode = buildBytecode(constructorTypes, constructorArgs, contractBytecode); + + const computedAddr = await factory.findCreate2Address(salt, bytecode); + + const tx = await factory.safeCreate2(salt, bytecode, { + gasLimit: 6000000, + }); + const result = await tx.wait(); + + return { + address: computedAddr as string, + receipt: result as TransactionReceipt, + txHash: result.transactionHash as string, + }; +} + +/** + * Determines if there's a contract deployed on the provided address. + */ +export async function isDeployed(address: string, provider: Provider) { + const code = await provider.getCode(address); + return code.slice(2).length > 0; +} diff --git a/packages/zeta-app-contracts/lib/shared/address.helpers.ts b/packages/zeta-app-contracts/lib/shared/address.helpers.ts new file mode 100644 index 00000000..d6c498f2 --- /dev/null +++ b/packages/zeta-app-contracts/lib/shared/address.helpers.ts @@ -0,0 +1,23 @@ +import { getAddress as getAddressLib, NetworkName, ZetaAddress, ZetaNetworkName } from "@zetachain/addresses"; +import { network } from "hardhat"; + +const MissingZetaNetworkError = new Error( + "ZETA_NETWORK is not defined, please set the environment variable (e.g.: ZETA_NETWORK=athens )" +); + +export const getAddress = ( + address: ZetaAddress, + { + customNetworkName, + customZetaNetwork + }: { customNetworkName?: NetworkName; customZetaNetwork?: ZetaNetworkName } = {} +): string => { + const { name: _networkName } = network; + const networkName = customNetworkName || _networkName; + + const { ZETA_NETWORK: _ZETA_NETWORK } = process.env; + const zetaNetwork = customZetaNetwork || _ZETA_NETWORK; + + if (!zetaNetwork) throw MissingZetaNetworkError; + return getAddressLib({ address, networkName, zetaNetwork }); +}; diff --git a/packages/zeta-app-contracts/lib/shared/deploy.helpers.ts b/packages/zeta-app-contracts/lib/shared/deploy.helpers.ts new file mode 100644 index 00000000..353362d9 --- /dev/null +++ b/packages/zeta-app-contracts/lib/shared/deploy.helpers.ts @@ -0,0 +1,39 @@ +import { BaseContract, ContractFactory } from "ethers"; +import { ethers } from "hardhat"; + +import { ERC20, ERC20__factory as ERC20Factory } from "../../typechain-types"; + +export type GetContractParams = + | { + deployParams: Parameters; + existingContractAddress?: null; + } + | { + deployParams?: null; + existingContractAddress: string; + }; + +export const getContract = async ({ + contractName, + deployParams, + existingContractAddress +}: GetContractParams & { contractName: string }): Promise => { + const ContractFactory = (await ethers.getContractFactory(contractName)) as Factory; + + const isGetExistingContract = Boolean(existingContractAddress); + if (isGetExistingContract) { + console.log("Getting existing contract from address:", existingContractAddress); + return ContractFactory.attach(existingContractAddress!) as Contract; + } + + const contract = (await ContractFactory.deploy(...deployParams!)) as Contract; + await contract.deployed(); + + return contract; +}; + +export const getErc20 = async (existingContractAddress?: string) => + getContract({ + contractName: "ERC20", + ...(existingContractAddress ? { existingContractAddress } : { deployParams: ["ERC20Mock", "ERC20Mock"] }) + }); diff --git a/packages/zeta-app-contracts/package.json b/packages/zeta-app-contracts/package.json new file mode 100644 index 00000000..abfd846e --- /dev/null +++ b/packages/zeta-app-contracts/package.json @@ -0,0 +1,38 @@ +{ + "name": "@zetachain/zeta-app-contracts", + "version": "0.0.1", + "license": "MIT", + "private": true, + "author": "zetachain", + "publishConfig": { + "access": "public", + "registry": "https://registry.npmjs.org/" + }, + "scripts": { + "clean": "npx hardhat clean", + "compile": "npx hardhat compile", + "lint:fix": "npm run lint:js:fix && npm run lint:sol:fix", + "lint:js:fix": "eslint --ext .js,.ts . --fix", + "lint:js": "eslint --ext .js,.ts .", + "lint:sol:fix": "prettier --write \"contracts/**/*.sol\"", + "lint:sol": "solhint 'contracts/**/*.sol' && prettier -c 'contracts/**/*.sol'", + "lint": "npm run lint:js && npm run lint:sol", + "test:watch": "echo You need to install `entr` to run this command && find contracts/**/** lib/**/** test/**/** -iname '*.sol' -o -iname '*.ts' | entr -cnr npx hardhat test", + "test": "npx hardhat test", + "tsc:watch": "npx tsc --watch" + }, + "devDependencies": { + "@defi-wonderland/smock": "^2.3.4", + "hardhat-gas-reporter": "^1.0.8", + "solidity-coverage": "^0.7.20", + "tsconfig-paths": "^3.14.1" + }, + "dependencies": { + "@openzeppelin/contracts": "4.7.3", + "@zetachain/addresses": "workspace:^", + "@zetachain/addresses-tools": "workspace:^", + "@zetachain/interfaces": "workspace:^", + "@zetachain/protocol-contracts": "workspace:^", + "ethers": "5.6.8" + } +} diff --git a/packages/example-contracts/scripts/multi-chain-value/deploy.ts b/packages/zeta-app-contracts/scripts/multi-chain-value/deploy.ts similarity index 100% rename from packages/example-contracts/scripts/multi-chain-value/deploy.ts rename to packages/zeta-app-contracts/scripts/multi-chain-value/deploy.ts diff --git a/packages/example-contracts/scripts/multi-chain-value/deterministic-deploy.ts b/packages/zeta-app-contracts/scripts/multi-chain-value/deterministic-deploy.ts similarity index 96% rename from packages/example-contracts/scripts/multi-chain-value/deterministic-deploy.ts rename to packages/zeta-app-contracts/scripts/multi-chain-value/deterministic-deploy.ts index 3e6e4e9a..42fbbc46 100644 --- a/packages/example-contracts/scripts/multi-chain-value/deterministic-deploy.ts +++ b/packages/zeta-app-contracts/scripts/multi-chain-value/deterministic-deploy.ts @@ -5,7 +5,7 @@ import { ethers, network } from "hardhat"; import { getAddress } from "../../lib/shared/address.helpers"; import { deployContractToAddress, saltToHex } from "../../lib/shared/ImmutableCreate2Factory.helpers"; -import { MultiChainValue__factory } from "../typechain-types"; +import { MultiChainValue__factory } from "../../typechain-types"; const DEPLOYER_ADDRESS = process.env.DEPLOYER_ADDRESS ?? ""; const SALT_NUMBER = "0"; diff --git a/packages/example-contracts/scripts/multi-chain-value/send-value.ts b/packages/zeta-app-contracts/scripts/multi-chain-value/send-value.ts similarity index 100% rename from packages/example-contracts/scripts/multi-chain-value/send-value.ts rename to packages/zeta-app-contracts/scripts/multi-chain-value/send-value.ts diff --git a/packages/example-contracts/scripts/multi-chain-value/verify-contract.ts b/packages/zeta-app-contracts/scripts/multi-chain-value/verify-contract.ts similarity index 100% rename from packages/example-contracts/scripts/multi-chain-value/verify-contract.ts rename to packages/zeta-app-contracts/scripts/multi-chain-value/verify-contract.ts diff --git a/packages/example-contracts/test/MultiChainValue.spec.ts b/packages/zeta-app-contracts/test/MultiChainValue.spec.ts similarity index 100% rename from packages/example-contracts/test/MultiChainValue.spec.ts rename to packages/zeta-app-contracts/test/MultiChainValue.spec.ts diff --git a/packages/zevm-contracts/tsconfig.json b/packages/zeta-app-contracts/tsconfig.json similarity index 100% rename from packages/zevm-contracts/tsconfig.json rename to packages/zeta-app-contracts/tsconfig.json diff --git a/packages/zevm-contracts/.env.example b/packages/zevm-example-contracts/.env.example similarity index 100% rename from packages/zevm-contracts/.env.example rename to packages/zevm-example-contracts/.env.example diff --git a/packages/zevm-example-contracts/.eslintrc.js b/packages/zevm-example-contracts/.eslintrc.js new file mode 100644 index 00000000..77b8f69a --- /dev/null +++ b/packages/zevm-example-contracts/.eslintrc.js @@ -0,0 +1,23 @@ +const path = require("path"); + +const OFF = 0; + +module.exports = { + env: { + browser: false, + es2021: true, + mocha: true, + node: true, + }, + extends: ["../../.eslintrc.js"], + rules: { + "no-console": OFF, + }, + settings: { + "import/resolver": { + typescript: { + project: path.join(__dirname, "tsconfig.json"), + }, + }, + }, +}; diff --git a/packages/zevm-contracts/README.md b/packages/zevm-example-contracts/README.md similarity index 91% rename from packages/zevm-contracts/README.md rename to packages/zevm-example-contracts/README.md index d8ab9984..84728dbb 100644 --- a/packages/zevm-contracts/README.md +++ b/packages/zevm-example-contracts/README.md @@ -1,4 +1,4 @@ -# ZetaEVM contracts +# ZetaEVM Example contracts > ⚠️ The contracts **are not audited yet**, use at your own risk. diff --git a/packages/zevm-contracts/contracts/multi-output/ZetaMultiOutput.sol b/packages/zevm-example-contracts/contracts/multi-output/ZetaMultiOutput.sol similarity index 95% rename from packages/zevm-contracts/contracts/multi-output/ZetaMultiOutput.sol rename to packages/zevm-example-contracts/contracts/multi-output/ZetaMultiOutput.sol index 918a5c76..ded20bc7 100644 --- a/packages/zevm-contracts/contracts/multi-output/ZetaMultiOutput.sol +++ b/packages/zevm-example-contracts/contracts/multi-output/ZetaMultiOutput.sol @@ -2,9 +2,7 @@ pragma solidity 0.8.7; import "@openzeppelin/contracts/access/Ownable.sol"; -import "../system/SystemContract.sol"; -import "../interfaces/IZRC20.sol"; -import "../interfaces/zContract.sol"; +import "@zetachain/zevm-protocol-contracts/contracts/system/SystemContract.sol"; import "../shared/BytesHelperLib.sol"; import "../shared/SwapHelperLib.sol"; diff --git a/packages/zevm-contracts/contracts/shared/BytesHelperLib.sol b/packages/zevm-example-contracts/contracts/shared/BytesHelperLib.sol similarity index 100% rename from packages/zevm-contracts/contracts/shared/BytesHelperLib.sol rename to packages/zevm-example-contracts/contracts/shared/BytesHelperLib.sol diff --git a/packages/zevm-contracts/contracts/shared/SwapHelperLib.sol b/packages/zevm-example-contracts/contracts/shared/SwapHelperLib.sol similarity index 97% rename from packages/zevm-contracts/contracts/shared/SwapHelperLib.sol rename to packages/zevm-example-contracts/contracts/shared/SwapHelperLib.sol index 55ed16c8..0118b32c 100644 --- a/packages/zevm-contracts/contracts/shared/SwapHelperLib.sol +++ b/packages/zevm-example-contracts/contracts/shared/SwapHelperLib.sol @@ -3,7 +3,7 @@ pragma solidity =0.8.7; import "@uniswap/v2-periphery/contracts/interfaces/IUniswapV2Router02.sol"; import "@uniswap/v2-periphery/contracts/interfaces/IUniswapV2Router01.sol"; -import "../interfaces/IZRC20.sol"; +import "@zetachain/zevm-protocol-contracts/contracts/interfaces/IZRC20.sol"; library SwapHelperLib { uint16 internal constant MAX_DEADLINE = 200; diff --git a/packages/zevm-contracts/contracts/shared/TestContracts.sol b/packages/zevm-example-contracts/contracts/shared/TestContracts.sol similarity index 100% rename from packages/zevm-contracts/contracts/shared/TestContracts.sol rename to packages/zevm-example-contracts/contracts/shared/TestContracts.sol diff --git a/packages/zevm-contracts/contracts/shared/TestSystemContract.sol b/packages/zevm-example-contracts/contracts/shared/TestSystemContract.sol similarity index 91% rename from packages/zevm-contracts/contracts/shared/TestSystemContract.sol rename to packages/zevm-example-contracts/contracts/shared/TestSystemContract.sol index ccb5a1e7..cb469f62 100644 --- a/packages/zevm-contracts/contracts/shared/TestSystemContract.sol +++ b/packages/zevm-example-contracts/contracts/shared/TestSystemContract.sol @@ -1,8 +1,8 @@ // SPDX-License-Identifier: MIT pragma solidity 0.8.7; -import "../interfaces/zContract.sol"; -import "../interfaces/IZRC20.sol"; +import "@zetachain/zevm-protocol-contracts/contracts/interfaces/zContract.sol"; +import "@zetachain/zevm-protocol-contracts/contracts/interfaces/IZRC20.sol"; interface SystemContractErrors { error CallerIsNotFungibleModule(); diff --git a/packages/zevm-contracts/contracts/shared/TestUniswapContracts.sol b/packages/zevm-example-contracts/contracts/shared/TestUniswapContracts.sol similarity index 100% rename from packages/zevm-contracts/contracts/shared/TestUniswapContracts.sol rename to packages/zevm-example-contracts/contracts/shared/TestUniswapContracts.sol diff --git a/packages/zevm-contracts/contracts/shared/TestZRC20.sol b/packages/zevm-example-contracts/contracts/shared/TestZRC20.sol similarity index 100% rename from packages/zevm-contracts/contracts/shared/TestZRC20.sol rename to packages/zevm-example-contracts/contracts/shared/TestZRC20.sol diff --git a/packages/zevm-contracts/contracts/zeta-swap/ZetaCurveSwapDemo.sol b/packages/zevm-example-contracts/contracts/zeta-swap/ZetaCurveSwapDemo.sol similarity index 93% rename from packages/zevm-contracts/contracts/zeta-swap/ZetaCurveSwapDemo.sol rename to packages/zevm-example-contracts/contracts/zeta-swap/ZetaCurveSwapDemo.sol index c1eb997e..89784826 100644 --- a/packages/zevm-contracts/contracts/zeta-swap/ZetaCurveSwapDemo.sol +++ b/packages/zevm-example-contracts/contracts/zeta-swap/ZetaCurveSwapDemo.sol @@ -1,8 +1,8 @@ // SPDX-License-Identifier: MIT pragma solidity 0.8.7; -import "../interfaces/IZRC20.sol"; -import "../interfaces/zContract.sol"; +import "@zetachain/zevm-protocol-contracts/contracts/interfaces/zContract.sol"; +import "@zetachain/zevm-protocol-contracts/contracts/interfaces/IZRC20.sol"; interface ICRV3 { function exchange(uint256 i, uint256 j, uint256 dx, uint256 min_dy, bool use_eth) external returns (uint256); diff --git a/packages/zevm-contracts/contracts/zeta-swap/ZetaSwap.sol b/packages/zevm-example-contracts/contracts/zeta-swap/ZetaSwap.sol similarity index 96% rename from packages/zevm-contracts/contracts/zeta-swap/ZetaSwap.sol rename to packages/zevm-example-contracts/contracts/zeta-swap/ZetaSwap.sol index 8133dcc7..e1c07a4b 100644 --- a/packages/zevm-contracts/contracts/zeta-swap/ZetaSwap.sol +++ b/packages/zevm-example-contracts/contracts/zeta-swap/ZetaSwap.sol @@ -4,8 +4,8 @@ pragma solidity 0.8.7; import "@uniswap/v2-periphery/contracts/interfaces/IUniswapV2Router02.sol"; import "@uniswap/v2-periphery/contracts/interfaces/IUniswapV2Router01.sol"; -import "../interfaces/IZRC20.sol"; -import "../interfaces/zContract.sol"; +import "@zetachain/zevm-protocol-contracts/contracts/interfaces/zContract.sol"; +import "@zetachain/zevm-protocol-contracts/contracts/interfaces/IZRC20.sol"; interface ZetaSwapErrors { error WrongGasContract(); diff --git a/packages/zevm-contracts/contracts/zeta-swap/ZetaSwapBtcInbound.sol b/packages/zevm-example-contracts/contracts/zeta-swap/ZetaSwapBtcInbound.sol similarity index 94% rename from packages/zevm-contracts/contracts/zeta-swap/ZetaSwapBtcInbound.sol rename to packages/zevm-example-contracts/contracts/zeta-swap/ZetaSwapBtcInbound.sol index 8b0cfb62..6b4526c7 100644 --- a/packages/zevm-contracts/contracts/zeta-swap/ZetaSwapBtcInbound.sol +++ b/packages/zevm-example-contracts/contracts/zeta-swap/ZetaSwapBtcInbound.sol @@ -2,7 +2,7 @@ pragma solidity 0.8.7; import "./ZetaSwap.sol"; -import "../system/SystemContract.sol"; +import "@zetachain/zevm-protocol-contracts/contracts/system/SystemContract.sol"; contract ZetaSwapBtcInbound is ZetaSwap { address immutable systemContractAddress; diff --git a/packages/zevm-contracts/contracts/zeta-swap/ZetaSwapBtcInboundV2.sol b/packages/zevm-example-contracts/contracts/zeta-swap/ZetaSwapBtcInboundV2.sol similarity index 87% rename from packages/zevm-contracts/contracts/zeta-swap/ZetaSwapBtcInboundV2.sol rename to packages/zevm-example-contracts/contracts/zeta-swap/ZetaSwapBtcInboundV2.sol index 9a857782..aed544af 100644 --- a/packages/zevm-contracts/contracts/zeta-swap/ZetaSwapBtcInboundV2.sol +++ b/packages/zevm-example-contracts/contracts/zeta-swap/ZetaSwapBtcInboundV2.sol @@ -1,8 +1,9 @@ // SPDX-License-Identifier: MIT pragma solidity 0.8.7; -import "../system/SystemContract.sol"; -import "../interfaces/zContract.sol"; +import "@zetachain/zevm-protocol-contracts/contracts/system/SystemContract.sol"; +import "@zetachain/zevm-protocol-contracts/contracts/interfaces/zContract.sol"; + import "../shared/BytesHelperLib.sol"; import "../shared/SwapHelperLib.sol"; diff --git a/packages/zevm-contracts/contracts/zeta-swap/ZetaSwapV2.sol b/packages/zevm-example-contracts/contracts/zeta-swap/ZetaSwapV2.sol similarity index 85% rename from packages/zevm-contracts/contracts/zeta-swap/ZetaSwapV2.sol rename to packages/zevm-example-contracts/contracts/zeta-swap/ZetaSwapV2.sol index a7617865..95fd0e3a 100644 --- a/packages/zevm-contracts/contracts/zeta-swap/ZetaSwapV2.sol +++ b/packages/zevm-example-contracts/contracts/zeta-swap/ZetaSwapV2.sol @@ -1,8 +1,9 @@ // SPDX-License-Identifier: MIT pragma solidity 0.8.7; -import "../system/SystemContract.sol"; -import "../interfaces/zContract.sol"; +import "@zetachain/zevm-protocol-contracts/contracts/system/SystemContract.sol"; +import "@zetachain/zevm-protocol-contracts/contracts/interfaces/zContract.sol"; + import "../shared/SwapHelperLib.sol"; contract ZetaSwapV2 is zContract { diff --git a/packages/zevm-example-contracts/hardhat.config.ts b/packages/zevm-example-contracts/hardhat.config.ts new file mode 100644 index 00000000..53562131 --- /dev/null +++ b/packages/zevm-example-contracts/hardhat.config.ts @@ -0,0 +1,46 @@ +import "@nomiclabs/hardhat-etherscan"; +import "@nomiclabs/hardhat-waffle"; +import "@typechain/hardhat"; +import "hardhat-gas-reporter"; +import "solidity-coverage"; +import "tsconfig-paths/register"; + +import { getHardhatConfigNetworks, getHardhatConfigScanners } from "@zetachain/addresses-tools/src/networks"; +import * as dotenv from "dotenv"; +import type { HardhatUserConfig } from "hardhat/types"; + +dotenv.config(); + +const PRIVATE_KEYS = process.env.PRIVATE_KEY !== undefined ? [`0x${process.env.PRIVATE_KEY}`] : []; + +const config: HardhatUserConfig = { + etherscan: { + ...getHardhatConfigScanners(), + }, + gasReporter: { + currency: "USD", + enabled: process.env.REPORT_GAS !== undefined, + }, + networks: { + ...getHardhatConfigNetworks(PRIVATE_KEYS), + }, + solidity: { + compilers: [ + { version: "0.5.10" /** For create2 factory */ }, + { version: "0.6.6" /** For uniswap v2 */ }, + { version: "0.8.7" }, + ], + settings: { + /** + * @see {@link https://smock.readthedocs.io/en/latest/getting-started.html} + */ + outputSelection: { + "*": { + "*": ["storageLayout"], + }, + }, + }, + }, +}; + +export default config; diff --git a/packages/zevm-example-contracts/package.json b/packages/zevm-example-contracts/package.json new file mode 100644 index 00000000..929ce0f5 --- /dev/null +++ b/packages/zevm-example-contracts/package.json @@ -0,0 +1,41 @@ +{ + "name": "@zetachain/zevm-example-contracts", + "version": "0.0.1", + "license": "MIT", + "private": true, + "author": "zetachain", + "publishConfig": { + "access": "public", + "registry": "https://registry.npmjs.org/" + }, + "scripts": { + "clean": "npx hardhat clean", + "compile": "npx hardhat compile", + "multi-chain-swap:deploy-local": "ZETA_NETWORK=troy EXECUTE_PROGRAMMATICALLY=true npx hardhat run scripts/multi-chain-swap/deploy.ts --network hardhat", + "multi-chain-swap:deploy": "ZETA_NETWORK=athens EXECUTE_PROGRAMMATICALLY=true npx hardhat run scripts/multi-chain-swap/deploy.ts", + "lint:fix": "npm run lint:js:fix && npm run lint:sol:fix", + "lint:js:fix": "eslint --ext .js,.ts . --fix", + "lint:js": "eslint --ext .js,.ts .", + "lint:sol:fix": "prettier --write \"contracts/**/*.sol\"", + "lint:sol": "solhint 'contracts/**/*.sol' && prettier -c 'contracts/**/*.sol'", + "lint": "npm run lint:js && npm run lint:sol", + "test:watch": "echo You need to install `entr` to run this command && find contracts/**/** lib/**/** test/**/** -iname '*.sol' -o -iname '*.ts' | entr -cnr npx hardhat test", + "test": "npx hardhat test", + "tsc:watch": "npx tsc --watch" + }, + "devDependencies": { + "hardhat-gas-reporter": "^1.0.8", + "solidity-coverage": "^0.7.20", + "tsconfig-paths": "^3.14.1" + }, + "dependencies": { + "@openzeppelin/contracts": "4.7.3", + "@uniswap/v2-periphery": "1.1.0-beta.0", + "@zetachain/addresses": "workspace:^", + "@zetachain/addresses-tools": "workspace:^", + "@zetachain/interfaces": "workspace:^", + "@zetachain/protocol-contracts": "workspace:^", + "@zetachain/zevm-protocol-contracts": "workspace:^", + "ethers": "5.6.8" + } +} diff --git a/packages/zevm-contracts/scripts/systemConstants.ts b/packages/zevm-example-contracts/scripts/systemConstants.ts similarity index 100% rename from packages/zevm-contracts/scripts/systemConstants.ts rename to packages/zevm-example-contracts/scripts/systemConstants.ts diff --git a/packages/zevm-contracts/scripts/zeta-swap/add-liquidity-zeta-uniswap.ts b/packages/zevm-example-contracts/scripts/zeta-swap/add-liquidity-zeta-uniswap.ts similarity index 100% rename from packages/zevm-contracts/scripts/zeta-swap/add-liquidity-zeta-uniswap.ts rename to packages/zevm-example-contracts/scripts/zeta-swap/add-liquidity-zeta-uniswap.ts diff --git a/packages/zevm-contracts/scripts/zeta-swap/deploy.ts b/packages/zevm-example-contracts/scripts/zeta-swap/deploy.ts similarity index 100% rename from packages/zevm-contracts/scripts/zeta-swap/deploy.ts rename to packages/zevm-example-contracts/scripts/zeta-swap/deploy.ts diff --git a/packages/zevm-contracts/scripts/zeta-swap/get-system-data.ts b/packages/zevm-example-contracts/scripts/zeta-swap/get-system-data.ts similarity index 100% rename from packages/zevm-contracts/scripts/zeta-swap/get-system-data.ts rename to packages/zevm-example-contracts/scripts/zeta-swap/get-system-data.ts diff --git a/packages/zevm-contracts/scripts/zeta-swap/helpers.ts b/packages/zevm-example-contracts/scripts/zeta-swap/helpers.ts similarity index 100% rename from packages/zevm-contracts/scripts/zeta-swap/helpers.ts rename to packages/zevm-example-contracts/scripts/zeta-swap/helpers.ts diff --git a/packages/zevm-contracts/scripts/zeta-swap/send.ts b/packages/zevm-example-contracts/scripts/zeta-swap/send.ts similarity index 100% rename from packages/zevm-contracts/scripts/zeta-swap/send.ts rename to packages/zevm-example-contracts/scripts/zeta-swap/send.ts diff --git a/packages/zevm-contracts/scripts/zeta-swap/stress-swap.ts b/packages/zevm-example-contracts/scripts/zeta-swap/stress-swap.ts similarity index 100% rename from packages/zevm-contracts/scripts/zeta-swap/stress-swap.ts rename to packages/zevm-example-contracts/scripts/zeta-swap/stress-swap.ts diff --git a/packages/zevm-contracts/scripts/zeta-swap/swap-on-zevm.ts b/packages/zevm-example-contracts/scripts/zeta-swap/swap-on-zevm.ts similarity index 100% rename from packages/zevm-contracts/scripts/zeta-swap/swap-on-zevm.ts rename to packages/zevm-example-contracts/scripts/zeta-swap/swap-on-zevm.ts diff --git a/packages/zevm-contracts/scripts/zeta-swap/swap.ts b/packages/zevm-example-contracts/scripts/zeta-swap/swap.ts similarity index 100% rename from packages/zevm-contracts/scripts/zeta-swap/swap.ts rename to packages/zevm-example-contracts/scripts/zeta-swap/swap.ts diff --git a/packages/zevm-contracts/test/MultipleOutput.spec.ts b/packages/zevm-example-contracts/test/MultipleOutput.spec.ts similarity index 100% rename from packages/zevm-contracts/test/MultipleOutput.spec.ts rename to packages/zevm-example-contracts/test/MultipleOutput.spec.ts diff --git a/packages/zevm-contracts/test/Swap.spec.ts b/packages/zevm-example-contracts/test/Swap.spec.ts similarity index 100% rename from packages/zevm-contracts/test/Swap.spec.ts rename to packages/zevm-example-contracts/test/Swap.spec.ts diff --git a/packages/zevm-contracts/test/test.helpers.ts b/packages/zevm-example-contracts/test/test.helpers.ts similarity index 100% rename from packages/zevm-contracts/test/test.helpers.ts rename to packages/zevm-example-contracts/test/test.helpers.ts diff --git a/packages/zevm-example-contracts/tsconfig.json b/packages/zevm-example-contracts/tsconfig.json new file mode 100644 index 00000000..355cfda5 --- /dev/null +++ b/packages/zevm-example-contracts/tsconfig.json @@ -0,0 +1,14 @@ +{ + "extends": "../../tsconfig.json", + "include": ["./scripts", "./lib", "./test", "./tests", "./typechain", "./**/*.json", "typechain-types"], + "exclude": ["artifacts", "cache"], + "files": ["./hardhat.config.ts"], + "compilerOptions": { + "baseUrl": ".", + "paths": { + "@zetachain/addresses": ["../addresses/src/index"], + "@zetachain/addresses/*": ["../addresses/src/*"], + "@zetachain/interfaces": ["../interfaces/src/index"] + } + } +} diff --git a/packages/zevm-protocol-contracts/.env.example b/packages/zevm-protocol-contracts/.env.example new file mode 100644 index 00000000..d53e3d1a --- /dev/null +++ b/packages/zevm-protocol-contracts/.env.example @@ -0,0 +1,2 @@ +ALCHEMY_API_KEY_MAINNET= +ALCHEMY_API_KEY_GOERLI= \ No newline at end of file diff --git a/packages/zevm-protocol-contracts/.eslintrc.js b/packages/zevm-protocol-contracts/.eslintrc.js new file mode 100644 index 00000000..77b8f69a --- /dev/null +++ b/packages/zevm-protocol-contracts/.eslintrc.js @@ -0,0 +1,23 @@ +const path = require("path"); + +const OFF = 0; + +module.exports = { + env: { + browser: false, + es2021: true, + mocha: true, + node: true, + }, + extends: ["../../.eslintrc.js"], + rules: { + "no-console": OFF, + }, + settings: { + "import/resolver": { + typescript: { + project: path.join(__dirname, "tsconfig.json"), + }, + }, + }, +}; diff --git a/packages/zevm-protocol-contracts/README.md b/packages/zevm-protocol-contracts/README.md new file mode 100644 index 00000000..13e96f86 --- /dev/null +++ b/packages/zevm-protocol-contracts/README.md @@ -0,0 +1,16 @@ +# ZetaEVM Protocol contracts + +> ⚠️ The contracts **are not audited yet**, use at your own risk. + +## Environment variables + +Follow the template in `.env.example`. + +* The private key should **not** include `0x`. +* To verify your contracts, you'll need api keys both in BSCScan and Etherscan. + +## Running Tests + +```bash + yarn test +``` diff --git a/packages/zevm-contracts/contracts/interfaces/IZRC20.sol b/packages/zevm-protocol-contracts/contracts/interfaces/IZRC20.sol similarity index 100% rename from packages/zevm-contracts/contracts/interfaces/IZRC20.sol rename to packages/zevm-protocol-contracts/contracts/interfaces/IZRC20.sol diff --git a/packages/zevm-contracts/contracts/interfaces/zContract.sol b/packages/zevm-protocol-contracts/contracts/interfaces/zContract.sol similarity index 100% rename from packages/zevm-contracts/contracts/interfaces/zContract.sol rename to packages/zevm-protocol-contracts/contracts/interfaces/zContract.sol diff --git a/packages/zevm-contracts/contracts/system/SystemContract.sol b/packages/zevm-protocol-contracts/contracts/system/SystemContract.sol similarity index 100% rename from packages/zevm-contracts/contracts/system/SystemContract.sol rename to packages/zevm-protocol-contracts/contracts/system/SystemContract.sol diff --git a/packages/zevm-protocol-contracts/hardhat.config.ts b/packages/zevm-protocol-contracts/hardhat.config.ts new file mode 100644 index 00000000..53562131 --- /dev/null +++ b/packages/zevm-protocol-contracts/hardhat.config.ts @@ -0,0 +1,46 @@ +import "@nomiclabs/hardhat-etherscan"; +import "@nomiclabs/hardhat-waffle"; +import "@typechain/hardhat"; +import "hardhat-gas-reporter"; +import "solidity-coverage"; +import "tsconfig-paths/register"; + +import { getHardhatConfigNetworks, getHardhatConfigScanners } from "@zetachain/addresses-tools/src/networks"; +import * as dotenv from "dotenv"; +import type { HardhatUserConfig } from "hardhat/types"; + +dotenv.config(); + +const PRIVATE_KEYS = process.env.PRIVATE_KEY !== undefined ? [`0x${process.env.PRIVATE_KEY}`] : []; + +const config: HardhatUserConfig = { + etherscan: { + ...getHardhatConfigScanners(), + }, + gasReporter: { + currency: "USD", + enabled: process.env.REPORT_GAS !== undefined, + }, + networks: { + ...getHardhatConfigNetworks(PRIVATE_KEYS), + }, + solidity: { + compilers: [ + { version: "0.5.10" /** For create2 factory */ }, + { version: "0.6.6" /** For uniswap v2 */ }, + { version: "0.8.7" }, + ], + settings: { + /** + * @see {@link https://smock.readthedocs.io/en/latest/getting-started.html} + */ + outputSelection: { + "*": { + "*": ["storageLayout"], + }, + }, + }, + }, +}; + +export default config; diff --git a/packages/zevm-contracts/package.json b/packages/zevm-protocol-contracts/package.json similarity index 97% rename from packages/zevm-contracts/package.json rename to packages/zevm-protocol-contracts/package.json index a868e549..ee7fa3c2 100644 --- a/packages/zevm-contracts/package.json +++ b/packages/zevm-protocol-contracts/package.json @@ -1,5 +1,5 @@ { - "name": "@zetachain/zevm-contracts", + "name": "@zetachain/zevm-protocol-contracts", "version": "0.0.1", "license": "MIT", "private": true, diff --git a/packages/zevm-protocol-contracts/tsconfig.json b/packages/zevm-protocol-contracts/tsconfig.json new file mode 100644 index 00000000..355cfda5 --- /dev/null +++ b/packages/zevm-protocol-contracts/tsconfig.json @@ -0,0 +1,14 @@ +{ + "extends": "../../tsconfig.json", + "include": ["./scripts", "./lib", "./test", "./tests", "./typechain", "./**/*.json", "typechain-types"], + "exclude": ["artifacts", "cache"], + "files": ["./hardhat.config.ts"], + "compilerOptions": { + "baseUrl": ".", + "paths": { + "@zetachain/addresses": ["../addresses/src/index"], + "@zetachain/addresses/*": ["../addresses/src/*"], + "@zetachain/interfaces": ["../interfaces/src/index"] + } + } +} diff --git a/yarn.lock b/yarn.lock index 262c8b8d..60e981d7 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2756,9 +2756,44 @@ __metadata: languageName: unknown linkType: soft -"@zetachain/zevm-contracts@workspace:packages/zevm-contracts": +"@zetachain/zeta-app-contracts@workspace:packages/zeta-app-contracts": version: 0.0.0-use.local - resolution: "@zetachain/zevm-contracts@workspace:packages/zevm-contracts" + resolution: "@zetachain/zeta-app-contracts@workspace:packages/zeta-app-contracts" + dependencies: + "@defi-wonderland/smock": ^2.3.4 + "@openzeppelin/contracts": 4.7.3 + "@zetachain/addresses": "workspace:^" + "@zetachain/addresses-tools": "workspace:^" + "@zetachain/interfaces": "workspace:^" + "@zetachain/protocol-contracts": "workspace:^" + ethers: 5.6.8 + hardhat-gas-reporter: ^1.0.8 + solidity-coverage: ^0.7.20 + tsconfig-paths: ^3.14.1 + languageName: unknown + linkType: soft + +"@zetachain/zevm-example-contracts@workspace:packages/zevm-example-contracts": + version: 0.0.0-use.local + resolution: "@zetachain/zevm-example-contracts@workspace:packages/zevm-example-contracts" + dependencies: + "@openzeppelin/contracts": 4.7.3 + "@uniswap/v2-periphery": 1.1.0-beta.0 + "@zetachain/addresses": "workspace:^" + "@zetachain/addresses-tools": "workspace:^" + "@zetachain/interfaces": "workspace:^" + "@zetachain/protocol-contracts": "workspace:^" + "@zetachain/zevm-protocol-contracts": "workspace:^" + ethers: 5.6.8 + hardhat-gas-reporter: ^1.0.8 + solidity-coverage: ^0.7.20 + tsconfig-paths: ^3.14.1 + languageName: unknown + linkType: soft + +"@zetachain/zevm-protocol-contracts@workspace:^, @zetachain/zevm-protocol-contracts@workspace:packages/zevm-protocol-contracts": + version: 0.0.0-use.local + resolution: "@zetachain/zevm-protocol-contracts@workspace:packages/zevm-protocol-contracts" dependencies: "@openzeppelin/contracts": 4.7.3 "@uniswap/v2-periphery": 1.1.0-beta.0 From a3f689da3227b3a51ecfc10ee8cc1b4048e5226f Mon Sep 17 00:00:00 2001 From: Andres Martin Aiello <50411235+andresaiello@users.noreply.github.com> Date: Tue, 21 Mar 2023 12:25:33 -0300 Subject: [PATCH 060/115] Add comments to smart contracts (#72) * Add comments to smart contracts * some copy nits in comments * nits * nit * Update packages/zeta-app-contracts/contracts/multi-chain-value/MultiChainValue.sol Co-authored-by: Lucas * typo * Update packages/zeta-app-contracts/contracts/multi-chain-value/MultiChainValue.sol Co-authored-by: Lucas * Update packages/zeta-app-contracts/contracts/multi-chain-value/MultiChainValue.sol Co-authored-by: Lucas * standardize using @dev everywhere instead of @dev: * lucas comments * locas comment * standarize errors comment --------- Co-authored-by: Brandon Truong Co-authored-by: Lucas --- .../MultiChainSwapTrident.strategy.sol | 2 +- .../MultiChainSwapUniV2.strategy.sol | 2 +- .../MultiChainSwapUniV3.strategy.sol | 2 +- .../protocol-contracts/contracts/Zeta.eth.sol | 5 +- .../contracts/ZetaConnector.base.sol | 54 ++++++++++++++++++- .../contracts/ZetaConnector.eth.sol | 19 +++++++ .../contracts/ZetaConnector.non-eth.sol | 21 ++++++++ .../contracts/interfaces/ConnectorErrors.sol | 9 ++++ .../contracts/interfaces/ZetaErrors.sol | 9 ++++ .../interfaces/ZetaInteractorErrors.sol | 7 +++ .../interfaces/ZetaNonEthInterface.sol | 9 ++-- .../multi-chain-value/MultiChainValue.sol | 18 +++++++ 12 files changed, 146 insertions(+), 11 deletions(-) diff --git a/packages/example-contracts/contracts/multi-chain-swap/MultiChainSwapTrident.strategy.sol b/packages/example-contracts/contracts/multi-chain-swap/MultiChainSwapTrident.strategy.sol index aaf61920..b51af0f8 100644 --- a/packages/example-contracts/contracts/multi-chain-swap/MultiChainSwapTrident.strategy.sol +++ b/packages/example-contracts/contracts/multi-chain-swap/MultiChainSwapTrident.strategy.sol @@ -203,7 +203,7 @@ contract MultiChainSwapTrident is MultiChainSwap, ZetaInteractor, MultiChainSwap isValidRevertCall(zetaRevert) { /** - * @dev: If something goes wrong we must swap to the source input token + * @dev If something goes wrong we must swap to the source input token */ ( , diff --git a/packages/example-contracts/contracts/multi-chain-swap/MultiChainSwapUniV2.strategy.sol b/packages/example-contracts/contracts/multi-chain-swap/MultiChainSwapUniV2.strategy.sol index 3dba451e..2e0a5d57 100644 --- a/packages/example-contracts/contracts/multi-chain-swap/MultiChainSwapUniV2.strategy.sol +++ b/packages/example-contracts/contracts/multi-chain-swap/MultiChainSwapUniV2.strategy.sol @@ -267,7 +267,7 @@ contract MultiChainSwapUniV2 is MultiChainSwap, ZetaInteractor, MultiChainSwapEr ZetaInterfaces.ZetaRevert calldata zetaRevert ) external override isValidRevertCall(zetaRevert) { /** - * @dev: If something goes wrong we must swap to the source input token + * @dev If something goes wrong we must swap to the source input token */ ( , diff --git a/packages/example-contracts/contracts/multi-chain-swap/MultiChainSwapUniV3.strategy.sol b/packages/example-contracts/contracts/multi-chain-swap/MultiChainSwapUniV3.strategy.sol index b6be0d2e..b3adf525 100644 --- a/packages/example-contracts/contracts/multi-chain-swap/MultiChainSwapUniV3.strategy.sol +++ b/packages/example-contracts/contracts/multi-chain-swap/MultiChainSwapUniV3.strategy.sol @@ -205,7 +205,7 @@ contract MultiChainSwapUniV3 is MultiChainSwap, ZetaInteractor, MultiChainSwapEr isValidRevertCall(zetaRevert) { /** - * @dev: If something goes wrong we must swap to the source input token + * @dev If something goes wrong we must swap to the source input token */ ( , diff --git a/packages/protocol-contracts/contracts/Zeta.eth.sol b/packages/protocol-contracts/contracts/Zeta.eth.sol index 66b6cd0f..65885364 100644 --- a/packages/protocol-contracts/contracts/Zeta.eth.sol +++ b/packages/protocol-contracts/contracts/Zeta.eth.sol @@ -3,8 +3,11 @@ pragma solidity 0.8.7; import "@openzeppelin/contracts/token/ERC20/ERC20.sol"; +/** + * @dev ZetaEth is an implementation of OpenZeppelin's ERC20 + */ contract ZetaEth is ERC20("Zeta", "ZETA") { constructor(uint256 initialSupply) { - _mint(msg.sender, initialSupply * (10**uint256(decimals()))); + _mint(msg.sender, initialSupply * (10 ** uint256(decimals()))); } } diff --git a/packages/protocol-contracts/contracts/ZetaConnector.base.sol b/packages/protocol-contracts/contracts/ZetaConnector.base.sol index 3e848ac3..c41799a5 100644 --- a/packages/protocol-contracts/contracts/ZetaConnector.base.sol +++ b/packages/protocol-contracts/contracts/ZetaConnector.base.sol @@ -7,16 +7,28 @@ import "@openzeppelin/contracts/security/Pausable.sol"; import "./interfaces/ConnectorErrors.sol"; import "./interfaces/ZetaInterfaces.sol"; +/** + * @dev Main abstraction of ZetaConnector. + * This contract manages interactions between TSS and different chains. + * There's an instance of this contract on each chain supported by ZetaChain. + */ contract ZetaConnectorBase is ConnectorErrors, Pausable { address public immutable zetaToken; + /** + * @dev Multisig contract to pause incoming transactions. + * The responsibility of pausing outgoing transactions is left to the protocol for more flexibility. + */ address public pauserAddress; /** - * @dev Collectively held by Zeta blockchain validators. + * @dev Collectively held by ZetaChain validators. */ address public tssAddress; + /** + * @dev This address will start pointing to a multisig contract, then it will become the TSS address itself. + */ address public tssAddressUpdater; event ZetaSent( @@ -53,6 +65,10 @@ contract ZetaConnectorBase is ConnectorErrors, Pausable { event PauserAddressUpdated(address updaterAddress, address newTssAddress); + /** + * @dev Constructor requires initial addresses. + * zetaToken address is the only immutable one, while others can be updated. + */ constructor(address zetaToken_, address tssAddress_, address tssAddressUpdater_, address pauserAddress_) { if ( zetaToken_ == address(0) || @@ -69,21 +85,33 @@ contract ZetaConnectorBase is ConnectorErrors, Pausable { pauserAddress = pauserAddress_; } + /** + * @dev Modifier to restrict actions to pauser address. + */ modifier onlyPauser() { if (msg.sender != pauserAddress) revert CallerIsNotPauser(msg.sender); _; } + /** + * @dev Modifier to restrict actions to TSS address. + */ modifier onlyTssAddress() { if (msg.sender != tssAddress) revert CallerIsNotTss(msg.sender); _; } + /** + * @dev Modifier to restrict actions to TSS updater address. + */ modifier onlyTssUpdater() { if (msg.sender != tssAddressUpdater) revert CallerIsNotTssUpdater(msg.sender); _; } + /** + * @dev Update the pauser address. The only address allowed to do that is the current pauser. + */ function updatePauserAddress(address pauserAddress_) external onlyPauser { if (pauserAddress_ == address(0)) revert ZetaCommonErrors.InvalidAddress(); @@ -92,6 +120,9 @@ contract ZetaConnectorBase is ConnectorErrors, Pausable { emit PauserAddressUpdated(msg.sender, pauserAddress_); } + /** + * @dev Update the TSS address. The address can be updated by the TSS updater or the TSS address itself. + */ function updateTssAddress(address tssAddress_) external { if (msg.sender != tssAddress && msg.sender != tssAddressUpdater) revert CallerIsNotTssOrUpdater(msg.sender); if (tssAddress_ == address(0)) revert ZetaCommonErrors.InvalidAddress(); @@ -102,7 +133,7 @@ contract ZetaConnectorBase is ConnectorErrors, Pausable { } /** - * @dev Changes the ownership of tssAddressUpdater to be the one held by the Zeta blockchain TSS nodes. + * @dev Changes the ownership of tssAddressUpdater to be the one held by the ZetaChain TSS Signer nodes. */ function renounceTssAddressUpdater() external onlyTssUpdater { if (tssAddress == address(0)) revert ZetaCommonErrors.InvalidAddress(); @@ -110,16 +141,31 @@ contract ZetaConnectorBase is ConnectorErrors, Pausable { tssAddressUpdater = tssAddress; } + /** + * @dev Pause the input (send) transactions. + */ + function pause() external onlyPauser { _pause(); } + /** + * @dev Unpause the contract to allow transactions again. + */ + function unpause() external onlyPauser { _unpause(); } + /** + * @dev Entrypoint to send data and value through ZetaChain. + */ function send(ZetaInterfaces.SendInput calldata input) external virtual {} + /** + * @dev Handler to receive data from other chain. + * This method can be called only by TSS. Access validation is in implementation. + */ function onReceive( bytes calldata zetaTxSenderAddress, uint256 sourceChainId, @@ -129,6 +175,10 @@ contract ZetaConnectorBase is ConnectorErrors, Pausable { bytes32 internalSendHash ) external virtual {} + /** + * @dev Handler to receive errors from other chain. + * This method can be called only by TSS. Access validation is in implementation. + */ function onRevert( address zetaTxSenderAddress, uint256 sourceChainId, diff --git a/packages/protocol-contracts/contracts/ZetaConnector.eth.sol b/packages/protocol-contracts/contracts/ZetaConnector.eth.sol index 03cccb73..d0aa2115 100644 --- a/packages/protocol-contracts/contracts/ZetaConnector.eth.sol +++ b/packages/protocol-contracts/contracts/ZetaConnector.eth.sol @@ -7,6 +7,11 @@ import "./interfaces/ConnectorErrors.sol"; import "./ZetaConnector.base.sol"; import "./interfaces/ZetaInterfaces.sol"; +/** + * @dev ETH implementation of ZetaConnector. + * This contract manages interactions between TSS and different chains. + * This version is only for Ethereum network because in the other chains we mint and burn and in this one we lock and unlock. + */ contract ZetaConnectorEth is ZetaConnectorBase { constructor( address zetaToken_, @@ -19,6 +24,10 @@ contract ZetaConnectorEth is ZetaConnectorBase { return IERC20(zetaToken).balanceOf(address(this)); } + /** + * @dev Entrypoint to send data through ZetaChain + * This call locks the token on the contract and emits an event with all the data needed by the protocol. + */ function send(ZetaInterfaces.SendInput calldata input) external override whenNotPaused { bool success = IERC20(zetaToken).transferFrom(msg.sender, address(this), input.zetaValueAndGas); if (!success) revert ZetaTransferError(); @@ -35,6 +44,11 @@ contract ZetaConnectorEth is ZetaConnectorBase { ); } + /** + * @dev Handler to receive data from other chain. + * This method can be called only by TSS. + * Transfers the Zeta tokens to destination and calls onZetaMessage if it's needed. + */ function onReceive( bytes calldata zetaTxSenderAddress, uint256 sourceChainId, @@ -55,6 +69,11 @@ contract ZetaConnectorEth is ZetaConnectorBase { emit ZetaReceived(zetaTxSenderAddress, sourceChainId, destinationAddress, zetaValue, message, internalSendHash); } + /** + * @dev Handler to receive errors from other chain. + * This method can be called only by TSS. + * Transfers the Zeta tokens to destination and calls onZetaRevert if it's needed. + */ function onRevert( address zetaTxSenderAddress, uint256 sourceChainId, diff --git a/packages/protocol-contracts/contracts/ZetaConnector.non-eth.sol b/packages/protocol-contracts/contracts/ZetaConnector.non-eth.sol index af95b8b5..98cc8061 100644 --- a/packages/protocol-contracts/contracts/ZetaConnector.non-eth.sol +++ b/packages/protocol-contracts/contracts/ZetaConnector.non-eth.sol @@ -7,6 +7,11 @@ import "./ZetaConnector.base.sol"; import "./interfaces/ZetaInterfaces.sol"; import "./interfaces/ZetaNonEthInterface.sol"; +/** + * @dev Non ETH implementation of ZetaConnector. + * This contract manages interactions between TSS and different chains. + * This version is for every chain but Etherum network because in the other chains we mint and burn and in Etherum we lock and unlock + */ contract ZetaConnectorNonEth is ZetaConnectorBase { uint256 public maxSupply = 2 ** 256 - 1; @@ -25,6 +30,10 @@ contract ZetaConnectorNonEth is ZetaConnectorBase { maxSupply = maxSupply_; } + /** + * @dev Entry point to send data to protocol + * This call burn the token and emit an event with all the data needed by the protocol + */ function send(ZetaInterfaces.SendInput calldata input) external override whenNotPaused { ZetaNonEthInterface(zetaToken).burnFrom(msg.sender, input.zetaValueAndGas); @@ -40,6 +49,12 @@ contract ZetaConnectorNonEth is ZetaConnectorBase { ); } + /** + * @dev Handler to receive data from other chain. + * This method can be called only by TSS. + * Transfer the Zeta tokens to destination and calls onZetaMessage if it's needed. + * To perform the transfer mint new tokens, validating first the maxSupply allowed in the current chain. + */ function onReceive( bytes calldata zetaTxSenderAddress, uint256 sourceChainId, @@ -60,6 +75,12 @@ contract ZetaConnectorNonEth is ZetaConnectorBase { emit ZetaReceived(zetaTxSenderAddress, sourceChainId, destinationAddress, zetaValue, message, internalSendHash); } + /** + * @dev Handler to receive errors from other chain. + * This method can be called only by TSS. + * Transfer the Zeta tokens to destination and calls onZetaRevert if it's needed. + * To perform the transfer mint new tokens, validating first the maxSupply allowed in the current chain. + */ function onRevert( address zetaTxSenderAddress, uint256 sourceChainId, diff --git a/packages/protocol-contracts/contracts/interfaces/ConnectorErrors.sol b/packages/protocol-contracts/contracts/interfaces/ConnectorErrors.sol index 88232c08..5fd7d744 100644 --- a/packages/protocol-contracts/contracts/interfaces/ConnectorErrors.sol +++ b/packages/protocol-contracts/contracts/interfaces/ConnectorErrors.sol @@ -1,16 +1,25 @@ // SPDX-License-Identifier: MIT pragma solidity 0.8.7; +/** + * @dev Interface with connector custom errors + */ interface ConnectorErrors { + // @dev Thrown when caller is not the address defined as paused address error CallerIsNotPauser(address caller); + // @dev Thrown when caller is not the address defined as TSS address error CallerIsNotTss(address caller); + // @dev Thrown when caller is not the address defined as TSS Updater address error CallerIsNotTssUpdater(address caller); + // @dev Thrown when caller is not the address defined as TSS or TSS Updater address error CallerIsNotTssOrUpdater(address caller); + // @dev Thrown when Zeta can't be transferred for some reason error ZetaTransferError(); + // @dev Thrown when maxSupply will be exceed if minting will proceed error ExceedsMaxSupply(uint256 maxSupply); } diff --git a/packages/protocol-contracts/contracts/interfaces/ZetaErrors.sol b/packages/protocol-contracts/contracts/interfaces/ZetaErrors.sol index b4fc37b3..88976a1f 100644 --- a/packages/protocol-contracts/contracts/interfaces/ZetaErrors.sol +++ b/packages/protocol-contracts/contracts/interfaces/ZetaErrors.sol @@ -1,16 +1,25 @@ // SPDX-License-Identifier: MIT pragma solidity 0.8.7; +/** + * @dev Common custom errors + */ interface ZetaErrors { + // @dev Thrown when caller is not the address defined as TSS address error CallerIsNotTss(address caller); + // @dev Thrown when caller is not the address defined as connector address error CallerIsNotConnector(address caller); + // @dev Thrown when caller is not the address defined as TSS Updater address error CallerIsNotTssUpdater(address caller); + // @dev Thrown when caller is not the address defined as TSS or TSS Updater address error CallerIsNotTssOrUpdater(address caller); + // @dev Thrown when a contract receives an invalid address param, mostly zero address validation error InvalidAddress(); + // @dev Thrown when Zeta can't be transferred for some reason error ZetaTransferError(); } diff --git a/packages/protocol-contracts/contracts/interfaces/ZetaInteractorErrors.sol b/packages/protocol-contracts/contracts/interfaces/ZetaInteractorErrors.sol index ee14ef8b..df10982f 100644 --- a/packages/protocol-contracts/contracts/interfaces/ZetaInteractorErrors.sol +++ b/packages/protocol-contracts/contracts/interfaces/ZetaInteractorErrors.sol @@ -1,12 +1,19 @@ // SPDX-License-Identifier: MIT pragma solidity 0.8.7; +/** + * @dev Interface with Zeta Interactor errors + */ interface ZetaInteractorErrors { + // @dev Thrown when try to send a message or tokens to a non whitelisted chain error InvalidDestinationChainId(); + // @dev Thrown when the caller is invalid. e.g.: if onZetaMessage or onZetaRevert are not called by Connector error InvalidCaller(address caller); + // @dev Thrown when message on onZetaMessage has the wrong format error InvalidZetaMessageCall(); + // @dev Thrown when message on onZetaRevert has the wrong format error InvalidZetaRevertCall(); } diff --git a/packages/protocol-contracts/contracts/interfaces/ZetaNonEthInterface.sol b/packages/protocol-contracts/contracts/interfaces/ZetaNonEthInterface.sol index d4a93f1f..164645cd 100644 --- a/packages/protocol-contracts/contracts/interfaces/ZetaNonEthInterface.sol +++ b/packages/protocol-contracts/contracts/interfaces/ZetaNonEthInterface.sol @@ -3,12 +3,11 @@ pragma solidity 0.8.7; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; +/** + * @dev ZetaNonEthInterface is a mintable / burnable version of IERC20 + */ interface ZetaNonEthInterface is IERC20 { function burnFrom(address account, uint256 amount) external; - function mint( - address mintee, - uint256 value, - bytes32 internalSendHash - ) external; + function mint(address mintee, uint256 value, bytes32 internalSendHash) external; } diff --git a/packages/zeta-app-contracts/contracts/multi-chain-value/MultiChainValue.sol b/packages/zeta-app-contracts/contracts/multi-chain-value/MultiChainValue.sol index f91fc005..8a8bc07e 100644 --- a/packages/zeta-app-contracts/contracts/multi-chain-value/MultiChainValue.sol +++ b/packages/zeta-app-contracts/contracts/multi-chain-value/MultiChainValue.sol @@ -6,6 +6,9 @@ import "@zetachain/protocol-contracts/contracts/Zeta.eth.sol"; import "@zetachain/protocol-contracts/contracts/ZetaInteractor.sol"; import "@zetachain/protocol-contracts/contracts/interfaces/ZetaInterfaces.sol"; +/** + * @dev Custom errors for contract MultiChainValue + */ interface MultiChainValueErrors { error ErrorTransferringZeta(); @@ -16,27 +19,42 @@ interface MultiChainValueErrors { error InvalidZetaValueAndGas(); } +/** + * @dev MultiChainValue goal is to send Zeta token across all supported chains + * Extends the logic defined in ZetaInteractor to handle multichain standards + */ contract MultiChainValue is ZetaInteractor, MultiChainValueErrors { address public zetaToken; + // @dev map of valid chains to send Zeta mapping(uint256 => bool) public availableChainIds; + // @dev Constructor calls ZetaInteractor's constructor to setup Connector address and current chain constructor(address connectorAddress_, address zetaToken_) ZetaInteractor(connectorAddress_) { if (zetaToken_ == address(0)) revert ZetaCommonErrors.InvalidAddress(); zetaToken = zetaToken_; } + /** + * @dev Whitelist a chain to send Zeta + */ function addAvailableChainId(uint256 destinationChainId) external onlyOwner { if (availableChainIds[destinationChainId]) revert ChainIdAlreadyEnabled(); availableChainIds[destinationChainId] = true; } + /** + * @dev Blacklist a chain to send Zeta + */ function removeAvailableChainId(uint256 destinationChainId) external onlyOwner { if (!availableChainIds[destinationChainId]) revert ChainIdNotAvailable(); delete availableChainIds[destinationChainId]; } + /** + * @dev If the destination chain is a valid chain, send the Zeta tokens to that chain + */ function send(uint256 destinationChainId, bytes calldata destinationAddress, uint256 zetaValueAndGas) external { if (!availableChainIds[destinationChainId]) revert InvalidDestinationChainId(); if (zetaValueAndGas == 0) revert InvalidZetaValueAndGas(); From 7ae7ad5a060eac3615f0fd0ed9b590e7671b9fe3 Mon Sep 17 00:00:00 2001 From: Andres Martin Aiello <50411235+andresaiello@users.noreply.github.com> Date: Wed, 29 Mar 2023 14:14:11 -0300 Subject: [PATCH 061/115] Deploy send contract to mumbai (#76) --- packages/addresses/src/addresses.athens.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/addresses/src/addresses.athens.json b/packages/addresses/src/addresses.athens.json index 9b7f80b0..2a12a669 100644 --- a/packages/addresses/src/addresses.athens.json +++ b/packages/addresses/src/addresses.athens.json @@ -56,7 +56,7 @@ "multiChainSwap": "0xaf28cb0d9E045170E1642321B964740784E7dC64", "tridentPoolFactory": "", "multiChainSwapZetaConnector": "", - "multiChainValue": "0xb3021F5603291895b0Df5fC6276cda33a0B90fa6", + "multiChainValue": "0x15D434879B65d7008Dec00f191e578D8E90D026b", "tss": "0x7c125C1d515b8945841b3d5144a060115C58725F", "tssUpdater": "0x7274d1d5dddef36aac53dd45b93487ce01ef0a55", "uniswapV2Factory": "", From 2d331998c0ce6878897ef84207d89254488bf05a Mon Sep 17 00:00:00 2001 From: Charlie <31941002+CharlieMc0@users.noreply.github.com> Date: Thu, 6 Apr 2023 15:15:46 -0700 Subject: [PATCH 062/115] Cicd/Build docker (#77) * Fixed Dockerfile and added build step * Added script for auto generating simple env * Fixed docker tag and updated script to include faucet * Updated package.json with new command * renamed tutorial-setup * Setup script generated wallet now persists --- .dockerignore | 3 +- .../actions/build-docker-images/action.yml | 47 ++++++++ .github/actions/set-branch-name/action.yml | 45 ++++++++ .github/workflows/build.yml | 53 +++++++++ .gitignore | 5 + Dockerfile | 16 ++- package.json | 8 +- packages/addresses-tools/src/networks.ts | 8 +- scripts/setup-tutorial.ts | 105 ++++++++++++++++++ yarn.lock | 20 ++++ 10 files changed, 300 insertions(+), 10 deletions(-) create mode 100644 .github/actions/build-docker-images/action.yml create mode 100644 .github/actions/set-branch-name/action.yml create mode 100644 .github/workflows/build.yml create mode 100644 scripts/setup-tutorial.ts diff --git a/.dockerignore b/.dockerignore index a00e9e97..02b15f4f 100644 --- a/.dockerignore +++ b/.dockerignore @@ -5,4 +5,5 @@ Dockerfile .github .vscode .changeset -.dockerignore \ No newline at end of file +.dockerignore +.secrets \ No newline at end of file diff --git a/.github/actions/build-docker-images/action.yml b/.github/actions/build-docker-images/action.yml new file mode 100644 index 00000000..b4c95635 --- /dev/null +++ b/.github/actions/build-docker-images/action.yml @@ -0,0 +1,47 @@ +name: 'Build Docker Images' +description: 'Builds Docker images and pushes them to ECR and GHCR' +inputs: + DOCKER_FILENAME: + description: 'Name of the docker file to use for the build' + required: true + REPOSITORY_NAME: + description: 'Name of the Repository' + required: true + IMAGE_TAG: + description: 'Image Tag' + required: true + GHCR_USERNAME: + description: 'Username for GitHub Container Registry' + required: true + GHCR_TOKEN: + description: 'Token for GitHub Container Registry' + required: true + +runs: + using: "composite" + + steps: + - name: Set Environment Variables" + run: | + echo "DOCKER_FILENAME=${{ inputs.DOCKER_FILENAME }}" >> $GITHUB_ENV + echo "REPOSITORY_NAME=${{ inputs.REPOSITORY_NAME }}" >> $GITHUB_ENV + echo "IMAGE_TAG=${{ inputs.IMAGE_TAG }}" >> $GITHUB_ENV + echo "GHCR_USERNAME=${{ inputs.GHCR_USERNAME }}" >> $GITHUB_ENV + echo "GHCR_TOKEN=${{ inputs.GHCR_TOKEN }}" >> $GITHUB_ENV + shell: bash + + - name: Log in to the GitHub Container Registry + id: login-ghcr + uses: docker/login-action@v2 + with: + registry: ghcr.io + username: ${{ env.GHCR_USERNAME }} + password: ${{ env.GHCR_TOKEN }} + + - name: Build, tag, and push images + shell: bash + env: + GHCR_REGISTRY: ghcr.io/zeta-chain + run: | + docker build -f $DOCKER_FILENAME -t $GHCR_REGISTRY/$REPOSITORY_NAME:$IMAGE_TAG . + docker push $GHCR_REGISTRY/$REPOSITORY_NAME:$IMAGE_TAG diff --git a/.github/actions/set-branch-name/action.yml b/.github/actions/set-branch-name/action.yml new file mode 100644 index 00000000..28c8d788 --- /dev/null +++ b/.github/actions/set-branch-name/action.yml @@ -0,0 +1,45 @@ +name: 'SET:BRANCH:TAG:REFERENCES' +description: 'Logic to set branch-name from the event and type.' +inputs: + github_ref: + description: "github ref to use" + required: true + github_event: + description: "github event to use" + required: true + github_head_ref: + description: "github head ref to use" + required: true + github_commit_sha: + description: "github sha to use" + required: true + current_branch_name: + description: "current_branch" + required: true +runs: + using: "composite" + steps: + - uses: actions/checkout@v3 + + - name: Set branch name + id: set-branch-name + shell: bash + run: | + tag_check=`echo '${{ inputs.github_ref }}' | grep 'tags'` || echo "proceed" + if [ "${{ inputs.github_event }}" == "pull_request" ]; then + echo "Setting the current branch name to same as the source branch of the PR" + RELEASE_NAME=$(sed 's#/#-#g' <<< ${{ inputs.github_head_ref }}) + echo "RELEASE_NAME=$RELEASE_NAME" >> $GITHUB_ENV + TAG_NAME="$RELEASE_NAME-${{ inputs.github_commit_sha }}" + echo "TAG_NAME=$TAG_NAME" >> $GITHUB_ENV + elif [ "${{ inputs.github_ref }}" == "refs/heads/main" ]; then + TAG_NAME="latest" + echo "TAG_NAME=$TAG_NAME" >> $GITHUB_ENV + else + RELEASE_NAME=$(sed 's#/#-#g' <<< ${{ inputs.current_branch_name }}) + echo "RELEASE_NAME=$RELEASE_NAME" >> $GITHUB_ENV + TAG_NAME="$RELEASE_NAME-${{ inputs.github_commit_sha }}" + echo "TAG_NAME=$TAG_NAME" >> $GITHUB_ENV + fi + + diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 00000000..bb49212d --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,53 @@ +name: Build + +on: + push: + branches: + - main + pull_request: + branches: + - main + + + +env: + GITHUB_REF_NAME: "$(echo ${{ github.ref_name }} | tr '//' '-')" + +jobs: + build-docker: + runs-on: ubuntu-latest + timeout-minutes: 20 + steps: + - uses: actions/checkout@v3 + + - name: setup-git-credentials + uses: de-vri-es/setup-git-credentials@v2.0.8 + with: + credentials: ${{ secrets.PAT_GITHUB_SERVICE_ACCT }} + + - name: Get branch name + id: branch-name + uses: tj-actions/branch-names@v6 + + - name: Git Hash + run: | + echo "GIT_HASH=$(git rev-parse --short HEAD)" >> ${GITHUB_ENV} + echo "WORKSPACE_DIR=$(pwd)" >> ${GITHUB_ENV} + + - name: set-branch-name + uses: ./.github/actions/set-branch-name + with: + github_ref: "${{github.ref}}" + github_event: "${{ github.event_name }}" + github_head_ref: "${{ github.event.pull_request.head.ref }}" + github_commit_sha: "${{ env.GIT_HASH }}" + current_branch_name: "${{ steps.branch-name.outputs.current_branch }}" + + - name: Build, tag, and push docker images + uses: ./.github/actions/build-docker-images + with: + DOCKER_FILENAME: Dockerfile + REPOSITORY_NAME: zetachain + IMAGE_TAG: ${{ env.TAG_NAME }} + GHCR_USERNAME: ${{ secrets.PAT_GITHUB_SERVICE_ACCT_USERNAME }} + GHCR_TOKEN: ${{ secrets.PAT_GITHUB_SERVICE_ACCT }} diff --git a/.gitignore b/.gitignore index 7e3f87cd..c5c75a79 100644 --- a/.gitignore +++ b/.gitignore @@ -8,6 +8,7 @@ node_modules !.yarn/sdks !.yarn/versions + # Hardhat artifacts typechain-types @@ -20,8 +21,12 @@ tsconfig.tsbuildinfo # Misc .env .DS_Store +.secrets +.wallet.json # Slither scripts/slither-results/* !scripts/slither-results/.gitkeep + + diff --git a/Dockerfile b/Dockerfile index e264b053..4f36c835 100644 --- a/Dockerfile +++ b/Dockerfile @@ -9,10 +9,18 @@ RUN apk add --update python3 yarn git nodejs make g++ ## Install node modules before the code is copied to the container WORKDIR /home/zetachain/ COPY package*.json ./ -RUN yarn install +COPY packages/addresses-tools/package.json ./packages/addresses-tools/package.json +COPY packages/interfaces/package.json ./packages/interfaces/package.json +COPY packages/zevm-example-contracts/package.json ./packages/zevm-example-contracts/package.json +COPY packages/addresses/package.json packages/addresses/package.json +COPY packages/protocol-contracts/package.json ./packages/protocol-contracts/package.json +COPY packages/zevm-protocol-contracts/package.json ./packages/zevm-protocol-contracts/package.json +COPY packages/example-contracts/package.json ./packages/example-contracts/package.json +COPY packages/zeta-app-contracts/package.json ./packages/zeta-app-contracts/package.json +RUN yarn install ; exit 0 COPY . ./ -RUN yarn install +RUN yarn install RUN yarn add solc@0.5.10 RUN yarn add solc@0.6.6 @@ -21,7 +29,9 @@ RUN yarn add solc@0.8.7 RUN cd packages/protocol-contracts && npx hardhat compile && cd - RUN cd packages/example-contracts && npx hardhat compile && cd - -RUN cd packages/zevm-contracts && npx hardhat compile && cd - +RUN cd packages/zeta-app-contracts && npx hardhat compile && cd - +RUN cd packages/zevm-example-contracts && npx hardhat compile && cd - +RUN cd packages/zevm-protocol-contracts && npx hardhat compile && cd - WORKDIR /home/zetachain/ diff --git a/package.json b/package.json index 4c6b9ad1..8cba318f 100644 --- a/package.json +++ b/package.json @@ -23,7 +23,8 @@ "slither": "npx ts-node ./scripts/slither.ts", "test": "yarn workspaces foreach -ptv run test", "g:changeset": "changeset", - "g:release": "yarn changeset publish" + "g:release": "yarn changeset publish", + "setup-tutorial": "ts-node ./scripts/setup-tutorial.ts" }, "devDependencies": { "@changesets/cli": "^2.23.1", @@ -62,5 +63,8 @@ "typechain": "^8.0.0", "typescript": "^4.6.3" }, - "packageManager": "yarn@3.2.0" + "packageManager": "yarn@3.2.0", + "dependencies": { + "solc": "0.8.7" + } } diff --git a/packages/addresses-tools/src/networks.ts b/packages/addresses-tools/src/networks.ts index 5797c684..89717b1e 100644 --- a/packages/addresses-tools/src/networks.ts +++ b/packages/addresses-tools/src/networks.ts @@ -6,7 +6,7 @@ export const getHardhatConfigNetworks = (PRIVATE_KEYS: string[]): NetworksUserCo // chainId: 7001, gas: 5000000, gasPrice: 80000000000, - url: `https://archive.athens2.zetachain.com/evm`, + url: `https://api.athens2.zetachain.com/evm`, }, "bsc-localnet": { gas: 5000000, @@ -26,13 +26,13 @@ export const getHardhatConfigNetworks = (PRIVATE_KEYS: string[]): NetworksUserCo }, "eth-mainnet": { accounts: PRIVATE_KEYS, - url: "https://api.mycryptoapi.com/eth", + url: "https://rpc.ankr.com/eth", }, goerli: { accounts: PRIVATE_KEYS, gas: 2100000, gasPrice: 38000000000, - url: `https://eth-goerli.g.alchemy.com/v2/${process.env.ALCHEMY_API_KEY_GOERLI}`, + url: `https://rpc.ankr.com/eth_goerli`, }, hardhat: { chainId: 1337, @@ -64,7 +64,7 @@ export const getHardhatConfigNetworks = (PRIVATE_KEYS: string[]): NetworksUserCo accounts: PRIVATE_KEYS, gas: 5000000, gasPrice: 80000000000, - url: "https://polygon-mumbai.chainstacklabs.com", + url: "https://rpc.ankr.com/polygon_mumbai", }, ropsten: { accounts: PRIVATE_KEYS, diff --git a/scripts/setup-tutorial.ts b/scripts/setup-tutorial.ts new file mode 100644 index 00000000..51071c9f --- /dev/null +++ b/scripts/setup-tutorial.ts @@ -0,0 +1,105 @@ +import { Wallet } from "ethers"; +import * as fs from "fs"; +import * as https from "https"; + +const jsonPath = "scripts/.wallet.json"; + +interface WalletConfig { + address: string; + privateKey: string; +} + +function saveEnvFiles(address: string, privateKey: string): void { + const value: string = ` +PRIVATE_KEY=${privateKey} +ZETA_NETWORK=athens +EXECUTE_PROGRAMMATICALLY=true`; + const filePaths: string[] = ["packages/example-contracts/.env", "packages/zevm-example-contracts/.env"]; + + filePaths.forEach((filePath: string) => { + fs.writeFile(filePath, value, (err: NodeJS.ErrnoException | null) => { + if (err) { + console.error(`Failed to write to file ${filePath}: ${err}`); + } else { + console.log(`Updated .env file "${filePath}".`); + } + }); + }); +} +function saveWalletFile(address: string, privateKey: string, jsonPath: string): void { + const data = `{"address": "${address}", "privateKey": "${privateKey}}`; + + fs.access(jsonPath, err => { + if (err) { + // The file does not exist, so we can write to it + fs.writeFile(jsonPath, data, err => { + if (err) throw err; + console.log("The new wallet file has been saved!"); + }); + } else { + // The file already exists, so we do not write to it + // console.log("The file already exists!"); + } + }); +} +function callFaucet(address: string): void { + // Hit Faucet to get some testnet Zeta + console.log("Requesting testnet assets from the faucet..."); + const options: https.RequestOptions = { + hostname: "faucet.zetachain.link", + method: "GET", + path: `/eth/${address}`, + port: 443 + }; + + const req = https.request(options, res => { + console.log(`statusCode: ${res.statusCode}`); + + res.on("data", d => { + process.stdout.write(d); + }); + }); + + req.on("error", error => { + console.error(error); + }); + + req.end(); +} + +function createWallet(filePath: string, callback: () => void): void { + fs.access(filePath, err => { + if (!err) { + callback(); + } + }); +} + +async function getOrCreateWallet(filePath: string): Promise { + let wallet: Wallet; + + try { + const data = await fs.promises.readFile(filePath, "utf8"); + const walletConfig: WalletConfig = JSON.parse(data); + wallet = new Wallet(walletConfig.privateKey); + } catch (error) { + console.log("No Wallet Exists, Creating One..."); + const newWallet = Wallet.createRandom(); + const walletConfig: WalletConfig = { + address: newWallet.address, + privateKey: newWallet.privateKey + }; + await fs.promises.writeFile(filePath, JSON.stringify(walletConfig)); + wallet = newWallet; + } + + return wallet; +} + +const wallet = getOrCreateWallet(jsonPath).then(async wallet => { + console.log(`Your Wallet Address: ${wallet.address}`); + console.log(`Your Private Key: ${wallet.privateKey.substring(2)}`); + saveEnvFiles(wallet.address, wallet.privateKey.substring(2)); + saveWalletFile(wallet.address, wallet.privateKey.substring(2), jsonPath); + await callFaucet(wallet.address); +}); diff --git a/yarn.lock b/yarn.lock index 60e981d7..f04fef9c 100644 --- a/yarn.lock +++ b/yarn.lock @@ -11030,6 +11030,25 @@ __metadata: languageName: node linkType: hard +"solc@npm:0.8.7": + version: 0.8.7 + resolution: "solc@npm:0.8.7" + dependencies: + command-exists: ^1.2.8 + commander: 3.0.2 + follow-redirects: ^1.12.1 + fs-extra: ^0.30.0 + js-sha3: 0.8.0 + memorystream: ^0.3.1 + require-from-string: ^2.0.0 + semver: ^5.5.0 + tmp: 0.0.33 + bin: + solcjs: solcjs + checksum: 3efde9e07d92be5850e19e3a660b6c05cf403263438d02b1cbcd2428c66bed9bfb3e42e58f8232e6deee8ef557c3f53e45182f5a04d13b72b47607a89686f614 + languageName: node + linkType: hard + "solidity-coverage@npm:^0.7.20": version: 0.7.20 resolution: "solidity-coverage@npm:0.7.20" @@ -13179,6 +13198,7 @@ __metadata: hardhat: 2.12.6 inquirer: ^8.2.4 mocha: ^10.2.0 + solc: 0.8.7 ts-mocha: ^10.0.0 ts-node: 10.8.1 typechain: ^8.0.0 From 70f6d2183a284fc700b4c7c91bdfebd2b9a6370e Mon Sep 17 00:00:00 2001 From: Andres Martin Aiello <50411235+andresaiello@users.noreply.github.com> Date: Wed, 12 Apr 2023 11:40:27 -0300 Subject: [PATCH 063/115] Publish npm packages to zetaswapv2 (#79) --- packages/addresses-tools/package.json | 1 - packages/addresses/package.json | 2 +- packages/zevm-example-contracts/package.json | 2 -- packages/zevm-protocol-contracts/package.json | 4 ---- yarn.lock | 4 ---- 5 files changed, 1 insertion(+), 12 deletions(-) diff --git a/packages/addresses-tools/package.json b/packages/addresses-tools/package.json index 0d1f0d92..d98f9523 100644 --- a/packages/addresses-tools/package.json +++ b/packages/addresses-tools/package.json @@ -2,7 +2,6 @@ "name": "@zetachain/addresses-tools", "version": "0.0.1", "license": "MIT", - "private": true, "author": "zetachain", "publishConfig": { "access": "public", diff --git a/packages/addresses/package.json b/packages/addresses/package.json index 728c5a71..dcf7e4f0 100644 --- a/packages/addresses/package.json +++ b/packages/addresses/package.json @@ -1,6 +1,6 @@ { "name": "@zetachain/addresses", - "version": "0.0.8", + "version": "0.0.9", "license": "MIT", "author": "zetachain", "publishConfig": { diff --git a/packages/zevm-example-contracts/package.json b/packages/zevm-example-contracts/package.json index 929ce0f5..1b7990b4 100644 --- a/packages/zevm-example-contracts/package.json +++ b/packages/zevm-example-contracts/package.json @@ -2,7 +2,6 @@ "name": "@zetachain/zevm-example-contracts", "version": "0.0.1", "license": "MIT", - "private": true, "author": "zetachain", "publishConfig": { "access": "public", @@ -34,7 +33,6 @@ "@zetachain/addresses": "workspace:^", "@zetachain/addresses-tools": "workspace:^", "@zetachain/interfaces": "workspace:^", - "@zetachain/protocol-contracts": "workspace:^", "@zetachain/zevm-protocol-contracts": "workspace:^", "ethers": "5.6.8" } diff --git a/packages/zevm-protocol-contracts/package.json b/packages/zevm-protocol-contracts/package.json index ee7fa3c2..2cbec051 100644 --- a/packages/zevm-protocol-contracts/package.json +++ b/packages/zevm-protocol-contracts/package.json @@ -2,7 +2,6 @@ "name": "@zetachain/zevm-protocol-contracts", "version": "0.0.1", "license": "MIT", - "private": true, "author": "zetachain", "publishConfig": { "access": "public", @@ -31,10 +30,7 @@ "dependencies": { "@openzeppelin/contracts": "4.7.3", "@uniswap/v2-periphery": "1.1.0-beta.0", - "@zetachain/addresses": "workspace:^", "@zetachain/addresses-tools": "workspace:^", - "@zetachain/interfaces": "workspace:^", - "@zetachain/protocol-contracts": "workspace:^", "ethers": "5.6.8" } } diff --git a/yarn.lock b/yarn.lock index f04fef9c..648f1b6e 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2782,7 +2782,6 @@ __metadata: "@zetachain/addresses": "workspace:^" "@zetachain/addresses-tools": "workspace:^" "@zetachain/interfaces": "workspace:^" - "@zetachain/protocol-contracts": "workspace:^" "@zetachain/zevm-protocol-contracts": "workspace:^" ethers: 5.6.8 hardhat-gas-reporter: ^1.0.8 @@ -2797,10 +2796,7 @@ __metadata: dependencies: "@openzeppelin/contracts": 4.7.3 "@uniswap/v2-periphery": 1.1.0-beta.0 - "@zetachain/addresses": "workspace:^" "@zetachain/addresses-tools": "workspace:^" - "@zetachain/interfaces": "workspace:^" - "@zetachain/protocol-contracts": "workspace:^" ethers: 5.6.8 hardhat-gas-reporter: ^1.0.8 solidity-coverage: ^0.7.20 From 73fe6df64cb0c0ed47e524431b8fd01378be8050 Mon Sep 17 00:00:00 2001 From: Andres Martin Aiello <50411235+andresaiello@users.noreply.github.com> Date: Tue, 18 Apr 2023 18:40:30 -0300 Subject: [PATCH 064/115] Add prepublishonly to addressestools (#83) --- packages/addresses-tools/.npmignore | 20 +++++++++++++++++++ packages/addresses-tools/package.json | 5 +++-- .../addresses-tools/src/add-new-network.ts | 4 +++- packages/addresses-tools/src/log-addresses.ts | 4 ++-- 4 files changed, 28 insertions(+), 5 deletions(-) create mode 100644 packages/addresses-tools/.npmignore diff --git a/packages/addresses-tools/.npmignore b/packages/addresses-tools/.npmignore new file mode 100644 index 00000000..371e180e --- /dev/null +++ b/packages/addresses-tools/.npmignore @@ -0,0 +1,20 @@ +# Ignore source files and other development files +src/ +*.ts +*.tsx +*.map +*.spec.* +*.test.* +*.log +*.lock +.editorconfig +.eslintrc* +.prettierrc* +.jest.config.js +tsconfig.json + +# Include the dist folder and other necessary files +!dist/ +!README.md +!LICENSE +!package.json diff --git a/packages/addresses-tools/package.json b/packages/addresses-tools/package.json index d98f9523..91b650f4 100644 --- a/packages/addresses-tools/package.json +++ b/packages/addresses-tools/package.json @@ -1,6 +1,6 @@ { "name": "@zetachain/addresses-tools", - "version": "0.0.1", + "version": "0.0.5", "license": "MIT", "author": "zetachain", "publishConfig": { @@ -9,7 +9,8 @@ }, "main": "src/index.ts", "scripts": { - "tsc:watch": "npx tsc --watch" + "tsc:watch": "npx tsc --watch", + "prepublishOnly": "npx tsc" }, "devDependencies": { "@zetachain/addresses": "workspace:^" diff --git a/packages/addresses-tools/src/add-new-network.ts b/packages/addresses-tools/src/add-new-network.ts index 60ff8be4..1cf8b198 100644 --- a/packages/addresses-tools/src/add-new-network.ts +++ b/packages/addresses-tools/src/add-new-network.ts @@ -1,4 +1,6 @@ -import { addNewNetwork, isZetaNetworkName } from "./addresses.helpers"; +import { isZetaNetworkName } from "@zetachain/addresses"; + +import { addNewNetwork } from "./addresses.helpers"; const name = process.argv[2]; const parsedAddTo = process.argv[3].split(","); diff --git a/packages/addresses-tools/src/log-addresses.ts b/packages/addresses-tools/src/log-addresses.ts index 13e18ace..b8bdf988 100644 --- a/packages/addresses-tools/src/log-addresses.ts +++ b/packages/addresses-tools/src/log-addresses.ts @@ -3,7 +3,7 @@ import { getTestnetList, isZetaNetworkName, ZetaTestnetNetworkName } from "@zeta import { getExplorerUrl } from "./addresses.helpers"; const network = process.argv[2]; -const toFilter = process.argv[3].split(",").map((w) => w.toLowerCase()); +const toFilter = process.argv[3].split(",").map(w => w.toLowerCase()); if (!isZetaNetworkName(network)) { console.error(`Invalid network (${network}).`); @@ -26,7 +26,7 @@ const logAddresses = (zetaNetwork: ZetaTestnetNetworkName) => { console.log( `${capitalizeFirstLetter(name)}: [${address}](${getExplorerUrl({ - customNetworkName: networkName, + customNetworkName: networkName })}address/${address})` ); }); From 724cc0abc9053461e01ecf3aeb60151987e8b64f Mon Sep 17 00:00:00 2001 From: Andres Martin Aiello <50411235+andresaiello@users.noreply.github.com> Date: Wed, 19 Apr 2023 15:05:29 -0300 Subject: [PATCH 065/115] Add prepublishonly to addressestools 2 (#85) * Add prepublishonly to addressestools 2 * update text * remove exit 1 --- .github/workflows/release.yml | 4 ++++ package.json | 1 + packages/addresses-tools/package.json | 2 +- packages/example-contracts/package.json | 1 + packages/interfaces/package.json | 1 + packages/protocol-contracts/package.json | 1 + packages/zeta-app-contracts/package.json | 1 + packages/zevm-example-contracts/package.json | 1 + packages/zevm-protocol-contracts/package.json | 1 + 9 files changed, 12 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 084d0918..b6b3f128 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -23,6 +23,10 @@ jobs: - name: Install Dependencies run: yarn + # This expect to have a script called g:prepublishOnly on every package + - name: Generate dist + run: yarn g:prepublishOnly + - name: Create Release Pull Request or Publish to npm id: changesets uses: changesets/action@v1 diff --git a/package.json b/package.json index 8cba318f..30842c69 100644 --- a/package.json +++ b/package.json @@ -18,6 +18,7 @@ "scripts": { "clean": "yarn workspaces foreach -pv run clean", "compile": "yarn workspaces foreach -pv run compile", + "g:prepublishOnly": "yarn workspaces foreach -pv run prepublishOnly", "lint:fix": "npx eslint . --ext .js,.ts --fix", "lint": "npx eslint . --ext .js,.ts", "slither": "npx ts-node ./scripts/slither.ts", diff --git a/packages/addresses-tools/package.json b/packages/addresses-tools/package.json index 91b650f4..c17d65fd 100644 --- a/packages/addresses-tools/package.json +++ b/packages/addresses-tools/package.json @@ -1,6 +1,6 @@ { "name": "@zetachain/addresses-tools", - "version": "0.0.5", + "version": "0.0.6", "license": "MIT", "author": "zetachain", "publishConfig": { diff --git a/packages/example-contracts/package.json b/packages/example-contracts/package.json index 80a6ef9f..d1f11ce1 100644 --- a/packages/example-contracts/package.json +++ b/packages/example-contracts/package.json @@ -11,6 +11,7 @@ "scripts": { "clean": "npx hardhat clean", "compile": "npx hardhat compile", + "prepublishOnly": "echo 'This package has no prepublishOnly tasks.'", "multi-chain-swap:deploy-local": "ZETA_NETWORK=troy EXECUTE_PROGRAMMATICALLY=true npx hardhat run scripts/multi-chain-swap/deploy.ts --network hardhat", "multi-chain-swap:deploy": "ZETA_NETWORK=athens EXECUTE_PROGRAMMATICALLY=true npx hardhat run scripts/multi-chain-swap/deploy.ts", "lint:fix": "npm run lint:js:fix && npm run lint:sol:fix", diff --git a/packages/interfaces/package.json b/packages/interfaces/package.json index 6d9293a1..99d677ad 100644 --- a/packages/interfaces/package.json +++ b/packages/interfaces/package.json @@ -8,6 +8,7 @@ "registry": "https://registry.npmjs.org/" }, "scripts": { + "prepublishOnly": "echo 'This package has no prepublishOnly tasks.'", "tsc:watch": "npx tsc --watch" } } diff --git a/packages/protocol-contracts/package.json b/packages/protocol-contracts/package.json index f1b8081d..fde81f91 100644 --- a/packages/protocol-contracts/package.json +++ b/packages/protocol-contracts/package.json @@ -11,6 +11,7 @@ "clean": "npx hardhat clean", "compile": "npx hardhat compile", "deploy": "EXECUTE_PROGRAMMATICALLY=true npx hardhat run scripts/deploy.ts", + "prepublishOnly": "echo 'This package has no prepublishOnly tasks.'", "deploy-local": "ZETA_NETWORK=troy EXECUTE_PROGRAMMATICALLY=true npx hardhat run scripts/deploy.ts --network hardhat", "lint:fix": "npm run lint:js:fix && npm run lint:sol:fix", "lint:js:fix": "eslint --ext .js,.ts . --fix", diff --git a/packages/zeta-app-contracts/package.json b/packages/zeta-app-contracts/package.json index abfd846e..67c47de6 100644 --- a/packages/zeta-app-contracts/package.json +++ b/packages/zeta-app-contracts/package.json @@ -11,6 +11,7 @@ "scripts": { "clean": "npx hardhat clean", "compile": "npx hardhat compile", + "prepublishOnly": "echo 'This package has no prepublishOnly tasks.'", "lint:fix": "npm run lint:js:fix && npm run lint:sol:fix", "lint:js:fix": "eslint --ext .js,.ts . --fix", "lint:js": "eslint --ext .js,.ts .", diff --git a/packages/zevm-example-contracts/package.json b/packages/zevm-example-contracts/package.json index 1b7990b4..eaae7ebd 100644 --- a/packages/zevm-example-contracts/package.json +++ b/packages/zevm-example-contracts/package.json @@ -10,6 +10,7 @@ "scripts": { "clean": "npx hardhat clean", "compile": "npx hardhat compile", + "prepublishOnly": "echo 'This package has no prepublishOnly tasks.'", "multi-chain-swap:deploy-local": "ZETA_NETWORK=troy EXECUTE_PROGRAMMATICALLY=true npx hardhat run scripts/multi-chain-swap/deploy.ts --network hardhat", "multi-chain-swap:deploy": "ZETA_NETWORK=athens EXECUTE_PROGRAMMATICALLY=true npx hardhat run scripts/multi-chain-swap/deploy.ts", "lint:fix": "npm run lint:js:fix && npm run lint:sol:fix", diff --git a/packages/zevm-protocol-contracts/package.json b/packages/zevm-protocol-contracts/package.json index 2cbec051..a327952f 100644 --- a/packages/zevm-protocol-contracts/package.json +++ b/packages/zevm-protocol-contracts/package.json @@ -10,6 +10,7 @@ "scripts": { "clean": "npx hardhat clean", "compile": "npx hardhat compile", + "prepublishOnly": "echo 'This package has no prepublishOnly tasks.'", "multi-chain-swap:deploy-local": "ZETA_NETWORK=troy EXECUTE_PROGRAMMATICALLY=true npx hardhat run scripts/multi-chain-swap/deploy.ts --network hardhat", "multi-chain-swap:deploy": "ZETA_NETWORK=athens EXECUTE_PROGRAMMATICALLY=true npx hardhat run scripts/multi-chain-swap/deploy.ts", "lint:fix": "npm run lint:js:fix && npm run lint:sol:fix", From 2ee3bd1bbef78d93a48b76abdd354cc9a08ccd51 Mon Sep 17 00:00:00 2001 From: Andres Martin Aiello <50411235+andresaiello@users.noreply.github.com> Date: Wed, 19 Apr 2023 15:47:15 -0300 Subject: [PATCH 066/115] Add prepublishonly to addressestools 3 (#86) --- packages/addresses-tools/.npmignore | 1 - packages/addresses-tools/package.json | 9 +++++++-- packages/addresses-tools/src/index.ts | 1 + 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/packages/addresses-tools/.npmignore b/packages/addresses-tools/.npmignore index 371e180e..c8886364 100644 --- a/packages/addresses-tools/.npmignore +++ b/packages/addresses-tools/.npmignore @@ -1,6 +1,5 @@ # Ignore source files and other development files src/ -*.ts *.tsx *.map *.spec.* diff --git a/packages/addresses-tools/package.json b/packages/addresses-tools/package.json index c17d65fd..246c382b 100644 --- a/packages/addresses-tools/package.json +++ b/packages/addresses-tools/package.json @@ -1,13 +1,18 @@ { "name": "@zetachain/addresses-tools", - "version": "0.0.6", + "version": "0.0.7", "license": "MIT", "author": "zetachain", "publishConfig": { "access": "public", "registry": "https://registry.npmjs.org/" }, - "main": "src/index.ts", + "main": "./dist/index.js", + "module": "./dist/index.js", + "types": "./dist/index.d.ts", + "files": [ + "dist" + ], "scripts": { "tsc:watch": "npx tsc --watch", "prepublishOnly": "npx tsc" diff --git a/packages/addresses-tools/src/index.ts b/packages/addresses-tools/src/index.ts index 57e3950d..fca9c8a4 100644 --- a/packages/addresses-tools/src/index.ts +++ b/packages/addresses-tools/src/index.ts @@ -1 +1,2 @@ export * from "./addresses.helpers"; +export * from "./networks"; From 21ae16526b91d70cff8c2a7deaf0ff7df4dd489e Mon Sep 17 00:00:00 2001 From: Denis Fadeev Date: Tue, 2 May 2023 19:42:45 +0400 Subject: [PATCH 067/115] chore: replace Alchemy with Ankr RPC (#89) chore: replace alchemy with ankr rpc --- packages/addresses-tools/src/networks.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/addresses-tools/src/networks.ts b/packages/addresses-tools/src/networks.ts index 89717b1e..4665cc19 100644 --- a/packages/addresses-tools/src/networks.ts +++ b/packages/addresses-tools/src/networks.ts @@ -38,7 +38,7 @@ export const getHardhatConfigNetworks = (PRIVATE_KEYS: string[]): NetworksUserCo chainId: 1337, forking: { blockNumber: 14672712, - url: `https://eth-mainnet.alchemyapi.io/v2/${process.env.ALCHEMY_API_KEY_MAINNET}`, + url: `https://rpc.ankr.com/eth`, }, }, "klaytn-baobab": { From 062b62895718655eaeef438c8a43e266235f5ef8 Mon Sep 17 00:00:00 2001 From: Andres Martin Aiello <50411235+andresaiello@users.noreply.github.com> Date: Thu, 4 May 2023 13:45:19 -0300 Subject: [PATCH 068/115] Deploy MultiOutput example (#91) --- .../scripts/multi-output/deploy.ts | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 packages/zevm-example-contracts/scripts/multi-output/deploy.ts diff --git a/packages/zevm-example-contracts/scripts/multi-output/deploy.ts b/packages/zevm-example-contracts/scripts/multi-output/deploy.ts new file mode 100644 index 00000000..82070567 --- /dev/null +++ b/packages/zevm-example-contracts/scripts/multi-output/deploy.ts @@ -0,0 +1,19 @@ +import { ethers } from "hardhat"; + +import { ZetaMultiOutput, ZetaMultiOutput__factory } from "../../typechain-types"; +import { SYSTEM_CONTRACT } from "../systemConstants"; + +const main = async () => { + console.log(`Deploying MultiOutput...`); + + const Factory = (await ethers.getContractFactory("ZetaMultiOutput")) as ZetaMultiOutput__factory; + const contract = (await Factory.deploy(SYSTEM_CONTRACT)) as ZetaMultiOutput; + await contract.deployed(); + + console.log("Deployed MultiOutput. Address:", contract.address); +}; + +main().catch(error => { + console.error(error); + process.exit(1); +}); From 6273dadd8cc9b862ab5b48b0355c510a3af26c57 Mon Sep 17 00:00:00 2001 From: aldapp7 <112641026+aldapp7@users.noreply.github.com> Date: Fri, 5 May 2023 15:39:43 +0100 Subject: [PATCH 069/115] ERC20custody contract (#75) * feat: erc20custody contract * fix: small fixes * fix: review feedback * feat: add fee on token transfer handling * fix: some more fixes * feat: safe transfers --- .../contracts/ERC20Custody.sol | 197 ++++++++++++++++++ 1 file changed, 197 insertions(+) create mode 100644 packages/protocol-contracts/contracts/ERC20Custody.sol diff --git a/packages/protocol-contracts/contracts/ERC20Custody.sol b/packages/protocol-contracts/contracts/ERC20Custody.sol new file mode 100644 index 00000000..8afae8b3 --- /dev/null +++ b/packages/protocol-contracts/contracts/ERC20Custody.sol @@ -0,0 +1,197 @@ +// SPDX-License-Identifier: MIT +// v1.0, 2023-01-10 +pragma solidity 0.8.7; + +import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; +import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol"; + +/// @title ERC20Custody. +/// @notice ERC20Custody for depositing ERC20 assets into ZetaChain and making operations with them. +contract ERC20Custody { + using SafeERC20 for IERC20; + + error NotWhitelisted(); + error NotPaused(); + error InvalidSender(); + error InvalidTSSUpdater(); + error ZeroAddress(); + error IsPaused(); + error ZetaMaxFeeExceeded(); + error ZeroFee(); + + /// @notice If custody operations are paused. + bool public paused; + /// @notice TSSAddress is the TSS address collectively possessed by Zeta blockchain validators. + address public TSSAddress; + /// @notice Threshold Signature Scheme (TSS) [GG20] is a multi-sig ECDSA/EdDSA protocol. + address public TSSAddressUpdater; + /// @notice Current zeta fee for depositing funds into ZetaChain. + uint256 public zetaFee; + /// @notice Maximum zeta fee for transaction. + uint256 immutable public zetaMaxFee; + /// @notice Zeta ERC20 token . + IERC20 immutable public zeta; + /// @notice Mapping of whitelisted token => true/false. + mapping(IERC20 => bool) public whitelisted; + + event Paused(address sender); + event Unpaused(address sender); + event Whitelisted(IERC20 indexed asset); + event Unwhitelisted(IERC20 indexed asset); + event Deposited(bytes recipient, IERC20 indexed asset, uint256 amount, bytes message); + event Withdrawn(address indexed recipient, IERC20 indexed asset, uint256 amount); + event RenouncedTSSUpdater(address TSSAddressUpdater_); + event UpdatedTSSAddress(address TSSAddress_); + event UpdatedZetaFee(uint256 zetaFee_); + + /** + * @dev Only TSS address allowed modifier. + */ + modifier onlyTSS() { + if (msg.sender != TSSAddress) { + revert InvalidSender(); + } + _; + } + + /** + * @dev Only TSS address updater allowed modifier. + */ + modifier onlyTSSUpdater() { + if (msg.sender != TSSAddressUpdater) { + revert InvalidTSSUpdater(); + } + _; + } + + constructor(address TSSAddress_, address TSSAddressUpdater_, uint256 zetaFee_, uint256 zetaMaxFee_, IERC20 zeta_) { + TSSAddress = TSSAddress_; + TSSAddressUpdater = TSSAddressUpdater_; + zetaFee = zetaFee_; + zeta = zeta_; + zetaMaxFee = zetaMaxFee_; + } + + /** + * @dev Update the TSSAddress in case of Zeta blockchain validator nodes churn. + * @param TSSAddress_, new tss address. + */ + function updateTSSAddress(address TSSAddress_) external onlyTSSUpdater { + if (TSSAddress_ == address(0)) { + revert ZeroAddress(); + } + TSSAddress = TSSAddress_; + emit UpdatedTSSAddress(TSSAddress_); + } + + /** + * @dev Update zeta fee + * @param zetaFee_, new zeta fee + */ + function updateZetaFee(uint256 zetaFee_) external onlyTSS { + if (zetaFee_ == 0) { + revert ZeroFee(); + } + if (zetaFee_ > zetaMaxFee) { + revert ZetaMaxFeeExceeded(); + } + zetaFee = zetaFee_; + emit UpdatedZetaFee(zetaFee_); + } + + /** + * @dev Change the ownership of TSSAddressUpdater to the Zeta blockchain TSS nodes. + * Effectively, only Zeta blockchain validators collectively can update TSSAddress afterwards. + */ + function renounceTSSAddressUpdater() external onlyTSSUpdater { + if (TSSAddress == address(0)) { + revert ZeroAddress(); + } + TSSAddressUpdater = TSSAddress; + emit RenouncedTSSUpdater(msg.sender); + } + + /** + * @dev Pause custody operations. + */ + function pause() external onlyTSSUpdater { + if (paused) { + revert IsPaused(); + } + if (TSSAddress == address(0)) { + revert ZeroAddress(); + } + paused = true; + emit Paused(msg.sender); + } + + /** + * @dev Unpause custody operations. + */ + function unpause() external onlyTSSUpdater { + if (!paused) { + revert NotPaused(); + } + paused = false; + emit Unpaused(msg.sender); + } + + /** + * @dev Whitelist asset. + * @param asset, ERC20 asset. + */ + function whitelist(IERC20 asset) external onlyTSS { + whitelisted[asset] = true; + emit Whitelisted(asset); + } + + /** + * @dev Unwhitelist asset. + * @param asset, ERC20 asset. + */ + function unwhitelist(IERC20 asset) external onlyTSS { + whitelisted[asset] = false; + emit Unwhitelisted(asset); + } + + /** + * @dev Deposit asset amount to recipient with message that encodes additional zetachain evm call or message. + * @param recipient, recipient address. + * @param asset, ERC20 asset. + * @param amount, asset amount. + * @param message, bytes message or encoded zetechain call. + */ + function deposit(bytes calldata recipient, IERC20 asset, uint256 amount, bytes calldata message) external { + if (paused) { + revert IsPaused(); + } + if (!whitelisted[asset]) { + revert NotWhitelisted(); + } + if (zetaFee != 0 && address(zeta) != address(0)) { + zeta.safeTransferFrom(msg.sender, TSSAddress, zetaFee); + } + uint256 oldBalance = asset.balanceOf(address(this)); + asset.safeTransferFrom(msg.sender, address(this), amount); + // In case if there is a fee on a token transfer, we might not receive a full exepected amount + // and we need to correctly process that, o we subtract an old balance from a new balance, which should be an actual received amount. + emit Deposited(recipient, asset, asset.balanceOf(address(this)) - oldBalance, message); + } + + /** + * @dev Withdraw asset amount to recipient by custody TSS owner. + * @param recipient, recipient address. + * @param asset, ERC20 asset. + * @param amount, asset amount. + */ + function withdraw(address recipient, IERC20 asset, uint256 amount) external onlyTSS { + if (paused) { + revert IsPaused(); + } + if (!whitelisted[asset]) { + revert NotWhitelisted(); + } + IERC20(asset).safeTransfer(recipient, amount); + emit Withdrawn(recipient, asset, amount); + } +} From 2ef323bc70cd6f84c67e7c290d94b76ecdfbec78 Mon Sep 17 00:00:00 2001 From: Denis Fadeev Date: Fri, 5 May 2023 18:58:07 +0400 Subject: [PATCH 070/115] chore: compile TS before publishing (#88) --- packages/addresses/.npmignore | 8 +++++++- packages/addresses/package.json | 4 ++-- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/packages/addresses/.npmignore b/packages/addresses/.npmignore index 25f62ead..539a5de3 100644 --- a/packages/addresses/.npmignore +++ b/packages/addresses/.npmignore @@ -21,4 +21,10 @@ test .vscode # git -.git \ No newline at end of file +.git + +# Include the dist folder and other necessary files +!dist/ +!README.md +!LICENSE +!package.json diff --git a/packages/addresses/package.json b/packages/addresses/package.json index dcf7e4f0..600f8c0f 100644 --- a/packages/addresses/package.json +++ b/packages/addresses/package.json @@ -21,10 +21,10 @@ }, "scripts": { "tsc:watch": "npx tsc --watch", - "prepublishOnly": "vite build" + "prepublishOnly": "npx tsc" }, "devDependencies": { "vite": "^3.1.0", "vite-plugin-dts": "^1.4.1" } -} +} \ No newline at end of file From 0f079f886e20bf9ea45d18011607ac78e36536ea Mon Sep 17 00:00:00 2001 From: Andres Martin Aiello <50411235+andresaiello@users.noreply.github.com> Date: Mon, 8 May 2023 15:22:12 -0300 Subject: [PATCH 071/115] Deploy zeta token consumer uniswap v3 (#92) --- packages/addresses/src/addresses.athens.json | 23 +++++++---- packages/addresses/src/addresses.helpers.ts | 6 ++- ... deterministic-deploy-zeta-consumer-v2.ts} | 0 .../deterministic-deploy-zeta-consumer-v3.ts | 41 +++++++++++++++++++ 4 files changed, 60 insertions(+), 10 deletions(-) rename packages/protocol-contracts/scripts/{deterministic-deploy-zeta-consumer.ts => deterministic-deploy-zeta-consumer-v2.ts} (100%) create mode 100644 packages/protocol-contracts/scripts/deterministic-deploy-zeta-consumer-v3.ts diff --git a/packages/addresses/src/addresses.athens.json b/packages/addresses/src/addresses.athens.json index 2a12a669..6fe05a65 100644 --- a/packages/addresses/src/addresses.athens.json +++ b/packages/addresses/src/addresses.athens.json @@ -21,7 +21,8 @@ "zetaSwap": "", "zetaSwapBtcInbound": "", "zetaToken": "0x000080383847bd75f91c168269aa74004877592f", - "zetaTokenConsumerUniV2": "0xa67b03930eb53d0462dCc0835e97964C062042fb" + "zetaTokenConsumerUniV2": "0xa67b03930eb53d0462dCc0835e97964C062042fb", + "zetaTokenConsumerUniV3": "" }, "goerli": { "connector": "0x00007d0BA516a2bA02D77907d3a1348C1187Ae62", @@ -45,7 +46,8 @@ "zetaSwap": "", "zetaSwapBtcInbound": "", "zetaToken": "0xCc7bb2D219A0FC08033E130629C2B854b7bA9195", - "zetaTokenConsumerUniV2": "0xDDB1C86c69f258F6d33377a8725404E4393326bB" + "zetaTokenConsumerUniV2": "0xDDB1C86c69f258F6d33377a8725404E4393326bB", + "zetaTokenConsumerUniV3": "" }, "polygon-mumbai": { "connector": "0x000054d3A0Bc83Ec7808F52fCdC28A96c89F6C5c", @@ -69,7 +71,8 @@ "zetaSwap": "", "zetaSwapBtcInbound": "", "zetaToken": "0x000080383847bd75f91c168269aa74004877592f", - "zetaTokenConsumerUniV2": "" + "zetaTokenConsumerUniV2": "", + "zetaTokenConsumerUniV3": "0xCa7185cA7AB06fA60060d4D65C50b6883cc70419" }, "ropsten": { "connector": "", @@ -93,7 +96,8 @@ "zetaSwap": "", "zetaSwapBtcInbound": "", "zetaToken": "", - "zetaTokenConsumerUniV2": "" + "zetaTokenConsumerUniV2": "", + "zetaTokenConsumerUniV3": "" }, "klaytn-baobab": { "connector": "0x000054d3A0Bc83Ec7808F52fCdC28A96c89F6C5c", @@ -116,7 +120,8 @@ "zetaSwap": "", "zetaSwapBtcInbound": "", "zetaToken": "0x000080383847bD75F91c168269Aa74004877592f", - "zetaTokenConsumerUniV2": "" + "zetaTokenConsumerUniV2": "", + "zetaTokenConsumerUniV3": "" }, "athens": { "connector": "", @@ -140,7 +145,8 @@ "zetaSwap": "0x71Ec5c05Aa669c4922569c1D33F7a81aaa218138", "zetaSwapBtcInbound": "0x79c73Ba355f84feFFcDA2D2Cd4D61b9c795919Cc", "zetaToken": "", - "zetaTokenConsumerUniV2": "" + "zetaTokenConsumerUniV2": "", + "zetaTokenConsumerUniV3": "" }, "bitcoin-test": { "connector": "", @@ -164,6 +170,7 @@ "zetaSwap": "", "zetaSwapBtcInbound": "", "zetaToken": "", - "zetaTokenConsumerUniV2": "" + "zetaTokenConsumerUniV2": "", + "zetaTokenConsumerUniV3": "" } -} +} \ No newline at end of file diff --git a/packages/addresses/src/addresses.helpers.ts b/packages/addresses/src/addresses.helpers.ts index d92266d5..046e2e4f 100644 --- a/packages/addresses/src/addresses.helpers.ts +++ b/packages/addresses/src/addresses.helpers.ts @@ -24,7 +24,8 @@ export type ZetaAddress = | "zetaSwap" | "zetaSwapBtcInbound" | "zetaToken" - | "zetaTokenConsumerUniV2"; + | "zetaTokenConsumerUniV2" + | "zetaTokenConsumerUniV3"; export type NetworkAddresses = Record; const zetaAddresses: Record = { @@ -49,7 +50,8 @@ const zetaAddresses: Record = { zetaSwap: true, zetaSwapBtcInbound: true, zetaToken: true, - zetaTokenConsumerUniV2: true + zetaTokenConsumerUniV2: true, + zetaTokenConsumerUniV3: true }; export const isZetaAddress = (a: string | undefined): a is ZetaAddress => Boolean(zetaAddresses[a as ZetaAddress]); diff --git a/packages/protocol-contracts/scripts/deterministic-deploy-zeta-consumer.ts b/packages/protocol-contracts/scripts/deterministic-deploy-zeta-consumer-v2.ts similarity index 100% rename from packages/protocol-contracts/scripts/deterministic-deploy-zeta-consumer.ts rename to packages/protocol-contracts/scripts/deterministic-deploy-zeta-consumer-v2.ts diff --git a/packages/protocol-contracts/scripts/deterministic-deploy-zeta-consumer-v3.ts b/packages/protocol-contracts/scripts/deterministic-deploy-zeta-consumer-v3.ts new file mode 100644 index 00000000..e596e804 --- /dev/null +++ b/packages/protocol-contracts/scripts/deterministic-deploy-zeta-consumer-v3.ts @@ -0,0 +1,41 @@ +import { isNetworkName } from "@zetachain/addresses"; +import { saveAddress } from "@zetachain/addresses-tools"; +import { ZetaTokenConsumerUniV3__factory } from "@zetachain/interfaces/typechain-types"; +import { ethers, network } from "hardhat"; + +import { getAddress } from "../lib/address.helpers"; + +export async function deterministicDeployZetaConsumer() { + if (!isNetworkName(network.name)) { + throw new Error(`network.name: ${network.name} isn't supported.`); + } + + const accounts = await ethers.getSigners(); + const [signer] = accounts; + + const zetaToken = getAddress("zetaToken"); + const uniswapV3Router = getAddress("uniswapV3Router"); + const quoter = getAddress("uniswapV3Quoter"); + const WETH9Address = getAddress("weth9"); + const zetaPoolFee = 500; + const tokenPoolFee = 3000; + + console.log([zetaToken, uniswapV3Router, quoter, WETH9Address, zetaPoolFee, tokenPoolFee]); + + const Factory = new ZetaTokenConsumerUniV3__factory(signer); + const contract = await Factory.deploy(zetaToken, uniswapV3Router, quoter, WETH9Address, zetaPoolFee, tokenPoolFee); + await contract.deployed(); + const address = contract.address; + + saveAddress("zetaTokenConsumerUniV3", address); + console.log("Deployed ZetaConsumer. Address:", address); +} + +if (!process.env.EXECUTE_PROGRAMMATICALLY) { + deterministicDeployZetaConsumer() + .then(() => process.exit(0)) + .catch(error => { + console.error(error); + process.exit(1); + }); +} From 4993ebe863881489ca88df4bb372d83f3a4de8ec Mon Sep 17 00:00:00 2001 From: Andres Martin Aiello <50411235+andresaiello@users.noreply.github.com> Date: Fri, 19 May 2023 10:59:55 -0300 Subject: [PATCH 072/115] Cleanup protocol-contracts repo (#93) * Cleanup protocol-contracts repo * update examples pkg to use protocol repo * update zeta-app pkg to use protocol repo * update zevm examples pkg to use protocol repo * remove interfaces pkg * removed protocol contracts from Dockerfile --------- Co-authored-by: CharlieM <31941002+CharlieMc0@users.noreply.github.com> --- Dockerfile | 10 +- packages/addresses/package.json | 2 +- .../cross-chain-counter/CrossChainCounter.sol | 20 +- .../test/CounterZetaConnectorMock.sol | 2 +- .../cross-chain-message/CrossChainMessage.sol | 22 +- .../test/CrossChainMessageConnector.sol | 2 +- .../CrossChainWarriors.sol | 28 +- .../CrossChainWarriorsZetaConnectorMock.sol | 2 +- .../multi-chain-swap/MultiChainSwap.sol | 2 +- .../MultiChainSwapTrident.strategy.sol | 18 +- .../MultiChainSwapUniV3.strategy.sol | 18 +- .../test/MultiChainSwapZetaConnector.sol | 2 +- .../shared/ImmutableCreate2Factory.sol | 2 +- .../contracts/shared/ZetaTestContracts.sol | 2 +- packages/example-contracts/package.json | 6 +- .../test/CrossChainMessage.spec.ts | 4 +- .../test/MultiChainSwapUniswapV3.spec.ts | 18 +- .../example-contracts/test/test.helpers.ts | 2 +- packages/interfaces/.gitignore | 2 - packages/interfaces/README.md | 3 - .../contracts/access/Ownable.sol/Ownable.json | 54 - .../security/Pausable.sol/Pausable.json | 41 - .../token/ERC20/ERC20.sol/ERC20.json | 288 ---- .../token/ERC20/IERC20.sol/IERC20.json | 185 --- .../ERC20Burnable.sol/ERC20Burnable.json | 303 ---- .../IERC20Metadata.sol/IERC20Metadata.json | 224 --- .../draft-IERC20Permit.sol/IERC20Permit.json | 77 - .../IUniswapV2Factory.json | 165 -- .../IUniswapV2Pair.sol/IUniswapV2Pair.json | 653 -------- .../UniswapV2Router02.json | 973 ----------- .../interfaces/IERC20.sol/IERC20.json | 224 --- .../IUniswapV2Router01.json | 751 --------- .../IUniswapV2Router02.json | 953 ----------- .../contracts/interfaces/IWETH.sol/IWETH.json | 46 - .../IUniswapV3SwapCallback.json | 25 - .../interfaces/IQuoter.sol/IQuoter.json | 128 -- .../ISwapRouter.sol/ISwapRouter.json | 239 --- .../ImmutableCreate2Factory.json | 113 -- .../ImmutableCreate2Factory.sol/Ownable.json | 16 - .../json/contracts/Zeta.eth.sol/ZetaEth.json | 283 ---- .../Zeta.non-eth.sol/ZetaNonEth.json | 504 ------ .../ZetaConnectorBase.json | 542 ------ .../ZetaConnectorEth.json | 555 ------- .../ZetaConnectorNonEth.json | 581 ------- .../ZetaInteractor.sol/ZetaInteractor.json | 174 -- .../WETH9.json | 53 - .../ZetaTokenConsumerTrident.json | 300 ---- .../ZetaTokenConsumerTridentErrors.json | 17 - .../ZetaTokenConsumerUniV2.json | 250 --- .../ZetaTokenConsumerUniV2Errors.json | 7 - .../WETH9.json | 15 - .../ZetaTokenConsumerUniV3.json | 336 ---- .../ZetaTokenConsumerUniV3Errors.json | 17 - .../ConnectorErrors.sol/ConnectorErrors.json | 62 - .../ConcentratedLiquidityPoolFactory.json | 36 - .../TridentIPoolRouter.sol/IPoolRouter.json | 229 --- .../interfaces/ZetaErrors.sol/ZetaErrors.json | 56 - .../ZetaInteractorErrors.json | 28 - .../ZetaInterfaces.sol/ZetaCommonErrors.json | 7 - .../ZetaInterfaces.sol/ZetaConnector.json | 47 - .../ZetaInterfaces.sol/ZetaReceiver.json | 87 - .../ZetaInterfaces.sol/ZetaTokenConsumer.json | 211 --- .../ZetaNonEthInterface.json | 226 --- .../Ownable2Step.sol/Ownable2Step.json | 93 -- .../INonfungiblePositionManager.json | 431 ----- .../IPoolInitializer.json | 36 - .../ZetaInteractorMock.json | 270 --- .../ZetaReceiverMock.json | 113 -- packages/interfaces/package.json | 14 - .../@openzeppelin/contracts/access/Ownable.ts | 175 -- .../@openzeppelin/contracts/access/index.ts | 4 - .../@openzeppelin/contracts/index.ts | 9 - .../contracts/security/Pausable.ts | 111 -- .../@openzeppelin/contracts/security/index.ts | 4 - .../contracts/token/ERC20/ERC20.ts | 444 ----- .../contracts/token/ERC20/IERC20.ts | 322 ---- .../token/ERC20/extensions/ERC20Burnable.ts | 507 ------ .../token/ERC20/extensions/IERC20Metadata.ts | 364 ----- .../draft-IERC20Permit.sol/IERC20Permit.ts | 177 -- .../draft-IERC20Permit.sol/index.ts | 4 - .../contracts/token/ERC20/extensions/index.ts | 7 - .../contracts/token/ERC20/index.ts | 7 - .../@openzeppelin/contracts/token/index.ts | 5 - .../typechain-types/@openzeppelin/index.ts | 5 - .../typechain-types/@uniswap/index.ts | 11 - .../@uniswap/v2-core/contracts/index.ts | 5 - .../contracts/interfaces/IUniswapV2Factory.ts | 316 ---- .../contracts/interfaces/IUniswapV2Pair.ts | 944 ----------- .../v2-core/contracts/interfaces/index.ts | 5 - .../typechain-types/@uniswap/v2-core/index.ts | 5 - .../contracts/UniswapV2Router02.ts | 1446 ----------------- .../@uniswap/v2-periphery/contracts/index.ts | 6 - .../contracts/interfaces/IERC20.ts | 364 ----- .../interfaces/IUniswapV2Router01.ts | 1128 ------------- .../interfaces/IUniswapV2Router02.ts | 1446 ----------------- .../contracts/interfaces/IWETH.ts | 159 -- .../contracts/interfaces/index.ts | 7 - .../@uniswap/v2-periphery/index.ts | 5 - .../@uniswap/v3-core/contracts/index.ts | 5 - .../callback/IUniswapV3SwapCallback.ts | 117 -- .../contracts/interfaces/callback/index.ts | 4 - .../v3-core/contracts/interfaces/index.ts | 5 - .../typechain-types/@uniswap/v3-core/index.ts | 5 - .../@uniswap/v3-periphery/contracts/index.ts | 5 - .../contracts/interfaces/IQuoter.ts | 263 --- .../contracts/interfaces/ISwapRouter.ts | 364 ----- .../contracts/interfaces/index.ts | 5 - .../@uniswap/v3-periphery/index.ts | 5 - packages/interfaces/typechain-types/common.ts | 44 - .../ImmutableCreate2Factory.ts | 267 --- .../ImmutableCreate2Factory.sol/Ownable.ts | 104 -- .../ImmutableCreate2Factory.sol/index.ts | 5 - .../contracts/Zeta.eth.sol/ZetaEth.ts | 444 ----- .../contracts/Zeta.eth.sol/index.ts | 4 - .../contracts/Zeta.non-eth.sol/ZetaNonEth.ts | 715 -------- .../contracts/Zeta.non-eth.sol/index.ts | 4 - .../ZetaConnectorBase.ts | 680 -------- .../contracts/ZetaConnector.base.sol/index.ts | 4 - .../ZetaConnector.eth.sol/ZetaConnectorEth.ts | 700 -------- .../contracts/ZetaConnector.eth.sol/index.ts | 4 - .../ZetaConnectorNonEth.ts | 749 --------- .../ZetaConnector.non-eth.sol/index.ts | 4 - .../contracts/ZetaInteractor.ts | 339 ---- .../WETH9.ts | 184 --- .../ZetaTokenConsumerTrident.ts | 417 ----- .../ZetaTokenConsumerTridentErrors.ts | 56 - .../index.ts | 6 - .../ZetaTokenConsumerUniV2.ts | 377 ----- .../ZetaTokenConsumerUniV2Errors.ts | 55 - .../index.ts | 5 - .../WETH9.ts | 99 -- .../ZetaTokenConsumerUniV3.ts | 451 ----- .../ZetaTokenConsumerUniV3Errors.ts | 55 - .../index.ts | 6 - .../typechain-types/contracts/index.ts | 28 - .../contracts/interfaces/ConnectorErrors.ts | 55 - .../ConcentratedLiquidityPoolFactory.ts | 116 -- .../index.ts | 4 - .../TridentIPoolRouter.sol/IPoolRouter.ts | 354 ---- .../TridentIPoolRouter.sol/index.ts | 4 - .../contracts/interfaces/ZetaErrors.ts | 55 - .../interfaces/ZetaInteractorErrors.ts | 55 - .../ZetaInterfaces.sol/ZetaCommonErrors.ts | 55 - .../ZetaInterfaces.sol/ZetaConnector.ts | 129 -- .../ZetaInterfaces.sol/ZetaReceiver.ts | 190 --- .../ZetaInterfaces.sol/ZetaTokenConsumer.ts | 363 ----- .../interfaces/ZetaInterfaces.sol/index.ts | 7 - .../interfaces/ZetaNonEthInterface.ts | 401 ----- .../contracts/interfaces/index.ts | 13 - .../contracts/openzeppelin/Ownable2Step.ts | 249 --- .../contracts/openzeppelin/index.ts | 4 - .../INonfungiblePositionManager.ts | 566 ------- .../IPoolInitializer.ts | 122 -- .../TestUniswapV3Contracts.sol/index.ts | 5 - .../contracts/testing/ZetaInteractorMock.ts | 458 ------ .../contracts/testing/ZetaReceiverMock.ts | 232 --- .../contracts/testing/index.ts | 7 - .../contracts/access/Ownable__factory.ts | 78 - .../@openzeppelin/contracts/access/index.ts | 4 - .../@openzeppelin/contracts/index.ts | 6 - .../contracts/security/Pausable__factory.ts | 65 - .../@openzeppelin/contracts/security/index.ts | 4 - .../contracts/token/ERC20/ERC20__factory.ts | 349 ---- .../contracts/token/ERC20/IERC20__factory.ts | 206 --- .../extensions/ERC20Burnable__factory.ts | 327 ---- .../extensions/IERC20Metadata__factory.ts | 248 --- .../IERC20Permit__factory.ts | 101 -- .../draft-IERC20Permit.sol/index.ts | 4 - .../contracts/token/ERC20/extensions/index.ts | 6 - .../contracts/token/ERC20/index.ts | 6 - .../@openzeppelin/contracts/token/index.ts | 4 - .../factories/@openzeppelin/index.ts | 4 - .../factories/@uniswap/index.ts | 7 - .../@uniswap/v2-core/contracts/index.ts | 4 - .../interfaces/IUniswapV2Factory__factory.ts | 189 --- .../interfaces/IUniswapV2Pair__factory.ts | 677 -------- .../v2-core/contracts/interfaces/index.ts | 5 - .../factories/@uniswap/v2-core/index.ts | 4 - .../contracts/UniswapV2Router02__factory.ts | 1041 ------------ .../@uniswap/v2-periphery/contracts/index.ts | 5 - .../contracts/interfaces/IERC20__factory.ts | 245 --- .../interfaces/IUniswapV2Router01__factory.ts | 775 --------- .../interfaces/IUniswapV2Router02__factory.ts | 977 ----------- .../contracts/interfaces/IWETH__factory.ts | 67 - .../contracts/interfaces/index.ts | 7 - .../factories/@uniswap/v2-periphery/index.ts | 4 - .../@uniswap/v3-core/contracts/index.ts | 4 - .../IUniswapV3SwapCallback__factory.ts | 53 - .../contracts/interfaces/callback/index.ts | 4 - .../v3-core/contracts/interfaces/index.ts | 4 - .../factories/@uniswap/v3-core/index.ts | 4 - .../@uniswap/v3-periphery/contracts/index.ts | 4 - .../contracts/interfaces/IQuoter__factory.ts | 152 -- .../interfaces/ISwapRouter__factory.ts | 263 --- .../contracts/interfaces/index.ts | 5 - .../factories/@uniswap/v3-periphery/index.ts | 4 - .../ImmutableCreate2Factory__factory.ts | 177 -- .../Ownable__factory.ts | 40 - .../ImmutableCreate2Factory.sol/index.ts | 5 - .../Zeta.eth.sol/ZetaEth__factory.ts | 352 ---- .../factories/contracts/Zeta.eth.sol/index.ts | 4 - .../Zeta.non-eth.sol/ZetaNonEth__factory.ts | 576 ------- .../contracts/Zeta.non-eth.sol/index.ts | 4 - .../ZetaConnectorBase__factory.ts | 622 ------- .../contracts/ZetaConnector.base.sol/index.ts | 4 - .../ZetaConnectorEth__factory.ts | 635 -------- .../contracts/ZetaConnector.eth.sol/index.ts | 4 - .../ZetaConnectorNonEth__factory.ts | 661 -------- .../ZetaConnector.non-eth.sol/index.ts | 4 - .../contracts/ZetaInteractor__factory.ts | 198 --- .../WETH9__factory.ts | 74 - ...ZetaTokenConsumerTridentErrors__factory.ts | 45 - .../ZetaTokenConsumerTrident__factory.ts | 384 ----- .../index.ts | 6 - .../ZetaTokenConsumerUniV2Errors__factory.ts | 35 - .../ZetaTokenConsumerUniV2__factory.ts | 326 ---- .../index.ts | 5 - .../WETH9__factory.ts | 36 - .../ZetaTokenConsumerUniV3Errors__factory.ts | 45 - .../ZetaTokenConsumerUniV3__factory.ts | 435 ----- .../index.ts | 6 - .../factories/contracts/index.ts | 16 - .../interfaces/ConnectorErrors__factory.ts | 86 - ...ncentratedLiquidityPoolFactory__factory.ts | 66 - .../index.ts | 4 - .../IPoolRouter__factory.ts | 253 --- .../TridentIPoolRouter.sol/index.ts | 4 - .../interfaces/ZetaErrors__factory.ts | 80 - .../ZetaInteractorErrors__factory.ts | 56 - .../ZetaCommonErrors__factory.ts | 31 - .../ZetaConnector__factory.ts | 71 - .../ZetaReceiver__factory.ts | 111 -- .../ZetaTokenConsumer__factory.ts | 235 --- .../interfaces/ZetaInterfaces.sol/index.ts | 7 - .../ZetaNonEthInterface__factory.ts | 250 --- .../factories/contracts/interfaces/index.ts | 10 - .../openzeppelin/Ownable2Step__factory.ts | 117 -- .../factories/contracts/openzeppelin/index.ts | 4 - .../INonfungiblePositionManager__factory.ts | 461 ------ .../IPoolInitializer__factory.ts | 60 - .../TestUniswapV3Contracts.sol/index.ts | 5 - .../testing/ZetaInteractorMock__factory.ts | 335 ---- .../testing/ZetaReceiverMock__factory.ts | 173 -- .../factories/contracts/testing/index.ts | 6 - .../typechain-types/factories/index.ts | 6 - .../interfaces/typechain-types/hardhat.d.ts | 465 ------ packages/interfaces/typechain-types/index.ts | 100 -- .../.env.example | 0 .../.eslintrc.js | 0 .../.npmignore | 0 .../README.md | 0 .../ZetaTokenConsumerTrident.strategy.sol | 2 +- ...ridentConcentratedLiquidityPoolFactory.sol | 0 .../interfaces/TridentIPoolRouter.sol | 0 .../contracts/testing/TestContracts.sol | 0 .../hardhat.config.ts | 0 .../package.json | 8 +- .../tsconfig.json | 0 .../contracts/ERC20Custody.sol | 197 --- .../contracts/ImmutableCreate2Factory.sol | 215 --- .../protocol-contracts/contracts/Zeta.eth.sol | 13 - .../contracts/Zeta.non-eth.sol | 73 - .../contracts/ZetaConnector.base.sol | 191 --- .../contracts/ZetaConnector.eth.sol | 112 -- .../contracts/ZetaConnector.non-eth.sol | 120 -- .../contracts/ZetaInteractor.sol | 57 - .../ZetaTokenConsumerUniV2.strategy.sol | 161 -- .../ZetaTokenConsumerUniV3.strategy.sol | 182 --- .../contracts/interfaces/ConnectorErrors.sol | 25 - .../contracts/interfaces/ZetaErrors.sol | 25 - .../interfaces/ZetaInteractorErrors.sol | 19 - .../contracts/interfaces/ZetaInterfaces.sol | 108 -- .../interfaces/ZetaNonEthInterface.sol | 13 - .../contracts/openzeppelin/Ownable2Step.sol | 57 - .../testing/TestUniswapV3Contracts.sol | 181 --- .../contracts/testing/ZetaInteractorMock.sol | 21 - .../contracts/testing/ZetaReceiverMock.sol | 18 - .../ImmutableCreate2Factory.helpers.ts | 79 - .../protocol-contracts/lib/address.helpers.ts | 23 - .../lib/contracts.constants.ts | 13 - .../lib/contracts.helpers.ts | 172 -- .../zeta-interactor/ZetaInteractor.helpers.ts | 8 - .../deploy-immutable-create2-factory.ts | 27 - .../scripts/deploy-zeta-connector.ts | 38 - .../scripts/deploy-zeta-token.ts | 38 - packages/protocol-contracts/scripts/deploy.ts | 38 - .../deterministic-deploy-zeta-connector.ts | 63 - .../deterministic-deploy-zeta-consumer-v2.ts | 55 - .../deterministic-deploy-zeta-consumer-v3.ts | 41 - .../deterministic-deploy-zeta-token.ts | 69 - .../scripts/deterministic-deploy.helpers.ts | 42 - .../deterministic-get-salt-zeta-connector.ts | 44 - .../deterministic-get-salt-zeta-token.ts | 46 - .../scripts/send-tss-gas.ts | 26 - .../scripts/set-zeta-token-addresses.ts | 30 - .../scripts/test-zeta-send.ts | 34 - .../scripts/token-approval.ts | 32 - .../scripts/update-tss-address.ts | 41 - .../scripts/update-zeta-connector.ts | 33 - .../scripts/verify-contracts.ts | 53 - .../test/ImmutableCreate2Factory.spec.ts | 128 -- .../test/Zeta.non-eth.spec.ts | 159 -- .../test/ZetaConnector.spec.ts | 872 ---------- .../test/ZetaInteractor.spec.ts | 119 -- .../test/ZetaTokenConsumer.spec.ts | 286 ---- .../protocol-contracts/test/test.helpers.ts | 18 - .../multi-chain-value/MultiChainValue.sol | 6 +- .../test/ZetaConnectorMock.sol | 2 +- .../shared/ImmutableCreate2Factory.sol | 2 +- packages/zeta-app-contracts/package.json | 5 +- .../multi-output/ZetaMultiOutput.sol | 2 +- .../contracts/shared/SwapHelperLib.sol | 2 +- .../contracts/shared/TestSystemContract.sol | 4 +- .../contracts/zeta-swap/ZetaCurveSwapDemo.sol | 4 +- .../contracts/zeta-swap/ZetaSwap.sol | 4 +- .../zeta-swap/ZetaSwapBtcInbound.sol | 2 +- .../zeta-swap/ZetaSwapBtcInboundV2.sol | 4 +- .../contracts/zeta-swap/ZetaSwapV2.sol | 4 +- packages/zevm-example-contracts/package.json | 5 +- packages/zevm-protocol-contracts/.env.example | 2 - packages/zevm-protocol-contracts/.eslintrc.js | 23 - packages/zevm-protocol-contracts/README.md | 16 - .../contracts/interfaces/IZRC20.sol | 31 - .../contracts/interfaces/zContract.sol | 10 - .../contracts/system/SystemContract.sol | 115 -- .../zevm-protocol-contracts/hardhat.config.ts | 46 - packages/zevm-protocol-contracts/package.json | 37 - .../zevm-protocol-contracts/tsconfig.json | 14 - yarn.lock | 64 +- 329 files changed, 123 insertions(+), 47542 deletions(-) delete mode 100644 packages/interfaces/.gitignore delete mode 100644 packages/interfaces/README.md delete mode 100644 packages/interfaces/abi/json/@openzeppelin/contracts/access/Ownable.sol/Ownable.json delete mode 100644 packages/interfaces/abi/json/@openzeppelin/contracts/security/Pausable.sol/Pausable.json delete mode 100644 packages/interfaces/abi/json/@openzeppelin/contracts/token/ERC20/ERC20.sol/ERC20.json delete mode 100644 packages/interfaces/abi/json/@openzeppelin/contracts/token/ERC20/IERC20.sol/IERC20.json delete mode 100644 packages/interfaces/abi/json/@openzeppelin/contracts/token/ERC20/extensions/ERC20Burnable.sol/ERC20Burnable.json delete mode 100644 packages/interfaces/abi/json/@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol/IERC20Metadata.json delete mode 100644 packages/interfaces/abi/json/@openzeppelin/contracts/token/ERC20/extensions/draft-IERC20Permit.sol/IERC20Permit.json delete mode 100644 packages/interfaces/abi/json/@uniswap/v2-core/contracts/interfaces/IUniswapV2Factory.sol/IUniswapV2Factory.json delete mode 100644 packages/interfaces/abi/json/@uniswap/v2-core/contracts/interfaces/IUniswapV2Pair.sol/IUniswapV2Pair.json delete mode 100644 packages/interfaces/abi/json/@uniswap/v2-periphery/contracts/UniswapV2Router02.sol/UniswapV2Router02.json delete mode 100644 packages/interfaces/abi/json/@uniswap/v2-periphery/contracts/interfaces/IERC20.sol/IERC20.json delete mode 100644 packages/interfaces/abi/json/@uniswap/v2-periphery/contracts/interfaces/IUniswapV2Router01.sol/IUniswapV2Router01.json delete mode 100644 packages/interfaces/abi/json/@uniswap/v2-periphery/contracts/interfaces/IUniswapV2Router02.sol/IUniswapV2Router02.json delete mode 100644 packages/interfaces/abi/json/@uniswap/v2-periphery/contracts/interfaces/IWETH.sol/IWETH.json delete mode 100644 packages/interfaces/abi/json/@uniswap/v3-core/contracts/interfaces/callback/IUniswapV3SwapCallback.sol/IUniswapV3SwapCallback.json delete mode 100644 packages/interfaces/abi/json/@uniswap/v3-periphery/contracts/interfaces/IQuoter.sol/IQuoter.json delete mode 100644 packages/interfaces/abi/json/@uniswap/v3-periphery/contracts/interfaces/ISwapRouter.sol/ISwapRouter.json delete mode 100644 packages/interfaces/abi/json/contracts/ImmutableCreate2Factory.sol/ImmutableCreate2Factory.json delete mode 100644 packages/interfaces/abi/json/contracts/ImmutableCreate2Factory.sol/Ownable.json delete mode 100644 packages/interfaces/abi/json/contracts/Zeta.eth.sol/ZetaEth.json delete mode 100644 packages/interfaces/abi/json/contracts/Zeta.non-eth.sol/ZetaNonEth.json delete mode 100644 packages/interfaces/abi/json/contracts/ZetaConnector.base.sol/ZetaConnectorBase.json delete mode 100644 packages/interfaces/abi/json/contracts/ZetaConnector.eth.sol/ZetaConnectorEth.json delete mode 100644 packages/interfaces/abi/json/contracts/ZetaConnector.non-eth.sol/ZetaConnectorNonEth.json delete mode 100644 packages/interfaces/abi/json/contracts/ZetaInteractor.sol/ZetaInteractor.json delete mode 100644 packages/interfaces/abi/json/contracts/ZetaTokenConsumerTrident.strategy.sol/WETH9.json delete mode 100644 packages/interfaces/abi/json/contracts/ZetaTokenConsumerTrident.strategy.sol/ZetaTokenConsumerTrident.json delete mode 100644 packages/interfaces/abi/json/contracts/ZetaTokenConsumerTrident.strategy.sol/ZetaTokenConsumerTridentErrors.json delete mode 100644 packages/interfaces/abi/json/contracts/ZetaTokenConsumerUniV2.strategy.sol/ZetaTokenConsumerUniV2.json delete mode 100644 packages/interfaces/abi/json/contracts/ZetaTokenConsumerUniV2.strategy.sol/ZetaTokenConsumerUniV2Errors.json delete mode 100644 packages/interfaces/abi/json/contracts/ZetaTokenConsumerUniV3.strategy.sol/WETH9.json delete mode 100644 packages/interfaces/abi/json/contracts/ZetaTokenConsumerUniV3.strategy.sol/ZetaTokenConsumerUniV3.json delete mode 100644 packages/interfaces/abi/json/contracts/ZetaTokenConsumerUniV3.strategy.sol/ZetaTokenConsumerUniV3Errors.json delete mode 100644 packages/interfaces/abi/json/contracts/interfaces/ConnectorErrors.sol/ConnectorErrors.json delete mode 100644 packages/interfaces/abi/json/contracts/interfaces/TridentConcentratedLiquidityPoolFactory.sol/ConcentratedLiquidityPoolFactory.json delete mode 100644 packages/interfaces/abi/json/contracts/interfaces/TridentIPoolRouter.sol/IPoolRouter.json delete mode 100644 packages/interfaces/abi/json/contracts/interfaces/ZetaErrors.sol/ZetaErrors.json delete mode 100644 packages/interfaces/abi/json/contracts/interfaces/ZetaInteractorErrors.sol/ZetaInteractorErrors.json delete mode 100644 packages/interfaces/abi/json/contracts/interfaces/ZetaInterfaces.sol/ZetaCommonErrors.json delete mode 100644 packages/interfaces/abi/json/contracts/interfaces/ZetaInterfaces.sol/ZetaConnector.json delete mode 100644 packages/interfaces/abi/json/contracts/interfaces/ZetaInterfaces.sol/ZetaReceiver.json delete mode 100644 packages/interfaces/abi/json/contracts/interfaces/ZetaInterfaces.sol/ZetaTokenConsumer.json delete mode 100644 packages/interfaces/abi/json/contracts/interfaces/ZetaNonEthInterface.sol/ZetaNonEthInterface.json delete mode 100644 packages/interfaces/abi/json/contracts/openzeppelin/Ownable2Step.sol/Ownable2Step.json delete mode 100644 packages/interfaces/abi/json/contracts/testing/TestUniswapV3Contracts.sol/INonfungiblePositionManager.json delete mode 100644 packages/interfaces/abi/json/contracts/testing/TestUniswapV3Contracts.sol/IPoolInitializer.json delete mode 100644 packages/interfaces/abi/json/contracts/testing/ZetaInteractorMock.sol/ZetaInteractorMock.json delete mode 100644 packages/interfaces/abi/json/contracts/testing/ZetaReceiverMock.sol/ZetaReceiverMock.json delete mode 100644 packages/interfaces/package.json delete mode 100644 packages/interfaces/typechain-types/@openzeppelin/contracts/access/Ownable.ts delete mode 100644 packages/interfaces/typechain-types/@openzeppelin/contracts/access/index.ts delete mode 100644 packages/interfaces/typechain-types/@openzeppelin/contracts/index.ts delete mode 100644 packages/interfaces/typechain-types/@openzeppelin/contracts/security/Pausable.ts delete mode 100644 packages/interfaces/typechain-types/@openzeppelin/contracts/security/index.ts delete mode 100644 packages/interfaces/typechain-types/@openzeppelin/contracts/token/ERC20/ERC20.ts delete mode 100644 packages/interfaces/typechain-types/@openzeppelin/contracts/token/ERC20/IERC20.ts delete mode 100644 packages/interfaces/typechain-types/@openzeppelin/contracts/token/ERC20/extensions/ERC20Burnable.ts delete mode 100644 packages/interfaces/typechain-types/@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.ts delete mode 100644 packages/interfaces/typechain-types/@openzeppelin/contracts/token/ERC20/extensions/draft-IERC20Permit.sol/IERC20Permit.ts delete mode 100644 packages/interfaces/typechain-types/@openzeppelin/contracts/token/ERC20/extensions/draft-IERC20Permit.sol/index.ts delete mode 100644 packages/interfaces/typechain-types/@openzeppelin/contracts/token/ERC20/extensions/index.ts delete mode 100644 packages/interfaces/typechain-types/@openzeppelin/contracts/token/ERC20/index.ts delete mode 100644 packages/interfaces/typechain-types/@openzeppelin/contracts/token/index.ts delete mode 100644 packages/interfaces/typechain-types/@openzeppelin/index.ts delete mode 100644 packages/interfaces/typechain-types/@uniswap/index.ts delete mode 100644 packages/interfaces/typechain-types/@uniswap/v2-core/contracts/index.ts delete mode 100644 packages/interfaces/typechain-types/@uniswap/v2-core/contracts/interfaces/IUniswapV2Factory.ts delete mode 100644 packages/interfaces/typechain-types/@uniswap/v2-core/contracts/interfaces/IUniswapV2Pair.ts delete mode 100644 packages/interfaces/typechain-types/@uniswap/v2-core/contracts/interfaces/index.ts delete mode 100644 packages/interfaces/typechain-types/@uniswap/v2-core/index.ts delete mode 100644 packages/interfaces/typechain-types/@uniswap/v2-periphery/contracts/UniswapV2Router02.ts delete mode 100644 packages/interfaces/typechain-types/@uniswap/v2-periphery/contracts/index.ts delete mode 100644 packages/interfaces/typechain-types/@uniswap/v2-periphery/contracts/interfaces/IERC20.ts delete mode 100644 packages/interfaces/typechain-types/@uniswap/v2-periphery/contracts/interfaces/IUniswapV2Router01.ts delete mode 100644 packages/interfaces/typechain-types/@uniswap/v2-periphery/contracts/interfaces/IUniswapV2Router02.ts delete mode 100644 packages/interfaces/typechain-types/@uniswap/v2-periphery/contracts/interfaces/IWETH.ts delete mode 100644 packages/interfaces/typechain-types/@uniswap/v2-periphery/contracts/interfaces/index.ts delete mode 100644 packages/interfaces/typechain-types/@uniswap/v2-periphery/index.ts delete mode 100644 packages/interfaces/typechain-types/@uniswap/v3-core/contracts/index.ts delete mode 100644 packages/interfaces/typechain-types/@uniswap/v3-core/contracts/interfaces/callback/IUniswapV3SwapCallback.ts delete mode 100644 packages/interfaces/typechain-types/@uniswap/v3-core/contracts/interfaces/callback/index.ts delete mode 100644 packages/interfaces/typechain-types/@uniswap/v3-core/contracts/interfaces/index.ts delete mode 100644 packages/interfaces/typechain-types/@uniswap/v3-core/index.ts delete mode 100644 packages/interfaces/typechain-types/@uniswap/v3-periphery/contracts/index.ts delete mode 100644 packages/interfaces/typechain-types/@uniswap/v3-periphery/contracts/interfaces/IQuoter.ts delete mode 100644 packages/interfaces/typechain-types/@uniswap/v3-periphery/contracts/interfaces/ISwapRouter.ts delete mode 100644 packages/interfaces/typechain-types/@uniswap/v3-periphery/contracts/interfaces/index.ts delete mode 100644 packages/interfaces/typechain-types/@uniswap/v3-periphery/index.ts delete mode 100644 packages/interfaces/typechain-types/common.ts delete mode 100644 packages/interfaces/typechain-types/contracts/ImmutableCreate2Factory.sol/ImmutableCreate2Factory.ts delete mode 100644 packages/interfaces/typechain-types/contracts/ImmutableCreate2Factory.sol/Ownable.ts delete mode 100644 packages/interfaces/typechain-types/contracts/ImmutableCreate2Factory.sol/index.ts delete mode 100644 packages/interfaces/typechain-types/contracts/Zeta.eth.sol/ZetaEth.ts delete mode 100644 packages/interfaces/typechain-types/contracts/Zeta.eth.sol/index.ts delete mode 100644 packages/interfaces/typechain-types/contracts/Zeta.non-eth.sol/ZetaNonEth.ts delete mode 100644 packages/interfaces/typechain-types/contracts/Zeta.non-eth.sol/index.ts delete mode 100644 packages/interfaces/typechain-types/contracts/ZetaConnector.base.sol/ZetaConnectorBase.ts delete mode 100644 packages/interfaces/typechain-types/contracts/ZetaConnector.base.sol/index.ts delete mode 100644 packages/interfaces/typechain-types/contracts/ZetaConnector.eth.sol/ZetaConnectorEth.ts delete mode 100644 packages/interfaces/typechain-types/contracts/ZetaConnector.eth.sol/index.ts delete mode 100644 packages/interfaces/typechain-types/contracts/ZetaConnector.non-eth.sol/ZetaConnectorNonEth.ts delete mode 100644 packages/interfaces/typechain-types/contracts/ZetaConnector.non-eth.sol/index.ts delete mode 100644 packages/interfaces/typechain-types/contracts/ZetaInteractor.ts delete mode 100644 packages/interfaces/typechain-types/contracts/ZetaTokenConsumerTrident.strategy.sol/WETH9.ts delete mode 100644 packages/interfaces/typechain-types/contracts/ZetaTokenConsumerTrident.strategy.sol/ZetaTokenConsumerTrident.ts delete mode 100644 packages/interfaces/typechain-types/contracts/ZetaTokenConsumerTrident.strategy.sol/ZetaTokenConsumerTridentErrors.ts delete mode 100644 packages/interfaces/typechain-types/contracts/ZetaTokenConsumerTrident.strategy.sol/index.ts delete mode 100644 packages/interfaces/typechain-types/contracts/ZetaTokenConsumerUniV2.strategy.sol/ZetaTokenConsumerUniV2.ts delete mode 100644 packages/interfaces/typechain-types/contracts/ZetaTokenConsumerUniV2.strategy.sol/ZetaTokenConsumerUniV2Errors.ts delete mode 100644 packages/interfaces/typechain-types/contracts/ZetaTokenConsumerUniV2.strategy.sol/index.ts delete mode 100644 packages/interfaces/typechain-types/contracts/ZetaTokenConsumerUniV3.strategy.sol/WETH9.ts delete mode 100644 packages/interfaces/typechain-types/contracts/ZetaTokenConsumerUniV3.strategy.sol/ZetaTokenConsumerUniV3.ts delete mode 100644 packages/interfaces/typechain-types/contracts/ZetaTokenConsumerUniV3.strategy.sol/ZetaTokenConsumerUniV3Errors.ts delete mode 100644 packages/interfaces/typechain-types/contracts/ZetaTokenConsumerUniV3.strategy.sol/index.ts delete mode 100644 packages/interfaces/typechain-types/contracts/index.ts delete mode 100644 packages/interfaces/typechain-types/contracts/interfaces/ConnectorErrors.ts delete mode 100644 packages/interfaces/typechain-types/contracts/interfaces/TridentConcentratedLiquidityPoolFactory.sol/ConcentratedLiquidityPoolFactory.ts delete mode 100644 packages/interfaces/typechain-types/contracts/interfaces/TridentConcentratedLiquidityPoolFactory.sol/index.ts delete mode 100644 packages/interfaces/typechain-types/contracts/interfaces/TridentIPoolRouter.sol/IPoolRouter.ts delete mode 100644 packages/interfaces/typechain-types/contracts/interfaces/TridentIPoolRouter.sol/index.ts delete mode 100644 packages/interfaces/typechain-types/contracts/interfaces/ZetaErrors.ts delete mode 100644 packages/interfaces/typechain-types/contracts/interfaces/ZetaInteractorErrors.ts delete mode 100644 packages/interfaces/typechain-types/contracts/interfaces/ZetaInterfaces.sol/ZetaCommonErrors.ts delete mode 100644 packages/interfaces/typechain-types/contracts/interfaces/ZetaInterfaces.sol/ZetaConnector.ts delete mode 100644 packages/interfaces/typechain-types/contracts/interfaces/ZetaInterfaces.sol/ZetaReceiver.ts delete mode 100644 packages/interfaces/typechain-types/contracts/interfaces/ZetaInterfaces.sol/ZetaTokenConsumer.ts delete mode 100644 packages/interfaces/typechain-types/contracts/interfaces/ZetaInterfaces.sol/index.ts delete mode 100644 packages/interfaces/typechain-types/contracts/interfaces/ZetaNonEthInterface.ts delete mode 100644 packages/interfaces/typechain-types/contracts/interfaces/index.ts delete mode 100644 packages/interfaces/typechain-types/contracts/openzeppelin/Ownable2Step.ts delete mode 100644 packages/interfaces/typechain-types/contracts/openzeppelin/index.ts delete mode 100644 packages/interfaces/typechain-types/contracts/testing/TestUniswapV3Contracts.sol/INonfungiblePositionManager.ts delete mode 100644 packages/interfaces/typechain-types/contracts/testing/TestUniswapV3Contracts.sol/IPoolInitializer.ts delete mode 100644 packages/interfaces/typechain-types/contracts/testing/TestUniswapV3Contracts.sol/index.ts delete mode 100644 packages/interfaces/typechain-types/contracts/testing/ZetaInteractorMock.ts delete mode 100644 packages/interfaces/typechain-types/contracts/testing/ZetaReceiverMock.ts delete mode 100644 packages/interfaces/typechain-types/contracts/testing/index.ts delete mode 100644 packages/interfaces/typechain-types/factories/@openzeppelin/contracts/access/Ownable__factory.ts delete mode 100644 packages/interfaces/typechain-types/factories/@openzeppelin/contracts/access/index.ts delete mode 100644 packages/interfaces/typechain-types/factories/@openzeppelin/contracts/index.ts delete mode 100644 packages/interfaces/typechain-types/factories/@openzeppelin/contracts/security/Pausable__factory.ts delete mode 100644 packages/interfaces/typechain-types/factories/@openzeppelin/contracts/security/index.ts delete mode 100644 packages/interfaces/typechain-types/factories/@openzeppelin/contracts/token/ERC20/ERC20__factory.ts delete mode 100644 packages/interfaces/typechain-types/factories/@openzeppelin/contracts/token/ERC20/IERC20__factory.ts delete mode 100644 packages/interfaces/typechain-types/factories/@openzeppelin/contracts/token/ERC20/extensions/ERC20Burnable__factory.ts delete mode 100644 packages/interfaces/typechain-types/factories/@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata__factory.ts delete mode 100644 packages/interfaces/typechain-types/factories/@openzeppelin/contracts/token/ERC20/extensions/draft-IERC20Permit.sol/IERC20Permit__factory.ts delete mode 100644 packages/interfaces/typechain-types/factories/@openzeppelin/contracts/token/ERC20/extensions/draft-IERC20Permit.sol/index.ts delete mode 100644 packages/interfaces/typechain-types/factories/@openzeppelin/contracts/token/ERC20/extensions/index.ts delete mode 100644 packages/interfaces/typechain-types/factories/@openzeppelin/contracts/token/ERC20/index.ts delete mode 100644 packages/interfaces/typechain-types/factories/@openzeppelin/contracts/token/index.ts delete mode 100644 packages/interfaces/typechain-types/factories/@openzeppelin/index.ts delete mode 100644 packages/interfaces/typechain-types/factories/@uniswap/index.ts delete mode 100644 packages/interfaces/typechain-types/factories/@uniswap/v2-core/contracts/index.ts delete mode 100644 packages/interfaces/typechain-types/factories/@uniswap/v2-core/contracts/interfaces/IUniswapV2Factory__factory.ts delete mode 100644 packages/interfaces/typechain-types/factories/@uniswap/v2-core/contracts/interfaces/IUniswapV2Pair__factory.ts delete mode 100644 packages/interfaces/typechain-types/factories/@uniswap/v2-core/contracts/interfaces/index.ts delete mode 100644 packages/interfaces/typechain-types/factories/@uniswap/v2-core/index.ts delete mode 100644 packages/interfaces/typechain-types/factories/@uniswap/v2-periphery/contracts/UniswapV2Router02__factory.ts delete mode 100644 packages/interfaces/typechain-types/factories/@uniswap/v2-periphery/contracts/index.ts delete mode 100644 packages/interfaces/typechain-types/factories/@uniswap/v2-periphery/contracts/interfaces/IERC20__factory.ts delete mode 100644 packages/interfaces/typechain-types/factories/@uniswap/v2-periphery/contracts/interfaces/IUniswapV2Router01__factory.ts delete mode 100644 packages/interfaces/typechain-types/factories/@uniswap/v2-periphery/contracts/interfaces/IUniswapV2Router02__factory.ts delete mode 100644 packages/interfaces/typechain-types/factories/@uniswap/v2-periphery/contracts/interfaces/IWETH__factory.ts delete mode 100644 packages/interfaces/typechain-types/factories/@uniswap/v2-periphery/contracts/interfaces/index.ts delete mode 100644 packages/interfaces/typechain-types/factories/@uniswap/v2-periphery/index.ts delete mode 100644 packages/interfaces/typechain-types/factories/@uniswap/v3-core/contracts/index.ts delete mode 100644 packages/interfaces/typechain-types/factories/@uniswap/v3-core/contracts/interfaces/callback/IUniswapV3SwapCallback__factory.ts delete mode 100644 packages/interfaces/typechain-types/factories/@uniswap/v3-core/contracts/interfaces/callback/index.ts delete mode 100644 packages/interfaces/typechain-types/factories/@uniswap/v3-core/contracts/interfaces/index.ts delete mode 100644 packages/interfaces/typechain-types/factories/@uniswap/v3-core/index.ts delete mode 100644 packages/interfaces/typechain-types/factories/@uniswap/v3-periphery/contracts/index.ts delete mode 100644 packages/interfaces/typechain-types/factories/@uniswap/v3-periphery/contracts/interfaces/IQuoter__factory.ts delete mode 100644 packages/interfaces/typechain-types/factories/@uniswap/v3-periphery/contracts/interfaces/ISwapRouter__factory.ts delete mode 100644 packages/interfaces/typechain-types/factories/@uniswap/v3-periphery/contracts/interfaces/index.ts delete mode 100644 packages/interfaces/typechain-types/factories/@uniswap/v3-periphery/index.ts delete mode 100644 packages/interfaces/typechain-types/factories/contracts/ImmutableCreate2Factory.sol/ImmutableCreate2Factory__factory.ts delete mode 100644 packages/interfaces/typechain-types/factories/contracts/ImmutableCreate2Factory.sol/Ownable__factory.ts delete mode 100644 packages/interfaces/typechain-types/factories/contracts/ImmutableCreate2Factory.sol/index.ts delete mode 100644 packages/interfaces/typechain-types/factories/contracts/Zeta.eth.sol/ZetaEth__factory.ts delete mode 100644 packages/interfaces/typechain-types/factories/contracts/Zeta.eth.sol/index.ts delete mode 100644 packages/interfaces/typechain-types/factories/contracts/Zeta.non-eth.sol/ZetaNonEth__factory.ts delete mode 100644 packages/interfaces/typechain-types/factories/contracts/Zeta.non-eth.sol/index.ts delete mode 100644 packages/interfaces/typechain-types/factories/contracts/ZetaConnector.base.sol/ZetaConnectorBase__factory.ts delete mode 100644 packages/interfaces/typechain-types/factories/contracts/ZetaConnector.base.sol/index.ts delete mode 100644 packages/interfaces/typechain-types/factories/contracts/ZetaConnector.eth.sol/ZetaConnectorEth__factory.ts delete mode 100644 packages/interfaces/typechain-types/factories/contracts/ZetaConnector.eth.sol/index.ts delete mode 100644 packages/interfaces/typechain-types/factories/contracts/ZetaConnector.non-eth.sol/ZetaConnectorNonEth__factory.ts delete mode 100644 packages/interfaces/typechain-types/factories/contracts/ZetaConnector.non-eth.sol/index.ts delete mode 100644 packages/interfaces/typechain-types/factories/contracts/ZetaInteractor__factory.ts delete mode 100644 packages/interfaces/typechain-types/factories/contracts/ZetaTokenConsumerTrident.strategy.sol/WETH9__factory.ts delete mode 100644 packages/interfaces/typechain-types/factories/contracts/ZetaTokenConsumerTrident.strategy.sol/ZetaTokenConsumerTridentErrors__factory.ts delete mode 100644 packages/interfaces/typechain-types/factories/contracts/ZetaTokenConsumerTrident.strategy.sol/ZetaTokenConsumerTrident__factory.ts delete mode 100644 packages/interfaces/typechain-types/factories/contracts/ZetaTokenConsumerTrident.strategy.sol/index.ts delete mode 100644 packages/interfaces/typechain-types/factories/contracts/ZetaTokenConsumerUniV2.strategy.sol/ZetaTokenConsumerUniV2Errors__factory.ts delete mode 100644 packages/interfaces/typechain-types/factories/contracts/ZetaTokenConsumerUniV2.strategy.sol/ZetaTokenConsumerUniV2__factory.ts delete mode 100644 packages/interfaces/typechain-types/factories/contracts/ZetaTokenConsumerUniV2.strategy.sol/index.ts delete mode 100644 packages/interfaces/typechain-types/factories/contracts/ZetaTokenConsumerUniV3.strategy.sol/WETH9__factory.ts delete mode 100644 packages/interfaces/typechain-types/factories/contracts/ZetaTokenConsumerUniV3.strategy.sol/ZetaTokenConsumerUniV3Errors__factory.ts delete mode 100644 packages/interfaces/typechain-types/factories/contracts/ZetaTokenConsumerUniV3.strategy.sol/ZetaTokenConsumerUniV3__factory.ts delete mode 100644 packages/interfaces/typechain-types/factories/contracts/ZetaTokenConsumerUniV3.strategy.sol/index.ts delete mode 100644 packages/interfaces/typechain-types/factories/contracts/index.ts delete mode 100644 packages/interfaces/typechain-types/factories/contracts/interfaces/ConnectorErrors__factory.ts delete mode 100644 packages/interfaces/typechain-types/factories/contracts/interfaces/TridentConcentratedLiquidityPoolFactory.sol/ConcentratedLiquidityPoolFactory__factory.ts delete mode 100644 packages/interfaces/typechain-types/factories/contracts/interfaces/TridentConcentratedLiquidityPoolFactory.sol/index.ts delete mode 100644 packages/interfaces/typechain-types/factories/contracts/interfaces/TridentIPoolRouter.sol/IPoolRouter__factory.ts delete mode 100644 packages/interfaces/typechain-types/factories/contracts/interfaces/TridentIPoolRouter.sol/index.ts delete mode 100644 packages/interfaces/typechain-types/factories/contracts/interfaces/ZetaErrors__factory.ts delete mode 100644 packages/interfaces/typechain-types/factories/contracts/interfaces/ZetaInteractorErrors__factory.ts delete mode 100644 packages/interfaces/typechain-types/factories/contracts/interfaces/ZetaInterfaces.sol/ZetaCommonErrors__factory.ts delete mode 100644 packages/interfaces/typechain-types/factories/contracts/interfaces/ZetaInterfaces.sol/ZetaConnector__factory.ts delete mode 100644 packages/interfaces/typechain-types/factories/contracts/interfaces/ZetaInterfaces.sol/ZetaReceiver__factory.ts delete mode 100644 packages/interfaces/typechain-types/factories/contracts/interfaces/ZetaInterfaces.sol/ZetaTokenConsumer__factory.ts delete mode 100644 packages/interfaces/typechain-types/factories/contracts/interfaces/ZetaInterfaces.sol/index.ts delete mode 100644 packages/interfaces/typechain-types/factories/contracts/interfaces/ZetaNonEthInterface__factory.ts delete mode 100644 packages/interfaces/typechain-types/factories/contracts/interfaces/index.ts delete mode 100644 packages/interfaces/typechain-types/factories/contracts/openzeppelin/Ownable2Step__factory.ts delete mode 100644 packages/interfaces/typechain-types/factories/contracts/openzeppelin/index.ts delete mode 100644 packages/interfaces/typechain-types/factories/contracts/testing/TestUniswapV3Contracts.sol/INonfungiblePositionManager__factory.ts delete mode 100644 packages/interfaces/typechain-types/factories/contracts/testing/TestUniswapV3Contracts.sol/IPoolInitializer__factory.ts delete mode 100644 packages/interfaces/typechain-types/factories/contracts/testing/TestUniswapV3Contracts.sol/index.ts delete mode 100644 packages/interfaces/typechain-types/factories/contracts/testing/ZetaInteractorMock__factory.ts delete mode 100644 packages/interfaces/typechain-types/factories/contracts/testing/ZetaReceiverMock__factory.ts delete mode 100644 packages/interfaces/typechain-types/factories/contracts/testing/index.ts delete mode 100644 packages/interfaces/typechain-types/factories/index.ts delete mode 100644 packages/interfaces/typechain-types/hardhat.d.ts delete mode 100644 packages/interfaces/typechain-types/index.ts rename packages/{protocol-contracts => protocol-contracts-deprecated}/.env.example (100%) rename packages/{protocol-contracts => protocol-contracts-deprecated}/.eslintrc.js (100%) rename packages/{protocol-contracts => protocol-contracts-deprecated}/.npmignore (100%) rename packages/{protocol-contracts => protocol-contracts-deprecated}/README.md (100%) rename packages/{protocol-contracts => protocol-contracts-deprecated}/contracts/ZetaTokenConsumerTrident.strategy.sol (98%) rename packages/{protocol-contracts => protocol-contracts-deprecated}/contracts/interfaces/TridentConcentratedLiquidityPoolFactory.sol (100%) rename packages/{protocol-contracts => protocol-contracts-deprecated}/contracts/interfaces/TridentIPoolRouter.sol (100%) rename packages/{protocol-contracts => protocol-contracts-deprecated}/contracts/testing/TestContracts.sol (100%) rename packages/{protocol-contracts => protocol-contracts-deprecated}/hardhat.config.ts (100%) rename packages/{protocol-contracts => protocol-contracts-deprecated}/package.json (89%) rename packages/{protocol-contracts => protocol-contracts-deprecated}/tsconfig.json (100%) delete mode 100644 packages/protocol-contracts/contracts/ERC20Custody.sol delete mode 100644 packages/protocol-contracts/contracts/ImmutableCreate2Factory.sol delete mode 100644 packages/protocol-contracts/contracts/Zeta.eth.sol delete mode 100644 packages/protocol-contracts/contracts/Zeta.non-eth.sol delete mode 100644 packages/protocol-contracts/contracts/ZetaConnector.base.sol delete mode 100644 packages/protocol-contracts/contracts/ZetaConnector.eth.sol delete mode 100644 packages/protocol-contracts/contracts/ZetaConnector.non-eth.sol delete mode 100644 packages/protocol-contracts/contracts/ZetaInteractor.sol delete mode 100644 packages/protocol-contracts/contracts/ZetaTokenConsumerUniV2.strategy.sol delete mode 100644 packages/protocol-contracts/contracts/ZetaTokenConsumerUniV3.strategy.sol delete mode 100644 packages/protocol-contracts/contracts/interfaces/ConnectorErrors.sol delete mode 100644 packages/protocol-contracts/contracts/interfaces/ZetaErrors.sol delete mode 100644 packages/protocol-contracts/contracts/interfaces/ZetaInteractorErrors.sol delete mode 100644 packages/protocol-contracts/contracts/interfaces/ZetaInterfaces.sol delete mode 100644 packages/protocol-contracts/contracts/interfaces/ZetaNonEthInterface.sol delete mode 100644 packages/protocol-contracts/contracts/openzeppelin/Ownable2Step.sol delete mode 100644 packages/protocol-contracts/contracts/testing/TestUniswapV3Contracts.sol delete mode 100644 packages/protocol-contracts/contracts/testing/ZetaInteractorMock.sol delete mode 100644 packages/protocol-contracts/contracts/testing/ZetaReceiverMock.sol delete mode 100644 packages/protocol-contracts/lib/ImmutableCreate2Factory/ImmutableCreate2Factory.helpers.ts delete mode 100644 packages/protocol-contracts/lib/address.helpers.ts delete mode 100644 packages/protocol-contracts/lib/contracts.constants.ts delete mode 100644 packages/protocol-contracts/lib/contracts.helpers.ts delete mode 100644 packages/protocol-contracts/lib/zeta-interactor/ZetaInteractor.helpers.ts delete mode 100644 packages/protocol-contracts/scripts/deploy-immutable-create2-factory.ts delete mode 100644 packages/protocol-contracts/scripts/deploy-zeta-connector.ts delete mode 100644 packages/protocol-contracts/scripts/deploy-zeta-token.ts delete mode 100644 packages/protocol-contracts/scripts/deploy.ts delete mode 100644 packages/protocol-contracts/scripts/deterministic-deploy-zeta-connector.ts delete mode 100644 packages/protocol-contracts/scripts/deterministic-deploy-zeta-consumer-v2.ts delete mode 100644 packages/protocol-contracts/scripts/deterministic-deploy-zeta-consumer-v3.ts delete mode 100644 packages/protocol-contracts/scripts/deterministic-deploy-zeta-token.ts delete mode 100644 packages/protocol-contracts/scripts/deterministic-deploy.helpers.ts delete mode 100644 packages/protocol-contracts/scripts/deterministic-get-salt-zeta-connector.ts delete mode 100644 packages/protocol-contracts/scripts/deterministic-get-salt-zeta-token.ts delete mode 100644 packages/protocol-contracts/scripts/send-tss-gas.ts delete mode 100644 packages/protocol-contracts/scripts/set-zeta-token-addresses.ts delete mode 100644 packages/protocol-contracts/scripts/test-zeta-send.ts delete mode 100644 packages/protocol-contracts/scripts/token-approval.ts delete mode 100644 packages/protocol-contracts/scripts/update-tss-address.ts delete mode 100644 packages/protocol-contracts/scripts/update-zeta-connector.ts delete mode 100644 packages/protocol-contracts/scripts/verify-contracts.ts delete mode 100644 packages/protocol-contracts/test/ImmutableCreate2Factory.spec.ts delete mode 100644 packages/protocol-contracts/test/Zeta.non-eth.spec.ts delete mode 100644 packages/protocol-contracts/test/ZetaConnector.spec.ts delete mode 100644 packages/protocol-contracts/test/ZetaInteractor.spec.ts delete mode 100644 packages/protocol-contracts/test/ZetaTokenConsumer.spec.ts delete mode 100644 packages/protocol-contracts/test/test.helpers.ts delete mode 100644 packages/zevm-protocol-contracts/.env.example delete mode 100644 packages/zevm-protocol-contracts/.eslintrc.js delete mode 100644 packages/zevm-protocol-contracts/README.md delete mode 100644 packages/zevm-protocol-contracts/contracts/interfaces/IZRC20.sol delete mode 100644 packages/zevm-protocol-contracts/contracts/interfaces/zContract.sol delete mode 100644 packages/zevm-protocol-contracts/contracts/system/SystemContract.sol delete mode 100644 packages/zevm-protocol-contracts/hardhat.config.ts delete mode 100644 packages/zevm-protocol-contracts/package.json delete mode 100644 packages/zevm-protocol-contracts/tsconfig.json diff --git a/Dockerfile b/Dockerfile index 4f36c835..01784859 100644 --- a/Dockerfile +++ b/Dockerfile @@ -10,11 +10,8 @@ RUN apk add --update python3 yarn git nodejs make g++ WORKDIR /home/zetachain/ COPY package*.json ./ COPY packages/addresses-tools/package.json ./packages/addresses-tools/package.json -COPY packages/interfaces/package.json ./packages/interfaces/package.json COPY packages/zevm-example-contracts/package.json ./packages/zevm-example-contracts/package.json COPY packages/addresses/package.json packages/addresses/package.json -COPY packages/protocol-contracts/package.json ./packages/protocol-contracts/package.json -COPY packages/zevm-protocol-contracts/package.json ./packages/zevm-protocol-contracts/package.json COPY packages/example-contracts/package.json ./packages/example-contracts/package.json COPY packages/zeta-app-contracts/package.json ./packages/zeta-app-contracts/package.json RUN yarn install ; exit 0 @@ -22,16 +19,11 @@ RUN yarn install ; exit 0 COPY . ./ RUN yarn install -RUN yarn add solc@0.5.10 -RUN yarn add solc@0.6.6 -RUN yarn add solc@0.7.6 -RUN yarn add solc@0.8.7 +RUN yarn add solc@0.5.10 solc@0.6.6 solc@0.7.6 solc@0.8.7 -RUN cd packages/protocol-contracts && npx hardhat compile && cd - RUN cd packages/example-contracts && npx hardhat compile && cd - RUN cd packages/zeta-app-contracts && npx hardhat compile && cd - RUN cd packages/zevm-example-contracts && npx hardhat compile && cd - -RUN cd packages/zevm-protocol-contracts && npx hardhat compile && cd - WORKDIR /home/zetachain/ diff --git a/packages/addresses/package.json b/packages/addresses/package.json index 600f8c0f..e0260b71 100644 --- a/packages/addresses/package.json +++ b/packages/addresses/package.json @@ -27,4 +27,4 @@ "vite": "^3.1.0", "vite-plugin-dts": "^1.4.1" } -} \ No newline at end of file +} diff --git a/packages/example-contracts/contracts/cross-chain-counter/CrossChainCounter.sol b/packages/example-contracts/contracts/cross-chain-counter/CrossChainCounter.sol index 4a95f0cd..c0505300 100644 --- a/packages/example-contracts/contracts/cross-chain-counter/CrossChainCounter.sol +++ b/packages/example-contracts/contracts/cross-chain-counter/CrossChainCounter.sol @@ -2,8 +2,8 @@ pragma solidity 0.8.7; import "@openzeppelin/contracts/access/Ownable.sol"; -import "@zetachain/protocol-contracts/contracts/ZetaInteractor.sol"; -import "@zetachain/protocol-contracts/contracts/interfaces/ZetaInterfaces.sol"; +import "@zetachain/protocol-contracts/contracts/evm/tools/ZetaInteractor.sol"; +import "@zetachain/protocol-contracts/contracts/evm/interfaces/ZetaInterfaces.sol"; interface CrossChainCounterErrors { error InvalidMessageType(); @@ -34,11 +34,9 @@ contract CrossChainCounter is ZetaInteractor, ZetaReceiver, CrossChainCounterErr ); } - function onZetaMessage(ZetaInterfaces.ZetaMessage calldata zetaMessage) - external - override - isValidMessageCall(zetaMessage) - { + function onZetaMessage( + ZetaInterfaces.ZetaMessage calldata zetaMessage + ) external override isValidMessageCall(zetaMessage) { (bytes32 messageType, address messageFrom) = abi.decode(zetaMessage.message, (bytes32, address)); if (messageType != CROSS_CHAIN_INCREMENT_MESSAGE) revert InvalidMessageType(); @@ -46,11 +44,9 @@ contract CrossChainCounter is ZetaInteractor, ZetaReceiver, CrossChainCounterErr counter[messageFrom]++; } - function onZetaRevert(ZetaInterfaces.ZetaRevert calldata zetaRevert) - external - override - isValidRevertCall(zetaRevert) - { + function onZetaRevert( + ZetaInterfaces.ZetaRevert calldata zetaRevert + ) external override isValidRevertCall(zetaRevert) { (bytes32 messageType, address messageFrom) = abi.decode(zetaRevert.message, (bytes32, address)); if (messageType != CROSS_CHAIN_INCREMENT_MESSAGE) revert InvalidMessageType(); diff --git a/packages/example-contracts/contracts/cross-chain-counter/test/CounterZetaConnectorMock.sol b/packages/example-contracts/contracts/cross-chain-counter/test/CounterZetaConnectorMock.sol index 7093d8e3..6ceae166 100644 --- a/packages/example-contracts/contracts/cross-chain-counter/test/CounterZetaConnectorMock.sol +++ b/packages/example-contracts/contracts/cross-chain-counter/test/CounterZetaConnectorMock.sol @@ -1,7 +1,7 @@ // SPDX-License-Identifier: MIT pragma solidity 0.8.7; -import "@zetachain/protocol-contracts/contracts/interfaces/ZetaInterfaces.sol"; +import "@zetachain/protocol-contracts/contracts/evm/interfaces/ZetaInterfaces.sol"; import "../CrossChainCounter.sol"; diff --git a/packages/example-contracts/contracts/cross-chain-message/CrossChainMessage.sol b/packages/example-contracts/contracts/cross-chain-message/CrossChainMessage.sol index ed65e0b2..89c3bd4b 100644 --- a/packages/example-contracts/contracts/cross-chain-message/CrossChainMessage.sol +++ b/packages/example-contracts/contracts/cross-chain-message/CrossChainMessage.sol @@ -3,8 +3,8 @@ pragma solidity 0.8.7; import "@openzeppelin/contracts/interfaces/IERC20.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; -import "@zetachain/protocol-contracts/contracts/ZetaInteractor.sol"; -import "@zetachain/protocol-contracts/contracts/interfaces/ZetaInterfaces.sol"; +import "@zetachain/protocol-contracts/contracts/evm/tools/ZetaInteractor.sol"; +import "@zetachain/protocol-contracts/contracts/evm/interfaces/ZetaInterfaces.sol"; interface CrossChainMessageErrors { error InvalidMessageType(); @@ -36,7 +36,7 @@ contract CrossChainMessage is ZetaInteractor, ZetaReceiver, CrossChainMessageErr function sendHelloWorld(uint256 destinationChainId) external payable { if (!_isValidChainId(destinationChainId)) revert InvalidDestinationChainId(); - uint256 crossChainGas = 18 * (10**18); + uint256 crossChainGas = 18 * (10 ** 18); uint256 zetaValueAndGas = _zetaConsumer.getZetaFromEth{value: msg.value}(address(this), crossChainGas); _zetaToken.approve(address(connector), zetaValueAndGas); @@ -52,11 +52,9 @@ contract CrossChainMessage is ZetaInteractor, ZetaReceiver, CrossChainMessageErr ); } - function onZetaMessage(ZetaInterfaces.ZetaMessage calldata zetaMessage) - external - override - isValidMessageCall(zetaMessage) - { + function onZetaMessage( + ZetaInterfaces.ZetaMessage calldata zetaMessage + ) external override isValidMessageCall(zetaMessage) { /** * @dev Decode should follow the signature of the message provided to zeta.send. */ @@ -75,11 +73,9 @@ contract CrossChainMessage is ZetaInteractor, ZetaReceiver, CrossChainMessageErr * Useful to cleanup and leave the application on its initial state. * Note that the require statements and the functionality are similar to onZetaMessage. */ - function onZetaRevert(ZetaInterfaces.ZetaRevert calldata zetaRevert) - external - override - isValidRevertCall(zetaRevert) - { + function onZetaRevert( + ZetaInterfaces.ZetaRevert calldata zetaRevert + ) external override isValidRevertCall(zetaRevert) { (bytes32 messageType, string memory helloWorldMessage) = abi.decode(zetaRevert.message, (bytes32, string)); if (messageType != HELLO_WORLD_MESSAGE_TYPE) revert InvalidMessageType(); diff --git a/packages/example-contracts/contracts/cross-chain-message/test/CrossChainMessageConnector.sol b/packages/example-contracts/contracts/cross-chain-message/test/CrossChainMessageConnector.sol index 31be1252..11f9f38a 100644 --- a/packages/example-contracts/contracts/cross-chain-message/test/CrossChainMessageConnector.sol +++ b/packages/example-contracts/contracts/cross-chain-message/test/CrossChainMessageConnector.sol @@ -1,7 +1,7 @@ // SPDX-License-Identifier: MIT pragma solidity 0.8.7; -import "@zetachain/protocol-contracts/contracts/interfaces/ZetaInterfaces.sol"; +import "@zetachain/protocol-contracts/contracts/evm/interfaces/ZetaInterfaces.sol"; import "../CrossChainMessage.sol"; diff --git a/packages/example-contracts/contracts/cross-chain-warriors/CrossChainWarriors.sol b/packages/example-contracts/contracts/cross-chain-warriors/CrossChainWarriors.sol index df74c325..3a627ae6 100644 --- a/packages/example-contracts/contracts/cross-chain-warriors/CrossChainWarriors.sol +++ b/packages/example-contracts/contracts/cross-chain-warriors/CrossChainWarriors.sol @@ -5,8 +5,8 @@ import "@openzeppelin/contracts/interfaces/IERC20.sol"; import "@openzeppelin/contracts/token/ERC721/ERC721.sol"; import "@openzeppelin/contracts/utils/Counters.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; -import "@zetachain/protocol-contracts/contracts/interfaces/ZetaInterfaces.sol"; -import "@zetachain/protocol-contracts/contracts/ZetaInteractor.sol"; +import "@zetachain/protocol-contracts/contracts/evm/interfaces/ZetaInterfaces.sol"; +import "@zetachain/protocol-contracts/contracts/evm/tools/ZetaInteractor.sol"; interface CrossChainWarriorsErrors { error InvalidMessageType(); @@ -85,15 +85,11 @@ contract CrossChainWarriors is * @dev Cross-chain functions */ - function crossChainTransfer( - uint256 crossChainId, - address to, - uint256 tokenId - ) external payable { + function crossChainTransfer(uint256 crossChainId, address to, uint256 tokenId) external payable { if (!_isValidChainId(crossChainId)) revert InvalidDestinationChainId(); if (!_isApprovedOrOwner(_msgSender(), tokenId)) revert InvalidTransferCaller(); - uint256 crossChainGas = 18 * (10**18); + uint256 crossChainGas = 18 * (10 ** 18); uint256 zetaValueAndGas = _zetaConsumer.getZetaFromEth{value: msg.value}(address(this), crossChainGas); _zetaToken.approve(address(connector), zetaValueAndGas); @@ -111,11 +107,9 @@ contract CrossChainWarriors is ); } - function onZetaMessage(ZetaInterfaces.ZetaMessage calldata zetaMessage) - external - override - isValidMessageCall(zetaMessage) - { + function onZetaMessage( + ZetaInterfaces.ZetaMessage calldata zetaMessage + ) external override isValidMessageCall(zetaMessage) { ( bytes32 messageType, uint256 tokenId, @@ -131,11 +125,9 @@ contract CrossChainWarriors is _mintId(to, tokenId); } - function onZetaRevert(ZetaInterfaces.ZetaRevert calldata zetaRevert) - external - override - isValidRevertCall(zetaRevert) - { + function onZetaRevert( + ZetaInterfaces.ZetaRevert calldata zetaRevert + ) external override isValidRevertCall(zetaRevert) { (bytes32 messageType, uint256 tokenId, address from) = abi.decode( zetaRevert.message, (bytes32, uint256, address) diff --git a/packages/example-contracts/contracts/cross-chain-warriors/test/CrossChainWarriorsZetaConnectorMock.sol b/packages/example-contracts/contracts/cross-chain-warriors/test/CrossChainWarriorsZetaConnectorMock.sol index bc4a3795..b053d914 100644 --- a/packages/example-contracts/contracts/cross-chain-warriors/test/CrossChainWarriorsZetaConnectorMock.sol +++ b/packages/example-contracts/contracts/cross-chain-warriors/test/CrossChainWarriorsZetaConnectorMock.sol @@ -1,7 +1,7 @@ // SPDX-License-Identifier: MIT pragma solidity 0.8.7; -import "@zetachain/protocol-contracts/contracts/interfaces/ZetaInterfaces.sol"; +import "@zetachain/protocol-contracts/contracts/evm/interfaces/ZetaInterfaces.sol"; import "../CrossChainWarriors.sol"; diff --git a/packages/example-contracts/contracts/multi-chain-swap/MultiChainSwap.sol b/packages/example-contracts/contracts/multi-chain-swap/MultiChainSwap.sol index e771ab73..f1f6e6b1 100644 --- a/packages/example-contracts/contracts/multi-chain-swap/MultiChainSwap.sol +++ b/packages/example-contracts/contracts/multi-chain-swap/MultiChainSwap.sol @@ -1,7 +1,7 @@ // SPDX-License-Identifier: MIT pragma solidity 0.8.7; -import "@zetachain/protocol-contracts/contracts/ZetaInteractor.sol"; +import "@zetachain/protocol-contracts/contracts/evm/tools/ZetaInteractor.sol"; interface MultiChainSwap is ZetaReceiver { event SentTokenSwap( diff --git a/packages/example-contracts/contracts/multi-chain-swap/MultiChainSwapTrident.strategy.sol b/packages/example-contracts/contracts/multi-chain-swap/MultiChainSwapTrident.strategy.sol index b51af0f8..edb46709 100644 --- a/packages/example-contracts/contracts/multi-chain-swap/MultiChainSwapTrident.strategy.sol +++ b/packages/example-contracts/contracts/multi-chain-swap/MultiChainSwapTrident.strategy.sol @@ -3,7 +3,7 @@ pragma solidity 0.8.7; import "@openzeppelin/contracts/interfaces/IERC20.sol"; import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol"; -import "@zetachain/protocol-contracts/contracts/ZetaTokenConsumerTrident.strategy.sol"; +import "@zetachain/protocol-contracts-deprecated/contracts/ZetaTokenConsumerTrident.strategy.sol"; import "./MultiChainSwapErrors.sol"; import "./MultiChainSwap.sol"; @@ -137,11 +137,9 @@ contract MultiChainSwapTrident is MultiChainSwap, ZetaInteractor, MultiChainSwap ); } - function onZetaMessage(ZetaInterfaces.ZetaMessage calldata zetaMessage) - external - override - isValidMessageCall(zetaMessage) - { + function onZetaMessage( + ZetaInterfaces.ZetaMessage calldata zetaMessage + ) external override isValidMessageCall(zetaMessage) { ( bytes32 messageType, address sourceTxOrigin, @@ -197,11 +195,9 @@ contract MultiChainSwapTrident is MultiChainSwap, ZetaInteractor, MultiChainSwap ); } - function onZetaRevert(ZetaInterfaces.ZetaRevert calldata zetaRevert) - external - override - isValidRevertCall(zetaRevert) - { + function onZetaRevert( + ZetaInterfaces.ZetaRevert calldata zetaRevert + ) external override isValidRevertCall(zetaRevert) { /** * @dev If something goes wrong we must swap to the source input token */ diff --git a/packages/example-contracts/contracts/multi-chain-swap/MultiChainSwapUniV3.strategy.sol b/packages/example-contracts/contracts/multi-chain-swap/MultiChainSwapUniV3.strategy.sol index b3adf525..010a37f0 100644 --- a/packages/example-contracts/contracts/multi-chain-swap/MultiChainSwapUniV3.strategy.sol +++ b/packages/example-contracts/contracts/multi-chain-swap/MultiChainSwapUniV3.strategy.sol @@ -3,7 +3,7 @@ pragma solidity 0.8.7; import "@openzeppelin/contracts/interfaces/IERC20.sol"; import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol"; -import "@zetachain/protocol-contracts/contracts/ZetaTokenConsumerUniV3.strategy.sol"; +import "@zetachain/protocol-contracts/contracts/evm/tools/ZetaTokenConsumerUniV3.strategy.sol"; import "./MultiChainSwapErrors.sol"; import "./MultiChainSwap.sol"; @@ -139,11 +139,9 @@ contract MultiChainSwapUniV3 is MultiChainSwap, ZetaInteractor, MultiChainSwapEr ); } - function onZetaMessage(ZetaInterfaces.ZetaMessage calldata zetaMessage) - external - override - isValidMessageCall(zetaMessage) - { + function onZetaMessage( + ZetaInterfaces.ZetaMessage calldata zetaMessage + ) external override isValidMessageCall(zetaMessage) { ( bytes32 messageType, address sourceTxOrigin, @@ -199,11 +197,9 @@ contract MultiChainSwapUniV3 is MultiChainSwap, ZetaInteractor, MultiChainSwapEr ); } - function onZetaRevert(ZetaInterfaces.ZetaRevert calldata zetaRevert) - external - override - isValidRevertCall(zetaRevert) - { + function onZetaRevert( + ZetaInterfaces.ZetaRevert calldata zetaRevert + ) external override isValidRevertCall(zetaRevert) { /** * @dev If something goes wrong we must swap to the source input token */ diff --git a/packages/example-contracts/contracts/multi-chain-swap/test/MultiChainSwapZetaConnector.sol b/packages/example-contracts/contracts/multi-chain-swap/test/MultiChainSwapZetaConnector.sol index e89bb745..795154f6 100644 --- a/packages/example-contracts/contracts/multi-chain-swap/test/MultiChainSwapZetaConnector.sol +++ b/packages/example-contracts/contracts/multi-chain-swap/test/MultiChainSwapZetaConnector.sol @@ -2,7 +2,7 @@ pragma solidity 0.8.7; import "@openzeppelin/contracts/interfaces/IERC20.sol"; -import "@zetachain/protocol-contracts/contracts/interfaces/ZetaInterfaces.sol"; +import "@zetachain/protocol-contracts/contracts/evm/interfaces/ZetaInterfaces.sol"; import "../MultiChainSwap.sol"; diff --git a/packages/example-contracts/contracts/shared/ImmutableCreate2Factory.sol b/packages/example-contracts/contracts/shared/ImmutableCreate2Factory.sol index 9e47166d..b97a3210 100644 --- a/packages/example-contracts/contracts/shared/ImmutableCreate2Factory.sol +++ b/packages/example-contracts/contracts/shared/ImmutableCreate2Factory.sol @@ -5,4 +5,4 @@ pragma solidity 0.5.10; * @dev Contracts that need to be compiled for testing purposes */ -import "@zetachain/protocol-contracts/contracts/ImmutableCreate2Factory.sol"; +import "@zetachain/protocol-contracts/contracts/evm/tools/ImmutableCreate2Factory.sol"; diff --git a/packages/example-contracts/contracts/shared/ZetaTestContracts.sol b/packages/example-contracts/contracts/shared/ZetaTestContracts.sol index 355fde4d..c2d645d4 100644 --- a/packages/example-contracts/contracts/shared/ZetaTestContracts.sol +++ b/packages/example-contracts/contracts/shared/ZetaTestContracts.sol @@ -5,4 +5,4 @@ pragma solidity 0.8.7; * @dev Contracts that need to be compiled for testing purposes */ -import "@zetachain/protocol-contracts/contracts/ZetaTokenConsumerUniV2.strategy.sol"; +import "@zetachain/protocol-contracts/contracts/evm/tools/ZetaTokenConsumerUniV2.strategy.sol"; diff --git a/packages/example-contracts/package.json b/packages/example-contracts/package.json index d1f11ce1..e0aeb91c 100644 --- a/packages/example-contracts/package.json +++ b/packages/example-contracts/package.json @@ -31,13 +31,13 @@ "tsconfig-paths": "^3.14.1" }, "dependencies": { - "@openzeppelin/contracts": "4.7.3", + "@openzeppelin/contracts": "^4.8.3", "@uniswap/v2-periphery": "1.1.0-beta.0", "@uniswap/v3-periphery": "1.1.0", "@zetachain/addresses": "workspace:^", "@zetachain/addresses-tools": "workspace:^", - "@zetachain/interfaces": "workspace:^", - "@zetachain/protocol-contracts": "workspace:^", + "@zetachain/protocol-contracts": "^0.0.6", + "@zetachain/protocol-contracts-deprecated": "workspace:^", "ethers": "5.6.8" } } diff --git a/packages/example-contracts/test/CrossChainMessage.spec.ts b/packages/example-contracts/test/CrossChainMessage.spec.ts index a302f1b2..9365138e 100644 --- a/packages/example-contracts/test/CrossChainMessage.spec.ts +++ b/packages/example-contracts/test/CrossChainMessage.spec.ts @@ -1,5 +1,5 @@ import { SignerWithAddress } from "@nomiclabs/hardhat-ethers/signers"; -import { ZetaTokenConsumerUniV2 } from "@zetachain/interfaces/typechain-types"; +import { ZetaTokenConsumerUniV2 } from "@zetachain/protocol-contracts/dist/typechain-types"; import { expect } from "chai"; import { parseEther } from "ethers/lib/utils"; import { ethers } from "hardhat"; @@ -133,7 +133,7 @@ describe("CrossChainMessage tests", () => { await tx.wait(); const helloWorldEventFilter = crossChainMessageContractChainB.filters.HelloWorldEvent(); - const e1 = await crossChainMessageContractChainB.queryFilter(helloWorldEventFilter); + const e1 = await crossChainMessageContractChainB.queryFilter(helloWorldEventFilter, tx.blockHash); expect(e1.length).to.equal(1); expect(e1[0].transactionHash).to.equal(tx.hash); }); diff --git a/packages/example-contracts/test/MultiChainSwapUniswapV3.spec.ts b/packages/example-contracts/test/MultiChainSwapUniswapV3.spec.ts index ad89e7dc..744e1640 100644 --- a/packages/example-contracts/test/MultiChainSwapUniswapV3.spec.ts +++ b/packages/example-contracts/test/MultiChainSwapUniswapV3.spec.ts @@ -3,7 +3,7 @@ import { BigNumber } from "@ethersproject/bignumber"; import { AddressZero, MaxUint256 } from "@ethersproject/constants"; import { parseEther, parseUnits } from "@ethersproject/units"; import { SignerWithAddress } from "@nomiclabs/hardhat-ethers/signers"; -import { IERC20__factory } from "@zetachain/interfaces/typechain-types"; +import { IERC20__factory } from "@zetachain/protocol-contracts/dist/typechain-types"; import chai, { expect } from "chai"; import { ethers } from "hardhat"; @@ -220,7 +220,7 @@ describe("MultiChainSwap tests", () => { expect(eventNames.filter(e => e === "ZetaExchangedForToken")).to.have.lengthOf(0); const swappedFilter = multiChainSwapContractB.filters.Swapped(); - const e1 = await multiChainSwapContractB.queryFilter(swappedFilter); + const e1 = await multiChainSwapContractB.queryFilter(swappedFilter, tx3.blockHash); expect(e1.length).to.equal(1); }); @@ -255,7 +255,7 @@ describe("MultiChainSwap tests", () => { expect(eventNames.filter(e => e === "ZetaExchangedForToken")).to.have.lengthOf(0); const swappedFilter = multiChainSwapContractB.filters.Swapped(); - const e1 = await multiChainSwapContractB.queryFilter(swappedFilter); + const e1 = await multiChainSwapContractB.queryFilter(swappedFilter, tx3.blockHash); expect(e1.length).to.equal(1); }); @@ -289,7 +289,7 @@ describe("MultiChainSwap tests", () => { expect(eventNames.filter(e => e === "ZetaExchangedForToken")).to.have.lengthOf(0); const swappedFilter = multiChainSwapContractB.filters.Swapped(); - const e1 = await multiChainSwapContractB.queryFilter(swappedFilter); + const e1 = await multiChainSwapContractB.queryFilter(swappedFilter, tx3.blockHash); expect(e1.length).to.equal(1); }); @@ -324,7 +324,7 @@ describe("MultiChainSwap tests", () => { expect(eventNames.filter(e => e === "ZetaExchangedForToken")).to.have.lengthOf(0); const swappedFilter = multiChainSwapContractB.filters.Swapped(); - const e1 = await multiChainSwapContractB.queryFilter(swappedFilter); + const e1 = await multiChainSwapContractB.queryFilter(swappedFilter, tx3.blockHash); expect(e1.length).to.equal(1); }); @@ -359,7 +359,7 @@ describe("MultiChainSwap tests", () => { expect(eventNames.filter(e => e === "ZetaExchangedForToken")).to.have.lengthOf(1); const swappedFilter = multiChainSwapContractB.filters.Swapped(); - const e1 = await multiChainSwapContractB.queryFilter(swappedFilter); + const e1 = await multiChainSwapContractB.queryFilter(swappedFilter, tx3.blockHash); expect(e1.length).to.equal(1); }); @@ -394,7 +394,7 @@ describe("MultiChainSwap tests", () => { expect(eventNames.filter(e => e === "ZetaExchangedForToken")).to.have.lengthOf(1); const swappedFilter = multiChainSwapContractB.filters.Swapped(); - const e1 = await multiChainSwapContractB.queryFilter(swappedFilter); + const e1 = await multiChainSwapContractB.queryFilter(swappedFilter, tx3.blockHash); expect(e1.length).to.equal(1); }); @@ -447,7 +447,7 @@ describe("MultiChainSwap tests", () => { await tx3.wait(); const swappedFilter = multiChainSwapContractB.filters.Swapped(); - const e1 = await multiChainSwapContractB.queryFilter(swappedFilter); + const e1 = await multiChainSwapContractB.queryFilter(swappedFilter, tx3.blockHash); expect(e1.length).to.equal(1); }); @@ -648,7 +648,7 @@ describe("MultiChainSwap tests", () => { ); const swappedFilter = multiChainSwapContractA.filters.RevertedSwap(); - const e1 = await multiChainSwapContractA.queryFilter(swappedFilter); + const e1 = await multiChainSwapContractA.queryFilter(swappedFilter, tx2.blockHash); expect(e1.length).to.equal(1); }); }); diff --git a/packages/example-contracts/test/test.helpers.ts b/packages/example-contracts/test/test.helpers.ts index 1546e52c..84603c54 100644 --- a/packages/example-contracts/test/test.helpers.ts +++ b/packages/example-contracts/test/test.helpers.ts @@ -1,6 +1,6 @@ import { MaxUint256 } from "@ethersproject/constants"; import { SignerWithAddress } from "@nomiclabs/hardhat-ethers/signers"; -import { ZetaTokenConsumerUniV3__factory } from "@zetachain/interfaces/typechain-types"; +import { ZetaTokenConsumerUniV3__factory } from "@zetachain/protocol-contracts/dist/typechain-types"; import { BigNumber, ContractReceipt } from "ethers"; import { getAddress } from "../lib/shared/address.helpers"; diff --git a/packages/interfaces/.gitignore b/packages/interfaces/.gitignore deleted file mode 100644 index aaad1b1b..00000000 --- a/packages/interfaces/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -# Typechain -!typechain-types diff --git a/packages/interfaces/README.md b/packages/interfaces/README.md deleted file mode 100644 index 7dedbfd4..00000000 --- a/packages/interfaces/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# ZetaChain interfaces - -This package includes the interfaces to use Zetachain like abi and TS types. diff --git a/packages/interfaces/abi/json/@openzeppelin/contracts/access/Ownable.sol/Ownable.json b/packages/interfaces/abi/json/@openzeppelin/contracts/access/Ownable.sol/Ownable.json deleted file mode 100644 index 310a2968..00000000 --- a/packages/interfaces/abi/json/@openzeppelin/contracts/access/Ownable.sol/Ownable.json +++ /dev/null @@ -1,54 +0,0 @@ -[ - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "previousOwner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "newOwner", - "type": "address" - } - ], - "name": "OwnershipTransferred", - "type": "event" - }, - { - "inputs": [], - "name": "owner", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "renounceOwnership", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "newOwner", - "type": "address" - } - ], - "name": "transferOwnership", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - } -] diff --git a/packages/interfaces/abi/json/@openzeppelin/contracts/security/Pausable.sol/Pausable.json b/packages/interfaces/abi/json/@openzeppelin/contracts/security/Pausable.sol/Pausable.json deleted file mode 100644 index 98525601..00000000 --- a/packages/interfaces/abi/json/@openzeppelin/contracts/security/Pausable.sol/Pausable.json +++ /dev/null @@ -1,41 +0,0 @@ -[ - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "Paused", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "Unpaused", - "type": "event" - }, - { - "inputs": [], - "name": "paused", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - } -] diff --git a/packages/interfaces/abi/json/@openzeppelin/contracts/token/ERC20/ERC20.sol/ERC20.json b/packages/interfaces/abi/json/@openzeppelin/contracts/token/ERC20/ERC20.sol/ERC20.json deleted file mode 100644 index e1f61ef8..00000000 --- a/packages/interfaces/abi/json/@openzeppelin/contracts/token/ERC20/ERC20.sol/ERC20.json +++ /dev/null @@ -1,288 +0,0 @@ -[ - { - "inputs": [ - { - "internalType": "string", - "name": "name_", - "type": "string" - }, - { - "internalType": "string", - "name": "symbol_", - "type": "string" - } - ], - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "value", - "type": "uint256" - } - ], - "name": "Approval", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "value", - "type": "uint256" - } - ], - "name": "Transfer", - "type": "event" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "internalType": "address", - "name": "spender", - "type": "address" - } - ], - "name": "allowance", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "approve", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "balanceOf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "decimals", - "outputs": [ - { - "internalType": "uint8", - "name": "", - "type": "uint8" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "subtractedValue", - "type": "uint256" - } - ], - "name": "decreaseAllowance", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "addedValue", - "type": "uint256" - } - ], - "name": "increaseAllowance", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "name", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "symbol", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "totalSupply", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transfer", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transferFrom", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - } -] diff --git a/packages/interfaces/abi/json/@openzeppelin/contracts/token/ERC20/IERC20.sol/IERC20.json b/packages/interfaces/abi/json/@openzeppelin/contracts/token/ERC20/IERC20.sol/IERC20.json deleted file mode 100644 index 2a6f247e..00000000 --- a/packages/interfaces/abi/json/@openzeppelin/contracts/token/ERC20/IERC20.sol/IERC20.json +++ /dev/null @@ -1,185 +0,0 @@ -[ - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "value", - "type": "uint256" - } - ], - "name": "Approval", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "value", - "type": "uint256" - } - ], - "name": "Transfer", - "type": "event" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "internalType": "address", - "name": "spender", - "type": "address" - } - ], - "name": "allowance", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "approve", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "balanceOf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "totalSupply", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transfer", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transferFrom", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - } -] diff --git a/packages/interfaces/abi/json/@openzeppelin/contracts/token/ERC20/extensions/ERC20Burnable.sol/ERC20Burnable.json b/packages/interfaces/abi/json/@openzeppelin/contracts/token/ERC20/extensions/ERC20Burnable.sol/ERC20Burnable.json deleted file mode 100644 index 45723de7..00000000 --- a/packages/interfaces/abi/json/@openzeppelin/contracts/token/ERC20/extensions/ERC20Burnable.sol/ERC20Burnable.json +++ /dev/null @@ -1,303 +0,0 @@ -[ - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "value", - "type": "uint256" - } - ], - "name": "Approval", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "value", - "type": "uint256" - } - ], - "name": "Transfer", - "type": "event" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "internalType": "address", - "name": "spender", - "type": "address" - } - ], - "name": "allowance", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "approve", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "balanceOf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "burn", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "burnFrom", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "decimals", - "outputs": [ - { - "internalType": "uint8", - "name": "", - "type": "uint8" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "subtractedValue", - "type": "uint256" - } - ], - "name": "decreaseAllowance", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "addedValue", - "type": "uint256" - } - ], - "name": "increaseAllowance", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "name", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "symbol", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "totalSupply", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transfer", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transferFrom", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - } -] diff --git a/packages/interfaces/abi/json/@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol/IERC20Metadata.json b/packages/interfaces/abi/json/@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol/IERC20Metadata.json deleted file mode 100644 index 177ac839..00000000 --- a/packages/interfaces/abi/json/@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol/IERC20Metadata.json +++ /dev/null @@ -1,224 +0,0 @@ -[ - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "value", - "type": "uint256" - } - ], - "name": "Approval", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "value", - "type": "uint256" - } - ], - "name": "Transfer", - "type": "event" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "internalType": "address", - "name": "spender", - "type": "address" - } - ], - "name": "allowance", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "approve", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "balanceOf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "decimals", - "outputs": [ - { - "internalType": "uint8", - "name": "", - "type": "uint8" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "name", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "symbol", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "totalSupply", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transfer", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transferFrom", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - } -] diff --git a/packages/interfaces/abi/json/@openzeppelin/contracts/token/ERC20/extensions/draft-IERC20Permit.sol/IERC20Permit.json b/packages/interfaces/abi/json/@openzeppelin/contracts/token/ERC20/extensions/draft-IERC20Permit.sol/IERC20Permit.json deleted file mode 100644 index 5e412778..00000000 --- a/packages/interfaces/abi/json/@openzeppelin/contracts/token/ERC20/extensions/draft-IERC20Permit.sol/IERC20Permit.json +++ /dev/null @@ -1,77 +0,0 @@ -[ - { - "inputs": [], - "name": "DOMAIN_SEPARATOR", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "name": "nonces", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "value", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "deadline", - "type": "uint256" - }, - { - "internalType": "uint8", - "name": "v", - "type": "uint8" - }, - { - "internalType": "bytes32", - "name": "r", - "type": "bytes32" - }, - { - "internalType": "bytes32", - "name": "s", - "type": "bytes32" - } - ], - "name": "permit", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - } -] diff --git a/packages/interfaces/abi/json/@uniswap/v2-core/contracts/interfaces/IUniswapV2Factory.sol/IUniswapV2Factory.json b/packages/interfaces/abi/json/@uniswap/v2-core/contracts/interfaces/IUniswapV2Factory.sol/IUniswapV2Factory.json deleted file mode 100644 index d8c9c7a8..00000000 --- a/packages/interfaces/abi/json/@uniswap/v2-core/contracts/interfaces/IUniswapV2Factory.sol/IUniswapV2Factory.json +++ /dev/null @@ -1,165 +0,0 @@ -[ - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "token0", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "token1", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "pair", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "name": "PairCreated", - "type": "event" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "name": "allPairs", - "outputs": [ - { - "internalType": "address", - "name": "pair", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "allPairsLength", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "tokenA", - "type": "address" - }, - { - "internalType": "address", - "name": "tokenB", - "type": "address" - } - ], - "name": "createPair", - "outputs": [ - { - "internalType": "address", - "name": "pair", - "type": "address" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "feeTo", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "feeToSetter", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "tokenA", - "type": "address" - }, - { - "internalType": "address", - "name": "tokenB", - "type": "address" - } - ], - "name": "getPair", - "outputs": [ - { - "internalType": "address", - "name": "pair", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "name": "setFeeTo", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "name": "setFeeToSetter", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - } -] diff --git a/packages/interfaces/abi/json/@uniswap/v2-core/contracts/interfaces/IUniswapV2Pair.sol/IUniswapV2Pair.json b/packages/interfaces/abi/json/@uniswap/v2-core/contracts/interfaces/IUniswapV2Pair.sol/IUniswapV2Pair.json deleted file mode 100644 index d3141815..00000000 --- a/packages/interfaces/abi/json/@uniswap/v2-core/contracts/interfaces/IUniswapV2Pair.sol/IUniswapV2Pair.json +++ /dev/null @@ -1,653 +0,0 @@ -[ - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "value", - "type": "uint256" - } - ], - "name": "Approval", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "sender", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount0", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount1", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - } - ], - "name": "Burn", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "sender", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount0", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount1", - "type": "uint256" - } - ], - "name": "Mint", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "sender", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount0In", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount1In", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount0Out", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount1Out", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - } - ], - "name": "Swap", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint112", - "name": "reserve0", - "type": "uint112" - }, - { - "indexed": false, - "internalType": "uint112", - "name": "reserve1", - "type": "uint112" - } - ], - "name": "Sync", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "value", - "type": "uint256" - } - ], - "name": "Transfer", - "type": "event" - }, - { - "inputs": [], - "name": "DOMAIN_SEPARATOR", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "MINIMUM_LIQUIDITY", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "pure", - "type": "function" - }, - { - "inputs": [], - "name": "PERMIT_TYPEHASH", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "pure", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "internalType": "address", - "name": "spender", - "type": "address" - } - ], - "name": "allowance", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "value", - "type": "uint256" - } - ], - "name": "approve", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "name": "balanceOf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "to", - "type": "address" - } - ], - "name": "burn", - "outputs": [ - { - "internalType": "uint256", - "name": "amount0", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "amount1", - "type": "uint256" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "decimals", - "outputs": [ - { - "internalType": "uint8", - "name": "", - "type": "uint8" - } - ], - "stateMutability": "pure", - "type": "function" - }, - { - "inputs": [], - "name": "factory", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "getReserves", - "outputs": [ - { - "internalType": "uint112", - "name": "reserve0", - "type": "uint112" - }, - { - "internalType": "uint112", - "name": "reserve1", - "type": "uint112" - }, - { - "internalType": "uint32", - "name": "blockTimestampLast", - "type": "uint32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - }, - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "name": "initialize", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "kLast", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "to", - "type": "address" - } - ], - "name": "mint", - "outputs": [ - { - "internalType": "uint256", - "name": "liquidity", - "type": "uint256" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "name", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "pure", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "name": "nonces", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "value", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "deadline", - "type": "uint256" - }, - { - "internalType": "uint8", - "name": "v", - "type": "uint8" - }, - { - "internalType": "bytes32", - "name": "r", - "type": "bytes32" - }, - { - "internalType": "bytes32", - "name": "s", - "type": "bytes32" - } - ], - "name": "permit", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "price0CumulativeLast", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "price1CumulativeLast", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "to", - "type": "address" - } - ], - "name": "skim", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "amount0Out", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "amount1Out", - "type": "uint256" - }, - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "swap", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "symbol", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "pure", - "type": "function" - }, - { - "inputs": [], - "name": "sync", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "token0", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "token1", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "totalSupply", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "value", - "type": "uint256" - } - ], - "name": "transfer", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "value", - "type": "uint256" - } - ], - "name": "transferFrom", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - } -] diff --git a/packages/interfaces/abi/json/@uniswap/v2-periphery/contracts/UniswapV2Router02.sol/UniswapV2Router02.json b/packages/interfaces/abi/json/@uniswap/v2-periphery/contracts/UniswapV2Router02.sol/UniswapV2Router02.json deleted file mode 100644 index c1d05c2c..00000000 --- a/packages/interfaces/abi/json/@uniswap/v2-periphery/contracts/UniswapV2Router02.sol/UniswapV2Router02.json +++ /dev/null @@ -1,973 +0,0 @@ -[ - { - "inputs": [ - { - "internalType": "address", - "name": "_factory", - "type": "address" - }, - { - "internalType": "address", - "name": "_WETH", - "type": "address" - } - ], - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "inputs": [], - "name": "WETH", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "tokenA", - "type": "address" - }, - { - "internalType": "address", - "name": "tokenB", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amountADesired", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "amountBDesired", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "amountAMin", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "amountBMin", - "type": "uint256" - }, - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "deadline", - "type": "uint256" - } - ], - "name": "addLiquidity", - "outputs": [ - { - "internalType": "uint256", - "name": "amountA", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "amountB", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "liquidity", - "type": "uint256" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "token", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amountTokenDesired", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "amountTokenMin", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "amountETHMin", - "type": "uint256" - }, - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "deadline", - "type": "uint256" - } - ], - "name": "addLiquidityETH", - "outputs": [ - { - "internalType": "uint256", - "name": "amountToken", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "amountETH", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "liquidity", - "type": "uint256" - } - ], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [], - "name": "factory", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "amountOut", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "reserveIn", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "reserveOut", - "type": "uint256" - } - ], - "name": "getAmountIn", - "outputs": [ - { - "internalType": "uint256", - "name": "amountIn", - "type": "uint256" - } - ], - "stateMutability": "pure", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "amountIn", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "reserveIn", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "reserveOut", - "type": "uint256" - } - ], - "name": "getAmountOut", - "outputs": [ - { - "internalType": "uint256", - "name": "amountOut", - "type": "uint256" - } - ], - "stateMutability": "pure", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "amountOut", - "type": "uint256" - }, - { - "internalType": "address[]", - "name": "path", - "type": "address[]" - } - ], - "name": "getAmountsIn", - "outputs": [ - { - "internalType": "uint256[]", - "name": "amounts", - "type": "uint256[]" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "amountIn", - "type": "uint256" - }, - { - "internalType": "address[]", - "name": "path", - "type": "address[]" - } - ], - "name": "getAmountsOut", - "outputs": [ - { - "internalType": "uint256[]", - "name": "amounts", - "type": "uint256[]" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "amountA", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "reserveA", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "reserveB", - "type": "uint256" - } - ], - "name": "quote", - "outputs": [ - { - "internalType": "uint256", - "name": "amountB", - "type": "uint256" - } - ], - "stateMutability": "pure", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "tokenA", - "type": "address" - }, - { - "internalType": "address", - "name": "tokenB", - "type": "address" - }, - { - "internalType": "uint256", - "name": "liquidity", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "amountAMin", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "amountBMin", - "type": "uint256" - }, - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "deadline", - "type": "uint256" - } - ], - "name": "removeLiquidity", - "outputs": [ - { - "internalType": "uint256", - "name": "amountA", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "amountB", - "type": "uint256" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "token", - "type": "address" - }, - { - "internalType": "uint256", - "name": "liquidity", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "amountTokenMin", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "amountETHMin", - "type": "uint256" - }, - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "deadline", - "type": "uint256" - } - ], - "name": "removeLiquidityETH", - "outputs": [ - { - "internalType": "uint256", - "name": "amountToken", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "amountETH", - "type": "uint256" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "token", - "type": "address" - }, - { - "internalType": "uint256", - "name": "liquidity", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "amountTokenMin", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "amountETHMin", - "type": "uint256" - }, - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "deadline", - "type": "uint256" - } - ], - "name": "removeLiquidityETHSupportingFeeOnTransferTokens", - "outputs": [ - { - "internalType": "uint256", - "name": "amountETH", - "type": "uint256" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "token", - "type": "address" - }, - { - "internalType": "uint256", - "name": "liquidity", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "amountTokenMin", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "amountETHMin", - "type": "uint256" - }, - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "deadline", - "type": "uint256" - }, - { - "internalType": "bool", - "name": "approveMax", - "type": "bool" - }, - { - "internalType": "uint8", - "name": "v", - "type": "uint8" - }, - { - "internalType": "bytes32", - "name": "r", - "type": "bytes32" - }, - { - "internalType": "bytes32", - "name": "s", - "type": "bytes32" - } - ], - "name": "removeLiquidityETHWithPermit", - "outputs": [ - { - "internalType": "uint256", - "name": "amountToken", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "amountETH", - "type": "uint256" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "token", - "type": "address" - }, - { - "internalType": "uint256", - "name": "liquidity", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "amountTokenMin", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "amountETHMin", - "type": "uint256" - }, - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "deadline", - "type": "uint256" - }, - { - "internalType": "bool", - "name": "approveMax", - "type": "bool" - }, - { - "internalType": "uint8", - "name": "v", - "type": "uint8" - }, - { - "internalType": "bytes32", - "name": "r", - "type": "bytes32" - }, - { - "internalType": "bytes32", - "name": "s", - "type": "bytes32" - } - ], - "name": "removeLiquidityETHWithPermitSupportingFeeOnTransferTokens", - "outputs": [ - { - "internalType": "uint256", - "name": "amountETH", - "type": "uint256" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "tokenA", - "type": "address" - }, - { - "internalType": "address", - "name": "tokenB", - "type": "address" - }, - { - "internalType": "uint256", - "name": "liquidity", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "amountAMin", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "amountBMin", - "type": "uint256" - }, - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "deadline", - "type": "uint256" - }, - { - "internalType": "bool", - "name": "approveMax", - "type": "bool" - }, - { - "internalType": "uint8", - "name": "v", - "type": "uint8" - }, - { - "internalType": "bytes32", - "name": "r", - "type": "bytes32" - }, - { - "internalType": "bytes32", - "name": "s", - "type": "bytes32" - } - ], - "name": "removeLiquidityWithPermit", - "outputs": [ - { - "internalType": "uint256", - "name": "amountA", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "amountB", - "type": "uint256" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "amountOut", - "type": "uint256" - }, - { - "internalType": "address[]", - "name": "path", - "type": "address[]" - }, - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "deadline", - "type": "uint256" - } - ], - "name": "swapETHForExactTokens", - "outputs": [ - { - "internalType": "uint256[]", - "name": "amounts", - "type": "uint256[]" - } - ], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "amountOutMin", - "type": "uint256" - }, - { - "internalType": "address[]", - "name": "path", - "type": "address[]" - }, - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "deadline", - "type": "uint256" - } - ], - "name": "swapExactETHForTokens", - "outputs": [ - { - "internalType": "uint256[]", - "name": "amounts", - "type": "uint256[]" - } - ], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "amountOutMin", - "type": "uint256" - }, - { - "internalType": "address[]", - "name": "path", - "type": "address[]" - }, - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "deadline", - "type": "uint256" - } - ], - "name": "swapExactETHForTokensSupportingFeeOnTransferTokens", - "outputs": [], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "amountIn", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "amountOutMin", - "type": "uint256" - }, - { - "internalType": "address[]", - "name": "path", - "type": "address[]" - }, - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "deadline", - "type": "uint256" - } - ], - "name": "swapExactTokensForETH", - "outputs": [ - { - "internalType": "uint256[]", - "name": "amounts", - "type": "uint256[]" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "amountIn", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "amountOutMin", - "type": "uint256" - }, - { - "internalType": "address[]", - "name": "path", - "type": "address[]" - }, - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "deadline", - "type": "uint256" - } - ], - "name": "swapExactTokensForETHSupportingFeeOnTransferTokens", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "amountIn", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "amountOutMin", - "type": "uint256" - }, - { - "internalType": "address[]", - "name": "path", - "type": "address[]" - }, - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "deadline", - "type": "uint256" - } - ], - "name": "swapExactTokensForTokens", - "outputs": [ - { - "internalType": "uint256[]", - "name": "amounts", - "type": "uint256[]" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "amountIn", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "amountOutMin", - "type": "uint256" - }, - { - "internalType": "address[]", - "name": "path", - "type": "address[]" - }, - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "deadline", - "type": "uint256" - } - ], - "name": "swapExactTokensForTokensSupportingFeeOnTransferTokens", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "amountOut", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "amountInMax", - "type": "uint256" - }, - { - "internalType": "address[]", - "name": "path", - "type": "address[]" - }, - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "deadline", - "type": "uint256" - } - ], - "name": "swapTokensForExactETH", - "outputs": [ - { - "internalType": "uint256[]", - "name": "amounts", - "type": "uint256[]" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "amountOut", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "amountInMax", - "type": "uint256" - }, - { - "internalType": "address[]", - "name": "path", - "type": "address[]" - }, - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "deadline", - "type": "uint256" - } - ], - "name": "swapTokensForExactTokens", - "outputs": [ - { - "internalType": "uint256[]", - "name": "amounts", - "type": "uint256[]" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "stateMutability": "payable", - "type": "receive" - } -] diff --git a/packages/interfaces/abi/json/@uniswap/v2-periphery/contracts/interfaces/IERC20.sol/IERC20.json b/packages/interfaces/abi/json/@uniswap/v2-periphery/contracts/interfaces/IERC20.sol/IERC20.json deleted file mode 100644 index 42d5877d..00000000 --- a/packages/interfaces/abi/json/@uniswap/v2-periphery/contracts/interfaces/IERC20.sol/IERC20.json +++ /dev/null @@ -1,224 +0,0 @@ -[ - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "value", - "type": "uint256" - } - ], - "name": "Approval", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "value", - "type": "uint256" - } - ], - "name": "Transfer", - "type": "event" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "internalType": "address", - "name": "spender", - "type": "address" - } - ], - "name": "allowance", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "value", - "type": "uint256" - } - ], - "name": "approve", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "name": "balanceOf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "decimals", - "outputs": [ - { - "internalType": "uint8", - "name": "", - "type": "uint8" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "name", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "symbol", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "totalSupply", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "value", - "type": "uint256" - } - ], - "name": "transfer", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "value", - "type": "uint256" - } - ], - "name": "transferFrom", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - } -] diff --git a/packages/interfaces/abi/json/@uniswap/v2-periphery/contracts/interfaces/IUniswapV2Router01.sol/IUniswapV2Router01.json b/packages/interfaces/abi/json/@uniswap/v2-periphery/contracts/interfaces/IUniswapV2Router01.sol/IUniswapV2Router01.json deleted file mode 100644 index be154174..00000000 --- a/packages/interfaces/abi/json/@uniswap/v2-periphery/contracts/interfaces/IUniswapV2Router01.sol/IUniswapV2Router01.json +++ /dev/null @@ -1,751 +0,0 @@ -[ - { - "inputs": [], - "name": "WETH", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "pure", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "tokenA", - "type": "address" - }, - { - "internalType": "address", - "name": "tokenB", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amountADesired", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "amountBDesired", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "amountAMin", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "amountBMin", - "type": "uint256" - }, - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "deadline", - "type": "uint256" - } - ], - "name": "addLiquidity", - "outputs": [ - { - "internalType": "uint256", - "name": "amountA", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "amountB", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "liquidity", - "type": "uint256" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "token", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amountTokenDesired", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "amountTokenMin", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "amountETHMin", - "type": "uint256" - }, - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "deadline", - "type": "uint256" - } - ], - "name": "addLiquidityETH", - "outputs": [ - { - "internalType": "uint256", - "name": "amountToken", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "amountETH", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "liquidity", - "type": "uint256" - } - ], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [], - "name": "factory", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "pure", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "amountOut", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "reserveIn", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "reserveOut", - "type": "uint256" - } - ], - "name": "getAmountIn", - "outputs": [ - { - "internalType": "uint256", - "name": "amountIn", - "type": "uint256" - } - ], - "stateMutability": "pure", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "amountIn", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "reserveIn", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "reserveOut", - "type": "uint256" - } - ], - "name": "getAmountOut", - "outputs": [ - { - "internalType": "uint256", - "name": "amountOut", - "type": "uint256" - } - ], - "stateMutability": "pure", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "amountOut", - "type": "uint256" - }, - { - "internalType": "address[]", - "name": "path", - "type": "address[]" - } - ], - "name": "getAmountsIn", - "outputs": [ - { - "internalType": "uint256[]", - "name": "amounts", - "type": "uint256[]" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "amountIn", - "type": "uint256" - }, - { - "internalType": "address[]", - "name": "path", - "type": "address[]" - } - ], - "name": "getAmountsOut", - "outputs": [ - { - "internalType": "uint256[]", - "name": "amounts", - "type": "uint256[]" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "amountA", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "reserveA", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "reserveB", - "type": "uint256" - } - ], - "name": "quote", - "outputs": [ - { - "internalType": "uint256", - "name": "amountB", - "type": "uint256" - } - ], - "stateMutability": "pure", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "tokenA", - "type": "address" - }, - { - "internalType": "address", - "name": "tokenB", - "type": "address" - }, - { - "internalType": "uint256", - "name": "liquidity", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "amountAMin", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "amountBMin", - "type": "uint256" - }, - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "deadline", - "type": "uint256" - } - ], - "name": "removeLiquidity", - "outputs": [ - { - "internalType": "uint256", - "name": "amountA", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "amountB", - "type": "uint256" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "token", - "type": "address" - }, - { - "internalType": "uint256", - "name": "liquidity", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "amountTokenMin", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "amountETHMin", - "type": "uint256" - }, - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "deadline", - "type": "uint256" - } - ], - "name": "removeLiquidityETH", - "outputs": [ - { - "internalType": "uint256", - "name": "amountToken", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "amountETH", - "type": "uint256" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "token", - "type": "address" - }, - { - "internalType": "uint256", - "name": "liquidity", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "amountTokenMin", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "amountETHMin", - "type": "uint256" - }, - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "deadline", - "type": "uint256" - }, - { - "internalType": "bool", - "name": "approveMax", - "type": "bool" - }, - { - "internalType": "uint8", - "name": "v", - "type": "uint8" - }, - { - "internalType": "bytes32", - "name": "r", - "type": "bytes32" - }, - { - "internalType": "bytes32", - "name": "s", - "type": "bytes32" - } - ], - "name": "removeLiquidityETHWithPermit", - "outputs": [ - { - "internalType": "uint256", - "name": "amountToken", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "amountETH", - "type": "uint256" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "tokenA", - "type": "address" - }, - { - "internalType": "address", - "name": "tokenB", - "type": "address" - }, - { - "internalType": "uint256", - "name": "liquidity", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "amountAMin", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "amountBMin", - "type": "uint256" - }, - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "deadline", - "type": "uint256" - }, - { - "internalType": "bool", - "name": "approveMax", - "type": "bool" - }, - { - "internalType": "uint8", - "name": "v", - "type": "uint8" - }, - { - "internalType": "bytes32", - "name": "r", - "type": "bytes32" - }, - { - "internalType": "bytes32", - "name": "s", - "type": "bytes32" - } - ], - "name": "removeLiquidityWithPermit", - "outputs": [ - { - "internalType": "uint256", - "name": "amountA", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "amountB", - "type": "uint256" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "amountOut", - "type": "uint256" - }, - { - "internalType": "address[]", - "name": "path", - "type": "address[]" - }, - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "deadline", - "type": "uint256" - } - ], - "name": "swapETHForExactTokens", - "outputs": [ - { - "internalType": "uint256[]", - "name": "amounts", - "type": "uint256[]" - } - ], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "amountOutMin", - "type": "uint256" - }, - { - "internalType": "address[]", - "name": "path", - "type": "address[]" - }, - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "deadline", - "type": "uint256" - } - ], - "name": "swapExactETHForTokens", - "outputs": [ - { - "internalType": "uint256[]", - "name": "amounts", - "type": "uint256[]" - } - ], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "amountIn", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "amountOutMin", - "type": "uint256" - }, - { - "internalType": "address[]", - "name": "path", - "type": "address[]" - }, - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "deadline", - "type": "uint256" - } - ], - "name": "swapExactTokensForETH", - "outputs": [ - { - "internalType": "uint256[]", - "name": "amounts", - "type": "uint256[]" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "amountIn", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "amountOutMin", - "type": "uint256" - }, - { - "internalType": "address[]", - "name": "path", - "type": "address[]" - }, - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "deadline", - "type": "uint256" - } - ], - "name": "swapExactTokensForTokens", - "outputs": [ - { - "internalType": "uint256[]", - "name": "amounts", - "type": "uint256[]" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "amountOut", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "amountInMax", - "type": "uint256" - }, - { - "internalType": "address[]", - "name": "path", - "type": "address[]" - }, - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "deadline", - "type": "uint256" - } - ], - "name": "swapTokensForExactETH", - "outputs": [ - { - "internalType": "uint256[]", - "name": "amounts", - "type": "uint256[]" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "amountOut", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "amountInMax", - "type": "uint256" - }, - { - "internalType": "address[]", - "name": "path", - "type": "address[]" - }, - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "deadline", - "type": "uint256" - } - ], - "name": "swapTokensForExactTokens", - "outputs": [ - { - "internalType": "uint256[]", - "name": "amounts", - "type": "uint256[]" - } - ], - "stateMutability": "nonpayable", - "type": "function" - } -] diff --git a/packages/interfaces/abi/json/@uniswap/v2-periphery/contracts/interfaces/IUniswapV2Router02.sol/IUniswapV2Router02.json b/packages/interfaces/abi/json/@uniswap/v2-periphery/contracts/interfaces/IUniswapV2Router02.sol/IUniswapV2Router02.json deleted file mode 100644 index 55ca7a73..00000000 --- a/packages/interfaces/abi/json/@uniswap/v2-periphery/contracts/interfaces/IUniswapV2Router02.sol/IUniswapV2Router02.json +++ /dev/null @@ -1,953 +0,0 @@ -[ - { - "inputs": [], - "name": "WETH", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "pure", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "tokenA", - "type": "address" - }, - { - "internalType": "address", - "name": "tokenB", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amountADesired", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "amountBDesired", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "amountAMin", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "amountBMin", - "type": "uint256" - }, - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "deadline", - "type": "uint256" - } - ], - "name": "addLiquidity", - "outputs": [ - { - "internalType": "uint256", - "name": "amountA", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "amountB", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "liquidity", - "type": "uint256" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "token", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amountTokenDesired", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "amountTokenMin", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "amountETHMin", - "type": "uint256" - }, - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "deadline", - "type": "uint256" - } - ], - "name": "addLiquidityETH", - "outputs": [ - { - "internalType": "uint256", - "name": "amountToken", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "amountETH", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "liquidity", - "type": "uint256" - } - ], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [], - "name": "factory", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "pure", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "amountOut", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "reserveIn", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "reserveOut", - "type": "uint256" - } - ], - "name": "getAmountIn", - "outputs": [ - { - "internalType": "uint256", - "name": "amountIn", - "type": "uint256" - } - ], - "stateMutability": "pure", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "amountIn", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "reserveIn", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "reserveOut", - "type": "uint256" - } - ], - "name": "getAmountOut", - "outputs": [ - { - "internalType": "uint256", - "name": "amountOut", - "type": "uint256" - } - ], - "stateMutability": "pure", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "amountOut", - "type": "uint256" - }, - { - "internalType": "address[]", - "name": "path", - "type": "address[]" - } - ], - "name": "getAmountsIn", - "outputs": [ - { - "internalType": "uint256[]", - "name": "amounts", - "type": "uint256[]" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "amountIn", - "type": "uint256" - }, - { - "internalType": "address[]", - "name": "path", - "type": "address[]" - } - ], - "name": "getAmountsOut", - "outputs": [ - { - "internalType": "uint256[]", - "name": "amounts", - "type": "uint256[]" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "amountA", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "reserveA", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "reserveB", - "type": "uint256" - } - ], - "name": "quote", - "outputs": [ - { - "internalType": "uint256", - "name": "amountB", - "type": "uint256" - } - ], - "stateMutability": "pure", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "tokenA", - "type": "address" - }, - { - "internalType": "address", - "name": "tokenB", - "type": "address" - }, - { - "internalType": "uint256", - "name": "liquidity", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "amountAMin", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "amountBMin", - "type": "uint256" - }, - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "deadline", - "type": "uint256" - } - ], - "name": "removeLiquidity", - "outputs": [ - { - "internalType": "uint256", - "name": "amountA", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "amountB", - "type": "uint256" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "token", - "type": "address" - }, - { - "internalType": "uint256", - "name": "liquidity", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "amountTokenMin", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "amountETHMin", - "type": "uint256" - }, - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "deadline", - "type": "uint256" - } - ], - "name": "removeLiquidityETH", - "outputs": [ - { - "internalType": "uint256", - "name": "amountToken", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "amountETH", - "type": "uint256" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "token", - "type": "address" - }, - { - "internalType": "uint256", - "name": "liquidity", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "amountTokenMin", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "amountETHMin", - "type": "uint256" - }, - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "deadline", - "type": "uint256" - } - ], - "name": "removeLiquidityETHSupportingFeeOnTransferTokens", - "outputs": [ - { - "internalType": "uint256", - "name": "amountETH", - "type": "uint256" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "token", - "type": "address" - }, - { - "internalType": "uint256", - "name": "liquidity", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "amountTokenMin", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "amountETHMin", - "type": "uint256" - }, - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "deadline", - "type": "uint256" - }, - { - "internalType": "bool", - "name": "approveMax", - "type": "bool" - }, - { - "internalType": "uint8", - "name": "v", - "type": "uint8" - }, - { - "internalType": "bytes32", - "name": "r", - "type": "bytes32" - }, - { - "internalType": "bytes32", - "name": "s", - "type": "bytes32" - } - ], - "name": "removeLiquidityETHWithPermit", - "outputs": [ - { - "internalType": "uint256", - "name": "amountToken", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "amountETH", - "type": "uint256" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "token", - "type": "address" - }, - { - "internalType": "uint256", - "name": "liquidity", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "amountTokenMin", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "amountETHMin", - "type": "uint256" - }, - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "deadline", - "type": "uint256" - }, - { - "internalType": "bool", - "name": "approveMax", - "type": "bool" - }, - { - "internalType": "uint8", - "name": "v", - "type": "uint8" - }, - { - "internalType": "bytes32", - "name": "r", - "type": "bytes32" - }, - { - "internalType": "bytes32", - "name": "s", - "type": "bytes32" - } - ], - "name": "removeLiquidityETHWithPermitSupportingFeeOnTransferTokens", - "outputs": [ - { - "internalType": "uint256", - "name": "amountETH", - "type": "uint256" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "tokenA", - "type": "address" - }, - { - "internalType": "address", - "name": "tokenB", - "type": "address" - }, - { - "internalType": "uint256", - "name": "liquidity", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "amountAMin", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "amountBMin", - "type": "uint256" - }, - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "deadline", - "type": "uint256" - }, - { - "internalType": "bool", - "name": "approveMax", - "type": "bool" - }, - { - "internalType": "uint8", - "name": "v", - "type": "uint8" - }, - { - "internalType": "bytes32", - "name": "r", - "type": "bytes32" - }, - { - "internalType": "bytes32", - "name": "s", - "type": "bytes32" - } - ], - "name": "removeLiquidityWithPermit", - "outputs": [ - { - "internalType": "uint256", - "name": "amountA", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "amountB", - "type": "uint256" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "amountOut", - "type": "uint256" - }, - { - "internalType": "address[]", - "name": "path", - "type": "address[]" - }, - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "deadline", - "type": "uint256" - } - ], - "name": "swapETHForExactTokens", - "outputs": [ - { - "internalType": "uint256[]", - "name": "amounts", - "type": "uint256[]" - } - ], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "amountOutMin", - "type": "uint256" - }, - { - "internalType": "address[]", - "name": "path", - "type": "address[]" - }, - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "deadline", - "type": "uint256" - } - ], - "name": "swapExactETHForTokens", - "outputs": [ - { - "internalType": "uint256[]", - "name": "amounts", - "type": "uint256[]" - } - ], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "amountOutMin", - "type": "uint256" - }, - { - "internalType": "address[]", - "name": "path", - "type": "address[]" - }, - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "deadline", - "type": "uint256" - } - ], - "name": "swapExactETHForTokensSupportingFeeOnTransferTokens", - "outputs": [], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "amountIn", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "amountOutMin", - "type": "uint256" - }, - { - "internalType": "address[]", - "name": "path", - "type": "address[]" - }, - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "deadline", - "type": "uint256" - } - ], - "name": "swapExactTokensForETH", - "outputs": [ - { - "internalType": "uint256[]", - "name": "amounts", - "type": "uint256[]" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "amountIn", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "amountOutMin", - "type": "uint256" - }, - { - "internalType": "address[]", - "name": "path", - "type": "address[]" - }, - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "deadline", - "type": "uint256" - } - ], - "name": "swapExactTokensForETHSupportingFeeOnTransferTokens", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "amountIn", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "amountOutMin", - "type": "uint256" - }, - { - "internalType": "address[]", - "name": "path", - "type": "address[]" - }, - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "deadline", - "type": "uint256" - } - ], - "name": "swapExactTokensForTokens", - "outputs": [ - { - "internalType": "uint256[]", - "name": "amounts", - "type": "uint256[]" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "amountIn", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "amountOutMin", - "type": "uint256" - }, - { - "internalType": "address[]", - "name": "path", - "type": "address[]" - }, - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "deadline", - "type": "uint256" - } - ], - "name": "swapExactTokensForTokensSupportingFeeOnTransferTokens", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "amountOut", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "amountInMax", - "type": "uint256" - }, - { - "internalType": "address[]", - "name": "path", - "type": "address[]" - }, - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "deadline", - "type": "uint256" - } - ], - "name": "swapTokensForExactETH", - "outputs": [ - { - "internalType": "uint256[]", - "name": "amounts", - "type": "uint256[]" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "amountOut", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "amountInMax", - "type": "uint256" - }, - { - "internalType": "address[]", - "name": "path", - "type": "address[]" - }, - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "deadline", - "type": "uint256" - } - ], - "name": "swapTokensForExactTokens", - "outputs": [ - { - "internalType": "uint256[]", - "name": "amounts", - "type": "uint256[]" - } - ], - "stateMutability": "nonpayable", - "type": "function" - } -] diff --git a/packages/interfaces/abi/json/@uniswap/v2-periphery/contracts/interfaces/IWETH.sol/IWETH.json b/packages/interfaces/abi/json/@uniswap/v2-periphery/contracts/interfaces/IWETH.sol/IWETH.json deleted file mode 100644 index 19287122..00000000 --- a/packages/interfaces/abi/json/@uniswap/v2-periphery/contracts/interfaces/IWETH.sol/IWETH.json +++ /dev/null @@ -1,46 +0,0 @@ -[ - { - "inputs": [], - "name": "deposit", - "outputs": [], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "value", - "type": "uint256" - } - ], - "name": "transfer", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "name": "withdraw", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - } -] diff --git a/packages/interfaces/abi/json/@uniswap/v3-core/contracts/interfaces/callback/IUniswapV3SwapCallback.sol/IUniswapV3SwapCallback.json b/packages/interfaces/abi/json/@uniswap/v3-core/contracts/interfaces/callback/IUniswapV3SwapCallback.sol/IUniswapV3SwapCallback.json deleted file mode 100644 index 03e7a2c0..00000000 --- a/packages/interfaces/abi/json/@uniswap/v3-core/contracts/interfaces/callback/IUniswapV3SwapCallback.sol/IUniswapV3SwapCallback.json +++ /dev/null @@ -1,25 +0,0 @@ -[ - { - "inputs": [ - { - "internalType": "int256", - "name": "amount0Delta", - "type": "int256" - }, - { - "internalType": "int256", - "name": "amount1Delta", - "type": "int256" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "uniswapV3SwapCallback", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - } -] diff --git a/packages/interfaces/abi/json/@uniswap/v3-periphery/contracts/interfaces/IQuoter.sol/IQuoter.json b/packages/interfaces/abi/json/@uniswap/v3-periphery/contracts/interfaces/IQuoter.sol/IQuoter.json deleted file mode 100644 index ec672426..00000000 --- a/packages/interfaces/abi/json/@uniswap/v3-periphery/contracts/interfaces/IQuoter.sol/IQuoter.json +++ /dev/null @@ -1,128 +0,0 @@ -[ - { - "inputs": [ - { - "internalType": "bytes", - "name": "path", - "type": "bytes" - }, - { - "internalType": "uint256", - "name": "amountIn", - "type": "uint256" - } - ], - "name": "quoteExactInput", - "outputs": [ - { - "internalType": "uint256", - "name": "amountOut", - "type": "uint256" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "tokenIn", - "type": "address" - }, - { - "internalType": "address", - "name": "tokenOut", - "type": "address" - }, - { - "internalType": "uint24", - "name": "fee", - "type": "uint24" - }, - { - "internalType": "uint256", - "name": "amountIn", - "type": "uint256" - }, - { - "internalType": "uint160", - "name": "sqrtPriceLimitX96", - "type": "uint160" - } - ], - "name": "quoteExactInputSingle", - "outputs": [ - { - "internalType": "uint256", - "name": "amountOut", - "type": "uint256" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes", - "name": "path", - "type": "bytes" - }, - { - "internalType": "uint256", - "name": "amountOut", - "type": "uint256" - } - ], - "name": "quoteExactOutput", - "outputs": [ - { - "internalType": "uint256", - "name": "amountIn", - "type": "uint256" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "tokenIn", - "type": "address" - }, - { - "internalType": "address", - "name": "tokenOut", - "type": "address" - }, - { - "internalType": "uint24", - "name": "fee", - "type": "uint24" - }, - { - "internalType": "uint256", - "name": "amountOut", - "type": "uint256" - }, - { - "internalType": "uint160", - "name": "sqrtPriceLimitX96", - "type": "uint160" - } - ], - "name": "quoteExactOutputSingle", - "outputs": [ - { - "internalType": "uint256", - "name": "amountIn", - "type": "uint256" - } - ], - "stateMutability": "nonpayable", - "type": "function" - } -] diff --git a/packages/interfaces/abi/json/@uniswap/v3-periphery/contracts/interfaces/ISwapRouter.sol/ISwapRouter.json b/packages/interfaces/abi/json/@uniswap/v3-periphery/contracts/interfaces/ISwapRouter.sol/ISwapRouter.json deleted file mode 100644 index 21e3a353..00000000 --- a/packages/interfaces/abi/json/@uniswap/v3-periphery/contracts/interfaces/ISwapRouter.sol/ISwapRouter.json +++ /dev/null @@ -1,239 +0,0 @@ -[ - { - "inputs": [ - { - "components": [ - { - "internalType": "bytes", - "name": "path", - "type": "bytes" - }, - { - "internalType": "address", - "name": "recipient", - "type": "address" - }, - { - "internalType": "uint256", - "name": "deadline", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "amountIn", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "amountOutMinimum", - "type": "uint256" - } - ], - "internalType": "struct ISwapRouter.ExactInputParams", - "name": "params", - "type": "tuple" - } - ], - "name": "exactInput", - "outputs": [ - { - "internalType": "uint256", - "name": "amountOut", - "type": "uint256" - } - ], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [ - { - "components": [ - { - "internalType": "address", - "name": "tokenIn", - "type": "address" - }, - { - "internalType": "address", - "name": "tokenOut", - "type": "address" - }, - { - "internalType": "uint24", - "name": "fee", - "type": "uint24" - }, - { - "internalType": "address", - "name": "recipient", - "type": "address" - }, - { - "internalType": "uint256", - "name": "deadline", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "amountIn", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "amountOutMinimum", - "type": "uint256" - }, - { - "internalType": "uint160", - "name": "sqrtPriceLimitX96", - "type": "uint160" - } - ], - "internalType": "struct ISwapRouter.ExactInputSingleParams", - "name": "params", - "type": "tuple" - } - ], - "name": "exactInputSingle", - "outputs": [ - { - "internalType": "uint256", - "name": "amountOut", - "type": "uint256" - } - ], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [ - { - "components": [ - { - "internalType": "bytes", - "name": "path", - "type": "bytes" - }, - { - "internalType": "address", - "name": "recipient", - "type": "address" - }, - { - "internalType": "uint256", - "name": "deadline", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "amountOut", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "amountInMaximum", - "type": "uint256" - } - ], - "internalType": "struct ISwapRouter.ExactOutputParams", - "name": "params", - "type": "tuple" - } - ], - "name": "exactOutput", - "outputs": [ - { - "internalType": "uint256", - "name": "amountIn", - "type": "uint256" - } - ], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [ - { - "components": [ - { - "internalType": "address", - "name": "tokenIn", - "type": "address" - }, - { - "internalType": "address", - "name": "tokenOut", - "type": "address" - }, - { - "internalType": "uint24", - "name": "fee", - "type": "uint24" - }, - { - "internalType": "address", - "name": "recipient", - "type": "address" - }, - { - "internalType": "uint256", - "name": "deadline", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "amountOut", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "amountInMaximum", - "type": "uint256" - }, - { - "internalType": "uint160", - "name": "sqrtPriceLimitX96", - "type": "uint160" - } - ], - "internalType": "struct ISwapRouter.ExactOutputSingleParams", - "name": "params", - "type": "tuple" - } - ], - "name": "exactOutputSingle", - "outputs": [ - { - "internalType": "uint256", - "name": "amountIn", - "type": "uint256" - } - ], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "int256", - "name": "amount0Delta", - "type": "int256" - }, - { - "internalType": "int256", - "name": "amount1Delta", - "type": "int256" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "uniswapV3SwapCallback", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - } -] diff --git a/packages/interfaces/abi/json/contracts/ImmutableCreate2Factory.sol/ImmutableCreate2Factory.json b/packages/interfaces/abi/json/contracts/ImmutableCreate2Factory.sol/ImmutableCreate2Factory.json deleted file mode 100644 index 9abaed22..00000000 --- a/packages/interfaces/abi/json/contracts/ImmutableCreate2Factory.sol/ImmutableCreate2Factory.json +++ /dev/null @@ -1,113 +0,0 @@ -[ - { - "constant": true, - "inputs": [ - { - "name": "deploymentAddress", - "type": "address" - } - ], - "name": "hasBeenDeployed", - "outputs": [ - { - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "name": "salt", - "type": "bytes32" - }, - { - "name": "initializationCode", - "type": "bytes" - } - ], - "name": "safeCreate2AndTransfer", - "outputs": [ - { - "name": "deploymentAddress", - "type": "address" - } - ], - "payable": true, - "stateMutability": "payable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "name": "salt", - "type": "bytes32" - }, - { - "name": "initializationCode", - "type": "bytes" - } - ], - "name": "safeCreate2", - "outputs": [ - { - "name": "deploymentAddress", - "type": "address" - } - ], - "payable": true, - "stateMutability": "payable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "name": "salt", - "type": "bytes32" - }, - { - "name": "initCode", - "type": "bytes" - } - ], - "name": "findCreate2Address", - "outputs": [ - { - "name": "deploymentAddress", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "name": "salt", - "type": "bytes32" - }, - { - "name": "initCodeHash", - "type": "bytes32" - } - ], - "name": "findCreate2AddressViaHash", - "outputs": [ - { - "name": "deploymentAddress", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - } -] diff --git a/packages/interfaces/abi/json/contracts/ImmutableCreate2Factory.sol/Ownable.json b/packages/interfaces/abi/json/contracts/ImmutableCreate2Factory.sol/Ownable.json deleted file mode 100644 index ef4e5ac6..00000000 --- a/packages/interfaces/abi/json/contracts/ImmutableCreate2Factory.sol/Ownable.json +++ /dev/null @@ -1,16 +0,0 @@ -[ - { - "constant": false, - "inputs": [ - { - "name": "newOwner", - "type": "address" - } - ], - "name": "transferOwnership", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - } -] diff --git a/packages/interfaces/abi/json/contracts/Zeta.eth.sol/ZetaEth.json b/packages/interfaces/abi/json/contracts/Zeta.eth.sol/ZetaEth.json deleted file mode 100644 index 80e345e6..00000000 --- a/packages/interfaces/abi/json/contracts/Zeta.eth.sol/ZetaEth.json +++ /dev/null @@ -1,283 +0,0 @@ -[ - { - "inputs": [ - { - "internalType": "uint256", - "name": "initialSupply", - "type": "uint256" - } - ], - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "value", - "type": "uint256" - } - ], - "name": "Approval", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "value", - "type": "uint256" - } - ], - "name": "Transfer", - "type": "event" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "internalType": "address", - "name": "spender", - "type": "address" - } - ], - "name": "allowance", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "approve", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "balanceOf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "decimals", - "outputs": [ - { - "internalType": "uint8", - "name": "", - "type": "uint8" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "subtractedValue", - "type": "uint256" - } - ], - "name": "decreaseAllowance", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "addedValue", - "type": "uint256" - } - ], - "name": "increaseAllowance", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "name", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "symbol", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "totalSupply", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transfer", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transferFrom", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - } -] diff --git a/packages/interfaces/abi/json/contracts/Zeta.non-eth.sol/ZetaNonEth.json b/packages/interfaces/abi/json/contracts/Zeta.non-eth.sol/ZetaNonEth.json deleted file mode 100644 index b9596116..00000000 --- a/packages/interfaces/abi/json/contracts/Zeta.non-eth.sol/ZetaNonEth.json +++ /dev/null @@ -1,504 +0,0 @@ -[ - { - "inputs": [ - { - "internalType": "address", - "name": "tssAddress_", - "type": "address" - }, - { - "internalType": "address", - "name": "tssAddressUpdater_", - "type": "address" - } - ], - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "caller", - "type": "address" - } - ], - "name": "CallerIsNotConnector", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "caller", - "type": "address" - } - ], - "name": "CallerIsNotTss", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "caller", - "type": "address" - } - ], - "name": "CallerIsNotTssOrUpdater", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "caller", - "type": "address" - } - ], - "name": "CallerIsNotTssUpdater", - "type": "error" - }, - { - "inputs": [], - "name": "InvalidAddress", - "type": "error" - }, - { - "inputs": [], - "name": "ZetaTransferError", - "type": "error" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "value", - "type": "uint256" - } - ], - "name": "Approval", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "burnee", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Burnt", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "mintee", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "bytes32", - "name": "internalSendHash", - "type": "bytes32" - } - ], - "name": "Minted", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "value", - "type": "uint256" - } - ], - "name": "Transfer", - "type": "event" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "internalType": "address", - "name": "spender", - "type": "address" - } - ], - "name": "allowance", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "approve", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "balanceOf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "burn", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "burnFrom", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "connectorAddress", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "decimals", - "outputs": [ - { - "internalType": "uint8", - "name": "", - "type": "uint8" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "subtractedValue", - "type": "uint256" - } - ], - "name": "decreaseAllowance", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "addedValue", - "type": "uint256" - } - ], - "name": "increaseAllowance", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "mintee", - "type": "address" - }, - { - "internalType": "uint256", - "name": "value", - "type": "uint256" - }, - { - "internalType": "bytes32", - "name": "internalSendHash", - "type": "bytes32" - } - ], - "name": "mint", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "name", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "renounceTssAddressUpdater", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "symbol", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "totalSupply", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transfer", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transferFrom", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "tssAddress", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "tssAddressUpdater", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "tssAddress_", - "type": "address" - }, - { - "internalType": "address", - "name": "connectorAddress_", - "type": "address" - } - ], - "name": "updateTssAndConnectorAddresses", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - } -] diff --git a/packages/interfaces/abi/json/contracts/ZetaConnector.base.sol/ZetaConnectorBase.json b/packages/interfaces/abi/json/contracts/ZetaConnector.base.sol/ZetaConnectorBase.json deleted file mode 100644 index 293a1a02..00000000 --- a/packages/interfaces/abi/json/contracts/ZetaConnector.base.sol/ZetaConnectorBase.json +++ /dev/null @@ -1,542 +0,0 @@ -[ - { - "inputs": [ - { - "internalType": "address", - "name": "zetaToken_", - "type": "address" - }, - { - "internalType": "address", - "name": "tssAddress_", - "type": "address" - }, - { - "internalType": "address", - "name": "tssAddressUpdater_", - "type": "address" - }, - { - "internalType": "address", - "name": "pauserAddress_", - "type": "address" - } - ], - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "caller", - "type": "address" - } - ], - "name": "CallerIsNotPauser", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "caller", - "type": "address" - } - ], - "name": "CallerIsNotTss", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "caller", - "type": "address" - } - ], - "name": "CallerIsNotTssOrUpdater", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "caller", - "type": "address" - } - ], - "name": "CallerIsNotTssUpdater", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "maxSupply", - "type": "uint256" - } - ], - "name": "ExceedsMaxSupply", - "type": "error" - }, - { - "inputs": [], - "name": "InvalidAddress", - "type": "error" - }, - { - "inputs": [], - "name": "ZetaTransferError", - "type": "error" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "Paused", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "updaterAddress", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newTssAddress", - "type": "address" - } - ], - "name": "PauserAddressUpdated", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "zetaTxSenderAddress", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newTssAddress", - "type": "address" - } - ], - "name": "TSSAddressUpdated", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "Unpaused", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "bytes", - "name": "zetaTxSenderAddress", - "type": "bytes" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "sourceChainId", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "address", - "name": "destinationAddress", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "zetaValue", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "bytes", - "name": "message", - "type": "bytes" - }, - { - "indexed": true, - "internalType": "bytes32", - "name": "internalSendHash", - "type": "bytes32" - } - ], - "name": "ZetaReceived", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "zetaTxSenderAddress", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "sourceChainId", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "destinationChainId", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "bytes", - "name": "destinationAddress", - "type": "bytes" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "remainingZetaValue", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "bytes", - "name": "message", - "type": "bytes" - }, - { - "indexed": true, - "internalType": "bytes32", - "name": "internalSendHash", - "type": "bytes32" - } - ], - "name": "ZetaReverted", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "sourceTxOriginAddress", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "zetaTxSenderAddress", - "type": "address" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "destinationChainId", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "bytes", - "name": "destinationAddress", - "type": "bytes" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "zetaValueAndGas", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "destinationGasLimit", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "bytes", - "name": "message", - "type": "bytes" - }, - { - "indexed": false, - "internalType": "bytes", - "name": "zetaParams", - "type": "bytes" - } - ], - "name": "ZetaSent", - "type": "event" - }, - { - "inputs": [ - { - "internalType": "bytes", - "name": "zetaTxSenderAddress", - "type": "bytes" - }, - { - "internalType": "uint256", - "name": "sourceChainId", - "type": "uint256" - }, - { - "internalType": "address", - "name": "destinationAddress", - "type": "address" - }, - { - "internalType": "uint256", - "name": "zetaValue", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "message", - "type": "bytes" - }, - { - "internalType": "bytes32", - "name": "internalSendHash", - "type": "bytes32" - } - ], - "name": "onReceive", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "zetaTxSenderAddress", - "type": "address" - }, - { - "internalType": "uint256", - "name": "sourceChainId", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "destinationAddress", - "type": "bytes" - }, - { - "internalType": "uint256", - "name": "destinationChainId", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "remainingZetaValue", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "message", - "type": "bytes" - }, - { - "internalType": "bytes32", - "name": "internalSendHash", - "type": "bytes32" - } - ], - "name": "onRevert", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "pause", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "paused", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "pauserAddress", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "renounceTssAddressUpdater", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "components": [ - { - "internalType": "uint256", - "name": "destinationChainId", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "destinationAddress", - "type": "bytes" - }, - { - "internalType": "uint256", - "name": "destinationGasLimit", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "message", - "type": "bytes" - }, - { - "internalType": "uint256", - "name": "zetaValueAndGas", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "zetaParams", - "type": "bytes" - } - ], - "internalType": "struct ZetaInterfaces.SendInput", - "name": "input", - "type": "tuple" - } - ], - "name": "send", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "tssAddress", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "tssAddressUpdater", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "unpause", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "pauserAddress_", - "type": "address" - } - ], - "name": "updatePauserAddress", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "tssAddress_", - "type": "address" - } - ], - "name": "updateTssAddress", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "zetaToken", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - } -] diff --git a/packages/interfaces/abi/json/contracts/ZetaConnector.eth.sol/ZetaConnectorEth.json b/packages/interfaces/abi/json/contracts/ZetaConnector.eth.sol/ZetaConnectorEth.json deleted file mode 100644 index 21407229..00000000 --- a/packages/interfaces/abi/json/contracts/ZetaConnector.eth.sol/ZetaConnectorEth.json +++ /dev/null @@ -1,555 +0,0 @@ -[ - { - "inputs": [ - { - "internalType": "address", - "name": "zetaToken_", - "type": "address" - }, - { - "internalType": "address", - "name": "tssAddress_", - "type": "address" - }, - { - "internalType": "address", - "name": "tssAddressUpdater_", - "type": "address" - }, - { - "internalType": "address", - "name": "pauserAddress_", - "type": "address" - } - ], - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "caller", - "type": "address" - } - ], - "name": "CallerIsNotPauser", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "caller", - "type": "address" - } - ], - "name": "CallerIsNotTss", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "caller", - "type": "address" - } - ], - "name": "CallerIsNotTssOrUpdater", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "caller", - "type": "address" - } - ], - "name": "CallerIsNotTssUpdater", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "maxSupply", - "type": "uint256" - } - ], - "name": "ExceedsMaxSupply", - "type": "error" - }, - { - "inputs": [], - "name": "InvalidAddress", - "type": "error" - }, - { - "inputs": [], - "name": "ZetaTransferError", - "type": "error" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "Paused", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "updaterAddress", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newTssAddress", - "type": "address" - } - ], - "name": "PauserAddressUpdated", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "zetaTxSenderAddress", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newTssAddress", - "type": "address" - } - ], - "name": "TSSAddressUpdated", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "Unpaused", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "bytes", - "name": "zetaTxSenderAddress", - "type": "bytes" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "sourceChainId", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "address", - "name": "destinationAddress", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "zetaValue", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "bytes", - "name": "message", - "type": "bytes" - }, - { - "indexed": true, - "internalType": "bytes32", - "name": "internalSendHash", - "type": "bytes32" - } - ], - "name": "ZetaReceived", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "zetaTxSenderAddress", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "sourceChainId", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "destinationChainId", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "bytes", - "name": "destinationAddress", - "type": "bytes" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "remainingZetaValue", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "bytes", - "name": "message", - "type": "bytes" - }, - { - "indexed": true, - "internalType": "bytes32", - "name": "internalSendHash", - "type": "bytes32" - } - ], - "name": "ZetaReverted", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "sourceTxOriginAddress", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "zetaTxSenderAddress", - "type": "address" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "destinationChainId", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "bytes", - "name": "destinationAddress", - "type": "bytes" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "zetaValueAndGas", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "destinationGasLimit", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "bytes", - "name": "message", - "type": "bytes" - }, - { - "indexed": false, - "internalType": "bytes", - "name": "zetaParams", - "type": "bytes" - } - ], - "name": "ZetaSent", - "type": "event" - }, - { - "inputs": [], - "name": "getLockedAmount", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes", - "name": "zetaTxSenderAddress", - "type": "bytes" - }, - { - "internalType": "uint256", - "name": "sourceChainId", - "type": "uint256" - }, - { - "internalType": "address", - "name": "destinationAddress", - "type": "address" - }, - { - "internalType": "uint256", - "name": "zetaValue", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "message", - "type": "bytes" - }, - { - "internalType": "bytes32", - "name": "internalSendHash", - "type": "bytes32" - } - ], - "name": "onReceive", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "zetaTxSenderAddress", - "type": "address" - }, - { - "internalType": "uint256", - "name": "sourceChainId", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "destinationAddress", - "type": "bytes" - }, - { - "internalType": "uint256", - "name": "destinationChainId", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "remainingZetaValue", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "message", - "type": "bytes" - }, - { - "internalType": "bytes32", - "name": "internalSendHash", - "type": "bytes32" - } - ], - "name": "onRevert", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "pause", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "paused", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "pauserAddress", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "renounceTssAddressUpdater", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "components": [ - { - "internalType": "uint256", - "name": "destinationChainId", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "destinationAddress", - "type": "bytes" - }, - { - "internalType": "uint256", - "name": "destinationGasLimit", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "message", - "type": "bytes" - }, - { - "internalType": "uint256", - "name": "zetaValueAndGas", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "zetaParams", - "type": "bytes" - } - ], - "internalType": "struct ZetaInterfaces.SendInput", - "name": "input", - "type": "tuple" - } - ], - "name": "send", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "tssAddress", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "tssAddressUpdater", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "unpause", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "pauserAddress_", - "type": "address" - } - ], - "name": "updatePauserAddress", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "tssAddress_", - "type": "address" - } - ], - "name": "updateTssAddress", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "zetaToken", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - } -] diff --git a/packages/interfaces/abi/json/contracts/ZetaConnector.non-eth.sol/ZetaConnectorNonEth.json b/packages/interfaces/abi/json/contracts/ZetaConnector.non-eth.sol/ZetaConnectorNonEth.json deleted file mode 100644 index 76732951..00000000 --- a/packages/interfaces/abi/json/contracts/ZetaConnector.non-eth.sol/ZetaConnectorNonEth.json +++ /dev/null @@ -1,581 +0,0 @@ -[ - { - "inputs": [ - { - "internalType": "address", - "name": "zetaTokenAddress_", - "type": "address" - }, - { - "internalType": "address", - "name": "tssAddress_", - "type": "address" - }, - { - "internalType": "address", - "name": "tssAddressUpdater_", - "type": "address" - }, - { - "internalType": "address", - "name": "pauserAddress_", - "type": "address" - } - ], - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "caller", - "type": "address" - } - ], - "name": "CallerIsNotPauser", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "caller", - "type": "address" - } - ], - "name": "CallerIsNotTss", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "caller", - "type": "address" - } - ], - "name": "CallerIsNotTssOrUpdater", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "caller", - "type": "address" - } - ], - "name": "CallerIsNotTssUpdater", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "maxSupply", - "type": "uint256" - } - ], - "name": "ExceedsMaxSupply", - "type": "error" - }, - { - "inputs": [], - "name": "InvalidAddress", - "type": "error" - }, - { - "inputs": [], - "name": "ZetaTransferError", - "type": "error" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "Paused", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "updaterAddress", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newTssAddress", - "type": "address" - } - ], - "name": "PauserAddressUpdated", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "zetaTxSenderAddress", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newTssAddress", - "type": "address" - } - ], - "name": "TSSAddressUpdated", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "Unpaused", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "bytes", - "name": "zetaTxSenderAddress", - "type": "bytes" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "sourceChainId", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "address", - "name": "destinationAddress", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "zetaValue", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "bytes", - "name": "message", - "type": "bytes" - }, - { - "indexed": true, - "internalType": "bytes32", - "name": "internalSendHash", - "type": "bytes32" - } - ], - "name": "ZetaReceived", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "zetaTxSenderAddress", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "sourceChainId", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "destinationChainId", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "bytes", - "name": "destinationAddress", - "type": "bytes" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "remainingZetaValue", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "bytes", - "name": "message", - "type": "bytes" - }, - { - "indexed": true, - "internalType": "bytes32", - "name": "internalSendHash", - "type": "bytes32" - } - ], - "name": "ZetaReverted", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "sourceTxOriginAddress", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "zetaTxSenderAddress", - "type": "address" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "destinationChainId", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "bytes", - "name": "destinationAddress", - "type": "bytes" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "zetaValueAndGas", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "destinationGasLimit", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "bytes", - "name": "message", - "type": "bytes" - }, - { - "indexed": false, - "internalType": "bytes", - "name": "zetaParams", - "type": "bytes" - } - ], - "name": "ZetaSent", - "type": "event" - }, - { - "inputs": [], - "name": "getLockedAmount", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "maxSupply", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes", - "name": "zetaTxSenderAddress", - "type": "bytes" - }, - { - "internalType": "uint256", - "name": "sourceChainId", - "type": "uint256" - }, - { - "internalType": "address", - "name": "destinationAddress", - "type": "address" - }, - { - "internalType": "uint256", - "name": "zetaValue", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "message", - "type": "bytes" - }, - { - "internalType": "bytes32", - "name": "internalSendHash", - "type": "bytes32" - } - ], - "name": "onReceive", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "zetaTxSenderAddress", - "type": "address" - }, - { - "internalType": "uint256", - "name": "sourceChainId", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "destinationAddress", - "type": "bytes" - }, - { - "internalType": "uint256", - "name": "destinationChainId", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "remainingZetaValue", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "message", - "type": "bytes" - }, - { - "internalType": "bytes32", - "name": "internalSendHash", - "type": "bytes32" - } - ], - "name": "onRevert", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "pause", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "paused", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "pauserAddress", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "renounceTssAddressUpdater", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "components": [ - { - "internalType": "uint256", - "name": "destinationChainId", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "destinationAddress", - "type": "bytes" - }, - { - "internalType": "uint256", - "name": "destinationGasLimit", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "message", - "type": "bytes" - }, - { - "internalType": "uint256", - "name": "zetaValueAndGas", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "zetaParams", - "type": "bytes" - } - ], - "internalType": "struct ZetaInterfaces.SendInput", - "name": "input", - "type": "tuple" - } - ], - "name": "send", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "maxSupply_", - "type": "uint256" - } - ], - "name": "setMaxSupply", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "tssAddress", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "tssAddressUpdater", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "unpause", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "pauserAddress_", - "type": "address" - } - ], - "name": "updatePauserAddress", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "tssAddress_", - "type": "address" - } - ], - "name": "updateTssAddress", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "zetaToken", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - } -] diff --git a/packages/interfaces/abi/json/contracts/ZetaInteractor.sol/ZetaInteractor.json b/packages/interfaces/abi/json/contracts/ZetaInteractor.sol/ZetaInteractor.json deleted file mode 100644 index c9c47ad2..00000000 --- a/packages/interfaces/abi/json/contracts/ZetaInteractor.sol/ZetaInteractor.json +++ /dev/null @@ -1,174 +0,0 @@ -[ - { - "inputs": [], - "name": "InvalidAddress", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "caller", - "type": "address" - } - ], - "name": "InvalidCaller", - "type": "error" - }, - { - "inputs": [], - "name": "InvalidDestinationChainId", - "type": "error" - }, - { - "inputs": [], - "name": "InvalidZetaMessageCall", - "type": "error" - }, - { - "inputs": [], - "name": "InvalidZetaRevertCall", - "type": "error" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "previousOwner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "newOwner", - "type": "address" - } - ], - "name": "OwnershipTransferStarted", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "previousOwner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "newOwner", - "type": "address" - } - ], - "name": "OwnershipTransferred", - "type": "event" - }, - { - "inputs": [], - "name": "acceptOwnership", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "connector", - "outputs": [ - { - "internalType": "contract ZetaConnector", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "name": "interactorsByChainId", - "outputs": [ - { - "internalType": "bytes", - "name": "", - "type": "bytes" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "owner", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "pendingOwner", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "renounceOwnership", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "destinationChainId", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "contractAddress", - "type": "bytes" - } - ], - "name": "setInteractorByChainId", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "newOwner", - "type": "address" - } - ], - "name": "transferOwnership", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - } -] diff --git a/packages/interfaces/abi/json/contracts/ZetaTokenConsumerTrident.strategy.sol/WETH9.json b/packages/interfaces/abi/json/contracts/ZetaTokenConsumerTrident.strategy.sol/WETH9.json deleted file mode 100644 index ee1a6bf7..00000000 --- a/packages/interfaces/abi/json/contracts/ZetaTokenConsumerTrident.strategy.sol/WETH9.json +++ /dev/null @@ -1,53 +0,0 @@ -[ - { - "inputs": [], - "name": "deposit", - "outputs": [], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "to", - "type": "address" - } - ], - "name": "depositTo", - "outputs": [], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "wad", - "type": "uint256" - } - ], - "name": "withdraw", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address payable", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "value", - "type": "uint256" - } - ], - "name": "withdrawTo", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - } -] diff --git a/packages/interfaces/abi/json/contracts/ZetaTokenConsumerTrident.strategy.sol/ZetaTokenConsumerTrident.json b/packages/interfaces/abi/json/contracts/ZetaTokenConsumerTrident.strategy.sol/ZetaTokenConsumerTrident.json deleted file mode 100644 index 2568adad..00000000 --- a/packages/interfaces/abi/json/contracts/ZetaTokenConsumerTrident.strategy.sol/ZetaTokenConsumerTrident.json +++ /dev/null @@ -1,300 +0,0 @@ -[ - { - "inputs": [ - { - "internalType": "address", - "name": "zetaToken_", - "type": "address" - }, - { - "internalType": "address", - "name": "uniswapV3Router_", - "type": "address" - }, - { - "internalType": "address", - "name": "WETH9Address_", - "type": "address" - }, - { - "internalType": "address", - "name": "poolFactory_", - "type": "address" - } - ], - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "inputs": [], - "name": "ErrorSendingETH", - "type": "error" - }, - { - "inputs": [], - "name": "InputCantBeZero", - "type": "error" - }, - { - "inputs": [], - "name": "InvalidAddress", - "type": "error" - }, - { - "inputs": [], - "name": "ReentrancyError", - "type": "error" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "amountIn", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amountOut", - "type": "uint256" - } - ], - "name": "EthExchangedForZeta", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "token", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amountIn", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amountOut", - "type": "uint256" - } - ], - "name": "TokenExchangedForZeta", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "amountIn", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amountOut", - "type": "uint256" - } - ], - "name": "ZetaExchangedForEth", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "token", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amountIn", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amountOut", - "type": "uint256" - } - ], - "name": "ZetaExchangedForToken", - "type": "event" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "destinationAddress", - "type": "address" - }, - { - "internalType": "uint256", - "name": "minAmountOut", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "zetaTokenAmount", - "type": "uint256" - } - ], - "name": "getEthFromZeta", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "destinationAddress", - "type": "address" - }, - { - "internalType": "uint256", - "name": "minAmountOut", - "type": "uint256" - }, - { - "internalType": "address", - "name": "outputToken", - "type": "address" - }, - { - "internalType": "uint256", - "name": "zetaTokenAmount", - "type": "uint256" - } - ], - "name": "getTokenFromZeta", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "destinationAddress", - "type": "address" - }, - { - "internalType": "uint256", - "name": "minAmountOut", - "type": "uint256" - } - ], - "name": "getZetaFromEth", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "destinationAddress", - "type": "address" - }, - { - "internalType": "uint256", - "name": "minAmountOut", - "type": "uint256" - }, - { - "internalType": "address", - "name": "inputToken", - "type": "address" - }, - { - "internalType": "uint256", - "name": "inputTokenAmount", - "type": "uint256" - } - ], - "name": "getZetaFromToken", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "poolFactory", - "outputs": [ - { - "internalType": "contract ConcentratedLiquidityPoolFactory", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "tridentRouter", - "outputs": [ - { - "internalType": "contract IPoolRouter", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "zetaToken", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "stateMutability": "payable", - "type": "receive" - } -] diff --git a/packages/interfaces/abi/json/contracts/ZetaTokenConsumerTrident.strategy.sol/ZetaTokenConsumerTridentErrors.json b/packages/interfaces/abi/json/contracts/ZetaTokenConsumerTrident.strategy.sol/ZetaTokenConsumerTridentErrors.json deleted file mode 100644 index 9b4f88fd..00000000 --- a/packages/interfaces/abi/json/contracts/ZetaTokenConsumerTrident.strategy.sol/ZetaTokenConsumerTridentErrors.json +++ /dev/null @@ -1,17 +0,0 @@ -[ - { - "inputs": [], - "name": "ErrorSendingETH", - "type": "error" - }, - { - "inputs": [], - "name": "InputCantBeZero", - "type": "error" - }, - { - "inputs": [], - "name": "ReentrancyError", - "type": "error" - } -] diff --git a/packages/interfaces/abi/json/contracts/ZetaTokenConsumerUniV2.strategy.sol/ZetaTokenConsumerUniV2.json b/packages/interfaces/abi/json/contracts/ZetaTokenConsumerUniV2.strategy.sol/ZetaTokenConsumerUniV2.json deleted file mode 100644 index c5c92d7e..00000000 --- a/packages/interfaces/abi/json/contracts/ZetaTokenConsumerUniV2.strategy.sol/ZetaTokenConsumerUniV2.json +++ /dev/null @@ -1,250 +0,0 @@ -[ - { - "inputs": [ - { - "internalType": "address", - "name": "zetaToken_", - "type": "address" - }, - { - "internalType": "address", - "name": "uniswapV2Router_", - "type": "address" - } - ], - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "inputs": [], - "name": "InputCantBeZero", - "type": "error" - }, - { - "inputs": [], - "name": "InvalidAddress", - "type": "error" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "amountIn", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amountOut", - "type": "uint256" - } - ], - "name": "EthExchangedForZeta", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "token", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amountIn", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amountOut", - "type": "uint256" - } - ], - "name": "TokenExchangedForZeta", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "amountIn", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amountOut", - "type": "uint256" - } - ], - "name": "ZetaExchangedForEth", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "token", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amountIn", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amountOut", - "type": "uint256" - } - ], - "name": "ZetaExchangedForToken", - "type": "event" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "destinationAddress", - "type": "address" - }, - { - "internalType": "uint256", - "name": "minAmountOut", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "zetaTokenAmount", - "type": "uint256" - } - ], - "name": "getEthFromZeta", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "destinationAddress", - "type": "address" - }, - { - "internalType": "uint256", - "name": "minAmountOut", - "type": "uint256" - }, - { - "internalType": "address", - "name": "outputToken", - "type": "address" - }, - { - "internalType": "uint256", - "name": "zetaTokenAmount", - "type": "uint256" - } - ], - "name": "getTokenFromZeta", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "destinationAddress", - "type": "address" - }, - { - "internalType": "uint256", - "name": "minAmountOut", - "type": "uint256" - } - ], - "name": "getZetaFromEth", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "destinationAddress", - "type": "address" - }, - { - "internalType": "uint256", - "name": "minAmountOut", - "type": "uint256" - }, - { - "internalType": "address", - "name": "inputToken", - "type": "address" - }, - { - "internalType": "uint256", - "name": "inputTokenAmount", - "type": "uint256" - } - ], - "name": "getZetaFromToken", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "zetaToken", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - } -] diff --git a/packages/interfaces/abi/json/contracts/ZetaTokenConsumerUniV2.strategy.sol/ZetaTokenConsumerUniV2Errors.json b/packages/interfaces/abi/json/contracts/ZetaTokenConsumerUniV2.strategy.sol/ZetaTokenConsumerUniV2Errors.json deleted file mode 100644 index 6f676ed8..00000000 --- a/packages/interfaces/abi/json/contracts/ZetaTokenConsumerUniV2.strategy.sol/ZetaTokenConsumerUniV2Errors.json +++ /dev/null @@ -1,7 +0,0 @@ -[ - { - "inputs": [], - "name": "InputCantBeZero", - "type": "error" - } -] diff --git a/packages/interfaces/abi/json/contracts/ZetaTokenConsumerUniV3.strategy.sol/WETH9.json b/packages/interfaces/abi/json/contracts/ZetaTokenConsumerUniV3.strategy.sol/WETH9.json deleted file mode 100644 index 2725b25c..00000000 --- a/packages/interfaces/abi/json/contracts/ZetaTokenConsumerUniV3.strategy.sol/WETH9.json +++ /dev/null @@ -1,15 +0,0 @@ -[ - { - "inputs": [ - { - "internalType": "uint256", - "name": "wad", - "type": "uint256" - } - ], - "name": "withdraw", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - } -] diff --git a/packages/interfaces/abi/json/contracts/ZetaTokenConsumerUniV3.strategy.sol/ZetaTokenConsumerUniV3.json b/packages/interfaces/abi/json/contracts/ZetaTokenConsumerUniV3.strategy.sol/ZetaTokenConsumerUniV3.json deleted file mode 100644 index 98817dc7..00000000 --- a/packages/interfaces/abi/json/contracts/ZetaTokenConsumerUniV3.strategy.sol/ZetaTokenConsumerUniV3.json +++ /dev/null @@ -1,336 +0,0 @@ -[ - { - "inputs": [ - { - "internalType": "address", - "name": "zetaToken_", - "type": "address" - }, - { - "internalType": "address", - "name": "uniswapV3Router_", - "type": "address" - }, - { - "internalType": "address", - "name": "quoter_", - "type": "address" - }, - { - "internalType": "address", - "name": "WETH9Address_", - "type": "address" - }, - { - "internalType": "uint24", - "name": "zetaPoolFee_", - "type": "uint24" - }, - { - "internalType": "uint24", - "name": "tokenPoolFee_", - "type": "uint24" - } - ], - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "inputs": [], - "name": "ErrorSendingETH", - "type": "error" - }, - { - "inputs": [], - "name": "InputCantBeZero", - "type": "error" - }, - { - "inputs": [], - "name": "InvalidAddress", - "type": "error" - }, - { - "inputs": [], - "name": "ReentrancyError", - "type": "error" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "amountIn", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amountOut", - "type": "uint256" - } - ], - "name": "EthExchangedForZeta", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "token", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amountIn", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amountOut", - "type": "uint256" - } - ], - "name": "TokenExchangedForZeta", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "amountIn", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amountOut", - "type": "uint256" - } - ], - "name": "ZetaExchangedForEth", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "token", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amountIn", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amountOut", - "type": "uint256" - } - ], - "name": "ZetaExchangedForToken", - "type": "event" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "destinationAddress", - "type": "address" - }, - { - "internalType": "uint256", - "name": "minAmountOut", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "zetaTokenAmount", - "type": "uint256" - } - ], - "name": "getEthFromZeta", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "destinationAddress", - "type": "address" - }, - { - "internalType": "uint256", - "name": "minAmountOut", - "type": "uint256" - }, - { - "internalType": "address", - "name": "outputToken", - "type": "address" - }, - { - "internalType": "uint256", - "name": "zetaTokenAmount", - "type": "uint256" - } - ], - "name": "getTokenFromZeta", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "destinationAddress", - "type": "address" - }, - { - "internalType": "uint256", - "name": "minAmountOut", - "type": "uint256" - } - ], - "name": "getZetaFromEth", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "destinationAddress", - "type": "address" - }, - { - "internalType": "uint256", - "name": "minAmountOut", - "type": "uint256" - }, - { - "internalType": "address", - "name": "inputToken", - "type": "address" - }, - { - "internalType": "uint256", - "name": "inputTokenAmount", - "type": "uint256" - } - ], - "name": "getZetaFromToken", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "quoter", - "outputs": [ - { - "internalType": "contract IQuoter", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "tokenPoolFee", - "outputs": [ - { - "internalType": "uint24", - "name": "", - "type": "uint24" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "uniswapV3Router", - "outputs": [ - { - "internalType": "contract ISwapRouter", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "zetaPoolFee", - "outputs": [ - { - "internalType": "uint24", - "name": "", - "type": "uint24" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "zetaToken", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "stateMutability": "payable", - "type": "receive" - } -] diff --git a/packages/interfaces/abi/json/contracts/ZetaTokenConsumerUniV3.strategy.sol/ZetaTokenConsumerUniV3Errors.json b/packages/interfaces/abi/json/contracts/ZetaTokenConsumerUniV3.strategy.sol/ZetaTokenConsumerUniV3Errors.json deleted file mode 100644 index 9b4f88fd..00000000 --- a/packages/interfaces/abi/json/contracts/ZetaTokenConsumerUniV3.strategy.sol/ZetaTokenConsumerUniV3Errors.json +++ /dev/null @@ -1,17 +0,0 @@ -[ - { - "inputs": [], - "name": "ErrorSendingETH", - "type": "error" - }, - { - "inputs": [], - "name": "InputCantBeZero", - "type": "error" - }, - { - "inputs": [], - "name": "ReentrancyError", - "type": "error" - } -] diff --git a/packages/interfaces/abi/json/contracts/interfaces/ConnectorErrors.sol/ConnectorErrors.json b/packages/interfaces/abi/json/contracts/interfaces/ConnectorErrors.sol/ConnectorErrors.json deleted file mode 100644 index 76090930..00000000 --- a/packages/interfaces/abi/json/contracts/interfaces/ConnectorErrors.sol/ConnectorErrors.json +++ /dev/null @@ -1,62 +0,0 @@ -[ - { - "inputs": [ - { - "internalType": "address", - "name": "caller", - "type": "address" - } - ], - "name": "CallerIsNotPauser", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "caller", - "type": "address" - } - ], - "name": "CallerIsNotTss", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "caller", - "type": "address" - } - ], - "name": "CallerIsNotTssOrUpdater", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "caller", - "type": "address" - } - ], - "name": "CallerIsNotTssUpdater", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "maxSupply", - "type": "uint256" - } - ], - "name": "ExceedsMaxSupply", - "type": "error" - }, - { - "inputs": [], - "name": "ZetaTransferError", - "type": "error" - } -] diff --git a/packages/interfaces/abi/json/contracts/interfaces/TridentConcentratedLiquidityPoolFactory.sol/ConcentratedLiquidityPoolFactory.json b/packages/interfaces/abi/json/contracts/interfaces/TridentConcentratedLiquidityPoolFactory.sol/ConcentratedLiquidityPoolFactory.json deleted file mode 100644 index 9a7fd0d3..00000000 --- a/packages/interfaces/abi/json/contracts/interfaces/TridentConcentratedLiquidityPoolFactory.sol/ConcentratedLiquidityPoolFactory.json +++ /dev/null @@ -1,36 +0,0 @@ -[ - { - "inputs": [ - { - "internalType": "address", - "name": "token0", - "type": "address" - }, - { - "internalType": "address", - "name": "token1", - "type": "address" - }, - { - "internalType": "uint256", - "name": "startIndex", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "count", - "type": "uint256" - } - ], - "name": "getPools", - "outputs": [ - { - "internalType": "address[]", - "name": "pairPools", - "type": "address[]" - } - ], - "stateMutability": "view", - "type": "function" - } -] diff --git a/packages/interfaces/abi/json/contracts/interfaces/TridentIPoolRouter.sol/IPoolRouter.json b/packages/interfaces/abi/json/contracts/interfaces/TridentIPoolRouter.sol/IPoolRouter.json deleted file mode 100644 index ac14d7c7..00000000 --- a/packages/interfaces/abi/json/contracts/interfaces/TridentIPoolRouter.sol/IPoolRouter.json +++ /dev/null @@ -1,229 +0,0 @@ -[ - { - "inputs": [ - { - "components": [ - { - "internalType": "address", - "name": "tokenIn", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amountIn", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "amountOutMinimum", - "type": "uint256" - }, - { - "internalType": "address[]", - "name": "path", - "type": "address[]" - }, - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "bool", - "name": "unwrap", - "type": "bool" - } - ], - "internalType": "struct IPoolRouter.ExactInputParams", - "name": "params", - "type": "tuple" - } - ], - "name": "exactInput", - "outputs": [ - { - "internalType": "uint256", - "name": "amountOut", - "type": "uint256" - } - ], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [ - { - "components": [ - { - "internalType": "address", - "name": "tokenIn", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amountIn", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "amountOutMinimum", - "type": "uint256" - }, - { - "internalType": "address", - "name": "pool", - "type": "address" - }, - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "bool", - "name": "unwrap", - "type": "bool" - } - ], - "internalType": "struct IPoolRouter.ExactInputSingleParams", - "name": "params", - "type": "tuple" - } - ], - "name": "exactInputSingle", - "outputs": [ - { - "internalType": "uint256", - "name": "amountOut", - "type": "uint256" - } - ], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [ - { - "components": [ - { - "internalType": "address", - "name": "tokenIn", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amountOut", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "amountInMaximum", - "type": "uint256" - }, - { - "internalType": "address[]", - "name": "path", - "type": "address[]" - }, - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "bool", - "name": "unwrap", - "type": "bool" - } - ], - "internalType": "struct IPoolRouter.ExactOutputParams", - "name": "params", - "type": "tuple" - } - ], - "name": "exactOutput", - "outputs": [ - { - "internalType": "uint256", - "name": "amountIn", - "type": "uint256" - } - ], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [ - { - "components": [ - { - "internalType": "address", - "name": "tokenIn", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amountOut", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "amountInMaximum", - "type": "uint256" - }, - { - "internalType": "address", - "name": "pool", - "type": "address" - }, - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "bool", - "name": "unwrap", - "type": "bool" - } - ], - "internalType": "struct IPoolRouter.ExactOutputSingleParams", - "name": "params", - "type": "tuple" - } - ], - "name": "exactOutputSingle", - "outputs": [ - { - "internalType": "uint256", - "name": "amountIn", - "type": "uint256" - } - ], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "token", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "internalType": "address", - "name": "recipient", - "type": "address" - } - ], - "name": "sweep", - "outputs": [], - "stateMutability": "payable", - "type": "function" - } -] diff --git a/packages/interfaces/abi/json/contracts/interfaces/ZetaErrors.sol/ZetaErrors.json b/packages/interfaces/abi/json/contracts/interfaces/ZetaErrors.sol/ZetaErrors.json deleted file mode 100644 index f7887293..00000000 --- a/packages/interfaces/abi/json/contracts/interfaces/ZetaErrors.sol/ZetaErrors.json +++ /dev/null @@ -1,56 +0,0 @@ -[ - { - "inputs": [ - { - "internalType": "address", - "name": "caller", - "type": "address" - } - ], - "name": "CallerIsNotConnector", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "caller", - "type": "address" - } - ], - "name": "CallerIsNotTss", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "caller", - "type": "address" - } - ], - "name": "CallerIsNotTssOrUpdater", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "caller", - "type": "address" - } - ], - "name": "CallerIsNotTssUpdater", - "type": "error" - }, - { - "inputs": [], - "name": "InvalidAddress", - "type": "error" - }, - { - "inputs": [], - "name": "ZetaTransferError", - "type": "error" - } -] diff --git a/packages/interfaces/abi/json/contracts/interfaces/ZetaInteractorErrors.sol/ZetaInteractorErrors.json b/packages/interfaces/abi/json/contracts/interfaces/ZetaInteractorErrors.sol/ZetaInteractorErrors.json deleted file mode 100644 index cbb5ad16..00000000 --- a/packages/interfaces/abi/json/contracts/interfaces/ZetaInteractorErrors.sol/ZetaInteractorErrors.json +++ /dev/null @@ -1,28 +0,0 @@ -[ - { - "inputs": [ - { - "internalType": "address", - "name": "caller", - "type": "address" - } - ], - "name": "InvalidCaller", - "type": "error" - }, - { - "inputs": [], - "name": "InvalidDestinationChainId", - "type": "error" - }, - { - "inputs": [], - "name": "InvalidZetaMessageCall", - "type": "error" - }, - { - "inputs": [], - "name": "InvalidZetaRevertCall", - "type": "error" - } -] diff --git a/packages/interfaces/abi/json/contracts/interfaces/ZetaInterfaces.sol/ZetaCommonErrors.json b/packages/interfaces/abi/json/contracts/interfaces/ZetaInterfaces.sol/ZetaCommonErrors.json deleted file mode 100644 index d64d606e..00000000 --- a/packages/interfaces/abi/json/contracts/interfaces/ZetaInterfaces.sol/ZetaCommonErrors.json +++ /dev/null @@ -1,7 +0,0 @@ -[ - { - "inputs": [], - "name": "InvalidAddress", - "type": "error" - } -] diff --git a/packages/interfaces/abi/json/contracts/interfaces/ZetaInterfaces.sol/ZetaConnector.json b/packages/interfaces/abi/json/contracts/interfaces/ZetaInterfaces.sol/ZetaConnector.json deleted file mode 100644 index a6da1b57..00000000 --- a/packages/interfaces/abi/json/contracts/interfaces/ZetaInterfaces.sol/ZetaConnector.json +++ /dev/null @@ -1,47 +0,0 @@ -[ - { - "inputs": [ - { - "components": [ - { - "internalType": "uint256", - "name": "destinationChainId", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "destinationAddress", - "type": "bytes" - }, - { - "internalType": "uint256", - "name": "destinationGasLimit", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "message", - "type": "bytes" - }, - { - "internalType": "uint256", - "name": "zetaValueAndGas", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "zetaParams", - "type": "bytes" - } - ], - "internalType": "struct ZetaInterfaces.SendInput", - "name": "input", - "type": "tuple" - } - ], - "name": "send", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - } -] diff --git a/packages/interfaces/abi/json/contracts/interfaces/ZetaInterfaces.sol/ZetaReceiver.json b/packages/interfaces/abi/json/contracts/interfaces/ZetaInterfaces.sol/ZetaReceiver.json deleted file mode 100644 index e70181e3..00000000 --- a/packages/interfaces/abi/json/contracts/interfaces/ZetaInterfaces.sol/ZetaReceiver.json +++ /dev/null @@ -1,87 +0,0 @@ -[ - { - "inputs": [ - { - "components": [ - { - "internalType": "bytes", - "name": "zetaTxSenderAddress", - "type": "bytes" - }, - { - "internalType": "uint256", - "name": "sourceChainId", - "type": "uint256" - }, - { - "internalType": "address", - "name": "destinationAddress", - "type": "address" - }, - { - "internalType": "uint256", - "name": "zetaValue", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "message", - "type": "bytes" - } - ], - "internalType": "struct ZetaInterfaces.ZetaMessage", - "name": "zetaMessage", - "type": "tuple" - } - ], - "name": "onZetaMessage", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "components": [ - { - "internalType": "address", - "name": "zetaTxSenderAddress", - "type": "address" - }, - { - "internalType": "uint256", - "name": "sourceChainId", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "destinationAddress", - "type": "bytes" - }, - { - "internalType": "uint256", - "name": "destinationChainId", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "remainingZetaValue", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "message", - "type": "bytes" - } - ], - "internalType": "struct ZetaInterfaces.ZetaRevert", - "name": "zetaRevert", - "type": "tuple" - } - ], - "name": "onZetaRevert", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - } -] diff --git a/packages/interfaces/abi/json/contracts/interfaces/ZetaInterfaces.sol/ZetaTokenConsumer.json b/packages/interfaces/abi/json/contracts/interfaces/ZetaInterfaces.sol/ZetaTokenConsumer.json deleted file mode 100644 index 4f3ac77f..00000000 --- a/packages/interfaces/abi/json/contracts/interfaces/ZetaInterfaces.sol/ZetaTokenConsumer.json +++ /dev/null @@ -1,211 +0,0 @@ -[ - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "amountIn", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amountOut", - "type": "uint256" - } - ], - "name": "EthExchangedForZeta", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "token", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amountIn", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amountOut", - "type": "uint256" - } - ], - "name": "TokenExchangedForZeta", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "amountIn", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amountOut", - "type": "uint256" - } - ], - "name": "ZetaExchangedForEth", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "token", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amountIn", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amountOut", - "type": "uint256" - } - ], - "name": "ZetaExchangedForToken", - "type": "event" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "destinationAddress", - "type": "address" - }, - { - "internalType": "uint256", - "name": "minAmountOut", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "zetaTokenAmount", - "type": "uint256" - } - ], - "name": "getEthFromZeta", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "destinationAddress", - "type": "address" - }, - { - "internalType": "uint256", - "name": "minAmountOut", - "type": "uint256" - }, - { - "internalType": "address", - "name": "outputToken", - "type": "address" - }, - { - "internalType": "uint256", - "name": "zetaTokenAmount", - "type": "uint256" - } - ], - "name": "getTokenFromZeta", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "destinationAddress", - "type": "address" - }, - { - "internalType": "uint256", - "name": "minAmountOut", - "type": "uint256" - } - ], - "name": "getZetaFromEth", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "destinationAddress", - "type": "address" - }, - { - "internalType": "uint256", - "name": "minAmountOut", - "type": "uint256" - }, - { - "internalType": "address", - "name": "inputToken", - "type": "address" - }, - { - "internalType": "uint256", - "name": "inputTokenAmount", - "type": "uint256" - } - ], - "name": "getZetaFromToken", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "nonpayable", - "type": "function" - } -] diff --git a/packages/interfaces/abi/json/contracts/interfaces/ZetaNonEthInterface.sol/ZetaNonEthInterface.json b/packages/interfaces/abi/json/contracts/interfaces/ZetaNonEthInterface.sol/ZetaNonEthInterface.json deleted file mode 100644 index 26ac30db..00000000 --- a/packages/interfaces/abi/json/contracts/interfaces/ZetaNonEthInterface.sol/ZetaNonEthInterface.json +++ /dev/null @@ -1,226 +0,0 @@ -[ - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "value", - "type": "uint256" - } - ], - "name": "Approval", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "value", - "type": "uint256" - } - ], - "name": "Transfer", - "type": "event" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "internalType": "address", - "name": "spender", - "type": "address" - } - ], - "name": "allowance", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "approve", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "balanceOf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "burnFrom", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "mintee", - "type": "address" - }, - { - "internalType": "uint256", - "name": "value", - "type": "uint256" - }, - { - "internalType": "bytes32", - "name": "internalSendHash", - "type": "bytes32" - } - ], - "name": "mint", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "totalSupply", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transfer", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transferFrom", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - } -] diff --git a/packages/interfaces/abi/json/contracts/openzeppelin/Ownable2Step.sol/Ownable2Step.json b/packages/interfaces/abi/json/contracts/openzeppelin/Ownable2Step.sol/Ownable2Step.json deleted file mode 100644 index ca792daa..00000000 --- a/packages/interfaces/abi/json/contracts/openzeppelin/Ownable2Step.sol/Ownable2Step.json +++ /dev/null @@ -1,93 +0,0 @@ -[ - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "previousOwner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "newOwner", - "type": "address" - } - ], - "name": "OwnershipTransferStarted", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "previousOwner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "newOwner", - "type": "address" - } - ], - "name": "OwnershipTransferred", - "type": "event" - }, - { - "inputs": [], - "name": "acceptOwnership", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "owner", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "pendingOwner", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "renounceOwnership", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "newOwner", - "type": "address" - } - ], - "name": "transferOwnership", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - } -] diff --git a/packages/interfaces/abi/json/contracts/testing/TestUniswapV3Contracts.sol/INonfungiblePositionManager.json b/packages/interfaces/abi/json/contracts/testing/TestUniswapV3Contracts.sol/INonfungiblePositionManager.json deleted file mode 100644 index 3741b1f7..00000000 --- a/packages/interfaces/abi/json/contracts/testing/TestUniswapV3Contracts.sol/INonfungiblePositionManager.json +++ /dev/null @@ -1,431 +0,0 @@ -[ - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "tokenId", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "address", - "name": "recipient", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount0", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount1", - "type": "uint256" - } - ], - "name": "Collect", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "tokenId", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint128", - "name": "liquidity", - "type": "uint128" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount0", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount1", - "type": "uint256" - } - ], - "name": "DecreaseLiquidity", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "tokenId", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint128", - "name": "liquidity", - "type": "uint128" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount0", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount1", - "type": "uint256" - } - ], - "name": "IncreaseLiquidity", - "type": "event" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "tokenId", - "type": "uint256" - } - ], - "name": "burn", - "outputs": [], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [ - { - "components": [ - { - "internalType": "uint256", - "name": "tokenId", - "type": "uint256" - }, - { - "internalType": "address", - "name": "recipient", - "type": "address" - }, - { - "internalType": "uint128", - "name": "amount0Max", - "type": "uint128" - }, - { - "internalType": "uint128", - "name": "amount1Max", - "type": "uint128" - } - ], - "internalType": "struct INonfungiblePositionManager.CollectParams", - "name": "params", - "type": "tuple" - } - ], - "name": "collect", - "outputs": [ - { - "internalType": "uint256", - "name": "amount0", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "amount1", - "type": "uint256" - } - ], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [ - { - "components": [ - { - "internalType": "uint256", - "name": "tokenId", - "type": "uint256" - }, - { - "internalType": "uint128", - "name": "liquidity", - "type": "uint128" - }, - { - "internalType": "uint256", - "name": "amount0Min", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "amount1Min", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "deadline", - "type": "uint256" - } - ], - "internalType": "struct INonfungiblePositionManager.DecreaseLiquidityParams", - "name": "params", - "type": "tuple" - } - ], - "name": "decreaseLiquidity", - "outputs": [ - { - "internalType": "uint256", - "name": "amount0", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "amount1", - "type": "uint256" - } - ], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [ - { - "components": [ - { - "internalType": "uint256", - "name": "tokenId", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "amount0Desired", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "amount1Desired", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "amount0Min", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "amount1Min", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "deadline", - "type": "uint256" - } - ], - "internalType": "struct INonfungiblePositionManager.IncreaseLiquidityParams", - "name": "params", - "type": "tuple" - } - ], - "name": "increaseLiquidity", - "outputs": [ - { - "internalType": "uint128", - "name": "liquidity", - "type": "uint128" - }, - { - "internalType": "uint256", - "name": "amount0", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "amount1", - "type": "uint256" - } - ], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [ - { - "components": [ - { - "internalType": "address", - "name": "token0", - "type": "address" - }, - { - "internalType": "address", - "name": "token1", - "type": "address" - }, - { - "internalType": "uint24", - "name": "fee", - "type": "uint24" - }, - { - "internalType": "int24", - "name": "tickLower", - "type": "int24" - }, - { - "internalType": "int24", - "name": "tickUpper", - "type": "int24" - }, - { - "internalType": "uint256", - "name": "amount0Desired", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "amount1Desired", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "amount0Min", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "amount1Min", - "type": "uint256" - }, - { - "internalType": "address", - "name": "recipient", - "type": "address" - }, - { - "internalType": "uint256", - "name": "deadline", - "type": "uint256" - } - ], - "internalType": "struct INonfungiblePositionManager.MintParams", - "name": "params", - "type": "tuple" - } - ], - "name": "mint", - "outputs": [ - { - "internalType": "uint256", - "name": "tokenId", - "type": "uint256" - }, - { - "internalType": "uint128", - "name": "liquidity", - "type": "uint128" - }, - { - "internalType": "uint256", - "name": "amount0", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "amount1", - "type": "uint256" - } - ], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "tokenId", - "type": "uint256" - } - ], - "name": "positions", - "outputs": [ - { - "internalType": "uint96", - "name": "nonce", - "type": "uint96" - }, - { - "internalType": "address", - "name": "operator", - "type": "address" - }, - { - "internalType": "address", - "name": "token0", - "type": "address" - }, - { - "internalType": "address", - "name": "token1", - "type": "address" - }, - { - "internalType": "uint24", - "name": "fee", - "type": "uint24" - }, - { - "internalType": "int24", - "name": "tickLower", - "type": "int24" - }, - { - "internalType": "int24", - "name": "tickUpper", - "type": "int24" - }, - { - "internalType": "uint128", - "name": "liquidity", - "type": "uint128" - }, - { - "internalType": "uint256", - "name": "feeGrowthInside0LastX128", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "feeGrowthInside1LastX128", - "type": "uint256" - }, - { - "internalType": "uint128", - "name": "tokensOwed0", - "type": "uint128" - }, - { - "internalType": "uint128", - "name": "tokensOwed1", - "type": "uint128" - } - ], - "stateMutability": "view", - "type": "function" - } -] diff --git a/packages/interfaces/abi/json/contracts/testing/TestUniswapV3Contracts.sol/IPoolInitializer.json b/packages/interfaces/abi/json/contracts/testing/TestUniswapV3Contracts.sol/IPoolInitializer.json deleted file mode 100644 index f689da85..00000000 --- a/packages/interfaces/abi/json/contracts/testing/TestUniswapV3Contracts.sol/IPoolInitializer.json +++ /dev/null @@ -1,36 +0,0 @@ -[ - { - "inputs": [ - { - "internalType": "address", - "name": "token0", - "type": "address" - }, - { - "internalType": "address", - "name": "token1", - "type": "address" - }, - { - "internalType": "uint24", - "name": "fee", - "type": "uint24" - }, - { - "internalType": "uint160", - "name": "sqrtPriceX96", - "type": "uint160" - } - ], - "name": "createAndInitializePoolIfNecessary", - "outputs": [ - { - "internalType": "address", - "name": "pool", - "type": "address" - } - ], - "stateMutability": "payable", - "type": "function" - } -] diff --git a/packages/interfaces/abi/json/contracts/testing/ZetaInteractorMock.sol/ZetaInteractorMock.json b/packages/interfaces/abi/json/contracts/testing/ZetaInteractorMock.sol/ZetaInteractorMock.json deleted file mode 100644 index e352d295..00000000 --- a/packages/interfaces/abi/json/contracts/testing/ZetaInteractorMock.sol/ZetaInteractorMock.json +++ /dev/null @@ -1,270 +0,0 @@ -[ - { - "inputs": [ - { - "internalType": "address", - "name": "zetaConnectorAddress", - "type": "address" - } - ], - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "inputs": [], - "name": "InvalidAddress", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "caller", - "type": "address" - } - ], - "name": "InvalidCaller", - "type": "error" - }, - { - "inputs": [], - "name": "InvalidDestinationChainId", - "type": "error" - }, - { - "inputs": [], - "name": "InvalidZetaMessageCall", - "type": "error" - }, - { - "inputs": [], - "name": "InvalidZetaRevertCall", - "type": "error" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "previousOwner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "newOwner", - "type": "address" - } - ], - "name": "OwnershipTransferStarted", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "previousOwner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "newOwner", - "type": "address" - } - ], - "name": "OwnershipTransferred", - "type": "event" - }, - { - "inputs": [], - "name": "acceptOwnership", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "connector", - "outputs": [ - { - "internalType": "contract ZetaConnector", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "name": "interactorsByChainId", - "outputs": [ - { - "internalType": "bytes", - "name": "", - "type": "bytes" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "components": [ - { - "internalType": "bytes", - "name": "zetaTxSenderAddress", - "type": "bytes" - }, - { - "internalType": "uint256", - "name": "sourceChainId", - "type": "uint256" - }, - { - "internalType": "address", - "name": "destinationAddress", - "type": "address" - }, - { - "internalType": "uint256", - "name": "zetaValue", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "message", - "type": "bytes" - } - ], - "internalType": "struct ZetaInterfaces.ZetaMessage", - "name": "zetaMessage", - "type": "tuple" - } - ], - "name": "onZetaMessage", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "components": [ - { - "internalType": "address", - "name": "zetaTxSenderAddress", - "type": "address" - }, - { - "internalType": "uint256", - "name": "sourceChainId", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "destinationAddress", - "type": "bytes" - }, - { - "internalType": "uint256", - "name": "destinationChainId", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "remainingZetaValue", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "message", - "type": "bytes" - } - ], - "internalType": "struct ZetaInterfaces.ZetaRevert", - "name": "zetaRevert", - "type": "tuple" - } - ], - "name": "onZetaRevert", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "owner", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "pendingOwner", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "renounceOwnership", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "destinationChainId", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "contractAddress", - "type": "bytes" - } - ], - "name": "setInteractorByChainId", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "newOwner", - "type": "address" - } - ], - "name": "transferOwnership", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - } -] diff --git a/packages/interfaces/abi/json/contracts/testing/ZetaReceiverMock.sol/ZetaReceiverMock.json b/packages/interfaces/abi/json/contracts/testing/ZetaReceiverMock.sol/ZetaReceiverMock.json deleted file mode 100644 index 8b4a33ae..00000000 --- a/packages/interfaces/abi/json/contracts/testing/ZetaReceiverMock.sol/ZetaReceiverMock.json +++ /dev/null @@ -1,113 +0,0 @@ -[ - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "destinationAddress", - "type": "address" - } - ], - "name": "MockOnZetaMessage", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "zetaTxSenderAddress", - "type": "address" - } - ], - "name": "MockOnZetaRevert", - "type": "event" - }, - { - "inputs": [ - { - "components": [ - { - "internalType": "bytes", - "name": "zetaTxSenderAddress", - "type": "bytes" - }, - { - "internalType": "uint256", - "name": "sourceChainId", - "type": "uint256" - }, - { - "internalType": "address", - "name": "destinationAddress", - "type": "address" - }, - { - "internalType": "uint256", - "name": "zetaValue", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "message", - "type": "bytes" - } - ], - "internalType": "struct ZetaInterfaces.ZetaMessage", - "name": "zetaMessage", - "type": "tuple" - } - ], - "name": "onZetaMessage", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "components": [ - { - "internalType": "address", - "name": "zetaTxSenderAddress", - "type": "address" - }, - { - "internalType": "uint256", - "name": "sourceChainId", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "destinationAddress", - "type": "bytes" - }, - { - "internalType": "uint256", - "name": "destinationChainId", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "remainingZetaValue", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "message", - "type": "bytes" - } - ], - "internalType": "struct ZetaInterfaces.ZetaRevert", - "name": "zetaRevert", - "type": "tuple" - } - ], - "name": "onZetaRevert", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - } -] diff --git a/packages/interfaces/package.json b/packages/interfaces/package.json deleted file mode 100644 index 99d677ad..00000000 --- a/packages/interfaces/package.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "name": "@zetachain/interfaces", - "version": "0.0.1", - "license": "MIT", - "author": "zetachain", - "publishConfig": { - "access": "public", - "registry": "https://registry.npmjs.org/" - }, - "scripts": { - "prepublishOnly": "echo 'This package has no prepublishOnly tasks.'", - "tsc:watch": "npx tsc --watch" - } -} diff --git a/packages/interfaces/typechain-types/@openzeppelin/contracts/access/Ownable.ts b/packages/interfaces/typechain-types/@openzeppelin/contracts/access/Ownable.ts deleted file mode 100644 index 111524cd..00000000 --- a/packages/interfaces/typechain-types/@openzeppelin/contracts/access/Ownable.ts +++ /dev/null @@ -1,175 +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, - EventFragment, -} from "@ethersproject/abi"; -import type { Listener, Provider } from "@ethersproject/providers"; -import type { - TypedEventFilter, - TypedEvent, - TypedListener, - OnEvent, -} from "../../../common"; - -export interface OwnableInterface extends utils.Interface { - functions: { - "owner()": FunctionFragment; - "renounceOwnership()": FunctionFragment; - "transferOwnership(address)": FunctionFragment; - }; - - getFunction( - nameOrSignatureOrTopic: "owner" | "renounceOwnership" | "transferOwnership" - ): FunctionFragment; - - encodeFunctionData(functionFragment: "owner", values?: undefined): string; - encodeFunctionData( - functionFragment: "renounceOwnership", - values?: undefined - ): string; - encodeFunctionData( - functionFragment: "transferOwnership", - values: [string] - ): string; - - decodeFunctionResult(functionFragment: "owner", data: BytesLike): Result; - decodeFunctionResult( - functionFragment: "renounceOwnership", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "transferOwnership", - data: BytesLike - ): Result; - - events: { - "OwnershipTransferred(address,address)": EventFragment; - }; - - getEvent(nameOrSignatureOrTopic: "OwnershipTransferred"): EventFragment; -} - -export interface OwnershipTransferredEventObject { - previousOwner: string; - newOwner: string; -} -export type OwnershipTransferredEvent = TypedEvent< - [string, string], - OwnershipTransferredEventObject ->; - -export type OwnershipTransferredEventFilter = - TypedEventFilter; - -export interface Ownable extends BaseContract { - connect(signerOrProvider: Signer | Provider | string): this; - attach(addressOrName: string): this; - deployed(): Promise; - - interface: OwnableInterface; - - 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: { - owner(overrides?: CallOverrides): Promise<[string]>; - - renounceOwnership( - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - transferOwnership( - newOwner: string, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - }; - - owner(overrides?: CallOverrides): Promise; - - renounceOwnership( - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - transferOwnership( - newOwner: string, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - callStatic: { - owner(overrides?: CallOverrides): Promise; - - renounceOwnership(overrides?: CallOverrides): Promise; - - transferOwnership( - newOwner: string, - overrides?: CallOverrides - ): Promise; - }; - - filters: { - "OwnershipTransferred(address,address)"( - previousOwner?: string | null, - newOwner?: string | null - ): OwnershipTransferredEventFilter; - OwnershipTransferred( - previousOwner?: string | null, - newOwner?: string | null - ): OwnershipTransferredEventFilter; - }; - - estimateGas: { - owner(overrides?: CallOverrides): Promise; - - renounceOwnership( - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - transferOwnership( - newOwner: string, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - }; - - populateTransaction: { - owner(overrides?: CallOverrides): Promise; - - renounceOwnership( - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - transferOwnership( - newOwner: string, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - }; -} diff --git a/packages/interfaces/typechain-types/@openzeppelin/contracts/access/index.ts b/packages/interfaces/typechain-types/@openzeppelin/contracts/access/index.ts deleted file mode 100644 index 999bcc77..00000000 --- a/packages/interfaces/typechain-types/@openzeppelin/contracts/access/index.ts +++ /dev/null @@ -1,4 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ -export type { Ownable } from "./Ownable"; diff --git a/packages/interfaces/typechain-types/@openzeppelin/contracts/index.ts b/packages/interfaces/typechain-types/@openzeppelin/contracts/index.ts deleted file mode 100644 index e1885aa2..00000000 --- a/packages/interfaces/typechain-types/@openzeppelin/contracts/index.ts +++ /dev/null @@ -1,9 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ -import type * as access from "./access"; -export type { access }; -import type * as security from "./security"; -export type { security }; -import type * as token from "./token"; -export type { token }; diff --git a/packages/interfaces/typechain-types/@openzeppelin/contracts/security/Pausable.ts b/packages/interfaces/typechain-types/@openzeppelin/contracts/security/Pausable.ts deleted file mode 100644 index a7508118..00000000 --- a/packages/interfaces/typechain-types/@openzeppelin/contracts/security/Pausable.ts +++ /dev/null @@ -1,111 +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, - EventFragment, -} from "@ethersproject/abi"; -import type { Listener, Provider } from "@ethersproject/providers"; -import type { - TypedEventFilter, - TypedEvent, - TypedListener, - OnEvent, -} from "../../../common"; - -export interface PausableInterface extends utils.Interface { - functions: { - "paused()": FunctionFragment; - }; - - getFunction(nameOrSignatureOrTopic: "paused"): FunctionFragment; - - encodeFunctionData(functionFragment: "paused", values?: undefined): string; - - decodeFunctionResult(functionFragment: "paused", data: BytesLike): Result; - - events: { - "Paused(address)": EventFragment; - "Unpaused(address)": EventFragment; - }; - - getEvent(nameOrSignatureOrTopic: "Paused"): EventFragment; - getEvent(nameOrSignatureOrTopic: "Unpaused"): EventFragment; -} - -export interface PausedEventObject { - account: string; -} -export type PausedEvent = TypedEvent<[string], PausedEventObject>; - -export type PausedEventFilter = TypedEventFilter; - -export interface UnpausedEventObject { - account: string; -} -export type UnpausedEvent = TypedEvent<[string], UnpausedEventObject>; - -export type UnpausedEventFilter = TypedEventFilter; - -export interface Pausable extends BaseContract { - connect(signerOrProvider: Signer | Provider | string): this; - attach(addressOrName: string): this; - deployed(): Promise; - - interface: PausableInterface; - - 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: { - paused(overrides?: CallOverrides): Promise<[boolean]>; - }; - - paused(overrides?: CallOverrides): Promise; - - callStatic: { - paused(overrides?: CallOverrides): Promise; - }; - - filters: { - "Paused(address)"(account?: null): PausedEventFilter; - Paused(account?: null): PausedEventFilter; - - "Unpaused(address)"(account?: null): UnpausedEventFilter; - Unpaused(account?: null): UnpausedEventFilter; - }; - - estimateGas: { - paused(overrides?: CallOverrides): Promise; - }; - - populateTransaction: { - paused(overrides?: CallOverrides): Promise; - }; -} diff --git a/packages/interfaces/typechain-types/@openzeppelin/contracts/security/index.ts b/packages/interfaces/typechain-types/@openzeppelin/contracts/security/index.ts deleted file mode 100644 index ed703c8f..00000000 --- a/packages/interfaces/typechain-types/@openzeppelin/contracts/security/index.ts +++ /dev/null @@ -1,4 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ -export type { Pausable } from "./Pausable"; diff --git a/packages/interfaces/typechain-types/@openzeppelin/contracts/token/ERC20/ERC20.ts b/packages/interfaces/typechain-types/@openzeppelin/contracts/token/ERC20/ERC20.ts deleted file mode 100644 index 95d95417..00000000 --- a/packages/interfaces/typechain-types/@openzeppelin/contracts/token/ERC20/ERC20.ts +++ /dev/null @@ -1,444 +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, -} from "../../../../common"; - -export interface ERC20Interface extends utils.Interface { - functions: { - "allowance(address,address)": FunctionFragment; - "approve(address,uint256)": FunctionFragment; - "balanceOf(address)": FunctionFragment; - "decimals()": FunctionFragment; - "decreaseAllowance(address,uint256)": FunctionFragment; - "increaseAllowance(address,uint256)": FunctionFragment; - "name()": FunctionFragment; - "symbol()": FunctionFragment; - "totalSupply()": FunctionFragment; - "transfer(address,uint256)": FunctionFragment; - "transferFrom(address,address,uint256)": FunctionFragment; - }; - - getFunction( - nameOrSignatureOrTopic: - | "allowance" - | "approve" - | "balanceOf" - | "decimals" - | "decreaseAllowance" - | "increaseAllowance" - | "name" - | "symbol" - | "totalSupply" - | "transfer" - | "transferFrom" - ): FunctionFragment; - - encodeFunctionData( - functionFragment: "allowance", - values: [string, string] - ): string; - encodeFunctionData( - functionFragment: "approve", - values: [string, BigNumberish] - ): string; - encodeFunctionData(functionFragment: "balanceOf", values: [string]): string; - encodeFunctionData(functionFragment: "decimals", values?: undefined): string; - encodeFunctionData( - functionFragment: "decreaseAllowance", - values: [string, BigNumberish] - ): string; - encodeFunctionData( - functionFragment: "increaseAllowance", - values: [string, BigNumberish] - ): string; - encodeFunctionData(functionFragment: "name", values?: undefined): string; - encodeFunctionData(functionFragment: "symbol", values?: undefined): string; - encodeFunctionData( - functionFragment: "totalSupply", - values?: undefined - ): string; - encodeFunctionData( - functionFragment: "transfer", - values: [string, BigNumberish] - ): string; - encodeFunctionData( - functionFragment: "transferFrom", - values: [string, string, BigNumberish] - ): string; - - decodeFunctionResult(functionFragment: "allowance", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "approve", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "balanceOf", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "decimals", data: BytesLike): Result; - decodeFunctionResult( - functionFragment: "decreaseAllowance", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "increaseAllowance", - data: BytesLike - ): Result; - decodeFunctionResult(functionFragment: "name", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "symbol", data: BytesLike): Result; - decodeFunctionResult( - functionFragment: "totalSupply", - data: BytesLike - ): Result; - decodeFunctionResult(functionFragment: "transfer", data: BytesLike): Result; - decodeFunctionResult( - functionFragment: "transferFrom", - data: BytesLike - ): Result; - - events: { - "Approval(address,address,uint256)": EventFragment; - "Transfer(address,address,uint256)": EventFragment; - }; - - getEvent(nameOrSignatureOrTopic: "Approval"): EventFragment; - getEvent(nameOrSignatureOrTopic: "Transfer"): EventFragment; -} - -export interface ApprovalEventObject { - owner: string; - spender: string; - value: BigNumber; -} -export type ApprovalEvent = TypedEvent< - [string, string, BigNumber], - ApprovalEventObject ->; - -export type ApprovalEventFilter = TypedEventFilter; - -export interface TransferEventObject { - from: string; - to: string; - value: BigNumber; -} -export type TransferEvent = TypedEvent< - [string, string, BigNumber], - TransferEventObject ->; - -export type TransferEventFilter = TypedEventFilter; - -export interface ERC20 extends BaseContract { - connect(signerOrProvider: Signer | Provider | string): this; - attach(addressOrName: string): this; - deployed(): Promise; - - interface: ERC20Interface; - - 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: { - allowance( - owner: string, - spender: string, - overrides?: CallOverrides - ): Promise<[BigNumber]>; - - approve( - spender: string, - amount: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - balanceOf(account: string, overrides?: CallOverrides): Promise<[BigNumber]>; - - decimals(overrides?: CallOverrides): Promise<[number]>; - - decreaseAllowance( - spender: string, - subtractedValue: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - increaseAllowance( - spender: string, - addedValue: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - name(overrides?: CallOverrides): Promise<[string]>; - - symbol(overrides?: CallOverrides): Promise<[string]>; - - totalSupply(overrides?: CallOverrides): Promise<[BigNumber]>; - - transfer( - to: string, - amount: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - transferFrom( - from: string, - to: string, - amount: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - }; - - allowance( - owner: string, - spender: string, - overrides?: CallOverrides - ): Promise; - - approve( - spender: string, - amount: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - balanceOf(account: string, overrides?: CallOverrides): Promise; - - decimals(overrides?: CallOverrides): Promise; - - decreaseAllowance( - spender: string, - subtractedValue: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - increaseAllowance( - spender: string, - addedValue: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - name(overrides?: CallOverrides): Promise; - - symbol(overrides?: CallOverrides): Promise; - - totalSupply(overrides?: CallOverrides): Promise; - - transfer( - to: string, - amount: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - transferFrom( - from: string, - to: string, - amount: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - callStatic: { - allowance( - owner: string, - spender: string, - overrides?: CallOverrides - ): Promise; - - approve( - spender: string, - amount: BigNumberish, - overrides?: CallOverrides - ): Promise; - - balanceOf(account: string, overrides?: CallOverrides): Promise; - - decimals(overrides?: CallOverrides): Promise; - - decreaseAllowance( - spender: string, - subtractedValue: BigNumberish, - overrides?: CallOverrides - ): Promise; - - increaseAllowance( - spender: string, - addedValue: BigNumberish, - overrides?: CallOverrides - ): Promise; - - name(overrides?: CallOverrides): Promise; - - symbol(overrides?: CallOverrides): Promise; - - totalSupply(overrides?: CallOverrides): Promise; - - transfer( - to: string, - amount: BigNumberish, - overrides?: CallOverrides - ): Promise; - - transferFrom( - from: string, - to: string, - amount: BigNumberish, - overrides?: CallOverrides - ): Promise; - }; - - filters: { - "Approval(address,address,uint256)"( - owner?: string | null, - spender?: string | null, - value?: null - ): ApprovalEventFilter; - Approval( - owner?: string | null, - spender?: string | null, - value?: null - ): ApprovalEventFilter; - - "Transfer(address,address,uint256)"( - from?: string | null, - to?: string | null, - value?: null - ): TransferEventFilter; - Transfer( - from?: string | null, - to?: string | null, - value?: null - ): TransferEventFilter; - }; - - estimateGas: { - allowance( - owner: string, - spender: string, - overrides?: CallOverrides - ): Promise; - - approve( - spender: string, - amount: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - balanceOf(account: string, overrides?: CallOverrides): Promise; - - decimals(overrides?: CallOverrides): Promise; - - decreaseAllowance( - spender: string, - subtractedValue: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - increaseAllowance( - spender: string, - addedValue: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - name(overrides?: CallOverrides): Promise; - - symbol(overrides?: CallOverrides): Promise; - - totalSupply(overrides?: CallOverrides): Promise; - - transfer( - to: string, - amount: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - transferFrom( - from: string, - to: string, - amount: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - }; - - populateTransaction: { - allowance( - owner: string, - spender: string, - overrides?: CallOverrides - ): Promise; - - approve( - spender: string, - amount: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - balanceOf( - account: string, - overrides?: CallOverrides - ): Promise; - - decimals(overrides?: CallOverrides): Promise; - - decreaseAllowance( - spender: string, - subtractedValue: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - increaseAllowance( - spender: string, - addedValue: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - name(overrides?: CallOverrides): Promise; - - symbol(overrides?: CallOverrides): Promise; - - totalSupply(overrides?: CallOverrides): Promise; - - transfer( - to: string, - amount: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - transferFrom( - from: string, - to: string, - amount: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - }; -} diff --git a/packages/interfaces/typechain-types/@openzeppelin/contracts/token/ERC20/IERC20.ts b/packages/interfaces/typechain-types/@openzeppelin/contracts/token/ERC20/IERC20.ts deleted file mode 100644 index d7090694..00000000 --- a/packages/interfaces/typechain-types/@openzeppelin/contracts/token/ERC20/IERC20.ts +++ /dev/null @@ -1,322 +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, -} from "../../../../common"; - -export interface IERC20Interface extends utils.Interface { - functions: { - "allowance(address,address)": FunctionFragment; - "approve(address,uint256)": FunctionFragment; - "balanceOf(address)": FunctionFragment; - "totalSupply()": FunctionFragment; - "transfer(address,uint256)": FunctionFragment; - "transferFrom(address,address,uint256)": FunctionFragment; - }; - - getFunction( - nameOrSignatureOrTopic: - | "allowance" - | "approve" - | "balanceOf" - | "totalSupply" - | "transfer" - | "transferFrom" - ): FunctionFragment; - - encodeFunctionData( - functionFragment: "allowance", - values: [string, string] - ): string; - encodeFunctionData( - functionFragment: "approve", - values: [string, BigNumberish] - ): string; - encodeFunctionData(functionFragment: "balanceOf", values: [string]): string; - encodeFunctionData( - functionFragment: "totalSupply", - values?: undefined - ): string; - encodeFunctionData( - functionFragment: "transfer", - values: [string, BigNumberish] - ): string; - encodeFunctionData( - functionFragment: "transferFrom", - values: [string, string, BigNumberish] - ): string; - - decodeFunctionResult(functionFragment: "allowance", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "approve", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "balanceOf", data: BytesLike): Result; - decodeFunctionResult( - functionFragment: "totalSupply", - data: BytesLike - ): Result; - decodeFunctionResult(functionFragment: "transfer", data: BytesLike): Result; - decodeFunctionResult( - functionFragment: "transferFrom", - data: BytesLike - ): Result; - - events: { - "Approval(address,address,uint256)": EventFragment; - "Transfer(address,address,uint256)": EventFragment; - }; - - getEvent(nameOrSignatureOrTopic: "Approval"): EventFragment; - getEvent(nameOrSignatureOrTopic: "Transfer"): EventFragment; -} - -export interface ApprovalEventObject { - owner: string; - spender: string; - value: BigNumber; -} -export type ApprovalEvent = TypedEvent< - [string, string, BigNumber], - ApprovalEventObject ->; - -export type ApprovalEventFilter = TypedEventFilter; - -export interface TransferEventObject { - from: string; - to: string; - value: BigNumber; -} -export type TransferEvent = TypedEvent< - [string, string, BigNumber], - TransferEventObject ->; - -export type TransferEventFilter = TypedEventFilter; - -export interface IERC20 extends BaseContract { - connect(signerOrProvider: Signer | Provider | string): this; - attach(addressOrName: string): this; - deployed(): Promise; - - interface: IERC20Interface; - - 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: { - allowance( - owner: string, - spender: string, - overrides?: CallOverrides - ): Promise<[BigNumber]>; - - approve( - spender: string, - amount: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - balanceOf(account: string, overrides?: CallOverrides): Promise<[BigNumber]>; - - totalSupply(overrides?: CallOverrides): Promise<[BigNumber]>; - - transfer( - to: string, - amount: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - transferFrom( - from: string, - to: string, - amount: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - }; - - allowance( - owner: string, - spender: string, - overrides?: CallOverrides - ): Promise; - - approve( - spender: string, - amount: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - balanceOf(account: string, overrides?: CallOverrides): Promise; - - totalSupply(overrides?: CallOverrides): Promise; - - transfer( - to: string, - amount: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - transferFrom( - from: string, - to: string, - amount: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - callStatic: { - allowance( - owner: string, - spender: string, - overrides?: CallOverrides - ): Promise; - - approve( - spender: string, - amount: BigNumberish, - overrides?: CallOverrides - ): Promise; - - balanceOf(account: string, overrides?: CallOverrides): Promise; - - totalSupply(overrides?: CallOverrides): Promise; - - transfer( - to: string, - amount: BigNumberish, - overrides?: CallOverrides - ): Promise; - - transferFrom( - from: string, - to: string, - amount: BigNumberish, - overrides?: CallOverrides - ): Promise; - }; - - filters: { - "Approval(address,address,uint256)"( - owner?: string | null, - spender?: string | null, - value?: null - ): ApprovalEventFilter; - Approval( - owner?: string | null, - spender?: string | null, - value?: null - ): ApprovalEventFilter; - - "Transfer(address,address,uint256)"( - from?: string | null, - to?: string | null, - value?: null - ): TransferEventFilter; - Transfer( - from?: string | null, - to?: string | null, - value?: null - ): TransferEventFilter; - }; - - estimateGas: { - allowance( - owner: string, - spender: string, - overrides?: CallOverrides - ): Promise; - - approve( - spender: string, - amount: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - balanceOf(account: string, overrides?: CallOverrides): Promise; - - totalSupply(overrides?: CallOverrides): Promise; - - transfer( - to: string, - amount: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - transferFrom( - from: string, - to: string, - amount: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - }; - - populateTransaction: { - allowance( - owner: string, - spender: string, - overrides?: CallOverrides - ): Promise; - - approve( - spender: string, - amount: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - balanceOf( - account: string, - overrides?: CallOverrides - ): Promise; - - totalSupply(overrides?: CallOverrides): Promise; - - transfer( - to: string, - amount: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - transferFrom( - from: string, - to: string, - amount: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - }; -} diff --git a/packages/interfaces/typechain-types/@openzeppelin/contracts/token/ERC20/extensions/ERC20Burnable.ts b/packages/interfaces/typechain-types/@openzeppelin/contracts/token/ERC20/extensions/ERC20Burnable.ts deleted file mode 100644 index 20beb310..00000000 --- a/packages/interfaces/typechain-types/@openzeppelin/contracts/token/ERC20/extensions/ERC20Burnable.ts +++ /dev/null @@ -1,507 +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, -} from "../../../../../common"; - -export interface ERC20BurnableInterface extends utils.Interface { - functions: { - "allowance(address,address)": FunctionFragment; - "approve(address,uint256)": FunctionFragment; - "balanceOf(address)": FunctionFragment; - "burn(uint256)": FunctionFragment; - "burnFrom(address,uint256)": FunctionFragment; - "decimals()": FunctionFragment; - "decreaseAllowance(address,uint256)": FunctionFragment; - "increaseAllowance(address,uint256)": FunctionFragment; - "name()": FunctionFragment; - "symbol()": FunctionFragment; - "totalSupply()": FunctionFragment; - "transfer(address,uint256)": FunctionFragment; - "transferFrom(address,address,uint256)": FunctionFragment; - }; - - getFunction( - nameOrSignatureOrTopic: - | "allowance" - | "approve" - | "balanceOf" - | "burn" - | "burnFrom" - | "decimals" - | "decreaseAllowance" - | "increaseAllowance" - | "name" - | "symbol" - | "totalSupply" - | "transfer" - | "transferFrom" - ): FunctionFragment; - - encodeFunctionData( - functionFragment: "allowance", - values: [string, string] - ): string; - encodeFunctionData( - functionFragment: "approve", - values: [string, BigNumberish] - ): string; - encodeFunctionData(functionFragment: "balanceOf", values: [string]): string; - encodeFunctionData(functionFragment: "burn", values: [BigNumberish]): string; - encodeFunctionData( - functionFragment: "burnFrom", - values: [string, BigNumberish] - ): string; - encodeFunctionData(functionFragment: "decimals", values?: undefined): string; - encodeFunctionData( - functionFragment: "decreaseAllowance", - values: [string, BigNumberish] - ): string; - encodeFunctionData( - functionFragment: "increaseAllowance", - values: [string, BigNumberish] - ): string; - encodeFunctionData(functionFragment: "name", values?: undefined): string; - encodeFunctionData(functionFragment: "symbol", values?: undefined): string; - encodeFunctionData( - functionFragment: "totalSupply", - values?: undefined - ): string; - encodeFunctionData( - functionFragment: "transfer", - values: [string, BigNumberish] - ): string; - encodeFunctionData( - functionFragment: "transferFrom", - values: [string, string, BigNumberish] - ): string; - - decodeFunctionResult(functionFragment: "allowance", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "approve", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "balanceOf", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "burn", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "burnFrom", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "decimals", data: BytesLike): Result; - decodeFunctionResult( - functionFragment: "decreaseAllowance", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "increaseAllowance", - data: BytesLike - ): Result; - decodeFunctionResult(functionFragment: "name", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "symbol", data: BytesLike): Result; - decodeFunctionResult( - functionFragment: "totalSupply", - data: BytesLike - ): Result; - decodeFunctionResult(functionFragment: "transfer", data: BytesLike): Result; - decodeFunctionResult( - functionFragment: "transferFrom", - data: BytesLike - ): Result; - - events: { - "Approval(address,address,uint256)": EventFragment; - "Transfer(address,address,uint256)": EventFragment; - }; - - getEvent(nameOrSignatureOrTopic: "Approval"): EventFragment; - getEvent(nameOrSignatureOrTopic: "Transfer"): EventFragment; -} - -export interface ApprovalEventObject { - owner: string; - spender: string; - value: BigNumber; -} -export type ApprovalEvent = TypedEvent< - [string, string, BigNumber], - ApprovalEventObject ->; - -export type ApprovalEventFilter = TypedEventFilter; - -export interface TransferEventObject { - from: string; - to: string; - value: BigNumber; -} -export type TransferEvent = TypedEvent< - [string, string, BigNumber], - TransferEventObject ->; - -export type TransferEventFilter = TypedEventFilter; - -export interface ERC20Burnable extends BaseContract { - connect(signerOrProvider: Signer | Provider | string): this; - attach(addressOrName: string): this; - deployed(): Promise; - - interface: ERC20BurnableInterface; - - 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: { - allowance( - owner: string, - spender: string, - overrides?: CallOverrides - ): Promise<[BigNumber]>; - - approve( - spender: string, - amount: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - balanceOf(account: string, overrides?: CallOverrides): Promise<[BigNumber]>; - - burn( - amount: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - burnFrom( - account: string, - amount: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - decimals(overrides?: CallOverrides): Promise<[number]>; - - decreaseAllowance( - spender: string, - subtractedValue: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - increaseAllowance( - spender: string, - addedValue: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - name(overrides?: CallOverrides): Promise<[string]>; - - symbol(overrides?: CallOverrides): Promise<[string]>; - - totalSupply(overrides?: CallOverrides): Promise<[BigNumber]>; - - transfer( - to: string, - amount: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - transferFrom( - from: string, - to: string, - amount: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - }; - - allowance( - owner: string, - spender: string, - overrides?: CallOverrides - ): Promise; - - approve( - spender: string, - amount: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - balanceOf(account: string, overrides?: CallOverrides): Promise; - - burn( - amount: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - burnFrom( - account: string, - amount: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - decimals(overrides?: CallOverrides): Promise; - - decreaseAllowance( - spender: string, - subtractedValue: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - increaseAllowance( - spender: string, - addedValue: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - name(overrides?: CallOverrides): Promise; - - symbol(overrides?: CallOverrides): Promise; - - totalSupply(overrides?: CallOverrides): Promise; - - transfer( - to: string, - amount: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - transferFrom( - from: string, - to: string, - amount: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - callStatic: { - allowance( - owner: string, - spender: string, - overrides?: CallOverrides - ): Promise; - - approve( - spender: string, - amount: BigNumberish, - overrides?: CallOverrides - ): Promise; - - balanceOf(account: string, overrides?: CallOverrides): Promise; - - burn(amount: BigNumberish, overrides?: CallOverrides): Promise; - - burnFrom( - account: string, - amount: BigNumberish, - overrides?: CallOverrides - ): Promise; - - decimals(overrides?: CallOverrides): Promise; - - decreaseAllowance( - spender: string, - subtractedValue: BigNumberish, - overrides?: CallOverrides - ): Promise; - - increaseAllowance( - spender: string, - addedValue: BigNumberish, - overrides?: CallOverrides - ): Promise; - - name(overrides?: CallOverrides): Promise; - - symbol(overrides?: CallOverrides): Promise; - - totalSupply(overrides?: CallOverrides): Promise; - - transfer( - to: string, - amount: BigNumberish, - overrides?: CallOverrides - ): Promise; - - transferFrom( - from: string, - to: string, - amount: BigNumberish, - overrides?: CallOverrides - ): Promise; - }; - - filters: { - "Approval(address,address,uint256)"( - owner?: string | null, - spender?: string | null, - value?: null - ): ApprovalEventFilter; - Approval( - owner?: string | null, - spender?: string | null, - value?: null - ): ApprovalEventFilter; - - "Transfer(address,address,uint256)"( - from?: string | null, - to?: string | null, - value?: null - ): TransferEventFilter; - Transfer( - from?: string | null, - to?: string | null, - value?: null - ): TransferEventFilter; - }; - - estimateGas: { - allowance( - owner: string, - spender: string, - overrides?: CallOverrides - ): Promise; - - approve( - spender: string, - amount: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - balanceOf(account: string, overrides?: CallOverrides): Promise; - - burn( - amount: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - burnFrom( - account: string, - amount: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - decimals(overrides?: CallOverrides): Promise; - - decreaseAllowance( - spender: string, - subtractedValue: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - increaseAllowance( - spender: string, - addedValue: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - name(overrides?: CallOverrides): Promise; - - symbol(overrides?: CallOverrides): Promise; - - totalSupply(overrides?: CallOverrides): Promise; - - transfer( - to: string, - amount: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - transferFrom( - from: string, - to: string, - amount: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - }; - - populateTransaction: { - allowance( - owner: string, - spender: string, - overrides?: CallOverrides - ): Promise; - - approve( - spender: string, - amount: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - balanceOf( - account: string, - overrides?: CallOverrides - ): Promise; - - burn( - amount: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - burnFrom( - account: string, - amount: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - decimals(overrides?: CallOverrides): Promise; - - decreaseAllowance( - spender: string, - subtractedValue: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - increaseAllowance( - spender: string, - addedValue: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - name(overrides?: CallOverrides): Promise; - - symbol(overrides?: CallOverrides): Promise; - - totalSupply(overrides?: CallOverrides): Promise; - - transfer( - to: string, - amount: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - transferFrom( - from: string, - to: string, - amount: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - }; -} diff --git a/packages/interfaces/typechain-types/@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.ts b/packages/interfaces/typechain-types/@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.ts deleted file mode 100644 index d2cf5ed7..00000000 --- a/packages/interfaces/typechain-types/@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.ts +++ /dev/null @@ -1,364 +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, -} from "../../../../../common"; - -export interface IERC20MetadataInterface extends utils.Interface { - functions: { - "allowance(address,address)": FunctionFragment; - "approve(address,uint256)": FunctionFragment; - "balanceOf(address)": FunctionFragment; - "decimals()": FunctionFragment; - "name()": FunctionFragment; - "symbol()": FunctionFragment; - "totalSupply()": FunctionFragment; - "transfer(address,uint256)": FunctionFragment; - "transferFrom(address,address,uint256)": FunctionFragment; - }; - - getFunction( - nameOrSignatureOrTopic: - | "allowance" - | "approve" - | "balanceOf" - | "decimals" - | "name" - | "symbol" - | "totalSupply" - | "transfer" - | "transferFrom" - ): FunctionFragment; - - encodeFunctionData( - functionFragment: "allowance", - values: [string, string] - ): string; - encodeFunctionData( - functionFragment: "approve", - values: [string, BigNumberish] - ): string; - encodeFunctionData(functionFragment: "balanceOf", values: [string]): string; - encodeFunctionData(functionFragment: "decimals", values?: undefined): string; - encodeFunctionData(functionFragment: "name", values?: undefined): string; - encodeFunctionData(functionFragment: "symbol", values?: undefined): string; - encodeFunctionData( - functionFragment: "totalSupply", - values?: undefined - ): string; - encodeFunctionData( - functionFragment: "transfer", - values: [string, BigNumberish] - ): string; - encodeFunctionData( - functionFragment: "transferFrom", - values: [string, string, BigNumberish] - ): string; - - decodeFunctionResult(functionFragment: "allowance", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "approve", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "balanceOf", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "decimals", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "name", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "symbol", data: BytesLike): Result; - decodeFunctionResult( - functionFragment: "totalSupply", - data: BytesLike - ): Result; - decodeFunctionResult(functionFragment: "transfer", data: BytesLike): Result; - decodeFunctionResult( - functionFragment: "transferFrom", - data: BytesLike - ): Result; - - events: { - "Approval(address,address,uint256)": EventFragment; - "Transfer(address,address,uint256)": EventFragment; - }; - - getEvent(nameOrSignatureOrTopic: "Approval"): EventFragment; - getEvent(nameOrSignatureOrTopic: "Transfer"): EventFragment; -} - -export interface ApprovalEventObject { - owner: string; - spender: string; - value: BigNumber; -} -export type ApprovalEvent = TypedEvent< - [string, string, BigNumber], - ApprovalEventObject ->; - -export type ApprovalEventFilter = TypedEventFilter; - -export interface TransferEventObject { - from: string; - to: string; - value: BigNumber; -} -export type TransferEvent = TypedEvent< - [string, string, BigNumber], - TransferEventObject ->; - -export type TransferEventFilter = TypedEventFilter; - -export interface IERC20Metadata extends BaseContract { - connect(signerOrProvider: Signer | Provider | string): this; - attach(addressOrName: string): this; - deployed(): Promise; - - interface: IERC20MetadataInterface; - - 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: { - allowance( - owner: string, - spender: string, - overrides?: CallOverrides - ): Promise<[BigNumber]>; - - approve( - spender: string, - amount: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - balanceOf(account: string, overrides?: CallOverrides): Promise<[BigNumber]>; - - decimals(overrides?: CallOverrides): Promise<[number]>; - - name(overrides?: CallOverrides): Promise<[string]>; - - symbol(overrides?: CallOverrides): Promise<[string]>; - - totalSupply(overrides?: CallOverrides): Promise<[BigNumber]>; - - transfer( - to: string, - amount: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - transferFrom( - from: string, - to: string, - amount: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - }; - - allowance( - owner: string, - spender: string, - overrides?: CallOverrides - ): Promise; - - approve( - spender: string, - amount: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - balanceOf(account: string, overrides?: CallOverrides): Promise; - - decimals(overrides?: CallOverrides): Promise; - - name(overrides?: CallOverrides): Promise; - - symbol(overrides?: CallOverrides): Promise; - - totalSupply(overrides?: CallOverrides): Promise; - - transfer( - to: string, - amount: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - transferFrom( - from: string, - to: string, - amount: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - callStatic: { - allowance( - owner: string, - spender: string, - overrides?: CallOverrides - ): Promise; - - approve( - spender: string, - amount: BigNumberish, - overrides?: CallOverrides - ): Promise; - - balanceOf(account: string, overrides?: CallOverrides): Promise; - - decimals(overrides?: CallOverrides): Promise; - - name(overrides?: CallOverrides): Promise; - - symbol(overrides?: CallOverrides): Promise; - - totalSupply(overrides?: CallOverrides): Promise; - - transfer( - to: string, - amount: BigNumberish, - overrides?: CallOverrides - ): Promise; - - transferFrom( - from: string, - to: string, - amount: BigNumberish, - overrides?: CallOverrides - ): Promise; - }; - - filters: { - "Approval(address,address,uint256)"( - owner?: string | null, - spender?: string | null, - value?: null - ): ApprovalEventFilter; - Approval( - owner?: string | null, - spender?: string | null, - value?: null - ): ApprovalEventFilter; - - "Transfer(address,address,uint256)"( - from?: string | null, - to?: string | null, - value?: null - ): TransferEventFilter; - Transfer( - from?: string | null, - to?: string | null, - value?: null - ): TransferEventFilter; - }; - - estimateGas: { - allowance( - owner: string, - spender: string, - overrides?: CallOverrides - ): Promise; - - approve( - spender: string, - amount: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - balanceOf(account: string, overrides?: CallOverrides): Promise; - - decimals(overrides?: CallOverrides): Promise; - - name(overrides?: CallOverrides): Promise; - - symbol(overrides?: CallOverrides): Promise; - - totalSupply(overrides?: CallOverrides): Promise; - - transfer( - to: string, - amount: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - transferFrom( - from: string, - to: string, - amount: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - }; - - populateTransaction: { - allowance( - owner: string, - spender: string, - overrides?: CallOverrides - ): Promise; - - approve( - spender: string, - amount: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - balanceOf( - account: string, - overrides?: CallOverrides - ): Promise; - - decimals(overrides?: CallOverrides): Promise; - - name(overrides?: CallOverrides): Promise; - - symbol(overrides?: CallOverrides): Promise; - - totalSupply(overrides?: CallOverrides): Promise; - - transfer( - to: string, - amount: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - transferFrom( - from: string, - to: string, - amount: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - }; -} diff --git a/packages/interfaces/typechain-types/@openzeppelin/contracts/token/ERC20/extensions/draft-IERC20Permit.sol/IERC20Permit.ts b/packages/interfaces/typechain-types/@openzeppelin/contracts/token/ERC20/extensions/draft-IERC20Permit.sol/IERC20Permit.ts deleted file mode 100644 index 2cec857b..00000000 --- a/packages/interfaces/typechain-types/@openzeppelin/contracts/token/ERC20/extensions/draft-IERC20Permit.sol/IERC20Permit.ts +++ /dev/null @@ -1,177 +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, -} from "../../../../../../common"; - -export interface IERC20PermitInterface extends utils.Interface { - functions: { - "DOMAIN_SEPARATOR()": FunctionFragment; - "nonces(address)": FunctionFragment; - "permit(address,address,uint256,uint256,uint8,bytes32,bytes32)": FunctionFragment; - }; - - getFunction( - nameOrSignatureOrTopic: "DOMAIN_SEPARATOR" | "nonces" | "permit" - ): FunctionFragment; - - encodeFunctionData( - functionFragment: "DOMAIN_SEPARATOR", - values?: undefined - ): string; - encodeFunctionData(functionFragment: "nonces", values: [string]): string; - encodeFunctionData( - functionFragment: "permit", - values: [ - string, - string, - BigNumberish, - BigNumberish, - BigNumberish, - BytesLike, - BytesLike - ] - ): string; - - decodeFunctionResult( - functionFragment: "DOMAIN_SEPARATOR", - data: BytesLike - ): Result; - decodeFunctionResult(functionFragment: "nonces", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "permit", data: BytesLike): Result; - - events: {}; -} - -export interface IERC20Permit extends BaseContract { - connect(signerOrProvider: Signer | Provider | string): this; - attach(addressOrName: string): this; - deployed(): Promise; - - interface: IERC20PermitInterface; - - 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: { - DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise<[string]>; - - nonces(owner: string, overrides?: CallOverrides): Promise<[BigNumber]>; - - permit( - owner: string, - spender: string, - value: BigNumberish, - deadline: BigNumberish, - v: BigNumberish, - r: BytesLike, - s: BytesLike, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - }; - - DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise; - - nonces(owner: string, overrides?: CallOverrides): Promise; - - permit( - owner: string, - spender: string, - value: BigNumberish, - deadline: BigNumberish, - v: BigNumberish, - r: BytesLike, - s: BytesLike, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - callStatic: { - DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise; - - nonces(owner: string, overrides?: CallOverrides): Promise; - - permit( - owner: string, - spender: string, - value: BigNumberish, - deadline: BigNumberish, - v: BigNumberish, - r: BytesLike, - s: BytesLike, - overrides?: CallOverrides - ): Promise; - }; - - filters: {}; - - estimateGas: { - DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise; - - nonces(owner: string, overrides?: CallOverrides): Promise; - - permit( - owner: string, - spender: string, - value: BigNumberish, - deadline: BigNumberish, - v: BigNumberish, - r: BytesLike, - s: BytesLike, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - }; - - populateTransaction: { - DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise; - - nonces( - owner: string, - overrides?: CallOverrides - ): Promise; - - permit( - owner: string, - spender: string, - value: BigNumberish, - deadline: BigNumberish, - v: BigNumberish, - r: BytesLike, - s: BytesLike, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - }; -} diff --git a/packages/interfaces/typechain-types/@openzeppelin/contracts/token/ERC20/extensions/draft-IERC20Permit.sol/index.ts b/packages/interfaces/typechain-types/@openzeppelin/contracts/token/ERC20/extensions/draft-IERC20Permit.sol/index.ts deleted file mode 100644 index 6673dc7d..00000000 --- a/packages/interfaces/typechain-types/@openzeppelin/contracts/token/ERC20/extensions/draft-IERC20Permit.sol/index.ts +++ /dev/null @@ -1,4 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ -export type { IERC20Permit } from "./IERC20Permit"; diff --git a/packages/interfaces/typechain-types/@openzeppelin/contracts/token/ERC20/extensions/index.ts b/packages/interfaces/typechain-types/@openzeppelin/contracts/token/ERC20/extensions/index.ts deleted file mode 100644 index 9c8ebc24..00000000 --- a/packages/interfaces/typechain-types/@openzeppelin/contracts/token/ERC20/extensions/index.ts +++ /dev/null @@ -1,7 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ -import type * as draftIerc20PermitSol from "./draft-IERC20Permit.sol"; -export type { draftIerc20PermitSol }; -export type { ERC20Burnable } from "./ERC20Burnable"; -export type { IERC20Metadata } from "./IERC20Metadata"; diff --git a/packages/interfaces/typechain-types/@openzeppelin/contracts/token/ERC20/index.ts b/packages/interfaces/typechain-types/@openzeppelin/contracts/token/ERC20/index.ts deleted file mode 100644 index cc196974..00000000 --- a/packages/interfaces/typechain-types/@openzeppelin/contracts/token/ERC20/index.ts +++ /dev/null @@ -1,7 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ -import type * as extensions from "./extensions"; -export type { extensions }; -export type { ERC20 } from "./ERC20"; -export type { IERC20 } from "./IERC20"; diff --git a/packages/interfaces/typechain-types/@openzeppelin/contracts/token/index.ts b/packages/interfaces/typechain-types/@openzeppelin/contracts/token/index.ts deleted file mode 100644 index 5c4062a9..00000000 --- a/packages/interfaces/typechain-types/@openzeppelin/contracts/token/index.ts +++ /dev/null @@ -1,5 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ -import type * as erc20 from "./ERC20"; -export type { erc20 }; diff --git a/packages/interfaces/typechain-types/@openzeppelin/index.ts b/packages/interfaces/typechain-types/@openzeppelin/index.ts deleted file mode 100644 index a11e4ca2..00000000 --- a/packages/interfaces/typechain-types/@openzeppelin/index.ts +++ /dev/null @@ -1,5 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ -import type * as contracts from "./contracts"; -export type { contracts }; diff --git a/packages/interfaces/typechain-types/@uniswap/index.ts b/packages/interfaces/typechain-types/@uniswap/index.ts deleted file mode 100644 index 7a53629e..00000000 --- a/packages/interfaces/typechain-types/@uniswap/index.ts +++ /dev/null @@ -1,11 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ -import type * as v2Core from "./v2-core"; -export type { v2Core }; -import type * as v2Periphery from "./v2-periphery"; -export type { v2Periphery }; -import type * as v3Core from "./v3-core"; -export type { v3Core }; -import type * as v3Periphery from "./v3-periphery"; -export type { v3Periphery }; diff --git a/packages/interfaces/typechain-types/@uniswap/v2-core/contracts/index.ts b/packages/interfaces/typechain-types/@uniswap/v2-core/contracts/index.ts deleted file mode 100644 index 92159233..00000000 --- a/packages/interfaces/typechain-types/@uniswap/v2-core/contracts/index.ts +++ /dev/null @@ -1,5 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ -import type * as interfaces from "./interfaces"; -export type { interfaces }; diff --git a/packages/interfaces/typechain-types/@uniswap/v2-core/contracts/interfaces/IUniswapV2Factory.ts b/packages/interfaces/typechain-types/@uniswap/v2-core/contracts/interfaces/IUniswapV2Factory.ts deleted file mode 100644 index cf4e7113..00000000 --- a/packages/interfaces/typechain-types/@uniswap/v2-core/contracts/interfaces/IUniswapV2Factory.ts +++ /dev/null @@ -1,316 +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, -} from "../../../../common"; - -export interface IUniswapV2FactoryInterface extends utils.Interface { - functions: { - "allPairs(uint256)": FunctionFragment; - "allPairsLength()": FunctionFragment; - "createPair(address,address)": FunctionFragment; - "feeTo()": FunctionFragment; - "feeToSetter()": FunctionFragment; - "getPair(address,address)": FunctionFragment; - "setFeeTo(address)": FunctionFragment; - "setFeeToSetter(address)": FunctionFragment; - }; - - getFunction( - nameOrSignatureOrTopic: - | "allPairs" - | "allPairsLength" - | "createPair" - | "feeTo" - | "feeToSetter" - | "getPair" - | "setFeeTo" - | "setFeeToSetter" - ): FunctionFragment; - - encodeFunctionData( - functionFragment: "allPairs", - values: [BigNumberish] - ): string; - encodeFunctionData( - functionFragment: "allPairsLength", - values?: undefined - ): string; - encodeFunctionData( - functionFragment: "createPair", - values: [string, string] - ): string; - encodeFunctionData(functionFragment: "feeTo", values?: undefined): string; - encodeFunctionData( - functionFragment: "feeToSetter", - values?: undefined - ): string; - encodeFunctionData( - functionFragment: "getPair", - values: [string, string] - ): string; - encodeFunctionData(functionFragment: "setFeeTo", values: [string]): string; - encodeFunctionData( - functionFragment: "setFeeToSetter", - values: [string] - ): string; - - decodeFunctionResult(functionFragment: "allPairs", data: BytesLike): Result; - decodeFunctionResult( - functionFragment: "allPairsLength", - data: BytesLike - ): Result; - decodeFunctionResult(functionFragment: "createPair", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "feeTo", data: BytesLike): Result; - decodeFunctionResult( - functionFragment: "feeToSetter", - data: BytesLike - ): Result; - decodeFunctionResult(functionFragment: "getPair", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "setFeeTo", data: BytesLike): Result; - decodeFunctionResult( - functionFragment: "setFeeToSetter", - data: BytesLike - ): Result; - - events: { - "PairCreated(address,address,address,uint256)": EventFragment; - }; - - getEvent(nameOrSignatureOrTopic: "PairCreated"): EventFragment; -} - -export interface PairCreatedEventObject { - token0: string; - token1: string; - pair: string; - arg3: BigNumber; -} -export type PairCreatedEvent = TypedEvent< - [string, string, string, BigNumber], - PairCreatedEventObject ->; - -export type PairCreatedEventFilter = TypedEventFilter; - -export interface IUniswapV2Factory extends BaseContract { - connect(signerOrProvider: Signer | Provider | string): this; - attach(addressOrName: string): this; - deployed(): Promise; - - interface: IUniswapV2FactoryInterface; - - 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: { - allPairs( - arg0: BigNumberish, - overrides?: CallOverrides - ): Promise<[string] & { pair: string }>; - - allPairsLength(overrides?: CallOverrides): Promise<[BigNumber]>; - - createPair( - tokenA: string, - tokenB: string, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - feeTo(overrides?: CallOverrides): Promise<[string]>; - - feeToSetter(overrides?: CallOverrides): Promise<[string]>; - - getPair( - tokenA: string, - tokenB: string, - overrides?: CallOverrides - ): Promise<[string] & { pair: string }>; - - setFeeTo( - arg0: string, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - setFeeToSetter( - arg0: string, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - }; - - allPairs(arg0: BigNumberish, overrides?: CallOverrides): Promise; - - allPairsLength(overrides?: CallOverrides): Promise; - - createPair( - tokenA: string, - tokenB: string, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - feeTo(overrides?: CallOverrides): Promise; - - feeToSetter(overrides?: CallOverrides): Promise; - - getPair( - tokenA: string, - tokenB: string, - overrides?: CallOverrides - ): Promise; - - setFeeTo( - arg0: string, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - setFeeToSetter( - arg0: string, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - callStatic: { - allPairs(arg0: BigNumberish, overrides?: CallOverrides): Promise; - - allPairsLength(overrides?: CallOverrides): Promise; - - createPair( - tokenA: string, - tokenB: string, - overrides?: CallOverrides - ): Promise; - - feeTo(overrides?: CallOverrides): Promise; - - feeToSetter(overrides?: CallOverrides): Promise; - - getPair( - tokenA: string, - tokenB: string, - overrides?: CallOverrides - ): Promise; - - setFeeTo(arg0: string, overrides?: CallOverrides): Promise; - - setFeeToSetter(arg0: string, overrides?: CallOverrides): Promise; - }; - - filters: { - "PairCreated(address,address,address,uint256)"( - token0?: string | null, - token1?: string | null, - pair?: null, - arg3?: null - ): PairCreatedEventFilter; - PairCreated( - token0?: string | null, - token1?: string | null, - pair?: null, - arg3?: null - ): PairCreatedEventFilter; - }; - - estimateGas: { - allPairs(arg0: BigNumberish, overrides?: CallOverrides): Promise; - - allPairsLength(overrides?: CallOverrides): Promise; - - createPair( - tokenA: string, - tokenB: string, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - feeTo(overrides?: CallOverrides): Promise; - - feeToSetter(overrides?: CallOverrides): Promise; - - getPair( - tokenA: string, - tokenB: string, - overrides?: CallOverrides - ): Promise; - - setFeeTo( - arg0: string, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - setFeeToSetter( - arg0: string, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - }; - - populateTransaction: { - allPairs( - arg0: BigNumberish, - overrides?: CallOverrides - ): Promise; - - allPairsLength(overrides?: CallOverrides): Promise; - - createPair( - tokenA: string, - tokenB: string, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - feeTo(overrides?: CallOverrides): Promise; - - feeToSetter(overrides?: CallOverrides): Promise; - - getPair( - tokenA: string, - tokenB: string, - overrides?: CallOverrides - ): Promise; - - setFeeTo( - arg0: string, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - setFeeToSetter( - arg0: string, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - }; -} diff --git a/packages/interfaces/typechain-types/@uniswap/v2-core/contracts/interfaces/IUniswapV2Pair.ts b/packages/interfaces/typechain-types/@uniswap/v2-core/contracts/interfaces/IUniswapV2Pair.ts deleted file mode 100644 index f0266a52..00000000 --- a/packages/interfaces/typechain-types/@uniswap/v2-core/contracts/interfaces/IUniswapV2Pair.ts +++ /dev/null @@ -1,944 +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, -} from "../../../../common"; - -export interface IUniswapV2PairInterface extends utils.Interface { - functions: { - "DOMAIN_SEPARATOR()": FunctionFragment; - "MINIMUM_LIQUIDITY()": FunctionFragment; - "PERMIT_TYPEHASH()": FunctionFragment; - "allowance(address,address)": FunctionFragment; - "approve(address,uint256)": FunctionFragment; - "balanceOf(address)": FunctionFragment; - "burn(address)": FunctionFragment; - "decimals()": FunctionFragment; - "factory()": FunctionFragment; - "getReserves()": FunctionFragment; - "initialize(address,address)": FunctionFragment; - "kLast()": FunctionFragment; - "mint(address)": FunctionFragment; - "name()": FunctionFragment; - "nonces(address)": FunctionFragment; - "permit(address,address,uint256,uint256,uint8,bytes32,bytes32)": FunctionFragment; - "price0CumulativeLast()": FunctionFragment; - "price1CumulativeLast()": FunctionFragment; - "skim(address)": FunctionFragment; - "swap(uint256,uint256,address,bytes)": FunctionFragment; - "symbol()": FunctionFragment; - "sync()": FunctionFragment; - "token0()": FunctionFragment; - "token1()": FunctionFragment; - "totalSupply()": FunctionFragment; - "transfer(address,uint256)": FunctionFragment; - "transferFrom(address,address,uint256)": FunctionFragment; - }; - - getFunction( - nameOrSignatureOrTopic: - | "DOMAIN_SEPARATOR" - | "MINIMUM_LIQUIDITY" - | "PERMIT_TYPEHASH" - | "allowance" - | "approve" - | "balanceOf" - | "burn" - | "decimals" - | "factory" - | "getReserves" - | "initialize" - | "kLast" - | "mint" - | "name" - | "nonces" - | "permit" - | "price0CumulativeLast" - | "price1CumulativeLast" - | "skim" - | "swap" - | "symbol" - | "sync" - | "token0" - | "token1" - | "totalSupply" - | "transfer" - | "transferFrom" - ): FunctionFragment; - - encodeFunctionData( - functionFragment: "DOMAIN_SEPARATOR", - values?: undefined - ): string; - encodeFunctionData( - functionFragment: "MINIMUM_LIQUIDITY", - values?: undefined - ): string; - encodeFunctionData( - functionFragment: "PERMIT_TYPEHASH", - values?: undefined - ): string; - encodeFunctionData( - functionFragment: "allowance", - values: [string, string] - ): string; - encodeFunctionData( - functionFragment: "approve", - values: [string, BigNumberish] - ): string; - encodeFunctionData(functionFragment: "balanceOf", values: [string]): string; - encodeFunctionData(functionFragment: "burn", values: [string]): string; - encodeFunctionData(functionFragment: "decimals", values?: undefined): string; - encodeFunctionData(functionFragment: "factory", values?: undefined): string; - encodeFunctionData( - functionFragment: "getReserves", - values?: undefined - ): string; - encodeFunctionData( - functionFragment: "initialize", - values: [string, string] - ): string; - encodeFunctionData(functionFragment: "kLast", values?: undefined): string; - encodeFunctionData(functionFragment: "mint", values: [string]): string; - encodeFunctionData(functionFragment: "name", values?: undefined): string; - encodeFunctionData(functionFragment: "nonces", values: [string]): string; - encodeFunctionData( - functionFragment: "permit", - values: [ - string, - string, - BigNumberish, - BigNumberish, - BigNumberish, - BytesLike, - BytesLike - ] - ): string; - encodeFunctionData( - functionFragment: "price0CumulativeLast", - values?: undefined - ): string; - encodeFunctionData( - functionFragment: "price1CumulativeLast", - values?: undefined - ): string; - encodeFunctionData(functionFragment: "skim", values: [string]): string; - encodeFunctionData( - functionFragment: "swap", - values: [BigNumberish, BigNumberish, string, BytesLike] - ): string; - encodeFunctionData(functionFragment: "symbol", values?: undefined): string; - encodeFunctionData(functionFragment: "sync", values?: undefined): string; - encodeFunctionData(functionFragment: "token0", values?: undefined): string; - encodeFunctionData(functionFragment: "token1", values?: undefined): string; - encodeFunctionData( - functionFragment: "totalSupply", - values?: undefined - ): string; - encodeFunctionData( - functionFragment: "transfer", - values: [string, BigNumberish] - ): string; - encodeFunctionData( - functionFragment: "transferFrom", - values: [string, string, BigNumberish] - ): string; - - decodeFunctionResult( - functionFragment: "DOMAIN_SEPARATOR", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "MINIMUM_LIQUIDITY", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "PERMIT_TYPEHASH", - data: BytesLike - ): Result; - decodeFunctionResult(functionFragment: "allowance", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "approve", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "balanceOf", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "burn", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "decimals", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "factory", data: BytesLike): Result; - decodeFunctionResult( - functionFragment: "getReserves", - data: BytesLike - ): Result; - decodeFunctionResult(functionFragment: "initialize", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "kLast", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "mint", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "name", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "nonces", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "permit", data: BytesLike): Result; - decodeFunctionResult( - functionFragment: "price0CumulativeLast", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "price1CumulativeLast", - data: BytesLike - ): Result; - decodeFunctionResult(functionFragment: "skim", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "swap", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "symbol", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "sync", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "token0", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "token1", data: BytesLike): Result; - decodeFunctionResult( - functionFragment: "totalSupply", - data: BytesLike - ): Result; - decodeFunctionResult(functionFragment: "transfer", data: BytesLike): Result; - decodeFunctionResult( - functionFragment: "transferFrom", - data: BytesLike - ): Result; - - events: { - "Approval(address,address,uint256)": EventFragment; - "Burn(address,uint256,uint256,address)": EventFragment; - "Mint(address,uint256,uint256)": EventFragment; - "Swap(address,uint256,uint256,uint256,uint256,address)": EventFragment; - "Sync(uint112,uint112)": EventFragment; - "Transfer(address,address,uint256)": EventFragment; - }; - - getEvent(nameOrSignatureOrTopic: "Approval"): EventFragment; - getEvent(nameOrSignatureOrTopic: "Burn"): EventFragment; - getEvent(nameOrSignatureOrTopic: "Mint"): EventFragment; - getEvent(nameOrSignatureOrTopic: "Swap"): EventFragment; - getEvent(nameOrSignatureOrTopic: "Sync"): EventFragment; - getEvent(nameOrSignatureOrTopic: "Transfer"): EventFragment; -} - -export interface ApprovalEventObject { - owner: string; - spender: string; - value: BigNumber; -} -export type ApprovalEvent = TypedEvent< - [string, string, BigNumber], - ApprovalEventObject ->; - -export type ApprovalEventFilter = TypedEventFilter; - -export interface BurnEventObject { - sender: string; - amount0: BigNumber; - amount1: BigNumber; - to: string; -} -export type BurnEvent = TypedEvent< - [string, BigNumber, BigNumber, string], - BurnEventObject ->; - -export type BurnEventFilter = TypedEventFilter; - -export interface MintEventObject { - sender: string; - amount0: BigNumber; - amount1: BigNumber; -} -export type MintEvent = TypedEvent< - [string, BigNumber, BigNumber], - MintEventObject ->; - -export type MintEventFilter = TypedEventFilter; - -export interface SwapEventObject { - sender: string; - amount0In: BigNumber; - amount1In: BigNumber; - amount0Out: BigNumber; - amount1Out: BigNumber; - to: string; -} -export type SwapEvent = TypedEvent< - [string, BigNumber, BigNumber, BigNumber, BigNumber, string], - SwapEventObject ->; - -export type SwapEventFilter = TypedEventFilter; - -export interface SyncEventObject { - reserve0: BigNumber; - reserve1: BigNumber; -} -export type SyncEvent = TypedEvent<[BigNumber, BigNumber], SyncEventObject>; - -export type SyncEventFilter = TypedEventFilter; - -export interface TransferEventObject { - from: string; - to: string; - value: BigNumber; -} -export type TransferEvent = TypedEvent< - [string, string, BigNumber], - TransferEventObject ->; - -export type TransferEventFilter = TypedEventFilter; - -export interface IUniswapV2Pair extends BaseContract { - connect(signerOrProvider: Signer | Provider | string): this; - attach(addressOrName: string): this; - deployed(): Promise; - - interface: IUniswapV2PairInterface; - - 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: { - DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise<[string]>; - - MINIMUM_LIQUIDITY(overrides?: CallOverrides): Promise<[BigNumber]>; - - PERMIT_TYPEHASH(overrides?: CallOverrides): Promise<[string]>; - - allowance( - owner: string, - spender: string, - overrides?: CallOverrides - ): Promise<[BigNumber]>; - - approve( - spender: string, - value: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - balanceOf(owner: string, overrides?: CallOverrides): Promise<[BigNumber]>; - - burn( - to: string, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - decimals(overrides?: CallOverrides): Promise<[number]>; - - factory(overrides?: CallOverrides): Promise<[string]>; - - getReserves( - overrides?: CallOverrides - ): Promise< - [BigNumber, BigNumber, number] & { - reserve0: BigNumber; - reserve1: BigNumber; - blockTimestampLast: number; - } - >; - - initialize( - arg0: string, - arg1: string, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - kLast(overrides?: CallOverrides): Promise<[BigNumber]>; - - mint( - to: string, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - name(overrides?: CallOverrides): Promise<[string]>; - - nonces(owner: string, overrides?: CallOverrides): Promise<[BigNumber]>; - - permit( - owner: string, - spender: string, - value: BigNumberish, - deadline: BigNumberish, - v: BigNumberish, - r: BytesLike, - s: BytesLike, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - price0CumulativeLast(overrides?: CallOverrides): Promise<[BigNumber]>; - - price1CumulativeLast(overrides?: CallOverrides): Promise<[BigNumber]>; - - skim( - to: string, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - swap( - amount0Out: BigNumberish, - amount1Out: BigNumberish, - to: string, - data: BytesLike, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - symbol(overrides?: CallOverrides): Promise<[string]>; - - sync( - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - token0(overrides?: CallOverrides): Promise<[string]>; - - token1(overrides?: CallOverrides): Promise<[string]>; - - totalSupply(overrides?: CallOverrides): Promise<[BigNumber]>; - - transfer( - to: string, - value: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - transferFrom( - from: string, - to: string, - value: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - }; - - DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise; - - MINIMUM_LIQUIDITY(overrides?: CallOverrides): Promise; - - PERMIT_TYPEHASH(overrides?: CallOverrides): Promise; - - allowance( - owner: string, - spender: string, - overrides?: CallOverrides - ): Promise; - - approve( - spender: string, - value: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - balanceOf(owner: string, overrides?: CallOverrides): Promise; - - burn( - to: string, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - decimals(overrides?: CallOverrides): Promise; - - factory(overrides?: CallOverrides): Promise; - - getReserves( - overrides?: CallOverrides - ): Promise< - [BigNumber, BigNumber, number] & { - reserve0: BigNumber; - reserve1: BigNumber; - blockTimestampLast: number; - } - >; - - initialize( - arg0: string, - arg1: string, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - kLast(overrides?: CallOverrides): Promise; - - mint( - to: string, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - name(overrides?: CallOverrides): Promise; - - nonces(owner: string, overrides?: CallOverrides): Promise; - - permit( - owner: string, - spender: string, - value: BigNumberish, - deadline: BigNumberish, - v: BigNumberish, - r: BytesLike, - s: BytesLike, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - price0CumulativeLast(overrides?: CallOverrides): Promise; - - price1CumulativeLast(overrides?: CallOverrides): Promise; - - skim( - to: string, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - swap( - amount0Out: BigNumberish, - amount1Out: BigNumberish, - to: string, - data: BytesLike, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - symbol(overrides?: CallOverrides): Promise; - - sync( - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - token0(overrides?: CallOverrides): Promise; - - token1(overrides?: CallOverrides): Promise; - - totalSupply(overrides?: CallOverrides): Promise; - - transfer( - to: string, - value: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - transferFrom( - from: string, - to: string, - value: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - callStatic: { - DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise; - - MINIMUM_LIQUIDITY(overrides?: CallOverrides): Promise; - - PERMIT_TYPEHASH(overrides?: CallOverrides): Promise; - - allowance( - owner: string, - spender: string, - overrides?: CallOverrides - ): Promise; - - approve( - spender: string, - value: BigNumberish, - overrides?: CallOverrides - ): Promise; - - balanceOf(owner: string, overrides?: CallOverrides): Promise; - - burn( - to: string, - overrides?: CallOverrides - ): Promise< - [BigNumber, BigNumber] & { amount0: BigNumber; amount1: BigNumber } - >; - - decimals(overrides?: CallOverrides): Promise; - - factory(overrides?: CallOverrides): Promise; - - getReserves( - overrides?: CallOverrides - ): Promise< - [BigNumber, BigNumber, number] & { - reserve0: BigNumber; - reserve1: BigNumber; - blockTimestampLast: number; - } - >; - - initialize( - arg0: string, - arg1: string, - overrides?: CallOverrides - ): Promise; - - kLast(overrides?: CallOverrides): Promise; - - mint(to: string, overrides?: CallOverrides): Promise; - - name(overrides?: CallOverrides): Promise; - - nonces(owner: string, overrides?: CallOverrides): Promise; - - permit( - owner: string, - spender: string, - value: BigNumberish, - deadline: BigNumberish, - v: BigNumberish, - r: BytesLike, - s: BytesLike, - overrides?: CallOverrides - ): Promise; - - price0CumulativeLast(overrides?: CallOverrides): Promise; - - price1CumulativeLast(overrides?: CallOverrides): Promise; - - skim(to: string, overrides?: CallOverrides): Promise; - - swap( - amount0Out: BigNumberish, - amount1Out: BigNumberish, - to: string, - data: BytesLike, - overrides?: CallOverrides - ): Promise; - - symbol(overrides?: CallOverrides): Promise; - - sync(overrides?: CallOverrides): Promise; - - token0(overrides?: CallOverrides): Promise; - - token1(overrides?: CallOverrides): Promise; - - totalSupply(overrides?: CallOverrides): Promise; - - transfer( - to: string, - value: BigNumberish, - overrides?: CallOverrides - ): Promise; - - transferFrom( - from: string, - to: string, - value: BigNumberish, - overrides?: CallOverrides - ): Promise; - }; - - filters: { - "Approval(address,address,uint256)"( - owner?: string | null, - spender?: string | null, - value?: null - ): ApprovalEventFilter; - Approval( - owner?: string | null, - spender?: string | null, - value?: null - ): ApprovalEventFilter; - - "Burn(address,uint256,uint256,address)"( - sender?: string | null, - amount0?: null, - amount1?: null, - to?: string | null - ): BurnEventFilter; - Burn( - sender?: string | null, - amount0?: null, - amount1?: null, - to?: string | null - ): BurnEventFilter; - - "Mint(address,uint256,uint256)"( - sender?: string | null, - amount0?: null, - amount1?: null - ): MintEventFilter; - Mint( - sender?: string | null, - amount0?: null, - amount1?: null - ): MintEventFilter; - - "Swap(address,uint256,uint256,uint256,uint256,address)"( - sender?: string | null, - amount0In?: null, - amount1In?: null, - amount0Out?: null, - amount1Out?: null, - to?: string | null - ): SwapEventFilter; - Swap( - sender?: string | null, - amount0In?: null, - amount1In?: null, - amount0Out?: null, - amount1Out?: null, - to?: string | null - ): SwapEventFilter; - - "Sync(uint112,uint112)"(reserve0?: null, reserve1?: null): SyncEventFilter; - Sync(reserve0?: null, reserve1?: null): SyncEventFilter; - - "Transfer(address,address,uint256)"( - from?: string | null, - to?: string | null, - value?: null - ): TransferEventFilter; - Transfer( - from?: string | null, - to?: string | null, - value?: null - ): TransferEventFilter; - }; - - estimateGas: { - DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise; - - MINIMUM_LIQUIDITY(overrides?: CallOverrides): Promise; - - PERMIT_TYPEHASH(overrides?: CallOverrides): Promise; - - allowance( - owner: string, - spender: string, - overrides?: CallOverrides - ): Promise; - - approve( - spender: string, - value: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - balanceOf(owner: string, overrides?: CallOverrides): Promise; - - burn( - to: string, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - decimals(overrides?: CallOverrides): Promise; - - factory(overrides?: CallOverrides): Promise; - - getReserves(overrides?: CallOverrides): Promise; - - initialize( - arg0: string, - arg1: string, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - kLast(overrides?: CallOverrides): Promise; - - mint( - to: string, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - name(overrides?: CallOverrides): Promise; - - nonces(owner: string, overrides?: CallOverrides): Promise; - - permit( - owner: string, - spender: string, - value: BigNumberish, - deadline: BigNumberish, - v: BigNumberish, - r: BytesLike, - s: BytesLike, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - price0CumulativeLast(overrides?: CallOverrides): Promise; - - price1CumulativeLast(overrides?: CallOverrides): Promise; - - skim( - to: string, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - swap( - amount0Out: BigNumberish, - amount1Out: BigNumberish, - to: string, - data: BytesLike, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - symbol(overrides?: CallOverrides): Promise; - - sync( - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - token0(overrides?: CallOverrides): Promise; - - token1(overrides?: CallOverrides): Promise; - - totalSupply(overrides?: CallOverrides): Promise; - - transfer( - to: string, - value: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - transferFrom( - from: string, - to: string, - value: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - }; - - populateTransaction: { - DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise; - - MINIMUM_LIQUIDITY(overrides?: CallOverrides): Promise; - - PERMIT_TYPEHASH(overrides?: CallOverrides): Promise; - - allowance( - owner: string, - spender: string, - overrides?: CallOverrides - ): Promise; - - approve( - spender: string, - value: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - balanceOf( - owner: string, - overrides?: CallOverrides - ): Promise; - - burn( - to: string, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - decimals(overrides?: CallOverrides): Promise; - - factory(overrides?: CallOverrides): Promise; - - getReserves(overrides?: CallOverrides): Promise; - - initialize( - arg0: string, - arg1: string, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - kLast(overrides?: CallOverrides): Promise; - - mint( - to: string, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - name(overrides?: CallOverrides): Promise; - - nonces( - owner: string, - overrides?: CallOverrides - ): Promise; - - permit( - owner: string, - spender: string, - value: BigNumberish, - deadline: BigNumberish, - v: BigNumberish, - r: BytesLike, - s: BytesLike, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - price0CumulativeLast( - overrides?: CallOverrides - ): Promise; - - price1CumulativeLast( - overrides?: CallOverrides - ): Promise; - - skim( - to: string, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - swap( - amount0Out: BigNumberish, - amount1Out: BigNumberish, - to: string, - data: BytesLike, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - symbol(overrides?: CallOverrides): Promise; - - sync( - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - token0(overrides?: CallOverrides): Promise; - - token1(overrides?: CallOverrides): Promise; - - totalSupply(overrides?: CallOverrides): Promise; - - transfer( - to: string, - value: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - transferFrom( - from: string, - to: string, - value: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - }; -} diff --git a/packages/interfaces/typechain-types/@uniswap/v2-core/contracts/interfaces/index.ts b/packages/interfaces/typechain-types/@uniswap/v2-core/contracts/interfaces/index.ts deleted file mode 100644 index 0cf9f47a..00000000 --- a/packages/interfaces/typechain-types/@uniswap/v2-core/contracts/interfaces/index.ts +++ /dev/null @@ -1,5 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ -export type { IUniswapV2Factory } from "./IUniswapV2Factory"; -export type { IUniswapV2Pair } from "./IUniswapV2Pair"; diff --git a/packages/interfaces/typechain-types/@uniswap/v2-core/index.ts b/packages/interfaces/typechain-types/@uniswap/v2-core/index.ts deleted file mode 100644 index a11e4ca2..00000000 --- a/packages/interfaces/typechain-types/@uniswap/v2-core/index.ts +++ /dev/null @@ -1,5 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ -import type * as contracts from "./contracts"; -export type { contracts }; diff --git a/packages/interfaces/typechain-types/@uniswap/v2-periphery/contracts/UniswapV2Router02.ts b/packages/interfaces/typechain-types/@uniswap/v2-periphery/contracts/UniswapV2Router02.ts deleted file mode 100644 index 1c45dd48..00000000 --- a/packages/interfaces/typechain-types/@uniswap/v2-periphery/contracts/UniswapV2Router02.ts +++ /dev/null @@ -1,1446 +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 } from "@ethersproject/abi"; -import type { Listener, Provider } from "@ethersproject/providers"; -import type { - TypedEventFilter, - TypedEvent, - TypedListener, - OnEvent, -} from "../../../common"; - -export interface UniswapV2Router02Interface extends utils.Interface { - functions: { - "WETH()": FunctionFragment; - "addLiquidity(address,address,uint256,uint256,uint256,uint256,address,uint256)": FunctionFragment; - "addLiquidityETH(address,uint256,uint256,uint256,address,uint256)": FunctionFragment; - "factory()": FunctionFragment; - "getAmountIn(uint256,uint256,uint256)": FunctionFragment; - "getAmountOut(uint256,uint256,uint256)": FunctionFragment; - "getAmountsIn(uint256,address[])": FunctionFragment; - "getAmountsOut(uint256,address[])": FunctionFragment; - "quote(uint256,uint256,uint256)": FunctionFragment; - "removeLiquidity(address,address,uint256,uint256,uint256,address,uint256)": FunctionFragment; - "removeLiquidityETH(address,uint256,uint256,uint256,address,uint256)": FunctionFragment; - "removeLiquidityETHSupportingFeeOnTransferTokens(address,uint256,uint256,uint256,address,uint256)": FunctionFragment; - "removeLiquidityETHWithPermit(address,uint256,uint256,uint256,address,uint256,bool,uint8,bytes32,bytes32)": FunctionFragment; - "removeLiquidityETHWithPermitSupportingFeeOnTransferTokens(address,uint256,uint256,uint256,address,uint256,bool,uint8,bytes32,bytes32)": FunctionFragment; - "removeLiquidityWithPermit(address,address,uint256,uint256,uint256,address,uint256,bool,uint8,bytes32,bytes32)": FunctionFragment; - "swapETHForExactTokens(uint256,address[],address,uint256)": FunctionFragment; - "swapExactETHForTokens(uint256,address[],address,uint256)": FunctionFragment; - "swapExactETHForTokensSupportingFeeOnTransferTokens(uint256,address[],address,uint256)": FunctionFragment; - "swapExactTokensForETH(uint256,uint256,address[],address,uint256)": FunctionFragment; - "swapExactTokensForETHSupportingFeeOnTransferTokens(uint256,uint256,address[],address,uint256)": FunctionFragment; - "swapExactTokensForTokens(uint256,uint256,address[],address,uint256)": FunctionFragment; - "swapExactTokensForTokensSupportingFeeOnTransferTokens(uint256,uint256,address[],address,uint256)": FunctionFragment; - "swapTokensForExactETH(uint256,uint256,address[],address,uint256)": FunctionFragment; - "swapTokensForExactTokens(uint256,uint256,address[],address,uint256)": FunctionFragment; - }; - - getFunction( - nameOrSignatureOrTopic: - | "WETH" - | "addLiquidity" - | "addLiquidityETH" - | "factory" - | "getAmountIn" - | "getAmountOut" - | "getAmountsIn" - | "getAmountsOut" - | "quote" - | "removeLiquidity" - | "removeLiquidityETH" - | "removeLiquidityETHSupportingFeeOnTransferTokens" - | "removeLiquidityETHWithPermit" - | "removeLiquidityETHWithPermitSupportingFeeOnTransferTokens" - | "removeLiquidityWithPermit" - | "swapETHForExactTokens" - | "swapExactETHForTokens" - | "swapExactETHForTokensSupportingFeeOnTransferTokens" - | "swapExactTokensForETH" - | "swapExactTokensForETHSupportingFeeOnTransferTokens" - | "swapExactTokensForTokens" - | "swapExactTokensForTokensSupportingFeeOnTransferTokens" - | "swapTokensForExactETH" - | "swapTokensForExactTokens" - ): FunctionFragment; - - encodeFunctionData(functionFragment: "WETH", values?: undefined): string; - encodeFunctionData( - functionFragment: "addLiquidity", - values: [ - string, - string, - BigNumberish, - BigNumberish, - BigNumberish, - BigNumberish, - string, - BigNumberish - ] - ): string; - encodeFunctionData( - functionFragment: "addLiquidityETH", - values: [ - string, - BigNumberish, - BigNumberish, - BigNumberish, - string, - BigNumberish - ] - ): string; - encodeFunctionData(functionFragment: "factory", values?: undefined): string; - encodeFunctionData( - functionFragment: "getAmountIn", - values: [BigNumberish, BigNumberish, BigNumberish] - ): string; - encodeFunctionData( - functionFragment: "getAmountOut", - values: [BigNumberish, BigNumberish, BigNumberish] - ): string; - encodeFunctionData( - functionFragment: "getAmountsIn", - values: [BigNumberish, string[]] - ): string; - encodeFunctionData( - functionFragment: "getAmountsOut", - values: [BigNumberish, string[]] - ): string; - encodeFunctionData( - functionFragment: "quote", - values: [BigNumberish, BigNumberish, BigNumberish] - ): string; - encodeFunctionData( - functionFragment: "removeLiquidity", - values: [ - string, - string, - BigNumberish, - BigNumberish, - BigNumberish, - string, - BigNumberish - ] - ): string; - encodeFunctionData( - functionFragment: "removeLiquidityETH", - values: [ - string, - BigNumberish, - BigNumberish, - BigNumberish, - string, - BigNumberish - ] - ): string; - encodeFunctionData( - functionFragment: "removeLiquidityETHSupportingFeeOnTransferTokens", - values: [ - string, - BigNumberish, - BigNumberish, - BigNumberish, - string, - BigNumberish - ] - ): string; - encodeFunctionData( - functionFragment: "removeLiquidityETHWithPermit", - values: [ - string, - BigNumberish, - BigNumberish, - BigNumberish, - string, - BigNumberish, - boolean, - BigNumberish, - BytesLike, - BytesLike - ] - ): string; - encodeFunctionData( - functionFragment: "removeLiquidityETHWithPermitSupportingFeeOnTransferTokens", - values: [ - string, - BigNumberish, - BigNumberish, - BigNumberish, - string, - BigNumberish, - boolean, - BigNumberish, - BytesLike, - BytesLike - ] - ): string; - encodeFunctionData( - functionFragment: "removeLiquidityWithPermit", - values: [ - string, - string, - BigNumberish, - BigNumberish, - BigNumberish, - string, - BigNumberish, - boolean, - BigNumberish, - BytesLike, - BytesLike - ] - ): string; - encodeFunctionData( - functionFragment: "swapETHForExactTokens", - values: [BigNumberish, string[], string, BigNumberish] - ): string; - encodeFunctionData( - functionFragment: "swapExactETHForTokens", - values: [BigNumberish, string[], string, BigNumberish] - ): string; - encodeFunctionData( - functionFragment: "swapExactETHForTokensSupportingFeeOnTransferTokens", - values: [BigNumberish, string[], string, BigNumberish] - ): string; - encodeFunctionData( - functionFragment: "swapExactTokensForETH", - values: [BigNumberish, BigNumberish, string[], string, BigNumberish] - ): string; - encodeFunctionData( - functionFragment: "swapExactTokensForETHSupportingFeeOnTransferTokens", - values: [BigNumberish, BigNumberish, string[], string, BigNumberish] - ): string; - encodeFunctionData( - functionFragment: "swapExactTokensForTokens", - values: [BigNumberish, BigNumberish, string[], string, BigNumberish] - ): string; - encodeFunctionData( - functionFragment: "swapExactTokensForTokensSupportingFeeOnTransferTokens", - values: [BigNumberish, BigNumberish, string[], string, BigNumberish] - ): string; - encodeFunctionData( - functionFragment: "swapTokensForExactETH", - values: [BigNumberish, BigNumberish, string[], string, BigNumberish] - ): string; - encodeFunctionData( - functionFragment: "swapTokensForExactTokens", - values: [BigNumberish, BigNumberish, string[], string, BigNumberish] - ): string; - - decodeFunctionResult(functionFragment: "WETH", data: BytesLike): Result; - decodeFunctionResult( - functionFragment: "addLiquidity", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "addLiquidityETH", - data: BytesLike - ): Result; - decodeFunctionResult(functionFragment: "factory", data: BytesLike): Result; - decodeFunctionResult( - functionFragment: "getAmountIn", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "getAmountOut", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "getAmountsIn", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "getAmountsOut", - data: BytesLike - ): Result; - decodeFunctionResult(functionFragment: "quote", data: BytesLike): Result; - decodeFunctionResult( - functionFragment: "removeLiquidity", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "removeLiquidityETH", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "removeLiquidityETHSupportingFeeOnTransferTokens", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "removeLiquidityETHWithPermit", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "removeLiquidityETHWithPermitSupportingFeeOnTransferTokens", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "removeLiquidityWithPermit", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "swapETHForExactTokens", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "swapExactETHForTokens", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "swapExactETHForTokensSupportingFeeOnTransferTokens", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "swapExactTokensForETH", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "swapExactTokensForETHSupportingFeeOnTransferTokens", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "swapExactTokensForTokens", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "swapExactTokensForTokensSupportingFeeOnTransferTokens", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "swapTokensForExactETH", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "swapTokensForExactTokens", - data: BytesLike - ): Result; - - events: {}; -} - -export interface UniswapV2Router02 extends BaseContract { - connect(signerOrProvider: Signer | Provider | string): this; - attach(addressOrName: string): this; - deployed(): Promise; - - interface: UniswapV2Router02Interface; - - 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: { - WETH(overrides?: CallOverrides): Promise<[string]>; - - addLiquidity( - tokenA: string, - tokenB: string, - amountADesired: BigNumberish, - amountBDesired: BigNumberish, - amountAMin: BigNumberish, - amountBMin: BigNumberish, - to: string, - deadline: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - addLiquidityETH( - token: string, - amountTokenDesired: BigNumberish, - amountTokenMin: BigNumberish, - amountETHMin: BigNumberish, - to: string, - deadline: BigNumberish, - overrides?: PayableOverrides & { from?: string | Promise } - ): Promise; - - factory(overrides?: CallOverrides): Promise<[string]>; - - getAmountIn( - amountOut: BigNumberish, - reserveIn: BigNumberish, - reserveOut: BigNumberish, - overrides?: CallOverrides - ): Promise<[BigNumber] & { amountIn: BigNumber }>; - - getAmountOut( - amountIn: BigNumberish, - reserveIn: BigNumberish, - reserveOut: BigNumberish, - overrides?: CallOverrides - ): Promise<[BigNumber] & { amountOut: BigNumber }>; - - getAmountsIn( - amountOut: BigNumberish, - path: string[], - overrides?: CallOverrides - ): Promise<[BigNumber[]] & { amounts: BigNumber[] }>; - - getAmountsOut( - amountIn: BigNumberish, - path: string[], - overrides?: CallOverrides - ): Promise<[BigNumber[]] & { amounts: BigNumber[] }>; - - quote( - amountA: BigNumberish, - reserveA: BigNumberish, - reserveB: BigNumberish, - overrides?: CallOverrides - ): Promise<[BigNumber] & { amountB: BigNumber }>; - - removeLiquidity( - tokenA: string, - tokenB: string, - liquidity: BigNumberish, - amountAMin: BigNumberish, - amountBMin: BigNumberish, - to: string, - deadline: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - removeLiquidityETH( - token: string, - liquidity: BigNumberish, - amountTokenMin: BigNumberish, - amountETHMin: BigNumberish, - to: string, - deadline: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - removeLiquidityETHSupportingFeeOnTransferTokens( - token: string, - liquidity: BigNumberish, - amountTokenMin: BigNumberish, - amountETHMin: BigNumberish, - to: string, - deadline: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - removeLiquidityETHWithPermit( - token: string, - liquidity: BigNumberish, - amountTokenMin: BigNumberish, - amountETHMin: BigNumberish, - to: string, - deadline: BigNumberish, - approveMax: boolean, - v: BigNumberish, - r: BytesLike, - s: BytesLike, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - removeLiquidityETHWithPermitSupportingFeeOnTransferTokens( - token: string, - liquidity: BigNumberish, - amountTokenMin: BigNumberish, - amountETHMin: BigNumberish, - to: string, - deadline: BigNumberish, - approveMax: boolean, - v: BigNumberish, - r: BytesLike, - s: BytesLike, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - removeLiquidityWithPermit( - tokenA: string, - tokenB: string, - liquidity: BigNumberish, - amountAMin: BigNumberish, - amountBMin: BigNumberish, - to: string, - deadline: BigNumberish, - approveMax: boolean, - v: BigNumberish, - r: BytesLike, - s: BytesLike, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - swapETHForExactTokens( - amountOut: BigNumberish, - path: string[], - to: string, - deadline: BigNumberish, - overrides?: PayableOverrides & { from?: string | Promise } - ): Promise; - - swapExactETHForTokens( - amountOutMin: BigNumberish, - path: string[], - to: string, - deadline: BigNumberish, - overrides?: PayableOverrides & { from?: string | Promise } - ): Promise; - - swapExactETHForTokensSupportingFeeOnTransferTokens( - amountOutMin: BigNumberish, - path: string[], - to: string, - deadline: BigNumberish, - overrides?: PayableOverrides & { from?: string | Promise } - ): Promise; - - swapExactTokensForETH( - amountIn: BigNumberish, - amountOutMin: BigNumberish, - path: string[], - to: string, - deadline: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - swapExactTokensForETHSupportingFeeOnTransferTokens( - amountIn: BigNumberish, - amountOutMin: BigNumberish, - path: string[], - to: string, - deadline: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - swapExactTokensForTokens( - amountIn: BigNumberish, - amountOutMin: BigNumberish, - path: string[], - to: string, - deadline: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - swapExactTokensForTokensSupportingFeeOnTransferTokens( - amountIn: BigNumberish, - amountOutMin: BigNumberish, - path: string[], - to: string, - deadline: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - swapTokensForExactETH( - amountOut: BigNumberish, - amountInMax: BigNumberish, - path: string[], - to: string, - deadline: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - swapTokensForExactTokens( - amountOut: BigNumberish, - amountInMax: BigNumberish, - path: string[], - to: string, - deadline: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - }; - - WETH(overrides?: CallOverrides): Promise; - - addLiquidity( - tokenA: string, - tokenB: string, - amountADesired: BigNumberish, - amountBDesired: BigNumberish, - amountAMin: BigNumberish, - amountBMin: BigNumberish, - to: string, - deadline: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - addLiquidityETH( - token: string, - amountTokenDesired: BigNumberish, - amountTokenMin: BigNumberish, - amountETHMin: BigNumberish, - to: string, - deadline: BigNumberish, - overrides?: PayableOverrides & { from?: string | Promise } - ): Promise; - - factory(overrides?: CallOverrides): Promise; - - getAmountIn( - amountOut: BigNumberish, - reserveIn: BigNumberish, - reserveOut: BigNumberish, - overrides?: CallOverrides - ): Promise; - - getAmountOut( - amountIn: BigNumberish, - reserveIn: BigNumberish, - reserveOut: BigNumberish, - overrides?: CallOverrides - ): Promise; - - getAmountsIn( - amountOut: BigNumberish, - path: string[], - overrides?: CallOverrides - ): Promise; - - getAmountsOut( - amountIn: BigNumberish, - path: string[], - overrides?: CallOverrides - ): Promise; - - quote( - amountA: BigNumberish, - reserveA: BigNumberish, - reserveB: BigNumberish, - overrides?: CallOverrides - ): Promise; - - removeLiquidity( - tokenA: string, - tokenB: string, - liquidity: BigNumberish, - amountAMin: BigNumberish, - amountBMin: BigNumberish, - to: string, - deadline: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - removeLiquidityETH( - token: string, - liquidity: BigNumberish, - amountTokenMin: BigNumberish, - amountETHMin: BigNumberish, - to: string, - deadline: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - removeLiquidityETHSupportingFeeOnTransferTokens( - token: string, - liquidity: BigNumberish, - amountTokenMin: BigNumberish, - amountETHMin: BigNumberish, - to: string, - deadline: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - removeLiquidityETHWithPermit( - token: string, - liquidity: BigNumberish, - amountTokenMin: BigNumberish, - amountETHMin: BigNumberish, - to: string, - deadline: BigNumberish, - approveMax: boolean, - v: BigNumberish, - r: BytesLike, - s: BytesLike, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - removeLiquidityETHWithPermitSupportingFeeOnTransferTokens( - token: string, - liquidity: BigNumberish, - amountTokenMin: BigNumberish, - amountETHMin: BigNumberish, - to: string, - deadline: BigNumberish, - approveMax: boolean, - v: BigNumberish, - r: BytesLike, - s: BytesLike, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - removeLiquidityWithPermit( - tokenA: string, - tokenB: string, - liquidity: BigNumberish, - amountAMin: BigNumberish, - amountBMin: BigNumberish, - to: string, - deadline: BigNumberish, - approveMax: boolean, - v: BigNumberish, - r: BytesLike, - s: BytesLike, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - swapETHForExactTokens( - amountOut: BigNumberish, - path: string[], - to: string, - deadline: BigNumberish, - overrides?: PayableOverrides & { from?: string | Promise } - ): Promise; - - swapExactETHForTokens( - amountOutMin: BigNumberish, - path: string[], - to: string, - deadline: BigNumberish, - overrides?: PayableOverrides & { from?: string | Promise } - ): Promise; - - swapExactETHForTokensSupportingFeeOnTransferTokens( - amountOutMin: BigNumberish, - path: string[], - to: string, - deadline: BigNumberish, - overrides?: PayableOverrides & { from?: string | Promise } - ): Promise; - - swapExactTokensForETH( - amountIn: BigNumberish, - amountOutMin: BigNumberish, - path: string[], - to: string, - deadline: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - swapExactTokensForETHSupportingFeeOnTransferTokens( - amountIn: BigNumberish, - amountOutMin: BigNumberish, - path: string[], - to: string, - deadline: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - swapExactTokensForTokens( - amountIn: BigNumberish, - amountOutMin: BigNumberish, - path: string[], - to: string, - deadline: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - swapExactTokensForTokensSupportingFeeOnTransferTokens( - amountIn: BigNumberish, - amountOutMin: BigNumberish, - path: string[], - to: string, - deadline: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - swapTokensForExactETH( - amountOut: BigNumberish, - amountInMax: BigNumberish, - path: string[], - to: string, - deadline: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - swapTokensForExactTokens( - amountOut: BigNumberish, - amountInMax: BigNumberish, - path: string[], - to: string, - deadline: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - callStatic: { - WETH(overrides?: CallOverrides): Promise; - - addLiquidity( - tokenA: string, - tokenB: string, - amountADesired: BigNumberish, - amountBDesired: BigNumberish, - amountAMin: BigNumberish, - amountBMin: BigNumberish, - to: string, - deadline: BigNumberish, - overrides?: CallOverrides - ): Promise< - [BigNumber, BigNumber, BigNumber] & { - amountA: BigNumber; - amountB: BigNumber; - liquidity: BigNumber; - } - >; - - addLiquidityETH( - token: string, - amountTokenDesired: BigNumberish, - amountTokenMin: BigNumberish, - amountETHMin: BigNumberish, - to: string, - deadline: BigNumberish, - overrides?: CallOverrides - ): Promise< - [BigNumber, BigNumber, BigNumber] & { - amountToken: BigNumber; - amountETH: BigNumber; - liquidity: BigNumber; - } - >; - - factory(overrides?: CallOverrides): Promise; - - getAmountIn( - amountOut: BigNumberish, - reserveIn: BigNumberish, - reserveOut: BigNumberish, - overrides?: CallOverrides - ): Promise; - - getAmountOut( - amountIn: BigNumberish, - reserveIn: BigNumberish, - reserveOut: BigNumberish, - overrides?: CallOverrides - ): Promise; - - getAmountsIn( - amountOut: BigNumberish, - path: string[], - overrides?: CallOverrides - ): Promise; - - getAmountsOut( - amountIn: BigNumberish, - path: string[], - overrides?: CallOverrides - ): Promise; - - quote( - amountA: BigNumberish, - reserveA: BigNumberish, - reserveB: BigNumberish, - overrides?: CallOverrides - ): Promise; - - removeLiquidity( - tokenA: string, - tokenB: string, - liquidity: BigNumberish, - amountAMin: BigNumberish, - amountBMin: BigNumberish, - to: string, - deadline: BigNumberish, - overrides?: CallOverrides - ): Promise< - [BigNumber, BigNumber] & { amountA: BigNumber; amountB: BigNumber } - >; - - removeLiquidityETH( - token: string, - liquidity: BigNumberish, - amountTokenMin: BigNumberish, - amountETHMin: BigNumberish, - to: string, - deadline: BigNumberish, - overrides?: CallOverrides - ): Promise< - [BigNumber, BigNumber] & { amountToken: BigNumber; amountETH: BigNumber } - >; - - removeLiquidityETHSupportingFeeOnTransferTokens( - token: string, - liquidity: BigNumberish, - amountTokenMin: BigNumberish, - amountETHMin: BigNumberish, - to: string, - deadline: BigNumberish, - overrides?: CallOverrides - ): Promise; - - removeLiquidityETHWithPermit( - token: string, - liquidity: BigNumberish, - amountTokenMin: BigNumberish, - amountETHMin: BigNumberish, - to: string, - deadline: BigNumberish, - approveMax: boolean, - v: BigNumberish, - r: BytesLike, - s: BytesLike, - overrides?: CallOverrides - ): Promise< - [BigNumber, BigNumber] & { amountToken: BigNumber; amountETH: BigNumber } - >; - - removeLiquidityETHWithPermitSupportingFeeOnTransferTokens( - token: string, - liquidity: BigNumberish, - amountTokenMin: BigNumberish, - amountETHMin: BigNumberish, - to: string, - deadline: BigNumberish, - approveMax: boolean, - v: BigNumberish, - r: BytesLike, - s: BytesLike, - overrides?: CallOverrides - ): Promise; - - removeLiquidityWithPermit( - tokenA: string, - tokenB: string, - liquidity: BigNumberish, - amountAMin: BigNumberish, - amountBMin: BigNumberish, - to: string, - deadline: BigNumberish, - approveMax: boolean, - v: BigNumberish, - r: BytesLike, - s: BytesLike, - overrides?: CallOverrides - ): Promise< - [BigNumber, BigNumber] & { amountA: BigNumber; amountB: BigNumber } - >; - - swapETHForExactTokens( - amountOut: BigNumberish, - path: string[], - to: string, - deadline: BigNumberish, - overrides?: CallOverrides - ): Promise; - - swapExactETHForTokens( - amountOutMin: BigNumberish, - path: string[], - to: string, - deadline: BigNumberish, - overrides?: CallOverrides - ): Promise; - - swapExactETHForTokensSupportingFeeOnTransferTokens( - amountOutMin: BigNumberish, - path: string[], - to: string, - deadline: BigNumberish, - overrides?: CallOverrides - ): Promise; - - swapExactTokensForETH( - amountIn: BigNumberish, - amountOutMin: BigNumberish, - path: string[], - to: string, - deadline: BigNumberish, - overrides?: CallOverrides - ): Promise; - - swapExactTokensForETHSupportingFeeOnTransferTokens( - amountIn: BigNumberish, - amountOutMin: BigNumberish, - path: string[], - to: string, - deadline: BigNumberish, - overrides?: CallOverrides - ): Promise; - - swapExactTokensForTokens( - amountIn: BigNumberish, - amountOutMin: BigNumberish, - path: string[], - to: string, - deadline: BigNumberish, - overrides?: CallOverrides - ): Promise; - - swapExactTokensForTokensSupportingFeeOnTransferTokens( - amountIn: BigNumberish, - amountOutMin: BigNumberish, - path: string[], - to: string, - deadline: BigNumberish, - overrides?: CallOverrides - ): Promise; - - swapTokensForExactETH( - amountOut: BigNumberish, - amountInMax: BigNumberish, - path: string[], - to: string, - deadline: BigNumberish, - overrides?: CallOverrides - ): Promise; - - swapTokensForExactTokens( - amountOut: BigNumberish, - amountInMax: BigNumberish, - path: string[], - to: string, - deadline: BigNumberish, - overrides?: CallOverrides - ): Promise; - }; - - filters: {}; - - estimateGas: { - WETH(overrides?: CallOverrides): Promise; - - addLiquidity( - tokenA: string, - tokenB: string, - amountADesired: BigNumberish, - amountBDesired: BigNumberish, - amountAMin: BigNumberish, - amountBMin: BigNumberish, - to: string, - deadline: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - addLiquidityETH( - token: string, - amountTokenDesired: BigNumberish, - amountTokenMin: BigNumberish, - amountETHMin: BigNumberish, - to: string, - deadline: BigNumberish, - overrides?: PayableOverrides & { from?: string | Promise } - ): Promise; - - factory(overrides?: CallOverrides): Promise; - - getAmountIn( - amountOut: BigNumberish, - reserveIn: BigNumberish, - reserveOut: BigNumberish, - overrides?: CallOverrides - ): Promise; - - getAmountOut( - amountIn: BigNumberish, - reserveIn: BigNumberish, - reserveOut: BigNumberish, - overrides?: CallOverrides - ): Promise; - - getAmountsIn( - amountOut: BigNumberish, - path: string[], - overrides?: CallOverrides - ): Promise; - - getAmountsOut( - amountIn: BigNumberish, - path: string[], - overrides?: CallOverrides - ): Promise; - - quote( - amountA: BigNumberish, - reserveA: BigNumberish, - reserveB: BigNumberish, - overrides?: CallOverrides - ): Promise; - - removeLiquidity( - tokenA: string, - tokenB: string, - liquidity: BigNumberish, - amountAMin: BigNumberish, - amountBMin: BigNumberish, - to: string, - deadline: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - removeLiquidityETH( - token: string, - liquidity: BigNumberish, - amountTokenMin: BigNumberish, - amountETHMin: BigNumberish, - to: string, - deadline: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - removeLiquidityETHSupportingFeeOnTransferTokens( - token: string, - liquidity: BigNumberish, - amountTokenMin: BigNumberish, - amountETHMin: BigNumberish, - to: string, - deadline: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - removeLiquidityETHWithPermit( - token: string, - liquidity: BigNumberish, - amountTokenMin: BigNumberish, - amountETHMin: BigNumberish, - to: string, - deadline: BigNumberish, - approveMax: boolean, - v: BigNumberish, - r: BytesLike, - s: BytesLike, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - removeLiquidityETHWithPermitSupportingFeeOnTransferTokens( - token: string, - liquidity: BigNumberish, - amountTokenMin: BigNumberish, - amountETHMin: BigNumberish, - to: string, - deadline: BigNumberish, - approveMax: boolean, - v: BigNumberish, - r: BytesLike, - s: BytesLike, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - removeLiquidityWithPermit( - tokenA: string, - tokenB: string, - liquidity: BigNumberish, - amountAMin: BigNumberish, - amountBMin: BigNumberish, - to: string, - deadline: BigNumberish, - approveMax: boolean, - v: BigNumberish, - r: BytesLike, - s: BytesLike, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - swapETHForExactTokens( - amountOut: BigNumberish, - path: string[], - to: string, - deadline: BigNumberish, - overrides?: PayableOverrides & { from?: string | Promise } - ): Promise; - - swapExactETHForTokens( - amountOutMin: BigNumberish, - path: string[], - to: string, - deadline: BigNumberish, - overrides?: PayableOverrides & { from?: string | Promise } - ): Promise; - - swapExactETHForTokensSupportingFeeOnTransferTokens( - amountOutMin: BigNumberish, - path: string[], - to: string, - deadline: BigNumberish, - overrides?: PayableOverrides & { from?: string | Promise } - ): Promise; - - swapExactTokensForETH( - amountIn: BigNumberish, - amountOutMin: BigNumberish, - path: string[], - to: string, - deadline: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - swapExactTokensForETHSupportingFeeOnTransferTokens( - amountIn: BigNumberish, - amountOutMin: BigNumberish, - path: string[], - to: string, - deadline: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - swapExactTokensForTokens( - amountIn: BigNumberish, - amountOutMin: BigNumberish, - path: string[], - to: string, - deadline: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - swapExactTokensForTokensSupportingFeeOnTransferTokens( - amountIn: BigNumberish, - amountOutMin: BigNumberish, - path: string[], - to: string, - deadline: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - swapTokensForExactETH( - amountOut: BigNumberish, - amountInMax: BigNumberish, - path: string[], - to: string, - deadline: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - swapTokensForExactTokens( - amountOut: BigNumberish, - amountInMax: BigNumberish, - path: string[], - to: string, - deadline: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - }; - - populateTransaction: { - WETH(overrides?: CallOverrides): Promise; - - addLiquidity( - tokenA: string, - tokenB: string, - amountADesired: BigNumberish, - amountBDesired: BigNumberish, - amountAMin: BigNumberish, - amountBMin: BigNumberish, - to: string, - deadline: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - addLiquidityETH( - token: string, - amountTokenDesired: BigNumberish, - amountTokenMin: BigNumberish, - amountETHMin: BigNumberish, - to: string, - deadline: BigNumberish, - overrides?: PayableOverrides & { from?: string | Promise } - ): Promise; - - factory(overrides?: CallOverrides): Promise; - - getAmountIn( - amountOut: BigNumberish, - reserveIn: BigNumberish, - reserveOut: BigNumberish, - overrides?: CallOverrides - ): Promise; - - getAmountOut( - amountIn: BigNumberish, - reserveIn: BigNumberish, - reserveOut: BigNumberish, - overrides?: CallOverrides - ): Promise; - - getAmountsIn( - amountOut: BigNumberish, - path: string[], - overrides?: CallOverrides - ): Promise; - - getAmountsOut( - amountIn: BigNumberish, - path: string[], - overrides?: CallOverrides - ): Promise; - - quote( - amountA: BigNumberish, - reserveA: BigNumberish, - reserveB: BigNumberish, - overrides?: CallOverrides - ): Promise; - - removeLiquidity( - tokenA: string, - tokenB: string, - liquidity: BigNumberish, - amountAMin: BigNumberish, - amountBMin: BigNumberish, - to: string, - deadline: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - removeLiquidityETH( - token: string, - liquidity: BigNumberish, - amountTokenMin: BigNumberish, - amountETHMin: BigNumberish, - to: string, - deadline: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - removeLiquidityETHSupportingFeeOnTransferTokens( - token: string, - liquidity: BigNumberish, - amountTokenMin: BigNumberish, - amountETHMin: BigNumberish, - to: string, - deadline: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - removeLiquidityETHWithPermit( - token: string, - liquidity: BigNumberish, - amountTokenMin: BigNumberish, - amountETHMin: BigNumberish, - to: string, - deadline: BigNumberish, - approveMax: boolean, - v: BigNumberish, - r: BytesLike, - s: BytesLike, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - removeLiquidityETHWithPermitSupportingFeeOnTransferTokens( - token: string, - liquidity: BigNumberish, - amountTokenMin: BigNumberish, - amountETHMin: BigNumberish, - to: string, - deadline: BigNumberish, - approveMax: boolean, - v: BigNumberish, - r: BytesLike, - s: BytesLike, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - removeLiquidityWithPermit( - tokenA: string, - tokenB: string, - liquidity: BigNumberish, - amountAMin: BigNumberish, - amountBMin: BigNumberish, - to: string, - deadline: BigNumberish, - approveMax: boolean, - v: BigNumberish, - r: BytesLike, - s: BytesLike, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - swapETHForExactTokens( - amountOut: BigNumberish, - path: string[], - to: string, - deadline: BigNumberish, - overrides?: PayableOverrides & { from?: string | Promise } - ): Promise; - - swapExactETHForTokens( - amountOutMin: BigNumberish, - path: string[], - to: string, - deadline: BigNumberish, - overrides?: PayableOverrides & { from?: string | Promise } - ): Promise; - - swapExactETHForTokensSupportingFeeOnTransferTokens( - amountOutMin: BigNumberish, - path: string[], - to: string, - deadline: BigNumberish, - overrides?: PayableOverrides & { from?: string | Promise } - ): Promise; - - swapExactTokensForETH( - amountIn: BigNumberish, - amountOutMin: BigNumberish, - path: string[], - to: string, - deadline: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - swapExactTokensForETHSupportingFeeOnTransferTokens( - amountIn: BigNumberish, - amountOutMin: BigNumberish, - path: string[], - to: string, - deadline: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - swapExactTokensForTokens( - amountIn: BigNumberish, - amountOutMin: BigNumberish, - path: string[], - to: string, - deadline: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - swapExactTokensForTokensSupportingFeeOnTransferTokens( - amountIn: BigNumberish, - amountOutMin: BigNumberish, - path: string[], - to: string, - deadline: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - swapTokensForExactETH( - amountOut: BigNumberish, - amountInMax: BigNumberish, - path: string[], - to: string, - deadline: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - swapTokensForExactTokens( - amountOut: BigNumberish, - amountInMax: BigNumberish, - path: string[], - to: string, - deadline: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - }; -} diff --git a/packages/interfaces/typechain-types/@uniswap/v2-periphery/contracts/index.ts b/packages/interfaces/typechain-types/@uniswap/v2-periphery/contracts/index.ts deleted file mode 100644 index 33335590..00000000 --- a/packages/interfaces/typechain-types/@uniswap/v2-periphery/contracts/index.ts +++ /dev/null @@ -1,6 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ -import type * as interfaces from "./interfaces"; -export type { interfaces }; -export type { UniswapV2Router02 } from "./UniswapV2Router02"; diff --git a/packages/interfaces/typechain-types/@uniswap/v2-periphery/contracts/interfaces/IERC20.ts b/packages/interfaces/typechain-types/@uniswap/v2-periphery/contracts/interfaces/IERC20.ts deleted file mode 100644 index 44c615d1..00000000 --- a/packages/interfaces/typechain-types/@uniswap/v2-periphery/contracts/interfaces/IERC20.ts +++ /dev/null @@ -1,364 +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, -} from "../../../../common"; - -export interface IERC20Interface extends utils.Interface { - functions: { - "allowance(address,address)": FunctionFragment; - "approve(address,uint256)": FunctionFragment; - "balanceOf(address)": FunctionFragment; - "decimals()": FunctionFragment; - "name()": FunctionFragment; - "symbol()": FunctionFragment; - "totalSupply()": FunctionFragment; - "transfer(address,uint256)": FunctionFragment; - "transferFrom(address,address,uint256)": FunctionFragment; - }; - - getFunction( - nameOrSignatureOrTopic: - | "allowance" - | "approve" - | "balanceOf" - | "decimals" - | "name" - | "symbol" - | "totalSupply" - | "transfer" - | "transferFrom" - ): FunctionFragment; - - encodeFunctionData( - functionFragment: "allowance", - values: [string, string] - ): string; - encodeFunctionData( - functionFragment: "approve", - values: [string, BigNumberish] - ): string; - encodeFunctionData(functionFragment: "balanceOf", values: [string]): string; - encodeFunctionData(functionFragment: "decimals", values?: undefined): string; - encodeFunctionData(functionFragment: "name", values?: undefined): string; - encodeFunctionData(functionFragment: "symbol", values?: undefined): string; - encodeFunctionData( - functionFragment: "totalSupply", - values?: undefined - ): string; - encodeFunctionData( - functionFragment: "transfer", - values: [string, BigNumberish] - ): string; - encodeFunctionData( - functionFragment: "transferFrom", - values: [string, string, BigNumberish] - ): string; - - decodeFunctionResult(functionFragment: "allowance", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "approve", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "balanceOf", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "decimals", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "name", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "symbol", data: BytesLike): Result; - decodeFunctionResult( - functionFragment: "totalSupply", - data: BytesLike - ): Result; - decodeFunctionResult(functionFragment: "transfer", data: BytesLike): Result; - decodeFunctionResult( - functionFragment: "transferFrom", - data: BytesLike - ): Result; - - events: { - "Approval(address,address,uint256)": EventFragment; - "Transfer(address,address,uint256)": EventFragment; - }; - - getEvent(nameOrSignatureOrTopic: "Approval"): EventFragment; - getEvent(nameOrSignatureOrTopic: "Transfer"): EventFragment; -} - -export interface ApprovalEventObject { - owner: string; - spender: string; - value: BigNumber; -} -export type ApprovalEvent = TypedEvent< - [string, string, BigNumber], - ApprovalEventObject ->; - -export type ApprovalEventFilter = TypedEventFilter; - -export interface TransferEventObject { - from: string; - to: string; - value: BigNumber; -} -export type TransferEvent = TypedEvent< - [string, string, BigNumber], - TransferEventObject ->; - -export type TransferEventFilter = TypedEventFilter; - -export interface IERC20 extends BaseContract { - connect(signerOrProvider: Signer | Provider | string): this; - attach(addressOrName: string): this; - deployed(): Promise; - - interface: IERC20Interface; - - 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: { - allowance( - owner: string, - spender: string, - overrides?: CallOverrides - ): Promise<[BigNumber]>; - - approve( - spender: string, - value: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - balanceOf(owner: string, overrides?: CallOverrides): Promise<[BigNumber]>; - - decimals(overrides?: CallOverrides): Promise<[number]>; - - name(overrides?: CallOverrides): Promise<[string]>; - - symbol(overrides?: CallOverrides): Promise<[string]>; - - totalSupply(overrides?: CallOverrides): Promise<[BigNumber]>; - - transfer( - to: string, - value: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - transferFrom( - from: string, - to: string, - value: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - }; - - allowance( - owner: string, - spender: string, - overrides?: CallOverrides - ): Promise; - - approve( - spender: string, - value: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - balanceOf(owner: string, overrides?: CallOverrides): Promise; - - decimals(overrides?: CallOverrides): Promise; - - name(overrides?: CallOverrides): Promise; - - symbol(overrides?: CallOverrides): Promise; - - totalSupply(overrides?: CallOverrides): Promise; - - transfer( - to: string, - value: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - transferFrom( - from: string, - to: string, - value: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - callStatic: { - allowance( - owner: string, - spender: string, - overrides?: CallOverrides - ): Promise; - - approve( - spender: string, - value: BigNumberish, - overrides?: CallOverrides - ): Promise; - - balanceOf(owner: string, overrides?: CallOverrides): Promise; - - decimals(overrides?: CallOverrides): Promise; - - name(overrides?: CallOverrides): Promise; - - symbol(overrides?: CallOverrides): Promise; - - totalSupply(overrides?: CallOverrides): Promise; - - transfer( - to: string, - value: BigNumberish, - overrides?: CallOverrides - ): Promise; - - transferFrom( - from: string, - to: string, - value: BigNumberish, - overrides?: CallOverrides - ): Promise; - }; - - filters: { - "Approval(address,address,uint256)"( - owner?: string | null, - spender?: string | null, - value?: null - ): ApprovalEventFilter; - Approval( - owner?: string | null, - spender?: string | null, - value?: null - ): ApprovalEventFilter; - - "Transfer(address,address,uint256)"( - from?: string | null, - to?: string | null, - value?: null - ): TransferEventFilter; - Transfer( - from?: string | null, - to?: string | null, - value?: null - ): TransferEventFilter; - }; - - estimateGas: { - allowance( - owner: string, - spender: string, - overrides?: CallOverrides - ): Promise; - - approve( - spender: string, - value: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - balanceOf(owner: string, overrides?: CallOverrides): Promise; - - decimals(overrides?: CallOverrides): Promise; - - name(overrides?: CallOverrides): Promise; - - symbol(overrides?: CallOverrides): Promise; - - totalSupply(overrides?: CallOverrides): Promise; - - transfer( - to: string, - value: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - transferFrom( - from: string, - to: string, - value: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - }; - - populateTransaction: { - allowance( - owner: string, - spender: string, - overrides?: CallOverrides - ): Promise; - - approve( - spender: string, - value: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - balanceOf( - owner: string, - overrides?: CallOverrides - ): Promise; - - decimals(overrides?: CallOverrides): Promise; - - name(overrides?: CallOverrides): Promise; - - symbol(overrides?: CallOverrides): Promise; - - totalSupply(overrides?: CallOverrides): Promise; - - transfer( - to: string, - value: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - transferFrom( - from: string, - to: string, - value: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - }; -} diff --git a/packages/interfaces/typechain-types/@uniswap/v2-periphery/contracts/interfaces/IUniswapV2Router01.ts b/packages/interfaces/typechain-types/@uniswap/v2-periphery/contracts/interfaces/IUniswapV2Router01.ts deleted file mode 100644 index 0248d604..00000000 --- a/packages/interfaces/typechain-types/@uniswap/v2-periphery/contracts/interfaces/IUniswapV2Router01.ts +++ /dev/null @@ -1,1128 +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 } from "@ethersproject/abi"; -import type { Listener, Provider } from "@ethersproject/providers"; -import type { - TypedEventFilter, - TypedEvent, - TypedListener, - OnEvent, -} from "../../../../common"; - -export interface IUniswapV2Router01Interface extends utils.Interface { - functions: { - "WETH()": FunctionFragment; - "addLiquidity(address,address,uint256,uint256,uint256,uint256,address,uint256)": FunctionFragment; - "addLiquidityETH(address,uint256,uint256,uint256,address,uint256)": FunctionFragment; - "factory()": FunctionFragment; - "getAmountIn(uint256,uint256,uint256)": FunctionFragment; - "getAmountOut(uint256,uint256,uint256)": FunctionFragment; - "getAmountsIn(uint256,address[])": FunctionFragment; - "getAmountsOut(uint256,address[])": FunctionFragment; - "quote(uint256,uint256,uint256)": FunctionFragment; - "removeLiquidity(address,address,uint256,uint256,uint256,address,uint256)": FunctionFragment; - "removeLiquidityETH(address,uint256,uint256,uint256,address,uint256)": FunctionFragment; - "removeLiquidityETHWithPermit(address,uint256,uint256,uint256,address,uint256,bool,uint8,bytes32,bytes32)": FunctionFragment; - "removeLiquidityWithPermit(address,address,uint256,uint256,uint256,address,uint256,bool,uint8,bytes32,bytes32)": FunctionFragment; - "swapETHForExactTokens(uint256,address[],address,uint256)": FunctionFragment; - "swapExactETHForTokens(uint256,address[],address,uint256)": FunctionFragment; - "swapExactTokensForETH(uint256,uint256,address[],address,uint256)": FunctionFragment; - "swapExactTokensForTokens(uint256,uint256,address[],address,uint256)": FunctionFragment; - "swapTokensForExactETH(uint256,uint256,address[],address,uint256)": FunctionFragment; - "swapTokensForExactTokens(uint256,uint256,address[],address,uint256)": FunctionFragment; - }; - - getFunction( - nameOrSignatureOrTopic: - | "WETH" - | "addLiquidity" - | "addLiquidityETH" - | "factory" - | "getAmountIn" - | "getAmountOut" - | "getAmountsIn" - | "getAmountsOut" - | "quote" - | "removeLiquidity" - | "removeLiquidityETH" - | "removeLiquidityETHWithPermit" - | "removeLiquidityWithPermit" - | "swapETHForExactTokens" - | "swapExactETHForTokens" - | "swapExactTokensForETH" - | "swapExactTokensForTokens" - | "swapTokensForExactETH" - | "swapTokensForExactTokens" - ): FunctionFragment; - - encodeFunctionData(functionFragment: "WETH", values?: undefined): string; - encodeFunctionData( - functionFragment: "addLiquidity", - values: [ - string, - string, - BigNumberish, - BigNumberish, - BigNumberish, - BigNumberish, - string, - BigNumberish - ] - ): string; - encodeFunctionData( - functionFragment: "addLiquidityETH", - values: [ - string, - BigNumberish, - BigNumberish, - BigNumberish, - string, - BigNumberish - ] - ): string; - encodeFunctionData(functionFragment: "factory", values?: undefined): string; - encodeFunctionData( - functionFragment: "getAmountIn", - values: [BigNumberish, BigNumberish, BigNumberish] - ): string; - encodeFunctionData( - functionFragment: "getAmountOut", - values: [BigNumberish, BigNumberish, BigNumberish] - ): string; - encodeFunctionData( - functionFragment: "getAmountsIn", - values: [BigNumberish, string[]] - ): string; - encodeFunctionData( - functionFragment: "getAmountsOut", - values: [BigNumberish, string[]] - ): string; - encodeFunctionData( - functionFragment: "quote", - values: [BigNumberish, BigNumberish, BigNumberish] - ): string; - encodeFunctionData( - functionFragment: "removeLiquidity", - values: [ - string, - string, - BigNumberish, - BigNumberish, - BigNumberish, - string, - BigNumberish - ] - ): string; - encodeFunctionData( - functionFragment: "removeLiquidityETH", - values: [ - string, - BigNumberish, - BigNumberish, - BigNumberish, - string, - BigNumberish - ] - ): string; - encodeFunctionData( - functionFragment: "removeLiquidityETHWithPermit", - values: [ - string, - BigNumberish, - BigNumberish, - BigNumberish, - string, - BigNumberish, - boolean, - BigNumberish, - BytesLike, - BytesLike - ] - ): string; - encodeFunctionData( - functionFragment: "removeLiquidityWithPermit", - values: [ - string, - string, - BigNumberish, - BigNumberish, - BigNumberish, - string, - BigNumberish, - boolean, - BigNumberish, - BytesLike, - BytesLike - ] - ): string; - encodeFunctionData( - functionFragment: "swapETHForExactTokens", - values: [BigNumberish, string[], string, BigNumberish] - ): string; - encodeFunctionData( - functionFragment: "swapExactETHForTokens", - values: [BigNumberish, string[], string, BigNumberish] - ): string; - encodeFunctionData( - functionFragment: "swapExactTokensForETH", - values: [BigNumberish, BigNumberish, string[], string, BigNumberish] - ): string; - encodeFunctionData( - functionFragment: "swapExactTokensForTokens", - values: [BigNumberish, BigNumberish, string[], string, BigNumberish] - ): string; - encodeFunctionData( - functionFragment: "swapTokensForExactETH", - values: [BigNumberish, BigNumberish, string[], string, BigNumberish] - ): string; - encodeFunctionData( - functionFragment: "swapTokensForExactTokens", - values: [BigNumberish, BigNumberish, string[], string, BigNumberish] - ): string; - - decodeFunctionResult(functionFragment: "WETH", data: BytesLike): Result; - decodeFunctionResult( - functionFragment: "addLiquidity", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "addLiquidityETH", - data: BytesLike - ): Result; - decodeFunctionResult(functionFragment: "factory", data: BytesLike): Result; - decodeFunctionResult( - functionFragment: "getAmountIn", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "getAmountOut", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "getAmountsIn", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "getAmountsOut", - data: BytesLike - ): Result; - decodeFunctionResult(functionFragment: "quote", data: BytesLike): Result; - decodeFunctionResult( - functionFragment: "removeLiquidity", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "removeLiquidityETH", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "removeLiquidityETHWithPermit", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "removeLiquidityWithPermit", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "swapETHForExactTokens", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "swapExactETHForTokens", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "swapExactTokensForETH", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "swapExactTokensForTokens", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "swapTokensForExactETH", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "swapTokensForExactTokens", - data: BytesLike - ): Result; - - events: {}; -} - -export interface IUniswapV2Router01 extends BaseContract { - connect(signerOrProvider: Signer | Provider | string): this; - attach(addressOrName: string): this; - deployed(): Promise; - - interface: IUniswapV2Router01Interface; - - 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: { - WETH(overrides?: CallOverrides): Promise<[string]>; - - addLiquidity( - tokenA: string, - tokenB: string, - amountADesired: BigNumberish, - amountBDesired: BigNumberish, - amountAMin: BigNumberish, - amountBMin: BigNumberish, - to: string, - deadline: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - addLiquidityETH( - token: string, - amountTokenDesired: BigNumberish, - amountTokenMin: BigNumberish, - amountETHMin: BigNumberish, - to: string, - deadline: BigNumberish, - overrides?: PayableOverrides & { from?: string | Promise } - ): Promise; - - factory(overrides?: CallOverrides): Promise<[string]>; - - getAmountIn( - amountOut: BigNumberish, - reserveIn: BigNumberish, - reserveOut: BigNumberish, - overrides?: CallOverrides - ): Promise<[BigNumber] & { amountIn: BigNumber }>; - - getAmountOut( - amountIn: BigNumberish, - reserveIn: BigNumberish, - reserveOut: BigNumberish, - overrides?: CallOverrides - ): Promise<[BigNumber] & { amountOut: BigNumber }>; - - getAmountsIn( - amountOut: BigNumberish, - path: string[], - overrides?: CallOverrides - ): Promise<[BigNumber[]] & { amounts: BigNumber[] }>; - - getAmountsOut( - amountIn: BigNumberish, - path: string[], - overrides?: CallOverrides - ): Promise<[BigNumber[]] & { amounts: BigNumber[] }>; - - quote( - amountA: BigNumberish, - reserveA: BigNumberish, - reserveB: BigNumberish, - overrides?: CallOverrides - ): Promise<[BigNumber] & { amountB: BigNumber }>; - - removeLiquidity( - tokenA: string, - tokenB: string, - liquidity: BigNumberish, - amountAMin: BigNumberish, - amountBMin: BigNumberish, - to: string, - deadline: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - removeLiquidityETH( - token: string, - liquidity: BigNumberish, - amountTokenMin: BigNumberish, - amountETHMin: BigNumberish, - to: string, - deadline: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - removeLiquidityETHWithPermit( - token: string, - liquidity: BigNumberish, - amountTokenMin: BigNumberish, - amountETHMin: BigNumberish, - to: string, - deadline: BigNumberish, - approveMax: boolean, - v: BigNumberish, - r: BytesLike, - s: BytesLike, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - removeLiquidityWithPermit( - tokenA: string, - tokenB: string, - liquidity: BigNumberish, - amountAMin: BigNumberish, - amountBMin: BigNumberish, - to: string, - deadline: BigNumberish, - approveMax: boolean, - v: BigNumberish, - r: BytesLike, - s: BytesLike, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - swapETHForExactTokens( - amountOut: BigNumberish, - path: string[], - to: string, - deadline: BigNumberish, - overrides?: PayableOverrides & { from?: string | Promise } - ): Promise; - - swapExactETHForTokens( - amountOutMin: BigNumberish, - path: string[], - to: string, - deadline: BigNumberish, - overrides?: PayableOverrides & { from?: string | Promise } - ): Promise; - - swapExactTokensForETH( - amountIn: BigNumberish, - amountOutMin: BigNumberish, - path: string[], - to: string, - deadline: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - swapExactTokensForTokens( - amountIn: BigNumberish, - amountOutMin: BigNumberish, - path: string[], - to: string, - deadline: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - swapTokensForExactETH( - amountOut: BigNumberish, - amountInMax: BigNumberish, - path: string[], - to: string, - deadline: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - swapTokensForExactTokens( - amountOut: BigNumberish, - amountInMax: BigNumberish, - path: string[], - to: string, - deadline: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - }; - - WETH(overrides?: CallOverrides): Promise; - - addLiquidity( - tokenA: string, - tokenB: string, - amountADesired: BigNumberish, - amountBDesired: BigNumberish, - amountAMin: BigNumberish, - amountBMin: BigNumberish, - to: string, - deadline: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - addLiquidityETH( - token: string, - amountTokenDesired: BigNumberish, - amountTokenMin: BigNumberish, - amountETHMin: BigNumberish, - to: string, - deadline: BigNumberish, - overrides?: PayableOverrides & { from?: string | Promise } - ): Promise; - - factory(overrides?: CallOverrides): Promise; - - getAmountIn( - amountOut: BigNumberish, - reserveIn: BigNumberish, - reserveOut: BigNumberish, - overrides?: CallOverrides - ): Promise; - - getAmountOut( - amountIn: BigNumberish, - reserveIn: BigNumberish, - reserveOut: BigNumberish, - overrides?: CallOverrides - ): Promise; - - getAmountsIn( - amountOut: BigNumberish, - path: string[], - overrides?: CallOverrides - ): Promise; - - getAmountsOut( - amountIn: BigNumberish, - path: string[], - overrides?: CallOverrides - ): Promise; - - quote( - amountA: BigNumberish, - reserveA: BigNumberish, - reserveB: BigNumberish, - overrides?: CallOverrides - ): Promise; - - removeLiquidity( - tokenA: string, - tokenB: string, - liquidity: BigNumberish, - amountAMin: BigNumberish, - amountBMin: BigNumberish, - to: string, - deadline: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - removeLiquidityETH( - token: string, - liquidity: BigNumberish, - amountTokenMin: BigNumberish, - amountETHMin: BigNumberish, - to: string, - deadline: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - removeLiquidityETHWithPermit( - token: string, - liquidity: BigNumberish, - amountTokenMin: BigNumberish, - amountETHMin: BigNumberish, - to: string, - deadline: BigNumberish, - approveMax: boolean, - v: BigNumberish, - r: BytesLike, - s: BytesLike, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - removeLiquidityWithPermit( - tokenA: string, - tokenB: string, - liquidity: BigNumberish, - amountAMin: BigNumberish, - amountBMin: BigNumberish, - to: string, - deadline: BigNumberish, - approveMax: boolean, - v: BigNumberish, - r: BytesLike, - s: BytesLike, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - swapETHForExactTokens( - amountOut: BigNumberish, - path: string[], - to: string, - deadline: BigNumberish, - overrides?: PayableOverrides & { from?: string | Promise } - ): Promise; - - swapExactETHForTokens( - amountOutMin: BigNumberish, - path: string[], - to: string, - deadline: BigNumberish, - overrides?: PayableOverrides & { from?: string | Promise } - ): Promise; - - swapExactTokensForETH( - amountIn: BigNumberish, - amountOutMin: BigNumberish, - path: string[], - to: string, - deadline: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - swapExactTokensForTokens( - amountIn: BigNumberish, - amountOutMin: BigNumberish, - path: string[], - to: string, - deadline: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - swapTokensForExactETH( - amountOut: BigNumberish, - amountInMax: BigNumberish, - path: string[], - to: string, - deadline: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - swapTokensForExactTokens( - amountOut: BigNumberish, - amountInMax: BigNumberish, - path: string[], - to: string, - deadline: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - callStatic: { - WETH(overrides?: CallOverrides): Promise; - - addLiquidity( - tokenA: string, - tokenB: string, - amountADesired: BigNumberish, - amountBDesired: BigNumberish, - amountAMin: BigNumberish, - amountBMin: BigNumberish, - to: string, - deadline: BigNumberish, - overrides?: CallOverrides - ): Promise< - [BigNumber, BigNumber, BigNumber] & { - amountA: BigNumber; - amountB: BigNumber; - liquidity: BigNumber; - } - >; - - addLiquidityETH( - token: string, - amountTokenDesired: BigNumberish, - amountTokenMin: BigNumberish, - amountETHMin: BigNumberish, - to: string, - deadline: BigNumberish, - overrides?: CallOverrides - ): Promise< - [BigNumber, BigNumber, BigNumber] & { - amountToken: BigNumber; - amountETH: BigNumber; - liquidity: BigNumber; - } - >; - - factory(overrides?: CallOverrides): Promise; - - getAmountIn( - amountOut: BigNumberish, - reserveIn: BigNumberish, - reserveOut: BigNumberish, - overrides?: CallOverrides - ): Promise; - - getAmountOut( - amountIn: BigNumberish, - reserveIn: BigNumberish, - reserveOut: BigNumberish, - overrides?: CallOverrides - ): Promise; - - getAmountsIn( - amountOut: BigNumberish, - path: string[], - overrides?: CallOverrides - ): Promise; - - getAmountsOut( - amountIn: BigNumberish, - path: string[], - overrides?: CallOverrides - ): Promise; - - quote( - amountA: BigNumberish, - reserveA: BigNumberish, - reserveB: BigNumberish, - overrides?: CallOverrides - ): Promise; - - removeLiquidity( - tokenA: string, - tokenB: string, - liquidity: BigNumberish, - amountAMin: BigNumberish, - amountBMin: BigNumberish, - to: string, - deadline: BigNumberish, - overrides?: CallOverrides - ): Promise< - [BigNumber, BigNumber] & { amountA: BigNumber; amountB: BigNumber } - >; - - removeLiquidityETH( - token: string, - liquidity: BigNumberish, - amountTokenMin: BigNumberish, - amountETHMin: BigNumberish, - to: string, - deadline: BigNumberish, - overrides?: CallOverrides - ): Promise< - [BigNumber, BigNumber] & { amountToken: BigNumber; amountETH: BigNumber } - >; - - removeLiquidityETHWithPermit( - token: string, - liquidity: BigNumberish, - amountTokenMin: BigNumberish, - amountETHMin: BigNumberish, - to: string, - deadline: BigNumberish, - approveMax: boolean, - v: BigNumberish, - r: BytesLike, - s: BytesLike, - overrides?: CallOverrides - ): Promise< - [BigNumber, BigNumber] & { amountToken: BigNumber; amountETH: BigNumber } - >; - - removeLiquidityWithPermit( - tokenA: string, - tokenB: string, - liquidity: BigNumberish, - amountAMin: BigNumberish, - amountBMin: BigNumberish, - to: string, - deadline: BigNumberish, - approveMax: boolean, - v: BigNumberish, - r: BytesLike, - s: BytesLike, - overrides?: CallOverrides - ): Promise< - [BigNumber, BigNumber] & { amountA: BigNumber; amountB: BigNumber } - >; - - swapETHForExactTokens( - amountOut: BigNumberish, - path: string[], - to: string, - deadline: BigNumberish, - overrides?: CallOverrides - ): Promise; - - swapExactETHForTokens( - amountOutMin: BigNumberish, - path: string[], - to: string, - deadline: BigNumberish, - overrides?: CallOverrides - ): Promise; - - swapExactTokensForETH( - amountIn: BigNumberish, - amountOutMin: BigNumberish, - path: string[], - to: string, - deadline: BigNumberish, - overrides?: CallOverrides - ): Promise; - - swapExactTokensForTokens( - amountIn: BigNumberish, - amountOutMin: BigNumberish, - path: string[], - to: string, - deadline: BigNumberish, - overrides?: CallOverrides - ): Promise; - - swapTokensForExactETH( - amountOut: BigNumberish, - amountInMax: BigNumberish, - path: string[], - to: string, - deadline: BigNumberish, - overrides?: CallOverrides - ): Promise; - - swapTokensForExactTokens( - amountOut: BigNumberish, - amountInMax: BigNumberish, - path: string[], - to: string, - deadline: BigNumberish, - overrides?: CallOverrides - ): Promise; - }; - - filters: {}; - - estimateGas: { - WETH(overrides?: CallOverrides): Promise; - - addLiquidity( - tokenA: string, - tokenB: string, - amountADesired: BigNumberish, - amountBDesired: BigNumberish, - amountAMin: BigNumberish, - amountBMin: BigNumberish, - to: string, - deadline: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - addLiquidityETH( - token: string, - amountTokenDesired: BigNumberish, - amountTokenMin: BigNumberish, - amountETHMin: BigNumberish, - to: string, - deadline: BigNumberish, - overrides?: PayableOverrides & { from?: string | Promise } - ): Promise; - - factory(overrides?: CallOverrides): Promise; - - getAmountIn( - amountOut: BigNumberish, - reserveIn: BigNumberish, - reserveOut: BigNumberish, - overrides?: CallOverrides - ): Promise; - - getAmountOut( - amountIn: BigNumberish, - reserveIn: BigNumberish, - reserveOut: BigNumberish, - overrides?: CallOverrides - ): Promise; - - getAmountsIn( - amountOut: BigNumberish, - path: string[], - overrides?: CallOverrides - ): Promise; - - getAmountsOut( - amountIn: BigNumberish, - path: string[], - overrides?: CallOverrides - ): Promise; - - quote( - amountA: BigNumberish, - reserveA: BigNumberish, - reserveB: BigNumberish, - overrides?: CallOverrides - ): Promise; - - removeLiquidity( - tokenA: string, - tokenB: string, - liquidity: BigNumberish, - amountAMin: BigNumberish, - amountBMin: BigNumberish, - to: string, - deadline: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - removeLiquidityETH( - token: string, - liquidity: BigNumberish, - amountTokenMin: BigNumberish, - amountETHMin: BigNumberish, - to: string, - deadline: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - removeLiquidityETHWithPermit( - token: string, - liquidity: BigNumberish, - amountTokenMin: BigNumberish, - amountETHMin: BigNumberish, - to: string, - deadline: BigNumberish, - approveMax: boolean, - v: BigNumberish, - r: BytesLike, - s: BytesLike, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - removeLiquidityWithPermit( - tokenA: string, - tokenB: string, - liquidity: BigNumberish, - amountAMin: BigNumberish, - amountBMin: BigNumberish, - to: string, - deadline: BigNumberish, - approveMax: boolean, - v: BigNumberish, - r: BytesLike, - s: BytesLike, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - swapETHForExactTokens( - amountOut: BigNumberish, - path: string[], - to: string, - deadline: BigNumberish, - overrides?: PayableOverrides & { from?: string | Promise } - ): Promise; - - swapExactETHForTokens( - amountOutMin: BigNumberish, - path: string[], - to: string, - deadline: BigNumberish, - overrides?: PayableOverrides & { from?: string | Promise } - ): Promise; - - swapExactTokensForETH( - amountIn: BigNumberish, - amountOutMin: BigNumberish, - path: string[], - to: string, - deadline: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - swapExactTokensForTokens( - amountIn: BigNumberish, - amountOutMin: BigNumberish, - path: string[], - to: string, - deadline: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - swapTokensForExactETH( - amountOut: BigNumberish, - amountInMax: BigNumberish, - path: string[], - to: string, - deadline: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - swapTokensForExactTokens( - amountOut: BigNumberish, - amountInMax: BigNumberish, - path: string[], - to: string, - deadline: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - }; - - populateTransaction: { - WETH(overrides?: CallOverrides): Promise; - - addLiquidity( - tokenA: string, - tokenB: string, - amountADesired: BigNumberish, - amountBDesired: BigNumberish, - amountAMin: BigNumberish, - amountBMin: BigNumberish, - to: string, - deadline: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - addLiquidityETH( - token: string, - amountTokenDesired: BigNumberish, - amountTokenMin: BigNumberish, - amountETHMin: BigNumberish, - to: string, - deadline: BigNumberish, - overrides?: PayableOverrides & { from?: string | Promise } - ): Promise; - - factory(overrides?: CallOverrides): Promise; - - getAmountIn( - amountOut: BigNumberish, - reserveIn: BigNumberish, - reserveOut: BigNumberish, - overrides?: CallOverrides - ): Promise; - - getAmountOut( - amountIn: BigNumberish, - reserveIn: BigNumberish, - reserveOut: BigNumberish, - overrides?: CallOverrides - ): Promise; - - getAmountsIn( - amountOut: BigNumberish, - path: string[], - overrides?: CallOverrides - ): Promise; - - getAmountsOut( - amountIn: BigNumberish, - path: string[], - overrides?: CallOverrides - ): Promise; - - quote( - amountA: BigNumberish, - reserveA: BigNumberish, - reserveB: BigNumberish, - overrides?: CallOverrides - ): Promise; - - removeLiquidity( - tokenA: string, - tokenB: string, - liquidity: BigNumberish, - amountAMin: BigNumberish, - amountBMin: BigNumberish, - to: string, - deadline: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - removeLiquidityETH( - token: string, - liquidity: BigNumberish, - amountTokenMin: BigNumberish, - amountETHMin: BigNumberish, - to: string, - deadline: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - removeLiquidityETHWithPermit( - token: string, - liquidity: BigNumberish, - amountTokenMin: BigNumberish, - amountETHMin: BigNumberish, - to: string, - deadline: BigNumberish, - approveMax: boolean, - v: BigNumberish, - r: BytesLike, - s: BytesLike, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - removeLiquidityWithPermit( - tokenA: string, - tokenB: string, - liquidity: BigNumberish, - amountAMin: BigNumberish, - amountBMin: BigNumberish, - to: string, - deadline: BigNumberish, - approveMax: boolean, - v: BigNumberish, - r: BytesLike, - s: BytesLike, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - swapETHForExactTokens( - amountOut: BigNumberish, - path: string[], - to: string, - deadline: BigNumberish, - overrides?: PayableOverrides & { from?: string | Promise } - ): Promise; - - swapExactETHForTokens( - amountOutMin: BigNumberish, - path: string[], - to: string, - deadline: BigNumberish, - overrides?: PayableOverrides & { from?: string | Promise } - ): Promise; - - swapExactTokensForETH( - amountIn: BigNumberish, - amountOutMin: BigNumberish, - path: string[], - to: string, - deadline: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - swapExactTokensForTokens( - amountIn: BigNumberish, - amountOutMin: BigNumberish, - path: string[], - to: string, - deadline: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - swapTokensForExactETH( - amountOut: BigNumberish, - amountInMax: BigNumberish, - path: string[], - to: string, - deadline: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - swapTokensForExactTokens( - amountOut: BigNumberish, - amountInMax: BigNumberish, - path: string[], - to: string, - deadline: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - }; -} diff --git a/packages/interfaces/typechain-types/@uniswap/v2-periphery/contracts/interfaces/IUniswapV2Router02.ts b/packages/interfaces/typechain-types/@uniswap/v2-periphery/contracts/interfaces/IUniswapV2Router02.ts deleted file mode 100644 index 2a9ed54f..00000000 --- a/packages/interfaces/typechain-types/@uniswap/v2-periphery/contracts/interfaces/IUniswapV2Router02.ts +++ /dev/null @@ -1,1446 +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 } from "@ethersproject/abi"; -import type { Listener, Provider } from "@ethersproject/providers"; -import type { - TypedEventFilter, - TypedEvent, - TypedListener, - OnEvent, -} from "../../../../common"; - -export interface IUniswapV2Router02Interface extends utils.Interface { - functions: { - "WETH()": FunctionFragment; - "addLiquidity(address,address,uint256,uint256,uint256,uint256,address,uint256)": FunctionFragment; - "addLiquidityETH(address,uint256,uint256,uint256,address,uint256)": FunctionFragment; - "factory()": FunctionFragment; - "getAmountIn(uint256,uint256,uint256)": FunctionFragment; - "getAmountOut(uint256,uint256,uint256)": FunctionFragment; - "getAmountsIn(uint256,address[])": FunctionFragment; - "getAmountsOut(uint256,address[])": FunctionFragment; - "quote(uint256,uint256,uint256)": FunctionFragment; - "removeLiquidity(address,address,uint256,uint256,uint256,address,uint256)": FunctionFragment; - "removeLiquidityETH(address,uint256,uint256,uint256,address,uint256)": FunctionFragment; - "removeLiquidityETHSupportingFeeOnTransferTokens(address,uint256,uint256,uint256,address,uint256)": FunctionFragment; - "removeLiquidityETHWithPermit(address,uint256,uint256,uint256,address,uint256,bool,uint8,bytes32,bytes32)": FunctionFragment; - "removeLiquidityETHWithPermitSupportingFeeOnTransferTokens(address,uint256,uint256,uint256,address,uint256,bool,uint8,bytes32,bytes32)": FunctionFragment; - "removeLiquidityWithPermit(address,address,uint256,uint256,uint256,address,uint256,bool,uint8,bytes32,bytes32)": FunctionFragment; - "swapETHForExactTokens(uint256,address[],address,uint256)": FunctionFragment; - "swapExactETHForTokens(uint256,address[],address,uint256)": FunctionFragment; - "swapExactETHForTokensSupportingFeeOnTransferTokens(uint256,address[],address,uint256)": FunctionFragment; - "swapExactTokensForETH(uint256,uint256,address[],address,uint256)": FunctionFragment; - "swapExactTokensForETHSupportingFeeOnTransferTokens(uint256,uint256,address[],address,uint256)": FunctionFragment; - "swapExactTokensForTokens(uint256,uint256,address[],address,uint256)": FunctionFragment; - "swapExactTokensForTokensSupportingFeeOnTransferTokens(uint256,uint256,address[],address,uint256)": FunctionFragment; - "swapTokensForExactETH(uint256,uint256,address[],address,uint256)": FunctionFragment; - "swapTokensForExactTokens(uint256,uint256,address[],address,uint256)": FunctionFragment; - }; - - getFunction( - nameOrSignatureOrTopic: - | "WETH" - | "addLiquidity" - | "addLiquidityETH" - | "factory" - | "getAmountIn" - | "getAmountOut" - | "getAmountsIn" - | "getAmountsOut" - | "quote" - | "removeLiquidity" - | "removeLiquidityETH" - | "removeLiquidityETHSupportingFeeOnTransferTokens" - | "removeLiquidityETHWithPermit" - | "removeLiquidityETHWithPermitSupportingFeeOnTransferTokens" - | "removeLiquidityWithPermit" - | "swapETHForExactTokens" - | "swapExactETHForTokens" - | "swapExactETHForTokensSupportingFeeOnTransferTokens" - | "swapExactTokensForETH" - | "swapExactTokensForETHSupportingFeeOnTransferTokens" - | "swapExactTokensForTokens" - | "swapExactTokensForTokensSupportingFeeOnTransferTokens" - | "swapTokensForExactETH" - | "swapTokensForExactTokens" - ): FunctionFragment; - - encodeFunctionData(functionFragment: "WETH", values?: undefined): string; - encodeFunctionData( - functionFragment: "addLiquidity", - values: [ - string, - string, - BigNumberish, - BigNumberish, - BigNumberish, - BigNumberish, - string, - BigNumberish - ] - ): string; - encodeFunctionData( - functionFragment: "addLiquidityETH", - values: [ - string, - BigNumberish, - BigNumberish, - BigNumberish, - string, - BigNumberish - ] - ): string; - encodeFunctionData(functionFragment: "factory", values?: undefined): string; - encodeFunctionData( - functionFragment: "getAmountIn", - values: [BigNumberish, BigNumberish, BigNumberish] - ): string; - encodeFunctionData( - functionFragment: "getAmountOut", - values: [BigNumberish, BigNumberish, BigNumberish] - ): string; - encodeFunctionData( - functionFragment: "getAmountsIn", - values: [BigNumberish, string[]] - ): string; - encodeFunctionData( - functionFragment: "getAmountsOut", - values: [BigNumberish, string[]] - ): string; - encodeFunctionData( - functionFragment: "quote", - values: [BigNumberish, BigNumberish, BigNumberish] - ): string; - encodeFunctionData( - functionFragment: "removeLiquidity", - values: [ - string, - string, - BigNumberish, - BigNumberish, - BigNumberish, - string, - BigNumberish - ] - ): string; - encodeFunctionData( - functionFragment: "removeLiquidityETH", - values: [ - string, - BigNumberish, - BigNumberish, - BigNumberish, - string, - BigNumberish - ] - ): string; - encodeFunctionData( - functionFragment: "removeLiquidityETHSupportingFeeOnTransferTokens", - values: [ - string, - BigNumberish, - BigNumberish, - BigNumberish, - string, - BigNumberish - ] - ): string; - encodeFunctionData( - functionFragment: "removeLiquidityETHWithPermit", - values: [ - string, - BigNumberish, - BigNumberish, - BigNumberish, - string, - BigNumberish, - boolean, - BigNumberish, - BytesLike, - BytesLike - ] - ): string; - encodeFunctionData( - functionFragment: "removeLiquidityETHWithPermitSupportingFeeOnTransferTokens", - values: [ - string, - BigNumberish, - BigNumberish, - BigNumberish, - string, - BigNumberish, - boolean, - BigNumberish, - BytesLike, - BytesLike - ] - ): string; - encodeFunctionData( - functionFragment: "removeLiquidityWithPermit", - values: [ - string, - string, - BigNumberish, - BigNumberish, - BigNumberish, - string, - BigNumberish, - boolean, - BigNumberish, - BytesLike, - BytesLike - ] - ): string; - encodeFunctionData( - functionFragment: "swapETHForExactTokens", - values: [BigNumberish, string[], string, BigNumberish] - ): string; - encodeFunctionData( - functionFragment: "swapExactETHForTokens", - values: [BigNumberish, string[], string, BigNumberish] - ): string; - encodeFunctionData( - functionFragment: "swapExactETHForTokensSupportingFeeOnTransferTokens", - values: [BigNumberish, string[], string, BigNumberish] - ): string; - encodeFunctionData( - functionFragment: "swapExactTokensForETH", - values: [BigNumberish, BigNumberish, string[], string, BigNumberish] - ): string; - encodeFunctionData( - functionFragment: "swapExactTokensForETHSupportingFeeOnTransferTokens", - values: [BigNumberish, BigNumberish, string[], string, BigNumberish] - ): string; - encodeFunctionData( - functionFragment: "swapExactTokensForTokens", - values: [BigNumberish, BigNumberish, string[], string, BigNumberish] - ): string; - encodeFunctionData( - functionFragment: "swapExactTokensForTokensSupportingFeeOnTransferTokens", - values: [BigNumberish, BigNumberish, string[], string, BigNumberish] - ): string; - encodeFunctionData( - functionFragment: "swapTokensForExactETH", - values: [BigNumberish, BigNumberish, string[], string, BigNumberish] - ): string; - encodeFunctionData( - functionFragment: "swapTokensForExactTokens", - values: [BigNumberish, BigNumberish, string[], string, BigNumberish] - ): string; - - decodeFunctionResult(functionFragment: "WETH", data: BytesLike): Result; - decodeFunctionResult( - functionFragment: "addLiquidity", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "addLiquidityETH", - data: BytesLike - ): Result; - decodeFunctionResult(functionFragment: "factory", data: BytesLike): Result; - decodeFunctionResult( - functionFragment: "getAmountIn", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "getAmountOut", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "getAmountsIn", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "getAmountsOut", - data: BytesLike - ): Result; - decodeFunctionResult(functionFragment: "quote", data: BytesLike): Result; - decodeFunctionResult( - functionFragment: "removeLiquidity", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "removeLiquidityETH", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "removeLiquidityETHSupportingFeeOnTransferTokens", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "removeLiquidityETHWithPermit", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "removeLiquidityETHWithPermitSupportingFeeOnTransferTokens", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "removeLiquidityWithPermit", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "swapETHForExactTokens", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "swapExactETHForTokens", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "swapExactETHForTokensSupportingFeeOnTransferTokens", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "swapExactTokensForETH", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "swapExactTokensForETHSupportingFeeOnTransferTokens", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "swapExactTokensForTokens", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "swapExactTokensForTokensSupportingFeeOnTransferTokens", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "swapTokensForExactETH", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "swapTokensForExactTokens", - data: BytesLike - ): Result; - - events: {}; -} - -export interface IUniswapV2Router02 extends BaseContract { - connect(signerOrProvider: Signer | Provider | string): this; - attach(addressOrName: string): this; - deployed(): Promise; - - interface: IUniswapV2Router02Interface; - - 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: { - WETH(overrides?: CallOverrides): Promise<[string]>; - - addLiquidity( - tokenA: string, - tokenB: string, - amountADesired: BigNumberish, - amountBDesired: BigNumberish, - amountAMin: BigNumberish, - amountBMin: BigNumberish, - to: string, - deadline: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - addLiquidityETH( - token: string, - amountTokenDesired: BigNumberish, - amountTokenMin: BigNumberish, - amountETHMin: BigNumberish, - to: string, - deadline: BigNumberish, - overrides?: PayableOverrides & { from?: string | Promise } - ): Promise; - - factory(overrides?: CallOverrides): Promise<[string]>; - - getAmountIn( - amountOut: BigNumberish, - reserveIn: BigNumberish, - reserveOut: BigNumberish, - overrides?: CallOverrides - ): Promise<[BigNumber] & { amountIn: BigNumber }>; - - getAmountOut( - amountIn: BigNumberish, - reserveIn: BigNumberish, - reserveOut: BigNumberish, - overrides?: CallOverrides - ): Promise<[BigNumber] & { amountOut: BigNumber }>; - - getAmountsIn( - amountOut: BigNumberish, - path: string[], - overrides?: CallOverrides - ): Promise<[BigNumber[]] & { amounts: BigNumber[] }>; - - getAmountsOut( - amountIn: BigNumberish, - path: string[], - overrides?: CallOverrides - ): Promise<[BigNumber[]] & { amounts: BigNumber[] }>; - - quote( - amountA: BigNumberish, - reserveA: BigNumberish, - reserveB: BigNumberish, - overrides?: CallOverrides - ): Promise<[BigNumber] & { amountB: BigNumber }>; - - removeLiquidity( - tokenA: string, - tokenB: string, - liquidity: BigNumberish, - amountAMin: BigNumberish, - amountBMin: BigNumberish, - to: string, - deadline: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - removeLiquidityETH( - token: string, - liquidity: BigNumberish, - amountTokenMin: BigNumberish, - amountETHMin: BigNumberish, - to: string, - deadline: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - removeLiquidityETHSupportingFeeOnTransferTokens( - token: string, - liquidity: BigNumberish, - amountTokenMin: BigNumberish, - amountETHMin: BigNumberish, - to: string, - deadline: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - removeLiquidityETHWithPermit( - token: string, - liquidity: BigNumberish, - amountTokenMin: BigNumberish, - amountETHMin: BigNumberish, - to: string, - deadline: BigNumberish, - approveMax: boolean, - v: BigNumberish, - r: BytesLike, - s: BytesLike, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - removeLiquidityETHWithPermitSupportingFeeOnTransferTokens( - token: string, - liquidity: BigNumberish, - amountTokenMin: BigNumberish, - amountETHMin: BigNumberish, - to: string, - deadline: BigNumberish, - approveMax: boolean, - v: BigNumberish, - r: BytesLike, - s: BytesLike, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - removeLiquidityWithPermit( - tokenA: string, - tokenB: string, - liquidity: BigNumberish, - amountAMin: BigNumberish, - amountBMin: BigNumberish, - to: string, - deadline: BigNumberish, - approveMax: boolean, - v: BigNumberish, - r: BytesLike, - s: BytesLike, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - swapETHForExactTokens( - amountOut: BigNumberish, - path: string[], - to: string, - deadline: BigNumberish, - overrides?: PayableOverrides & { from?: string | Promise } - ): Promise; - - swapExactETHForTokens( - amountOutMin: BigNumberish, - path: string[], - to: string, - deadline: BigNumberish, - overrides?: PayableOverrides & { from?: string | Promise } - ): Promise; - - swapExactETHForTokensSupportingFeeOnTransferTokens( - amountOutMin: BigNumberish, - path: string[], - to: string, - deadline: BigNumberish, - overrides?: PayableOverrides & { from?: string | Promise } - ): Promise; - - swapExactTokensForETH( - amountIn: BigNumberish, - amountOutMin: BigNumberish, - path: string[], - to: string, - deadline: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - swapExactTokensForETHSupportingFeeOnTransferTokens( - amountIn: BigNumberish, - amountOutMin: BigNumberish, - path: string[], - to: string, - deadline: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - swapExactTokensForTokens( - amountIn: BigNumberish, - amountOutMin: BigNumberish, - path: string[], - to: string, - deadline: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - swapExactTokensForTokensSupportingFeeOnTransferTokens( - amountIn: BigNumberish, - amountOutMin: BigNumberish, - path: string[], - to: string, - deadline: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - swapTokensForExactETH( - amountOut: BigNumberish, - amountInMax: BigNumberish, - path: string[], - to: string, - deadline: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - swapTokensForExactTokens( - amountOut: BigNumberish, - amountInMax: BigNumberish, - path: string[], - to: string, - deadline: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - }; - - WETH(overrides?: CallOverrides): Promise; - - addLiquidity( - tokenA: string, - tokenB: string, - amountADesired: BigNumberish, - amountBDesired: BigNumberish, - amountAMin: BigNumberish, - amountBMin: BigNumberish, - to: string, - deadline: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - addLiquidityETH( - token: string, - amountTokenDesired: BigNumberish, - amountTokenMin: BigNumberish, - amountETHMin: BigNumberish, - to: string, - deadline: BigNumberish, - overrides?: PayableOverrides & { from?: string | Promise } - ): Promise; - - factory(overrides?: CallOverrides): Promise; - - getAmountIn( - amountOut: BigNumberish, - reserveIn: BigNumberish, - reserveOut: BigNumberish, - overrides?: CallOverrides - ): Promise; - - getAmountOut( - amountIn: BigNumberish, - reserveIn: BigNumberish, - reserveOut: BigNumberish, - overrides?: CallOverrides - ): Promise; - - getAmountsIn( - amountOut: BigNumberish, - path: string[], - overrides?: CallOverrides - ): Promise; - - getAmountsOut( - amountIn: BigNumberish, - path: string[], - overrides?: CallOverrides - ): Promise; - - quote( - amountA: BigNumberish, - reserveA: BigNumberish, - reserveB: BigNumberish, - overrides?: CallOverrides - ): Promise; - - removeLiquidity( - tokenA: string, - tokenB: string, - liquidity: BigNumberish, - amountAMin: BigNumberish, - amountBMin: BigNumberish, - to: string, - deadline: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - removeLiquidityETH( - token: string, - liquidity: BigNumberish, - amountTokenMin: BigNumberish, - amountETHMin: BigNumberish, - to: string, - deadline: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - removeLiquidityETHSupportingFeeOnTransferTokens( - token: string, - liquidity: BigNumberish, - amountTokenMin: BigNumberish, - amountETHMin: BigNumberish, - to: string, - deadline: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - removeLiquidityETHWithPermit( - token: string, - liquidity: BigNumberish, - amountTokenMin: BigNumberish, - amountETHMin: BigNumberish, - to: string, - deadline: BigNumberish, - approveMax: boolean, - v: BigNumberish, - r: BytesLike, - s: BytesLike, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - removeLiquidityETHWithPermitSupportingFeeOnTransferTokens( - token: string, - liquidity: BigNumberish, - amountTokenMin: BigNumberish, - amountETHMin: BigNumberish, - to: string, - deadline: BigNumberish, - approveMax: boolean, - v: BigNumberish, - r: BytesLike, - s: BytesLike, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - removeLiquidityWithPermit( - tokenA: string, - tokenB: string, - liquidity: BigNumberish, - amountAMin: BigNumberish, - amountBMin: BigNumberish, - to: string, - deadline: BigNumberish, - approveMax: boolean, - v: BigNumberish, - r: BytesLike, - s: BytesLike, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - swapETHForExactTokens( - amountOut: BigNumberish, - path: string[], - to: string, - deadline: BigNumberish, - overrides?: PayableOverrides & { from?: string | Promise } - ): Promise; - - swapExactETHForTokens( - amountOutMin: BigNumberish, - path: string[], - to: string, - deadline: BigNumberish, - overrides?: PayableOverrides & { from?: string | Promise } - ): Promise; - - swapExactETHForTokensSupportingFeeOnTransferTokens( - amountOutMin: BigNumberish, - path: string[], - to: string, - deadline: BigNumberish, - overrides?: PayableOverrides & { from?: string | Promise } - ): Promise; - - swapExactTokensForETH( - amountIn: BigNumberish, - amountOutMin: BigNumberish, - path: string[], - to: string, - deadline: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - swapExactTokensForETHSupportingFeeOnTransferTokens( - amountIn: BigNumberish, - amountOutMin: BigNumberish, - path: string[], - to: string, - deadline: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - swapExactTokensForTokens( - amountIn: BigNumberish, - amountOutMin: BigNumberish, - path: string[], - to: string, - deadline: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - swapExactTokensForTokensSupportingFeeOnTransferTokens( - amountIn: BigNumberish, - amountOutMin: BigNumberish, - path: string[], - to: string, - deadline: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - swapTokensForExactETH( - amountOut: BigNumberish, - amountInMax: BigNumberish, - path: string[], - to: string, - deadline: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - swapTokensForExactTokens( - amountOut: BigNumberish, - amountInMax: BigNumberish, - path: string[], - to: string, - deadline: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - callStatic: { - WETH(overrides?: CallOverrides): Promise; - - addLiquidity( - tokenA: string, - tokenB: string, - amountADesired: BigNumberish, - amountBDesired: BigNumberish, - amountAMin: BigNumberish, - amountBMin: BigNumberish, - to: string, - deadline: BigNumberish, - overrides?: CallOverrides - ): Promise< - [BigNumber, BigNumber, BigNumber] & { - amountA: BigNumber; - amountB: BigNumber; - liquidity: BigNumber; - } - >; - - addLiquidityETH( - token: string, - amountTokenDesired: BigNumberish, - amountTokenMin: BigNumberish, - amountETHMin: BigNumberish, - to: string, - deadline: BigNumberish, - overrides?: CallOverrides - ): Promise< - [BigNumber, BigNumber, BigNumber] & { - amountToken: BigNumber; - amountETH: BigNumber; - liquidity: BigNumber; - } - >; - - factory(overrides?: CallOverrides): Promise; - - getAmountIn( - amountOut: BigNumberish, - reserveIn: BigNumberish, - reserveOut: BigNumberish, - overrides?: CallOverrides - ): Promise; - - getAmountOut( - amountIn: BigNumberish, - reserveIn: BigNumberish, - reserveOut: BigNumberish, - overrides?: CallOverrides - ): Promise; - - getAmountsIn( - amountOut: BigNumberish, - path: string[], - overrides?: CallOverrides - ): Promise; - - getAmountsOut( - amountIn: BigNumberish, - path: string[], - overrides?: CallOverrides - ): Promise; - - quote( - amountA: BigNumberish, - reserveA: BigNumberish, - reserveB: BigNumberish, - overrides?: CallOverrides - ): Promise; - - removeLiquidity( - tokenA: string, - tokenB: string, - liquidity: BigNumberish, - amountAMin: BigNumberish, - amountBMin: BigNumberish, - to: string, - deadline: BigNumberish, - overrides?: CallOverrides - ): Promise< - [BigNumber, BigNumber] & { amountA: BigNumber; amountB: BigNumber } - >; - - removeLiquidityETH( - token: string, - liquidity: BigNumberish, - amountTokenMin: BigNumberish, - amountETHMin: BigNumberish, - to: string, - deadline: BigNumberish, - overrides?: CallOverrides - ): Promise< - [BigNumber, BigNumber] & { amountToken: BigNumber; amountETH: BigNumber } - >; - - removeLiquidityETHSupportingFeeOnTransferTokens( - token: string, - liquidity: BigNumberish, - amountTokenMin: BigNumberish, - amountETHMin: BigNumberish, - to: string, - deadline: BigNumberish, - overrides?: CallOverrides - ): Promise; - - removeLiquidityETHWithPermit( - token: string, - liquidity: BigNumberish, - amountTokenMin: BigNumberish, - amountETHMin: BigNumberish, - to: string, - deadline: BigNumberish, - approveMax: boolean, - v: BigNumberish, - r: BytesLike, - s: BytesLike, - overrides?: CallOverrides - ): Promise< - [BigNumber, BigNumber] & { amountToken: BigNumber; amountETH: BigNumber } - >; - - removeLiquidityETHWithPermitSupportingFeeOnTransferTokens( - token: string, - liquidity: BigNumberish, - amountTokenMin: BigNumberish, - amountETHMin: BigNumberish, - to: string, - deadline: BigNumberish, - approveMax: boolean, - v: BigNumberish, - r: BytesLike, - s: BytesLike, - overrides?: CallOverrides - ): Promise; - - removeLiquidityWithPermit( - tokenA: string, - tokenB: string, - liquidity: BigNumberish, - amountAMin: BigNumberish, - amountBMin: BigNumberish, - to: string, - deadline: BigNumberish, - approveMax: boolean, - v: BigNumberish, - r: BytesLike, - s: BytesLike, - overrides?: CallOverrides - ): Promise< - [BigNumber, BigNumber] & { amountA: BigNumber; amountB: BigNumber } - >; - - swapETHForExactTokens( - amountOut: BigNumberish, - path: string[], - to: string, - deadline: BigNumberish, - overrides?: CallOverrides - ): Promise; - - swapExactETHForTokens( - amountOutMin: BigNumberish, - path: string[], - to: string, - deadline: BigNumberish, - overrides?: CallOverrides - ): Promise; - - swapExactETHForTokensSupportingFeeOnTransferTokens( - amountOutMin: BigNumberish, - path: string[], - to: string, - deadline: BigNumberish, - overrides?: CallOverrides - ): Promise; - - swapExactTokensForETH( - amountIn: BigNumberish, - amountOutMin: BigNumberish, - path: string[], - to: string, - deadline: BigNumberish, - overrides?: CallOverrides - ): Promise; - - swapExactTokensForETHSupportingFeeOnTransferTokens( - amountIn: BigNumberish, - amountOutMin: BigNumberish, - path: string[], - to: string, - deadline: BigNumberish, - overrides?: CallOverrides - ): Promise; - - swapExactTokensForTokens( - amountIn: BigNumberish, - amountOutMin: BigNumberish, - path: string[], - to: string, - deadline: BigNumberish, - overrides?: CallOverrides - ): Promise; - - swapExactTokensForTokensSupportingFeeOnTransferTokens( - amountIn: BigNumberish, - amountOutMin: BigNumberish, - path: string[], - to: string, - deadline: BigNumberish, - overrides?: CallOverrides - ): Promise; - - swapTokensForExactETH( - amountOut: BigNumberish, - amountInMax: BigNumberish, - path: string[], - to: string, - deadline: BigNumberish, - overrides?: CallOverrides - ): Promise; - - swapTokensForExactTokens( - amountOut: BigNumberish, - amountInMax: BigNumberish, - path: string[], - to: string, - deadline: BigNumberish, - overrides?: CallOverrides - ): Promise; - }; - - filters: {}; - - estimateGas: { - WETH(overrides?: CallOverrides): Promise; - - addLiquidity( - tokenA: string, - tokenB: string, - amountADesired: BigNumberish, - amountBDesired: BigNumberish, - amountAMin: BigNumberish, - amountBMin: BigNumberish, - to: string, - deadline: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - addLiquidityETH( - token: string, - amountTokenDesired: BigNumberish, - amountTokenMin: BigNumberish, - amountETHMin: BigNumberish, - to: string, - deadline: BigNumberish, - overrides?: PayableOverrides & { from?: string | Promise } - ): Promise; - - factory(overrides?: CallOverrides): Promise; - - getAmountIn( - amountOut: BigNumberish, - reserveIn: BigNumberish, - reserveOut: BigNumberish, - overrides?: CallOverrides - ): Promise; - - getAmountOut( - amountIn: BigNumberish, - reserveIn: BigNumberish, - reserveOut: BigNumberish, - overrides?: CallOverrides - ): Promise; - - getAmountsIn( - amountOut: BigNumberish, - path: string[], - overrides?: CallOverrides - ): Promise; - - getAmountsOut( - amountIn: BigNumberish, - path: string[], - overrides?: CallOverrides - ): Promise; - - quote( - amountA: BigNumberish, - reserveA: BigNumberish, - reserveB: BigNumberish, - overrides?: CallOverrides - ): Promise; - - removeLiquidity( - tokenA: string, - tokenB: string, - liquidity: BigNumberish, - amountAMin: BigNumberish, - amountBMin: BigNumberish, - to: string, - deadline: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - removeLiquidityETH( - token: string, - liquidity: BigNumberish, - amountTokenMin: BigNumberish, - amountETHMin: BigNumberish, - to: string, - deadline: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - removeLiquidityETHSupportingFeeOnTransferTokens( - token: string, - liquidity: BigNumberish, - amountTokenMin: BigNumberish, - amountETHMin: BigNumberish, - to: string, - deadline: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - removeLiquidityETHWithPermit( - token: string, - liquidity: BigNumberish, - amountTokenMin: BigNumberish, - amountETHMin: BigNumberish, - to: string, - deadline: BigNumberish, - approveMax: boolean, - v: BigNumberish, - r: BytesLike, - s: BytesLike, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - removeLiquidityETHWithPermitSupportingFeeOnTransferTokens( - token: string, - liquidity: BigNumberish, - amountTokenMin: BigNumberish, - amountETHMin: BigNumberish, - to: string, - deadline: BigNumberish, - approveMax: boolean, - v: BigNumberish, - r: BytesLike, - s: BytesLike, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - removeLiquidityWithPermit( - tokenA: string, - tokenB: string, - liquidity: BigNumberish, - amountAMin: BigNumberish, - amountBMin: BigNumberish, - to: string, - deadline: BigNumberish, - approveMax: boolean, - v: BigNumberish, - r: BytesLike, - s: BytesLike, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - swapETHForExactTokens( - amountOut: BigNumberish, - path: string[], - to: string, - deadline: BigNumberish, - overrides?: PayableOverrides & { from?: string | Promise } - ): Promise; - - swapExactETHForTokens( - amountOutMin: BigNumberish, - path: string[], - to: string, - deadline: BigNumberish, - overrides?: PayableOverrides & { from?: string | Promise } - ): Promise; - - swapExactETHForTokensSupportingFeeOnTransferTokens( - amountOutMin: BigNumberish, - path: string[], - to: string, - deadline: BigNumberish, - overrides?: PayableOverrides & { from?: string | Promise } - ): Promise; - - swapExactTokensForETH( - amountIn: BigNumberish, - amountOutMin: BigNumberish, - path: string[], - to: string, - deadline: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - swapExactTokensForETHSupportingFeeOnTransferTokens( - amountIn: BigNumberish, - amountOutMin: BigNumberish, - path: string[], - to: string, - deadline: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - swapExactTokensForTokens( - amountIn: BigNumberish, - amountOutMin: BigNumberish, - path: string[], - to: string, - deadline: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - swapExactTokensForTokensSupportingFeeOnTransferTokens( - amountIn: BigNumberish, - amountOutMin: BigNumberish, - path: string[], - to: string, - deadline: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - swapTokensForExactETH( - amountOut: BigNumberish, - amountInMax: BigNumberish, - path: string[], - to: string, - deadline: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - swapTokensForExactTokens( - amountOut: BigNumberish, - amountInMax: BigNumberish, - path: string[], - to: string, - deadline: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - }; - - populateTransaction: { - WETH(overrides?: CallOverrides): Promise; - - addLiquidity( - tokenA: string, - tokenB: string, - amountADesired: BigNumberish, - amountBDesired: BigNumberish, - amountAMin: BigNumberish, - amountBMin: BigNumberish, - to: string, - deadline: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - addLiquidityETH( - token: string, - amountTokenDesired: BigNumberish, - amountTokenMin: BigNumberish, - amountETHMin: BigNumberish, - to: string, - deadline: BigNumberish, - overrides?: PayableOverrides & { from?: string | Promise } - ): Promise; - - factory(overrides?: CallOverrides): Promise; - - getAmountIn( - amountOut: BigNumberish, - reserveIn: BigNumberish, - reserveOut: BigNumberish, - overrides?: CallOverrides - ): Promise; - - getAmountOut( - amountIn: BigNumberish, - reserveIn: BigNumberish, - reserveOut: BigNumberish, - overrides?: CallOverrides - ): Promise; - - getAmountsIn( - amountOut: BigNumberish, - path: string[], - overrides?: CallOverrides - ): Promise; - - getAmountsOut( - amountIn: BigNumberish, - path: string[], - overrides?: CallOverrides - ): Promise; - - quote( - amountA: BigNumberish, - reserveA: BigNumberish, - reserveB: BigNumberish, - overrides?: CallOverrides - ): Promise; - - removeLiquidity( - tokenA: string, - tokenB: string, - liquidity: BigNumberish, - amountAMin: BigNumberish, - amountBMin: BigNumberish, - to: string, - deadline: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - removeLiquidityETH( - token: string, - liquidity: BigNumberish, - amountTokenMin: BigNumberish, - amountETHMin: BigNumberish, - to: string, - deadline: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - removeLiquidityETHSupportingFeeOnTransferTokens( - token: string, - liquidity: BigNumberish, - amountTokenMin: BigNumberish, - amountETHMin: BigNumberish, - to: string, - deadline: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - removeLiquidityETHWithPermit( - token: string, - liquidity: BigNumberish, - amountTokenMin: BigNumberish, - amountETHMin: BigNumberish, - to: string, - deadline: BigNumberish, - approveMax: boolean, - v: BigNumberish, - r: BytesLike, - s: BytesLike, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - removeLiquidityETHWithPermitSupportingFeeOnTransferTokens( - token: string, - liquidity: BigNumberish, - amountTokenMin: BigNumberish, - amountETHMin: BigNumberish, - to: string, - deadline: BigNumberish, - approveMax: boolean, - v: BigNumberish, - r: BytesLike, - s: BytesLike, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - removeLiquidityWithPermit( - tokenA: string, - tokenB: string, - liquidity: BigNumberish, - amountAMin: BigNumberish, - amountBMin: BigNumberish, - to: string, - deadline: BigNumberish, - approveMax: boolean, - v: BigNumberish, - r: BytesLike, - s: BytesLike, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - swapETHForExactTokens( - amountOut: BigNumberish, - path: string[], - to: string, - deadline: BigNumberish, - overrides?: PayableOverrides & { from?: string | Promise } - ): Promise; - - swapExactETHForTokens( - amountOutMin: BigNumberish, - path: string[], - to: string, - deadline: BigNumberish, - overrides?: PayableOverrides & { from?: string | Promise } - ): Promise; - - swapExactETHForTokensSupportingFeeOnTransferTokens( - amountOutMin: BigNumberish, - path: string[], - to: string, - deadline: BigNumberish, - overrides?: PayableOverrides & { from?: string | Promise } - ): Promise; - - swapExactTokensForETH( - amountIn: BigNumberish, - amountOutMin: BigNumberish, - path: string[], - to: string, - deadline: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - swapExactTokensForETHSupportingFeeOnTransferTokens( - amountIn: BigNumberish, - amountOutMin: BigNumberish, - path: string[], - to: string, - deadline: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - swapExactTokensForTokens( - amountIn: BigNumberish, - amountOutMin: BigNumberish, - path: string[], - to: string, - deadline: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - swapExactTokensForTokensSupportingFeeOnTransferTokens( - amountIn: BigNumberish, - amountOutMin: BigNumberish, - path: string[], - to: string, - deadline: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - swapTokensForExactETH( - amountOut: BigNumberish, - amountInMax: BigNumberish, - path: string[], - to: string, - deadline: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - swapTokensForExactTokens( - amountOut: BigNumberish, - amountInMax: BigNumberish, - path: string[], - to: string, - deadline: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - }; -} diff --git a/packages/interfaces/typechain-types/@uniswap/v2-periphery/contracts/interfaces/IWETH.ts b/packages/interfaces/typechain-types/@uniswap/v2-periphery/contracts/interfaces/IWETH.ts deleted file mode 100644 index faa73a92..00000000 --- a/packages/interfaces/typechain-types/@uniswap/v2-periphery/contracts/interfaces/IWETH.ts +++ /dev/null @@ -1,159 +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 } from "@ethersproject/abi"; -import type { Listener, Provider } from "@ethersproject/providers"; -import type { - TypedEventFilter, - TypedEvent, - TypedListener, - OnEvent, -} from "../../../../common"; - -export interface IWETHInterface extends utils.Interface { - functions: { - "deposit()": FunctionFragment; - "transfer(address,uint256)": FunctionFragment; - "withdraw(uint256)": FunctionFragment; - }; - - getFunction( - nameOrSignatureOrTopic: "deposit" | "transfer" | "withdraw" - ): FunctionFragment; - - encodeFunctionData(functionFragment: "deposit", values?: undefined): string; - encodeFunctionData( - functionFragment: "transfer", - values: [string, BigNumberish] - ): string; - encodeFunctionData( - functionFragment: "withdraw", - values: [BigNumberish] - ): string; - - decodeFunctionResult(functionFragment: "deposit", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "transfer", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "withdraw", data: BytesLike): Result; - - events: {}; -} - -export interface IWETH extends BaseContract { - connect(signerOrProvider: Signer | Provider | string): this; - attach(addressOrName: string): this; - deployed(): Promise; - - interface: IWETHInterface; - - 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: { - deposit( - overrides?: PayableOverrides & { from?: string | Promise } - ): Promise; - - transfer( - to: string, - value: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - withdraw( - arg0: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - }; - - deposit( - overrides?: PayableOverrides & { from?: string | Promise } - ): Promise; - - transfer( - to: string, - value: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - withdraw( - arg0: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - callStatic: { - deposit(overrides?: CallOverrides): Promise; - - transfer( - to: string, - value: BigNumberish, - overrides?: CallOverrides - ): Promise; - - withdraw(arg0: BigNumberish, overrides?: CallOverrides): Promise; - }; - - filters: {}; - - estimateGas: { - deposit( - overrides?: PayableOverrides & { from?: string | Promise } - ): Promise; - - transfer( - to: string, - value: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - withdraw( - arg0: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - }; - - populateTransaction: { - deposit( - overrides?: PayableOverrides & { from?: string | Promise } - ): Promise; - - transfer( - to: string, - value: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - withdraw( - arg0: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - }; -} diff --git a/packages/interfaces/typechain-types/@uniswap/v2-periphery/contracts/interfaces/index.ts b/packages/interfaces/typechain-types/@uniswap/v2-periphery/contracts/interfaces/index.ts deleted file mode 100644 index d7c00510..00000000 --- a/packages/interfaces/typechain-types/@uniswap/v2-periphery/contracts/interfaces/index.ts +++ /dev/null @@ -1,7 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ -export type { IERC20 } from "./IERC20"; -export type { IUniswapV2Router01 } from "./IUniswapV2Router01"; -export type { IUniswapV2Router02 } from "./IUniswapV2Router02"; -export type { IWETH } from "./IWETH"; diff --git a/packages/interfaces/typechain-types/@uniswap/v2-periphery/index.ts b/packages/interfaces/typechain-types/@uniswap/v2-periphery/index.ts deleted file mode 100644 index a11e4ca2..00000000 --- a/packages/interfaces/typechain-types/@uniswap/v2-periphery/index.ts +++ /dev/null @@ -1,5 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ -import type * as contracts from "./contracts"; -export type { contracts }; diff --git a/packages/interfaces/typechain-types/@uniswap/v3-core/contracts/index.ts b/packages/interfaces/typechain-types/@uniswap/v3-core/contracts/index.ts deleted file mode 100644 index 92159233..00000000 --- a/packages/interfaces/typechain-types/@uniswap/v3-core/contracts/index.ts +++ /dev/null @@ -1,5 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ -import type * as interfaces from "./interfaces"; -export type { interfaces }; diff --git a/packages/interfaces/typechain-types/@uniswap/v3-core/contracts/interfaces/callback/IUniswapV3SwapCallback.ts b/packages/interfaces/typechain-types/@uniswap/v3-core/contracts/interfaces/callback/IUniswapV3SwapCallback.ts deleted file mode 100644 index be70eb94..00000000 --- a/packages/interfaces/typechain-types/@uniswap/v3-core/contracts/interfaces/callback/IUniswapV3SwapCallback.ts +++ /dev/null @@ -1,117 +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, -} from "../../../../../common"; - -export interface IUniswapV3SwapCallbackInterface extends utils.Interface { - functions: { - "uniswapV3SwapCallback(int256,int256,bytes)": FunctionFragment; - }; - - getFunction( - nameOrSignatureOrTopic: "uniswapV3SwapCallback" - ): FunctionFragment; - - encodeFunctionData( - functionFragment: "uniswapV3SwapCallback", - values: [BigNumberish, BigNumberish, BytesLike] - ): string; - - decodeFunctionResult( - functionFragment: "uniswapV3SwapCallback", - data: BytesLike - ): Result; - - events: {}; -} - -export interface IUniswapV3SwapCallback extends BaseContract { - connect(signerOrProvider: Signer | Provider | string): this; - attach(addressOrName: string): this; - deployed(): Promise; - - interface: IUniswapV3SwapCallbackInterface; - - 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: { - uniswapV3SwapCallback( - amount0Delta: BigNumberish, - amount1Delta: BigNumberish, - data: BytesLike, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - }; - - uniswapV3SwapCallback( - amount0Delta: BigNumberish, - amount1Delta: BigNumberish, - data: BytesLike, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - callStatic: { - uniswapV3SwapCallback( - amount0Delta: BigNumberish, - amount1Delta: BigNumberish, - data: BytesLike, - overrides?: CallOverrides - ): Promise; - }; - - filters: {}; - - estimateGas: { - uniswapV3SwapCallback( - amount0Delta: BigNumberish, - amount1Delta: BigNumberish, - data: BytesLike, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - }; - - populateTransaction: { - uniswapV3SwapCallback( - amount0Delta: BigNumberish, - amount1Delta: BigNumberish, - data: BytesLike, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - }; -} diff --git a/packages/interfaces/typechain-types/@uniswap/v3-core/contracts/interfaces/callback/index.ts b/packages/interfaces/typechain-types/@uniswap/v3-core/contracts/interfaces/callback/index.ts deleted file mode 100644 index c552691c..00000000 --- a/packages/interfaces/typechain-types/@uniswap/v3-core/contracts/interfaces/callback/index.ts +++ /dev/null @@ -1,4 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ -export type { IUniswapV3SwapCallback } from "./IUniswapV3SwapCallback"; diff --git a/packages/interfaces/typechain-types/@uniswap/v3-core/contracts/interfaces/index.ts b/packages/interfaces/typechain-types/@uniswap/v3-core/contracts/interfaces/index.ts deleted file mode 100644 index 3b69c538..00000000 --- a/packages/interfaces/typechain-types/@uniswap/v3-core/contracts/interfaces/index.ts +++ /dev/null @@ -1,5 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ -import type * as callback from "./callback"; -export type { callback }; diff --git a/packages/interfaces/typechain-types/@uniswap/v3-core/index.ts b/packages/interfaces/typechain-types/@uniswap/v3-core/index.ts deleted file mode 100644 index a11e4ca2..00000000 --- a/packages/interfaces/typechain-types/@uniswap/v3-core/index.ts +++ /dev/null @@ -1,5 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ -import type * as contracts from "./contracts"; -export type { contracts }; diff --git a/packages/interfaces/typechain-types/@uniswap/v3-periphery/contracts/index.ts b/packages/interfaces/typechain-types/@uniswap/v3-periphery/contracts/index.ts deleted file mode 100644 index 92159233..00000000 --- a/packages/interfaces/typechain-types/@uniswap/v3-periphery/contracts/index.ts +++ /dev/null @@ -1,5 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ -import type * as interfaces from "./interfaces"; -export type { interfaces }; diff --git a/packages/interfaces/typechain-types/@uniswap/v3-periphery/contracts/interfaces/IQuoter.ts b/packages/interfaces/typechain-types/@uniswap/v3-periphery/contracts/interfaces/IQuoter.ts deleted file mode 100644 index 2fc8d32b..00000000 --- a/packages/interfaces/typechain-types/@uniswap/v3-periphery/contracts/interfaces/IQuoter.ts +++ /dev/null @@ -1,263 +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, -} from "../../../../common"; - -export interface IQuoterInterface extends utils.Interface { - functions: { - "quoteExactInput(bytes,uint256)": FunctionFragment; - "quoteExactInputSingle(address,address,uint24,uint256,uint160)": FunctionFragment; - "quoteExactOutput(bytes,uint256)": FunctionFragment; - "quoteExactOutputSingle(address,address,uint24,uint256,uint160)": FunctionFragment; - }; - - getFunction( - nameOrSignatureOrTopic: - | "quoteExactInput" - | "quoteExactInputSingle" - | "quoteExactOutput" - | "quoteExactOutputSingle" - ): FunctionFragment; - - encodeFunctionData( - functionFragment: "quoteExactInput", - values: [BytesLike, BigNumberish] - ): string; - encodeFunctionData( - functionFragment: "quoteExactInputSingle", - values: [string, string, BigNumberish, BigNumberish, BigNumberish] - ): string; - encodeFunctionData( - functionFragment: "quoteExactOutput", - values: [BytesLike, BigNumberish] - ): string; - encodeFunctionData( - functionFragment: "quoteExactOutputSingle", - values: [string, string, BigNumberish, BigNumberish, BigNumberish] - ): string; - - decodeFunctionResult( - functionFragment: "quoteExactInput", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "quoteExactInputSingle", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "quoteExactOutput", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "quoteExactOutputSingle", - data: BytesLike - ): Result; - - events: {}; -} - -export interface IQuoter extends BaseContract { - connect(signerOrProvider: Signer | Provider | string): this; - attach(addressOrName: string): this; - deployed(): Promise; - - interface: IQuoterInterface; - - 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: { - quoteExactInput( - path: BytesLike, - amountIn: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - quoteExactInputSingle( - tokenIn: string, - tokenOut: string, - fee: BigNumberish, - amountIn: BigNumberish, - sqrtPriceLimitX96: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - quoteExactOutput( - path: BytesLike, - amountOut: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - quoteExactOutputSingle( - tokenIn: string, - tokenOut: string, - fee: BigNumberish, - amountOut: BigNumberish, - sqrtPriceLimitX96: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - }; - - quoteExactInput( - path: BytesLike, - amountIn: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - quoteExactInputSingle( - tokenIn: string, - tokenOut: string, - fee: BigNumberish, - amountIn: BigNumberish, - sqrtPriceLimitX96: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - quoteExactOutput( - path: BytesLike, - amountOut: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - quoteExactOutputSingle( - tokenIn: string, - tokenOut: string, - fee: BigNumberish, - amountOut: BigNumberish, - sqrtPriceLimitX96: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - callStatic: { - quoteExactInput( - path: BytesLike, - amountIn: BigNumberish, - overrides?: CallOverrides - ): Promise; - - quoteExactInputSingle( - tokenIn: string, - tokenOut: string, - fee: BigNumberish, - amountIn: BigNumberish, - sqrtPriceLimitX96: BigNumberish, - overrides?: CallOverrides - ): Promise; - - quoteExactOutput( - path: BytesLike, - amountOut: BigNumberish, - overrides?: CallOverrides - ): Promise; - - quoteExactOutputSingle( - tokenIn: string, - tokenOut: string, - fee: BigNumberish, - amountOut: BigNumberish, - sqrtPriceLimitX96: BigNumberish, - overrides?: CallOverrides - ): Promise; - }; - - filters: {}; - - estimateGas: { - quoteExactInput( - path: BytesLike, - amountIn: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - quoteExactInputSingle( - tokenIn: string, - tokenOut: string, - fee: BigNumberish, - amountIn: BigNumberish, - sqrtPriceLimitX96: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - quoteExactOutput( - path: BytesLike, - amountOut: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - quoteExactOutputSingle( - tokenIn: string, - tokenOut: string, - fee: BigNumberish, - amountOut: BigNumberish, - sqrtPriceLimitX96: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - }; - - populateTransaction: { - quoteExactInput( - path: BytesLike, - amountIn: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - quoteExactInputSingle( - tokenIn: string, - tokenOut: string, - fee: BigNumberish, - amountIn: BigNumberish, - sqrtPriceLimitX96: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - quoteExactOutput( - path: BytesLike, - amountOut: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - quoteExactOutputSingle( - tokenIn: string, - tokenOut: string, - fee: BigNumberish, - amountOut: BigNumberish, - sqrtPriceLimitX96: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - }; -} diff --git a/packages/interfaces/typechain-types/@uniswap/v3-periphery/contracts/interfaces/ISwapRouter.ts b/packages/interfaces/typechain-types/@uniswap/v3-periphery/contracts/interfaces/ISwapRouter.ts deleted file mode 100644 index 87c276dc..00000000 --- a/packages/interfaces/typechain-types/@uniswap/v3-periphery/contracts/interfaces/ISwapRouter.ts +++ /dev/null @@ -1,364 +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 } from "@ethersproject/abi"; -import type { Listener, Provider } from "@ethersproject/providers"; -import type { - TypedEventFilter, - TypedEvent, - TypedListener, - OnEvent, -} from "../../../../common"; - -export declare namespace ISwapRouter { - export type ExactInputParamsStruct = { - path: BytesLike; - recipient: string; - deadline: BigNumberish; - amountIn: BigNumberish; - amountOutMinimum: BigNumberish; - }; - - export type ExactInputParamsStructOutput = [ - string, - string, - BigNumber, - BigNumber, - BigNumber - ] & { - path: string; - recipient: string; - deadline: BigNumber; - amountIn: BigNumber; - amountOutMinimum: BigNumber; - }; - - export type ExactInputSingleParamsStruct = { - tokenIn: string; - tokenOut: string; - fee: BigNumberish; - recipient: string; - deadline: BigNumberish; - amountIn: BigNumberish; - amountOutMinimum: BigNumberish; - sqrtPriceLimitX96: BigNumberish; - }; - - export type ExactInputSingleParamsStructOutput = [ - string, - string, - number, - string, - BigNumber, - BigNumber, - BigNumber, - BigNumber - ] & { - tokenIn: string; - tokenOut: string; - fee: number; - recipient: string; - deadline: BigNumber; - amountIn: BigNumber; - amountOutMinimum: BigNumber; - sqrtPriceLimitX96: BigNumber; - }; - - export type ExactOutputParamsStruct = { - path: BytesLike; - recipient: string; - deadline: BigNumberish; - amountOut: BigNumberish; - amountInMaximum: BigNumberish; - }; - - export type ExactOutputParamsStructOutput = [ - string, - string, - BigNumber, - BigNumber, - BigNumber - ] & { - path: string; - recipient: string; - deadline: BigNumber; - amountOut: BigNumber; - amountInMaximum: BigNumber; - }; - - export type ExactOutputSingleParamsStruct = { - tokenIn: string; - tokenOut: string; - fee: BigNumberish; - recipient: string; - deadline: BigNumberish; - amountOut: BigNumberish; - amountInMaximum: BigNumberish; - sqrtPriceLimitX96: BigNumberish; - }; - - export type ExactOutputSingleParamsStructOutput = [ - string, - string, - number, - string, - BigNumber, - BigNumber, - BigNumber, - BigNumber - ] & { - tokenIn: string; - tokenOut: string; - fee: number; - recipient: string; - deadline: BigNumber; - amountOut: BigNumber; - amountInMaximum: BigNumber; - sqrtPriceLimitX96: BigNumber; - }; -} - -export interface ISwapRouterInterface extends utils.Interface { - functions: { - "exactInput((bytes,address,uint256,uint256,uint256))": FunctionFragment; - "exactInputSingle((address,address,uint24,address,uint256,uint256,uint256,uint160))": FunctionFragment; - "exactOutput((bytes,address,uint256,uint256,uint256))": FunctionFragment; - "exactOutputSingle((address,address,uint24,address,uint256,uint256,uint256,uint160))": FunctionFragment; - "uniswapV3SwapCallback(int256,int256,bytes)": FunctionFragment; - }; - - getFunction( - nameOrSignatureOrTopic: - | "exactInput" - | "exactInputSingle" - | "exactOutput" - | "exactOutputSingle" - | "uniswapV3SwapCallback" - ): FunctionFragment; - - encodeFunctionData( - functionFragment: "exactInput", - values: [ISwapRouter.ExactInputParamsStruct] - ): string; - encodeFunctionData( - functionFragment: "exactInputSingle", - values: [ISwapRouter.ExactInputSingleParamsStruct] - ): string; - encodeFunctionData( - functionFragment: "exactOutput", - values: [ISwapRouter.ExactOutputParamsStruct] - ): string; - encodeFunctionData( - functionFragment: "exactOutputSingle", - values: [ISwapRouter.ExactOutputSingleParamsStruct] - ): string; - encodeFunctionData( - functionFragment: "uniswapV3SwapCallback", - values: [BigNumberish, BigNumberish, BytesLike] - ): string; - - decodeFunctionResult(functionFragment: "exactInput", data: BytesLike): Result; - decodeFunctionResult( - functionFragment: "exactInputSingle", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "exactOutput", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "exactOutputSingle", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "uniswapV3SwapCallback", - data: BytesLike - ): Result; - - events: {}; -} - -export interface ISwapRouter extends BaseContract { - connect(signerOrProvider: Signer | Provider | string): this; - attach(addressOrName: string): this; - deployed(): Promise; - - interface: ISwapRouterInterface; - - 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: { - exactInput( - params: ISwapRouter.ExactInputParamsStruct, - overrides?: PayableOverrides & { from?: string | Promise } - ): Promise; - - exactInputSingle( - params: ISwapRouter.ExactInputSingleParamsStruct, - overrides?: PayableOverrides & { from?: string | Promise } - ): Promise; - - exactOutput( - params: ISwapRouter.ExactOutputParamsStruct, - overrides?: PayableOverrides & { from?: string | Promise } - ): Promise; - - exactOutputSingle( - params: ISwapRouter.ExactOutputSingleParamsStruct, - overrides?: PayableOverrides & { from?: string | Promise } - ): Promise; - - uniswapV3SwapCallback( - amount0Delta: BigNumberish, - amount1Delta: BigNumberish, - data: BytesLike, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - }; - - exactInput( - params: ISwapRouter.ExactInputParamsStruct, - overrides?: PayableOverrides & { from?: string | Promise } - ): Promise; - - exactInputSingle( - params: ISwapRouter.ExactInputSingleParamsStruct, - overrides?: PayableOverrides & { from?: string | Promise } - ): Promise; - - exactOutput( - params: ISwapRouter.ExactOutputParamsStruct, - overrides?: PayableOverrides & { from?: string | Promise } - ): Promise; - - exactOutputSingle( - params: ISwapRouter.ExactOutputSingleParamsStruct, - overrides?: PayableOverrides & { from?: string | Promise } - ): Promise; - - uniswapV3SwapCallback( - amount0Delta: BigNumberish, - amount1Delta: BigNumberish, - data: BytesLike, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - callStatic: { - exactInput( - params: ISwapRouter.ExactInputParamsStruct, - overrides?: CallOverrides - ): Promise; - - exactInputSingle( - params: ISwapRouter.ExactInputSingleParamsStruct, - overrides?: CallOverrides - ): Promise; - - exactOutput( - params: ISwapRouter.ExactOutputParamsStruct, - overrides?: CallOverrides - ): Promise; - - exactOutputSingle( - params: ISwapRouter.ExactOutputSingleParamsStruct, - overrides?: CallOverrides - ): Promise; - - uniswapV3SwapCallback( - amount0Delta: BigNumberish, - amount1Delta: BigNumberish, - data: BytesLike, - overrides?: CallOverrides - ): Promise; - }; - - filters: {}; - - estimateGas: { - exactInput( - params: ISwapRouter.ExactInputParamsStruct, - overrides?: PayableOverrides & { from?: string | Promise } - ): Promise; - - exactInputSingle( - params: ISwapRouter.ExactInputSingleParamsStruct, - overrides?: PayableOverrides & { from?: string | Promise } - ): Promise; - - exactOutput( - params: ISwapRouter.ExactOutputParamsStruct, - overrides?: PayableOverrides & { from?: string | Promise } - ): Promise; - - exactOutputSingle( - params: ISwapRouter.ExactOutputSingleParamsStruct, - overrides?: PayableOverrides & { from?: string | Promise } - ): Promise; - - uniswapV3SwapCallback( - amount0Delta: BigNumberish, - amount1Delta: BigNumberish, - data: BytesLike, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - }; - - populateTransaction: { - exactInput( - params: ISwapRouter.ExactInputParamsStruct, - overrides?: PayableOverrides & { from?: string | Promise } - ): Promise; - - exactInputSingle( - params: ISwapRouter.ExactInputSingleParamsStruct, - overrides?: PayableOverrides & { from?: string | Promise } - ): Promise; - - exactOutput( - params: ISwapRouter.ExactOutputParamsStruct, - overrides?: PayableOverrides & { from?: string | Promise } - ): Promise; - - exactOutputSingle( - params: ISwapRouter.ExactOutputSingleParamsStruct, - overrides?: PayableOverrides & { from?: string | Promise } - ): Promise; - - uniswapV3SwapCallback( - amount0Delta: BigNumberish, - amount1Delta: BigNumberish, - data: BytesLike, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - }; -} diff --git a/packages/interfaces/typechain-types/@uniswap/v3-periphery/contracts/interfaces/index.ts b/packages/interfaces/typechain-types/@uniswap/v3-periphery/contracts/interfaces/index.ts deleted file mode 100644 index 0490b486..00000000 --- a/packages/interfaces/typechain-types/@uniswap/v3-periphery/contracts/interfaces/index.ts +++ /dev/null @@ -1,5 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ -export type { IQuoter } from "./IQuoter"; -export type { ISwapRouter } from "./ISwapRouter"; diff --git a/packages/interfaces/typechain-types/@uniswap/v3-periphery/index.ts b/packages/interfaces/typechain-types/@uniswap/v3-periphery/index.ts deleted file mode 100644 index a11e4ca2..00000000 --- a/packages/interfaces/typechain-types/@uniswap/v3-periphery/index.ts +++ /dev/null @@ -1,5 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ -import type * as contracts from "./contracts"; -export type { contracts }; diff --git a/packages/interfaces/typechain-types/common.ts b/packages/interfaces/typechain-types/common.ts deleted file mode 100644 index 2fc40c7f..00000000 --- a/packages/interfaces/typechain-types/common.ts +++ /dev/null @@ -1,44 +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; diff --git a/packages/interfaces/typechain-types/contracts/ImmutableCreate2Factory.sol/ImmutableCreate2Factory.ts b/packages/interfaces/typechain-types/contracts/ImmutableCreate2Factory.sol/ImmutableCreate2Factory.ts deleted file mode 100644 index 237cfc55..00000000 --- a/packages/interfaces/typechain-types/contracts/ImmutableCreate2Factory.sol/ImmutableCreate2Factory.ts +++ /dev/null @@ -1,267 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ -import type { - BaseContract, - BigNumber, - BytesLike, - CallOverrides, - ContractTransaction, - PayableOverrides, - 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, -} from "../../common"; - -export interface ImmutableCreate2FactoryInterface extends utils.Interface { - functions: { - "hasBeenDeployed(address)": FunctionFragment; - "safeCreate2AndTransfer(bytes32,bytes)": FunctionFragment; - "safeCreate2(bytes32,bytes)": FunctionFragment; - "findCreate2Address(bytes32,bytes)": FunctionFragment; - "findCreate2AddressViaHash(bytes32,bytes32)": FunctionFragment; - }; - - getFunction( - nameOrSignatureOrTopic: - | "hasBeenDeployed" - | "safeCreate2AndTransfer" - | "safeCreate2" - | "findCreate2Address" - | "findCreate2AddressViaHash" - ): FunctionFragment; - - encodeFunctionData( - functionFragment: "hasBeenDeployed", - values: [string] - ): string; - encodeFunctionData( - functionFragment: "safeCreate2AndTransfer", - values: [BytesLike, BytesLike] - ): string; - encodeFunctionData( - functionFragment: "safeCreate2", - values: [BytesLike, BytesLike] - ): string; - encodeFunctionData( - functionFragment: "findCreate2Address", - values: [BytesLike, BytesLike] - ): string; - encodeFunctionData( - functionFragment: "findCreate2AddressViaHash", - values: [BytesLike, BytesLike] - ): string; - - decodeFunctionResult( - functionFragment: "hasBeenDeployed", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "safeCreate2AndTransfer", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "safeCreate2", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "findCreate2Address", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "findCreate2AddressViaHash", - data: BytesLike - ): Result; - - events: {}; -} - -export interface ImmutableCreate2Factory extends BaseContract { - connect(signerOrProvider: Signer | Provider | string): this; - attach(addressOrName: string): this; - deployed(): Promise; - - interface: ImmutableCreate2FactoryInterface; - - 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: { - hasBeenDeployed( - deploymentAddress: string, - overrides?: CallOverrides - ): Promise<[boolean]>; - - safeCreate2AndTransfer( - salt: BytesLike, - initializationCode: BytesLike, - overrides?: PayableOverrides & { from?: string | Promise } - ): Promise; - - safeCreate2( - salt: BytesLike, - initializationCode: BytesLike, - overrides?: PayableOverrides & { from?: string | Promise } - ): Promise; - - findCreate2Address( - salt: BytesLike, - initCode: BytesLike, - overrides?: CallOverrides - ): Promise<[string] & { deploymentAddress: string }>; - - findCreate2AddressViaHash( - salt: BytesLike, - initCodeHash: BytesLike, - overrides?: CallOverrides - ): Promise<[string] & { deploymentAddress: string }>; - }; - - hasBeenDeployed( - deploymentAddress: string, - overrides?: CallOverrides - ): Promise; - - safeCreate2AndTransfer( - salt: BytesLike, - initializationCode: BytesLike, - overrides?: PayableOverrides & { from?: string | Promise } - ): Promise; - - safeCreate2( - salt: BytesLike, - initializationCode: BytesLike, - overrides?: PayableOverrides & { from?: string | Promise } - ): Promise; - - findCreate2Address( - salt: BytesLike, - initCode: BytesLike, - overrides?: CallOverrides - ): Promise; - - findCreate2AddressViaHash( - salt: BytesLike, - initCodeHash: BytesLike, - overrides?: CallOverrides - ): Promise; - - callStatic: { - hasBeenDeployed( - deploymentAddress: string, - overrides?: CallOverrides - ): Promise; - - safeCreate2AndTransfer( - salt: BytesLike, - initializationCode: BytesLike, - overrides?: CallOverrides - ): Promise; - - safeCreate2( - salt: BytesLike, - initializationCode: BytesLike, - overrides?: CallOverrides - ): Promise; - - findCreate2Address( - salt: BytesLike, - initCode: BytesLike, - overrides?: CallOverrides - ): Promise; - - findCreate2AddressViaHash( - salt: BytesLike, - initCodeHash: BytesLike, - overrides?: CallOverrides - ): Promise; - }; - - filters: {}; - - estimateGas: { - hasBeenDeployed( - deploymentAddress: string, - overrides?: CallOverrides - ): Promise; - - safeCreate2AndTransfer( - salt: BytesLike, - initializationCode: BytesLike, - overrides?: PayableOverrides & { from?: string | Promise } - ): Promise; - - safeCreate2( - salt: BytesLike, - initializationCode: BytesLike, - overrides?: PayableOverrides & { from?: string | Promise } - ): Promise; - - findCreate2Address( - salt: BytesLike, - initCode: BytesLike, - overrides?: CallOverrides - ): Promise; - - findCreate2AddressViaHash( - salt: BytesLike, - initCodeHash: BytesLike, - overrides?: CallOverrides - ): Promise; - }; - - populateTransaction: { - hasBeenDeployed( - deploymentAddress: string, - overrides?: CallOverrides - ): Promise; - - safeCreate2AndTransfer( - salt: BytesLike, - initializationCode: BytesLike, - overrides?: PayableOverrides & { from?: string | Promise } - ): Promise; - - safeCreate2( - salt: BytesLike, - initializationCode: BytesLike, - overrides?: PayableOverrides & { from?: string | Promise } - ): Promise; - - findCreate2Address( - salt: BytesLike, - initCode: BytesLike, - overrides?: CallOverrides - ): Promise; - - findCreate2AddressViaHash( - salt: BytesLike, - initCodeHash: BytesLike, - overrides?: CallOverrides - ): Promise; - }; -} diff --git a/packages/interfaces/typechain-types/contracts/ImmutableCreate2Factory.sol/Ownable.ts b/packages/interfaces/typechain-types/contracts/ImmutableCreate2Factory.sol/Ownable.ts deleted file mode 100644 index 713d9e3a..00000000 --- a/packages/interfaces/typechain-types/contracts/ImmutableCreate2Factory.sol/Ownable.ts +++ /dev/null @@ -1,104 +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, -} from "../../common"; - -export interface OwnableInterface extends utils.Interface { - functions: { - "transferOwnership(address)": FunctionFragment; - }; - - getFunction(nameOrSignatureOrTopic: "transferOwnership"): FunctionFragment; - - encodeFunctionData( - functionFragment: "transferOwnership", - values: [string] - ): string; - - decodeFunctionResult( - functionFragment: "transferOwnership", - data: BytesLike - ): Result; - - events: {}; -} - -export interface Ownable extends BaseContract { - connect(signerOrProvider: Signer | Provider | string): this; - attach(addressOrName: string): this; - deployed(): Promise; - - interface: OwnableInterface; - - 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: { - transferOwnership( - newOwner: string, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - }; - - transferOwnership( - newOwner: string, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - callStatic: { - transferOwnership( - newOwner: string, - overrides?: CallOverrides - ): Promise; - }; - - filters: {}; - - estimateGas: { - transferOwnership( - newOwner: string, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - }; - - populateTransaction: { - transferOwnership( - newOwner: string, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - }; -} diff --git a/packages/interfaces/typechain-types/contracts/ImmutableCreate2Factory.sol/index.ts b/packages/interfaces/typechain-types/contracts/ImmutableCreate2Factory.sol/index.ts deleted file mode 100644 index 1af43d91..00000000 --- a/packages/interfaces/typechain-types/contracts/ImmutableCreate2Factory.sol/index.ts +++ /dev/null @@ -1,5 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ -export type { ImmutableCreate2Factory } from "./ImmutableCreate2Factory"; -export type { Ownable } from "./Ownable"; diff --git a/packages/interfaces/typechain-types/contracts/Zeta.eth.sol/ZetaEth.ts b/packages/interfaces/typechain-types/contracts/Zeta.eth.sol/ZetaEth.ts deleted file mode 100644 index 3be201be..00000000 --- a/packages/interfaces/typechain-types/contracts/Zeta.eth.sol/ZetaEth.ts +++ /dev/null @@ -1,444 +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, -} from "../../common"; - -export interface ZetaEthInterface extends utils.Interface { - functions: { - "allowance(address,address)": FunctionFragment; - "approve(address,uint256)": FunctionFragment; - "balanceOf(address)": FunctionFragment; - "decimals()": FunctionFragment; - "decreaseAllowance(address,uint256)": FunctionFragment; - "increaseAllowance(address,uint256)": FunctionFragment; - "name()": FunctionFragment; - "symbol()": FunctionFragment; - "totalSupply()": FunctionFragment; - "transfer(address,uint256)": FunctionFragment; - "transferFrom(address,address,uint256)": FunctionFragment; - }; - - getFunction( - nameOrSignatureOrTopic: - | "allowance" - | "approve" - | "balanceOf" - | "decimals" - | "decreaseAllowance" - | "increaseAllowance" - | "name" - | "symbol" - | "totalSupply" - | "transfer" - | "transferFrom" - ): FunctionFragment; - - encodeFunctionData( - functionFragment: "allowance", - values: [string, string] - ): string; - encodeFunctionData( - functionFragment: "approve", - values: [string, BigNumberish] - ): string; - encodeFunctionData(functionFragment: "balanceOf", values: [string]): string; - encodeFunctionData(functionFragment: "decimals", values?: undefined): string; - encodeFunctionData( - functionFragment: "decreaseAllowance", - values: [string, BigNumberish] - ): string; - encodeFunctionData( - functionFragment: "increaseAllowance", - values: [string, BigNumberish] - ): string; - encodeFunctionData(functionFragment: "name", values?: undefined): string; - encodeFunctionData(functionFragment: "symbol", values?: undefined): string; - encodeFunctionData( - functionFragment: "totalSupply", - values?: undefined - ): string; - encodeFunctionData( - functionFragment: "transfer", - values: [string, BigNumberish] - ): string; - encodeFunctionData( - functionFragment: "transferFrom", - values: [string, string, BigNumberish] - ): string; - - decodeFunctionResult(functionFragment: "allowance", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "approve", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "balanceOf", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "decimals", data: BytesLike): Result; - decodeFunctionResult( - functionFragment: "decreaseAllowance", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "increaseAllowance", - data: BytesLike - ): Result; - decodeFunctionResult(functionFragment: "name", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "symbol", data: BytesLike): Result; - decodeFunctionResult( - functionFragment: "totalSupply", - data: BytesLike - ): Result; - decodeFunctionResult(functionFragment: "transfer", data: BytesLike): Result; - decodeFunctionResult( - functionFragment: "transferFrom", - data: BytesLike - ): Result; - - events: { - "Approval(address,address,uint256)": EventFragment; - "Transfer(address,address,uint256)": EventFragment; - }; - - getEvent(nameOrSignatureOrTopic: "Approval"): EventFragment; - getEvent(nameOrSignatureOrTopic: "Transfer"): EventFragment; -} - -export interface ApprovalEventObject { - owner: string; - spender: string; - value: BigNumber; -} -export type ApprovalEvent = TypedEvent< - [string, string, BigNumber], - ApprovalEventObject ->; - -export type ApprovalEventFilter = TypedEventFilter; - -export interface TransferEventObject { - from: string; - to: string; - value: BigNumber; -} -export type TransferEvent = TypedEvent< - [string, string, BigNumber], - TransferEventObject ->; - -export type TransferEventFilter = TypedEventFilter; - -export interface ZetaEth extends BaseContract { - connect(signerOrProvider: Signer | Provider | string): this; - attach(addressOrName: string): this; - deployed(): Promise; - - interface: ZetaEthInterface; - - 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: { - allowance( - owner: string, - spender: string, - overrides?: CallOverrides - ): Promise<[BigNumber]>; - - approve( - spender: string, - amount: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - balanceOf(account: string, overrides?: CallOverrides): Promise<[BigNumber]>; - - decimals(overrides?: CallOverrides): Promise<[number]>; - - decreaseAllowance( - spender: string, - subtractedValue: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - increaseAllowance( - spender: string, - addedValue: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - name(overrides?: CallOverrides): Promise<[string]>; - - symbol(overrides?: CallOverrides): Promise<[string]>; - - totalSupply(overrides?: CallOverrides): Promise<[BigNumber]>; - - transfer( - to: string, - amount: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - transferFrom( - from: string, - to: string, - amount: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - }; - - allowance( - owner: string, - spender: string, - overrides?: CallOverrides - ): Promise; - - approve( - spender: string, - amount: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - balanceOf(account: string, overrides?: CallOverrides): Promise; - - decimals(overrides?: CallOverrides): Promise; - - decreaseAllowance( - spender: string, - subtractedValue: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - increaseAllowance( - spender: string, - addedValue: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - name(overrides?: CallOverrides): Promise; - - symbol(overrides?: CallOverrides): Promise; - - totalSupply(overrides?: CallOverrides): Promise; - - transfer( - to: string, - amount: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - transferFrom( - from: string, - to: string, - amount: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - callStatic: { - allowance( - owner: string, - spender: string, - overrides?: CallOverrides - ): Promise; - - approve( - spender: string, - amount: BigNumberish, - overrides?: CallOverrides - ): Promise; - - balanceOf(account: string, overrides?: CallOverrides): Promise; - - decimals(overrides?: CallOverrides): Promise; - - decreaseAllowance( - spender: string, - subtractedValue: BigNumberish, - overrides?: CallOverrides - ): Promise; - - increaseAllowance( - spender: string, - addedValue: BigNumberish, - overrides?: CallOverrides - ): Promise; - - name(overrides?: CallOverrides): Promise; - - symbol(overrides?: CallOverrides): Promise; - - totalSupply(overrides?: CallOverrides): Promise; - - transfer( - to: string, - amount: BigNumberish, - overrides?: CallOverrides - ): Promise; - - transferFrom( - from: string, - to: string, - amount: BigNumberish, - overrides?: CallOverrides - ): Promise; - }; - - filters: { - "Approval(address,address,uint256)"( - owner?: string | null, - spender?: string | null, - value?: null - ): ApprovalEventFilter; - Approval( - owner?: string | null, - spender?: string | null, - value?: null - ): ApprovalEventFilter; - - "Transfer(address,address,uint256)"( - from?: string | null, - to?: string | null, - value?: null - ): TransferEventFilter; - Transfer( - from?: string | null, - to?: string | null, - value?: null - ): TransferEventFilter; - }; - - estimateGas: { - allowance( - owner: string, - spender: string, - overrides?: CallOverrides - ): Promise; - - approve( - spender: string, - amount: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - balanceOf(account: string, overrides?: CallOverrides): Promise; - - decimals(overrides?: CallOverrides): Promise; - - decreaseAllowance( - spender: string, - subtractedValue: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - increaseAllowance( - spender: string, - addedValue: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - name(overrides?: CallOverrides): Promise; - - symbol(overrides?: CallOverrides): Promise; - - totalSupply(overrides?: CallOverrides): Promise; - - transfer( - to: string, - amount: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - transferFrom( - from: string, - to: string, - amount: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - }; - - populateTransaction: { - allowance( - owner: string, - spender: string, - overrides?: CallOverrides - ): Promise; - - approve( - spender: string, - amount: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - balanceOf( - account: string, - overrides?: CallOverrides - ): Promise; - - decimals(overrides?: CallOverrides): Promise; - - decreaseAllowance( - spender: string, - subtractedValue: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - increaseAllowance( - spender: string, - addedValue: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - name(overrides?: CallOverrides): Promise; - - symbol(overrides?: CallOverrides): Promise; - - totalSupply(overrides?: CallOverrides): Promise; - - transfer( - to: string, - amount: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - transferFrom( - from: string, - to: string, - amount: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - }; -} diff --git a/packages/interfaces/typechain-types/contracts/Zeta.eth.sol/index.ts b/packages/interfaces/typechain-types/contracts/Zeta.eth.sol/index.ts deleted file mode 100644 index 1b92bdea..00000000 --- a/packages/interfaces/typechain-types/contracts/Zeta.eth.sol/index.ts +++ /dev/null @@ -1,4 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ -export type { ZetaEth } from "./ZetaEth"; diff --git a/packages/interfaces/typechain-types/contracts/Zeta.non-eth.sol/ZetaNonEth.ts b/packages/interfaces/typechain-types/contracts/Zeta.non-eth.sol/ZetaNonEth.ts deleted file mode 100644 index 7f502ecd..00000000 --- a/packages/interfaces/typechain-types/contracts/Zeta.non-eth.sol/ZetaNonEth.ts +++ /dev/null @@ -1,715 +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, -} from "../../common"; - -export interface ZetaNonEthInterface extends utils.Interface { - functions: { - "allowance(address,address)": FunctionFragment; - "approve(address,uint256)": FunctionFragment; - "balanceOf(address)": FunctionFragment; - "burn(uint256)": FunctionFragment; - "burnFrom(address,uint256)": FunctionFragment; - "connectorAddress()": FunctionFragment; - "decimals()": FunctionFragment; - "decreaseAllowance(address,uint256)": FunctionFragment; - "increaseAllowance(address,uint256)": FunctionFragment; - "mint(address,uint256,bytes32)": FunctionFragment; - "name()": FunctionFragment; - "renounceTssAddressUpdater()": FunctionFragment; - "symbol()": FunctionFragment; - "totalSupply()": FunctionFragment; - "transfer(address,uint256)": FunctionFragment; - "transferFrom(address,address,uint256)": FunctionFragment; - "tssAddress()": FunctionFragment; - "tssAddressUpdater()": FunctionFragment; - "updateTssAndConnectorAddresses(address,address)": FunctionFragment; - }; - - getFunction( - nameOrSignatureOrTopic: - | "allowance" - | "approve" - | "balanceOf" - | "burn" - | "burnFrom" - | "connectorAddress" - | "decimals" - | "decreaseAllowance" - | "increaseAllowance" - | "mint" - | "name" - | "renounceTssAddressUpdater" - | "symbol" - | "totalSupply" - | "transfer" - | "transferFrom" - | "tssAddress" - | "tssAddressUpdater" - | "updateTssAndConnectorAddresses" - ): FunctionFragment; - - encodeFunctionData( - functionFragment: "allowance", - values: [string, string] - ): string; - encodeFunctionData( - functionFragment: "approve", - values: [string, BigNumberish] - ): string; - encodeFunctionData(functionFragment: "balanceOf", values: [string]): string; - encodeFunctionData(functionFragment: "burn", values: [BigNumberish]): string; - encodeFunctionData( - functionFragment: "burnFrom", - values: [string, BigNumberish] - ): string; - encodeFunctionData( - functionFragment: "connectorAddress", - values?: undefined - ): string; - encodeFunctionData(functionFragment: "decimals", values?: undefined): string; - encodeFunctionData( - functionFragment: "decreaseAllowance", - values: [string, BigNumberish] - ): string; - encodeFunctionData( - functionFragment: "increaseAllowance", - values: [string, BigNumberish] - ): string; - encodeFunctionData( - functionFragment: "mint", - values: [string, BigNumberish, BytesLike] - ): string; - encodeFunctionData(functionFragment: "name", values?: undefined): string; - encodeFunctionData( - functionFragment: "renounceTssAddressUpdater", - values?: undefined - ): string; - encodeFunctionData(functionFragment: "symbol", values?: undefined): string; - encodeFunctionData( - functionFragment: "totalSupply", - values?: undefined - ): string; - encodeFunctionData( - functionFragment: "transfer", - values: [string, BigNumberish] - ): string; - encodeFunctionData( - functionFragment: "transferFrom", - values: [string, string, BigNumberish] - ): string; - encodeFunctionData( - functionFragment: "tssAddress", - values?: undefined - ): string; - encodeFunctionData( - functionFragment: "tssAddressUpdater", - values?: undefined - ): string; - encodeFunctionData( - functionFragment: "updateTssAndConnectorAddresses", - values: [string, string] - ): string; - - decodeFunctionResult(functionFragment: "allowance", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "approve", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "balanceOf", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "burn", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "burnFrom", data: BytesLike): Result; - decodeFunctionResult( - functionFragment: "connectorAddress", - data: BytesLike - ): Result; - decodeFunctionResult(functionFragment: "decimals", data: BytesLike): Result; - decodeFunctionResult( - functionFragment: "decreaseAllowance", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "increaseAllowance", - data: BytesLike - ): Result; - decodeFunctionResult(functionFragment: "mint", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "name", data: BytesLike): Result; - decodeFunctionResult( - functionFragment: "renounceTssAddressUpdater", - data: BytesLike - ): Result; - decodeFunctionResult(functionFragment: "symbol", data: BytesLike): Result; - decodeFunctionResult( - functionFragment: "totalSupply", - data: BytesLike - ): Result; - decodeFunctionResult(functionFragment: "transfer", data: BytesLike): Result; - decodeFunctionResult( - functionFragment: "transferFrom", - data: BytesLike - ): Result; - decodeFunctionResult(functionFragment: "tssAddress", data: BytesLike): Result; - decodeFunctionResult( - functionFragment: "tssAddressUpdater", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "updateTssAndConnectorAddresses", - data: BytesLike - ): Result; - - events: { - "Approval(address,address,uint256)": EventFragment; - "Burnt(address,uint256)": EventFragment; - "Minted(address,uint256,bytes32)": EventFragment; - "Transfer(address,address,uint256)": EventFragment; - }; - - getEvent(nameOrSignatureOrTopic: "Approval"): EventFragment; - getEvent(nameOrSignatureOrTopic: "Burnt"): EventFragment; - getEvent(nameOrSignatureOrTopic: "Minted"): EventFragment; - getEvent(nameOrSignatureOrTopic: "Transfer"): EventFragment; -} - -export interface ApprovalEventObject { - owner: string; - spender: string; - value: BigNumber; -} -export type ApprovalEvent = TypedEvent< - [string, string, BigNumber], - ApprovalEventObject ->; - -export type ApprovalEventFilter = TypedEventFilter; - -export interface BurntEventObject { - burnee: string; - amount: BigNumber; -} -export type BurntEvent = TypedEvent<[string, BigNumber], BurntEventObject>; - -export type BurntEventFilter = TypedEventFilter; - -export interface MintedEventObject { - mintee: string; - amount: BigNumber; - internalSendHash: string; -} -export type MintedEvent = TypedEvent< - [string, BigNumber, string], - MintedEventObject ->; - -export type MintedEventFilter = TypedEventFilter; - -export interface TransferEventObject { - from: string; - to: string; - value: BigNumber; -} -export type TransferEvent = TypedEvent< - [string, string, BigNumber], - TransferEventObject ->; - -export type TransferEventFilter = TypedEventFilter; - -export interface ZetaNonEth extends BaseContract { - connect(signerOrProvider: Signer | Provider | string): this; - attach(addressOrName: string): this; - deployed(): Promise; - - interface: ZetaNonEthInterface; - - 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: { - allowance( - owner: string, - spender: string, - overrides?: CallOverrides - ): Promise<[BigNumber]>; - - approve( - spender: string, - amount: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - balanceOf(account: string, overrides?: CallOverrides): Promise<[BigNumber]>; - - burn( - amount: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - burnFrom( - account: string, - amount: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - connectorAddress(overrides?: CallOverrides): Promise<[string]>; - - decimals(overrides?: CallOverrides): Promise<[number]>; - - decreaseAllowance( - spender: string, - subtractedValue: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - increaseAllowance( - spender: string, - addedValue: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - mint( - mintee: string, - value: BigNumberish, - internalSendHash: BytesLike, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - name(overrides?: CallOverrides): Promise<[string]>; - - renounceTssAddressUpdater( - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - symbol(overrides?: CallOverrides): Promise<[string]>; - - totalSupply(overrides?: CallOverrides): Promise<[BigNumber]>; - - transfer( - to: string, - amount: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - transferFrom( - from: string, - to: string, - amount: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - tssAddress(overrides?: CallOverrides): Promise<[string]>; - - tssAddressUpdater(overrides?: CallOverrides): Promise<[string]>; - - updateTssAndConnectorAddresses( - tssAddress_: string, - connectorAddress_: string, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - }; - - allowance( - owner: string, - spender: string, - overrides?: CallOverrides - ): Promise; - - approve( - spender: string, - amount: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - balanceOf(account: string, overrides?: CallOverrides): Promise; - - burn( - amount: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - burnFrom( - account: string, - amount: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - connectorAddress(overrides?: CallOverrides): Promise; - - decimals(overrides?: CallOverrides): Promise; - - decreaseAllowance( - spender: string, - subtractedValue: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - increaseAllowance( - spender: string, - addedValue: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - mint( - mintee: string, - value: BigNumberish, - internalSendHash: BytesLike, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - name(overrides?: CallOverrides): Promise; - - renounceTssAddressUpdater( - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - symbol(overrides?: CallOverrides): Promise; - - totalSupply(overrides?: CallOverrides): Promise; - - transfer( - to: string, - amount: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - transferFrom( - from: string, - to: string, - amount: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - tssAddress(overrides?: CallOverrides): Promise; - - tssAddressUpdater(overrides?: CallOverrides): Promise; - - updateTssAndConnectorAddresses( - tssAddress_: string, - connectorAddress_: string, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - callStatic: { - allowance( - owner: string, - spender: string, - overrides?: CallOverrides - ): Promise; - - approve( - spender: string, - amount: BigNumberish, - overrides?: CallOverrides - ): Promise; - - balanceOf(account: string, overrides?: CallOverrides): Promise; - - burn(amount: BigNumberish, overrides?: CallOverrides): Promise; - - burnFrom( - account: string, - amount: BigNumberish, - overrides?: CallOverrides - ): Promise; - - connectorAddress(overrides?: CallOverrides): Promise; - - decimals(overrides?: CallOverrides): Promise; - - decreaseAllowance( - spender: string, - subtractedValue: BigNumberish, - overrides?: CallOverrides - ): Promise; - - increaseAllowance( - spender: string, - addedValue: BigNumberish, - overrides?: CallOverrides - ): Promise; - - mint( - mintee: string, - value: BigNumberish, - internalSendHash: BytesLike, - overrides?: CallOverrides - ): Promise; - - name(overrides?: CallOverrides): Promise; - - renounceTssAddressUpdater(overrides?: CallOverrides): Promise; - - symbol(overrides?: CallOverrides): Promise; - - totalSupply(overrides?: CallOverrides): Promise; - - transfer( - to: string, - amount: BigNumberish, - overrides?: CallOverrides - ): Promise; - - transferFrom( - from: string, - to: string, - amount: BigNumberish, - overrides?: CallOverrides - ): Promise; - - tssAddress(overrides?: CallOverrides): Promise; - - tssAddressUpdater(overrides?: CallOverrides): Promise; - - updateTssAndConnectorAddresses( - tssAddress_: string, - connectorAddress_: string, - overrides?: CallOverrides - ): Promise; - }; - - filters: { - "Approval(address,address,uint256)"( - owner?: string | null, - spender?: string | null, - value?: null - ): ApprovalEventFilter; - Approval( - owner?: string | null, - spender?: string | null, - value?: null - ): ApprovalEventFilter; - - "Burnt(address,uint256)"( - burnee?: string | null, - amount?: null - ): BurntEventFilter; - Burnt(burnee?: string | null, amount?: null): BurntEventFilter; - - "Minted(address,uint256,bytes32)"( - mintee?: string | null, - amount?: null, - internalSendHash?: BytesLike | null - ): MintedEventFilter; - Minted( - mintee?: string | null, - amount?: null, - internalSendHash?: BytesLike | null - ): MintedEventFilter; - - "Transfer(address,address,uint256)"( - from?: string | null, - to?: string | null, - value?: null - ): TransferEventFilter; - Transfer( - from?: string | null, - to?: string | null, - value?: null - ): TransferEventFilter; - }; - - estimateGas: { - allowance( - owner: string, - spender: string, - overrides?: CallOverrides - ): Promise; - - approve( - spender: string, - amount: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - balanceOf(account: string, overrides?: CallOverrides): Promise; - - burn( - amount: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - burnFrom( - account: string, - amount: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - connectorAddress(overrides?: CallOverrides): Promise; - - decimals(overrides?: CallOverrides): Promise; - - decreaseAllowance( - spender: string, - subtractedValue: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - increaseAllowance( - spender: string, - addedValue: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - mint( - mintee: string, - value: BigNumberish, - internalSendHash: BytesLike, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - name(overrides?: CallOverrides): Promise; - - renounceTssAddressUpdater( - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - symbol(overrides?: CallOverrides): Promise; - - totalSupply(overrides?: CallOverrides): Promise; - - transfer( - to: string, - amount: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - transferFrom( - from: string, - to: string, - amount: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - tssAddress(overrides?: CallOverrides): Promise; - - tssAddressUpdater(overrides?: CallOverrides): Promise; - - updateTssAndConnectorAddresses( - tssAddress_: string, - connectorAddress_: string, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - }; - - populateTransaction: { - allowance( - owner: string, - spender: string, - overrides?: CallOverrides - ): Promise; - - approve( - spender: string, - amount: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - balanceOf( - account: string, - overrides?: CallOverrides - ): Promise; - - burn( - amount: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - burnFrom( - account: string, - amount: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - connectorAddress(overrides?: CallOverrides): Promise; - - decimals(overrides?: CallOverrides): Promise; - - decreaseAllowance( - spender: string, - subtractedValue: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - increaseAllowance( - spender: string, - addedValue: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - mint( - mintee: string, - value: BigNumberish, - internalSendHash: BytesLike, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - name(overrides?: CallOverrides): Promise; - - renounceTssAddressUpdater( - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - symbol(overrides?: CallOverrides): Promise; - - totalSupply(overrides?: CallOverrides): Promise; - - transfer( - to: string, - amount: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - transferFrom( - from: string, - to: string, - amount: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - tssAddress(overrides?: CallOverrides): Promise; - - tssAddressUpdater(overrides?: CallOverrides): Promise; - - updateTssAndConnectorAddresses( - tssAddress_: string, - connectorAddress_: string, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - }; -} diff --git a/packages/interfaces/typechain-types/contracts/Zeta.non-eth.sol/index.ts b/packages/interfaces/typechain-types/contracts/Zeta.non-eth.sol/index.ts deleted file mode 100644 index 113265da..00000000 --- a/packages/interfaces/typechain-types/contracts/Zeta.non-eth.sol/index.ts +++ /dev/null @@ -1,4 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ -export type { ZetaNonEth } from "./ZetaNonEth"; diff --git a/packages/interfaces/typechain-types/contracts/ZetaConnector.base.sol/ZetaConnectorBase.ts b/packages/interfaces/typechain-types/contracts/ZetaConnector.base.sol/ZetaConnectorBase.ts deleted file mode 100644 index f7bc219d..00000000 --- a/packages/interfaces/typechain-types/contracts/ZetaConnector.base.sol/ZetaConnectorBase.ts +++ /dev/null @@ -1,680 +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, -} from "../../common"; - -export declare namespace ZetaInterfaces { - export type SendInputStruct = { - destinationChainId: BigNumberish; - destinationAddress: BytesLike; - destinationGasLimit: BigNumberish; - message: BytesLike; - zetaValueAndGas: BigNumberish; - zetaParams: BytesLike; - }; - - export type SendInputStructOutput = [ - BigNumber, - string, - BigNumber, - string, - BigNumber, - string - ] & { - destinationChainId: BigNumber; - destinationAddress: string; - destinationGasLimit: BigNumber; - message: string; - zetaValueAndGas: BigNumber; - zetaParams: string; - }; -} - -export interface ZetaConnectorBaseInterface extends utils.Interface { - functions: { - "onReceive(bytes,uint256,address,uint256,bytes,bytes32)": FunctionFragment; - "onRevert(address,uint256,bytes,uint256,uint256,bytes,bytes32)": FunctionFragment; - "pause()": FunctionFragment; - "paused()": FunctionFragment; - "pauserAddress()": FunctionFragment; - "renounceTssAddressUpdater()": FunctionFragment; - "send((uint256,bytes,uint256,bytes,uint256,bytes))": FunctionFragment; - "tssAddress()": FunctionFragment; - "tssAddressUpdater()": FunctionFragment; - "unpause()": FunctionFragment; - "updatePauserAddress(address)": FunctionFragment; - "updateTssAddress(address)": FunctionFragment; - "zetaToken()": FunctionFragment; - }; - - getFunction( - nameOrSignatureOrTopic: - | "onReceive" - | "onRevert" - | "pause" - | "paused" - | "pauserAddress" - | "renounceTssAddressUpdater" - | "send" - | "tssAddress" - | "tssAddressUpdater" - | "unpause" - | "updatePauserAddress" - | "updateTssAddress" - | "zetaToken" - ): FunctionFragment; - - encodeFunctionData( - functionFragment: "onReceive", - values: [ - BytesLike, - BigNumberish, - string, - BigNumberish, - BytesLike, - BytesLike - ] - ): string; - encodeFunctionData( - functionFragment: "onRevert", - values: [ - string, - BigNumberish, - BytesLike, - BigNumberish, - BigNumberish, - BytesLike, - BytesLike - ] - ): string; - encodeFunctionData(functionFragment: "pause", values?: undefined): string; - encodeFunctionData(functionFragment: "paused", values?: undefined): string; - encodeFunctionData( - functionFragment: "pauserAddress", - values?: undefined - ): string; - encodeFunctionData( - functionFragment: "renounceTssAddressUpdater", - values?: undefined - ): string; - encodeFunctionData( - functionFragment: "send", - values: [ZetaInterfaces.SendInputStruct] - ): string; - encodeFunctionData( - functionFragment: "tssAddress", - values?: undefined - ): string; - encodeFunctionData( - functionFragment: "tssAddressUpdater", - values?: undefined - ): string; - encodeFunctionData(functionFragment: "unpause", values?: undefined): string; - encodeFunctionData( - functionFragment: "updatePauserAddress", - values: [string] - ): string; - encodeFunctionData( - functionFragment: "updateTssAddress", - values: [string] - ): string; - encodeFunctionData(functionFragment: "zetaToken", values?: undefined): string; - - decodeFunctionResult(functionFragment: "onReceive", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "onRevert", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "pause", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "paused", data: BytesLike): Result; - decodeFunctionResult( - functionFragment: "pauserAddress", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "renounceTssAddressUpdater", - data: BytesLike - ): Result; - decodeFunctionResult(functionFragment: "send", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "tssAddress", data: BytesLike): Result; - decodeFunctionResult( - functionFragment: "tssAddressUpdater", - data: BytesLike - ): Result; - decodeFunctionResult(functionFragment: "unpause", data: BytesLike): Result; - decodeFunctionResult( - functionFragment: "updatePauserAddress", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "updateTssAddress", - data: BytesLike - ): Result; - decodeFunctionResult(functionFragment: "zetaToken", data: BytesLike): Result; - - events: { - "Paused(address)": EventFragment; - "PauserAddressUpdated(address,address)": EventFragment; - "TSSAddressUpdated(address,address)": EventFragment; - "Unpaused(address)": EventFragment; - "ZetaReceived(bytes,uint256,address,uint256,bytes,bytes32)": EventFragment; - "ZetaReverted(address,uint256,uint256,bytes,uint256,bytes,bytes32)": EventFragment; - "ZetaSent(address,address,uint256,bytes,uint256,uint256,bytes,bytes)": EventFragment; - }; - - getEvent(nameOrSignatureOrTopic: "Paused"): EventFragment; - getEvent(nameOrSignatureOrTopic: "PauserAddressUpdated"): EventFragment; - getEvent(nameOrSignatureOrTopic: "TSSAddressUpdated"): EventFragment; - getEvent(nameOrSignatureOrTopic: "Unpaused"): EventFragment; - getEvent(nameOrSignatureOrTopic: "ZetaReceived"): EventFragment; - getEvent(nameOrSignatureOrTopic: "ZetaReverted"): EventFragment; - getEvent(nameOrSignatureOrTopic: "ZetaSent"): EventFragment; -} - -export interface PausedEventObject { - account: string; -} -export type PausedEvent = TypedEvent<[string], PausedEventObject>; - -export type PausedEventFilter = TypedEventFilter; - -export interface PauserAddressUpdatedEventObject { - updaterAddress: string; - newTssAddress: string; -} -export type PauserAddressUpdatedEvent = TypedEvent< - [string, string], - PauserAddressUpdatedEventObject ->; - -export type PauserAddressUpdatedEventFilter = - TypedEventFilter; - -export interface TSSAddressUpdatedEventObject { - zetaTxSenderAddress: string; - newTssAddress: string; -} -export type TSSAddressUpdatedEvent = TypedEvent< - [string, string], - TSSAddressUpdatedEventObject ->; - -export type TSSAddressUpdatedEventFilter = - TypedEventFilter; - -export interface UnpausedEventObject { - account: string; -} -export type UnpausedEvent = TypedEvent<[string], UnpausedEventObject>; - -export type UnpausedEventFilter = TypedEventFilter; - -export interface ZetaReceivedEventObject { - zetaTxSenderAddress: string; - sourceChainId: BigNumber; - destinationAddress: string; - zetaValue: BigNumber; - message: string; - internalSendHash: string; -} -export type ZetaReceivedEvent = TypedEvent< - [string, BigNumber, string, BigNumber, string, string], - ZetaReceivedEventObject ->; - -export type ZetaReceivedEventFilter = TypedEventFilter; - -export interface ZetaRevertedEventObject { - zetaTxSenderAddress: string; - sourceChainId: BigNumber; - destinationChainId: BigNumber; - destinationAddress: string; - remainingZetaValue: BigNumber; - message: string; - internalSendHash: string; -} -export type ZetaRevertedEvent = TypedEvent< - [string, BigNumber, BigNumber, string, BigNumber, string, string], - ZetaRevertedEventObject ->; - -export type ZetaRevertedEventFilter = TypedEventFilter; - -export interface ZetaSentEventObject { - sourceTxOriginAddress: string; - zetaTxSenderAddress: string; - destinationChainId: BigNumber; - destinationAddress: string; - zetaValueAndGas: BigNumber; - destinationGasLimit: BigNumber; - message: string; - zetaParams: string; -} -export type ZetaSentEvent = TypedEvent< - [string, string, BigNumber, string, BigNumber, BigNumber, string, string], - ZetaSentEventObject ->; - -export type ZetaSentEventFilter = TypedEventFilter; - -export interface ZetaConnectorBase extends BaseContract { - connect(signerOrProvider: Signer | Provider | string): this; - attach(addressOrName: string): this; - deployed(): Promise; - - interface: ZetaConnectorBaseInterface; - - 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: { - onReceive( - zetaTxSenderAddress: BytesLike, - sourceChainId: BigNumberish, - destinationAddress: string, - zetaValue: BigNumberish, - message: BytesLike, - internalSendHash: BytesLike, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - onRevert( - zetaTxSenderAddress: string, - sourceChainId: BigNumberish, - destinationAddress: BytesLike, - destinationChainId: BigNumberish, - remainingZetaValue: BigNumberish, - message: BytesLike, - internalSendHash: BytesLike, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - pause( - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - paused(overrides?: CallOverrides): Promise<[boolean]>; - - pauserAddress(overrides?: CallOverrides): Promise<[string]>; - - renounceTssAddressUpdater( - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - send( - input: ZetaInterfaces.SendInputStruct, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - tssAddress(overrides?: CallOverrides): Promise<[string]>; - - tssAddressUpdater(overrides?: CallOverrides): Promise<[string]>; - - unpause( - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - updatePauserAddress( - pauserAddress_: string, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - updateTssAddress( - tssAddress_: string, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - zetaToken(overrides?: CallOverrides): Promise<[string]>; - }; - - onReceive( - zetaTxSenderAddress: BytesLike, - sourceChainId: BigNumberish, - destinationAddress: string, - zetaValue: BigNumberish, - message: BytesLike, - internalSendHash: BytesLike, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - onRevert( - zetaTxSenderAddress: string, - sourceChainId: BigNumberish, - destinationAddress: BytesLike, - destinationChainId: BigNumberish, - remainingZetaValue: BigNumberish, - message: BytesLike, - internalSendHash: BytesLike, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - pause( - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - paused(overrides?: CallOverrides): Promise; - - pauserAddress(overrides?: CallOverrides): Promise; - - renounceTssAddressUpdater( - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - send( - input: ZetaInterfaces.SendInputStruct, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - tssAddress(overrides?: CallOverrides): Promise; - - tssAddressUpdater(overrides?: CallOverrides): Promise; - - unpause( - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - updatePauserAddress( - pauserAddress_: string, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - updateTssAddress( - tssAddress_: string, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - zetaToken(overrides?: CallOverrides): Promise; - - callStatic: { - onReceive( - zetaTxSenderAddress: BytesLike, - sourceChainId: BigNumberish, - destinationAddress: string, - zetaValue: BigNumberish, - message: BytesLike, - internalSendHash: BytesLike, - overrides?: CallOverrides - ): Promise; - - onRevert( - zetaTxSenderAddress: string, - sourceChainId: BigNumberish, - destinationAddress: BytesLike, - destinationChainId: BigNumberish, - remainingZetaValue: BigNumberish, - message: BytesLike, - internalSendHash: BytesLike, - overrides?: CallOverrides - ): Promise; - - pause(overrides?: CallOverrides): Promise; - - paused(overrides?: CallOverrides): Promise; - - pauserAddress(overrides?: CallOverrides): Promise; - - renounceTssAddressUpdater(overrides?: CallOverrides): Promise; - - send( - input: ZetaInterfaces.SendInputStruct, - overrides?: CallOverrides - ): Promise; - - tssAddress(overrides?: CallOverrides): Promise; - - tssAddressUpdater(overrides?: CallOverrides): Promise; - - unpause(overrides?: CallOverrides): Promise; - - updatePauserAddress( - pauserAddress_: string, - overrides?: CallOverrides - ): Promise; - - updateTssAddress( - tssAddress_: string, - overrides?: CallOverrides - ): Promise; - - zetaToken(overrides?: CallOverrides): Promise; - }; - - filters: { - "Paused(address)"(account?: null): PausedEventFilter; - Paused(account?: null): PausedEventFilter; - - "PauserAddressUpdated(address,address)"( - updaterAddress?: null, - newTssAddress?: null - ): PauserAddressUpdatedEventFilter; - PauserAddressUpdated( - updaterAddress?: null, - newTssAddress?: null - ): PauserAddressUpdatedEventFilter; - - "TSSAddressUpdated(address,address)"( - zetaTxSenderAddress?: null, - newTssAddress?: null - ): TSSAddressUpdatedEventFilter; - TSSAddressUpdated( - zetaTxSenderAddress?: null, - newTssAddress?: null - ): TSSAddressUpdatedEventFilter; - - "Unpaused(address)"(account?: null): UnpausedEventFilter; - Unpaused(account?: null): UnpausedEventFilter; - - "ZetaReceived(bytes,uint256,address,uint256,bytes,bytes32)"( - zetaTxSenderAddress?: null, - sourceChainId?: BigNumberish | null, - destinationAddress?: string | null, - zetaValue?: null, - message?: null, - internalSendHash?: BytesLike | null - ): ZetaReceivedEventFilter; - ZetaReceived( - zetaTxSenderAddress?: null, - sourceChainId?: BigNumberish | null, - destinationAddress?: string | null, - zetaValue?: null, - message?: null, - internalSendHash?: BytesLike | null - ): ZetaReceivedEventFilter; - - "ZetaReverted(address,uint256,uint256,bytes,uint256,bytes,bytes32)"( - zetaTxSenderAddress?: null, - sourceChainId?: null, - destinationChainId?: BigNumberish | null, - destinationAddress?: null, - remainingZetaValue?: null, - message?: null, - internalSendHash?: BytesLike | null - ): ZetaRevertedEventFilter; - ZetaReverted( - zetaTxSenderAddress?: null, - sourceChainId?: null, - destinationChainId?: BigNumberish | null, - destinationAddress?: null, - remainingZetaValue?: null, - message?: null, - internalSendHash?: BytesLike | null - ): ZetaRevertedEventFilter; - - "ZetaSent(address,address,uint256,bytes,uint256,uint256,bytes,bytes)"( - sourceTxOriginAddress?: null, - zetaTxSenderAddress?: string | null, - destinationChainId?: BigNumberish | null, - destinationAddress?: null, - zetaValueAndGas?: null, - destinationGasLimit?: null, - message?: null, - zetaParams?: null - ): ZetaSentEventFilter; - ZetaSent( - sourceTxOriginAddress?: null, - zetaTxSenderAddress?: string | null, - destinationChainId?: BigNumberish | null, - destinationAddress?: null, - zetaValueAndGas?: null, - destinationGasLimit?: null, - message?: null, - zetaParams?: null - ): ZetaSentEventFilter; - }; - - estimateGas: { - onReceive( - zetaTxSenderAddress: BytesLike, - sourceChainId: BigNumberish, - destinationAddress: string, - zetaValue: BigNumberish, - message: BytesLike, - internalSendHash: BytesLike, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - onRevert( - zetaTxSenderAddress: string, - sourceChainId: BigNumberish, - destinationAddress: BytesLike, - destinationChainId: BigNumberish, - remainingZetaValue: BigNumberish, - message: BytesLike, - internalSendHash: BytesLike, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - pause( - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - paused(overrides?: CallOverrides): Promise; - - pauserAddress(overrides?: CallOverrides): Promise; - - renounceTssAddressUpdater( - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - send( - input: ZetaInterfaces.SendInputStruct, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - tssAddress(overrides?: CallOverrides): Promise; - - tssAddressUpdater(overrides?: CallOverrides): Promise; - - unpause( - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - updatePauserAddress( - pauserAddress_: string, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - updateTssAddress( - tssAddress_: string, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - zetaToken(overrides?: CallOverrides): Promise; - }; - - populateTransaction: { - onReceive( - zetaTxSenderAddress: BytesLike, - sourceChainId: BigNumberish, - destinationAddress: string, - zetaValue: BigNumberish, - message: BytesLike, - internalSendHash: BytesLike, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - onRevert( - zetaTxSenderAddress: string, - sourceChainId: BigNumberish, - destinationAddress: BytesLike, - destinationChainId: BigNumberish, - remainingZetaValue: BigNumberish, - message: BytesLike, - internalSendHash: BytesLike, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - pause( - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - paused(overrides?: CallOverrides): Promise; - - pauserAddress(overrides?: CallOverrides): Promise; - - renounceTssAddressUpdater( - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - send( - input: ZetaInterfaces.SendInputStruct, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - tssAddress(overrides?: CallOverrides): Promise; - - tssAddressUpdater(overrides?: CallOverrides): Promise; - - unpause( - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - updatePauserAddress( - pauserAddress_: string, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - updateTssAddress( - tssAddress_: string, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - zetaToken(overrides?: CallOverrides): Promise; - }; -} diff --git a/packages/interfaces/typechain-types/contracts/ZetaConnector.base.sol/index.ts b/packages/interfaces/typechain-types/contracts/ZetaConnector.base.sol/index.ts deleted file mode 100644 index c1f4cee0..00000000 --- a/packages/interfaces/typechain-types/contracts/ZetaConnector.base.sol/index.ts +++ /dev/null @@ -1,4 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ -export type { ZetaConnectorBase } from "./ZetaConnectorBase"; diff --git a/packages/interfaces/typechain-types/contracts/ZetaConnector.eth.sol/ZetaConnectorEth.ts b/packages/interfaces/typechain-types/contracts/ZetaConnector.eth.sol/ZetaConnectorEth.ts deleted file mode 100644 index 08a64ec0..00000000 --- a/packages/interfaces/typechain-types/contracts/ZetaConnector.eth.sol/ZetaConnectorEth.ts +++ /dev/null @@ -1,700 +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, -} from "../../common"; - -export declare namespace ZetaInterfaces { - export type SendInputStruct = { - destinationChainId: BigNumberish; - destinationAddress: BytesLike; - destinationGasLimit: BigNumberish; - message: BytesLike; - zetaValueAndGas: BigNumberish; - zetaParams: BytesLike; - }; - - export type SendInputStructOutput = [ - BigNumber, - string, - BigNumber, - string, - BigNumber, - string - ] & { - destinationChainId: BigNumber; - destinationAddress: string; - destinationGasLimit: BigNumber; - message: string; - zetaValueAndGas: BigNumber; - zetaParams: string; - }; -} - -export interface ZetaConnectorEthInterface extends utils.Interface { - functions: { - "getLockedAmount()": FunctionFragment; - "onReceive(bytes,uint256,address,uint256,bytes,bytes32)": FunctionFragment; - "onRevert(address,uint256,bytes,uint256,uint256,bytes,bytes32)": FunctionFragment; - "pause()": FunctionFragment; - "paused()": FunctionFragment; - "pauserAddress()": FunctionFragment; - "renounceTssAddressUpdater()": FunctionFragment; - "send((uint256,bytes,uint256,bytes,uint256,bytes))": FunctionFragment; - "tssAddress()": FunctionFragment; - "tssAddressUpdater()": FunctionFragment; - "unpause()": FunctionFragment; - "updatePauserAddress(address)": FunctionFragment; - "updateTssAddress(address)": FunctionFragment; - "zetaToken()": FunctionFragment; - }; - - getFunction( - nameOrSignatureOrTopic: - | "getLockedAmount" - | "onReceive" - | "onRevert" - | "pause" - | "paused" - | "pauserAddress" - | "renounceTssAddressUpdater" - | "send" - | "tssAddress" - | "tssAddressUpdater" - | "unpause" - | "updatePauserAddress" - | "updateTssAddress" - | "zetaToken" - ): FunctionFragment; - - encodeFunctionData( - functionFragment: "getLockedAmount", - values?: undefined - ): string; - encodeFunctionData( - functionFragment: "onReceive", - values: [ - BytesLike, - BigNumberish, - string, - BigNumberish, - BytesLike, - BytesLike - ] - ): string; - encodeFunctionData( - functionFragment: "onRevert", - values: [ - string, - BigNumberish, - BytesLike, - BigNumberish, - BigNumberish, - BytesLike, - BytesLike - ] - ): string; - encodeFunctionData(functionFragment: "pause", values?: undefined): string; - encodeFunctionData(functionFragment: "paused", values?: undefined): string; - encodeFunctionData( - functionFragment: "pauserAddress", - values?: undefined - ): string; - encodeFunctionData( - functionFragment: "renounceTssAddressUpdater", - values?: undefined - ): string; - encodeFunctionData( - functionFragment: "send", - values: [ZetaInterfaces.SendInputStruct] - ): string; - encodeFunctionData( - functionFragment: "tssAddress", - values?: undefined - ): string; - encodeFunctionData( - functionFragment: "tssAddressUpdater", - values?: undefined - ): string; - encodeFunctionData(functionFragment: "unpause", values?: undefined): string; - encodeFunctionData( - functionFragment: "updatePauserAddress", - values: [string] - ): string; - encodeFunctionData( - functionFragment: "updateTssAddress", - values: [string] - ): string; - encodeFunctionData(functionFragment: "zetaToken", values?: undefined): string; - - decodeFunctionResult( - functionFragment: "getLockedAmount", - data: BytesLike - ): Result; - decodeFunctionResult(functionFragment: "onReceive", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "onRevert", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "pause", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "paused", data: BytesLike): Result; - decodeFunctionResult( - functionFragment: "pauserAddress", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "renounceTssAddressUpdater", - data: BytesLike - ): Result; - decodeFunctionResult(functionFragment: "send", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "tssAddress", data: BytesLike): Result; - decodeFunctionResult( - functionFragment: "tssAddressUpdater", - data: BytesLike - ): Result; - decodeFunctionResult(functionFragment: "unpause", data: BytesLike): Result; - decodeFunctionResult( - functionFragment: "updatePauserAddress", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "updateTssAddress", - data: BytesLike - ): Result; - decodeFunctionResult(functionFragment: "zetaToken", data: BytesLike): Result; - - events: { - "Paused(address)": EventFragment; - "PauserAddressUpdated(address,address)": EventFragment; - "TSSAddressUpdated(address,address)": EventFragment; - "Unpaused(address)": EventFragment; - "ZetaReceived(bytes,uint256,address,uint256,bytes,bytes32)": EventFragment; - "ZetaReverted(address,uint256,uint256,bytes,uint256,bytes,bytes32)": EventFragment; - "ZetaSent(address,address,uint256,bytes,uint256,uint256,bytes,bytes)": EventFragment; - }; - - getEvent(nameOrSignatureOrTopic: "Paused"): EventFragment; - getEvent(nameOrSignatureOrTopic: "PauserAddressUpdated"): EventFragment; - getEvent(nameOrSignatureOrTopic: "TSSAddressUpdated"): EventFragment; - getEvent(nameOrSignatureOrTopic: "Unpaused"): EventFragment; - getEvent(nameOrSignatureOrTopic: "ZetaReceived"): EventFragment; - getEvent(nameOrSignatureOrTopic: "ZetaReverted"): EventFragment; - getEvent(nameOrSignatureOrTopic: "ZetaSent"): EventFragment; -} - -export interface PausedEventObject { - account: string; -} -export type PausedEvent = TypedEvent<[string], PausedEventObject>; - -export type PausedEventFilter = TypedEventFilter; - -export interface PauserAddressUpdatedEventObject { - updaterAddress: string; - newTssAddress: string; -} -export type PauserAddressUpdatedEvent = TypedEvent< - [string, string], - PauserAddressUpdatedEventObject ->; - -export type PauserAddressUpdatedEventFilter = - TypedEventFilter; - -export interface TSSAddressUpdatedEventObject { - zetaTxSenderAddress: string; - newTssAddress: string; -} -export type TSSAddressUpdatedEvent = TypedEvent< - [string, string], - TSSAddressUpdatedEventObject ->; - -export type TSSAddressUpdatedEventFilter = - TypedEventFilter; - -export interface UnpausedEventObject { - account: string; -} -export type UnpausedEvent = TypedEvent<[string], UnpausedEventObject>; - -export type UnpausedEventFilter = TypedEventFilter; - -export interface ZetaReceivedEventObject { - zetaTxSenderAddress: string; - sourceChainId: BigNumber; - destinationAddress: string; - zetaValue: BigNumber; - message: string; - internalSendHash: string; -} -export type ZetaReceivedEvent = TypedEvent< - [string, BigNumber, string, BigNumber, string, string], - ZetaReceivedEventObject ->; - -export type ZetaReceivedEventFilter = TypedEventFilter; - -export interface ZetaRevertedEventObject { - zetaTxSenderAddress: string; - sourceChainId: BigNumber; - destinationChainId: BigNumber; - destinationAddress: string; - remainingZetaValue: BigNumber; - message: string; - internalSendHash: string; -} -export type ZetaRevertedEvent = TypedEvent< - [string, BigNumber, BigNumber, string, BigNumber, string, string], - ZetaRevertedEventObject ->; - -export type ZetaRevertedEventFilter = TypedEventFilter; - -export interface ZetaSentEventObject { - sourceTxOriginAddress: string; - zetaTxSenderAddress: string; - destinationChainId: BigNumber; - destinationAddress: string; - zetaValueAndGas: BigNumber; - destinationGasLimit: BigNumber; - message: string; - zetaParams: string; -} -export type ZetaSentEvent = TypedEvent< - [string, string, BigNumber, string, BigNumber, BigNumber, string, string], - ZetaSentEventObject ->; - -export type ZetaSentEventFilter = TypedEventFilter; - -export interface ZetaConnectorEth extends BaseContract { - connect(signerOrProvider: Signer | Provider | string): this; - attach(addressOrName: string): this; - deployed(): Promise; - - interface: ZetaConnectorEthInterface; - - 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: { - getLockedAmount(overrides?: CallOverrides): Promise<[BigNumber]>; - - onReceive( - zetaTxSenderAddress: BytesLike, - sourceChainId: BigNumberish, - destinationAddress: string, - zetaValue: BigNumberish, - message: BytesLike, - internalSendHash: BytesLike, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - onRevert( - zetaTxSenderAddress: string, - sourceChainId: BigNumberish, - destinationAddress: BytesLike, - destinationChainId: BigNumberish, - remainingZetaValue: BigNumberish, - message: BytesLike, - internalSendHash: BytesLike, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - pause( - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - paused(overrides?: CallOverrides): Promise<[boolean]>; - - pauserAddress(overrides?: CallOverrides): Promise<[string]>; - - renounceTssAddressUpdater( - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - send( - input: ZetaInterfaces.SendInputStruct, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - tssAddress(overrides?: CallOverrides): Promise<[string]>; - - tssAddressUpdater(overrides?: CallOverrides): Promise<[string]>; - - unpause( - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - updatePauserAddress( - pauserAddress_: string, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - updateTssAddress( - tssAddress_: string, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - zetaToken(overrides?: CallOverrides): Promise<[string]>; - }; - - getLockedAmount(overrides?: CallOverrides): Promise; - - onReceive( - zetaTxSenderAddress: BytesLike, - sourceChainId: BigNumberish, - destinationAddress: string, - zetaValue: BigNumberish, - message: BytesLike, - internalSendHash: BytesLike, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - onRevert( - zetaTxSenderAddress: string, - sourceChainId: BigNumberish, - destinationAddress: BytesLike, - destinationChainId: BigNumberish, - remainingZetaValue: BigNumberish, - message: BytesLike, - internalSendHash: BytesLike, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - pause( - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - paused(overrides?: CallOverrides): Promise; - - pauserAddress(overrides?: CallOverrides): Promise; - - renounceTssAddressUpdater( - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - send( - input: ZetaInterfaces.SendInputStruct, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - tssAddress(overrides?: CallOverrides): Promise; - - tssAddressUpdater(overrides?: CallOverrides): Promise; - - unpause( - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - updatePauserAddress( - pauserAddress_: string, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - updateTssAddress( - tssAddress_: string, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - zetaToken(overrides?: CallOverrides): Promise; - - callStatic: { - getLockedAmount(overrides?: CallOverrides): Promise; - - onReceive( - zetaTxSenderAddress: BytesLike, - sourceChainId: BigNumberish, - destinationAddress: string, - zetaValue: BigNumberish, - message: BytesLike, - internalSendHash: BytesLike, - overrides?: CallOverrides - ): Promise; - - onRevert( - zetaTxSenderAddress: string, - sourceChainId: BigNumberish, - destinationAddress: BytesLike, - destinationChainId: BigNumberish, - remainingZetaValue: BigNumberish, - message: BytesLike, - internalSendHash: BytesLike, - overrides?: CallOverrides - ): Promise; - - pause(overrides?: CallOverrides): Promise; - - paused(overrides?: CallOverrides): Promise; - - pauserAddress(overrides?: CallOverrides): Promise; - - renounceTssAddressUpdater(overrides?: CallOverrides): Promise; - - send( - input: ZetaInterfaces.SendInputStruct, - overrides?: CallOverrides - ): Promise; - - tssAddress(overrides?: CallOverrides): Promise; - - tssAddressUpdater(overrides?: CallOverrides): Promise; - - unpause(overrides?: CallOverrides): Promise; - - updatePauserAddress( - pauserAddress_: string, - overrides?: CallOverrides - ): Promise; - - updateTssAddress( - tssAddress_: string, - overrides?: CallOverrides - ): Promise; - - zetaToken(overrides?: CallOverrides): Promise; - }; - - filters: { - "Paused(address)"(account?: null): PausedEventFilter; - Paused(account?: null): PausedEventFilter; - - "PauserAddressUpdated(address,address)"( - updaterAddress?: null, - newTssAddress?: null - ): PauserAddressUpdatedEventFilter; - PauserAddressUpdated( - updaterAddress?: null, - newTssAddress?: null - ): PauserAddressUpdatedEventFilter; - - "TSSAddressUpdated(address,address)"( - zetaTxSenderAddress?: null, - newTssAddress?: null - ): TSSAddressUpdatedEventFilter; - TSSAddressUpdated( - zetaTxSenderAddress?: null, - newTssAddress?: null - ): TSSAddressUpdatedEventFilter; - - "Unpaused(address)"(account?: null): UnpausedEventFilter; - Unpaused(account?: null): UnpausedEventFilter; - - "ZetaReceived(bytes,uint256,address,uint256,bytes,bytes32)"( - zetaTxSenderAddress?: null, - sourceChainId?: BigNumberish | null, - destinationAddress?: string | null, - zetaValue?: null, - message?: null, - internalSendHash?: BytesLike | null - ): ZetaReceivedEventFilter; - ZetaReceived( - zetaTxSenderAddress?: null, - sourceChainId?: BigNumberish | null, - destinationAddress?: string | null, - zetaValue?: null, - message?: null, - internalSendHash?: BytesLike | null - ): ZetaReceivedEventFilter; - - "ZetaReverted(address,uint256,uint256,bytes,uint256,bytes,bytes32)"( - zetaTxSenderAddress?: null, - sourceChainId?: null, - destinationChainId?: BigNumberish | null, - destinationAddress?: null, - remainingZetaValue?: null, - message?: null, - internalSendHash?: BytesLike | null - ): ZetaRevertedEventFilter; - ZetaReverted( - zetaTxSenderAddress?: null, - sourceChainId?: null, - destinationChainId?: BigNumberish | null, - destinationAddress?: null, - remainingZetaValue?: null, - message?: null, - internalSendHash?: BytesLike | null - ): ZetaRevertedEventFilter; - - "ZetaSent(address,address,uint256,bytes,uint256,uint256,bytes,bytes)"( - sourceTxOriginAddress?: null, - zetaTxSenderAddress?: string | null, - destinationChainId?: BigNumberish | null, - destinationAddress?: null, - zetaValueAndGas?: null, - destinationGasLimit?: null, - message?: null, - zetaParams?: null - ): ZetaSentEventFilter; - ZetaSent( - sourceTxOriginAddress?: null, - zetaTxSenderAddress?: string | null, - destinationChainId?: BigNumberish | null, - destinationAddress?: null, - zetaValueAndGas?: null, - destinationGasLimit?: null, - message?: null, - zetaParams?: null - ): ZetaSentEventFilter; - }; - - estimateGas: { - getLockedAmount(overrides?: CallOverrides): Promise; - - onReceive( - zetaTxSenderAddress: BytesLike, - sourceChainId: BigNumberish, - destinationAddress: string, - zetaValue: BigNumberish, - message: BytesLike, - internalSendHash: BytesLike, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - onRevert( - zetaTxSenderAddress: string, - sourceChainId: BigNumberish, - destinationAddress: BytesLike, - destinationChainId: BigNumberish, - remainingZetaValue: BigNumberish, - message: BytesLike, - internalSendHash: BytesLike, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - pause( - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - paused(overrides?: CallOverrides): Promise; - - pauserAddress(overrides?: CallOverrides): Promise; - - renounceTssAddressUpdater( - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - send( - input: ZetaInterfaces.SendInputStruct, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - tssAddress(overrides?: CallOverrides): Promise; - - tssAddressUpdater(overrides?: CallOverrides): Promise; - - unpause( - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - updatePauserAddress( - pauserAddress_: string, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - updateTssAddress( - tssAddress_: string, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - zetaToken(overrides?: CallOverrides): Promise; - }; - - populateTransaction: { - getLockedAmount(overrides?: CallOverrides): Promise; - - onReceive( - zetaTxSenderAddress: BytesLike, - sourceChainId: BigNumberish, - destinationAddress: string, - zetaValue: BigNumberish, - message: BytesLike, - internalSendHash: BytesLike, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - onRevert( - zetaTxSenderAddress: string, - sourceChainId: BigNumberish, - destinationAddress: BytesLike, - destinationChainId: BigNumberish, - remainingZetaValue: BigNumberish, - message: BytesLike, - internalSendHash: BytesLike, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - pause( - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - paused(overrides?: CallOverrides): Promise; - - pauserAddress(overrides?: CallOverrides): Promise; - - renounceTssAddressUpdater( - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - send( - input: ZetaInterfaces.SendInputStruct, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - tssAddress(overrides?: CallOverrides): Promise; - - tssAddressUpdater(overrides?: CallOverrides): Promise; - - unpause( - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - updatePauserAddress( - pauserAddress_: string, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - updateTssAddress( - tssAddress_: string, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - zetaToken(overrides?: CallOverrides): Promise; - }; -} diff --git a/packages/interfaces/typechain-types/contracts/ZetaConnector.eth.sol/index.ts b/packages/interfaces/typechain-types/contracts/ZetaConnector.eth.sol/index.ts deleted file mode 100644 index 7d49381d..00000000 --- a/packages/interfaces/typechain-types/contracts/ZetaConnector.eth.sol/index.ts +++ /dev/null @@ -1,4 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ -export type { ZetaConnectorEth } from "./ZetaConnectorEth"; diff --git a/packages/interfaces/typechain-types/contracts/ZetaConnector.non-eth.sol/ZetaConnectorNonEth.ts b/packages/interfaces/typechain-types/contracts/ZetaConnector.non-eth.sol/ZetaConnectorNonEth.ts deleted file mode 100644 index e92e3501..00000000 --- a/packages/interfaces/typechain-types/contracts/ZetaConnector.non-eth.sol/ZetaConnectorNonEth.ts +++ /dev/null @@ -1,749 +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, -} from "../../common"; - -export declare namespace ZetaInterfaces { - export type SendInputStruct = { - destinationChainId: BigNumberish; - destinationAddress: BytesLike; - destinationGasLimit: BigNumberish; - message: BytesLike; - zetaValueAndGas: BigNumberish; - zetaParams: BytesLike; - }; - - export type SendInputStructOutput = [ - BigNumber, - string, - BigNumber, - string, - BigNumber, - string - ] & { - destinationChainId: BigNumber; - destinationAddress: string; - destinationGasLimit: BigNumber; - message: string; - zetaValueAndGas: BigNumber; - zetaParams: string; - }; -} - -export interface ZetaConnectorNonEthInterface extends utils.Interface { - functions: { - "getLockedAmount()": FunctionFragment; - "maxSupply()": FunctionFragment; - "onReceive(bytes,uint256,address,uint256,bytes,bytes32)": FunctionFragment; - "onRevert(address,uint256,bytes,uint256,uint256,bytes,bytes32)": FunctionFragment; - "pause()": FunctionFragment; - "paused()": FunctionFragment; - "pauserAddress()": FunctionFragment; - "renounceTssAddressUpdater()": FunctionFragment; - "send((uint256,bytes,uint256,bytes,uint256,bytes))": FunctionFragment; - "setMaxSupply(uint256)": FunctionFragment; - "tssAddress()": FunctionFragment; - "tssAddressUpdater()": FunctionFragment; - "unpause()": FunctionFragment; - "updatePauserAddress(address)": FunctionFragment; - "updateTssAddress(address)": FunctionFragment; - "zetaToken()": FunctionFragment; - }; - - getFunction( - nameOrSignatureOrTopic: - | "getLockedAmount" - | "maxSupply" - | "onReceive" - | "onRevert" - | "pause" - | "paused" - | "pauserAddress" - | "renounceTssAddressUpdater" - | "send" - | "setMaxSupply" - | "tssAddress" - | "tssAddressUpdater" - | "unpause" - | "updatePauserAddress" - | "updateTssAddress" - | "zetaToken" - ): FunctionFragment; - - encodeFunctionData( - functionFragment: "getLockedAmount", - values?: undefined - ): string; - encodeFunctionData(functionFragment: "maxSupply", values?: undefined): string; - encodeFunctionData( - functionFragment: "onReceive", - values: [ - BytesLike, - BigNumberish, - string, - BigNumberish, - BytesLike, - BytesLike - ] - ): string; - encodeFunctionData( - functionFragment: "onRevert", - values: [ - string, - BigNumberish, - BytesLike, - BigNumberish, - BigNumberish, - BytesLike, - BytesLike - ] - ): string; - encodeFunctionData(functionFragment: "pause", values?: undefined): string; - encodeFunctionData(functionFragment: "paused", values?: undefined): string; - encodeFunctionData( - functionFragment: "pauserAddress", - values?: undefined - ): string; - encodeFunctionData( - functionFragment: "renounceTssAddressUpdater", - values?: undefined - ): string; - encodeFunctionData( - functionFragment: "send", - values: [ZetaInterfaces.SendInputStruct] - ): string; - encodeFunctionData( - functionFragment: "setMaxSupply", - values: [BigNumberish] - ): string; - encodeFunctionData( - functionFragment: "tssAddress", - values?: undefined - ): string; - encodeFunctionData( - functionFragment: "tssAddressUpdater", - values?: undefined - ): string; - encodeFunctionData(functionFragment: "unpause", values?: undefined): string; - encodeFunctionData( - functionFragment: "updatePauserAddress", - values: [string] - ): string; - encodeFunctionData( - functionFragment: "updateTssAddress", - values: [string] - ): string; - encodeFunctionData(functionFragment: "zetaToken", values?: undefined): string; - - decodeFunctionResult( - functionFragment: "getLockedAmount", - data: BytesLike - ): Result; - decodeFunctionResult(functionFragment: "maxSupply", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "onReceive", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "onRevert", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "pause", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "paused", data: BytesLike): Result; - decodeFunctionResult( - functionFragment: "pauserAddress", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "renounceTssAddressUpdater", - data: BytesLike - ): Result; - decodeFunctionResult(functionFragment: "send", data: BytesLike): Result; - decodeFunctionResult( - functionFragment: "setMaxSupply", - data: BytesLike - ): Result; - decodeFunctionResult(functionFragment: "tssAddress", data: BytesLike): Result; - decodeFunctionResult( - functionFragment: "tssAddressUpdater", - data: BytesLike - ): Result; - decodeFunctionResult(functionFragment: "unpause", data: BytesLike): Result; - decodeFunctionResult( - functionFragment: "updatePauserAddress", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "updateTssAddress", - data: BytesLike - ): Result; - decodeFunctionResult(functionFragment: "zetaToken", data: BytesLike): Result; - - events: { - "Paused(address)": EventFragment; - "PauserAddressUpdated(address,address)": EventFragment; - "TSSAddressUpdated(address,address)": EventFragment; - "Unpaused(address)": EventFragment; - "ZetaReceived(bytes,uint256,address,uint256,bytes,bytes32)": EventFragment; - "ZetaReverted(address,uint256,uint256,bytes,uint256,bytes,bytes32)": EventFragment; - "ZetaSent(address,address,uint256,bytes,uint256,uint256,bytes,bytes)": EventFragment; - }; - - getEvent(nameOrSignatureOrTopic: "Paused"): EventFragment; - getEvent(nameOrSignatureOrTopic: "PauserAddressUpdated"): EventFragment; - getEvent(nameOrSignatureOrTopic: "TSSAddressUpdated"): EventFragment; - getEvent(nameOrSignatureOrTopic: "Unpaused"): EventFragment; - getEvent(nameOrSignatureOrTopic: "ZetaReceived"): EventFragment; - getEvent(nameOrSignatureOrTopic: "ZetaReverted"): EventFragment; - getEvent(nameOrSignatureOrTopic: "ZetaSent"): EventFragment; -} - -export interface PausedEventObject { - account: string; -} -export type PausedEvent = TypedEvent<[string], PausedEventObject>; - -export type PausedEventFilter = TypedEventFilter; - -export interface PauserAddressUpdatedEventObject { - updaterAddress: string; - newTssAddress: string; -} -export type PauserAddressUpdatedEvent = TypedEvent< - [string, string], - PauserAddressUpdatedEventObject ->; - -export type PauserAddressUpdatedEventFilter = - TypedEventFilter; - -export interface TSSAddressUpdatedEventObject { - zetaTxSenderAddress: string; - newTssAddress: string; -} -export type TSSAddressUpdatedEvent = TypedEvent< - [string, string], - TSSAddressUpdatedEventObject ->; - -export type TSSAddressUpdatedEventFilter = - TypedEventFilter; - -export interface UnpausedEventObject { - account: string; -} -export type UnpausedEvent = TypedEvent<[string], UnpausedEventObject>; - -export type UnpausedEventFilter = TypedEventFilter; - -export interface ZetaReceivedEventObject { - zetaTxSenderAddress: string; - sourceChainId: BigNumber; - destinationAddress: string; - zetaValue: BigNumber; - message: string; - internalSendHash: string; -} -export type ZetaReceivedEvent = TypedEvent< - [string, BigNumber, string, BigNumber, string, string], - ZetaReceivedEventObject ->; - -export type ZetaReceivedEventFilter = TypedEventFilter; - -export interface ZetaRevertedEventObject { - zetaTxSenderAddress: string; - sourceChainId: BigNumber; - destinationChainId: BigNumber; - destinationAddress: string; - remainingZetaValue: BigNumber; - message: string; - internalSendHash: string; -} -export type ZetaRevertedEvent = TypedEvent< - [string, BigNumber, BigNumber, string, BigNumber, string, string], - ZetaRevertedEventObject ->; - -export type ZetaRevertedEventFilter = TypedEventFilter; - -export interface ZetaSentEventObject { - sourceTxOriginAddress: string; - zetaTxSenderAddress: string; - destinationChainId: BigNumber; - destinationAddress: string; - zetaValueAndGas: BigNumber; - destinationGasLimit: BigNumber; - message: string; - zetaParams: string; -} -export type ZetaSentEvent = TypedEvent< - [string, string, BigNumber, string, BigNumber, BigNumber, string, string], - ZetaSentEventObject ->; - -export type ZetaSentEventFilter = TypedEventFilter; - -export interface ZetaConnectorNonEth extends BaseContract { - connect(signerOrProvider: Signer | Provider | string): this; - attach(addressOrName: string): this; - deployed(): Promise; - - interface: ZetaConnectorNonEthInterface; - - 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: { - getLockedAmount(overrides?: CallOverrides): Promise<[BigNumber]>; - - maxSupply(overrides?: CallOverrides): Promise<[BigNumber]>; - - onReceive( - zetaTxSenderAddress: BytesLike, - sourceChainId: BigNumberish, - destinationAddress: string, - zetaValue: BigNumberish, - message: BytesLike, - internalSendHash: BytesLike, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - onRevert( - zetaTxSenderAddress: string, - sourceChainId: BigNumberish, - destinationAddress: BytesLike, - destinationChainId: BigNumberish, - remainingZetaValue: BigNumberish, - message: BytesLike, - internalSendHash: BytesLike, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - pause( - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - paused(overrides?: CallOverrides): Promise<[boolean]>; - - pauserAddress(overrides?: CallOverrides): Promise<[string]>; - - renounceTssAddressUpdater( - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - send( - input: ZetaInterfaces.SendInputStruct, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - setMaxSupply( - maxSupply_: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - tssAddress(overrides?: CallOverrides): Promise<[string]>; - - tssAddressUpdater(overrides?: CallOverrides): Promise<[string]>; - - unpause( - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - updatePauserAddress( - pauserAddress_: string, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - updateTssAddress( - tssAddress_: string, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - zetaToken(overrides?: CallOverrides): Promise<[string]>; - }; - - getLockedAmount(overrides?: CallOverrides): Promise; - - maxSupply(overrides?: CallOverrides): Promise; - - onReceive( - zetaTxSenderAddress: BytesLike, - sourceChainId: BigNumberish, - destinationAddress: string, - zetaValue: BigNumberish, - message: BytesLike, - internalSendHash: BytesLike, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - onRevert( - zetaTxSenderAddress: string, - sourceChainId: BigNumberish, - destinationAddress: BytesLike, - destinationChainId: BigNumberish, - remainingZetaValue: BigNumberish, - message: BytesLike, - internalSendHash: BytesLike, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - pause( - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - paused(overrides?: CallOverrides): Promise; - - pauserAddress(overrides?: CallOverrides): Promise; - - renounceTssAddressUpdater( - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - send( - input: ZetaInterfaces.SendInputStruct, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - setMaxSupply( - maxSupply_: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - tssAddress(overrides?: CallOverrides): Promise; - - tssAddressUpdater(overrides?: CallOverrides): Promise; - - unpause( - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - updatePauserAddress( - pauserAddress_: string, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - updateTssAddress( - tssAddress_: string, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - zetaToken(overrides?: CallOverrides): Promise; - - callStatic: { - getLockedAmount(overrides?: CallOverrides): Promise; - - maxSupply(overrides?: CallOverrides): Promise; - - onReceive( - zetaTxSenderAddress: BytesLike, - sourceChainId: BigNumberish, - destinationAddress: string, - zetaValue: BigNumberish, - message: BytesLike, - internalSendHash: BytesLike, - overrides?: CallOverrides - ): Promise; - - onRevert( - zetaTxSenderAddress: string, - sourceChainId: BigNumberish, - destinationAddress: BytesLike, - destinationChainId: BigNumberish, - remainingZetaValue: BigNumberish, - message: BytesLike, - internalSendHash: BytesLike, - overrides?: CallOverrides - ): Promise; - - pause(overrides?: CallOverrides): Promise; - - paused(overrides?: CallOverrides): Promise; - - pauserAddress(overrides?: CallOverrides): Promise; - - renounceTssAddressUpdater(overrides?: CallOverrides): Promise; - - send( - input: ZetaInterfaces.SendInputStruct, - overrides?: CallOverrides - ): Promise; - - setMaxSupply( - maxSupply_: BigNumberish, - overrides?: CallOverrides - ): Promise; - - tssAddress(overrides?: CallOverrides): Promise; - - tssAddressUpdater(overrides?: CallOverrides): Promise; - - unpause(overrides?: CallOverrides): Promise; - - updatePauserAddress( - pauserAddress_: string, - overrides?: CallOverrides - ): Promise; - - updateTssAddress( - tssAddress_: string, - overrides?: CallOverrides - ): Promise; - - zetaToken(overrides?: CallOverrides): Promise; - }; - - filters: { - "Paused(address)"(account?: null): PausedEventFilter; - Paused(account?: null): PausedEventFilter; - - "PauserAddressUpdated(address,address)"( - updaterAddress?: null, - newTssAddress?: null - ): PauserAddressUpdatedEventFilter; - PauserAddressUpdated( - updaterAddress?: null, - newTssAddress?: null - ): PauserAddressUpdatedEventFilter; - - "TSSAddressUpdated(address,address)"( - zetaTxSenderAddress?: null, - newTssAddress?: null - ): TSSAddressUpdatedEventFilter; - TSSAddressUpdated( - zetaTxSenderAddress?: null, - newTssAddress?: null - ): TSSAddressUpdatedEventFilter; - - "Unpaused(address)"(account?: null): UnpausedEventFilter; - Unpaused(account?: null): UnpausedEventFilter; - - "ZetaReceived(bytes,uint256,address,uint256,bytes,bytes32)"( - zetaTxSenderAddress?: null, - sourceChainId?: BigNumberish | null, - destinationAddress?: string | null, - zetaValue?: null, - message?: null, - internalSendHash?: BytesLike | null - ): ZetaReceivedEventFilter; - ZetaReceived( - zetaTxSenderAddress?: null, - sourceChainId?: BigNumberish | null, - destinationAddress?: string | null, - zetaValue?: null, - message?: null, - internalSendHash?: BytesLike | null - ): ZetaReceivedEventFilter; - - "ZetaReverted(address,uint256,uint256,bytes,uint256,bytes,bytes32)"( - zetaTxSenderAddress?: null, - sourceChainId?: null, - destinationChainId?: BigNumberish | null, - destinationAddress?: null, - remainingZetaValue?: null, - message?: null, - internalSendHash?: BytesLike | null - ): ZetaRevertedEventFilter; - ZetaReverted( - zetaTxSenderAddress?: null, - sourceChainId?: null, - destinationChainId?: BigNumberish | null, - destinationAddress?: null, - remainingZetaValue?: null, - message?: null, - internalSendHash?: BytesLike | null - ): ZetaRevertedEventFilter; - - "ZetaSent(address,address,uint256,bytes,uint256,uint256,bytes,bytes)"( - sourceTxOriginAddress?: null, - zetaTxSenderAddress?: string | null, - destinationChainId?: BigNumberish | null, - destinationAddress?: null, - zetaValueAndGas?: null, - destinationGasLimit?: null, - message?: null, - zetaParams?: null - ): ZetaSentEventFilter; - ZetaSent( - sourceTxOriginAddress?: null, - zetaTxSenderAddress?: string | null, - destinationChainId?: BigNumberish | null, - destinationAddress?: null, - zetaValueAndGas?: null, - destinationGasLimit?: null, - message?: null, - zetaParams?: null - ): ZetaSentEventFilter; - }; - - estimateGas: { - getLockedAmount(overrides?: CallOverrides): Promise; - - maxSupply(overrides?: CallOverrides): Promise; - - onReceive( - zetaTxSenderAddress: BytesLike, - sourceChainId: BigNumberish, - destinationAddress: string, - zetaValue: BigNumberish, - message: BytesLike, - internalSendHash: BytesLike, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - onRevert( - zetaTxSenderAddress: string, - sourceChainId: BigNumberish, - destinationAddress: BytesLike, - destinationChainId: BigNumberish, - remainingZetaValue: BigNumberish, - message: BytesLike, - internalSendHash: BytesLike, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - pause( - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - paused(overrides?: CallOverrides): Promise; - - pauserAddress(overrides?: CallOverrides): Promise; - - renounceTssAddressUpdater( - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - send( - input: ZetaInterfaces.SendInputStruct, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - setMaxSupply( - maxSupply_: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - tssAddress(overrides?: CallOverrides): Promise; - - tssAddressUpdater(overrides?: CallOverrides): Promise; - - unpause( - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - updatePauserAddress( - pauserAddress_: string, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - updateTssAddress( - tssAddress_: string, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - zetaToken(overrides?: CallOverrides): Promise; - }; - - populateTransaction: { - getLockedAmount(overrides?: CallOverrides): Promise; - - maxSupply(overrides?: CallOverrides): Promise; - - onReceive( - zetaTxSenderAddress: BytesLike, - sourceChainId: BigNumberish, - destinationAddress: string, - zetaValue: BigNumberish, - message: BytesLike, - internalSendHash: BytesLike, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - onRevert( - zetaTxSenderAddress: string, - sourceChainId: BigNumberish, - destinationAddress: BytesLike, - destinationChainId: BigNumberish, - remainingZetaValue: BigNumberish, - message: BytesLike, - internalSendHash: BytesLike, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - pause( - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - paused(overrides?: CallOverrides): Promise; - - pauserAddress(overrides?: CallOverrides): Promise; - - renounceTssAddressUpdater( - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - send( - input: ZetaInterfaces.SendInputStruct, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - setMaxSupply( - maxSupply_: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - tssAddress(overrides?: CallOverrides): Promise; - - tssAddressUpdater(overrides?: CallOverrides): Promise; - - unpause( - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - updatePauserAddress( - pauserAddress_: string, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - updateTssAddress( - tssAddress_: string, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - zetaToken(overrides?: CallOverrides): Promise; - }; -} diff --git a/packages/interfaces/typechain-types/contracts/ZetaConnector.non-eth.sol/index.ts b/packages/interfaces/typechain-types/contracts/ZetaConnector.non-eth.sol/index.ts deleted file mode 100644 index 7932c27c..00000000 --- a/packages/interfaces/typechain-types/contracts/ZetaConnector.non-eth.sol/index.ts +++ /dev/null @@ -1,4 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ -export type { ZetaConnectorNonEth } from "./ZetaConnectorNonEth"; diff --git a/packages/interfaces/typechain-types/contracts/ZetaInteractor.ts b/packages/interfaces/typechain-types/contracts/ZetaInteractor.ts deleted file mode 100644 index e1d357a5..00000000 --- a/packages/interfaces/typechain-types/contracts/ZetaInteractor.ts +++ /dev/null @@ -1,339 +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, -} from "../common"; - -export interface ZetaInteractorInterface extends utils.Interface { - functions: { - "acceptOwnership()": FunctionFragment; - "connector()": FunctionFragment; - "interactorsByChainId(uint256)": FunctionFragment; - "owner()": FunctionFragment; - "pendingOwner()": FunctionFragment; - "renounceOwnership()": FunctionFragment; - "setInteractorByChainId(uint256,bytes)": FunctionFragment; - "transferOwnership(address)": FunctionFragment; - }; - - getFunction( - nameOrSignatureOrTopic: - | "acceptOwnership" - | "connector" - | "interactorsByChainId" - | "owner" - | "pendingOwner" - | "renounceOwnership" - | "setInteractorByChainId" - | "transferOwnership" - ): FunctionFragment; - - encodeFunctionData( - functionFragment: "acceptOwnership", - values?: undefined - ): string; - encodeFunctionData(functionFragment: "connector", values?: undefined): string; - encodeFunctionData( - functionFragment: "interactorsByChainId", - values: [BigNumberish] - ): string; - encodeFunctionData(functionFragment: "owner", values?: undefined): string; - encodeFunctionData( - functionFragment: "pendingOwner", - values?: undefined - ): string; - encodeFunctionData( - functionFragment: "renounceOwnership", - values?: undefined - ): string; - encodeFunctionData( - functionFragment: "setInteractorByChainId", - values: [BigNumberish, BytesLike] - ): string; - encodeFunctionData( - functionFragment: "transferOwnership", - values: [string] - ): string; - - decodeFunctionResult( - functionFragment: "acceptOwnership", - data: BytesLike - ): Result; - decodeFunctionResult(functionFragment: "connector", data: BytesLike): Result; - decodeFunctionResult( - functionFragment: "interactorsByChainId", - data: BytesLike - ): Result; - decodeFunctionResult(functionFragment: "owner", data: BytesLike): Result; - decodeFunctionResult( - functionFragment: "pendingOwner", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "renounceOwnership", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "setInteractorByChainId", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "transferOwnership", - data: BytesLike - ): Result; - - events: { - "OwnershipTransferStarted(address,address)": EventFragment; - "OwnershipTransferred(address,address)": EventFragment; - }; - - getEvent(nameOrSignatureOrTopic: "OwnershipTransferStarted"): EventFragment; - getEvent(nameOrSignatureOrTopic: "OwnershipTransferred"): EventFragment; -} - -export interface OwnershipTransferStartedEventObject { - previousOwner: string; - newOwner: string; -} -export type OwnershipTransferStartedEvent = TypedEvent< - [string, string], - OwnershipTransferStartedEventObject ->; - -export type OwnershipTransferStartedEventFilter = - TypedEventFilter; - -export interface OwnershipTransferredEventObject { - previousOwner: string; - newOwner: string; -} -export type OwnershipTransferredEvent = TypedEvent< - [string, string], - OwnershipTransferredEventObject ->; - -export type OwnershipTransferredEventFilter = - TypedEventFilter; - -export interface ZetaInteractor extends BaseContract { - connect(signerOrProvider: Signer | Provider | string): this; - attach(addressOrName: string): this; - deployed(): Promise; - - interface: ZetaInteractorInterface; - - 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: { - acceptOwnership( - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - connector(overrides?: CallOverrides): Promise<[string]>; - - interactorsByChainId( - arg0: BigNumberish, - overrides?: CallOverrides - ): Promise<[string]>; - - owner(overrides?: CallOverrides): Promise<[string]>; - - pendingOwner(overrides?: CallOverrides): Promise<[string]>; - - renounceOwnership( - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - setInteractorByChainId( - destinationChainId: BigNumberish, - contractAddress: BytesLike, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - transferOwnership( - newOwner: string, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - }; - - acceptOwnership( - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - connector(overrides?: CallOverrides): Promise; - - interactorsByChainId( - arg0: BigNumberish, - overrides?: CallOverrides - ): Promise; - - owner(overrides?: CallOverrides): Promise; - - pendingOwner(overrides?: CallOverrides): Promise; - - renounceOwnership( - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - setInteractorByChainId( - destinationChainId: BigNumberish, - contractAddress: BytesLike, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - transferOwnership( - newOwner: string, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - callStatic: { - acceptOwnership(overrides?: CallOverrides): Promise; - - connector(overrides?: CallOverrides): Promise; - - interactorsByChainId( - arg0: BigNumberish, - overrides?: CallOverrides - ): Promise; - - owner(overrides?: CallOverrides): Promise; - - pendingOwner(overrides?: CallOverrides): Promise; - - renounceOwnership(overrides?: CallOverrides): Promise; - - setInteractorByChainId( - destinationChainId: BigNumberish, - contractAddress: BytesLike, - overrides?: CallOverrides - ): Promise; - - transferOwnership( - newOwner: string, - overrides?: CallOverrides - ): Promise; - }; - - filters: { - "OwnershipTransferStarted(address,address)"( - previousOwner?: string | null, - newOwner?: string | null - ): OwnershipTransferStartedEventFilter; - OwnershipTransferStarted( - previousOwner?: string | null, - newOwner?: string | null - ): OwnershipTransferStartedEventFilter; - - "OwnershipTransferred(address,address)"( - previousOwner?: string | null, - newOwner?: string | null - ): OwnershipTransferredEventFilter; - OwnershipTransferred( - previousOwner?: string | null, - newOwner?: string | null - ): OwnershipTransferredEventFilter; - }; - - estimateGas: { - acceptOwnership( - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - connector(overrides?: CallOverrides): Promise; - - interactorsByChainId( - arg0: BigNumberish, - overrides?: CallOverrides - ): Promise; - - owner(overrides?: CallOverrides): Promise; - - pendingOwner(overrides?: CallOverrides): Promise; - - renounceOwnership( - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - setInteractorByChainId( - destinationChainId: BigNumberish, - contractAddress: BytesLike, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - transferOwnership( - newOwner: string, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - }; - - populateTransaction: { - acceptOwnership( - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - connector(overrides?: CallOverrides): Promise; - - interactorsByChainId( - arg0: BigNumberish, - overrides?: CallOverrides - ): Promise; - - owner(overrides?: CallOverrides): Promise; - - pendingOwner(overrides?: CallOverrides): Promise; - - renounceOwnership( - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - setInteractorByChainId( - destinationChainId: BigNumberish, - contractAddress: BytesLike, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - transferOwnership( - newOwner: string, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - }; -} diff --git a/packages/interfaces/typechain-types/contracts/ZetaTokenConsumerTrident.strategy.sol/WETH9.ts b/packages/interfaces/typechain-types/contracts/ZetaTokenConsumerTrident.strategy.sol/WETH9.ts deleted file mode 100644 index 12ffd5b2..00000000 --- a/packages/interfaces/typechain-types/contracts/ZetaTokenConsumerTrident.strategy.sol/WETH9.ts +++ /dev/null @@ -1,184 +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 } from "@ethersproject/abi"; -import type { Listener, Provider } from "@ethersproject/providers"; -import type { - TypedEventFilter, - TypedEvent, - TypedListener, - OnEvent, -} from "../../common"; - -export interface WETH9Interface extends utils.Interface { - functions: { - "deposit()": FunctionFragment; - "depositTo(address)": FunctionFragment; - "withdraw(uint256)": FunctionFragment; - "withdrawTo(address,uint256)": FunctionFragment; - }; - - getFunction( - nameOrSignatureOrTopic: "deposit" | "depositTo" | "withdraw" | "withdrawTo" - ): FunctionFragment; - - encodeFunctionData(functionFragment: "deposit", values?: undefined): string; - encodeFunctionData(functionFragment: "depositTo", values: [string]): string; - encodeFunctionData( - functionFragment: "withdraw", - values: [BigNumberish] - ): string; - encodeFunctionData( - functionFragment: "withdrawTo", - values: [string, BigNumberish] - ): string; - - decodeFunctionResult(functionFragment: "deposit", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "depositTo", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "withdraw", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "withdrawTo", data: BytesLike): Result; - - events: {}; -} - -export interface WETH9 extends BaseContract { - connect(signerOrProvider: Signer | Provider | string): this; - attach(addressOrName: string): this; - deployed(): Promise; - - interface: WETH9Interface; - - 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: { - deposit( - overrides?: PayableOverrides & { from?: string | Promise } - ): Promise; - - depositTo( - to: string, - overrides?: PayableOverrides & { from?: string | Promise } - ): Promise; - - withdraw( - wad: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - withdrawTo( - to: string, - value: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - }; - - deposit( - overrides?: PayableOverrides & { from?: string | Promise } - ): Promise; - - depositTo( - to: string, - overrides?: PayableOverrides & { from?: string | Promise } - ): Promise; - - withdraw( - wad: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - withdrawTo( - to: string, - value: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - callStatic: { - deposit(overrides?: CallOverrides): Promise; - - depositTo(to: string, overrides?: CallOverrides): Promise; - - withdraw(wad: BigNumberish, overrides?: CallOverrides): Promise; - - withdrawTo( - to: string, - value: BigNumberish, - overrides?: CallOverrides - ): Promise; - }; - - filters: {}; - - estimateGas: { - deposit( - overrides?: PayableOverrides & { from?: string | Promise } - ): Promise; - - depositTo( - to: string, - overrides?: PayableOverrides & { from?: string | Promise } - ): Promise; - - withdraw( - wad: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - withdrawTo( - to: string, - value: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - }; - - populateTransaction: { - deposit( - overrides?: PayableOverrides & { from?: string | Promise } - ): Promise; - - depositTo( - to: string, - overrides?: PayableOverrides & { from?: string | Promise } - ): Promise; - - withdraw( - wad: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - withdrawTo( - to: string, - value: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - }; -} diff --git a/packages/interfaces/typechain-types/contracts/ZetaTokenConsumerTrident.strategy.sol/ZetaTokenConsumerTrident.ts b/packages/interfaces/typechain-types/contracts/ZetaTokenConsumerTrident.strategy.sol/ZetaTokenConsumerTrident.ts deleted file mode 100644 index a41c92ce..00000000 --- a/packages/interfaces/typechain-types/contracts/ZetaTokenConsumerTrident.strategy.sol/ZetaTokenConsumerTrident.ts +++ /dev/null @@ -1,417 +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, -} from "../../common"; - -export interface ZetaTokenConsumerTridentInterface extends utils.Interface { - functions: { - "getEthFromZeta(address,uint256,uint256)": FunctionFragment; - "getTokenFromZeta(address,uint256,address,uint256)": FunctionFragment; - "getZetaFromEth(address,uint256)": FunctionFragment; - "getZetaFromToken(address,uint256,address,uint256)": FunctionFragment; - "poolFactory()": FunctionFragment; - "tridentRouter()": FunctionFragment; - "zetaToken()": FunctionFragment; - }; - - getFunction( - nameOrSignatureOrTopic: - | "getEthFromZeta" - | "getTokenFromZeta" - | "getZetaFromEth" - | "getZetaFromToken" - | "poolFactory" - | "tridentRouter" - | "zetaToken" - ): FunctionFragment; - - encodeFunctionData( - functionFragment: "getEthFromZeta", - values: [string, BigNumberish, BigNumberish] - ): string; - encodeFunctionData( - functionFragment: "getTokenFromZeta", - values: [string, BigNumberish, string, BigNumberish] - ): string; - encodeFunctionData( - functionFragment: "getZetaFromEth", - values: [string, BigNumberish] - ): string; - encodeFunctionData( - functionFragment: "getZetaFromToken", - values: [string, BigNumberish, string, BigNumberish] - ): string; - encodeFunctionData( - functionFragment: "poolFactory", - values?: undefined - ): string; - encodeFunctionData( - functionFragment: "tridentRouter", - values?: undefined - ): string; - encodeFunctionData(functionFragment: "zetaToken", values?: undefined): string; - - decodeFunctionResult( - functionFragment: "getEthFromZeta", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "getTokenFromZeta", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "getZetaFromEth", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "getZetaFromToken", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "poolFactory", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "tridentRouter", - data: BytesLike - ): Result; - decodeFunctionResult(functionFragment: "zetaToken", data: BytesLike): Result; - - events: { - "EthExchangedForZeta(uint256,uint256)": EventFragment; - "TokenExchangedForZeta(address,uint256,uint256)": EventFragment; - "ZetaExchangedForEth(uint256,uint256)": EventFragment; - "ZetaExchangedForToken(address,uint256,uint256)": EventFragment; - }; - - getEvent(nameOrSignatureOrTopic: "EthExchangedForZeta"): EventFragment; - getEvent(nameOrSignatureOrTopic: "TokenExchangedForZeta"): EventFragment; - getEvent(nameOrSignatureOrTopic: "ZetaExchangedForEth"): EventFragment; - getEvent(nameOrSignatureOrTopic: "ZetaExchangedForToken"): EventFragment; -} - -export interface EthExchangedForZetaEventObject { - amountIn: BigNumber; - amountOut: BigNumber; -} -export type EthExchangedForZetaEvent = TypedEvent< - [BigNumber, BigNumber], - EthExchangedForZetaEventObject ->; - -export type EthExchangedForZetaEventFilter = - TypedEventFilter; - -export interface TokenExchangedForZetaEventObject { - token: string; - amountIn: BigNumber; - amountOut: BigNumber; -} -export type TokenExchangedForZetaEvent = TypedEvent< - [string, BigNumber, BigNumber], - TokenExchangedForZetaEventObject ->; - -export type TokenExchangedForZetaEventFilter = - TypedEventFilter; - -export interface ZetaExchangedForEthEventObject { - amountIn: BigNumber; - amountOut: BigNumber; -} -export type ZetaExchangedForEthEvent = TypedEvent< - [BigNumber, BigNumber], - ZetaExchangedForEthEventObject ->; - -export type ZetaExchangedForEthEventFilter = - TypedEventFilter; - -export interface ZetaExchangedForTokenEventObject { - token: string; - amountIn: BigNumber; - amountOut: BigNumber; -} -export type ZetaExchangedForTokenEvent = TypedEvent< - [string, BigNumber, BigNumber], - ZetaExchangedForTokenEventObject ->; - -export type ZetaExchangedForTokenEventFilter = - TypedEventFilter; - -export interface ZetaTokenConsumerTrident extends BaseContract { - connect(signerOrProvider: Signer | Provider | string): this; - attach(addressOrName: string): this; - deployed(): Promise; - - interface: ZetaTokenConsumerTridentInterface; - - 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: { - getEthFromZeta( - destinationAddress: string, - minAmountOut: BigNumberish, - zetaTokenAmount: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - getTokenFromZeta( - destinationAddress: string, - minAmountOut: BigNumberish, - outputToken: string, - zetaTokenAmount: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - getZetaFromEth( - destinationAddress: string, - minAmountOut: BigNumberish, - overrides?: PayableOverrides & { from?: string | Promise } - ): Promise; - - getZetaFromToken( - destinationAddress: string, - minAmountOut: BigNumberish, - inputToken: string, - inputTokenAmount: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - poolFactory(overrides?: CallOverrides): Promise<[string]>; - - tridentRouter(overrides?: CallOverrides): Promise<[string]>; - - zetaToken(overrides?: CallOverrides): Promise<[string]>; - }; - - getEthFromZeta( - destinationAddress: string, - minAmountOut: BigNumberish, - zetaTokenAmount: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - getTokenFromZeta( - destinationAddress: string, - minAmountOut: BigNumberish, - outputToken: string, - zetaTokenAmount: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - getZetaFromEth( - destinationAddress: string, - minAmountOut: BigNumberish, - overrides?: PayableOverrides & { from?: string | Promise } - ): Promise; - - getZetaFromToken( - destinationAddress: string, - minAmountOut: BigNumberish, - inputToken: string, - inputTokenAmount: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - poolFactory(overrides?: CallOverrides): Promise; - - tridentRouter(overrides?: CallOverrides): Promise; - - zetaToken(overrides?: CallOverrides): Promise; - - callStatic: { - getEthFromZeta( - destinationAddress: string, - minAmountOut: BigNumberish, - zetaTokenAmount: BigNumberish, - overrides?: CallOverrides - ): Promise; - - getTokenFromZeta( - destinationAddress: string, - minAmountOut: BigNumberish, - outputToken: string, - zetaTokenAmount: BigNumberish, - overrides?: CallOverrides - ): Promise; - - getZetaFromEth( - destinationAddress: string, - minAmountOut: BigNumberish, - overrides?: CallOverrides - ): Promise; - - getZetaFromToken( - destinationAddress: string, - minAmountOut: BigNumberish, - inputToken: string, - inputTokenAmount: BigNumberish, - overrides?: CallOverrides - ): Promise; - - poolFactory(overrides?: CallOverrides): Promise; - - tridentRouter(overrides?: CallOverrides): Promise; - - zetaToken(overrides?: CallOverrides): Promise; - }; - - filters: { - "EthExchangedForZeta(uint256,uint256)"( - amountIn?: null, - amountOut?: null - ): EthExchangedForZetaEventFilter; - EthExchangedForZeta( - amountIn?: null, - amountOut?: null - ): EthExchangedForZetaEventFilter; - - "TokenExchangedForZeta(address,uint256,uint256)"( - token?: null, - amountIn?: null, - amountOut?: null - ): TokenExchangedForZetaEventFilter; - TokenExchangedForZeta( - token?: null, - amountIn?: null, - amountOut?: null - ): TokenExchangedForZetaEventFilter; - - "ZetaExchangedForEth(uint256,uint256)"( - amountIn?: null, - amountOut?: null - ): ZetaExchangedForEthEventFilter; - ZetaExchangedForEth( - amountIn?: null, - amountOut?: null - ): ZetaExchangedForEthEventFilter; - - "ZetaExchangedForToken(address,uint256,uint256)"( - token?: null, - amountIn?: null, - amountOut?: null - ): ZetaExchangedForTokenEventFilter; - ZetaExchangedForToken( - token?: null, - amountIn?: null, - amountOut?: null - ): ZetaExchangedForTokenEventFilter; - }; - - estimateGas: { - getEthFromZeta( - destinationAddress: string, - minAmountOut: BigNumberish, - zetaTokenAmount: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - getTokenFromZeta( - destinationAddress: string, - minAmountOut: BigNumberish, - outputToken: string, - zetaTokenAmount: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - getZetaFromEth( - destinationAddress: string, - minAmountOut: BigNumberish, - overrides?: PayableOverrides & { from?: string | Promise } - ): Promise; - - getZetaFromToken( - destinationAddress: string, - minAmountOut: BigNumberish, - inputToken: string, - inputTokenAmount: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - poolFactory(overrides?: CallOverrides): Promise; - - tridentRouter(overrides?: CallOverrides): Promise; - - zetaToken(overrides?: CallOverrides): Promise; - }; - - populateTransaction: { - getEthFromZeta( - destinationAddress: string, - minAmountOut: BigNumberish, - zetaTokenAmount: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - getTokenFromZeta( - destinationAddress: string, - minAmountOut: BigNumberish, - outputToken: string, - zetaTokenAmount: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - getZetaFromEth( - destinationAddress: string, - minAmountOut: BigNumberish, - overrides?: PayableOverrides & { from?: string | Promise } - ): Promise; - - getZetaFromToken( - destinationAddress: string, - minAmountOut: BigNumberish, - inputToken: string, - inputTokenAmount: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - poolFactory(overrides?: CallOverrides): Promise; - - tridentRouter(overrides?: CallOverrides): Promise; - - zetaToken(overrides?: CallOverrides): Promise; - }; -} diff --git a/packages/interfaces/typechain-types/contracts/ZetaTokenConsumerTrident.strategy.sol/ZetaTokenConsumerTridentErrors.ts b/packages/interfaces/typechain-types/contracts/ZetaTokenConsumerTrident.strategy.sol/ZetaTokenConsumerTridentErrors.ts deleted file mode 100644 index 49ad3234..00000000 --- a/packages/interfaces/typechain-types/contracts/ZetaTokenConsumerTrident.strategy.sol/ZetaTokenConsumerTridentErrors.ts +++ /dev/null @@ -1,56 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ -import type { BaseContract, Signer, utils } from "ethers"; - -import type { Listener, Provider } from "@ethersproject/providers"; -import type { - TypedEventFilter, - TypedEvent, - TypedListener, - OnEvent, -} from "../../common"; - -export interface ZetaTokenConsumerTridentErrorsInterface - extends utils.Interface { - functions: {}; - - events: {}; -} - -export interface ZetaTokenConsumerTridentErrors extends BaseContract { - connect(signerOrProvider: Signer | Provider | string): this; - attach(addressOrName: string): this; - deployed(): Promise; - - interface: ZetaTokenConsumerTridentErrorsInterface; - - 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: {}; - - callStatic: {}; - - filters: {}; - - estimateGas: {}; - - populateTransaction: {}; -} diff --git a/packages/interfaces/typechain-types/contracts/ZetaTokenConsumerTrident.strategy.sol/index.ts b/packages/interfaces/typechain-types/contracts/ZetaTokenConsumerTrident.strategy.sol/index.ts deleted file mode 100644 index 8b60d4c3..00000000 --- a/packages/interfaces/typechain-types/contracts/ZetaTokenConsumerTrident.strategy.sol/index.ts +++ /dev/null @@ -1,6 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ -export type { WETH9 } from "./WETH9"; -export type { ZetaTokenConsumerTrident } from "./ZetaTokenConsumerTrident"; -export type { ZetaTokenConsumerTridentErrors } from "./ZetaTokenConsumerTridentErrors"; diff --git a/packages/interfaces/typechain-types/contracts/ZetaTokenConsumerUniV2.strategy.sol/ZetaTokenConsumerUniV2.ts b/packages/interfaces/typechain-types/contracts/ZetaTokenConsumerUniV2.strategy.sol/ZetaTokenConsumerUniV2.ts deleted file mode 100644 index 13e5c7d3..00000000 --- a/packages/interfaces/typechain-types/contracts/ZetaTokenConsumerUniV2.strategy.sol/ZetaTokenConsumerUniV2.ts +++ /dev/null @@ -1,377 +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, -} from "../../common"; - -export interface ZetaTokenConsumerUniV2Interface extends utils.Interface { - functions: { - "getEthFromZeta(address,uint256,uint256)": FunctionFragment; - "getTokenFromZeta(address,uint256,address,uint256)": FunctionFragment; - "getZetaFromEth(address,uint256)": FunctionFragment; - "getZetaFromToken(address,uint256,address,uint256)": FunctionFragment; - "zetaToken()": FunctionFragment; - }; - - getFunction( - nameOrSignatureOrTopic: - | "getEthFromZeta" - | "getTokenFromZeta" - | "getZetaFromEth" - | "getZetaFromToken" - | "zetaToken" - ): FunctionFragment; - - encodeFunctionData( - functionFragment: "getEthFromZeta", - values: [string, BigNumberish, BigNumberish] - ): string; - encodeFunctionData( - functionFragment: "getTokenFromZeta", - values: [string, BigNumberish, string, BigNumberish] - ): string; - encodeFunctionData( - functionFragment: "getZetaFromEth", - values: [string, BigNumberish] - ): string; - encodeFunctionData( - functionFragment: "getZetaFromToken", - values: [string, BigNumberish, string, BigNumberish] - ): string; - encodeFunctionData(functionFragment: "zetaToken", values?: undefined): string; - - decodeFunctionResult( - functionFragment: "getEthFromZeta", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "getTokenFromZeta", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "getZetaFromEth", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "getZetaFromToken", - data: BytesLike - ): Result; - decodeFunctionResult(functionFragment: "zetaToken", data: BytesLike): Result; - - events: { - "EthExchangedForZeta(uint256,uint256)": EventFragment; - "TokenExchangedForZeta(address,uint256,uint256)": EventFragment; - "ZetaExchangedForEth(uint256,uint256)": EventFragment; - "ZetaExchangedForToken(address,uint256,uint256)": EventFragment; - }; - - getEvent(nameOrSignatureOrTopic: "EthExchangedForZeta"): EventFragment; - getEvent(nameOrSignatureOrTopic: "TokenExchangedForZeta"): EventFragment; - getEvent(nameOrSignatureOrTopic: "ZetaExchangedForEth"): EventFragment; - getEvent(nameOrSignatureOrTopic: "ZetaExchangedForToken"): EventFragment; -} - -export interface EthExchangedForZetaEventObject { - amountIn: BigNumber; - amountOut: BigNumber; -} -export type EthExchangedForZetaEvent = TypedEvent< - [BigNumber, BigNumber], - EthExchangedForZetaEventObject ->; - -export type EthExchangedForZetaEventFilter = - TypedEventFilter; - -export interface TokenExchangedForZetaEventObject { - token: string; - amountIn: BigNumber; - amountOut: BigNumber; -} -export type TokenExchangedForZetaEvent = TypedEvent< - [string, BigNumber, BigNumber], - TokenExchangedForZetaEventObject ->; - -export type TokenExchangedForZetaEventFilter = - TypedEventFilter; - -export interface ZetaExchangedForEthEventObject { - amountIn: BigNumber; - amountOut: BigNumber; -} -export type ZetaExchangedForEthEvent = TypedEvent< - [BigNumber, BigNumber], - ZetaExchangedForEthEventObject ->; - -export type ZetaExchangedForEthEventFilter = - TypedEventFilter; - -export interface ZetaExchangedForTokenEventObject { - token: string; - amountIn: BigNumber; - amountOut: BigNumber; -} -export type ZetaExchangedForTokenEvent = TypedEvent< - [string, BigNumber, BigNumber], - ZetaExchangedForTokenEventObject ->; - -export type ZetaExchangedForTokenEventFilter = - TypedEventFilter; - -export interface ZetaTokenConsumerUniV2 extends BaseContract { - connect(signerOrProvider: Signer | Provider | string): this; - attach(addressOrName: string): this; - deployed(): Promise; - - interface: ZetaTokenConsumerUniV2Interface; - - 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: { - getEthFromZeta( - destinationAddress: string, - minAmountOut: BigNumberish, - zetaTokenAmount: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - getTokenFromZeta( - destinationAddress: string, - minAmountOut: BigNumberish, - outputToken: string, - zetaTokenAmount: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - getZetaFromEth( - destinationAddress: string, - minAmountOut: BigNumberish, - overrides?: PayableOverrides & { from?: string | Promise } - ): Promise; - - getZetaFromToken( - destinationAddress: string, - minAmountOut: BigNumberish, - inputToken: string, - inputTokenAmount: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - zetaToken(overrides?: CallOverrides): Promise<[string]>; - }; - - getEthFromZeta( - destinationAddress: string, - minAmountOut: BigNumberish, - zetaTokenAmount: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - getTokenFromZeta( - destinationAddress: string, - minAmountOut: BigNumberish, - outputToken: string, - zetaTokenAmount: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - getZetaFromEth( - destinationAddress: string, - minAmountOut: BigNumberish, - overrides?: PayableOverrides & { from?: string | Promise } - ): Promise; - - getZetaFromToken( - destinationAddress: string, - minAmountOut: BigNumberish, - inputToken: string, - inputTokenAmount: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - zetaToken(overrides?: CallOverrides): Promise; - - callStatic: { - getEthFromZeta( - destinationAddress: string, - minAmountOut: BigNumberish, - zetaTokenAmount: BigNumberish, - overrides?: CallOverrides - ): Promise; - - getTokenFromZeta( - destinationAddress: string, - minAmountOut: BigNumberish, - outputToken: string, - zetaTokenAmount: BigNumberish, - overrides?: CallOverrides - ): Promise; - - getZetaFromEth( - destinationAddress: string, - minAmountOut: BigNumberish, - overrides?: CallOverrides - ): Promise; - - getZetaFromToken( - destinationAddress: string, - minAmountOut: BigNumberish, - inputToken: string, - inputTokenAmount: BigNumberish, - overrides?: CallOverrides - ): Promise; - - zetaToken(overrides?: CallOverrides): Promise; - }; - - filters: { - "EthExchangedForZeta(uint256,uint256)"( - amountIn?: null, - amountOut?: null - ): EthExchangedForZetaEventFilter; - EthExchangedForZeta( - amountIn?: null, - amountOut?: null - ): EthExchangedForZetaEventFilter; - - "TokenExchangedForZeta(address,uint256,uint256)"( - token?: null, - amountIn?: null, - amountOut?: null - ): TokenExchangedForZetaEventFilter; - TokenExchangedForZeta( - token?: null, - amountIn?: null, - amountOut?: null - ): TokenExchangedForZetaEventFilter; - - "ZetaExchangedForEth(uint256,uint256)"( - amountIn?: null, - amountOut?: null - ): ZetaExchangedForEthEventFilter; - ZetaExchangedForEth( - amountIn?: null, - amountOut?: null - ): ZetaExchangedForEthEventFilter; - - "ZetaExchangedForToken(address,uint256,uint256)"( - token?: null, - amountIn?: null, - amountOut?: null - ): ZetaExchangedForTokenEventFilter; - ZetaExchangedForToken( - token?: null, - amountIn?: null, - amountOut?: null - ): ZetaExchangedForTokenEventFilter; - }; - - estimateGas: { - getEthFromZeta( - destinationAddress: string, - minAmountOut: BigNumberish, - zetaTokenAmount: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - getTokenFromZeta( - destinationAddress: string, - minAmountOut: BigNumberish, - outputToken: string, - zetaTokenAmount: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - getZetaFromEth( - destinationAddress: string, - minAmountOut: BigNumberish, - overrides?: PayableOverrides & { from?: string | Promise } - ): Promise; - - getZetaFromToken( - destinationAddress: string, - minAmountOut: BigNumberish, - inputToken: string, - inputTokenAmount: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - zetaToken(overrides?: CallOverrides): Promise; - }; - - populateTransaction: { - getEthFromZeta( - destinationAddress: string, - minAmountOut: BigNumberish, - zetaTokenAmount: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - getTokenFromZeta( - destinationAddress: string, - minAmountOut: BigNumberish, - outputToken: string, - zetaTokenAmount: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - getZetaFromEth( - destinationAddress: string, - minAmountOut: BigNumberish, - overrides?: PayableOverrides & { from?: string | Promise } - ): Promise; - - getZetaFromToken( - destinationAddress: string, - minAmountOut: BigNumberish, - inputToken: string, - inputTokenAmount: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - zetaToken(overrides?: CallOverrides): Promise; - }; -} diff --git a/packages/interfaces/typechain-types/contracts/ZetaTokenConsumerUniV2.strategy.sol/ZetaTokenConsumerUniV2Errors.ts b/packages/interfaces/typechain-types/contracts/ZetaTokenConsumerUniV2.strategy.sol/ZetaTokenConsumerUniV2Errors.ts deleted file mode 100644 index 8ea365ea..00000000 --- a/packages/interfaces/typechain-types/contracts/ZetaTokenConsumerUniV2.strategy.sol/ZetaTokenConsumerUniV2Errors.ts +++ /dev/null @@ -1,55 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ -import type { BaseContract, Signer, utils } from "ethers"; - -import type { Listener, Provider } from "@ethersproject/providers"; -import type { - TypedEventFilter, - TypedEvent, - TypedListener, - OnEvent, -} from "../../common"; - -export interface ZetaTokenConsumerUniV2ErrorsInterface extends utils.Interface { - functions: {}; - - events: {}; -} - -export interface ZetaTokenConsumerUniV2Errors extends BaseContract { - connect(signerOrProvider: Signer | Provider | string): this; - attach(addressOrName: string): this; - deployed(): Promise; - - interface: ZetaTokenConsumerUniV2ErrorsInterface; - - 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: {}; - - callStatic: {}; - - filters: {}; - - estimateGas: {}; - - populateTransaction: {}; -} diff --git a/packages/interfaces/typechain-types/contracts/ZetaTokenConsumerUniV2.strategy.sol/index.ts b/packages/interfaces/typechain-types/contracts/ZetaTokenConsumerUniV2.strategy.sol/index.ts deleted file mode 100644 index 8e2b13b0..00000000 --- a/packages/interfaces/typechain-types/contracts/ZetaTokenConsumerUniV2.strategy.sol/index.ts +++ /dev/null @@ -1,5 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ -export type { ZetaTokenConsumerUniV2 } from "./ZetaTokenConsumerUniV2"; -export type { ZetaTokenConsumerUniV2Errors } from "./ZetaTokenConsumerUniV2Errors"; diff --git a/packages/interfaces/typechain-types/contracts/ZetaTokenConsumerUniV3.strategy.sol/WETH9.ts b/packages/interfaces/typechain-types/contracts/ZetaTokenConsumerUniV3.strategy.sol/WETH9.ts deleted file mode 100644 index 566cde13..00000000 --- a/packages/interfaces/typechain-types/contracts/ZetaTokenConsumerUniV3.strategy.sol/WETH9.ts +++ /dev/null @@ -1,99 +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, -} from "../../common"; - -export interface WETH9Interface extends utils.Interface { - functions: { - "withdraw(uint256)": FunctionFragment; - }; - - getFunction(nameOrSignatureOrTopic: "withdraw"): FunctionFragment; - - encodeFunctionData( - functionFragment: "withdraw", - values: [BigNumberish] - ): string; - - decodeFunctionResult(functionFragment: "withdraw", data: BytesLike): Result; - - events: {}; -} - -export interface WETH9 extends BaseContract { - connect(signerOrProvider: Signer | Provider | string): this; - attach(addressOrName: string): this; - deployed(): Promise; - - interface: WETH9Interface; - - 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: { - withdraw( - wad: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - }; - - withdraw( - wad: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - callStatic: { - withdraw(wad: BigNumberish, overrides?: CallOverrides): Promise; - }; - - filters: {}; - - estimateGas: { - withdraw( - wad: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - }; - - populateTransaction: { - withdraw( - wad: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - }; -} diff --git a/packages/interfaces/typechain-types/contracts/ZetaTokenConsumerUniV3.strategy.sol/ZetaTokenConsumerUniV3.ts b/packages/interfaces/typechain-types/contracts/ZetaTokenConsumerUniV3.strategy.sol/ZetaTokenConsumerUniV3.ts deleted file mode 100644 index de49351e..00000000 --- a/packages/interfaces/typechain-types/contracts/ZetaTokenConsumerUniV3.strategy.sol/ZetaTokenConsumerUniV3.ts +++ /dev/null @@ -1,451 +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, -} from "../../common"; - -export interface ZetaTokenConsumerUniV3Interface extends utils.Interface { - functions: { - "getEthFromZeta(address,uint256,uint256)": FunctionFragment; - "getTokenFromZeta(address,uint256,address,uint256)": FunctionFragment; - "getZetaFromEth(address,uint256)": FunctionFragment; - "getZetaFromToken(address,uint256,address,uint256)": FunctionFragment; - "quoter()": FunctionFragment; - "tokenPoolFee()": FunctionFragment; - "uniswapV3Router()": FunctionFragment; - "zetaPoolFee()": FunctionFragment; - "zetaToken()": FunctionFragment; - }; - - getFunction( - nameOrSignatureOrTopic: - | "getEthFromZeta" - | "getTokenFromZeta" - | "getZetaFromEth" - | "getZetaFromToken" - | "quoter" - | "tokenPoolFee" - | "uniswapV3Router" - | "zetaPoolFee" - | "zetaToken" - ): FunctionFragment; - - encodeFunctionData( - functionFragment: "getEthFromZeta", - values: [string, BigNumberish, BigNumberish] - ): string; - encodeFunctionData( - functionFragment: "getTokenFromZeta", - values: [string, BigNumberish, string, BigNumberish] - ): string; - encodeFunctionData( - functionFragment: "getZetaFromEth", - values: [string, BigNumberish] - ): string; - encodeFunctionData( - functionFragment: "getZetaFromToken", - values: [string, BigNumberish, string, BigNumberish] - ): string; - encodeFunctionData(functionFragment: "quoter", values?: undefined): string; - encodeFunctionData( - functionFragment: "tokenPoolFee", - values?: undefined - ): string; - encodeFunctionData( - functionFragment: "uniswapV3Router", - values?: undefined - ): string; - encodeFunctionData( - functionFragment: "zetaPoolFee", - values?: undefined - ): string; - encodeFunctionData(functionFragment: "zetaToken", values?: undefined): string; - - decodeFunctionResult( - functionFragment: "getEthFromZeta", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "getTokenFromZeta", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "getZetaFromEth", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "getZetaFromToken", - data: BytesLike - ): Result; - decodeFunctionResult(functionFragment: "quoter", data: BytesLike): Result; - decodeFunctionResult( - functionFragment: "tokenPoolFee", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "uniswapV3Router", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "zetaPoolFee", - data: BytesLike - ): Result; - decodeFunctionResult(functionFragment: "zetaToken", data: BytesLike): Result; - - events: { - "EthExchangedForZeta(uint256,uint256)": EventFragment; - "TokenExchangedForZeta(address,uint256,uint256)": EventFragment; - "ZetaExchangedForEth(uint256,uint256)": EventFragment; - "ZetaExchangedForToken(address,uint256,uint256)": EventFragment; - }; - - getEvent(nameOrSignatureOrTopic: "EthExchangedForZeta"): EventFragment; - getEvent(nameOrSignatureOrTopic: "TokenExchangedForZeta"): EventFragment; - getEvent(nameOrSignatureOrTopic: "ZetaExchangedForEth"): EventFragment; - getEvent(nameOrSignatureOrTopic: "ZetaExchangedForToken"): EventFragment; -} - -export interface EthExchangedForZetaEventObject { - amountIn: BigNumber; - amountOut: BigNumber; -} -export type EthExchangedForZetaEvent = TypedEvent< - [BigNumber, BigNumber], - EthExchangedForZetaEventObject ->; - -export type EthExchangedForZetaEventFilter = - TypedEventFilter; - -export interface TokenExchangedForZetaEventObject { - token: string; - amountIn: BigNumber; - amountOut: BigNumber; -} -export type TokenExchangedForZetaEvent = TypedEvent< - [string, BigNumber, BigNumber], - TokenExchangedForZetaEventObject ->; - -export type TokenExchangedForZetaEventFilter = - TypedEventFilter; - -export interface ZetaExchangedForEthEventObject { - amountIn: BigNumber; - amountOut: BigNumber; -} -export type ZetaExchangedForEthEvent = TypedEvent< - [BigNumber, BigNumber], - ZetaExchangedForEthEventObject ->; - -export type ZetaExchangedForEthEventFilter = - TypedEventFilter; - -export interface ZetaExchangedForTokenEventObject { - token: string; - amountIn: BigNumber; - amountOut: BigNumber; -} -export type ZetaExchangedForTokenEvent = TypedEvent< - [string, BigNumber, BigNumber], - ZetaExchangedForTokenEventObject ->; - -export type ZetaExchangedForTokenEventFilter = - TypedEventFilter; - -export interface ZetaTokenConsumerUniV3 extends BaseContract { - connect(signerOrProvider: Signer | Provider | string): this; - attach(addressOrName: string): this; - deployed(): Promise; - - interface: ZetaTokenConsumerUniV3Interface; - - 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: { - getEthFromZeta( - destinationAddress: string, - minAmountOut: BigNumberish, - zetaTokenAmount: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - getTokenFromZeta( - destinationAddress: string, - minAmountOut: BigNumberish, - outputToken: string, - zetaTokenAmount: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - getZetaFromEth( - destinationAddress: string, - minAmountOut: BigNumberish, - overrides?: PayableOverrides & { from?: string | Promise } - ): Promise; - - getZetaFromToken( - destinationAddress: string, - minAmountOut: BigNumberish, - inputToken: string, - inputTokenAmount: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - quoter(overrides?: CallOverrides): Promise<[string]>; - - tokenPoolFee(overrides?: CallOverrides): Promise<[number]>; - - uniswapV3Router(overrides?: CallOverrides): Promise<[string]>; - - zetaPoolFee(overrides?: CallOverrides): Promise<[number]>; - - zetaToken(overrides?: CallOverrides): Promise<[string]>; - }; - - getEthFromZeta( - destinationAddress: string, - minAmountOut: BigNumberish, - zetaTokenAmount: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - getTokenFromZeta( - destinationAddress: string, - minAmountOut: BigNumberish, - outputToken: string, - zetaTokenAmount: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - getZetaFromEth( - destinationAddress: string, - minAmountOut: BigNumberish, - overrides?: PayableOverrides & { from?: string | Promise } - ): Promise; - - getZetaFromToken( - destinationAddress: string, - minAmountOut: BigNumberish, - inputToken: string, - inputTokenAmount: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - quoter(overrides?: CallOverrides): Promise; - - tokenPoolFee(overrides?: CallOverrides): Promise; - - uniswapV3Router(overrides?: CallOverrides): Promise; - - zetaPoolFee(overrides?: CallOverrides): Promise; - - zetaToken(overrides?: CallOverrides): Promise; - - callStatic: { - getEthFromZeta( - destinationAddress: string, - minAmountOut: BigNumberish, - zetaTokenAmount: BigNumberish, - overrides?: CallOverrides - ): Promise; - - getTokenFromZeta( - destinationAddress: string, - minAmountOut: BigNumberish, - outputToken: string, - zetaTokenAmount: BigNumberish, - overrides?: CallOverrides - ): Promise; - - getZetaFromEth( - destinationAddress: string, - minAmountOut: BigNumberish, - overrides?: CallOverrides - ): Promise; - - getZetaFromToken( - destinationAddress: string, - minAmountOut: BigNumberish, - inputToken: string, - inputTokenAmount: BigNumberish, - overrides?: CallOverrides - ): Promise; - - quoter(overrides?: CallOverrides): Promise; - - tokenPoolFee(overrides?: CallOverrides): Promise; - - uniswapV3Router(overrides?: CallOverrides): Promise; - - zetaPoolFee(overrides?: CallOverrides): Promise; - - zetaToken(overrides?: CallOverrides): Promise; - }; - - filters: { - "EthExchangedForZeta(uint256,uint256)"( - amountIn?: null, - amountOut?: null - ): EthExchangedForZetaEventFilter; - EthExchangedForZeta( - amountIn?: null, - amountOut?: null - ): EthExchangedForZetaEventFilter; - - "TokenExchangedForZeta(address,uint256,uint256)"( - token?: null, - amountIn?: null, - amountOut?: null - ): TokenExchangedForZetaEventFilter; - TokenExchangedForZeta( - token?: null, - amountIn?: null, - amountOut?: null - ): TokenExchangedForZetaEventFilter; - - "ZetaExchangedForEth(uint256,uint256)"( - amountIn?: null, - amountOut?: null - ): ZetaExchangedForEthEventFilter; - ZetaExchangedForEth( - amountIn?: null, - amountOut?: null - ): ZetaExchangedForEthEventFilter; - - "ZetaExchangedForToken(address,uint256,uint256)"( - token?: null, - amountIn?: null, - amountOut?: null - ): ZetaExchangedForTokenEventFilter; - ZetaExchangedForToken( - token?: null, - amountIn?: null, - amountOut?: null - ): ZetaExchangedForTokenEventFilter; - }; - - estimateGas: { - getEthFromZeta( - destinationAddress: string, - minAmountOut: BigNumberish, - zetaTokenAmount: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - getTokenFromZeta( - destinationAddress: string, - minAmountOut: BigNumberish, - outputToken: string, - zetaTokenAmount: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - getZetaFromEth( - destinationAddress: string, - minAmountOut: BigNumberish, - overrides?: PayableOverrides & { from?: string | Promise } - ): Promise; - - getZetaFromToken( - destinationAddress: string, - minAmountOut: BigNumberish, - inputToken: string, - inputTokenAmount: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - quoter(overrides?: CallOverrides): Promise; - - tokenPoolFee(overrides?: CallOverrides): Promise; - - uniswapV3Router(overrides?: CallOverrides): Promise; - - zetaPoolFee(overrides?: CallOverrides): Promise; - - zetaToken(overrides?: CallOverrides): Promise; - }; - - populateTransaction: { - getEthFromZeta( - destinationAddress: string, - minAmountOut: BigNumberish, - zetaTokenAmount: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - getTokenFromZeta( - destinationAddress: string, - minAmountOut: BigNumberish, - outputToken: string, - zetaTokenAmount: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - getZetaFromEth( - destinationAddress: string, - minAmountOut: BigNumberish, - overrides?: PayableOverrides & { from?: string | Promise } - ): Promise; - - getZetaFromToken( - destinationAddress: string, - minAmountOut: BigNumberish, - inputToken: string, - inputTokenAmount: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - quoter(overrides?: CallOverrides): Promise; - - tokenPoolFee(overrides?: CallOverrides): Promise; - - uniswapV3Router(overrides?: CallOverrides): Promise; - - zetaPoolFee(overrides?: CallOverrides): Promise; - - zetaToken(overrides?: CallOverrides): Promise; - }; -} diff --git a/packages/interfaces/typechain-types/contracts/ZetaTokenConsumerUniV3.strategy.sol/ZetaTokenConsumerUniV3Errors.ts b/packages/interfaces/typechain-types/contracts/ZetaTokenConsumerUniV3.strategy.sol/ZetaTokenConsumerUniV3Errors.ts deleted file mode 100644 index 7f99eec1..00000000 --- a/packages/interfaces/typechain-types/contracts/ZetaTokenConsumerUniV3.strategy.sol/ZetaTokenConsumerUniV3Errors.ts +++ /dev/null @@ -1,55 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ -import type { BaseContract, Signer, utils } from "ethers"; - -import type { Listener, Provider } from "@ethersproject/providers"; -import type { - TypedEventFilter, - TypedEvent, - TypedListener, - OnEvent, -} from "../../common"; - -export interface ZetaTokenConsumerUniV3ErrorsInterface extends utils.Interface { - functions: {}; - - events: {}; -} - -export interface ZetaTokenConsumerUniV3Errors extends BaseContract { - connect(signerOrProvider: Signer | Provider | string): this; - attach(addressOrName: string): this; - deployed(): Promise; - - interface: ZetaTokenConsumerUniV3ErrorsInterface; - - 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: {}; - - callStatic: {}; - - filters: {}; - - estimateGas: {}; - - populateTransaction: {}; -} diff --git a/packages/interfaces/typechain-types/contracts/ZetaTokenConsumerUniV3.strategy.sol/index.ts b/packages/interfaces/typechain-types/contracts/ZetaTokenConsumerUniV3.strategy.sol/index.ts deleted file mode 100644 index bf980c42..00000000 --- a/packages/interfaces/typechain-types/contracts/ZetaTokenConsumerUniV3.strategy.sol/index.ts +++ /dev/null @@ -1,6 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ -export type { WETH9 } from "./WETH9"; -export type { ZetaTokenConsumerUniV3 } from "./ZetaTokenConsumerUniV3"; -export type { ZetaTokenConsumerUniV3Errors } from "./ZetaTokenConsumerUniV3Errors"; diff --git a/packages/interfaces/typechain-types/contracts/index.ts b/packages/interfaces/typechain-types/contracts/index.ts deleted file mode 100644 index d464af18..00000000 --- a/packages/interfaces/typechain-types/contracts/index.ts +++ /dev/null @@ -1,28 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ -import type * as immutableCreate2FactorySol from "./ImmutableCreate2Factory.sol"; -export type { immutableCreate2FactorySol }; -import type * as zetaEthSol from "./Zeta.eth.sol"; -export type { zetaEthSol }; -import type * as zetaNonEthSol from "./Zeta.non-eth.sol"; -export type { zetaNonEthSol }; -import type * as zetaConnectorBaseSol from "./ZetaConnector.base.sol"; -export type { zetaConnectorBaseSol }; -import type * as zetaConnectorEthSol from "./ZetaConnector.eth.sol"; -export type { zetaConnectorEthSol }; -import type * as zetaConnectorNonEthSol from "./ZetaConnector.non-eth.sol"; -export type { zetaConnectorNonEthSol }; -import type * as zetaTokenConsumerTridentStrategySol from "./ZetaTokenConsumerTrident.strategy.sol"; -export type { zetaTokenConsumerTridentStrategySol }; -import type * as zetaTokenConsumerUniV2StrategySol from "./ZetaTokenConsumerUniV2.strategy.sol"; -export type { zetaTokenConsumerUniV2StrategySol }; -import type * as zetaTokenConsumerUniV3StrategySol from "./ZetaTokenConsumerUniV3.strategy.sol"; -export type { zetaTokenConsumerUniV3StrategySol }; -import type * as interfaces from "./interfaces"; -export type { interfaces }; -import type * as openzeppelin from "./openzeppelin"; -export type { openzeppelin }; -import type * as testing from "./testing"; -export type { testing }; -export type { ZetaInteractor } from "./ZetaInteractor"; diff --git a/packages/interfaces/typechain-types/contracts/interfaces/ConnectorErrors.ts b/packages/interfaces/typechain-types/contracts/interfaces/ConnectorErrors.ts deleted file mode 100644 index 65c75f93..00000000 --- a/packages/interfaces/typechain-types/contracts/interfaces/ConnectorErrors.ts +++ /dev/null @@ -1,55 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ -import type { BaseContract, Signer, utils } from "ethers"; - -import type { Listener, Provider } from "@ethersproject/providers"; -import type { - TypedEventFilter, - TypedEvent, - TypedListener, - OnEvent, -} from "../../common"; - -export interface ConnectorErrorsInterface extends utils.Interface { - functions: {}; - - events: {}; -} - -export interface ConnectorErrors extends BaseContract { - connect(signerOrProvider: Signer | Provider | string): this; - attach(addressOrName: string): this; - deployed(): Promise; - - interface: ConnectorErrorsInterface; - - 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: {}; - - callStatic: {}; - - filters: {}; - - estimateGas: {}; - - populateTransaction: {}; -} diff --git a/packages/interfaces/typechain-types/contracts/interfaces/TridentConcentratedLiquidityPoolFactory.sol/ConcentratedLiquidityPoolFactory.ts b/packages/interfaces/typechain-types/contracts/interfaces/TridentConcentratedLiquidityPoolFactory.sol/ConcentratedLiquidityPoolFactory.ts deleted file mode 100644 index 8f8721ad..00000000 --- a/packages/interfaces/typechain-types/contracts/interfaces/TridentConcentratedLiquidityPoolFactory.sol/ConcentratedLiquidityPoolFactory.ts +++ /dev/null @@ -1,116 +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, -} from "../../../common"; - -export interface ConcentratedLiquidityPoolFactoryInterface - extends utils.Interface { - functions: { - "getPools(address,address,uint256,uint256)": FunctionFragment; - }; - - getFunction(nameOrSignatureOrTopic: "getPools"): FunctionFragment; - - encodeFunctionData( - functionFragment: "getPools", - values: [string, string, BigNumberish, BigNumberish] - ): string; - - decodeFunctionResult(functionFragment: "getPools", data: BytesLike): Result; - - events: {}; -} - -export interface ConcentratedLiquidityPoolFactory extends BaseContract { - connect(signerOrProvider: Signer | Provider | string): this; - attach(addressOrName: string): this; - deployed(): Promise; - - interface: ConcentratedLiquidityPoolFactoryInterface; - - 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: { - getPools( - token0: string, - token1: string, - startIndex: BigNumberish, - count: BigNumberish, - overrides?: CallOverrides - ): Promise<[string[]] & { pairPools: string[] }>; - }; - - getPools( - token0: string, - token1: string, - startIndex: BigNumberish, - count: BigNumberish, - overrides?: CallOverrides - ): Promise; - - callStatic: { - getPools( - token0: string, - token1: string, - startIndex: BigNumberish, - count: BigNumberish, - overrides?: CallOverrides - ): Promise; - }; - - filters: {}; - - estimateGas: { - getPools( - token0: string, - token1: string, - startIndex: BigNumberish, - count: BigNumberish, - overrides?: CallOverrides - ): Promise; - }; - - populateTransaction: { - getPools( - token0: string, - token1: string, - startIndex: BigNumberish, - count: BigNumberish, - overrides?: CallOverrides - ): Promise; - }; -} diff --git a/packages/interfaces/typechain-types/contracts/interfaces/TridentConcentratedLiquidityPoolFactory.sol/index.ts b/packages/interfaces/typechain-types/contracts/interfaces/TridentConcentratedLiquidityPoolFactory.sol/index.ts deleted file mode 100644 index fda1a582..00000000 --- a/packages/interfaces/typechain-types/contracts/interfaces/TridentConcentratedLiquidityPoolFactory.sol/index.ts +++ /dev/null @@ -1,4 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ -export type { ConcentratedLiquidityPoolFactory } from "./ConcentratedLiquidityPoolFactory"; diff --git a/packages/interfaces/typechain-types/contracts/interfaces/TridentIPoolRouter.sol/IPoolRouter.ts b/packages/interfaces/typechain-types/contracts/interfaces/TridentIPoolRouter.sol/IPoolRouter.ts deleted file mode 100644 index da234b6a..00000000 --- a/packages/interfaces/typechain-types/contracts/interfaces/TridentIPoolRouter.sol/IPoolRouter.ts +++ /dev/null @@ -1,354 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ -import type { - BaseContract, - BigNumber, - BigNumberish, - BytesLike, - CallOverrides, - ContractTransaction, - PayableOverrides, - 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, -} from "../../../common"; - -export declare namespace IPoolRouter { - export type ExactInputParamsStruct = { - tokenIn: string; - amountIn: BigNumberish; - amountOutMinimum: BigNumberish; - path: string[]; - to: string; - unwrap: boolean; - }; - - export type ExactInputParamsStructOutput = [ - string, - BigNumber, - BigNumber, - string[], - string, - boolean - ] & { - tokenIn: string; - amountIn: BigNumber; - amountOutMinimum: BigNumber; - path: string[]; - to: string; - unwrap: boolean; - }; - - export type ExactInputSingleParamsStruct = { - tokenIn: string; - amountIn: BigNumberish; - amountOutMinimum: BigNumberish; - pool: string; - to: string; - unwrap: boolean; - }; - - export type ExactInputSingleParamsStructOutput = [ - string, - BigNumber, - BigNumber, - string, - string, - boolean - ] & { - tokenIn: string; - amountIn: BigNumber; - amountOutMinimum: BigNumber; - pool: string; - to: string; - unwrap: boolean; - }; - - export type ExactOutputParamsStruct = { - tokenIn: string; - amountOut: BigNumberish; - amountInMaximum: BigNumberish; - path: string[]; - to: string; - unwrap: boolean; - }; - - export type ExactOutputParamsStructOutput = [ - string, - BigNumber, - BigNumber, - string[], - string, - boolean - ] & { - tokenIn: string; - amountOut: BigNumber; - amountInMaximum: BigNumber; - path: string[]; - to: string; - unwrap: boolean; - }; - - export type ExactOutputSingleParamsStruct = { - tokenIn: string; - amountOut: BigNumberish; - amountInMaximum: BigNumberish; - pool: string; - to: string; - unwrap: boolean; - }; - - export type ExactOutputSingleParamsStructOutput = [ - string, - BigNumber, - BigNumber, - string, - string, - boolean - ] & { - tokenIn: string; - amountOut: BigNumber; - amountInMaximum: BigNumber; - pool: string; - to: string; - unwrap: boolean; - }; -} - -export interface IPoolRouterInterface extends utils.Interface { - functions: { - "exactInput((address,uint256,uint256,address[],address,bool))": FunctionFragment; - "exactInputSingle((address,uint256,uint256,address,address,bool))": FunctionFragment; - "exactOutput((address,uint256,uint256,address[],address,bool))": FunctionFragment; - "exactOutputSingle((address,uint256,uint256,address,address,bool))": FunctionFragment; - "sweep(address,uint256,address)": FunctionFragment; - }; - - getFunction( - nameOrSignatureOrTopic: - | "exactInput" - | "exactInputSingle" - | "exactOutput" - | "exactOutputSingle" - | "sweep" - ): FunctionFragment; - - encodeFunctionData( - functionFragment: "exactInput", - values: [IPoolRouter.ExactInputParamsStruct] - ): string; - encodeFunctionData( - functionFragment: "exactInputSingle", - values: [IPoolRouter.ExactInputSingleParamsStruct] - ): string; - encodeFunctionData( - functionFragment: "exactOutput", - values: [IPoolRouter.ExactOutputParamsStruct] - ): string; - encodeFunctionData( - functionFragment: "exactOutputSingle", - values: [IPoolRouter.ExactOutputSingleParamsStruct] - ): string; - encodeFunctionData( - functionFragment: "sweep", - values: [string, BigNumberish, string] - ): string; - - decodeFunctionResult(functionFragment: "exactInput", data: BytesLike): Result; - decodeFunctionResult( - functionFragment: "exactInputSingle", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "exactOutput", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "exactOutputSingle", - data: BytesLike - ): Result; - decodeFunctionResult(functionFragment: "sweep", data: BytesLike): Result; - - events: {}; -} - -export interface IPoolRouter extends BaseContract { - connect(signerOrProvider: Signer | Provider | string): this; - attach(addressOrName: string): this; - deployed(): Promise; - - interface: IPoolRouterInterface; - - 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: { - exactInput( - params: IPoolRouter.ExactInputParamsStruct, - overrides?: PayableOverrides & { from?: string | Promise } - ): Promise; - - exactInputSingle( - params: IPoolRouter.ExactInputSingleParamsStruct, - overrides?: PayableOverrides & { from?: string | Promise } - ): Promise; - - exactOutput( - params: IPoolRouter.ExactOutputParamsStruct, - overrides?: PayableOverrides & { from?: string | Promise } - ): Promise; - - exactOutputSingle( - params: IPoolRouter.ExactOutputSingleParamsStruct, - overrides?: PayableOverrides & { from?: string | Promise } - ): Promise; - - sweep( - token: string, - amount: BigNumberish, - recipient: string, - overrides?: PayableOverrides & { from?: string | Promise } - ): Promise; - }; - - exactInput( - params: IPoolRouter.ExactInputParamsStruct, - overrides?: PayableOverrides & { from?: string | Promise } - ): Promise; - - exactInputSingle( - params: IPoolRouter.ExactInputSingleParamsStruct, - overrides?: PayableOverrides & { from?: string | Promise } - ): Promise; - - exactOutput( - params: IPoolRouter.ExactOutputParamsStruct, - overrides?: PayableOverrides & { from?: string | Promise } - ): Promise; - - exactOutputSingle( - params: IPoolRouter.ExactOutputSingleParamsStruct, - overrides?: PayableOverrides & { from?: string | Promise } - ): Promise; - - sweep( - token: string, - amount: BigNumberish, - recipient: string, - overrides?: PayableOverrides & { from?: string | Promise } - ): Promise; - - callStatic: { - exactInput( - params: IPoolRouter.ExactInputParamsStruct, - overrides?: CallOverrides - ): Promise; - - exactInputSingle( - params: IPoolRouter.ExactInputSingleParamsStruct, - overrides?: CallOverrides - ): Promise; - - exactOutput( - params: IPoolRouter.ExactOutputParamsStruct, - overrides?: CallOverrides - ): Promise; - - exactOutputSingle( - params: IPoolRouter.ExactOutputSingleParamsStruct, - overrides?: CallOverrides - ): Promise; - - sweep( - token: string, - amount: BigNumberish, - recipient: string, - overrides?: CallOverrides - ): Promise; - }; - - filters: {}; - - estimateGas: { - exactInput( - params: IPoolRouter.ExactInputParamsStruct, - overrides?: PayableOverrides & { from?: string | Promise } - ): Promise; - - exactInputSingle( - params: IPoolRouter.ExactInputSingleParamsStruct, - overrides?: PayableOverrides & { from?: string | Promise } - ): Promise; - - exactOutput( - params: IPoolRouter.ExactOutputParamsStruct, - overrides?: PayableOverrides & { from?: string | Promise } - ): Promise; - - exactOutputSingle( - params: IPoolRouter.ExactOutputSingleParamsStruct, - overrides?: PayableOverrides & { from?: string | Promise } - ): Promise; - - sweep( - token: string, - amount: BigNumberish, - recipient: string, - overrides?: PayableOverrides & { from?: string | Promise } - ): Promise; - }; - - populateTransaction: { - exactInput( - params: IPoolRouter.ExactInputParamsStruct, - overrides?: PayableOverrides & { from?: string | Promise } - ): Promise; - - exactInputSingle( - params: IPoolRouter.ExactInputSingleParamsStruct, - overrides?: PayableOverrides & { from?: string | Promise } - ): Promise; - - exactOutput( - params: IPoolRouter.ExactOutputParamsStruct, - overrides?: PayableOverrides & { from?: string | Promise } - ): Promise; - - exactOutputSingle( - params: IPoolRouter.ExactOutputSingleParamsStruct, - overrides?: PayableOverrides & { from?: string | Promise } - ): Promise; - - sweep( - token: string, - amount: BigNumberish, - recipient: string, - overrides?: PayableOverrides & { from?: string | Promise } - ): Promise; - }; -} diff --git a/packages/interfaces/typechain-types/contracts/interfaces/TridentIPoolRouter.sol/index.ts b/packages/interfaces/typechain-types/contracts/interfaces/TridentIPoolRouter.sol/index.ts deleted file mode 100644 index e5d212a6..00000000 --- a/packages/interfaces/typechain-types/contracts/interfaces/TridentIPoolRouter.sol/index.ts +++ /dev/null @@ -1,4 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ -export type { IPoolRouter } from "./IPoolRouter"; diff --git a/packages/interfaces/typechain-types/contracts/interfaces/ZetaErrors.ts b/packages/interfaces/typechain-types/contracts/interfaces/ZetaErrors.ts deleted file mode 100644 index f256343f..00000000 --- a/packages/interfaces/typechain-types/contracts/interfaces/ZetaErrors.ts +++ /dev/null @@ -1,55 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ -import type { BaseContract, Signer, utils } from "ethers"; - -import type { Listener, Provider } from "@ethersproject/providers"; -import type { - TypedEventFilter, - TypedEvent, - TypedListener, - OnEvent, -} from "../../common"; - -export interface ZetaErrorsInterface extends utils.Interface { - functions: {}; - - events: {}; -} - -export interface ZetaErrors extends BaseContract { - connect(signerOrProvider: Signer | Provider | string): this; - attach(addressOrName: string): this; - deployed(): Promise; - - interface: ZetaErrorsInterface; - - 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: {}; - - callStatic: {}; - - filters: {}; - - estimateGas: {}; - - populateTransaction: {}; -} diff --git a/packages/interfaces/typechain-types/contracts/interfaces/ZetaInteractorErrors.ts b/packages/interfaces/typechain-types/contracts/interfaces/ZetaInteractorErrors.ts deleted file mode 100644 index 2b6e928f..00000000 --- a/packages/interfaces/typechain-types/contracts/interfaces/ZetaInteractorErrors.ts +++ /dev/null @@ -1,55 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ -import type { BaseContract, Signer, utils } from "ethers"; - -import type { Listener, Provider } from "@ethersproject/providers"; -import type { - TypedEventFilter, - TypedEvent, - TypedListener, - OnEvent, -} from "../../common"; - -export interface ZetaInteractorErrorsInterface extends utils.Interface { - functions: {}; - - events: {}; -} - -export interface ZetaInteractorErrors extends BaseContract { - connect(signerOrProvider: Signer | Provider | string): this; - attach(addressOrName: string): this; - deployed(): Promise; - - interface: ZetaInteractorErrorsInterface; - - 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: {}; - - callStatic: {}; - - filters: {}; - - estimateGas: {}; - - populateTransaction: {}; -} diff --git a/packages/interfaces/typechain-types/contracts/interfaces/ZetaInterfaces.sol/ZetaCommonErrors.ts b/packages/interfaces/typechain-types/contracts/interfaces/ZetaInterfaces.sol/ZetaCommonErrors.ts deleted file mode 100644 index ffc7af30..00000000 --- a/packages/interfaces/typechain-types/contracts/interfaces/ZetaInterfaces.sol/ZetaCommonErrors.ts +++ /dev/null @@ -1,55 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ -import type { BaseContract, Signer, utils } from "ethers"; - -import type { Listener, Provider } from "@ethersproject/providers"; -import type { - TypedEventFilter, - TypedEvent, - TypedListener, - OnEvent, -} from "../../../common"; - -export interface ZetaCommonErrorsInterface extends utils.Interface { - functions: {}; - - events: {}; -} - -export interface ZetaCommonErrors extends BaseContract { - connect(signerOrProvider: Signer | Provider | string): this; - attach(addressOrName: string): this; - deployed(): Promise; - - interface: ZetaCommonErrorsInterface; - - 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: {}; - - callStatic: {}; - - filters: {}; - - estimateGas: {}; - - populateTransaction: {}; -} diff --git a/packages/interfaces/typechain-types/contracts/interfaces/ZetaInterfaces.sol/ZetaConnector.ts b/packages/interfaces/typechain-types/contracts/interfaces/ZetaInterfaces.sol/ZetaConnector.ts deleted file mode 100644 index bf051aa8..00000000 --- a/packages/interfaces/typechain-types/contracts/interfaces/ZetaInterfaces.sol/ZetaConnector.ts +++ /dev/null @@ -1,129 +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, -} from "../../../common"; - -export declare namespace ZetaInterfaces { - export type SendInputStruct = { - destinationChainId: BigNumberish; - destinationAddress: BytesLike; - destinationGasLimit: BigNumberish; - message: BytesLike; - zetaValueAndGas: BigNumberish; - zetaParams: BytesLike; - }; - - export type SendInputStructOutput = [ - BigNumber, - string, - BigNumber, - string, - BigNumber, - string - ] & { - destinationChainId: BigNumber; - destinationAddress: string; - destinationGasLimit: BigNumber; - message: string; - zetaValueAndGas: BigNumber; - zetaParams: string; - }; -} - -export interface ZetaConnectorInterface extends utils.Interface { - functions: { - "send((uint256,bytes,uint256,bytes,uint256,bytes))": FunctionFragment; - }; - - getFunction(nameOrSignatureOrTopic: "send"): FunctionFragment; - - encodeFunctionData( - functionFragment: "send", - values: [ZetaInterfaces.SendInputStruct] - ): string; - - decodeFunctionResult(functionFragment: "send", data: BytesLike): Result; - - events: {}; -} - -export interface ZetaConnector extends BaseContract { - connect(signerOrProvider: Signer | Provider | string): this; - attach(addressOrName: string): this; - deployed(): Promise; - - interface: ZetaConnectorInterface; - - 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: { - send( - input: ZetaInterfaces.SendInputStruct, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - }; - - send( - input: ZetaInterfaces.SendInputStruct, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - callStatic: { - send( - input: ZetaInterfaces.SendInputStruct, - overrides?: CallOverrides - ): Promise; - }; - - filters: {}; - - estimateGas: { - send( - input: ZetaInterfaces.SendInputStruct, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - }; - - populateTransaction: { - send( - input: ZetaInterfaces.SendInputStruct, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - }; -} diff --git a/packages/interfaces/typechain-types/contracts/interfaces/ZetaInterfaces.sol/ZetaReceiver.ts b/packages/interfaces/typechain-types/contracts/interfaces/ZetaInterfaces.sol/ZetaReceiver.ts deleted file mode 100644 index 22572650..00000000 --- a/packages/interfaces/typechain-types/contracts/interfaces/ZetaInterfaces.sol/ZetaReceiver.ts +++ /dev/null @@ -1,190 +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, -} from "../../../common"; - -export declare namespace ZetaInterfaces { - export type ZetaMessageStruct = { - zetaTxSenderAddress: BytesLike; - sourceChainId: BigNumberish; - destinationAddress: string; - zetaValue: BigNumberish; - message: BytesLike; - }; - - export type ZetaMessageStructOutput = [ - string, - BigNumber, - string, - BigNumber, - string - ] & { - zetaTxSenderAddress: string; - sourceChainId: BigNumber; - destinationAddress: string; - zetaValue: BigNumber; - message: string; - }; - - export type ZetaRevertStruct = { - zetaTxSenderAddress: string; - sourceChainId: BigNumberish; - destinationAddress: BytesLike; - destinationChainId: BigNumberish; - remainingZetaValue: BigNumberish; - message: BytesLike; - }; - - export type ZetaRevertStructOutput = [ - string, - BigNumber, - string, - BigNumber, - BigNumber, - string - ] & { - zetaTxSenderAddress: string; - sourceChainId: BigNumber; - destinationAddress: string; - destinationChainId: BigNumber; - remainingZetaValue: BigNumber; - message: string; - }; -} - -export interface ZetaReceiverInterface extends utils.Interface { - functions: { - "onZetaMessage((bytes,uint256,address,uint256,bytes))": FunctionFragment; - "onZetaRevert((address,uint256,bytes,uint256,uint256,bytes))": FunctionFragment; - }; - - getFunction( - nameOrSignatureOrTopic: "onZetaMessage" | "onZetaRevert" - ): FunctionFragment; - - encodeFunctionData( - functionFragment: "onZetaMessage", - values: [ZetaInterfaces.ZetaMessageStruct] - ): string; - encodeFunctionData( - functionFragment: "onZetaRevert", - values: [ZetaInterfaces.ZetaRevertStruct] - ): string; - - decodeFunctionResult( - functionFragment: "onZetaMessage", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "onZetaRevert", - data: BytesLike - ): Result; - - events: {}; -} - -export interface ZetaReceiver extends BaseContract { - connect(signerOrProvider: Signer | Provider | string): this; - attach(addressOrName: string): this; - deployed(): Promise; - - interface: ZetaReceiverInterface; - - 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: { - onZetaMessage( - zetaMessage: ZetaInterfaces.ZetaMessageStruct, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - onZetaRevert( - zetaRevert: ZetaInterfaces.ZetaRevertStruct, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - }; - - onZetaMessage( - zetaMessage: ZetaInterfaces.ZetaMessageStruct, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - onZetaRevert( - zetaRevert: ZetaInterfaces.ZetaRevertStruct, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - callStatic: { - onZetaMessage( - zetaMessage: ZetaInterfaces.ZetaMessageStruct, - overrides?: CallOverrides - ): Promise; - - onZetaRevert( - zetaRevert: ZetaInterfaces.ZetaRevertStruct, - overrides?: CallOverrides - ): Promise; - }; - - filters: {}; - - estimateGas: { - onZetaMessage( - zetaMessage: ZetaInterfaces.ZetaMessageStruct, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - onZetaRevert( - zetaRevert: ZetaInterfaces.ZetaRevertStruct, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - }; - - populateTransaction: { - onZetaMessage( - zetaMessage: ZetaInterfaces.ZetaMessageStruct, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - onZetaRevert( - zetaRevert: ZetaInterfaces.ZetaRevertStruct, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - }; -} diff --git a/packages/interfaces/typechain-types/contracts/interfaces/ZetaInterfaces.sol/ZetaTokenConsumer.ts b/packages/interfaces/typechain-types/contracts/interfaces/ZetaInterfaces.sol/ZetaTokenConsumer.ts deleted file mode 100644 index a34288e3..00000000 --- a/packages/interfaces/typechain-types/contracts/interfaces/ZetaInterfaces.sol/ZetaTokenConsumer.ts +++ /dev/null @@ -1,363 +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, -} from "../../../common"; - -export interface ZetaTokenConsumerInterface extends utils.Interface { - functions: { - "getEthFromZeta(address,uint256,uint256)": FunctionFragment; - "getTokenFromZeta(address,uint256,address,uint256)": FunctionFragment; - "getZetaFromEth(address,uint256)": FunctionFragment; - "getZetaFromToken(address,uint256,address,uint256)": FunctionFragment; - }; - - getFunction( - nameOrSignatureOrTopic: - | "getEthFromZeta" - | "getTokenFromZeta" - | "getZetaFromEth" - | "getZetaFromToken" - ): FunctionFragment; - - encodeFunctionData( - functionFragment: "getEthFromZeta", - values: [string, BigNumberish, BigNumberish] - ): string; - encodeFunctionData( - functionFragment: "getTokenFromZeta", - values: [string, BigNumberish, string, BigNumberish] - ): string; - encodeFunctionData( - functionFragment: "getZetaFromEth", - values: [string, BigNumberish] - ): string; - encodeFunctionData( - functionFragment: "getZetaFromToken", - values: [string, BigNumberish, string, BigNumberish] - ): string; - - decodeFunctionResult( - functionFragment: "getEthFromZeta", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "getTokenFromZeta", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "getZetaFromEth", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "getZetaFromToken", - data: BytesLike - ): Result; - - events: { - "EthExchangedForZeta(uint256,uint256)": EventFragment; - "TokenExchangedForZeta(address,uint256,uint256)": EventFragment; - "ZetaExchangedForEth(uint256,uint256)": EventFragment; - "ZetaExchangedForToken(address,uint256,uint256)": EventFragment; - }; - - getEvent(nameOrSignatureOrTopic: "EthExchangedForZeta"): EventFragment; - getEvent(nameOrSignatureOrTopic: "TokenExchangedForZeta"): EventFragment; - getEvent(nameOrSignatureOrTopic: "ZetaExchangedForEth"): EventFragment; - getEvent(nameOrSignatureOrTopic: "ZetaExchangedForToken"): EventFragment; -} - -export interface EthExchangedForZetaEventObject { - amountIn: BigNumber; - amountOut: BigNumber; -} -export type EthExchangedForZetaEvent = TypedEvent< - [BigNumber, BigNumber], - EthExchangedForZetaEventObject ->; - -export type EthExchangedForZetaEventFilter = - TypedEventFilter; - -export interface TokenExchangedForZetaEventObject { - token: string; - amountIn: BigNumber; - amountOut: BigNumber; -} -export type TokenExchangedForZetaEvent = TypedEvent< - [string, BigNumber, BigNumber], - TokenExchangedForZetaEventObject ->; - -export type TokenExchangedForZetaEventFilter = - TypedEventFilter; - -export interface ZetaExchangedForEthEventObject { - amountIn: BigNumber; - amountOut: BigNumber; -} -export type ZetaExchangedForEthEvent = TypedEvent< - [BigNumber, BigNumber], - ZetaExchangedForEthEventObject ->; - -export type ZetaExchangedForEthEventFilter = - TypedEventFilter; - -export interface ZetaExchangedForTokenEventObject { - token: string; - amountIn: BigNumber; - amountOut: BigNumber; -} -export type ZetaExchangedForTokenEvent = TypedEvent< - [string, BigNumber, BigNumber], - ZetaExchangedForTokenEventObject ->; - -export type ZetaExchangedForTokenEventFilter = - TypedEventFilter; - -export interface ZetaTokenConsumer extends BaseContract { - connect(signerOrProvider: Signer | Provider | string): this; - attach(addressOrName: string): this; - deployed(): Promise; - - interface: ZetaTokenConsumerInterface; - - 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: { - getEthFromZeta( - destinationAddress: string, - minAmountOut: BigNumberish, - zetaTokenAmount: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - getTokenFromZeta( - destinationAddress: string, - minAmountOut: BigNumberish, - outputToken: string, - zetaTokenAmount: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - getZetaFromEth( - destinationAddress: string, - minAmountOut: BigNumberish, - overrides?: PayableOverrides & { from?: string | Promise } - ): Promise; - - getZetaFromToken( - destinationAddress: string, - minAmountOut: BigNumberish, - inputToken: string, - inputTokenAmount: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - }; - - getEthFromZeta( - destinationAddress: string, - minAmountOut: BigNumberish, - zetaTokenAmount: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - getTokenFromZeta( - destinationAddress: string, - minAmountOut: BigNumberish, - outputToken: string, - zetaTokenAmount: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - getZetaFromEth( - destinationAddress: string, - minAmountOut: BigNumberish, - overrides?: PayableOverrides & { from?: string | Promise } - ): Promise; - - getZetaFromToken( - destinationAddress: string, - minAmountOut: BigNumberish, - inputToken: string, - inputTokenAmount: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - callStatic: { - getEthFromZeta( - destinationAddress: string, - minAmountOut: BigNumberish, - zetaTokenAmount: BigNumberish, - overrides?: CallOverrides - ): Promise; - - getTokenFromZeta( - destinationAddress: string, - minAmountOut: BigNumberish, - outputToken: string, - zetaTokenAmount: BigNumberish, - overrides?: CallOverrides - ): Promise; - - getZetaFromEth( - destinationAddress: string, - minAmountOut: BigNumberish, - overrides?: CallOverrides - ): Promise; - - getZetaFromToken( - destinationAddress: string, - minAmountOut: BigNumberish, - inputToken: string, - inputTokenAmount: BigNumberish, - overrides?: CallOverrides - ): Promise; - }; - - filters: { - "EthExchangedForZeta(uint256,uint256)"( - amountIn?: null, - amountOut?: null - ): EthExchangedForZetaEventFilter; - EthExchangedForZeta( - amountIn?: null, - amountOut?: null - ): EthExchangedForZetaEventFilter; - - "TokenExchangedForZeta(address,uint256,uint256)"( - token?: null, - amountIn?: null, - amountOut?: null - ): TokenExchangedForZetaEventFilter; - TokenExchangedForZeta( - token?: null, - amountIn?: null, - amountOut?: null - ): TokenExchangedForZetaEventFilter; - - "ZetaExchangedForEth(uint256,uint256)"( - amountIn?: null, - amountOut?: null - ): ZetaExchangedForEthEventFilter; - ZetaExchangedForEth( - amountIn?: null, - amountOut?: null - ): ZetaExchangedForEthEventFilter; - - "ZetaExchangedForToken(address,uint256,uint256)"( - token?: null, - amountIn?: null, - amountOut?: null - ): ZetaExchangedForTokenEventFilter; - ZetaExchangedForToken( - token?: null, - amountIn?: null, - amountOut?: null - ): ZetaExchangedForTokenEventFilter; - }; - - estimateGas: { - getEthFromZeta( - destinationAddress: string, - minAmountOut: BigNumberish, - zetaTokenAmount: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - getTokenFromZeta( - destinationAddress: string, - minAmountOut: BigNumberish, - outputToken: string, - zetaTokenAmount: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - getZetaFromEth( - destinationAddress: string, - minAmountOut: BigNumberish, - overrides?: PayableOverrides & { from?: string | Promise } - ): Promise; - - getZetaFromToken( - destinationAddress: string, - minAmountOut: BigNumberish, - inputToken: string, - inputTokenAmount: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - }; - - populateTransaction: { - getEthFromZeta( - destinationAddress: string, - minAmountOut: BigNumberish, - zetaTokenAmount: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - getTokenFromZeta( - destinationAddress: string, - minAmountOut: BigNumberish, - outputToken: string, - zetaTokenAmount: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - getZetaFromEth( - destinationAddress: string, - minAmountOut: BigNumberish, - overrides?: PayableOverrides & { from?: string | Promise } - ): Promise; - - getZetaFromToken( - destinationAddress: string, - minAmountOut: BigNumberish, - inputToken: string, - inputTokenAmount: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - }; -} diff --git a/packages/interfaces/typechain-types/contracts/interfaces/ZetaInterfaces.sol/index.ts b/packages/interfaces/typechain-types/contracts/interfaces/ZetaInterfaces.sol/index.ts deleted file mode 100644 index a4f4c2aa..00000000 --- a/packages/interfaces/typechain-types/contracts/interfaces/ZetaInterfaces.sol/index.ts +++ /dev/null @@ -1,7 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ -export type { ZetaCommonErrors } from "./ZetaCommonErrors"; -export type { ZetaConnector } from "./ZetaConnector"; -export type { ZetaReceiver } from "./ZetaReceiver"; -export type { ZetaTokenConsumer } from "./ZetaTokenConsumer"; diff --git a/packages/interfaces/typechain-types/contracts/interfaces/ZetaNonEthInterface.ts b/packages/interfaces/typechain-types/contracts/interfaces/ZetaNonEthInterface.ts deleted file mode 100644 index e5aa607f..00000000 --- a/packages/interfaces/typechain-types/contracts/interfaces/ZetaNonEthInterface.ts +++ /dev/null @@ -1,401 +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, -} from "../../common"; - -export interface ZetaNonEthInterfaceInterface extends utils.Interface { - functions: { - "allowance(address,address)": FunctionFragment; - "approve(address,uint256)": FunctionFragment; - "balanceOf(address)": FunctionFragment; - "burnFrom(address,uint256)": FunctionFragment; - "mint(address,uint256,bytes32)": FunctionFragment; - "totalSupply()": FunctionFragment; - "transfer(address,uint256)": FunctionFragment; - "transferFrom(address,address,uint256)": FunctionFragment; - }; - - getFunction( - nameOrSignatureOrTopic: - | "allowance" - | "approve" - | "balanceOf" - | "burnFrom" - | "mint" - | "totalSupply" - | "transfer" - | "transferFrom" - ): FunctionFragment; - - encodeFunctionData( - functionFragment: "allowance", - values: [string, string] - ): string; - encodeFunctionData( - functionFragment: "approve", - values: [string, BigNumberish] - ): string; - encodeFunctionData(functionFragment: "balanceOf", values: [string]): string; - encodeFunctionData( - functionFragment: "burnFrom", - values: [string, BigNumberish] - ): string; - encodeFunctionData( - functionFragment: "mint", - values: [string, BigNumberish, BytesLike] - ): string; - encodeFunctionData( - functionFragment: "totalSupply", - values?: undefined - ): string; - encodeFunctionData( - functionFragment: "transfer", - values: [string, BigNumberish] - ): string; - encodeFunctionData( - functionFragment: "transferFrom", - values: [string, string, BigNumberish] - ): string; - - decodeFunctionResult(functionFragment: "allowance", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "approve", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "balanceOf", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "burnFrom", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "mint", data: BytesLike): Result; - decodeFunctionResult( - functionFragment: "totalSupply", - data: BytesLike - ): Result; - decodeFunctionResult(functionFragment: "transfer", data: BytesLike): Result; - decodeFunctionResult( - functionFragment: "transferFrom", - data: BytesLike - ): Result; - - events: { - "Approval(address,address,uint256)": EventFragment; - "Transfer(address,address,uint256)": EventFragment; - }; - - getEvent(nameOrSignatureOrTopic: "Approval"): EventFragment; - getEvent(nameOrSignatureOrTopic: "Transfer"): EventFragment; -} - -export interface ApprovalEventObject { - owner: string; - spender: string; - value: BigNumber; -} -export type ApprovalEvent = TypedEvent< - [string, string, BigNumber], - ApprovalEventObject ->; - -export type ApprovalEventFilter = TypedEventFilter; - -export interface TransferEventObject { - from: string; - to: string; - value: BigNumber; -} -export type TransferEvent = TypedEvent< - [string, string, BigNumber], - TransferEventObject ->; - -export type TransferEventFilter = TypedEventFilter; - -export interface ZetaNonEthInterface extends BaseContract { - connect(signerOrProvider: Signer | Provider | string): this; - attach(addressOrName: string): this; - deployed(): Promise; - - interface: ZetaNonEthInterfaceInterface; - - 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: { - allowance( - owner: string, - spender: string, - overrides?: CallOverrides - ): Promise<[BigNumber]>; - - approve( - spender: string, - amount: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - balanceOf(account: string, overrides?: CallOverrides): Promise<[BigNumber]>; - - burnFrom( - account: string, - amount: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - mint( - mintee: string, - value: BigNumberish, - internalSendHash: BytesLike, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - totalSupply(overrides?: CallOverrides): Promise<[BigNumber]>; - - transfer( - to: string, - amount: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - transferFrom( - from: string, - to: string, - amount: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - }; - - allowance( - owner: string, - spender: string, - overrides?: CallOverrides - ): Promise; - - approve( - spender: string, - amount: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - balanceOf(account: string, overrides?: CallOverrides): Promise; - - burnFrom( - account: string, - amount: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - mint( - mintee: string, - value: BigNumberish, - internalSendHash: BytesLike, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - totalSupply(overrides?: CallOverrides): Promise; - - transfer( - to: string, - amount: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - transferFrom( - from: string, - to: string, - amount: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - callStatic: { - allowance( - owner: string, - spender: string, - overrides?: CallOverrides - ): Promise; - - approve( - spender: string, - amount: BigNumberish, - overrides?: CallOverrides - ): Promise; - - balanceOf(account: string, overrides?: CallOverrides): Promise; - - burnFrom( - account: string, - amount: BigNumberish, - overrides?: CallOverrides - ): Promise; - - mint( - mintee: string, - value: BigNumberish, - internalSendHash: BytesLike, - overrides?: CallOverrides - ): Promise; - - totalSupply(overrides?: CallOverrides): Promise; - - transfer( - to: string, - amount: BigNumberish, - overrides?: CallOverrides - ): Promise; - - transferFrom( - from: string, - to: string, - amount: BigNumberish, - overrides?: CallOverrides - ): Promise; - }; - - filters: { - "Approval(address,address,uint256)"( - owner?: string | null, - spender?: string | null, - value?: null - ): ApprovalEventFilter; - Approval( - owner?: string | null, - spender?: string | null, - value?: null - ): ApprovalEventFilter; - - "Transfer(address,address,uint256)"( - from?: string | null, - to?: string | null, - value?: null - ): TransferEventFilter; - Transfer( - from?: string | null, - to?: string | null, - value?: null - ): TransferEventFilter; - }; - - estimateGas: { - allowance( - owner: string, - spender: string, - overrides?: CallOverrides - ): Promise; - - approve( - spender: string, - amount: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - balanceOf(account: string, overrides?: CallOverrides): Promise; - - burnFrom( - account: string, - amount: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - mint( - mintee: string, - value: BigNumberish, - internalSendHash: BytesLike, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - totalSupply(overrides?: CallOverrides): Promise; - - transfer( - to: string, - amount: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - transferFrom( - from: string, - to: string, - amount: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - }; - - populateTransaction: { - allowance( - owner: string, - spender: string, - overrides?: CallOverrides - ): Promise; - - approve( - spender: string, - amount: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - balanceOf( - account: string, - overrides?: CallOverrides - ): Promise; - - burnFrom( - account: string, - amount: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - mint( - mintee: string, - value: BigNumberish, - internalSendHash: BytesLike, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - totalSupply(overrides?: CallOverrides): Promise; - - transfer( - to: string, - amount: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - transferFrom( - from: string, - to: string, - amount: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - }; -} diff --git a/packages/interfaces/typechain-types/contracts/interfaces/index.ts b/packages/interfaces/typechain-types/contracts/interfaces/index.ts deleted file mode 100644 index 25257284..00000000 --- a/packages/interfaces/typechain-types/contracts/interfaces/index.ts +++ /dev/null @@ -1,13 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ -import type * as tridentConcentratedLiquidityPoolFactorySol from "./TridentConcentratedLiquidityPoolFactory.sol"; -export type { tridentConcentratedLiquidityPoolFactorySol }; -import type * as tridentIPoolRouterSol from "./TridentIPoolRouter.sol"; -export type { tridentIPoolRouterSol }; -import type * as zetaInterfacesSol from "./ZetaInterfaces.sol"; -export type { zetaInterfacesSol }; -export type { ConnectorErrors } from "./ConnectorErrors"; -export type { ZetaErrors } from "./ZetaErrors"; -export type { ZetaInteractorErrors } from "./ZetaInteractorErrors"; -export type { ZetaNonEthInterface } from "./ZetaNonEthInterface"; diff --git a/packages/interfaces/typechain-types/contracts/openzeppelin/Ownable2Step.ts b/packages/interfaces/typechain-types/contracts/openzeppelin/Ownable2Step.ts deleted file mode 100644 index ea5ab139..00000000 --- a/packages/interfaces/typechain-types/contracts/openzeppelin/Ownable2Step.ts +++ /dev/null @@ -1,249 +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, - EventFragment, -} from "@ethersproject/abi"; -import type { Listener, Provider } from "@ethersproject/providers"; -import type { - TypedEventFilter, - TypedEvent, - TypedListener, - OnEvent, -} from "../../common"; - -export interface Ownable2StepInterface extends utils.Interface { - functions: { - "acceptOwnership()": FunctionFragment; - "owner()": FunctionFragment; - "pendingOwner()": FunctionFragment; - "renounceOwnership()": FunctionFragment; - "transferOwnership(address)": FunctionFragment; - }; - - getFunction( - nameOrSignatureOrTopic: - | "acceptOwnership" - | "owner" - | "pendingOwner" - | "renounceOwnership" - | "transferOwnership" - ): FunctionFragment; - - encodeFunctionData( - functionFragment: "acceptOwnership", - values?: undefined - ): string; - encodeFunctionData(functionFragment: "owner", values?: undefined): string; - encodeFunctionData( - functionFragment: "pendingOwner", - values?: undefined - ): string; - encodeFunctionData( - functionFragment: "renounceOwnership", - values?: undefined - ): string; - encodeFunctionData( - functionFragment: "transferOwnership", - values: [string] - ): string; - - decodeFunctionResult( - functionFragment: "acceptOwnership", - data: BytesLike - ): Result; - decodeFunctionResult(functionFragment: "owner", data: BytesLike): Result; - decodeFunctionResult( - functionFragment: "pendingOwner", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "renounceOwnership", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "transferOwnership", - data: BytesLike - ): Result; - - events: { - "OwnershipTransferStarted(address,address)": EventFragment; - "OwnershipTransferred(address,address)": EventFragment; - }; - - getEvent(nameOrSignatureOrTopic: "OwnershipTransferStarted"): EventFragment; - getEvent(nameOrSignatureOrTopic: "OwnershipTransferred"): EventFragment; -} - -export interface OwnershipTransferStartedEventObject { - previousOwner: string; - newOwner: string; -} -export type OwnershipTransferStartedEvent = TypedEvent< - [string, string], - OwnershipTransferStartedEventObject ->; - -export type OwnershipTransferStartedEventFilter = - TypedEventFilter; - -export interface OwnershipTransferredEventObject { - previousOwner: string; - newOwner: string; -} -export type OwnershipTransferredEvent = TypedEvent< - [string, string], - OwnershipTransferredEventObject ->; - -export type OwnershipTransferredEventFilter = - TypedEventFilter; - -export interface Ownable2Step extends BaseContract { - connect(signerOrProvider: Signer | Provider | string): this; - attach(addressOrName: string): this; - deployed(): Promise; - - interface: Ownable2StepInterface; - - 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: { - acceptOwnership( - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - owner(overrides?: CallOverrides): Promise<[string]>; - - pendingOwner(overrides?: CallOverrides): Promise<[string]>; - - renounceOwnership( - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - transferOwnership( - newOwner: string, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - }; - - acceptOwnership( - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - owner(overrides?: CallOverrides): Promise; - - pendingOwner(overrides?: CallOverrides): Promise; - - renounceOwnership( - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - transferOwnership( - newOwner: string, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - callStatic: { - acceptOwnership(overrides?: CallOverrides): Promise; - - owner(overrides?: CallOverrides): Promise; - - pendingOwner(overrides?: CallOverrides): Promise; - - renounceOwnership(overrides?: CallOverrides): Promise; - - transferOwnership( - newOwner: string, - overrides?: CallOverrides - ): Promise; - }; - - filters: { - "OwnershipTransferStarted(address,address)"( - previousOwner?: string | null, - newOwner?: string | null - ): OwnershipTransferStartedEventFilter; - OwnershipTransferStarted( - previousOwner?: string | null, - newOwner?: string | null - ): OwnershipTransferStartedEventFilter; - - "OwnershipTransferred(address,address)"( - previousOwner?: string | null, - newOwner?: string | null - ): OwnershipTransferredEventFilter; - OwnershipTransferred( - previousOwner?: string | null, - newOwner?: string | null - ): OwnershipTransferredEventFilter; - }; - - estimateGas: { - acceptOwnership( - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - owner(overrides?: CallOverrides): Promise; - - pendingOwner(overrides?: CallOverrides): Promise; - - renounceOwnership( - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - transferOwnership( - newOwner: string, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - }; - - populateTransaction: { - acceptOwnership( - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - owner(overrides?: CallOverrides): Promise; - - pendingOwner(overrides?: CallOverrides): Promise; - - renounceOwnership( - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - transferOwnership( - newOwner: string, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - }; -} diff --git a/packages/interfaces/typechain-types/contracts/openzeppelin/index.ts b/packages/interfaces/typechain-types/contracts/openzeppelin/index.ts deleted file mode 100644 index 4acbefbf..00000000 --- a/packages/interfaces/typechain-types/contracts/openzeppelin/index.ts +++ /dev/null @@ -1,4 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ -export type { Ownable2Step } from "./Ownable2Step"; diff --git a/packages/interfaces/typechain-types/contracts/testing/TestUniswapV3Contracts.sol/INonfungiblePositionManager.ts b/packages/interfaces/typechain-types/contracts/testing/TestUniswapV3Contracts.sol/INonfungiblePositionManager.ts deleted file mode 100644 index 6ea26b8a..00000000 --- a/packages/interfaces/typechain-types/contracts/testing/TestUniswapV3Contracts.sol/INonfungiblePositionManager.ts +++ /dev/null @@ -1,566 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ -import type { - BaseContract, - BigNumber, - BigNumberish, - BytesLike, - CallOverrides, - ContractTransaction, - 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, -} from "../../../common"; - -export declare namespace INonfungiblePositionManager { - export type CollectParamsStruct = { - tokenId: BigNumberish; - recipient: string; - amount0Max: BigNumberish; - amount1Max: BigNumberish; - }; - - export type CollectParamsStructOutput = [ - BigNumber, - string, - BigNumber, - BigNumber - ] & { - tokenId: BigNumber; - recipient: string; - amount0Max: BigNumber; - amount1Max: BigNumber; - }; - - export type DecreaseLiquidityParamsStruct = { - tokenId: BigNumberish; - liquidity: BigNumberish; - amount0Min: BigNumberish; - amount1Min: BigNumberish; - deadline: BigNumberish; - }; - - export type DecreaseLiquidityParamsStructOutput = [ - BigNumber, - BigNumber, - BigNumber, - BigNumber, - BigNumber - ] & { - tokenId: BigNumber; - liquidity: BigNumber; - amount0Min: BigNumber; - amount1Min: BigNumber; - deadline: BigNumber; - }; - - export type IncreaseLiquidityParamsStruct = { - tokenId: BigNumberish; - amount0Desired: BigNumberish; - amount1Desired: BigNumberish; - amount0Min: BigNumberish; - amount1Min: BigNumberish; - deadline: BigNumberish; - }; - - export type IncreaseLiquidityParamsStructOutput = [ - BigNumber, - BigNumber, - BigNumber, - BigNumber, - BigNumber, - BigNumber - ] & { - tokenId: BigNumber; - amount0Desired: BigNumber; - amount1Desired: BigNumber; - amount0Min: BigNumber; - amount1Min: BigNumber; - deadline: BigNumber; - }; - - export type MintParamsStruct = { - token0: string; - token1: string; - fee: BigNumberish; - tickLower: BigNumberish; - tickUpper: BigNumberish; - amount0Desired: BigNumberish; - amount1Desired: BigNumberish; - amount0Min: BigNumberish; - amount1Min: BigNumberish; - recipient: string; - deadline: BigNumberish; - }; - - export type MintParamsStructOutput = [ - string, - string, - number, - number, - number, - BigNumber, - BigNumber, - BigNumber, - BigNumber, - string, - BigNumber - ] & { - token0: string; - token1: string; - fee: number; - tickLower: number; - tickUpper: number; - amount0Desired: BigNumber; - amount1Desired: BigNumber; - amount0Min: BigNumber; - amount1Min: BigNumber; - recipient: string; - deadline: BigNumber; - }; -} - -export interface INonfungiblePositionManagerInterface extends utils.Interface { - functions: { - "burn(uint256)": FunctionFragment; - "collect((uint256,address,uint128,uint128))": FunctionFragment; - "decreaseLiquidity((uint256,uint128,uint256,uint256,uint256))": FunctionFragment; - "increaseLiquidity((uint256,uint256,uint256,uint256,uint256,uint256))": FunctionFragment; - "mint((address,address,uint24,int24,int24,uint256,uint256,uint256,uint256,address,uint256))": FunctionFragment; - "positions(uint256)": FunctionFragment; - }; - - getFunction( - nameOrSignatureOrTopic: - | "burn" - | "collect" - | "decreaseLiquidity" - | "increaseLiquidity" - | "mint" - | "positions" - ): FunctionFragment; - - encodeFunctionData(functionFragment: "burn", values: [BigNumberish]): string; - encodeFunctionData( - functionFragment: "collect", - values: [INonfungiblePositionManager.CollectParamsStruct] - ): string; - encodeFunctionData( - functionFragment: "decreaseLiquidity", - values: [INonfungiblePositionManager.DecreaseLiquidityParamsStruct] - ): string; - encodeFunctionData( - functionFragment: "increaseLiquidity", - values: [INonfungiblePositionManager.IncreaseLiquidityParamsStruct] - ): string; - encodeFunctionData( - functionFragment: "mint", - values: [INonfungiblePositionManager.MintParamsStruct] - ): string; - encodeFunctionData( - functionFragment: "positions", - values: [BigNumberish] - ): string; - - decodeFunctionResult(functionFragment: "burn", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "collect", data: BytesLike): Result; - decodeFunctionResult( - functionFragment: "decreaseLiquidity", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "increaseLiquidity", - data: BytesLike - ): Result; - decodeFunctionResult(functionFragment: "mint", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "positions", data: BytesLike): Result; - - events: { - "Collect(uint256,address,uint256,uint256)": EventFragment; - "DecreaseLiquidity(uint256,uint128,uint256,uint256)": EventFragment; - "IncreaseLiquidity(uint256,uint128,uint256,uint256)": EventFragment; - }; - - getEvent(nameOrSignatureOrTopic: "Collect"): EventFragment; - getEvent(nameOrSignatureOrTopic: "DecreaseLiquidity"): EventFragment; - getEvent(nameOrSignatureOrTopic: "IncreaseLiquidity"): EventFragment; -} - -export interface CollectEventObject { - tokenId: BigNumber; - recipient: string; - amount0: BigNumber; - amount1: BigNumber; -} -export type CollectEvent = TypedEvent< - [BigNumber, string, BigNumber, BigNumber], - CollectEventObject ->; - -export type CollectEventFilter = TypedEventFilter; - -export interface DecreaseLiquidityEventObject { - tokenId: BigNumber; - liquidity: BigNumber; - amount0: BigNumber; - amount1: BigNumber; -} -export type DecreaseLiquidityEvent = TypedEvent< - [BigNumber, BigNumber, BigNumber, BigNumber], - DecreaseLiquidityEventObject ->; - -export type DecreaseLiquidityEventFilter = - TypedEventFilter; - -export interface IncreaseLiquidityEventObject { - tokenId: BigNumber; - liquidity: BigNumber; - amount0: BigNumber; - amount1: BigNumber; -} -export type IncreaseLiquidityEvent = TypedEvent< - [BigNumber, BigNumber, BigNumber, BigNumber], - IncreaseLiquidityEventObject ->; - -export type IncreaseLiquidityEventFilter = - TypedEventFilter; - -export interface INonfungiblePositionManager extends BaseContract { - connect(signerOrProvider: Signer | Provider | string): this; - attach(addressOrName: string): this; - deployed(): Promise; - - interface: INonfungiblePositionManagerInterface; - - 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: { - burn( - tokenId: BigNumberish, - overrides?: PayableOverrides & { from?: string | Promise } - ): Promise; - - collect( - params: INonfungiblePositionManager.CollectParamsStruct, - overrides?: PayableOverrides & { from?: string | Promise } - ): Promise; - - decreaseLiquidity( - params: INonfungiblePositionManager.DecreaseLiquidityParamsStruct, - overrides?: PayableOverrides & { from?: string | Promise } - ): Promise; - - increaseLiquidity( - params: INonfungiblePositionManager.IncreaseLiquidityParamsStruct, - overrides?: PayableOverrides & { from?: string | Promise } - ): Promise; - - mint( - params: INonfungiblePositionManager.MintParamsStruct, - overrides?: PayableOverrides & { from?: string | Promise } - ): Promise; - - positions( - tokenId: BigNumberish, - overrides?: CallOverrides - ): Promise< - [ - BigNumber, - string, - string, - string, - number, - number, - number, - BigNumber, - BigNumber, - BigNumber, - BigNumber, - BigNumber - ] & { - nonce: BigNumber; - operator: string; - token0: string; - token1: string; - fee: number; - tickLower: number; - tickUpper: number; - liquidity: BigNumber; - feeGrowthInside0LastX128: BigNumber; - feeGrowthInside1LastX128: BigNumber; - tokensOwed0: BigNumber; - tokensOwed1: BigNumber; - } - >; - }; - - burn( - tokenId: BigNumberish, - overrides?: PayableOverrides & { from?: string | Promise } - ): Promise; - - collect( - params: INonfungiblePositionManager.CollectParamsStruct, - overrides?: PayableOverrides & { from?: string | Promise } - ): Promise; - - decreaseLiquidity( - params: INonfungiblePositionManager.DecreaseLiquidityParamsStruct, - overrides?: PayableOverrides & { from?: string | Promise } - ): Promise; - - increaseLiquidity( - params: INonfungiblePositionManager.IncreaseLiquidityParamsStruct, - overrides?: PayableOverrides & { from?: string | Promise } - ): Promise; - - mint( - params: INonfungiblePositionManager.MintParamsStruct, - overrides?: PayableOverrides & { from?: string | Promise } - ): Promise; - - positions( - tokenId: BigNumberish, - overrides?: CallOverrides - ): Promise< - [ - BigNumber, - string, - string, - string, - number, - number, - number, - BigNumber, - BigNumber, - BigNumber, - BigNumber, - BigNumber - ] & { - nonce: BigNumber; - operator: string; - token0: string; - token1: string; - fee: number; - tickLower: number; - tickUpper: number; - liquidity: BigNumber; - feeGrowthInside0LastX128: BigNumber; - feeGrowthInside1LastX128: BigNumber; - tokensOwed0: BigNumber; - tokensOwed1: BigNumber; - } - >; - - callStatic: { - burn(tokenId: BigNumberish, overrides?: CallOverrides): Promise; - - collect( - params: INonfungiblePositionManager.CollectParamsStruct, - overrides?: CallOverrides - ): Promise< - [BigNumber, BigNumber] & { amount0: BigNumber; amount1: BigNumber } - >; - - decreaseLiquidity( - params: INonfungiblePositionManager.DecreaseLiquidityParamsStruct, - overrides?: CallOverrides - ): Promise< - [BigNumber, BigNumber] & { amount0: BigNumber; amount1: BigNumber } - >; - - increaseLiquidity( - params: INonfungiblePositionManager.IncreaseLiquidityParamsStruct, - overrides?: CallOverrides - ): Promise< - [BigNumber, BigNumber, BigNumber] & { - liquidity: BigNumber; - amount0: BigNumber; - amount1: BigNumber; - } - >; - - mint( - params: INonfungiblePositionManager.MintParamsStruct, - overrides?: CallOverrides - ): Promise< - [BigNumber, BigNumber, BigNumber, BigNumber] & { - tokenId: BigNumber; - liquidity: BigNumber; - amount0: BigNumber; - amount1: BigNumber; - } - >; - - positions( - tokenId: BigNumberish, - overrides?: CallOverrides - ): Promise< - [ - BigNumber, - string, - string, - string, - number, - number, - number, - BigNumber, - BigNumber, - BigNumber, - BigNumber, - BigNumber - ] & { - nonce: BigNumber; - operator: string; - token0: string; - token1: string; - fee: number; - tickLower: number; - tickUpper: number; - liquidity: BigNumber; - feeGrowthInside0LastX128: BigNumber; - feeGrowthInside1LastX128: BigNumber; - tokensOwed0: BigNumber; - tokensOwed1: BigNumber; - } - >; - }; - - filters: { - "Collect(uint256,address,uint256,uint256)"( - tokenId?: BigNumberish | null, - recipient?: null, - amount0?: null, - amount1?: null - ): CollectEventFilter; - Collect( - tokenId?: BigNumberish | null, - recipient?: null, - amount0?: null, - amount1?: null - ): CollectEventFilter; - - "DecreaseLiquidity(uint256,uint128,uint256,uint256)"( - tokenId?: BigNumberish | null, - liquidity?: null, - amount0?: null, - amount1?: null - ): DecreaseLiquidityEventFilter; - DecreaseLiquidity( - tokenId?: BigNumberish | null, - liquidity?: null, - amount0?: null, - amount1?: null - ): DecreaseLiquidityEventFilter; - - "IncreaseLiquidity(uint256,uint128,uint256,uint256)"( - tokenId?: BigNumberish | null, - liquidity?: null, - amount0?: null, - amount1?: null - ): IncreaseLiquidityEventFilter; - IncreaseLiquidity( - tokenId?: BigNumberish | null, - liquidity?: null, - amount0?: null, - amount1?: null - ): IncreaseLiquidityEventFilter; - }; - - estimateGas: { - burn( - tokenId: BigNumberish, - overrides?: PayableOverrides & { from?: string | Promise } - ): Promise; - - collect( - params: INonfungiblePositionManager.CollectParamsStruct, - overrides?: PayableOverrides & { from?: string | Promise } - ): Promise; - - decreaseLiquidity( - params: INonfungiblePositionManager.DecreaseLiquidityParamsStruct, - overrides?: PayableOverrides & { from?: string | Promise } - ): Promise; - - increaseLiquidity( - params: INonfungiblePositionManager.IncreaseLiquidityParamsStruct, - overrides?: PayableOverrides & { from?: string | Promise } - ): Promise; - - mint( - params: INonfungiblePositionManager.MintParamsStruct, - overrides?: PayableOverrides & { from?: string | Promise } - ): Promise; - - positions( - tokenId: BigNumberish, - overrides?: CallOverrides - ): Promise; - }; - - populateTransaction: { - burn( - tokenId: BigNumberish, - overrides?: PayableOverrides & { from?: string | Promise } - ): Promise; - - collect( - params: INonfungiblePositionManager.CollectParamsStruct, - overrides?: PayableOverrides & { from?: string | Promise } - ): Promise; - - decreaseLiquidity( - params: INonfungiblePositionManager.DecreaseLiquidityParamsStruct, - overrides?: PayableOverrides & { from?: string | Promise } - ): Promise; - - increaseLiquidity( - params: INonfungiblePositionManager.IncreaseLiquidityParamsStruct, - overrides?: PayableOverrides & { from?: string | Promise } - ): Promise; - - mint( - params: INonfungiblePositionManager.MintParamsStruct, - overrides?: PayableOverrides & { from?: string | Promise } - ): Promise; - - positions( - tokenId: BigNumberish, - overrides?: CallOverrides - ): Promise; - }; -} diff --git a/packages/interfaces/typechain-types/contracts/testing/TestUniswapV3Contracts.sol/IPoolInitializer.ts b/packages/interfaces/typechain-types/contracts/testing/TestUniswapV3Contracts.sol/IPoolInitializer.ts deleted file mode 100644 index fdbbf874..00000000 --- a/packages/interfaces/typechain-types/contracts/testing/TestUniswapV3Contracts.sol/IPoolInitializer.ts +++ /dev/null @@ -1,122 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ -import type { - BaseContract, - BigNumber, - BigNumberish, - BytesLike, - CallOverrides, - ContractTransaction, - PayableOverrides, - 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, -} from "../../../common"; - -export interface IPoolInitializerInterface extends utils.Interface { - functions: { - "createAndInitializePoolIfNecessary(address,address,uint24,uint160)": FunctionFragment; - }; - - getFunction( - nameOrSignatureOrTopic: "createAndInitializePoolIfNecessary" - ): FunctionFragment; - - encodeFunctionData( - functionFragment: "createAndInitializePoolIfNecessary", - values: [string, string, BigNumberish, BigNumberish] - ): string; - - decodeFunctionResult( - functionFragment: "createAndInitializePoolIfNecessary", - data: BytesLike - ): Result; - - events: {}; -} - -export interface IPoolInitializer extends BaseContract { - connect(signerOrProvider: Signer | Provider | string): this; - attach(addressOrName: string): this; - deployed(): Promise; - - interface: IPoolInitializerInterface; - - 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: { - createAndInitializePoolIfNecessary( - token0: string, - token1: string, - fee: BigNumberish, - sqrtPriceX96: BigNumberish, - overrides?: PayableOverrides & { from?: string | Promise } - ): Promise; - }; - - createAndInitializePoolIfNecessary( - token0: string, - token1: string, - fee: BigNumberish, - sqrtPriceX96: BigNumberish, - overrides?: PayableOverrides & { from?: string | Promise } - ): Promise; - - callStatic: { - createAndInitializePoolIfNecessary( - token0: string, - token1: string, - fee: BigNumberish, - sqrtPriceX96: BigNumberish, - overrides?: CallOverrides - ): Promise; - }; - - filters: {}; - - estimateGas: { - createAndInitializePoolIfNecessary( - token0: string, - token1: string, - fee: BigNumberish, - sqrtPriceX96: BigNumberish, - overrides?: PayableOverrides & { from?: string | Promise } - ): Promise; - }; - - populateTransaction: { - createAndInitializePoolIfNecessary( - token0: string, - token1: string, - fee: BigNumberish, - sqrtPriceX96: BigNumberish, - overrides?: PayableOverrides & { from?: string | Promise } - ): Promise; - }; -} diff --git a/packages/interfaces/typechain-types/contracts/testing/TestUniswapV3Contracts.sol/index.ts b/packages/interfaces/typechain-types/contracts/testing/TestUniswapV3Contracts.sol/index.ts deleted file mode 100644 index 84f06e3a..00000000 --- a/packages/interfaces/typechain-types/contracts/testing/TestUniswapV3Contracts.sol/index.ts +++ /dev/null @@ -1,5 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ -export type { INonfungiblePositionManager } from "./INonfungiblePositionManager"; -export type { IPoolInitializer } from "./IPoolInitializer"; diff --git a/packages/interfaces/typechain-types/contracts/testing/ZetaInteractorMock.ts b/packages/interfaces/typechain-types/contracts/testing/ZetaInteractorMock.ts deleted file mode 100644 index 90625217..00000000 --- a/packages/interfaces/typechain-types/contracts/testing/ZetaInteractorMock.ts +++ /dev/null @@ -1,458 +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, -} from "../../common"; - -export declare namespace ZetaInterfaces { - export type ZetaMessageStruct = { - zetaTxSenderAddress: BytesLike; - sourceChainId: BigNumberish; - destinationAddress: string; - zetaValue: BigNumberish; - message: BytesLike; - }; - - export type ZetaMessageStructOutput = [ - string, - BigNumber, - string, - BigNumber, - string - ] & { - zetaTxSenderAddress: string; - sourceChainId: BigNumber; - destinationAddress: string; - zetaValue: BigNumber; - message: string; - }; - - export type ZetaRevertStruct = { - zetaTxSenderAddress: string; - sourceChainId: BigNumberish; - destinationAddress: BytesLike; - destinationChainId: BigNumberish; - remainingZetaValue: BigNumberish; - message: BytesLike; - }; - - export type ZetaRevertStructOutput = [ - string, - BigNumber, - string, - BigNumber, - BigNumber, - string - ] & { - zetaTxSenderAddress: string; - sourceChainId: BigNumber; - destinationAddress: string; - destinationChainId: BigNumber; - remainingZetaValue: BigNumber; - message: string; - }; -} - -export interface ZetaInteractorMockInterface extends utils.Interface { - functions: { - "acceptOwnership()": FunctionFragment; - "connector()": FunctionFragment; - "interactorsByChainId(uint256)": FunctionFragment; - "onZetaMessage((bytes,uint256,address,uint256,bytes))": FunctionFragment; - "onZetaRevert((address,uint256,bytes,uint256,uint256,bytes))": FunctionFragment; - "owner()": FunctionFragment; - "pendingOwner()": FunctionFragment; - "renounceOwnership()": FunctionFragment; - "setInteractorByChainId(uint256,bytes)": FunctionFragment; - "transferOwnership(address)": FunctionFragment; - }; - - getFunction( - nameOrSignatureOrTopic: - | "acceptOwnership" - | "connector" - | "interactorsByChainId" - | "onZetaMessage" - | "onZetaRevert" - | "owner" - | "pendingOwner" - | "renounceOwnership" - | "setInteractorByChainId" - | "transferOwnership" - ): FunctionFragment; - - encodeFunctionData( - functionFragment: "acceptOwnership", - values?: undefined - ): string; - encodeFunctionData(functionFragment: "connector", values?: undefined): string; - encodeFunctionData( - functionFragment: "interactorsByChainId", - values: [BigNumberish] - ): string; - encodeFunctionData( - functionFragment: "onZetaMessage", - values: [ZetaInterfaces.ZetaMessageStruct] - ): string; - encodeFunctionData( - functionFragment: "onZetaRevert", - values: [ZetaInterfaces.ZetaRevertStruct] - ): string; - encodeFunctionData(functionFragment: "owner", values?: undefined): string; - encodeFunctionData( - functionFragment: "pendingOwner", - values?: undefined - ): string; - encodeFunctionData( - functionFragment: "renounceOwnership", - values?: undefined - ): string; - encodeFunctionData( - functionFragment: "setInteractorByChainId", - values: [BigNumberish, BytesLike] - ): string; - encodeFunctionData( - functionFragment: "transferOwnership", - values: [string] - ): string; - - decodeFunctionResult( - functionFragment: "acceptOwnership", - data: BytesLike - ): Result; - decodeFunctionResult(functionFragment: "connector", data: BytesLike): Result; - decodeFunctionResult( - functionFragment: "interactorsByChainId", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "onZetaMessage", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "onZetaRevert", - data: BytesLike - ): Result; - decodeFunctionResult(functionFragment: "owner", data: BytesLike): Result; - decodeFunctionResult( - functionFragment: "pendingOwner", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "renounceOwnership", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "setInteractorByChainId", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "transferOwnership", - data: BytesLike - ): Result; - - events: { - "OwnershipTransferStarted(address,address)": EventFragment; - "OwnershipTransferred(address,address)": EventFragment; - }; - - getEvent(nameOrSignatureOrTopic: "OwnershipTransferStarted"): EventFragment; - getEvent(nameOrSignatureOrTopic: "OwnershipTransferred"): EventFragment; -} - -export interface OwnershipTransferStartedEventObject { - previousOwner: string; - newOwner: string; -} -export type OwnershipTransferStartedEvent = TypedEvent< - [string, string], - OwnershipTransferStartedEventObject ->; - -export type OwnershipTransferStartedEventFilter = - TypedEventFilter; - -export interface OwnershipTransferredEventObject { - previousOwner: string; - newOwner: string; -} -export type OwnershipTransferredEvent = TypedEvent< - [string, string], - OwnershipTransferredEventObject ->; - -export type OwnershipTransferredEventFilter = - TypedEventFilter; - -export interface ZetaInteractorMock extends BaseContract { - connect(signerOrProvider: Signer | Provider | string): this; - attach(addressOrName: string): this; - deployed(): Promise; - - interface: ZetaInteractorMockInterface; - - 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: { - acceptOwnership( - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - connector(overrides?: CallOverrides): Promise<[string]>; - - interactorsByChainId( - arg0: BigNumberish, - overrides?: CallOverrides - ): Promise<[string]>; - - onZetaMessage( - zetaMessage: ZetaInterfaces.ZetaMessageStruct, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - onZetaRevert( - zetaRevert: ZetaInterfaces.ZetaRevertStruct, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - owner(overrides?: CallOverrides): Promise<[string]>; - - pendingOwner(overrides?: CallOverrides): Promise<[string]>; - - renounceOwnership( - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - setInteractorByChainId( - destinationChainId: BigNumberish, - contractAddress: BytesLike, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - transferOwnership( - newOwner: string, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - }; - - acceptOwnership( - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - connector(overrides?: CallOverrides): Promise; - - interactorsByChainId( - arg0: BigNumberish, - overrides?: CallOverrides - ): Promise; - - onZetaMessage( - zetaMessage: ZetaInterfaces.ZetaMessageStruct, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - onZetaRevert( - zetaRevert: ZetaInterfaces.ZetaRevertStruct, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - owner(overrides?: CallOverrides): Promise; - - pendingOwner(overrides?: CallOverrides): Promise; - - renounceOwnership( - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - setInteractorByChainId( - destinationChainId: BigNumberish, - contractAddress: BytesLike, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - transferOwnership( - newOwner: string, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - callStatic: { - acceptOwnership(overrides?: CallOverrides): Promise; - - connector(overrides?: CallOverrides): Promise; - - interactorsByChainId( - arg0: BigNumberish, - overrides?: CallOverrides - ): Promise; - - onZetaMessage( - zetaMessage: ZetaInterfaces.ZetaMessageStruct, - overrides?: CallOverrides - ): Promise; - - onZetaRevert( - zetaRevert: ZetaInterfaces.ZetaRevertStruct, - overrides?: CallOverrides - ): Promise; - - owner(overrides?: CallOverrides): Promise; - - pendingOwner(overrides?: CallOverrides): Promise; - - renounceOwnership(overrides?: CallOverrides): Promise; - - setInteractorByChainId( - destinationChainId: BigNumberish, - contractAddress: BytesLike, - overrides?: CallOverrides - ): Promise; - - transferOwnership( - newOwner: string, - overrides?: CallOverrides - ): Promise; - }; - - filters: { - "OwnershipTransferStarted(address,address)"( - previousOwner?: string | null, - newOwner?: string | null - ): OwnershipTransferStartedEventFilter; - OwnershipTransferStarted( - previousOwner?: string | null, - newOwner?: string | null - ): OwnershipTransferStartedEventFilter; - - "OwnershipTransferred(address,address)"( - previousOwner?: string | null, - newOwner?: string | null - ): OwnershipTransferredEventFilter; - OwnershipTransferred( - previousOwner?: string | null, - newOwner?: string | null - ): OwnershipTransferredEventFilter; - }; - - estimateGas: { - acceptOwnership( - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - connector(overrides?: CallOverrides): Promise; - - interactorsByChainId( - arg0: BigNumberish, - overrides?: CallOverrides - ): Promise; - - onZetaMessage( - zetaMessage: ZetaInterfaces.ZetaMessageStruct, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - onZetaRevert( - zetaRevert: ZetaInterfaces.ZetaRevertStruct, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - owner(overrides?: CallOverrides): Promise; - - pendingOwner(overrides?: CallOverrides): Promise; - - renounceOwnership( - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - setInteractorByChainId( - destinationChainId: BigNumberish, - contractAddress: BytesLike, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - transferOwnership( - newOwner: string, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - }; - - populateTransaction: { - acceptOwnership( - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - connector(overrides?: CallOverrides): Promise; - - interactorsByChainId( - arg0: BigNumberish, - overrides?: CallOverrides - ): Promise; - - onZetaMessage( - zetaMessage: ZetaInterfaces.ZetaMessageStruct, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - onZetaRevert( - zetaRevert: ZetaInterfaces.ZetaRevertStruct, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - owner(overrides?: CallOverrides): Promise; - - pendingOwner(overrides?: CallOverrides): Promise; - - renounceOwnership( - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - setInteractorByChainId( - destinationChainId: BigNumberish, - contractAddress: BytesLike, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - transferOwnership( - newOwner: string, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - }; -} diff --git a/packages/interfaces/typechain-types/contracts/testing/ZetaReceiverMock.ts b/packages/interfaces/typechain-types/contracts/testing/ZetaReceiverMock.ts deleted file mode 100644 index eb8bd238..00000000 --- a/packages/interfaces/typechain-types/contracts/testing/ZetaReceiverMock.ts +++ /dev/null @@ -1,232 +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, -} from "../../common"; - -export declare namespace ZetaInterfaces { - export type ZetaMessageStruct = { - zetaTxSenderAddress: BytesLike; - sourceChainId: BigNumberish; - destinationAddress: string; - zetaValue: BigNumberish; - message: BytesLike; - }; - - export type ZetaMessageStructOutput = [ - string, - BigNumber, - string, - BigNumber, - string - ] & { - zetaTxSenderAddress: string; - sourceChainId: BigNumber; - destinationAddress: string; - zetaValue: BigNumber; - message: string; - }; - - export type ZetaRevertStruct = { - zetaTxSenderAddress: string; - sourceChainId: BigNumberish; - destinationAddress: BytesLike; - destinationChainId: BigNumberish; - remainingZetaValue: BigNumberish; - message: BytesLike; - }; - - export type ZetaRevertStructOutput = [ - string, - BigNumber, - string, - BigNumber, - BigNumber, - string - ] & { - zetaTxSenderAddress: string; - sourceChainId: BigNumber; - destinationAddress: string; - destinationChainId: BigNumber; - remainingZetaValue: BigNumber; - message: string; - }; -} - -export interface ZetaReceiverMockInterface extends utils.Interface { - functions: { - "onZetaMessage((bytes,uint256,address,uint256,bytes))": FunctionFragment; - "onZetaRevert((address,uint256,bytes,uint256,uint256,bytes))": FunctionFragment; - }; - - getFunction( - nameOrSignatureOrTopic: "onZetaMessage" | "onZetaRevert" - ): FunctionFragment; - - encodeFunctionData( - functionFragment: "onZetaMessage", - values: [ZetaInterfaces.ZetaMessageStruct] - ): string; - encodeFunctionData( - functionFragment: "onZetaRevert", - values: [ZetaInterfaces.ZetaRevertStruct] - ): string; - - decodeFunctionResult( - functionFragment: "onZetaMessage", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "onZetaRevert", - data: BytesLike - ): Result; - - events: { - "MockOnZetaMessage(address)": EventFragment; - "MockOnZetaRevert(address)": EventFragment; - }; - - getEvent(nameOrSignatureOrTopic: "MockOnZetaMessage"): EventFragment; - getEvent(nameOrSignatureOrTopic: "MockOnZetaRevert"): EventFragment; -} - -export interface MockOnZetaMessageEventObject { - destinationAddress: string; -} -export type MockOnZetaMessageEvent = TypedEvent< - [string], - MockOnZetaMessageEventObject ->; - -export type MockOnZetaMessageEventFilter = - TypedEventFilter; - -export interface MockOnZetaRevertEventObject { - zetaTxSenderAddress: string; -} -export type MockOnZetaRevertEvent = TypedEvent< - [string], - MockOnZetaRevertEventObject ->; - -export type MockOnZetaRevertEventFilter = - TypedEventFilter; - -export interface ZetaReceiverMock extends BaseContract { - connect(signerOrProvider: Signer | Provider | string): this; - attach(addressOrName: string): this; - deployed(): Promise; - - interface: ZetaReceiverMockInterface; - - 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: { - onZetaMessage( - zetaMessage: ZetaInterfaces.ZetaMessageStruct, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - onZetaRevert( - zetaRevert: ZetaInterfaces.ZetaRevertStruct, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - }; - - onZetaMessage( - zetaMessage: ZetaInterfaces.ZetaMessageStruct, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - onZetaRevert( - zetaRevert: ZetaInterfaces.ZetaRevertStruct, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - callStatic: { - onZetaMessage( - zetaMessage: ZetaInterfaces.ZetaMessageStruct, - overrides?: CallOverrides - ): Promise; - - onZetaRevert( - zetaRevert: ZetaInterfaces.ZetaRevertStruct, - overrides?: CallOverrides - ): Promise; - }; - - filters: { - "MockOnZetaMessage(address)"( - destinationAddress?: null - ): MockOnZetaMessageEventFilter; - MockOnZetaMessage(destinationAddress?: null): MockOnZetaMessageEventFilter; - - "MockOnZetaRevert(address)"( - zetaTxSenderAddress?: null - ): MockOnZetaRevertEventFilter; - MockOnZetaRevert(zetaTxSenderAddress?: null): MockOnZetaRevertEventFilter; - }; - - estimateGas: { - onZetaMessage( - zetaMessage: ZetaInterfaces.ZetaMessageStruct, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - onZetaRevert( - zetaRevert: ZetaInterfaces.ZetaRevertStruct, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - }; - - populateTransaction: { - onZetaMessage( - zetaMessage: ZetaInterfaces.ZetaMessageStruct, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - onZetaRevert( - zetaRevert: ZetaInterfaces.ZetaRevertStruct, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - }; -} diff --git a/packages/interfaces/typechain-types/contracts/testing/index.ts b/packages/interfaces/typechain-types/contracts/testing/index.ts deleted file mode 100644 index ae63ef88..00000000 --- a/packages/interfaces/typechain-types/contracts/testing/index.ts +++ /dev/null @@ -1,7 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ -import type * as testUniswapV3ContractsSol from "./TestUniswapV3Contracts.sol"; -export type { testUniswapV3ContractsSol }; -export type { ZetaInteractorMock } from "./ZetaInteractorMock"; -export type { ZetaReceiverMock } from "./ZetaReceiverMock"; diff --git a/packages/interfaces/typechain-types/factories/@openzeppelin/contracts/access/Ownable__factory.ts b/packages/interfaces/typechain-types/factories/@openzeppelin/contracts/access/Ownable__factory.ts deleted file mode 100644 index 32f8cfe6..00000000 --- a/packages/interfaces/typechain-types/factories/@openzeppelin/contracts/access/Ownable__factory.ts +++ /dev/null @@ -1,78 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ - -import { Contract, Signer, utils } from "ethers"; -import type { Provider } from "@ethersproject/providers"; -import type { - Ownable, - OwnableInterface, -} from "../../../../@openzeppelin/contracts/access/Ownable"; - -const _abi = [ - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "address", - name: "previousOwner", - type: "address", - }, - { - indexed: true, - internalType: "address", - name: "newOwner", - type: "address", - }, - ], - name: "OwnershipTransferred", - type: "event", - }, - { - inputs: [], - name: "owner", - outputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "renounceOwnership", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "newOwner", - type: "address", - }, - ], - name: "transferOwnership", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, -]; - -export class Ownable__factory { - static readonly abi = _abi; - static createInterface(): OwnableInterface { - return new utils.Interface(_abi) as OwnableInterface; - } - static connect( - address: string, - signerOrProvider: Signer | Provider - ): Ownable { - return new Contract(address, _abi, signerOrProvider) as Ownable; - } -} diff --git a/packages/interfaces/typechain-types/factories/@openzeppelin/contracts/access/index.ts b/packages/interfaces/typechain-types/factories/@openzeppelin/contracts/access/index.ts deleted file mode 100644 index e332ae32..00000000 --- a/packages/interfaces/typechain-types/factories/@openzeppelin/contracts/access/index.ts +++ /dev/null @@ -1,4 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ -export { Ownable__factory } from "./Ownable__factory"; diff --git a/packages/interfaces/typechain-types/factories/@openzeppelin/contracts/index.ts b/packages/interfaces/typechain-types/factories/@openzeppelin/contracts/index.ts deleted file mode 100644 index f3879d61..00000000 --- a/packages/interfaces/typechain-types/factories/@openzeppelin/contracts/index.ts +++ /dev/null @@ -1,6 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ -export * as access from "./access"; -export * as security from "./security"; -export * as token from "./token"; diff --git a/packages/interfaces/typechain-types/factories/@openzeppelin/contracts/security/Pausable__factory.ts b/packages/interfaces/typechain-types/factories/@openzeppelin/contracts/security/Pausable__factory.ts deleted file mode 100644 index 202ac625..00000000 --- a/packages/interfaces/typechain-types/factories/@openzeppelin/contracts/security/Pausable__factory.ts +++ /dev/null @@ -1,65 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ - -import { Contract, Signer, utils } from "ethers"; -import type { Provider } from "@ethersproject/providers"; -import type { - Pausable, - PausableInterface, -} from "../../../../@openzeppelin/contracts/security/Pausable"; - -const _abi = [ - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: "address", - name: "account", - type: "address", - }, - ], - name: "Paused", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: "address", - name: "account", - type: "address", - }, - ], - name: "Unpaused", - type: "event", - }, - { - inputs: [], - name: "paused", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, -]; - -export class Pausable__factory { - static readonly abi = _abi; - static createInterface(): PausableInterface { - return new utils.Interface(_abi) as PausableInterface; - } - static connect( - address: string, - signerOrProvider: Signer | Provider - ): Pausable { - return new Contract(address, _abi, signerOrProvider) as Pausable; - } -} diff --git a/packages/interfaces/typechain-types/factories/@openzeppelin/contracts/security/index.ts b/packages/interfaces/typechain-types/factories/@openzeppelin/contracts/security/index.ts deleted file mode 100644 index 0d4ecd47..00000000 --- a/packages/interfaces/typechain-types/factories/@openzeppelin/contracts/security/index.ts +++ /dev/null @@ -1,4 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ -export { Pausable__factory } from "./Pausable__factory"; diff --git a/packages/interfaces/typechain-types/factories/@openzeppelin/contracts/token/ERC20/ERC20__factory.ts b/packages/interfaces/typechain-types/factories/@openzeppelin/contracts/token/ERC20/ERC20__factory.ts deleted file mode 100644 index f2d68109..00000000 --- a/packages/interfaces/typechain-types/factories/@openzeppelin/contracts/token/ERC20/ERC20__factory.ts +++ /dev/null @@ -1,349 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ -import { Signer, utils, Contract, ContractFactory, Overrides } from "ethers"; -import type { Provider, TransactionRequest } from "@ethersproject/providers"; -import type { - ERC20, - ERC20Interface, -} from "../../../../../@openzeppelin/contracts/token/ERC20/ERC20"; - -const _abi = [ - { - inputs: [ - { - internalType: "string", - name: "name_", - type: "string", - }, - { - internalType: "string", - name: "symbol_", - type: "string", - }, - ], - stateMutability: "nonpayable", - type: "constructor", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "address", - name: "owner", - type: "address", - }, - { - indexed: true, - internalType: "address", - name: "spender", - type: "address", - }, - { - indexed: false, - internalType: "uint256", - name: "value", - type: "uint256", - }, - ], - name: "Approval", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "address", - name: "from", - type: "address", - }, - { - indexed: true, - internalType: "address", - name: "to", - type: "address", - }, - { - indexed: false, - internalType: "uint256", - name: "value", - type: "uint256", - }, - ], - name: "Transfer", - type: "event", - }, - { - inputs: [ - { - internalType: "address", - name: "owner", - type: "address", - }, - { - internalType: "address", - name: "spender", - type: "address", - }, - ], - name: "allowance", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "spender", - type: "address", - }, - { - internalType: "uint256", - name: "amount", - type: "uint256", - }, - ], - name: "approve", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "account", - type: "address", - }, - ], - name: "balanceOf", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "decimals", - outputs: [ - { - internalType: "uint8", - name: "", - type: "uint8", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "spender", - type: "address", - }, - { - internalType: "uint256", - name: "subtractedValue", - type: "uint256", - }, - ], - name: "decreaseAllowance", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "spender", - type: "address", - }, - { - internalType: "uint256", - name: "addedValue", - type: "uint256", - }, - ], - name: "increaseAllowance", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "name", - outputs: [ - { - internalType: "string", - name: "", - type: "string", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "symbol", - outputs: [ - { - internalType: "string", - name: "", - type: "string", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "totalSupply", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "to", - type: "address", - }, - { - internalType: "uint256", - name: "amount", - type: "uint256", - }, - ], - name: "transfer", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "from", - type: "address", - }, - { - internalType: "address", - name: "to", - type: "address", - }, - { - internalType: "uint256", - name: "amount", - type: "uint256", - }, - ], - name: "transferFrom", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "nonpayable", - type: "function", - }, -]; - -const _bytecode = - "0x60806040523480156200001157600080fd5b50604051620016203803806200162083398181016040528101906200003791906200019f565b81600390805190602001906200004f92919062000071565b5080600490805190602001906200006892919062000071565b505050620003a8565b8280546200007f90620002b9565b90600052602060002090601f016020900481019282620000a35760008555620000ef565b82601f10620000be57805160ff1916838001178555620000ef565b82800160010185558215620000ef579182015b82811115620000ee578251825591602001919060010190620000d1565b5b509050620000fe919062000102565b5090565b5b808211156200011d57600081600090555060010162000103565b5090565b60006200013862000132846200024d565b62000224565b90508281526020810184848401111562000157576200015662000388565b5b6200016484828562000283565b509392505050565b600082601f83011262000184576200018362000383565b5b81516200019684826020860162000121565b91505092915050565b60008060408385031215620001b957620001b862000392565b5b600083015167ffffffffffffffff811115620001da57620001d96200038d565b5b620001e8858286016200016c565b925050602083015167ffffffffffffffff8111156200020c576200020b6200038d565b5b6200021a858286016200016c565b9150509250929050565b60006200023062000243565b90506200023e8282620002ef565b919050565b6000604051905090565b600067ffffffffffffffff8211156200026b576200026a62000354565b5b620002768262000397565b9050602081019050919050565b60005b83811015620002a357808201518184015260208101905062000286565b83811115620002b3576000848401525b50505050565b60006002820490506001821680620002d257607f821691505b60208210811415620002e957620002e862000325565b5b50919050565b620002fa8262000397565b810181811067ffffffffffffffff821117156200031c576200031b62000354565b5b80604052505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600080fd5b600080fd5b600080fd5b600080fd5b6000601f19601f8301169050919050565b61126880620003b86000396000f3fe608060405234801561001057600080fd5b50600436106100a95760003560e01c80633950935111610071578063395093511461016857806370a082311461019857806395d89b41146101c8578063a457c2d7146101e6578063a9059cbb14610216578063dd62ed3e14610246576100a9565b806306fdde03146100ae578063095ea7b3146100cc57806318160ddd146100fc57806323b872dd1461011a578063313ce5671461014a575b600080fd5b6100b6610276565b6040516100c39190610d29565b60405180910390f35b6100e660048036038101906100e19190610b73565b610308565b6040516100f39190610d0e565b60405180910390f35b61010461032b565b6040516101119190610e2b565b60405180910390f35b610134600480360381019061012f9190610b20565b610335565b6040516101419190610d0e565b60405180910390f35b610152610364565b60405161015f9190610e46565b60405180910390f35b610182600480360381019061017d9190610b73565b61036d565b60405161018f9190610d0e565b60405180910390f35b6101b260048036038101906101ad9190610ab3565b6103a4565b6040516101bf9190610e2b565b60405180910390f35b6101d06103ec565b6040516101dd9190610d29565b60405180910390f35b61020060048036038101906101fb9190610b73565b61047e565b60405161020d9190610d0e565b60405180910390f35b610230600480360381019061022b9190610b73565b6104f5565b60405161023d9190610d0e565b60405180910390f35b610260600480360381019061025b9190610ae0565b610518565b60405161026d9190610e2b565b60405180910390f35b60606003805461028590610f5b565b80601f01602080910402602001604051908101604052809291908181526020018280546102b190610f5b565b80156102fe5780601f106102d3576101008083540402835291602001916102fe565b820191906000526020600020905b8154815290600101906020018083116102e157829003601f168201915b5050505050905090565b60008061031361059f565b90506103208185856105a7565b600191505092915050565b6000600254905090565b60008061034061059f565b905061034d858285610772565b6103588585856107fe565b60019150509392505050565b60006012905090565b60008061037861059f565b905061039981858561038a8589610518565b6103949190610e7d565b6105a7565b600191505092915050565b60008060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b6060600480546103fb90610f5b565b80601f016020809104026020016040519081016040528092919081815260200182805461042790610f5b565b80156104745780601f1061044957610100808354040283529160200191610474565b820191906000526020600020905b81548152906001019060200180831161045757829003601f168201915b5050505050905090565b60008061048961059f565b905060006104978286610518565b9050838110156104dc576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016104d390610e0b565b60405180910390fd5b6104e982868684036105a7565b60019250505092915050565b60008061050061059f565b905061050d8185856107fe565b600191505092915050565b6000600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415610617576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161060e90610deb565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415610687576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161067e90610d6b565b60405180910390fd5b80600160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925836040516107659190610e2b565b60405180910390a3505050565b600061077e8484610518565b90507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff81146107f857818110156107ea576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016107e190610d8b565b60405180910390fd5b6107f784848484036105a7565b5b50505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16141561086e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161086590610dcb565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614156108de576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016108d590610d4b565b60405180910390fd5b6108e9838383610a7f565b60008060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205490508181101561096f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161096690610dab565b60405180910390fd5b8181036000808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550816000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254610a029190610e7d565b925050819055508273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef84604051610a669190610e2b565b60405180910390a3610a79848484610a84565b50505050565b505050565b505050565b600081359050610a9881611204565b92915050565b600081359050610aad8161121b565b92915050565b600060208284031215610ac957610ac8610feb565b5b6000610ad784828501610a89565b91505092915050565b60008060408385031215610af757610af6610feb565b5b6000610b0585828601610a89565b9250506020610b1685828601610a89565b9150509250929050565b600080600060608486031215610b3957610b38610feb565b5b6000610b4786828701610a89565b9350506020610b5886828701610a89565b9250506040610b6986828701610a9e565b9150509250925092565b60008060408385031215610b8a57610b89610feb565b5b6000610b9885828601610a89565b9250506020610ba985828601610a9e565b9150509250929050565b610bbc81610ee5565b82525050565b6000610bcd82610e61565b610bd78185610e6c565b9350610be7818560208601610f28565b610bf081610ff0565b840191505092915050565b6000610c08602383610e6c565b9150610c1382611001565b604082019050919050565b6000610c2b602283610e6c565b9150610c3682611050565b604082019050919050565b6000610c4e601d83610e6c565b9150610c598261109f565b602082019050919050565b6000610c71602683610e6c565b9150610c7c826110c8565b604082019050919050565b6000610c94602583610e6c565b9150610c9f82611117565b604082019050919050565b6000610cb7602483610e6c565b9150610cc282611166565b604082019050919050565b6000610cda602583610e6c565b9150610ce5826111b5565b604082019050919050565b610cf981610f11565b82525050565b610d0881610f1b565b82525050565b6000602082019050610d236000830184610bb3565b92915050565b60006020820190508181036000830152610d438184610bc2565b905092915050565b60006020820190508181036000830152610d6481610bfb565b9050919050565b60006020820190508181036000830152610d8481610c1e565b9050919050565b60006020820190508181036000830152610da481610c41565b9050919050565b60006020820190508181036000830152610dc481610c64565b9050919050565b60006020820190508181036000830152610de481610c87565b9050919050565b60006020820190508181036000830152610e0481610caa565b9050919050565b60006020820190508181036000830152610e2481610ccd565b9050919050565b6000602082019050610e406000830184610cf0565b92915050565b6000602082019050610e5b6000830184610cff565b92915050565b600081519050919050565b600082825260208201905092915050565b6000610e8882610f11565b9150610e9383610f11565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff03821115610ec857610ec7610f8d565b5b828201905092915050565b6000610ede82610ef1565b9050919050565b60008115159050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b600060ff82169050919050565b60005b83811015610f46578082015181840152602081019050610f2b565b83811115610f55576000848401525b50505050565b60006002820490506001821680610f7357607f821691505b60208210811415610f8757610f86610fbc565b5b50919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b600080fd5b6000601f19601f8301169050919050565b7f45524332303a207472616e7366657220746f20746865207a65726f206164647260008201527f6573730000000000000000000000000000000000000000000000000000000000602082015250565b7f45524332303a20617070726f766520746f20746865207a65726f20616464726560008201527f7373000000000000000000000000000000000000000000000000000000000000602082015250565b7f45524332303a20696e73756666696369656e7420616c6c6f77616e6365000000600082015250565b7f45524332303a207472616e7366657220616d6f756e742065786365656473206260008201527f616c616e63650000000000000000000000000000000000000000000000000000602082015250565b7f45524332303a207472616e736665722066726f6d20746865207a65726f20616460008201527f6472657373000000000000000000000000000000000000000000000000000000602082015250565b7f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460008201527f7265737300000000000000000000000000000000000000000000000000000000602082015250565b7f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f7760008201527f207a65726f000000000000000000000000000000000000000000000000000000602082015250565b61120d81610ed3565b811461121857600080fd5b50565b61122481610f11565b811461122f57600080fd5b5056fea264697066735822122021da860480863b748c7dae8d44db86f49371c52f302ea966ecdbcdffdeaba44764736f6c63430008070033"; - -type ERC20ConstructorParams = - | [signer?: Signer] - | ConstructorParameters; - -const isSuperArgs = ( - xs: ERC20ConstructorParams -): xs is ConstructorParameters => xs.length > 1; - -export class ERC20__factory extends ContractFactory { - constructor(...args: ERC20ConstructorParams) { - if (isSuperArgs(args)) { - super(...args); - } else { - super(_abi, _bytecode, args[0]); - } - } - - override deploy( - name_: string, - symbol_: string, - overrides?: Overrides & { from?: string | Promise } - ): Promise { - return super.deploy(name_, symbol_, overrides || {}) as Promise; - } - override getDeployTransaction( - name_: string, - symbol_: string, - overrides?: Overrides & { from?: string | Promise } - ): TransactionRequest { - return super.getDeployTransaction(name_, symbol_, overrides || {}); - } - override attach(address: string): ERC20 { - return super.attach(address) as ERC20; - } - override connect(signer: Signer): ERC20__factory { - return super.connect(signer) as ERC20__factory; - } - - static readonly bytecode = _bytecode; - static readonly abi = _abi; - static createInterface(): ERC20Interface { - return new utils.Interface(_abi) as ERC20Interface; - } - static connect(address: string, signerOrProvider: Signer | Provider): ERC20 { - return new Contract(address, _abi, signerOrProvider) as ERC20; - } -} diff --git a/packages/interfaces/typechain-types/factories/@openzeppelin/contracts/token/ERC20/IERC20__factory.ts b/packages/interfaces/typechain-types/factories/@openzeppelin/contracts/token/ERC20/IERC20__factory.ts deleted file mode 100644 index 52ad5a1f..00000000 --- a/packages/interfaces/typechain-types/factories/@openzeppelin/contracts/token/ERC20/IERC20__factory.ts +++ /dev/null @@ -1,206 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ - -import { Contract, Signer, utils } from "ethers"; -import type { Provider } from "@ethersproject/providers"; -import type { - IERC20, - IERC20Interface, -} from "../../../../../@openzeppelin/contracts/token/ERC20/IERC20"; - -const _abi = [ - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "address", - name: "owner", - type: "address", - }, - { - indexed: true, - internalType: "address", - name: "spender", - type: "address", - }, - { - indexed: false, - internalType: "uint256", - name: "value", - type: "uint256", - }, - ], - name: "Approval", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "address", - name: "from", - type: "address", - }, - { - indexed: true, - internalType: "address", - name: "to", - type: "address", - }, - { - indexed: false, - internalType: "uint256", - name: "value", - type: "uint256", - }, - ], - name: "Transfer", - type: "event", - }, - { - inputs: [ - { - internalType: "address", - name: "owner", - type: "address", - }, - { - internalType: "address", - name: "spender", - type: "address", - }, - ], - name: "allowance", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "spender", - type: "address", - }, - { - internalType: "uint256", - name: "amount", - type: "uint256", - }, - ], - name: "approve", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "account", - type: "address", - }, - ], - name: "balanceOf", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "totalSupply", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "to", - type: "address", - }, - { - internalType: "uint256", - name: "amount", - type: "uint256", - }, - ], - name: "transfer", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "from", - type: "address", - }, - { - internalType: "address", - name: "to", - type: "address", - }, - { - internalType: "uint256", - name: "amount", - type: "uint256", - }, - ], - name: "transferFrom", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "nonpayable", - type: "function", - }, -]; - -export class IERC20__factory { - static readonly abi = _abi; - static createInterface(): IERC20Interface { - return new utils.Interface(_abi) as IERC20Interface; - } - static connect(address: string, signerOrProvider: Signer | Provider): IERC20 { - return new Contract(address, _abi, signerOrProvider) as IERC20; - } -} diff --git a/packages/interfaces/typechain-types/factories/@openzeppelin/contracts/token/ERC20/extensions/ERC20Burnable__factory.ts b/packages/interfaces/typechain-types/factories/@openzeppelin/contracts/token/ERC20/extensions/ERC20Burnable__factory.ts deleted file mode 100644 index 485144f2..00000000 --- a/packages/interfaces/typechain-types/factories/@openzeppelin/contracts/token/ERC20/extensions/ERC20Burnable__factory.ts +++ /dev/null @@ -1,327 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ - -import { Contract, Signer, utils } from "ethers"; -import type { Provider } from "@ethersproject/providers"; -import type { - ERC20Burnable, - ERC20BurnableInterface, -} from "../../../../../../@openzeppelin/contracts/token/ERC20/extensions/ERC20Burnable"; - -const _abi = [ - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "address", - name: "owner", - type: "address", - }, - { - indexed: true, - internalType: "address", - name: "spender", - type: "address", - }, - { - indexed: false, - internalType: "uint256", - name: "value", - type: "uint256", - }, - ], - name: "Approval", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "address", - name: "from", - type: "address", - }, - { - indexed: true, - internalType: "address", - name: "to", - type: "address", - }, - { - indexed: false, - internalType: "uint256", - name: "value", - type: "uint256", - }, - ], - name: "Transfer", - type: "event", - }, - { - inputs: [ - { - internalType: "address", - name: "owner", - type: "address", - }, - { - internalType: "address", - name: "spender", - type: "address", - }, - ], - name: "allowance", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "spender", - type: "address", - }, - { - internalType: "uint256", - name: "amount", - type: "uint256", - }, - ], - name: "approve", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "account", - type: "address", - }, - ], - name: "balanceOf", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "amount", - type: "uint256", - }, - ], - name: "burn", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "account", - type: "address", - }, - { - internalType: "uint256", - name: "amount", - type: "uint256", - }, - ], - name: "burnFrom", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "decimals", - outputs: [ - { - internalType: "uint8", - name: "", - type: "uint8", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "spender", - type: "address", - }, - { - internalType: "uint256", - name: "subtractedValue", - type: "uint256", - }, - ], - name: "decreaseAllowance", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "spender", - type: "address", - }, - { - internalType: "uint256", - name: "addedValue", - type: "uint256", - }, - ], - name: "increaseAllowance", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "name", - outputs: [ - { - internalType: "string", - name: "", - type: "string", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "symbol", - outputs: [ - { - internalType: "string", - name: "", - type: "string", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "totalSupply", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "to", - type: "address", - }, - { - internalType: "uint256", - name: "amount", - type: "uint256", - }, - ], - name: "transfer", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "from", - type: "address", - }, - { - internalType: "address", - name: "to", - type: "address", - }, - { - internalType: "uint256", - name: "amount", - type: "uint256", - }, - ], - name: "transferFrom", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "nonpayable", - type: "function", - }, -]; - -export class ERC20Burnable__factory { - static readonly abi = _abi; - static createInterface(): ERC20BurnableInterface { - return new utils.Interface(_abi) as ERC20BurnableInterface; - } - static connect( - address: string, - signerOrProvider: Signer | Provider - ): ERC20Burnable { - return new Contract(address, _abi, signerOrProvider) as ERC20Burnable; - } -} diff --git a/packages/interfaces/typechain-types/factories/@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata__factory.ts b/packages/interfaces/typechain-types/factories/@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata__factory.ts deleted file mode 100644 index a9ab7436..00000000 --- a/packages/interfaces/typechain-types/factories/@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata__factory.ts +++ /dev/null @@ -1,248 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ - -import { Contract, Signer, utils } from "ethers"; -import type { Provider } from "@ethersproject/providers"; -import type { - IERC20Metadata, - IERC20MetadataInterface, -} from "../../../../../../@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata"; - -const _abi = [ - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "address", - name: "owner", - type: "address", - }, - { - indexed: true, - internalType: "address", - name: "spender", - type: "address", - }, - { - indexed: false, - internalType: "uint256", - name: "value", - type: "uint256", - }, - ], - name: "Approval", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "address", - name: "from", - type: "address", - }, - { - indexed: true, - internalType: "address", - name: "to", - type: "address", - }, - { - indexed: false, - internalType: "uint256", - name: "value", - type: "uint256", - }, - ], - name: "Transfer", - type: "event", - }, - { - inputs: [ - { - internalType: "address", - name: "owner", - type: "address", - }, - { - internalType: "address", - name: "spender", - type: "address", - }, - ], - name: "allowance", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "spender", - type: "address", - }, - { - internalType: "uint256", - name: "amount", - type: "uint256", - }, - ], - name: "approve", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "account", - type: "address", - }, - ], - name: "balanceOf", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "decimals", - outputs: [ - { - internalType: "uint8", - name: "", - type: "uint8", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "name", - outputs: [ - { - internalType: "string", - name: "", - type: "string", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "symbol", - outputs: [ - { - internalType: "string", - name: "", - type: "string", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "totalSupply", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "to", - type: "address", - }, - { - internalType: "uint256", - name: "amount", - type: "uint256", - }, - ], - name: "transfer", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "from", - type: "address", - }, - { - internalType: "address", - name: "to", - type: "address", - }, - { - internalType: "uint256", - name: "amount", - type: "uint256", - }, - ], - name: "transferFrom", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "nonpayable", - type: "function", - }, -]; - -export class IERC20Metadata__factory { - static readonly abi = _abi; - static createInterface(): IERC20MetadataInterface { - return new utils.Interface(_abi) as IERC20MetadataInterface; - } - static connect( - address: string, - signerOrProvider: Signer | Provider - ): IERC20Metadata { - return new Contract(address, _abi, signerOrProvider) as IERC20Metadata; - } -} diff --git a/packages/interfaces/typechain-types/factories/@openzeppelin/contracts/token/ERC20/extensions/draft-IERC20Permit.sol/IERC20Permit__factory.ts b/packages/interfaces/typechain-types/factories/@openzeppelin/contracts/token/ERC20/extensions/draft-IERC20Permit.sol/IERC20Permit__factory.ts deleted file mode 100644 index 3c95eeca..00000000 --- a/packages/interfaces/typechain-types/factories/@openzeppelin/contracts/token/ERC20/extensions/draft-IERC20Permit.sol/IERC20Permit__factory.ts +++ /dev/null @@ -1,101 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ - -import { Contract, Signer, utils } from "ethers"; -import type { Provider } from "@ethersproject/providers"; -import type { - IERC20Permit, - IERC20PermitInterface, -} from "../../../../../../../@openzeppelin/contracts/token/ERC20/extensions/draft-IERC20Permit.sol/IERC20Permit"; - -const _abi = [ - { - inputs: [], - name: "DOMAIN_SEPARATOR", - outputs: [ - { - internalType: "bytes32", - name: "", - type: "bytes32", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "owner", - type: "address", - }, - ], - name: "nonces", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "owner", - type: "address", - }, - { - internalType: "address", - name: "spender", - type: "address", - }, - { - internalType: "uint256", - name: "value", - type: "uint256", - }, - { - internalType: "uint256", - name: "deadline", - type: "uint256", - }, - { - internalType: "uint8", - name: "v", - type: "uint8", - }, - { - internalType: "bytes32", - name: "r", - type: "bytes32", - }, - { - internalType: "bytes32", - name: "s", - type: "bytes32", - }, - ], - name: "permit", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, -]; - -export class IERC20Permit__factory { - static readonly abi = _abi; - static createInterface(): IERC20PermitInterface { - return new utils.Interface(_abi) as IERC20PermitInterface; - } - static connect( - address: string, - signerOrProvider: Signer | Provider - ): IERC20Permit { - return new Contract(address, _abi, signerOrProvider) as IERC20Permit; - } -} diff --git a/packages/interfaces/typechain-types/factories/@openzeppelin/contracts/token/ERC20/extensions/draft-IERC20Permit.sol/index.ts b/packages/interfaces/typechain-types/factories/@openzeppelin/contracts/token/ERC20/extensions/draft-IERC20Permit.sol/index.ts deleted file mode 100644 index 5f347d4a..00000000 --- a/packages/interfaces/typechain-types/factories/@openzeppelin/contracts/token/ERC20/extensions/draft-IERC20Permit.sol/index.ts +++ /dev/null @@ -1,4 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ -export { IERC20Permit__factory } from "./IERC20Permit__factory"; diff --git a/packages/interfaces/typechain-types/factories/@openzeppelin/contracts/token/ERC20/extensions/index.ts b/packages/interfaces/typechain-types/factories/@openzeppelin/contracts/token/ERC20/extensions/index.ts deleted file mode 100644 index 463124cc..00000000 --- a/packages/interfaces/typechain-types/factories/@openzeppelin/contracts/token/ERC20/extensions/index.ts +++ /dev/null @@ -1,6 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ -export * as draftIerc20PermitSol from "./draft-IERC20Permit.sol"; -export { ERC20Burnable__factory } from "./ERC20Burnable__factory"; -export { IERC20Metadata__factory } from "./IERC20Metadata__factory"; diff --git a/packages/interfaces/typechain-types/factories/@openzeppelin/contracts/token/ERC20/index.ts b/packages/interfaces/typechain-types/factories/@openzeppelin/contracts/token/ERC20/index.ts deleted file mode 100644 index 3523dc7a..00000000 --- a/packages/interfaces/typechain-types/factories/@openzeppelin/contracts/token/ERC20/index.ts +++ /dev/null @@ -1,6 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ -export * as extensions from "./extensions"; -export { ERC20__factory } from "./ERC20__factory"; -export { IERC20__factory } from "./IERC20__factory"; diff --git a/packages/interfaces/typechain-types/factories/@openzeppelin/contracts/token/index.ts b/packages/interfaces/typechain-types/factories/@openzeppelin/contracts/token/index.ts deleted file mode 100644 index da1e061e..00000000 --- a/packages/interfaces/typechain-types/factories/@openzeppelin/contracts/token/index.ts +++ /dev/null @@ -1,4 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ -export * as erc20 from "./ERC20"; diff --git a/packages/interfaces/typechain-types/factories/@openzeppelin/index.ts b/packages/interfaces/typechain-types/factories/@openzeppelin/index.ts deleted file mode 100644 index 6397da09..00000000 --- a/packages/interfaces/typechain-types/factories/@openzeppelin/index.ts +++ /dev/null @@ -1,4 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ -export * as contracts from "./contracts"; diff --git a/packages/interfaces/typechain-types/factories/@uniswap/index.ts b/packages/interfaces/typechain-types/factories/@uniswap/index.ts deleted file mode 100644 index b34b9840..00000000 --- a/packages/interfaces/typechain-types/factories/@uniswap/index.ts +++ /dev/null @@ -1,7 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ -export * as v2Core from "./v2-core"; -export * as v2Periphery from "./v2-periphery"; -export * as v3Core from "./v3-core"; -export * as v3Periphery from "./v3-periphery"; diff --git a/packages/interfaces/typechain-types/factories/@uniswap/v2-core/contracts/index.ts b/packages/interfaces/typechain-types/factories/@uniswap/v2-core/contracts/index.ts deleted file mode 100644 index 1d3444d5..00000000 --- a/packages/interfaces/typechain-types/factories/@uniswap/v2-core/contracts/index.ts +++ /dev/null @@ -1,4 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ -export * as interfaces from "./interfaces"; diff --git a/packages/interfaces/typechain-types/factories/@uniswap/v2-core/contracts/interfaces/IUniswapV2Factory__factory.ts b/packages/interfaces/typechain-types/factories/@uniswap/v2-core/contracts/interfaces/IUniswapV2Factory__factory.ts deleted file mode 100644 index c99bc76d..00000000 --- a/packages/interfaces/typechain-types/factories/@uniswap/v2-core/contracts/interfaces/IUniswapV2Factory__factory.ts +++ /dev/null @@ -1,189 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ - -import { Contract, Signer, utils } from "ethers"; -import type { Provider } from "@ethersproject/providers"; -import type { - IUniswapV2Factory, - IUniswapV2FactoryInterface, -} from "../../../../../@uniswap/v2-core/contracts/interfaces/IUniswapV2Factory"; - -const _abi = [ - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "address", - name: "token0", - type: "address", - }, - { - indexed: true, - internalType: "address", - name: "token1", - type: "address", - }, - { - indexed: false, - internalType: "address", - name: "pair", - type: "address", - }, - { - indexed: false, - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - name: "PairCreated", - type: "event", - }, - { - inputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - name: "allPairs", - outputs: [ - { - internalType: "address", - name: "pair", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "allPairsLength", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "tokenA", - type: "address", - }, - { - internalType: "address", - name: "tokenB", - type: "address", - }, - ], - name: "createPair", - outputs: [ - { - internalType: "address", - name: "pair", - type: "address", - }, - ], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "feeTo", - outputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "feeToSetter", - outputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "tokenA", - type: "address", - }, - { - internalType: "address", - name: "tokenB", - type: "address", - }, - ], - name: "getPair", - outputs: [ - { - internalType: "address", - name: "pair", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - name: "setFeeTo", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - name: "setFeeToSetter", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, -]; - -export class IUniswapV2Factory__factory { - static readonly abi = _abi; - static createInterface(): IUniswapV2FactoryInterface { - return new utils.Interface(_abi) as IUniswapV2FactoryInterface; - } - static connect( - address: string, - signerOrProvider: Signer | Provider - ): IUniswapV2Factory { - return new Contract(address, _abi, signerOrProvider) as IUniswapV2Factory; - } -} diff --git a/packages/interfaces/typechain-types/factories/@uniswap/v2-core/contracts/interfaces/IUniswapV2Pair__factory.ts b/packages/interfaces/typechain-types/factories/@uniswap/v2-core/contracts/interfaces/IUniswapV2Pair__factory.ts deleted file mode 100644 index 4c757ca1..00000000 --- a/packages/interfaces/typechain-types/factories/@uniswap/v2-core/contracts/interfaces/IUniswapV2Pair__factory.ts +++ /dev/null @@ -1,677 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ - -import { Contract, Signer, utils } from "ethers"; -import type { Provider } from "@ethersproject/providers"; -import type { - IUniswapV2Pair, - IUniswapV2PairInterface, -} from "../../../../../@uniswap/v2-core/contracts/interfaces/IUniswapV2Pair"; - -const _abi = [ - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "address", - name: "owner", - type: "address", - }, - { - indexed: true, - internalType: "address", - name: "spender", - type: "address", - }, - { - indexed: false, - internalType: "uint256", - name: "value", - type: "uint256", - }, - ], - name: "Approval", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "address", - name: "sender", - type: "address", - }, - { - indexed: false, - internalType: "uint256", - name: "amount0", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "amount1", - type: "uint256", - }, - { - indexed: true, - internalType: "address", - name: "to", - type: "address", - }, - ], - name: "Burn", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "address", - name: "sender", - type: "address", - }, - { - indexed: false, - internalType: "uint256", - name: "amount0", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "amount1", - type: "uint256", - }, - ], - name: "Mint", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "address", - name: "sender", - type: "address", - }, - { - indexed: false, - internalType: "uint256", - name: "amount0In", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "amount1In", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "amount0Out", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "amount1Out", - type: "uint256", - }, - { - indexed: true, - internalType: "address", - name: "to", - type: "address", - }, - ], - name: "Swap", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: "uint112", - name: "reserve0", - type: "uint112", - }, - { - indexed: false, - internalType: "uint112", - name: "reserve1", - type: "uint112", - }, - ], - name: "Sync", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "address", - name: "from", - type: "address", - }, - { - indexed: true, - internalType: "address", - name: "to", - type: "address", - }, - { - indexed: false, - internalType: "uint256", - name: "value", - type: "uint256", - }, - ], - name: "Transfer", - type: "event", - }, - { - inputs: [], - name: "DOMAIN_SEPARATOR", - outputs: [ - { - internalType: "bytes32", - name: "", - type: "bytes32", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "MINIMUM_LIQUIDITY", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "pure", - type: "function", - }, - { - inputs: [], - name: "PERMIT_TYPEHASH", - outputs: [ - { - internalType: "bytes32", - name: "", - type: "bytes32", - }, - ], - stateMutability: "pure", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "owner", - type: "address", - }, - { - internalType: "address", - name: "spender", - type: "address", - }, - ], - name: "allowance", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "spender", - type: "address", - }, - { - internalType: "uint256", - name: "value", - type: "uint256", - }, - ], - name: "approve", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "owner", - type: "address", - }, - ], - name: "balanceOf", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "to", - type: "address", - }, - ], - name: "burn", - outputs: [ - { - internalType: "uint256", - name: "amount0", - type: "uint256", - }, - { - internalType: "uint256", - name: "amount1", - type: "uint256", - }, - ], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "decimals", - outputs: [ - { - internalType: "uint8", - name: "", - type: "uint8", - }, - ], - stateMutability: "pure", - type: "function", - }, - { - inputs: [], - name: "factory", - outputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "getReserves", - outputs: [ - { - internalType: "uint112", - name: "reserve0", - type: "uint112", - }, - { - internalType: "uint112", - name: "reserve1", - type: "uint112", - }, - { - internalType: "uint32", - name: "blockTimestampLast", - type: "uint32", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - { - internalType: "address", - name: "", - type: "address", - }, - ], - name: "initialize", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "kLast", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "to", - type: "address", - }, - ], - name: "mint", - outputs: [ - { - internalType: "uint256", - name: "liquidity", - type: "uint256", - }, - ], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "name", - outputs: [ - { - internalType: "string", - name: "", - type: "string", - }, - ], - stateMutability: "pure", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "owner", - type: "address", - }, - ], - name: "nonces", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "owner", - type: "address", - }, - { - internalType: "address", - name: "spender", - type: "address", - }, - { - internalType: "uint256", - name: "value", - type: "uint256", - }, - { - internalType: "uint256", - name: "deadline", - type: "uint256", - }, - { - internalType: "uint8", - name: "v", - type: "uint8", - }, - { - internalType: "bytes32", - name: "r", - type: "bytes32", - }, - { - internalType: "bytes32", - name: "s", - type: "bytes32", - }, - ], - name: "permit", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "price0CumulativeLast", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "price1CumulativeLast", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "to", - type: "address", - }, - ], - name: "skim", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "amount0Out", - type: "uint256", - }, - { - internalType: "uint256", - name: "amount1Out", - type: "uint256", - }, - { - internalType: "address", - name: "to", - type: "address", - }, - { - internalType: "bytes", - name: "data", - type: "bytes", - }, - ], - name: "swap", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "symbol", - outputs: [ - { - internalType: "string", - name: "", - type: "string", - }, - ], - stateMutability: "pure", - type: "function", - }, - { - inputs: [], - name: "sync", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "token0", - outputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "token1", - outputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "totalSupply", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "to", - type: "address", - }, - { - internalType: "uint256", - name: "value", - type: "uint256", - }, - ], - name: "transfer", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "from", - type: "address", - }, - { - internalType: "address", - name: "to", - type: "address", - }, - { - internalType: "uint256", - name: "value", - type: "uint256", - }, - ], - name: "transferFrom", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "nonpayable", - type: "function", - }, -]; - -export class IUniswapV2Pair__factory { - static readonly abi = _abi; - static createInterface(): IUniswapV2PairInterface { - return new utils.Interface(_abi) as IUniswapV2PairInterface; - } - static connect( - address: string, - signerOrProvider: Signer | Provider - ): IUniswapV2Pair { - return new Contract(address, _abi, signerOrProvider) as IUniswapV2Pair; - } -} diff --git a/packages/interfaces/typechain-types/factories/@uniswap/v2-core/contracts/interfaces/index.ts b/packages/interfaces/typechain-types/factories/@uniswap/v2-core/contracts/interfaces/index.ts deleted file mode 100644 index 7ae5955d..00000000 --- a/packages/interfaces/typechain-types/factories/@uniswap/v2-core/contracts/interfaces/index.ts +++ /dev/null @@ -1,5 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ -export { IUniswapV2Factory__factory } from "./IUniswapV2Factory__factory"; -export { IUniswapV2Pair__factory } from "./IUniswapV2Pair__factory"; diff --git a/packages/interfaces/typechain-types/factories/@uniswap/v2-core/index.ts b/packages/interfaces/typechain-types/factories/@uniswap/v2-core/index.ts deleted file mode 100644 index 6397da09..00000000 --- a/packages/interfaces/typechain-types/factories/@uniswap/v2-core/index.ts +++ /dev/null @@ -1,4 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ -export * as contracts from "./contracts"; diff --git a/packages/interfaces/typechain-types/factories/@uniswap/v2-periphery/contracts/UniswapV2Router02__factory.ts b/packages/interfaces/typechain-types/factories/@uniswap/v2-periphery/contracts/UniswapV2Router02__factory.ts deleted file mode 100644 index 1db22e7b..00000000 --- a/packages/interfaces/typechain-types/factories/@uniswap/v2-periphery/contracts/UniswapV2Router02__factory.ts +++ /dev/null @@ -1,1041 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ -import { Signer, utils, Contract, ContractFactory, Overrides } from "ethers"; -import type { Provider, TransactionRequest } from "@ethersproject/providers"; -import type { - UniswapV2Router02, - UniswapV2Router02Interface, -} from "../../../../@uniswap/v2-periphery/contracts/UniswapV2Router02"; - -const _abi = [ - { - inputs: [ - { - internalType: "address", - name: "_factory", - type: "address", - }, - { - internalType: "address", - name: "_WETH", - type: "address", - }, - ], - stateMutability: "nonpayable", - type: "constructor", - }, - { - inputs: [], - name: "WETH", - outputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "tokenA", - type: "address", - }, - { - internalType: "address", - name: "tokenB", - type: "address", - }, - { - internalType: "uint256", - name: "amountADesired", - type: "uint256", - }, - { - internalType: "uint256", - name: "amountBDesired", - type: "uint256", - }, - { - internalType: "uint256", - name: "amountAMin", - type: "uint256", - }, - { - internalType: "uint256", - name: "amountBMin", - type: "uint256", - }, - { - internalType: "address", - name: "to", - type: "address", - }, - { - internalType: "uint256", - name: "deadline", - type: "uint256", - }, - ], - name: "addLiquidity", - outputs: [ - { - internalType: "uint256", - name: "amountA", - type: "uint256", - }, - { - internalType: "uint256", - name: "amountB", - type: "uint256", - }, - { - internalType: "uint256", - name: "liquidity", - type: "uint256", - }, - ], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "token", - type: "address", - }, - { - internalType: "uint256", - name: "amountTokenDesired", - type: "uint256", - }, - { - internalType: "uint256", - name: "amountTokenMin", - type: "uint256", - }, - { - internalType: "uint256", - name: "amountETHMin", - type: "uint256", - }, - { - internalType: "address", - name: "to", - type: "address", - }, - { - internalType: "uint256", - name: "deadline", - type: "uint256", - }, - ], - name: "addLiquidityETH", - outputs: [ - { - internalType: "uint256", - name: "amountToken", - type: "uint256", - }, - { - internalType: "uint256", - name: "amountETH", - type: "uint256", - }, - { - internalType: "uint256", - name: "liquidity", - type: "uint256", - }, - ], - stateMutability: "payable", - type: "function", - }, - { - inputs: [], - name: "factory", - outputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "amountOut", - type: "uint256", - }, - { - internalType: "uint256", - name: "reserveIn", - type: "uint256", - }, - { - internalType: "uint256", - name: "reserveOut", - type: "uint256", - }, - ], - name: "getAmountIn", - outputs: [ - { - internalType: "uint256", - name: "amountIn", - type: "uint256", - }, - ], - stateMutability: "pure", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "amountIn", - type: "uint256", - }, - { - internalType: "uint256", - name: "reserveIn", - type: "uint256", - }, - { - internalType: "uint256", - name: "reserveOut", - type: "uint256", - }, - ], - name: "getAmountOut", - outputs: [ - { - internalType: "uint256", - name: "amountOut", - type: "uint256", - }, - ], - stateMutability: "pure", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "amountOut", - type: "uint256", - }, - { - internalType: "address[]", - name: "path", - type: "address[]", - }, - ], - name: "getAmountsIn", - outputs: [ - { - internalType: "uint256[]", - name: "amounts", - type: "uint256[]", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "amountIn", - type: "uint256", - }, - { - internalType: "address[]", - name: "path", - type: "address[]", - }, - ], - name: "getAmountsOut", - outputs: [ - { - internalType: "uint256[]", - name: "amounts", - type: "uint256[]", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "amountA", - type: "uint256", - }, - { - internalType: "uint256", - name: "reserveA", - type: "uint256", - }, - { - internalType: "uint256", - name: "reserveB", - type: "uint256", - }, - ], - name: "quote", - outputs: [ - { - internalType: "uint256", - name: "amountB", - type: "uint256", - }, - ], - stateMutability: "pure", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "tokenA", - type: "address", - }, - { - internalType: "address", - name: "tokenB", - type: "address", - }, - { - internalType: "uint256", - name: "liquidity", - type: "uint256", - }, - { - internalType: "uint256", - name: "amountAMin", - type: "uint256", - }, - { - internalType: "uint256", - name: "amountBMin", - type: "uint256", - }, - { - internalType: "address", - name: "to", - type: "address", - }, - { - internalType: "uint256", - name: "deadline", - type: "uint256", - }, - ], - name: "removeLiquidity", - outputs: [ - { - internalType: "uint256", - name: "amountA", - type: "uint256", - }, - { - internalType: "uint256", - name: "amountB", - type: "uint256", - }, - ], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "token", - type: "address", - }, - { - internalType: "uint256", - name: "liquidity", - type: "uint256", - }, - { - internalType: "uint256", - name: "amountTokenMin", - type: "uint256", - }, - { - internalType: "uint256", - name: "amountETHMin", - type: "uint256", - }, - { - internalType: "address", - name: "to", - type: "address", - }, - { - internalType: "uint256", - name: "deadline", - type: "uint256", - }, - ], - name: "removeLiquidityETH", - outputs: [ - { - internalType: "uint256", - name: "amountToken", - type: "uint256", - }, - { - internalType: "uint256", - name: "amountETH", - type: "uint256", - }, - ], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "token", - type: "address", - }, - { - internalType: "uint256", - name: "liquidity", - type: "uint256", - }, - { - internalType: "uint256", - name: "amountTokenMin", - type: "uint256", - }, - { - internalType: "uint256", - name: "amountETHMin", - type: "uint256", - }, - { - internalType: "address", - name: "to", - type: "address", - }, - { - internalType: "uint256", - name: "deadline", - type: "uint256", - }, - ], - name: "removeLiquidityETHSupportingFeeOnTransferTokens", - outputs: [ - { - internalType: "uint256", - name: "amountETH", - type: "uint256", - }, - ], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "token", - type: "address", - }, - { - internalType: "uint256", - name: "liquidity", - type: "uint256", - }, - { - internalType: "uint256", - name: "amountTokenMin", - type: "uint256", - }, - { - internalType: "uint256", - name: "amountETHMin", - type: "uint256", - }, - { - internalType: "address", - name: "to", - type: "address", - }, - { - internalType: "uint256", - name: "deadline", - type: "uint256", - }, - { - internalType: "bool", - name: "approveMax", - type: "bool", - }, - { - internalType: "uint8", - name: "v", - type: "uint8", - }, - { - internalType: "bytes32", - name: "r", - type: "bytes32", - }, - { - internalType: "bytes32", - name: "s", - type: "bytes32", - }, - ], - name: "removeLiquidityETHWithPermit", - outputs: [ - { - internalType: "uint256", - name: "amountToken", - type: "uint256", - }, - { - internalType: "uint256", - name: "amountETH", - type: "uint256", - }, - ], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "token", - type: "address", - }, - { - internalType: "uint256", - name: "liquidity", - type: "uint256", - }, - { - internalType: "uint256", - name: "amountTokenMin", - type: "uint256", - }, - { - internalType: "uint256", - name: "amountETHMin", - type: "uint256", - }, - { - internalType: "address", - name: "to", - type: "address", - }, - { - internalType: "uint256", - name: "deadline", - type: "uint256", - }, - { - internalType: "bool", - name: "approveMax", - type: "bool", - }, - { - internalType: "uint8", - name: "v", - type: "uint8", - }, - { - internalType: "bytes32", - name: "r", - type: "bytes32", - }, - { - internalType: "bytes32", - name: "s", - type: "bytes32", - }, - ], - name: "removeLiquidityETHWithPermitSupportingFeeOnTransferTokens", - outputs: [ - { - internalType: "uint256", - name: "amountETH", - type: "uint256", - }, - ], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "tokenA", - type: "address", - }, - { - internalType: "address", - name: "tokenB", - type: "address", - }, - { - internalType: "uint256", - name: "liquidity", - type: "uint256", - }, - { - internalType: "uint256", - name: "amountAMin", - type: "uint256", - }, - { - internalType: "uint256", - name: "amountBMin", - type: "uint256", - }, - { - internalType: "address", - name: "to", - type: "address", - }, - { - internalType: "uint256", - name: "deadline", - type: "uint256", - }, - { - internalType: "bool", - name: "approveMax", - type: "bool", - }, - { - internalType: "uint8", - name: "v", - type: "uint8", - }, - { - internalType: "bytes32", - name: "r", - type: "bytes32", - }, - { - internalType: "bytes32", - name: "s", - type: "bytes32", - }, - ], - name: "removeLiquidityWithPermit", - outputs: [ - { - internalType: "uint256", - name: "amountA", - type: "uint256", - }, - { - internalType: "uint256", - name: "amountB", - type: "uint256", - }, - ], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "amountOut", - type: "uint256", - }, - { - internalType: "address[]", - name: "path", - type: "address[]", - }, - { - internalType: "address", - name: "to", - type: "address", - }, - { - internalType: "uint256", - name: "deadline", - type: "uint256", - }, - ], - name: "swapETHForExactTokens", - outputs: [ - { - internalType: "uint256[]", - name: "amounts", - type: "uint256[]", - }, - ], - stateMutability: "payable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "amountOutMin", - type: "uint256", - }, - { - internalType: "address[]", - name: "path", - type: "address[]", - }, - { - internalType: "address", - name: "to", - type: "address", - }, - { - internalType: "uint256", - name: "deadline", - type: "uint256", - }, - ], - name: "swapExactETHForTokens", - outputs: [ - { - internalType: "uint256[]", - name: "amounts", - type: "uint256[]", - }, - ], - stateMutability: "payable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "amountOutMin", - type: "uint256", - }, - { - internalType: "address[]", - name: "path", - type: "address[]", - }, - { - internalType: "address", - name: "to", - type: "address", - }, - { - internalType: "uint256", - name: "deadline", - type: "uint256", - }, - ], - name: "swapExactETHForTokensSupportingFeeOnTransferTokens", - outputs: [], - stateMutability: "payable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "amountIn", - type: "uint256", - }, - { - internalType: "uint256", - name: "amountOutMin", - type: "uint256", - }, - { - internalType: "address[]", - name: "path", - type: "address[]", - }, - { - internalType: "address", - name: "to", - type: "address", - }, - { - internalType: "uint256", - name: "deadline", - type: "uint256", - }, - ], - name: "swapExactTokensForETH", - outputs: [ - { - internalType: "uint256[]", - name: "amounts", - type: "uint256[]", - }, - ], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "amountIn", - type: "uint256", - }, - { - internalType: "uint256", - name: "amountOutMin", - type: "uint256", - }, - { - internalType: "address[]", - name: "path", - type: "address[]", - }, - { - internalType: "address", - name: "to", - type: "address", - }, - { - internalType: "uint256", - name: "deadline", - type: "uint256", - }, - ], - name: "swapExactTokensForETHSupportingFeeOnTransferTokens", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "amountIn", - type: "uint256", - }, - { - internalType: "uint256", - name: "amountOutMin", - type: "uint256", - }, - { - internalType: "address[]", - name: "path", - type: "address[]", - }, - { - internalType: "address", - name: "to", - type: "address", - }, - { - internalType: "uint256", - name: "deadline", - type: "uint256", - }, - ], - name: "swapExactTokensForTokens", - outputs: [ - { - internalType: "uint256[]", - name: "amounts", - type: "uint256[]", - }, - ], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "amountIn", - type: "uint256", - }, - { - internalType: "uint256", - name: "amountOutMin", - type: "uint256", - }, - { - internalType: "address[]", - name: "path", - type: "address[]", - }, - { - internalType: "address", - name: "to", - type: "address", - }, - { - internalType: "uint256", - name: "deadline", - type: "uint256", - }, - ], - name: "swapExactTokensForTokensSupportingFeeOnTransferTokens", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "amountOut", - type: "uint256", - }, - { - internalType: "uint256", - name: "amountInMax", - type: "uint256", - }, - { - internalType: "address[]", - name: "path", - type: "address[]", - }, - { - internalType: "address", - name: "to", - type: "address", - }, - { - internalType: "uint256", - name: "deadline", - type: "uint256", - }, - ], - name: "swapTokensForExactETH", - outputs: [ - { - internalType: "uint256[]", - name: "amounts", - type: "uint256[]", - }, - ], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "amountOut", - type: "uint256", - }, - { - internalType: "uint256", - name: "amountInMax", - type: "uint256", - }, - { - internalType: "address[]", - name: "path", - type: "address[]", - }, - { - internalType: "address", - name: "to", - type: "address", - }, - { - internalType: "uint256", - name: "deadline", - type: "uint256", - }, - ], - name: "swapTokensForExactTokens", - outputs: [ - { - internalType: "uint256[]", - name: "amounts", - type: "uint256[]", - }, - ], - stateMutability: "nonpayable", - type: "function", - }, - { - stateMutability: "payable", - type: "receive", - }, -]; - -const _bytecode = - "0x60c06040523480156200001157600080fd5b5060405162006b1038038062006b10833981810160405260408110156200003757600080fd5b8101908080519060200190929190805190602001909291905050508173ffffffffffffffffffffffffffffffffffffffff1660808173ffffffffffffffffffffffffffffffffffffffff1660601b815250508073ffffffffffffffffffffffffffffffffffffffff1660a08173ffffffffffffffffffffffffffffffffffffffff1660601b81525050505060805160601c60a05160601c6169076200020960003980610156528061157452806115b252806116e252806119c05280611f34528061220f528061230552806128a55280612a925280612bc55280612cdd5280612ea55280612f3a528061338e52806134455280613538528061364f528061373e52806137bf5280613fb6528061435452806143ad52806143e1528061446252806146a2528061486752806148fc5250806117d452806118e05280611a935280611acb5280611cc45280611dd05280612026528061212f52806122e3528061251f52806129c55280612dca5280612f79528061319a52806132a352806137fe5280613c315280613f335280613f5c5280613f9452806141c6528061438b528061478f528061493b528061553a528061557e52806158f35280615b5a528061614b5280616273528061638952506169076000f3fe60806040526004361061014f5760003560e01c80638803dbee116100b6578063c45a01551161006f578063c45a015514611001578063d06ca61f14611058578063ded9382a1461117c578063e8e337001461125e578063f305d71914611344578063fb3bdb41146113f2576101ab565b80638803dbee14610c00578063ad5c464814610d19578063ad615dec14610d70578063af2979eb14610dd3578063b6f9de9514610e80578063baa2abde14610f2d576101ab565b80634a25d94a116101085780634a25d94a1461071f5780635b0d5984146108385780635c11d79514610913578063791ac947146109d75780637ff36ab514610a9b57806385f8c25914610b9d576101ab565b806302751cec146101b0578063054d50d41461026457806318cbafe5146102c75780631f00ca74146103e05780632195995c1461050457806338ed173914610606576101ab565b366101ab577f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146101a957fe5b005b600080fd5b3480156101bc57600080fd5b50610247600480360360c08110156101d357600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291908035906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506114f4565b604051808381526020018281526020019250505060405180910390f35b34801561027057600080fd5b506102b16004803603606081101561028757600080fd5b81019080803590602001909291908035906020019092919080359060200190929190505050611651565b6040518082815260200191505060405180910390f35b3480156102d357600080fd5b50610389600480360360a08110156102ea57600080fd5b8101908080359060200190929190803590602001909291908035906020019064010000000081111561031b57600080fd5b82018360208201111561032d57600080fd5b8035906020019184602083028401116401000000008311171561034f57600080fd5b9091929391929390803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050611667565b6040518080602001828103825283818151815260200191508051906020019060200280838360005b838110156103cc5780820151818401526020810190506103b1565b505050509050019250505060405180910390f35b3480156103ec57600080fd5b506104ad6004803603604081101561040357600080fd5b81019080803590602001909291908035906020019064010000000081111561042a57600080fd5b82018360208201111561043c57600080fd5b8035906020019184602083028401116401000000008311171561045e57600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f820116905080830192505050505050509192919290505050611a8c565b6040518080602001828103825283818151815260200191508051906020019060200280838360005b838110156104f05780820151818401526020810190506104d5565b505050509050019250505060405180910390f35b34801561051057600080fd5b506105e9600480360361016081101561052857600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291908035906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803515159060200190929190803560ff1690602001909291908035906020019092919080359060200190929190505050611ac1565b604051808381526020018281526020019250505060405180910390f35b34801561061257600080fd5b506106c8600480360360a081101561062957600080fd5b8101908080359060200190929190803590602001909291908035906020019064010000000081111561065a57600080fd5b82018360208201111561066c57600080fd5b8035906020019184602083028401116401000000008311171561068e57600080fd5b9091929391929390803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050611c46565b6040518080602001828103825283818151815260200191508051906020019060200280838360005b8381101561070b5780820151818401526020810190506106f0565b505050509050019250505060405180910390f35b34801561072b57600080fd5b506107e1600480360360a081101561074257600080fd5b8101908080359060200190929190803590602001909291908035906020019064010000000081111561077357600080fd5b82018360208201111561078557600080fd5b803590602001918460208302840111640100000000831117156107a757600080fd5b9091929391929390803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050611eb9565b6040518080602001828103825283818151815260200191508051906020019060200280838360005b83811015610824578082015181840152602081019050610809565b505050509050019250505060405180910390f35b34801561084457600080fd5b506108fd600480360361014081101561085c57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291908035906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803515159060200190929190803560ff16906020019092919080359060200190929190803590602001909291905050506122db565b6040518082815260200191505060405180910390f35b34801561091f57600080fd5b506109d5600480360360a081101561093657600080fd5b8101908080359060200190929190803590602001909291908035906020019064010000000081111561096757600080fd5b82018360208201111561097957600080fd5b8035906020019184602083028401116401000000008311171561099b57600080fd5b9091929391929390803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050612475565b005b3480156109e357600080fd5b50610a99600480360360a08110156109fa57600080fd5b81019080803590602001909291908035906020019092919080359060200190640100000000811115610a2b57600080fd5b820183602082011115610a3d57600080fd5b80359060200191846020830284011164010000000083111715610a5f57600080fd5b9091929391929390803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919050505061282c565b005b610b4660048036036080811015610ab157600080fd5b810190808035906020019092919080359060200190640100000000811115610ad857600080fd5b820183602082011115610aea57600080fd5b80359060200191846020830284011164010000000083111715610b0c57600080fd5b9091929391929390803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050612c62565b6040518080602001828103825283818151815260200191508051906020019060200280838360005b83811015610b89578082015181840152602081019050610b6e565b505050509050019250505060405180910390f35b348015610ba957600080fd5b50610bea60048036036060811015610bc057600080fd5b81019080803590602001909291908035906020019092919080359060200190929190505050613106565b6040518082815260200191505060405180910390f35b348015610c0c57600080fd5b50610cc2600480360360a0811015610c2357600080fd5b81019080803590602001909291908035906020019092919080359060200190640100000000811115610c5457600080fd5b820183602082011115610c6657600080fd5b80359060200191846020830284011164010000000083111715610c8857600080fd5b9091929391929390803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919050505061311c565b6040518080602001828103825283818151815260200191508051906020019060200280838360005b83811015610d05578082015181840152602081019050610cea565b505050509050019250505060405180910390f35b348015610d2557600080fd5b50610d2e61338c565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b348015610d7c57600080fd5b50610dbd60048036036060811015610d9357600080fd5b810190808035906020019092919080359060200190929190803590602001909291905050506133b0565b6040518082815260200191505060405180910390f35b348015610ddf57600080fd5b50610e6a600480360360c0811015610df657600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291908035906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506133c6565b6040518082815260200191505060405180910390f35b610f2b60048036036080811015610e9657600080fd5b810190808035906020019092919080359060200190640100000000811115610ebd57600080fd5b820183602082011115610ecf57600080fd5b80359060200191846020830284011164010000000083111715610ef157600080fd5b9091929391929390803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506135d6565b005b348015610f3957600080fd5b50610fe4600480360360e0811015610f5057600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291908035906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050613bb0565b604051808381526020018281526020019250505060405180910390f35b34801561100d57600080fd5b50611016613f31565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561106457600080fd5b506111256004803603604081101561107b57600080fd5b8101908080359060200190929190803590602001906401000000008111156110a257600080fd5b8201836020820111156110b457600080fd5b803590602001918460208302840111640100000000831117156110d657600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f820116905080830192505050505050509192919290505050613f55565b6040518080602001828103825283818151815260200191508051906020019060200280838360005b8381101561116857808201518184015260208101905061114d565b505050509050019250505060405180910390f35b34801561118857600080fd5b5061124160048036036101408110156111a057600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291908035906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803515159060200190929190803560ff1690602001909291908035906020019092919080359060200190929190505050613f8a565b604051808381526020018281526020019250505060405180910390f35b34801561126a57600080fd5b50611320600480360361010081101561128257600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803590602001909291908035906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919050505061412d565b60405180848152602001838152602001828152602001935050505060405180910390f35b6113ce600480360360c081101561135a57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291908035906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506142d2565b60405180848152602001838152602001828152602001935050505060405180910390f35b61149d6004803603608081101561140857600080fd5b81019080803590602001909291908035906020019064010000000081111561142f57600080fd5b82018360208201111561144157600080fd5b8035906020019184602083028401116401000000008311171561146357600080fd5b9091929391929390803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050614627565b6040518080602001828103825283818151815260200191508051906020019060200280838360005b838110156114e05780820151818401526020810190506114c5565b505050509050019250505060405180910390f35b600080824281101561156e576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260188152602001807f556e69737761705632526f757465723a2045585049524544000000000000000081525060200191505060405180910390fd5b61159d897f00000000000000000000000000000000000000000000000000000000000000008a8a8a308a613bb0565b80935081945050506115b0898685614b05565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16632e1a7d4d836040518263ffffffff1660e01b815260040180828152602001915050600060405180830381600087803b15801561162357600080fd5b505af1158015611637573d6000803e3d6000fd5b505050506116458583614cfe565b50965096945050505050565b600061165e848484614e5d565b90509392505050565b606081428110156116e0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260188152602001807f556e69737761705632526f757465723a2045585049524544000000000000000081525060200191505060405180910390fd5b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1686866001898990500381811061172957fe5b9050602002013573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146117cf576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601d8152602001807f556e69737761705632526f757465723a20494e56414c49445f5041544800000081525060200191505060405180910390fd5b61183b7f000000000000000000000000000000000000000000000000000000000000000089888880806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f82011690508083019250505050505050614f8d565b9150868260018451038151811061184e57fe5b602002602001015110156118ad576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602b815260200180616858602b913960400191505060405180910390fd5b611972868660008181106118bd57fe5b9050602002013573ffffffffffffffffffffffffffffffffffffffff16336119587f00000000000000000000000000000000000000000000000000000000000000008a8a600081811061190c57fe5b9050602002013573ffffffffffffffffffffffffffffffffffffffff168b8b600181811061193657fe5b9050602002013573ffffffffffffffffffffffffffffffffffffffff16615105565b8560008151811061196557fe5b6020026020010151615260565b6119be82878780806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f8201169050808301925050505050505030615471565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16632e1a7d4d83600185510381518110611a0a57fe5b60200260200101516040518263ffffffff1660e01b815260040180828152602001915050600060405180830381600087803b158015611a4857600080fd5b505af1158015611a5c573d6000803e3d6000fd5b50505050611a818483600185510381518110611a7457fe5b6020026020010151614cfe565b509695505050505050565b6060611ab97f0000000000000000000000000000000000000000000000000000000000000000848461571c565b905092915050565b6000806000611af17f00000000000000000000000000000000000000000000000000000000000000008f8f615105565b9050600087611b00578c611b22565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff5b90508173ffffffffffffffffffffffffffffffffffffffff1663d505accf3330848d8c8c8c6040518863ffffffff1660e01b8152600401808873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018681526020018581526020018460ff1660ff168152602001838152602001828152602001975050505050505050600060405180830381600087803b158015611c0557600080fd5b505af1158015611c19573d6000803e3d6000fd5b50505050611c2c8f8f8f8f8f8f8f613bb0565b809450819550505050509b509b9950505050505050505050565b60608142811015611cbf576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260188152602001807f556e69737761705632526f757465723a2045585049524544000000000000000081525060200191505060405180910390fd5b611d2b7f000000000000000000000000000000000000000000000000000000000000000089888880806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f82011690508083019250505050505050614f8d565b91508682600184510381518110611d3e57fe5b60200260200101511015611d9d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602b815260200180616858602b913960400191505060405180910390fd5b611e6286866000818110611dad57fe5b9050602002013573ffffffffffffffffffffffffffffffffffffffff1633611e487f00000000000000000000000000000000000000000000000000000000000000008a8a6000818110611dfc57fe5b9050602002013573ffffffffffffffffffffffffffffffffffffffff168b8b6001818110611e2657fe5b9050602002013573ffffffffffffffffffffffffffffffffffffffff16615105565b85600081518110611e5557fe5b6020026020010151615260565b611eae82878780806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f8201169050808301925050505050505086615471565b509695505050505050565b60608142811015611f32576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260188152602001807f556e69737761705632526f757465723a2045585049524544000000000000000081525060200191505060405180910390fd5b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16868660018989905003818110611f7b57fe5b9050602002013573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614612021576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601d8152602001807f556e69737761705632526f757465723a20494e56414c49445f5041544800000081525060200191505060405180910390fd5b61208d7f000000000000000000000000000000000000000000000000000000000000000089888880806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f8201169050808301925050505050505061571c565b9150868260008151811061209d57fe5b602002602001015111156120fc576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260278152602001806167e86027913960400191505060405180910390fd5b6121c18686600081811061210c57fe5b9050602002013573ffffffffffffffffffffffffffffffffffffffff16336121a77f00000000000000000000000000000000000000000000000000000000000000008a8a600081811061215b57fe5b9050602002013573ffffffffffffffffffffffffffffffffffffffff168b8b600181811061218557fe5b9050602002013573ffffffffffffffffffffffffffffffffffffffff16615105565b856000815181106121b457fe5b6020026020010151615260565b61220d82878780806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f8201169050808301925050505050505030615471565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16632e1a7d4d8360018551038151811061225957fe5b60200260200101516040518263ffffffff1660e01b815260040180828152602001915050600060405180830381600087803b15801561229757600080fd5b505af11580156122ab573d6000803e3d6000fd5b505050506122d084836001855103815181106122c357fe5b6020026020010151614cfe565b509695505050505050565b6000806123297f00000000000000000000000000000000000000000000000000000000000000008d7f0000000000000000000000000000000000000000000000000000000000000000615105565b9050600086612338578b61235a565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff5b90508173ffffffffffffffffffffffffffffffffffffffff1663d505accf3330848c8b8b8b6040518863ffffffff1660e01b8152600401808873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018681526020018581526020018460ff1660ff168152602001838152602001828152602001975050505050505050600060405180830381600087803b15801561243d57600080fd5b505af1158015612451573d6000803e3d6000fd5b505050506124638d8d8d8d8d8d6133c6565b925050509a9950505050505050505050565b80428110156124ec576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260188152602001807f556e69737761705632526f757465723a2045585049524544000000000000000081525060200191505060405180910390fd5b61259d858560008181106124fc57fe5b9050602002013573ffffffffffffffffffffffffffffffffffffffff16336125977f00000000000000000000000000000000000000000000000000000000000000008989600081811061254b57fe5b9050602002013573ffffffffffffffffffffffffffffffffffffffff168a8a600181811061257557fe5b9050602002013573ffffffffffffffffffffffffffffffffffffffff16615105565b8a615260565b60008585600188889050038181106125b157fe5b9050602002013573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166370a08231856040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b15801561264a57600080fd5b505afa15801561265e573d6000803e3d6000fd5b505050506040513d602081101561267457600080fd5b810190808051906020019092919050505090506126d2868680806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f820116905080830192505050505050508561589c565b866127cb82888860018b8b9050038181106126e957fe5b9050602002013573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166370a08231886040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b15801561278257600080fd5b505afa158015612796573d6000803e3d6000fd5b505050506040513d60208110156127ac57600080fd5b8101908080519060200190929190505050615d1390919063ffffffff16565b1015612822576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602b815260200180616858602b913960400191505060405180910390fd5b5050505050505050565b80428110156128a3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260188152602001807f556e69737761705632526f757465723a2045585049524544000000000000000081525060200191505060405180910390fd5b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff168585600188889050038181106128ec57fe5b9050602002013573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614612992576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601d8152602001807f556e69737761705632526f757465723a20494e56414c49445f5041544800000081525060200191505060405180910390fd5b612a43858560008181106129a257fe5b9050602002013573ffffffffffffffffffffffffffffffffffffffff1633612a3d7f0000000000000000000000000000000000000000000000000000000000000000898960008181106129f157fe5b9050602002013573ffffffffffffffffffffffffffffffffffffffff168a8a6001818110612a1b57fe5b9050602002013573ffffffffffffffffffffffffffffffffffffffff16615105565b8a615260565b612a8e858580806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f820116905080830192505050505050503061589c565b60007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b158015612b2d57600080fd5b505afa158015612b41573d6000803e3d6000fd5b505050506040513d6020811015612b5757600080fd5b8101908080519060200190929190505050905086811015612bc3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602b815260200180616858602b913960400191505060405180910390fd5b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16632e1a7d4d826040518263ffffffff1660e01b815260040180828152602001915050600060405180830381600087803b158015612c3657600080fd5b505af1158015612c4a573d6000803e3d6000fd5b50505050612c588482614cfe565b5050505050505050565b60608142811015612cdb576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260188152602001807f556e69737761705632526f757465723a2045585049524544000000000000000081525060200191505060405180910390fd5b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1686866000818110612d1f57fe5b9050602002013573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614612dc5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601d8152602001807f556e69737761705632526f757465723a20494e56414c49445f5041544800000081525060200191505060405180910390fd5b612e317f000000000000000000000000000000000000000000000000000000000000000034888880806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f82011690508083019250505050505050614f8d565b91508682600184510381518110612e4457fe5b60200260200101511015612ea3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602b815260200180616858602b913960400191505060405180910390fd5b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663d0e30db083600081518110612eec57fe5b60200260200101516040518263ffffffff1660e01b81526004016000604051808303818588803b158015612f1f57600080fd5b505af1158015612f33573d6000803e3d6000fd5b50505050507f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663a9059cbb612ff17f000000000000000000000000000000000000000000000000000000000000000089896000818110612fa557fe5b9050602002013573ffffffffffffffffffffffffffffffffffffffff168a8a6001818110612fcf57fe5b9050602002013573ffffffffffffffffffffffffffffffffffffffff16615105565b84600081518110612ffe57fe5b60200260200101516040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561306f57600080fd5b505af1158015613083573d6000803e3d6000fd5b505050506040513d602081101561309957600080fd5b81019080805190602001909291905050506130b057fe5b6130fc82878780806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f8201169050808301925050505050505086615471565b5095945050505050565b6000613113848484615d96565b90509392505050565b60608142811015613195576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260188152602001807f556e69737761705632526f757465723a2045585049524544000000000000000081525060200191505060405180910390fd5b6132017f000000000000000000000000000000000000000000000000000000000000000089888880806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f8201169050808301925050505050505061571c565b9150868260008151811061321157fe5b60200260200101511115613270576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260278152602001806167e86027913960400191505060405180910390fd5b6133358686600081811061328057fe5b9050602002013573ffffffffffffffffffffffffffffffffffffffff163361331b7f00000000000000000000000000000000000000000000000000000000000000008a8a60008181106132cf57fe5b9050602002013573ffffffffffffffffffffffffffffffffffffffff168b8b60018181106132f957fe5b9050602002013573ffffffffffffffffffffffffffffffffffffffff16615105565b8560008151811061332857fe5b6020026020010151615260565b61338182878780806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f8201169050808301925050505050505086615471565b509695505050505050565b7f000000000000000000000000000000000000000000000000000000000000000081565b60006133bd848484615ed3565b90509392505050565b6000814281101561343f576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260188152602001807f556e69737761705632526f757465723a2045585049524544000000000000000081525060200191505060405180910390fd5b61346e887f00000000000000000000000000000000000000000000000000000000000000008989893089613bb0565b90508092505061353688858a73ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b1580156134f657600080fd5b505afa15801561350a573d6000803e3d6000fd5b505050506040513d602081101561352057600080fd5b8101908080519060200190929190505050614b05565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16632e1a7d4d836040518263ffffffff1660e01b815260040180828152602001915050600060405180830381600087803b1580156135a957600080fd5b505af11580156135bd573d6000803e3d6000fd5b505050506135cb8483614cfe565b509695505050505050565b804281101561364d576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260188152602001807f556e69737761705632526f757465723a2045585049524544000000000000000081525060200191505060405180910390fd5b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff168585600081811061369157fe5b9050602002013573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614613737576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601d8152602001807f556e69737761705632526f757465723a20494e56414c49445f5041544800000081525060200191505060405180910390fd5b60003490507f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663d0e30db0826040518263ffffffff1660e01b81526004016000604051808303818588803b1580156137a457600080fd5b505af11580156137b8573d6000803e3d6000fd5b50505050507f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663a9059cbb6138767f00000000000000000000000000000000000000000000000000000000000000008989600081811061382a57fe5b9050602002013573ffffffffffffffffffffffffffffffffffffffff168a8a600181811061385457fe5b9050602002013573ffffffffffffffffffffffffffffffffffffffff16615105565b836040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b1580156138e057600080fd5b505af11580156138f4573d6000803e3d6000fd5b505050506040513d602081101561390a57600080fd5b810190808051906020019092919050505061392157fe5b600086866001898990500381811061393557fe5b9050602002013573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166370a08231866040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b1580156139ce57600080fd5b505afa1580156139e2573d6000803e3d6000fd5b505050506040513d60208110156139f857600080fd5b81019080805190602001909291905050509050613a56878780806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f820116905080830192505050505050508661589c565b87613b4f82898960018c8c905003818110613a6d57fe5b9050602002013573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166370a08231896040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b158015613b0657600080fd5b505afa158015613b1a573d6000803e3d6000fd5b505050506040513d6020811015613b3057600080fd5b8101908080519060200190929190505050615d1390919063ffffffff16565b1015613ba6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602b815260200180616858602b913960400191505060405180910390fd5b5050505050505050565b6000808242811015613c2a576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260188152602001807f556e69737761705632526f757465723a2045585049524544000000000000000081525060200191505060405180910390fd5b6000613c577f00000000000000000000000000000000000000000000000000000000000000008c8c615105565b90508073ffffffffffffffffffffffffffffffffffffffff166323b872dd33838c6040518463ffffffff1660e01b8152600401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019350505050602060405180830381600087803b158015613d1457600080fd5b505af1158015613d28573d6000803e3d6000fd5b505050506040513d6020811015613d3e57600080fd5b8101908080519060200190929190505050506000808273ffffffffffffffffffffffffffffffffffffffff166389afcb44896040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019150506040805180830381600087803b158015613dd157600080fd5b505af1158015613de5573d6000803e3d6000fd5b505050506040513d6040811015613dfb57600080fd5b810190808051906020019092919080519060200190929190505050915091506000613e268e8e615fb7565b5090508073ffffffffffffffffffffffffffffffffffffffff168e73ffffffffffffffffffffffffffffffffffffffff1614613e63578183613e66565b82825b80975081985050508a871015613ec7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602681526020018061680f6026913960400191505060405180910390fd5b89861015613f20576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260268152602001806167756026913960400191505060405180910390fd5b505050505097509795505050505050565b7f000000000000000000000000000000000000000000000000000000000000000081565b6060613f827f00000000000000000000000000000000000000000000000000000000000000008484614f8d565b905092915050565b6000806000613fda7f00000000000000000000000000000000000000000000000000000000000000008e7f0000000000000000000000000000000000000000000000000000000000000000615105565b9050600087613fe9578c61400b565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff5b90508173ffffffffffffffffffffffffffffffffffffffff1663d505accf3330848d8c8c8c6040518863ffffffff1660e01b8152600401808873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018681526020018581526020018460ff1660ff168152602001838152602001828152602001975050505050505050600060405180830381600087803b1580156140ee57600080fd5b505af1158015614102573d6000803e3d6000fd5b505050506141148e8e8e8e8e8e6114f4565b809450819550505050509a509a98505050505050505050565b600080600083428110156141a9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260188152602001807f556e69737761705632526f757465723a2045585049524544000000000000000081525060200191505060405180910390fd5b6141b78c8c8c8c8c8c61612e565b809450819550505060006141ec7f00000000000000000000000000000000000000000000000000000000000000008e8e615105565b90506141fa8d338388615260565b6142068c338387615260565b8073ffffffffffffffffffffffffffffffffffffffff16636a627842886040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001915050602060405180830381600087803b15801561428557600080fd5b505af1158015614299573d6000803e3d6000fd5b505050506040513d60208110156142af57600080fd5b810190808051906020019092919050505092505050985098509895505050505050565b6000806000834281101561434e576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260188152602001807f556e69737761705632526f757465723a2045585049524544000000000000000081525060200191505060405180910390fd5b61437c8a7f00000000000000000000000000000000000000000000000000000000000000008b348c8c61612e565b809450819550505060006143d17f00000000000000000000000000000000000000000000000000000000000000008c7f0000000000000000000000000000000000000000000000000000000000000000615105565b90506143df8b338388615260565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663d0e30db0856040518263ffffffff1660e01b81526004016000604051808303818588803b15801561444757600080fd5b505af115801561445b573d6000803e3d6000fd5b50505050507f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663a9059cbb82866040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561450757600080fd5b505af115801561451b573d6000803e3d6000fd5b505050506040513d602081101561453157600080fd5b810190808051906020019092919050505061454857fe5b8073ffffffffffffffffffffffffffffffffffffffff16636a627842886040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001915050602060405180830381600087803b1580156145c757600080fd5b505af11580156145db573d6000803e3d6000fd5b505050506040513d60208110156145f157600080fd5b81019080805190602001909291905050509250833411156146195761461833853403614cfe565b5b505096509650969350505050565b606081428110156146a0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260188152602001807f556e69737761705632526f757465723a2045585049524544000000000000000081525060200191505060405180910390fd5b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16868660008181106146e457fe5b9050602002013573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161461478a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601d8152602001807f556e69737761705632526f757465723a20494e56414c49445f5041544800000081525060200191505060405180910390fd5b6147f67f000000000000000000000000000000000000000000000000000000000000000088888880806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f8201169050808301925050505050505061571c565b9150348260008151811061480657fe5b60200260200101511115614865576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260278152602001806167e86027913960400191505060405180910390fd5b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663d0e30db0836000815181106148ae57fe5b60200260200101516040518263ffffffff1660e01b81526004016000604051808303818588803b1580156148e157600080fd5b505af11580156148f5573d6000803e3d6000fd5b50505050507f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663a9059cbb6149b37f00000000000000000000000000000000000000000000000000000000000000008989600081811061496757fe5b9050602002013573ffffffffffffffffffffffffffffffffffffffff168a8a600181811061499157fe5b9050602002013573ffffffffffffffffffffffffffffffffffffffff16615105565b846000815181106149c057fe5b60200260200101516040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b158015614a3157600080fd5b505af1158015614a45573d6000803e3d6000fd5b505050506040513d6020811015614a5b57600080fd5b8101908080519060200190929190505050614a7257fe5b614abe82878780806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f8201169050808301925050505050505086615471565b81600081518110614acb57fe5b6020026020010151341115614afb57614afa3383600081518110614aeb57fe5b60200260200101513403614cfe565b5b5095945050505050565b600060608473ffffffffffffffffffffffffffffffffffffffff1663a9059cbb8585604051602401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001828152602001925050506040516020818303038152906040529060e01b6020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff83818316178352505050506040518082805190602001908083835b60208310614bde5780518252602082019150602081019050602083039250614bbb565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d8060008114614c40576040519150601f19603f3d011682016040523d82523d6000602084013e614c45565b606091505b5091509150818015614c855750600081511480614c845750808060200190516020811015614c7257600080fd5b81019080805190602001909291905050505b5b614cf7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5472616e7366657248656c7065723a205452414e534645525f4641494c45440081525060200191505060405180910390fd5b5050505050565b60008273ffffffffffffffffffffffffffffffffffffffff1682600067ffffffffffffffff81118015614d3057600080fd5b506040519080825280601f01601f191660200182016040528015614d635781602001600182028036833780820191505090505b506040518082805190602001908083835b60208310614d975780518252602082019150602081019050602083039250614d74565b6001836020036101000a03801982511681845116808217855250505050505090500191505060006040518083038185875af1925050503d8060008114614df9576040519150601f19603f3d011682016040523d82523d6000602084013e614dfe565b606091505b5050905080614e58576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260238152602001806168356023913960400191505060405180910390fd5b505050565b6000808411614eb7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602b8152602001806168a7602b913960400191505060405180910390fd5b600083118015614ec75750600082115b614f1c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602881526020018061679b6028913960400191505060405180910390fd5b6000614f336103e5866164e290919063ffffffff16565b90506000614f4a84836164e290919063ffffffff16565b90506000614f7583614f676103e8896164e290919063ffffffff16565b61657790919063ffffffff16565b9050808281614f8057fe5b0493505050509392505050565b6060600282511015615007576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601e8152602001807f556e697377617056324c6962726172793a20494e56414c49445f50415448000081525060200191505060405180910390fd5b815167ffffffffffffffff8111801561501f57600080fd5b5060405190808252806020026020018201604052801561504e5781602001602082028036833780820191505090505b509050828160008151811061505f57fe5b60200260200101818152505060005b60018351038110156150fd576000806150b18786858151811061508d57fe5b60200260200101518760018701815181106150a457fe5b60200260200101516165fa565b915091506150d38484815181106150c457fe5b60200260200101518383614e5d565b8460018501815181106150e257fe5b6020026020010181815250505050808060010191505061506e565b509392505050565b60008060006151148585615fb7565b91509150858282604051602001808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1660601b81526014018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1660601b8152601401925050506040516020818303038152906040528051906020012060405160200180807fff000000000000000000000000000000000000000000000000000000000000008152506001018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1660601b8152601401828152602001807f96e8ac4277198ff8b6f785478aa9a39f403cb768dd02cbee326c3e7da348845f815250602001925050506040516020818303038152906040528051906020012060001c925050509392505050565b600060608573ffffffffffffffffffffffffffffffffffffffff166323b872dd868686604051602401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200193505050506040516020818303038152906040529060e01b6020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff83818316178352505050506040518082805190602001908083835b6020831061536d578051825260208201915060208101905060208303925061534a565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d80600081146153cf576040519150601f19603f3d011682016040523d82523d6000602084013e6153d4565b606091505b50915091508180156154145750600081511480615413575080806020019051602081101561540157600080fd5b81019080805190602001909291905050505b5b615469576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260248152602001806168836024913960400191505060405180910390fd5b505050505050565b60005b60018351038110156157165760008084838151811061548f57fe5b60200260200101518560018501815181106154a657fe5b60200260200101519150915060006154be8383615fb7565b50905060008760018601815181106154d257fe5b602002602001015190506000808373ffffffffffffffffffffffffffffffffffffffff168673ffffffffffffffffffffffffffffffffffffffff161461551a5782600061551e565b6000835b91509150600060028a510388106155355788615577565b6155767f0000000000000000000000000000000000000000000000000000000000000000878c60028c018151811061556957fe5b6020026020010151615105565b5b90506155a47f00000000000000000000000000000000000000000000000000000000000000008888615105565b73ffffffffffffffffffffffffffffffffffffffff1663022c0d9f848484600067ffffffffffffffff811180156155da57600080fd5b506040519080825280601f01601f19166020018201604052801561560d5781602001600182028036833780820191505090505b506040518563ffffffff1660e01b8152600401808581526020018481526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200180602001828103825283818151815260200191508051906020019080838360005b8381101561569b578082015181840152602081019050615680565b50505050905090810190601f1680156156c85780820380516001836020036101000a031916815260200191505b5095505050505050600060405180830381600087803b1580156156ea57600080fd5b505af11580156156fe573d6000803e3d6000fd5b50505050505050505050508080600101915050615474565b50505050565b6060600282511015615796576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601e8152602001807f556e697377617056324c6962726172793a20494e56414c49445f50415448000081525060200191505060405180910390fd5b815167ffffffffffffffff811180156157ae57600080fd5b506040519080825280602002602001820160405280156157dd5781602001602082028036833780820191505090505b50905082816001835103815181106157f157fe5b6020026020010181815250506000600183510390505b6000811115615894576000806158478786600186038151811061582657fe5b602002602001015187868151811061583a57fe5b60200260200101516165fa565b9150915061586984848151811061585a57fe5b60200260200101518383615d96565b84600185038151811061587857fe5b6020026020010181815250505050808060019003915050615807565b509392505050565b60005b6001835103811015615d0e576000808483815181106158ba57fe5b60200260200101518560018501815181106158d157fe5b60200260200101519150915060006158e98383615fb7565b50905060006159197f00000000000000000000000000000000000000000000000000000000000000008585615105565b90506000806000808473ffffffffffffffffffffffffffffffffffffffff16630902f1ac6040518163ffffffff1660e01b815260040160606040518083038186803b15801561596757600080fd5b505afa15801561597b573d6000803e3d6000fd5b505050506040513d606081101561599157600080fd5b81019080805190602001909291908051906020019092919080519060200190929190505050506dffffffffffffffffffffffffffff1691506dffffffffffffffffffffffffffff1691506000808773ffffffffffffffffffffffffffffffffffffffff168a73ffffffffffffffffffffffffffffffffffffffff1614615a18578284615a1b565b83835b91509150615ae9828b73ffffffffffffffffffffffffffffffffffffffff166370a082318a6040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b158015615aa057600080fd5b505afa158015615ab4573d6000803e3d6000fd5b505050506040513d6020811015615aca57600080fd5b8101908080519060200190929190505050615d1390919063ffffffff16565b9550615af6868383614e5d565b9450505050506000808573ffffffffffffffffffffffffffffffffffffffff168873ffffffffffffffffffffffffffffffffffffffff1614615b3a57826000615b3e565b6000835b91509150600060028c51038a10615b55578a615b97565b615b967f0000000000000000000000000000000000000000000000000000000000000000898e60028e0181518110615b8957fe5b6020026020010151615105565b5b90508573ffffffffffffffffffffffffffffffffffffffff1663022c0d9f848484600067ffffffffffffffff81118015615bd057600080fd5b506040519080825280601f01601f191660200182016040528015615c035781602001600182028036833780820191505090505b506040518563ffffffff1660e01b8152600401808581526020018481526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200180602001828103825283818151815260200191508051906020019080838360005b83811015615c91578082015181840152602081019050615c76565b50505050905090810190601f168015615cbe5780820380516001836020036101000a031916815260200191505b5095505050505050600060405180830381600087803b158015615ce057600080fd5b505af1158015615cf4573d6000803e3d6000fd5b50505050505050505050505050808060010191505061589f565b505050565b6000828284039150811115615d90576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260158152602001807f64732d6d6174682d7375622d756e646572666c6f77000000000000000000000081525060200191505060405180910390fd5b92915050565b6000808411615df0576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602c815260200180616724602c913960400191505060405180910390fd5b600083118015615e005750600082115b615e55576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602881526020018061679b6028913960400191505060405180910390fd5b6000615e7e6103e8615e7087876164e290919063ffffffff16565b6164e290919063ffffffff16565b90506000615ea96103e5615e9b8887615d1390919063ffffffff16565b6164e290919063ffffffff16565b9050615ec86001828481615eb957fe5b0461657790919063ffffffff16565b925050509392505050565b6000808411615f2d576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260258152602001806167c36025913960400191505060405180910390fd5b600083118015615f3d5750600082115b615f92576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602881526020018061679b6028913960400191505060405180910390fd5b82615fa683866164e290919063ffffffff16565b81615fad57fe5b0490509392505050565b6000808273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff16141561603f576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260258152602001806167506025913960400191505060405180910390fd5b8273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff161061607957828461607c565b83835b8092508193505050600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415616127576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601e8152602001807f556e697377617056324c6962726172793a205a45524f5f41444452455353000081525060200191505060405180910390fd5b9250929050565b600080600073ffffffffffffffffffffffffffffffffffffffff167f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663e6a439058a8a6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019250505060206040518083038186803b15801561621a57600080fd5b505afa15801561622e573d6000803e3d6000fd5b505050506040513d602081101561624457600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff161415616381577f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663c9c6539689896040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200192505050602060405180830381600087803b15801561634457600080fd5b505af1158015616358573d6000803e3d6000fd5b505050506040513d602081101561636e57600080fd5b8101908080519060200190929190505050505b6000806163af7f00000000000000000000000000000000000000000000000000000000000000008b8b6165fa565b915091506000821480156163c35750600081145b156163d757878780945081955050506164d5565b60006163e4898484615ed3565b90508781116164555785811015616446576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260268152602001806167756026913960400191505060405180910390fd5b888180955081965050506164d3565b6000616462898486615ed3565b90508981111561646e57fe5b878110156164c7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602681526020018061680f6026913960400191505060405180910390fd5b80898096508197505050505b505b5050965096945050505050565b6000808214806164ff57508282838502925082816164fc57fe5b04145b616571576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260148152602001807f64732d6d6174682d6d756c2d6f766572666c6f7700000000000000000000000081525060200191505060405180910390fd5b92915050565b60008282840191508110156165f4576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260148152602001807f64732d6d6174682d6164642d6f766572666c6f7700000000000000000000000081525060200191505060405180910390fd5b92915050565b60008060006166098585615fb7565b50905060008061661a888888615105565b73ffffffffffffffffffffffffffffffffffffffff16630902f1ac6040518163ffffffff1660e01b815260040160606040518083038186803b15801561665f57600080fd5b505afa158015616673573d6000803e3d6000fd5b505050506040513d606081101561668957600080fd5b81019080805190602001909291908051906020019092919080519060200190929190505050506dffffffffffffffffffffffffffff1691506dffffffffffffffffffffffffffff1691508273ffffffffffffffffffffffffffffffffffffffff168773ffffffffffffffffffffffffffffffffffffffff161461670d578082616710565b81815b809550819650505050505093509391505056fe556e697377617056324c6962726172793a20494e53554646494349454e545f4f55545055545f414d4f554e54556e697377617056324c6962726172793a204944454e544943414c5f414444524553534553556e69737761705632526f757465723a20494e53554646494349454e545f425f414d4f554e54556e697377617056324c6962726172793a20494e53554646494349454e545f4c4951554944495459556e697377617056324c6962726172793a20494e53554646494349454e545f414d4f554e54556e69737761705632526f757465723a204558434553534956455f494e5055545f414d4f554e54556e69737761705632526f757465723a20494e53554646494349454e545f415f414d4f554e545472616e7366657248656c7065723a204554485f5452414e534645525f4641494c4544556e69737761705632526f757465723a20494e53554646494349454e545f4f55545055545f414d4f554e545472616e7366657248656c7065723a205452414e534645525f46524f4d5f4641494c4544556e697377617056324c6962726172793a20494e53554646494349454e545f494e5055545f414d4f554e54a26469706673582212208afdc4c37194d7ca1f4cc9961c6827f176017c92df2e6237e0366b088021437364736f6c63430006060033"; - -type UniswapV2Router02ConstructorParams = - | [signer?: Signer] - | ConstructorParameters; - -const isSuperArgs = ( - xs: UniswapV2Router02ConstructorParams -): xs is ConstructorParameters => xs.length > 1; - -export class UniswapV2Router02__factory extends ContractFactory { - constructor(...args: UniswapV2Router02ConstructorParams) { - if (isSuperArgs(args)) { - super(...args); - } else { - super(_abi, _bytecode, args[0]); - } - } - - override deploy( - _factory: string, - _WETH: string, - overrides?: Overrides & { from?: string | Promise } - ): Promise { - return super.deploy( - _factory, - _WETH, - overrides || {} - ) as Promise; - } - override getDeployTransaction( - _factory: string, - _WETH: string, - overrides?: Overrides & { from?: string | Promise } - ): TransactionRequest { - return super.getDeployTransaction(_factory, _WETH, overrides || {}); - } - override attach(address: string): UniswapV2Router02 { - return super.attach(address) as UniswapV2Router02; - } - override connect(signer: Signer): UniswapV2Router02__factory { - return super.connect(signer) as UniswapV2Router02__factory; - } - - static readonly bytecode = _bytecode; - static readonly abi = _abi; - static createInterface(): UniswapV2Router02Interface { - return new utils.Interface(_abi) as UniswapV2Router02Interface; - } - static connect( - address: string, - signerOrProvider: Signer | Provider - ): UniswapV2Router02 { - return new Contract(address, _abi, signerOrProvider) as UniswapV2Router02; - } -} diff --git a/packages/interfaces/typechain-types/factories/@uniswap/v2-periphery/contracts/index.ts b/packages/interfaces/typechain-types/factories/@uniswap/v2-periphery/contracts/index.ts deleted file mode 100644 index 1e34f5fd..00000000 --- a/packages/interfaces/typechain-types/factories/@uniswap/v2-periphery/contracts/index.ts +++ /dev/null @@ -1,5 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ -export * as interfaces from "./interfaces"; -export { UniswapV2Router02__factory } from "./UniswapV2Router02__factory"; diff --git a/packages/interfaces/typechain-types/factories/@uniswap/v2-periphery/contracts/interfaces/IERC20__factory.ts b/packages/interfaces/typechain-types/factories/@uniswap/v2-periphery/contracts/interfaces/IERC20__factory.ts deleted file mode 100644 index e85c7bd7..00000000 --- a/packages/interfaces/typechain-types/factories/@uniswap/v2-periphery/contracts/interfaces/IERC20__factory.ts +++ /dev/null @@ -1,245 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ - -import { Contract, Signer, utils } from "ethers"; -import type { Provider } from "@ethersproject/providers"; -import type { - IERC20, - IERC20Interface, -} from "../../../../../@uniswap/v2-periphery/contracts/interfaces/IERC20"; - -const _abi = [ - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "address", - name: "owner", - type: "address", - }, - { - indexed: true, - internalType: "address", - name: "spender", - type: "address", - }, - { - indexed: false, - internalType: "uint256", - name: "value", - type: "uint256", - }, - ], - name: "Approval", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "address", - name: "from", - type: "address", - }, - { - indexed: true, - internalType: "address", - name: "to", - type: "address", - }, - { - indexed: false, - internalType: "uint256", - name: "value", - type: "uint256", - }, - ], - name: "Transfer", - type: "event", - }, - { - inputs: [ - { - internalType: "address", - name: "owner", - type: "address", - }, - { - internalType: "address", - name: "spender", - type: "address", - }, - ], - name: "allowance", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "spender", - type: "address", - }, - { - internalType: "uint256", - name: "value", - type: "uint256", - }, - ], - name: "approve", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "owner", - type: "address", - }, - ], - name: "balanceOf", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "decimals", - outputs: [ - { - internalType: "uint8", - name: "", - type: "uint8", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "name", - outputs: [ - { - internalType: "string", - name: "", - type: "string", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "symbol", - outputs: [ - { - internalType: "string", - name: "", - type: "string", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "totalSupply", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "to", - type: "address", - }, - { - internalType: "uint256", - name: "value", - type: "uint256", - }, - ], - name: "transfer", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "from", - type: "address", - }, - { - internalType: "address", - name: "to", - type: "address", - }, - { - internalType: "uint256", - name: "value", - type: "uint256", - }, - ], - name: "transferFrom", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "nonpayable", - type: "function", - }, -]; - -export class IERC20__factory { - static readonly abi = _abi; - static createInterface(): IERC20Interface { - return new utils.Interface(_abi) as IERC20Interface; - } - static connect(address: string, signerOrProvider: Signer | Provider): IERC20 { - return new Contract(address, _abi, signerOrProvider) as IERC20; - } -} diff --git a/packages/interfaces/typechain-types/factories/@uniswap/v2-periphery/contracts/interfaces/IUniswapV2Router01__factory.ts b/packages/interfaces/typechain-types/factories/@uniswap/v2-periphery/contracts/interfaces/IUniswapV2Router01__factory.ts deleted file mode 100644 index f95f12d9..00000000 --- a/packages/interfaces/typechain-types/factories/@uniswap/v2-periphery/contracts/interfaces/IUniswapV2Router01__factory.ts +++ /dev/null @@ -1,775 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ - -import { Contract, Signer, utils } from "ethers"; -import type { Provider } from "@ethersproject/providers"; -import type { - IUniswapV2Router01, - IUniswapV2Router01Interface, -} from "../../../../../@uniswap/v2-periphery/contracts/interfaces/IUniswapV2Router01"; - -const _abi = [ - { - inputs: [], - name: "WETH", - outputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - stateMutability: "pure", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "tokenA", - type: "address", - }, - { - internalType: "address", - name: "tokenB", - type: "address", - }, - { - internalType: "uint256", - name: "amountADesired", - type: "uint256", - }, - { - internalType: "uint256", - name: "amountBDesired", - type: "uint256", - }, - { - internalType: "uint256", - name: "amountAMin", - type: "uint256", - }, - { - internalType: "uint256", - name: "amountBMin", - type: "uint256", - }, - { - internalType: "address", - name: "to", - type: "address", - }, - { - internalType: "uint256", - name: "deadline", - type: "uint256", - }, - ], - name: "addLiquidity", - outputs: [ - { - internalType: "uint256", - name: "amountA", - type: "uint256", - }, - { - internalType: "uint256", - name: "amountB", - type: "uint256", - }, - { - internalType: "uint256", - name: "liquidity", - type: "uint256", - }, - ], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "token", - type: "address", - }, - { - internalType: "uint256", - name: "amountTokenDesired", - type: "uint256", - }, - { - internalType: "uint256", - name: "amountTokenMin", - type: "uint256", - }, - { - internalType: "uint256", - name: "amountETHMin", - type: "uint256", - }, - { - internalType: "address", - name: "to", - type: "address", - }, - { - internalType: "uint256", - name: "deadline", - type: "uint256", - }, - ], - name: "addLiquidityETH", - outputs: [ - { - internalType: "uint256", - name: "amountToken", - type: "uint256", - }, - { - internalType: "uint256", - name: "amountETH", - type: "uint256", - }, - { - internalType: "uint256", - name: "liquidity", - type: "uint256", - }, - ], - stateMutability: "payable", - type: "function", - }, - { - inputs: [], - name: "factory", - outputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - stateMutability: "pure", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "amountOut", - type: "uint256", - }, - { - internalType: "uint256", - name: "reserveIn", - type: "uint256", - }, - { - internalType: "uint256", - name: "reserveOut", - type: "uint256", - }, - ], - name: "getAmountIn", - outputs: [ - { - internalType: "uint256", - name: "amountIn", - type: "uint256", - }, - ], - stateMutability: "pure", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "amountIn", - type: "uint256", - }, - { - internalType: "uint256", - name: "reserveIn", - type: "uint256", - }, - { - internalType: "uint256", - name: "reserveOut", - type: "uint256", - }, - ], - name: "getAmountOut", - outputs: [ - { - internalType: "uint256", - name: "amountOut", - type: "uint256", - }, - ], - stateMutability: "pure", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "amountOut", - type: "uint256", - }, - { - internalType: "address[]", - name: "path", - type: "address[]", - }, - ], - name: "getAmountsIn", - outputs: [ - { - internalType: "uint256[]", - name: "amounts", - type: "uint256[]", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "amountIn", - type: "uint256", - }, - { - internalType: "address[]", - name: "path", - type: "address[]", - }, - ], - name: "getAmountsOut", - outputs: [ - { - internalType: "uint256[]", - name: "amounts", - type: "uint256[]", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "amountA", - type: "uint256", - }, - { - internalType: "uint256", - name: "reserveA", - type: "uint256", - }, - { - internalType: "uint256", - name: "reserveB", - type: "uint256", - }, - ], - name: "quote", - outputs: [ - { - internalType: "uint256", - name: "amountB", - type: "uint256", - }, - ], - stateMutability: "pure", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "tokenA", - type: "address", - }, - { - internalType: "address", - name: "tokenB", - type: "address", - }, - { - internalType: "uint256", - name: "liquidity", - type: "uint256", - }, - { - internalType: "uint256", - name: "amountAMin", - type: "uint256", - }, - { - internalType: "uint256", - name: "amountBMin", - type: "uint256", - }, - { - internalType: "address", - name: "to", - type: "address", - }, - { - internalType: "uint256", - name: "deadline", - type: "uint256", - }, - ], - name: "removeLiquidity", - outputs: [ - { - internalType: "uint256", - name: "amountA", - type: "uint256", - }, - { - internalType: "uint256", - name: "amountB", - type: "uint256", - }, - ], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "token", - type: "address", - }, - { - internalType: "uint256", - name: "liquidity", - type: "uint256", - }, - { - internalType: "uint256", - name: "amountTokenMin", - type: "uint256", - }, - { - internalType: "uint256", - name: "amountETHMin", - type: "uint256", - }, - { - internalType: "address", - name: "to", - type: "address", - }, - { - internalType: "uint256", - name: "deadline", - type: "uint256", - }, - ], - name: "removeLiquidityETH", - outputs: [ - { - internalType: "uint256", - name: "amountToken", - type: "uint256", - }, - { - internalType: "uint256", - name: "amountETH", - type: "uint256", - }, - ], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "token", - type: "address", - }, - { - internalType: "uint256", - name: "liquidity", - type: "uint256", - }, - { - internalType: "uint256", - name: "amountTokenMin", - type: "uint256", - }, - { - internalType: "uint256", - name: "amountETHMin", - type: "uint256", - }, - { - internalType: "address", - name: "to", - type: "address", - }, - { - internalType: "uint256", - name: "deadline", - type: "uint256", - }, - { - internalType: "bool", - name: "approveMax", - type: "bool", - }, - { - internalType: "uint8", - name: "v", - type: "uint8", - }, - { - internalType: "bytes32", - name: "r", - type: "bytes32", - }, - { - internalType: "bytes32", - name: "s", - type: "bytes32", - }, - ], - name: "removeLiquidityETHWithPermit", - outputs: [ - { - internalType: "uint256", - name: "amountToken", - type: "uint256", - }, - { - internalType: "uint256", - name: "amountETH", - type: "uint256", - }, - ], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "tokenA", - type: "address", - }, - { - internalType: "address", - name: "tokenB", - type: "address", - }, - { - internalType: "uint256", - name: "liquidity", - type: "uint256", - }, - { - internalType: "uint256", - name: "amountAMin", - type: "uint256", - }, - { - internalType: "uint256", - name: "amountBMin", - type: "uint256", - }, - { - internalType: "address", - name: "to", - type: "address", - }, - { - internalType: "uint256", - name: "deadline", - type: "uint256", - }, - { - internalType: "bool", - name: "approveMax", - type: "bool", - }, - { - internalType: "uint8", - name: "v", - type: "uint8", - }, - { - internalType: "bytes32", - name: "r", - type: "bytes32", - }, - { - internalType: "bytes32", - name: "s", - type: "bytes32", - }, - ], - name: "removeLiquidityWithPermit", - outputs: [ - { - internalType: "uint256", - name: "amountA", - type: "uint256", - }, - { - internalType: "uint256", - name: "amountB", - type: "uint256", - }, - ], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "amountOut", - type: "uint256", - }, - { - internalType: "address[]", - name: "path", - type: "address[]", - }, - { - internalType: "address", - name: "to", - type: "address", - }, - { - internalType: "uint256", - name: "deadline", - type: "uint256", - }, - ], - name: "swapETHForExactTokens", - outputs: [ - { - internalType: "uint256[]", - name: "amounts", - type: "uint256[]", - }, - ], - stateMutability: "payable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "amountOutMin", - type: "uint256", - }, - { - internalType: "address[]", - name: "path", - type: "address[]", - }, - { - internalType: "address", - name: "to", - type: "address", - }, - { - internalType: "uint256", - name: "deadline", - type: "uint256", - }, - ], - name: "swapExactETHForTokens", - outputs: [ - { - internalType: "uint256[]", - name: "amounts", - type: "uint256[]", - }, - ], - stateMutability: "payable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "amountIn", - type: "uint256", - }, - { - internalType: "uint256", - name: "amountOutMin", - type: "uint256", - }, - { - internalType: "address[]", - name: "path", - type: "address[]", - }, - { - internalType: "address", - name: "to", - type: "address", - }, - { - internalType: "uint256", - name: "deadline", - type: "uint256", - }, - ], - name: "swapExactTokensForETH", - outputs: [ - { - internalType: "uint256[]", - name: "amounts", - type: "uint256[]", - }, - ], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "amountIn", - type: "uint256", - }, - { - internalType: "uint256", - name: "amountOutMin", - type: "uint256", - }, - { - internalType: "address[]", - name: "path", - type: "address[]", - }, - { - internalType: "address", - name: "to", - type: "address", - }, - { - internalType: "uint256", - name: "deadline", - type: "uint256", - }, - ], - name: "swapExactTokensForTokens", - outputs: [ - { - internalType: "uint256[]", - name: "amounts", - type: "uint256[]", - }, - ], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "amountOut", - type: "uint256", - }, - { - internalType: "uint256", - name: "amountInMax", - type: "uint256", - }, - { - internalType: "address[]", - name: "path", - type: "address[]", - }, - { - internalType: "address", - name: "to", - type: "address", - }, - { - internalType: "uint256", - name: "deadline", - type: "uint256", - }, - ], - name: "swapTokensForExactETH", - outputs: [ - { - internalType: "uint256[]", - name: "amounts", - type: "uint256[]", - }, - ], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "amountOut", - type: "uint256", - }, - { - internalType: "uint256", - name: "amountInMax", - type: "uint256", - }, - { - internalType: "address[]", - name: "path", - type: "address[]", - }, - { - internalType: "address", - name: "to", - type: "address", - }, - { - internalType: "uint256", - name: "deadline", - type: "uint256", - }, - ], - name: "swapTokensForExactTokens", - outputs: [ - { - internalType: "uint256[]", - name: "amounts", - type: "uint256[]", - }, - ], - stateMutability: "nonpayable", - type: "function", - }, -]; - -export class IUniswapV2Router01__factory { - static readonly abi = _abi; - static createInterface(): IUniswapV2Router01Interface { - return new utils.Interface(_abi) as IUniswapV2Router01Interface; - } - static connect( - address: string, - signerOrProvider: Signer | Provider - ): IUniswapV2Router01 { - return new Contract(address, _abi, signerOrProvider) as IUniswapV2Router01; - } -} diff --git a/packages/interfaces/typechain-types/factories/@uniswap/v2-periphery/contracts/interfaces/IUniswapV2Router02__factory.ts b/packages/interfaces/typechain-types/factories/@uniswap/v2-periphery/contracts/interfaces/IUniswapV2Router02__factory.ts deleted file mode 100644 index f9cbe21d..00000000 --- a/packages/interfaces/typechain-types/factories/@uniswap/v2-periphery/contracts/interfaces/IUniswapV2Router02__factory.ts +++ /dev/null @@ -1,977 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ - -import { Contract, Signer, utils } from "ethers"; -import type { Provider } from "@ethersproject/providers"; -import type { - IUniswapV2Router02, - IUniswapV2Router02Interface, -} from "../../../../../@uniswap/v2-periphery/contracts/interfaces/IUniswapV2Router02"; - -const _abi = [ - { - inputs: [], - name: "WETH", - outputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - stateMutability: "pure", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "tokenA", - type: "address", - }, - { - internalType: "address", - name: "tokenB", - type: "address", - }, - { - internalType: "uint256", - name: "amountADesired", - type: "uint256", - }, - { - internalType: "uint256", - name: "amountBDesired", - type: "uint256", - }, - { - internalType: "uint256", - name: "amountAMin", - type: "uint256", - }, - { - internalType: "uint256", - name: "amountBMin", - type: "uint256", - }, - { - internalType: "address", - name: "to", - type: "address", - }, - { - internalType: "uint256", - name: "deadline", - type: "uint256", - }, - ], - name: "addLiquidity", - outputs: [ - { - internalType: "uint256", - name: "amountA", - type: "uint256", - }, - { - internalType: "uint256", - name: "amountB", - type: "uint256", - }, - { - internalType: "uint256", - name: "liquidity", - type: "uint256", - }, - ], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "token", - type: "address", - }, - { - internalType: "uint256", - name: "amountTokenDesired", - type: "uint256", - }, - { - internalType: "uint256", - name: "amountTokenMin", - type: "uint256", - }, - { - internalType: "uint256", - name: "amountETHMin", - type: "uint256", - }, - { - internalType: "address", - name: "to", - type: "address", - }, - { - internalType: "uint256", - name: "deadline", - type: "uint256", - }, - ], - name: "addLiquidityETH", - outputs: [ - { - internalType: "uint256", - name: "amountToken", - type: "uint256", - }, - { - internalType: "uint256", - name: "amountETH", - type: "uint256", - }, - { - internalType: "uint256", - name: "liquidity", - type: "uint256", - }, - ], - stateMutability: "payable", - type: "function", - }, - { - inputs: [], - name: "factory", - outputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - stateMutability: "pure", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "amountOut", - type: "uint256", - }, - { - internalType: "uint256", - name: "reserveIn", - type: "uint256", - }, - { - internalType: "uint256", - name: "reserveOut", - type: "uint256", - }, - ], - name: "getAmountIn", - outputs: [ - { - internalType: "uint256", - name: "amountIn", - type: "uint256", - }, - ], - stateMutability: "pure", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "amountIn", - type: "uint256", - }, - { - internalType: "uint256", - name: "reserveIn", - type: "uint256", - }, - { - internalType: "uint256", - name: "reserveOut", - type: "uint256", - }, - ], - name: "getAmountOut", - outputs: [ - { - internalType: "uint256", - name: "amountOut", - type: "uint256", - }, - ], - stateMutability: "pure", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "amountOut", - type: "uint256", - }, - { - internalType: "address[]", - name: "path", - type: "address[]", - }, - ], - name: "getAmountsIn", - outputs: [ - { - internalType: "uint256[]", - name: "amounts", - type: "uint256[]", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "amountIn", - type: "uint256", - }, - { - internalType: "address[]", - name: "path", - type: "address[]", - }, - ], - name: "getAmountsOut", - outputs: [ - { - internalType: "uint256[]", - name: "amounts", - type: "uint256[]", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "amountA", - type: "uint256", - }, - { - internalType: "uint256", - name: "reserveA", - type: "uint256", - }, - { - internalType: "uint256", - name: "reserveB", - type: "uint256", - }, - ], - name: "quote", - outputs: [ - { - internalType: "uint256", - name: "amountB", - type: "uint256", - }, - ], - stateMutability: "pure", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "tokenA", - type: "address", - }, - { - internalType: "address", - name: "tokenB", - type: "address", - }, - { - internalType: "uint256", - name: "liquidity", - type: "uint256", - }, - { - internalType: "uint256", - name: "amountAMin", - type: "uint256", - }, - { - internalType: "uint256", - name: "amountBMin", - type: "uint256", - }, - { - internalType: "address", - name: "to", - type: "address", - }, - { - internalType: "uint256", - name: "deadline", - type: "uint256", - }, - ], - name: "removeLiquidity", - outputs: [ - { - internalType: "uint256", - name: "amountA", - type: "uint256", - }, - { - internalType: "uint256", - name: "amountB", - type: "uint256", - }, - ], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "token", - type: "address", - }, - { - internalType: "uint256", - name: "liquidity", - type: "uint256", - }, - { - internalType: "uint256", - name: "amountTokenMin", - type: "uint256", - }, - { - internalType: "uint256", - name: "amountETHMin", - type: "uint256", - }, - { - internalType: "address", - name: "to", - type: "address", - }, - { - internalType: "uint256", - name: "deadline", - type: "uint256", - }, - ], - name: "removeLiquidityETH", - outputs: [ - { - internalType: "uint256", - name: "amountToken", - type: "uint256", - }, - { - internalType: "uint256", - name: "amountETH", - type: "uint256", - }, - ], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "token", - type: "address", - }, - { - internalType: "uint256", - name: "liquidity", - type: "uint256", - }, - { - internalType: "uint256", - name: "amountTokenMin", - type: "uint256", - }, - { - internalType: "uint256", - name: "amountETHMin", - type: "uint256", - }, - { - internalType: "address", - name: "to", - type: "address", - }, - { - internalType: "uint256", - name: "deadline", - type: "uint256", - }, - ], - name: "removeLiquidityETHSupportingFeeOnTransferTokens", - outputs: [ - { - internalType: "uint256", - name: "amountETH", - type: "uint256", - }, - ], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "token", - type: "address", - }, - { - internalType: "uint256", - name: "liquidity", - type: "uint256", - }, - { - internalType: "uint256", - name: "amountTokenMin", - type: "uint256", - }, - { - internalType: "uint256", - name: "amountETHMin", - type: "uint256", - }, - { - internalType: "address", - name: "to", - type: "address", - }, - { - internalType: "uint256", - name: "deadline", - type: "uint256", - }, - { - internalType: "bool", - name: "approveMax", - type: "bool", - }, - { - internalType: "uint8", - name: "v", - type: "uint8", - }, - { - internalType: "bytes32", - name: "r", - type: "bytes32", - }, - { - internalType: "bytes32", - name: "s", - type: "bytes32", - }, - ], - name: "removeLiquidityETHWithPermit", - outputs: [ - { - internalType: "uint256", - name: "amountToken", - type: "uint256", - }, - { - internalType: "uint256", - name: "amountETH", - type: "uint256", - }, - ], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "token", - type: "address", - }, - { - internalType: "uint256", - name: "liquidity", - type: "uint256", - }, - { - internalType: "uint256", - name: "amountTokenMin", - type: "uint256", - }, - { - internalType: "uint256", - name: "amountETHMin", - type: "uint256", - }, - { - internalType: "address", - name: "to", - type: "address", - }, - { - internalType: "uint256", - name: "deadline", - type: "uint256", - }, - { - internalType: "bool", - name: "approveMax", - type: "bool", - }, - { - internalType: "uint8", - name: "v", - type: "uint8", - }, - { - internalType: "bytes32", - name: "r", - type: "bytes32", - }, - { - internalType: "bytes32", - name: "s", - type: "bytes32", - }, - ], - name: "removeLiquidityETHWithPermitSupportingFeeOnTransferTokens", - outputs: [ - { - internalType: "uint256", - name: "amountETH", - type: "uint256", - }, - ], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "tokenA", - type: "address", - }, - { - internalType: "address", - name: "tokenB", - type: "address", - }, - { - internalType: "uint256", - name: "liquidity", - type: "uint256", - }, - { - internalType: "uint256", - name: "amountAMin", - type: "uint256", - }, - { - internalType: "uint256", - name: "amountBMin", - type: "uint256", - }, - { - internalType: "address", - name: "to", - type: "address", - }, - { - internalType: "uint256", - name: "deadline", - type: "uint256", - }, - { - internalType: "bool", - name: "approveMax", - type: "bool", - }, - { - internalType: "uint8", - name: "v", - type: "uint8", - }, - { - internalType: "bytes32", - name: "r", - type: "bytes32", - }, - { - internalType: "bytes32", - name: "s", - type: "bytes32", - }, - ], - name: "removeLiquidityWithPermit", - outputs: [ - { - internalType: "uint256", - name: "amountA", - type: "uint256", - }, - { - internalType: "uint256", - name: "amountB", - type: "uint256", - }, - ], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "amountOut", - type: "uint256", - }, - { - internalType: "address[]", - name: "path", - type: "address[]", - }, - { - internalType: "address", - name: "to", - type: "address", - }, - { - internalType: "uint256", - name: "deadline", - type: "uint256", - }, - ], - name: "swapETHForExactTokens", - outputs: [ - { - internalType: "uint256[]", - name: "amounts", - type: "uint256[]", - }, - ], - stateMutability: "payable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "amountOutMin", - type: "uint256", - }, - { - internalType: "address[]", - name: "path", - type: "address[]", - }, - { - internalType: "address", - name: "to", - type: "address", - }, - { - internalType: "uint256", - name: "deadline", - type: "uint256", - }, - ], - name: "swapExactETHForTokens", - outputs: [ - { - internalType: "uint256[]", - name: "amounts", - type: "uint256[]", - }, - ], - stateMutability: "payable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "amountOutMin", - type: "uint256", - }, - { - internalType: "address[]", - name: "path", - type: "address[]", - }, - { - internalType: "address", - name: "to", - type: "address", - }, - { - internalType: "uint256", - name: "deadline", - type: "uint256", - }, - ], - name: "swapExactETHForTokensSupportingFeeOnTransferTokens", - outputs: [], - stateMutability: "payable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "amountIn", - type: "uint256", - }, - { - internalType: "uint256", - name: "amountOutMin", - type: "uint256", - }, - { - internalType: "address[]", - name: "path", - type: "address[]", - }, - { - internalType: "address", - name: "to", - type: "address", - }, - { - internalType: "uint256", - name: "deadline", - type: "uint256", - }, - ], - name: "swapExactTokensForETH", - outputs: [ - { - internalType: "uint256[]", - name: "amounts", - type: "uint256[]", - }, - ], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "amountIn", - type: "uint256", - }, - { - internalType: "uint256", - name: "amountOutMin", - type: "uint256", - }, - { - internalType: "address[]", - name: "path", - type: "address[]", - }, - { - internalType: "address", - name: "to", - type: "address", - }, - { - internalType: "uint256", - name: "deadline", - type: "uint256", - }, - ], - name: "swapExactTokensForETHSupportingFeeOnTransferTokens", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "amountIn", - type: "uint256", - }, - { - internalType: "uint256", - name: "amountOutMin", - type: "uint256", - }, - { - internalType: "address[]", - name: "path", - type: "address[]", - }, - { - internalType: "address", - name: "to", - type: "address", - }, - { - internalType: "uint256", - name: "deadline", - type: "uint256", - }, - ], - name: "swapExactTokensForTokens", - outputs: [ - { - internalType: "uint256[]", - name: "amounts", - type: "uint256[]", - }, - ], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "amountIn", - type: "uint256", - }, - { - internalType: "uint256", - name: "amountOutMin", - type: "uint256", - }, - { - internalType: "address[]", - name: "path", - type: "address[]", - }, - { - internalType: "address", - name: "to", - type: "address", - }, - { - internalType: "uint256", - name: "deadline", - type: "uint256", - }, - ], - name: "swapExactTokensForTokensSupportingFeeOnTransferTokens", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "amountOut", - type: "uint256", - }, - { - internalType: "uint256", - name: "amountInMax", - type: "uint256", - }, - { - internalType: "address[]", - name: "path", - type: "address[]", - }, - { - internalType: "address", - name: "to", - type: "address", - }, - { - internalType: "uint256", - name: "deadline", - type: "uint256", - }, - ], - name: "swapTokensForExactETH", - outputs: [ - { - internalType: "uint256[]", - name: "amounts", - type: "uint256[]", - }, - ], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "amountOut", - type: "uint256", - }, - { - internalType: "uint256", - name: "amountInMax", - type: "uint256", - }, - { - internalType: "address[]", - name: "path", - type: "address[]", - }, - { - internalType: "address", - name: "to", - type: "address", - }, - { - internalType: "uint256", - name: "deadline", - type: "uint256", - }, - ], - name: "swapTokensForExactTokens", - outputs: [ - { - internalType: "uint256[]", - name: "amounts", - type: "uint256[]", - }, - ], - stateMutability: "nonpayable", - type: "function", - }, -]; - -export class IUniswapV2Router02__factory { - static readonly abi = _abi; - static createInterface(): IUniswapV2Router02Interface { - return new utils.Interface(_abi) as IUniswapV2Router02Interface; - } - static connect( - address: string, - signerOrProvider: Signer | Provider - ): IUniswapV2Router02 { - return new Contract(address, _abi, signerOrProvider) as IUniswapV2Router02; - } -} diff --git a/packages/interfaces/typechain-types/factories/@uniswap/v2-periphery/contracts/interfaces/IWETH__factory.ts b/packages/interfaces/typechain-types/factories/@uniswap/v2-periphery/contracts/interfaces/IWETH__factory.ts deleted file mode 100644 index 4f033f64..00000000 --- a/packages/interfaces/typechain-types/factories/@uniswap/v2-periphery/contracts/interfaces/IWETH__factory.ts +++ /dev/null @@ -1,67 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ - -import { Contract, Signer, utils } from "ethers"; -import type { Provider } from "@ethersproject/providers"; -import type { - IWETH, - IWETHInterface, -} from "../../../../../@uniswap/v2-periphery/contracts/interfaces/IWETH"; - -const _abi = [ - { - inputs: [], - name: "deposit", - outputs: [], - stateMutability: "payable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "to", - type: "address", - }, - { - internalType: "uint256", - name: "value", - type: "uint256", - }, - ], - name: "transfer", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - name: "withdraw", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, -]; - -export class IWETH__factory { - static readonly abi = _abi; - static createInterface(): IWETHInterface { - return new utils.Interface(_abi) as IWETHInterface; - } - static connect(address: string, signerOrProvider: Signer | Provider): IWETH { - return new Contract(address, _abi, signerOrProvider) as IWETH; - } -} diff --git a/packages/interfaces/typechain-types/factories/@uniswap/v2-periphery/contracts/interfaces/index.ts b/packages/interfaces/typechain-types/factories/@uniswap/v2-periphery/contracts/interfaces/index.ts deleted file mode 100644 index f8c8fbd3..00000000 --- a/packages/interfaces/typechain-types/factories/@uniswap/v2-periphery/contracts/interfaces/index.ts +++ /dev/null @@ -1,7 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ -export { IERC20__factory } from "./IERC20__factory"; -export { IUniswapV2Router01__factory } from "./IUniswapV2Router01__factory"; -export { IUniswapV2Router02__factory } from "./IUniswapV2Router02__factory"; -export { IWETH__factory } from "./IWETH__factory"; diff --git a/packages/interfaces/typechain-types/factories/@uniswap/v2-periphery/index.ts b/packages/interfaces/typechain-types/factories/@uniswap/v2-periphery/index.ts deleted file mode 100644 index 6397da09..00000000 --- a/packages/interfaces/typechain-types/factories/@uniswap/v2-periphery/index.ts +++ /dev/null @@ -1,4 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ -export * as contracts from "./contracts"; diff --git a/packages/interfaces/typechain-types/factories/@uniswap/v3-core/contracts/index.ts b/packages/interfaces/typechain-types/factories/@uniswap/v3-core/contracts/index.ts deleted file mode 100644 index 1d3444d5..00000000 --- a/packages/interfaces/typechain-types/factories/@uniswap/v3-core/contracts/index.ts +++ /dev/null @@ -1,4 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ -export * as interfaces from "./interfaces"; diff --git a/packages/interfaces/typechain-types/factories/@uniswap/v3-core/contracts/interfaces/callback/IUniswapV3SwapCallback__factory.ts b/packages/interfaces/typechain-types/factories/@uniswap/v3-core/contracts/interfaces/callback/IUniswapV3SwapCallback__factory.ts deleted file mode 100644 index a0c1048a..00000000 --- a/packages/interfaces/typechain-types/factories/@uniswap/v3-core/contracts/interfaces/callback/IUniswapV3SwapCallback__factory.ts +++ /dev/null @@ -1,53 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ - -import { Contract, Signer, utils } from "ethers"; -import type { Provider } from "@ethersproject/providers"; -import type { - IUniswapV3SwapCallback, - IUniswapV3SwapCallbackInterface, -} from "../../../../../../@uniswap/v3-core/contracts/interfaces/callback/IUniswapV3SwapCallback"; - -const _abi = [ - { - inputs: [ - { - internalType: "int256", - name: "amount0Delta", - type: "int256", - }, - { - internalType: "int256", - name: "amount1Delta", - type: "int256", - }, - { - internalType: "bytes", - name: "data", - type: "bytes", - }, - ], - name: "uniswapV3SwapCallback", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, -]; - -export class IUniswapV3SwapCallback__factory { - static readonly abi = _abi; - static createInterface(): IUniswapV3SwapCallbackInterface { - return new utils.Interface(_abi) as IUniswapV3SwapCallbackInterface; - } - static connect( - address: string, - signerOrProvider: Signer | Provider - ): IUniswapV3SwapCallback { - return new Contract( - address, - _abi, - signerOrProvider - ) as IUniswapV3SwapCallback; - } -} diff --git a/packages/interfaces/typechain-types/factories/@uniswap/v3-core/contracts/interfaces/callback/index.ts b/packages/interfaces/typechain-types/factories/@uniswap/v3-core/contracts/interfaces/callback/index.ts deleted file mode 100644 index 0c401bd0..00000000 --- a/packages/interfaces/typechain-types/factories/@uniswap/v3-core/contracts/interfaces/callback/index.ts +++ /dev/null @@ -1,4 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ -export { IUniswapV3SwapCallback__factory } from "./IUniswapV3SwapCallback__factory"; diff --git a/packages/interfaces/typechain-types/factories/@uniswap/v3-core/contracts/interfaces/index.ts b/packages/interfaces/typechain-types/factories/@uniswap/v3-core/contracts/interfaces/index.ts deleted file mode 100644 index 01db08ef..00000000 --- a/packages/interfaces/typechain-types/factories/@uniswap/v3-core/contracts/interfaces/index.ts +++ /dev/null @@ -1,4 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ -export * as callback from "./callback"; diff --git a/packages/interfaces/typechain-types/factories/@uniswap/v3-core/index.ts b/packages/interfaces/typechain-types/factories/@uniswap/v3-core/index.ts deleted file mode 100644 index 6397da09..00000000 --- a/packages/interfaces/typechain-types/factories/@uniswap/v3-core/index.ts +++ /dev/null @@ -1,4 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ -export * as contracts from "./contracts"; diff --git a/packages/interfaces/typechain-types/factories/@uniswap/v3-periphery/contracts/index.ts b/packages/interfaces/typechain-types/factories/@uniswap/v3-periphery/contracts/index.ts deleted file mode 100644 index 1d3444d5..00000000 --- a/packages/interfaces/typechain-types/factories/@uniswap/v3-periphery/contracts/index.ts +++ /dev/null @@ -1,4 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ -export * as interfaces from "./interfaces"; diff --git a/packages/interfaces/typechain-types/factories/@uniswap/v3-periphery/contracts/interfaces/IQuoter__factory.ts b/packages/interfaces/typechain-types/factories/@uniswap/v3-periphery/contracts/interfaces/IQuoter__factory.ts deleted file mode 100644 index 4690d4bb..00000000 --- a/packages/interfaces/typechain-types/factories/@uniswap/v3-periphery/contracts/interfaces/IQuoter__factory.ts +++ /dev/null @@ -1,152 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ - -import { Contract, Signer, utils } from "ethers"; -import type { Provider } from "@ethersproject/providers"; -import type { - IQuoter, - IQuoterInterface, -} from "../../../../../@uniswap/v3-periphery/contracts/interfaces/IQuoter"; - -const _abi = [ - { - inputs: [ - { - internalType: "bytes", - name: "path", - type: "bytes", - }, - { - internalType: "uint256", - name: "amountIn", - type: "uint256", - }, - ], - name: "quoteExactInput", - outputs: [ - { - internalType: "uint256", - name: "amountOut", - type: "uint256", - }, - ], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "tokenIn", - type: "address", - }, - { - internalType: "address", - name: "tokenOut", - type: "address", - }, - { - internalType: "uint24", - name: "fee", - type: "uint24", - }, - { - internalType: "uint256", - name: "amountIn", - type: "uint256", - }, - { - internalType: "uint160", - name: "sqrtPriceLimitX96", - type: "uint160", - }, - ], - name: "quoteExactInputSingle", - outputs: [ - { - internalType: "uint256", - name: "amountOut", - type: "uint256", - }, - ], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "bytes", - name: "path", - type: "bytes", - }, - { - internalType: "uint256", - name: "amountOut", - type: "uint256", - }, - ], - name: "quoteExactOutput", - outputs: [ - { - internalType: "uint256", - name: "amountIn", - type: "uint256", - }, - ], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "tokenIn", - type: "address", - }, - { - internalType: "address", - name: "tokenOut", - type: "address", - }, - { - internalType: "uint24", - name: "fee", - type: "uint24", - }, - { - internalType: "uint256", - name: "amountOut", - type: "uint256", - }, - { - internalType: "uint160", - name: "sqrtPriceLimitX96", - type: "uint160", - }, - ], - name: "quoteExactOutputSingle", - outputs: [ - { - internalType: "uint256", - name: "amountIn", - type: "uint256", - }, - ], - stateMutability: "nonpayable", - type: "function", - }, -]; - -export class IQuoter__factory { - static readonly abi = _abi; - static createInterface(): IQuoterInterface { - return new utils.Interface(_abi) as IQuoterInterface; - } - static connect( - address: string, - signerOrProvider: Signer | Provider - ): IQuoter { - return new Contract(address, _abi, signerOrProvider) as IQuoter; - } -} diff --git a/packages/interfaces/typechain-types/factories/@uniswap/v3-periphery/contracts/interfaces/ISwapRouter__factory.ts b/packages/interfaces/typechain-types/factories/@uniswap/v3-periphery/contracts/interfaces/ISwapRouter__factory.ts deleted file mode 100644 index 8fa4e417..00000000 --- a/packages/interfaces/typechain-types/factories/@uniswap/v3-periphery/contracts/interfaces/ISwapRouter__factory.ts +++ /dev/null @@ -1,263 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ - -import { Contract, Signer, utils } from "ethers"; -import type { Provider } from "@ethersproject/providers"; -import type { - ISwapRouter, - ISwapRouterInterface, -} from "../../../../../@uniswap/v3-periphery/contracts/interfaces/ISwapRouter"; - -const _abi = [ - { - inputs: [ - { - components: [ - { - internalType: "bytes", - name: "path", - type: "bytes", - }, - { - internalType: "address", - name: "recipient", - type: "address", - }, - { - internalType: "uint256", - name: "deadline", - type: "uint256", - }, - { - internalType: "uint256", - name: "amountIn", - type: "uint256", - }, - { - internalType: "uint256", - name: "amountOutMinimum", - type: "uint256", - }, - ], - internalType: "struct ISwapRouter.ExactInputParams", - name: "params", - type: "tuple", - }, - ], - name: "exactInput", - outputs: [ - { - internalType: "uint256", - name: "amountOut", - type: "uint256", - }, - ], - stateMutability: "payable", - type: "function", - }, - { - inputs: [ - { - components: [ - { - internalType: "address", - name: "tokenIn", - type: "address", - }, - { - internalType: "address", - name: "tokenOut", - type: "address", - }, - { - internalType: "uint24", - name: "fee", - type: "uint24", - }, - { - internalType: "address", - name: "recipient", - type: "address", - }, - { - internalType: "uint256", - name: "deadline", - type: "uint256", - }, - { - internalType: "uint256", - name: "amountIn", - type: "uint256", - }, - { - internalType: "uint256", - name: "amountOutMinimum", - type: "uint256", - }, - { - internalType: "uint160", - name: "sqrtPriceLimitX96", - type: "uint160", - }, - ], - internalType: "struct ISwapRouter.ExactInputSingleParams", - name: "params", - type: "tuple", - }, - ], - name: "exactInputSingle", - outputs: [ - { - internalType: "uint256", - name: "amountOut", - type: "uint256", - }, - ], - stateMutability: "payable", - type: "function", - }, - { - inputs: [ - { - components: [ - { - internalType: "bytes", - name: "path", - type: "bytes", - }, - { - internalType: "address", - name: "recipient", - type: "address", - }, - { - internalType: "uint256", - name: "deadline", - type: "uint256", - }, - { - internalType: "uint256", - name: "amountOut", - type: "uint256", - }, - { - internalType: "uint256", - name: "amountInMaximum", - type: "uint256", - }, - ], - internalType: "struct ISwapRouter.ExactOutputParams", - name: "params", - type: "tuple", - }, - ], - name: "exactOutput", - outputs: [ - { - internalType: "uint256", - name: "amountIn", - type: "uint256", - }, - ], - stateMutability: "payable", - type: "function", - }, - { - inputs: [ - { - components: [ - { - internalType: "address", - name: "tokenIn", - type: "address", - }, - { - internalType: "address", - name: "tokenOut", - type: "address", - }, - { - internalType: "uint24", - name: "fee", - type: "uint24", - }, - { - internalType: "address", - name: "recipient", - type: "address", - }, - { - internalType: "uint256", - name: "deadline", - type: "uint256", - }, - { - internalType: "uint256", - name: "amountOut", - type: "uint256", - }, - { - internalType: "uint256", - name: "amountInMaximum", - type: "uint256", - }, - { - internalType: "uint160", - name: "sqrtPriceLimitX96", - type: "uint160", - }, - ], - internalType: "struct ISwapRouter.ExactOutputSingleParams", - name: "params", - type: "tuple", - }, - ], - name: "exactOutputSingle", - outputs: [ - { - internalType: "uint256", - name: "amountIn", - type: "uint256", - }, - ], - stateMutability: "payable", - type: "function", - }, - { - inputs: [ - { - internalType: "int256", - name: "amount0Delta", - type: "int256", - }, - { - internalType: "int256", - name: "amount1Delta", - type: "int256", - }, - { - internalType: "bytes", - name: "data", - type: "bytes", - }, - ], - name: "uniswapV3SwapCallback", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, -]; - -export class ISwapRouter__factory { - static readonly abi = _abi; - static createInterface(): ISwapRouterInterface { - return new utils.Interface(_abi) as ISwapRouterInterface; - } - static connect( - address: string, - signerOrProvider: Signer | Provider - ): ISwapRouter { - return new Contract(address, _abi, signerOrProvider) as ISwapRouter; - } -} diff --git a/packages/interfaces/typechain-types/factories/@uniswap/v3-periphery/contracts/interfaces/index.ts b/packages/interfaces/typechain-types/factories/@uniswap/v3-periphery/contracts/interfaces/index.ts deleted file mode 100644 index 0ab8d07a..00000000 --- a/packages/interfaces/typechain-types/factories/@uniswap/v3-periphery/contracts/interfaces/index.ts +++ /dev/null @@ -1,5 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ -export { IQuoter__factory } from "./IQuoter__factory"; -export { ISwapRouter__factory } from "./ISwapRouter__factory"; diff --git a/packages/interfaces/typechain-types/factories/@uniswap/v3-periphery/index.ts b/packages/interfaces/typechain-types/factories/@uniswap/v3-periphery/index.ts deleted file mode 100644 index 6397da09..00000000 --- a/packages/interfaces/typechain-types/factories/@uniswap/v3-periphery/index.ts +++ /dev/null @@ -1,4 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ -export * as contracts from "./contracts"; diff --git a/packages/interfaces/typechain-types/factories/contracts/ImmutableCreate2Factory.sol/ImmutableCreate2Factory__factory.ts b/packages/interfaces/typechain-types/factories/contracts/ImmutableCreate2Factory.sol/ImmutableCreate2Factory__factory.ts deleted file mode 100644 index 5c4256dd..00000000 --- a/packages/interfaces/typechain-types/factories/contracts/ImmutableCreate2Factory.sol/ImmutableCreate2Factory__factory.ts +++ /dev/null @@ -1,177 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ -import { Signer, utils, Contract, ContractFactory, Overrides } from "ethers"; -import type { Provider, TransactionRequest } from "@ethersproject/providers"; -import type { - ImmutableCreate2Factory, - ImmutableCreate2FactoryInterface, -} from "../../../contracts/ImmutableCreate2Factory.sol/ImmutableCreate2Factory"; - -const _abi = [ - { - constant: true, - inputs: [ - { - name: "deploymentAddress", - type: "address", - }, - ], - name: "hasBeenDeployed", - outputs: [ - { - name: "", - type: "bool", - }, - ], - payable: false, - stateMutability: "view", - type: "function", - }, - { - constant: false, - inputs: [ - { - name: "salt", - type: "bytes32", - }, - { - name: "initializationCode", - type: "bytes", - }, - ], - name: "safeCreate2AndTransfer", - outputs: [ - { - name: "deploymentAddress", - type: "address", - }, - ], - payable: true, - stateMutability: "payable", - type: "function", - }, - { - constant: false, - inputs: [ - { - name: "salt", - type: "bytes32", - }, - { - name: "initializationCode", - type: "bytes", - }, - ], - name: "safeCreate2", - outputs: [ - { - name: "deploymentAddress", - type: "address", - }, - ], - payable: true, - stateMutability: "payable", - type: "function", - }, - { - constant: true, - inputs: [ - { - name: "salt", - type: "bytes32", - }, - { - name: "initCode", - type: "bytes", - }, - ], - name: "findCreate2Address", - outputs: [ - { - name: "deploymentAddress", - type: "address", - }, - ], - payable: false, - stateMutability: "view", - type: "function", - }, - { - constant: true, - inputs: [ - { - name: "salt", - type: "bytes32", - }, - { - name: "initCodeHash", - type: "bytes32", - }, - ], - name: "findCreate2AddressViaHash", - outputs: [ - { - name: "deploymentAddress", - type: "address", - }, - ], - payable: false, - stateMutability: "view", - type: "function", - }, -]; - -const _bytecode = - "0x608060405234801561001057600080fd5b50610c54806100206000396000f3fe60806040526004361061004a5760003560e01c806308508b8f1461004f57806329346003146100b857806364e030871461017b57806385cf97ab14610280578063a49a7c9014610350575b600080fd5b34801561005b57600080fd5b5061009e6004803603602081101561007257600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506103d5565b604051808215151515815260200191505060405180910390f35b610139600480360360408110156100ce57600080fd5b8101908080359060200190929190803590602001906401000000008111156100f557600080fd5b82018360208201111561010757600080fd5b8035906020019184600183028401116401000000008311171561012957600080fd5b909192939192939050505061042a565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b61023e6004803603604081101561019157600080fd5b8101908080359060200190929190803590602001906401000000008111156101b857600080fd5b8201836020820111156101ca57600080fd5b803590602001918460018302840111640100000000831117156101ec57600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f8201169050808301925050505050505091929192905050506105cf565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561028c57600080fd5b5061030e600480360360408110156102a357600080fd5b8101908080359060200190929190803590602001906401000000008111156102ca57600080fd5b8201836020820111156102dc57600080fd5b803590602001918460018302840111640100000000831117156102fe57600080fd5b9091929391929390505050610698565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561035c57600080fd5b506103936004803603604081101561037357600080fd5b8101908080359060200190929190803590602001909291905050506107be565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b60008060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff169050919050565b6000833373ffffffffffffffffffffffffffffffffffffffff168160601c73ffffffffffffffffffffffffffffffffffffffff16148061048b5750600060601b6bffffffffffffffffffffffff1916816bffffffffffffffffffffffff1916145b6104e0576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526045815260200180610b956045913960600191505060405180910390fd5b61052e8585858080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050506108b4565b91508173ffffffffffffffffffffffffffffffffffffffff1663f2fde38b336040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001915050600060405180830381600087803b1580156105af57600080fd5b505af11580156105c3573d6000803e3d6000fd5b50505050509392505050565b6000823373ffffffffffffffffffffffffffffffffffffffff168160601c73ffffffffffffffffffffffffffffffffffffffff1614806106305750600060601b6bffffffffffffffffffffffff1916816bffffffffffffffffffffffff1916145b610685576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526045815260200180610b956045913960600191505060405180910390fd5b61068f84846108b4565b91505092915050565b6000308484846040516020018083838082843780830192505050925050506040516020818303038152906040528051906020012060405160200180807fff000000000000000000000000000000000000000000000000000000000000008152506001018473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1660601b815260140183815260200182815260200193505050506040516020818303038152906040528051906020012060001c90506000808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16156107b657600090506107b7565b5b9392505050565b600030838360405160200180807fff000000000000000000000000000000000000000000000000000000000000008152506001018473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1660601b815260140183815260200182815260200193505050506040516020818303038152906040528051906020012060001c90506000808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16156108ad57600090506108ae565b5b92915050565b6000606082905060003085836040516020018082805190602001908083835b602083106108f657805182526020820191506020810190506020830392506108d3565b6001836020036101000a0380198251168184511680821785525050505050509050019150506040516020818303038152906040528051906020012060405160200180807fff000000000000000000000000000000000000000000000000000000000000008152506001018473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1660601b815260140183815260200182815260200193505050506040516020818303038152906040528051906020012060001c90506000808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1615610a63576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252603f815260200180610b56603f913960400191505060405180910390fd5b81602001825186818334f5945050508073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614610af6576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526046815260200180610bda6046913960600191505060405180910390fd5b60016000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555050509291505056fe496e76616c696420636f6e7472616374206372656174696f6e202d20636f6e74726163742068617320616c7265616479206265656e206465706c6f7965642e496e76616c69642073616c74202d206669727374203230206279746573206f66207468652073616c74206d757374206d617463682063616c6c696e6720616464726573732e4661696c656420746f206465706c6f7920636f6e7472616374207573696e672070726f76696465642073616c7420616e6420696e697469616c697a6174696f6e20636f64652ea265627a7a72305820a78ac019740038abee03eddb8175dfb6b2e2b02b701cbb347a488accc30e4f5d64736f6c634300050a0032"; - -type ImmutableCreate2FactoryConstructorParams = - | [signer?: Signer] - | ConstructorParameters; - -const isSuperArgs = ( - xs: ImmutableCreate2FactoryConstructorParams -): xs is ConstructorParameters => xs.length > 1; - -export class ImmutableCreate2Factory__factory extends ContractFactory { - constructor(...args: ImmutableCreate2FactoryConstructorParams) { - if (isSuperArgs(args)) { - super(...args); - } else { - super(_abi, _bytecode, args[0]); - } - } - - override deploy( - overrides?: Overrides & { from?: string | Promise } - ): Promise { - return super.deploy(overrides || {}) as Promise; - } - override getDeployTransaction( - overrides?: Overrides & { from?: string | Promise } - ): TransactionRequest { - return super.getDeployTransaction(overrides || {}); - } - override attach(address: string): ImmutableCreate2Factory { - return super.attach(address) as ImmutableCreate2Factory; - } - override connect(signer: Signer): ImmutableCreate2Factory__factory { - return super.connect(signer) as ImmutableCreate2Factory__factory; - } - - static readonly bytecode = _bytecode; - static readonly abi = _abi; - static createInterface(): ImmutableCreate2FactoryInterface { - return new utils.Interface(_abi) as ImmutableCreate2FactoryInterface; - } - static connect( - address: string, - signerOrProvider: Signer | Provider - ): ImmutableCreate2Factory { - return new Contract( - address, - _abi, - signerOrProvider - ) as ImmutableCreate2Factory; - } -} diff --git a/packages/interfaces/typechain-types/factories/contracts/ImmutableCreate2Factory.sol/Ownable__factory.ts b/packages/interfaces/typechain-types/factories/contracts/ImmutableCreate2Factory.sol/Ownable__factory.ts deleted file mode 100644 index ad195845..00000000 --- a/packages/interfaces/typechain-types/factories/contracts/ImmutableCreate2Factory.sol/Ownable__factory.ts +++ /dev/null @@ -1,40 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ - -import { Contract, Signer, utils } from "ethers"; -import type { Provider } from "@ethersproject/providers"; -import type { - Ownable, - OwnableInterface, -} from "../../../contracts/ImmutableCreate2Factory.sol/Ownable"; - -const _abi = [ - { - constant: false, - inputs: [ - { - name: "newOwner", - type: "address", - }, - ], - name: "transferOwnership", - outputs: [], - payable: false, - stateMutability: "nonpayable", - type: "function", - }, -]; - -export class Ownable__factory { - static readonly abi = _abi; - static createInterface(): OwnableInterface { - return new utils.Interface(_abi) as OwnableInterface; - } - static connect( - address: string, - signerOrProvider: Signer | Provider - ): Ownable { - return new Contract(address, _abi, signerOrProvider) as Ownable; - } -} diff --git a/packages/interfaces/typechain-types/factories/contracts/ImmutableCreate2Factory.sol/index.ts b/packages/interfaces/typechain-types/factories/contracts/ImmutableCreate2Factory.sol/index.ts deleted file mode 100644 index bacefb31..00000000 --- a/packages/interfaces/typechain-types/factories/contracts/ImmutableCreate2Factory.sol/index.ts +++ /dev/null @@ -1,5 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ -export { ImmutableCreate2Factory__factory } from "./ImmutableCreate2Factory__factory"; -export { Ownable__factory } from "./Ownable__factory"; diff --git a/packages/interfaces/typechain-types/factories/contracts/Zeta.eth.sol/ZetaEth__factory.ts b/packages/interfaces/typechain-types/factories/contracts/Zeta.eth.sol/ZetaEth__factory.ts deleted file mode 100644 index c59e3587..00000000 --- a/packages/interfaces/typechain-types/factories/contracts/Zeta.eth.sol/ZetaEth__factory.ts +++ /dev/null @@ -1,352 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ -import { - Signer, - utils, - Contract, - ContractFactory, - BigNumberish, - Overrides, -} from "ethers"; -import type { Provider, TransactionRequest } from "@ethersproject/providers"; -import type { - ZetaEth, - ZetaEthInterface, -} from "../../../contracts/Zeta.eth.sol/ZetaEth"; - -const _abi = [ - { - inputs: [ - { - internalType: "uint256", - name: "initialSupply", - type: "uint256", - }, - ], - stateMutability: "nonpayable", - type: "constructor", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "address", - name: "owner", - type: "address", - }, - { - indexed: true, - internalType: "address", - name: "spender", - type: "address", - }, - { - indexed: false, - internalType: "uint256", - name: "value", - type: "uint256", - }, - ], - name: "Approval", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "address", - name: "from", - type: "address", - }, - { - indexed: true, - internalType: "address", - name: "to", - type: "address", - }, - { - indexed: false, - internalType: "uint256", - name: "value", - type: "uint256", - }, - ], - name: "Transfer", - type: "event", - }, - { - inputs: [ - { - internalType: "address", - name: "owner", - type: "address", - }, - { - internalType: "address", - name: "spender", - type: "address", - }, - ], - name: "allowance", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "spender", - type: "address", - }, - { - internalType: "uint256", - name: "amount", - type: "uint256", - }, - ], - name: "approve", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "account", - type: "address", - }, - ], - name: "balanceOf", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "decimals", - outputs: [ - { - internalType: "uint8", - name: "", - type: "uint8", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "spender", - type: "address", - }, - { - internalType: "uint256", - name: "subtractedValue", - type: "uint256", - }, - ], - name: "decreaseAllowance", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "spender", - type: "address", - }, - { - internalType: "uint256", - name: "addedValue", - type: "uint256", - }, - ], - name: "increaseAllowance", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "name", - outputs: [ - { - internalType: "string", - name: "", - type: "string", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "symbol", - outputs: [ - { - internalType: "string", - name: "", - type: "string", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "totalSupply", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "to", - type: "address", - }, - { - internalType: "uint256", - name: "amount", - type: "uint256", - }, - ], - name: "transfer", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "from", - type: "address", - }, - { - internalType: "address", - name: "to", - type: "address", - }, - { - internalType: "uint256", - name: "amount", - type: "uint256", - }, - ], - name: "transferFrom", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "nonpayable", - type: "function", - }, -]; - -const _bytecode = - "0x60806040523480156200001157600080fd5b50604051620019eb380380620019eb833981810160405281019062000037919062000370565b6040518060400160405280600481526020017f5a657461000000000000000000000000000000000000000000000000000000008152506040518060400160405280600481526020017f5a455441000000000000000000000000000000000000000000000000000000008152508160039080519060200190620000bb929190620002a9565b508060049080519060200190620000d4929190620002a9565b5050506200011633620000ec6200011d60201b60201c565b60ff16600a620000fd9190620004e2565b836200010a91906200061f565b6200012660201b60201c565b5062000773565b60006012905090565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16141562000199576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016200019090620003da565b60405180910390fd5b620001ad600083836200029f60201b60201c565b8060026000828254620001c191906200042a565b92505081905550806000808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282546200021891906200042a565b925050819055508173ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040516200027f9190620003fc565b60405180910390a36200029b60008383620002a460201b60201c565b5050565b505050565b505050565b828054620002b7906200068a565b90600052602060002090601f016020900481019282620002db576000855562000327565b82601f10620002f657805160ff191683800117855562000327565b8280016001018555821562000327579182015b828111156200032657825182559160200191906001019062000309565b5b5090506200033691906200033a565b5090565b5b80821115620003555760008160009055506001016200033b565b5090565b6000815190506200036a8162000759565b92915050565b6000602082840312156200038957620003886200071e565b5b6000620003998482850162000359565b91505092915050565b6000620003b1601f8362000419565b9150620003be8262000730565b602082019050919050565b620003d48162000680565b82525050565b60006020820190508181036000830152620003f581620003a2565b9050919050565b6000602082019050620004136000830184620003c9565b92915050565b600082825260208201905092915050565b6000620004378262000680565b9150620004448362000680565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff038211156200047c576200047b620006c0565b5b828201905092915050565b6000808291508390505b6001851115620004d957808604811115620004b157620004b0620006c0565b5b6001851615620004c15780820291505b8081029050620004d18562000723565b945062000491565b94509492505050565b6000620004ef8262000680565b9150620004fc8362000680565b92506200052b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff848462000533565b905092915050565b60008262000545576001905062000618565b8162000555576000905062000618565b81600181146200056e57600281146200057957620005af565b600191505062000618565b60ff8411156200058e576200058d620006c0565b5b8360020a915084821115620005a857620005a7620006c0565b5b5062000618565b5060208310610133831016604e8410600b8410161715620005e95782820a905083811115620005e357620005e2620006c0565b5b62000618565b620005f8848484600162000487565b92509050818404811115620006125762000611620006c0565b5b81810290505b9392505050565b60006200062c8262000680565b9150620006398362000680565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0483118215151615620006755762000674620006c0565b5b828202905092915050565b6000819050919050565b60006002820490506001821680620006a357607f821691505b60208210811415620006ba57620006b9620006ef565b5b50919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b600080fd5b60008160011c9050919050565b7f45524332303a206d696e7420746f20746865207a65726f206164647265737300600082015250565b620007648162000680565b81146200077057600080fd5b50565b61126880620007836000396000f3fe608060405234801561001057600080fd5b50600436106100a95760003560e01c80633950935111610071578063395093511461016857806370a082311461019857806395d89b41146101c8578063a457c2d7146101e6578063a9059cbb14610216578063dd62ed3e14610246576100a9565b806306fdde03146100ae578063095ea7b3146100cc57806318160ddd146100fc57806323b872dd1461011a578063313ce5671461014a575b600080fd5b6100b6610276565b6040516100c39190610d29565b60405180910390f35b6100e660048036038101906100e19190610b73565b610308565b6040516100f39190610d0e565b60405180910390f35b61010461032b565b6040516101119190610e2b565b60405180910390f35b610134600480360381019061012f9190610b20565b610335565b6040516101419190610d0e565b60405180910390f35b610152610364565b60405161015f9190610e46565b60405180910390f35b610182600480360381019061017d9190610b73565b61036d565b60405161018f9190610d0e565b60405180910390f35b6101b260048036038101906101ad9190610ab3565b6103a4565b6040516101bf9190610e2b565b60405180910390f35b6101d06103ec565b6040516101dd9190610d29565b60405180910390f35b61020060048036038101906101fb9190610b73565b61047e565b60405161020d9190610d0e565b60405180910390f35b610230600480360381019061022b9190610b73565b6104f5565b60405161023d9190610d0e565b60405180910390f35b610260600480360381019061025b9190610ae0565b610518565b60405161026d9190610e2b565b60405180910390f35b60606003805461028590610f5b565b80601f01602080910402602001604051908101604052809291908181526020018280546102b190610f5b565b80156102fe5780601f106102d3576101008083540402835291602001916102fe565b820191906000526020600020905b8154815290600101906020018083116102e157829003601f168201915b5050505050905090565b60008061031361059f565b90506103208185856105a7565b600191505092915050565b6000600254905090565b60008061034061059f565b905061034d858285610772565b6103588585856107fe565b60019150509392505050565b60006012905090565b60008061037861059f565b905061039981858561038a8589610518565b6103949190610e7d565b6105a7565b600191505092915050565b60008060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b6060600480546103fb90610f5b565b80601f016020809104026020016040519081016040528092919081815260200182805461042790610f5b565b80156104745780601f1061044957610100808354040283529160200191610474565b820191906000526020600020905b81548152906001019060200180831161045757829003601f168201915b5050505050905090565b60008061048961059f565b905060006104978286610518565b9050838110156104dc576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016104d390610e0b565b60405180910390fd5b6104e982868684036105a7565b60019250505092915050565b60008061050061059f565b905061050d8185856107fe565b600191505092915050565b6000600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415610617576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161060e90610deb565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415610687576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161067e90610d6b565b60405180910390fd5b80600160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925836040516107659190610e2b565b60405180910390a3505050565b600061077e8484610518565b90507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff81146107f857818110156107ea576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016107e190610d8b565b60405180910390fd5b6107f784848484036105a7565b5b50505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16141561086e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161086590610dcb565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614156108de576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016108d590610d4b565b60405180910390fd5b6108e9838383610a7f565b60008060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205490508181101561096f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161096690610dab565b60405180910390fd5b8181036000808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550816000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254610a029190610e7d565b925050819055508273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef84604051610a669190610e2b565b60405180910390a3610a79848484610a84565b50505050565b505050565b505050565b600081359050610a9881611204565b92915050565b600081359050610aad8161121b565b92915050565b600060208284031215610ac957610ac8610feb565b5b6000610ad784828501610a89565b91505092915050565b60008060408385031215610af757610af6610feb565b5b6000610b0585828601610a89565b9250506020610b1685828601610a89565b9150509250929050565b600080600060608486031215610b3957610b38610feb565b5b6000610b4786828701610a89565b9350506020610b5886828701610a89565b9250506040610b6986828701610a9e565b9150509250925092565b60008060408385031215610b8a57610b89610feb565b5b6000610b9885828601610a89565b9250506020610ba985828601610a9e565b9150509250929050565b610bbc81610ee5565b82525050565b6000610bcd82610e61565b610bd78185610e6c565b9350610be7818560208601610f28565b610bf081610ff0565b840191505092915050565b6000610c08602383610e6c565b9150610c1382611001565b604082019050919050565b6000610c2b602283610e6c565b9150610c3682611050565b604082019050919050565b6000610c4e601d83610e6c565b9150610c598261109f565b602082019050919050565b6000610c71602683610e6c565b9150610c7c826110c8565b604082019050919050565b6000610c94602583610e6c565b9150610c9f82611117565b604082019050919050565b6000610cb7602483610e6c565b9150610cc282611166565b604082019050919050565b6000610cda602583610e6c565b9150610ce5826111b5565b604082019050919050565b610cf981610f11565b82525050565b610d0881610f1b565b82525050565b6000602082019050610d236000830184610bb3565b92915050565b60006020820190508181036000830152610d438184610bc2565b905092915050565b60006020820190508181036000830152610d6481610bfb565b9050919050565b60006020820190508181036000830152610d8481610c1e565b9050919050565b60006020820190508181036000830152610da481610c41565b9050919050565b60006020820190508181036000830152610dc481610c64565b9050919050565b60006020820190508181036000830152610de481610c87565b9050919050565b60006020820190508181036000830152610e0481610caa565b9050919050565b60006020820190508181036000830152610e2481610ccd565b9050919050565b6000602082019050610e406000830184610cf0565b92915050565b6000602082019050610e5b6000830184610cff565b92915050565b600081519050919050565b600082825260208201905092915050565b6000610e8882610f11565b9150610e9383610f11565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff03821115610ec857610ec7610f8d565b5b828201905092915050565b6000610ede82610ef1565b9050919050565b60008115159050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b600060ff82169050919050565b60005b83811015610f46578082015181840152602081019050610f2b565b83811115610f55576000848401525b50505050565b60006002820490506001821680610f7357607f821691505b60208210811415610f8757610f86610fbc565b5b50919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b600080fd5b6000601f19601f8301169050919050565b7f45524332303a207472616e7366657220746f20746865207a65726f206164647260008201527f6573730000000000000000000000000000000000000000000000000000000000602082015250565b7f45524332303a20617070726f766520746f20746865207a65726f20616464726560008201527f7373000000000000000000000000000000000000000000000000000000000000602082015250565b7f45524332303a20696e73756666696369656e7420616c6c6f77616e6365000000600082015250565b7f45524332303a207472616e7366657220616d6f756e742065786365656473206260008201527f616c616e63650000000000000000000000000000000000000000000000000000602082015250565b7f45524332303a207472616e736665722066726f6d20746865207a65726f20616460008201527f6472657373000000000000000000000000000000000000000000000000000000602082015250565b7f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460008201527f7265737300000000000000000000000000000000000000000000000000000000602082015250565b7f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f7760008201527f207a65726f000000000000000000000000000000000000000000000000000000602082015250565b61120d81610ed3565b811461121857600080fd5b50565b61122481610f11565b811461122f57600080fd5b5056fea264697066735822122085f62951c60131806ff6d81dd2cb63a4fa2077ceb118c62fb5c0f303f2e1519a64736f6c63430008070033"; - -type ZetaEthConstructorParams = - | [signer?: Signer] - | ConstructorParameters; - -const isSuperArgs = ( - xs: ZetaEthConstructorParams -): xs is ConstructorParameters => xs.length > 1; - -export class ZetaEth__factory extends ContractFactory { - constructor(...args: ZetaEthConstructorParams) { - if (isSuperArgs(args)) { - super(...args); - } else { - super(_abi, _bytecode, args[0]); - } - } - - override deploy( - initialSupply: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise { - return super.deploy(initialSupply, overrides || {}) as Promise; - } - override getDeployTransaction( - initialSupply: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): TransactionRequest { - return super.getDeployTransaction(initialSupply, overrides || {}); - } - override attach(address: string): ZetaEth { - return super.attach(address) as ZetaEth; - } - override connect(signer: Signer): ZetaEth__factory { - return super.connect(signer) as ZetaEth__factory; - } - - static readonly bytecode = _bytecode; - static readonly abi = _abi; - static createInterface(): ZetaEthInterface { - return new utils.Interface(_abi) as ZetaEthInterface; - } - static connect( - address: string, - signerOrProvider: Signer | Provider - ): ZetaEth { - return new Contract(address, _abi, signerOrProvider) as ZetaEth; - } -} diff --git a/packages/interfaces/typechain-types/factories/contracts/Zeta.eth.sol/index.ts b/packages/interfaces/typechain-types/factories/contracts/Zeta.eth.sol/index.ts deleted file mode 100644 index b1334223..00000000 --- a/packages/interfaces/typechain-types/factories/contracts/Zeta.eth.sol/index.ts +++ /dev/null @@ -1,4 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ -export { ZetaEth__factory } from "./ZetaEth__factory"; diff --git a/packages/interfaces/typechain-types/factories/contracts/Zeta.non-eth.sol/ZetaNonEth__factory.ts b/packages/interfaces/typechain-types/factories/contracts/Zeta.non-eth.sol/ZetaNonEth__factory.ts deleted file mode 100644 index 3d8143e0..00000000 --- a/packages/interfaces/typechain-types/factories/contracts/Zeta.non-eth.sol/ZetaNonEth__factory.ts +++ /dev/null @@ -1,576 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ -import { Signer, utils, Contract, ContractFactory, Overrides } from "ethers"; -import type { Provider, TransactionRequest } from "@ethersproject/providers"; -import type { - ZetaNonEth, - ZetaNonEthInterface, -} from "../../../contracts/Zeta.non-eth.sol/ZetaNonEth"; - -const _abi = [ - { - inputs: [ - { - internalType: "address", - name: "tssAddress_", - type: "address", - }, - { - internalType: "address", - name: "tssAddressUpdater_", - type: "address", - }, - ], - stateMutability: "nonpayable", - type: "constructor", - }, - { - inputs: [ - { - internalType: "address", - name: "caller", - type: "address", - }, - ], - name: "CallerIsNotConnector", - type: "error", - }, - { - inputs: [ - { - internalType: "address", - name: "caller", - type: "address", - }, - ], - name: "CallerIsNotTss", - type: "error", - }, - { - inputs: [ - { - internalType: "address", - name: "caller", - type: "address", - }, - ], - name: "CallerIsNotTssOrUpdater", - type: "error", - }, - { - inputs: [ - { - internalType: "address", - name: "caller", - type: "address", - }, - ], - name: "CallerIsNotTssUpdater", - type: "error", - }, - { - inputs: [], - name: "InvalidAddress", - type: "error", - }, - { - inputs: [], - name: "ZetaTransferError", - type: "error", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "address", - name: "owner", - type: "address", - }, - { - indexed: true, - internalType: "address", - name: "spender", - type: "address", - }, - { - indexed: false, - internalType: "uint256", - name: "value", - type: "uint256", - }, - ], - name: "Approval", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "address", - name: "burnee", - type: "address", - }, - { - indexed: false, - internalType: "uint256", - name: "amount", - type: "uint256", - }, - ], - name: "Burnt", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "address", - name: "mintee", - type: "address", - }, - { - indexed: false, - internalType: "uint256", - name: "amount", - type: "uint256", - }, - { - indexed: true, - internalType: "bytes32", - name: "internalSendHash", - type: "bytes32", - }, - ], - name: "Minted", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "address", - name: "from", - type: "address", - }, - { - indexed: true, - internalType: "address", - name: "to", - type: "address", - }, - { - indexed: false, - internalType: "uint256", - name: "value", - type: "uint256", - }, - ], - name: "Transfer", - type: "event", - }, - { - inputs: [ - { - internalType: "address", - name: "owner", - type: "address", - }, - { - internalType: "address", - name: "spender", - type: "address", - }, - ], - name: "allowance", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "spender", - type: "address", - }, - { - internalType: "uint256", - name: "amount", - type: "uint256", - }, - ], - name: "approve", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "account", - type: "address", - }, - ], - name: "balanceOf", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "amount", - type: "uint256", - }, - ], - name: "burn", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "account", - type: "address", - }, - { - internalType: "uint256", - name: "amount", - type: "uint256", - }, - ], - name: "burnFrom", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "connectorAddress", - outputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "decimals", - outputs: [ - { - internalType: "uint8", - name: "", - type: "uint8", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "spender", - type: "address", - }, - { - internalType: "uint256", - name: "subtractedValue", - type: "uint256", - }, - ], - name: "decreaseAllowance", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "spender", - type: "address", - }, - { - internalType: "uint256", - name: "addedValue", - type: "uint256", - }, - ], - name: "increaseAllowance", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "mintee", - type: "address", - }, - { - internalType: "uint256", - name: "value", - type: "uint256", - }, - { - internalType: "bytes32", - name: "internalSendHash", - type: "bytes32", - }, - ], - name: "mint", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "name", - outputs: [ - { - internalType: "string", - name: "", - type: "string", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "renounceTssAddressUpdater", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "symbol", - outputs: [ - { - internalType: "string", - name: "", - type: "string", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "totalSupply", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "to", - type: "address", - }, - { - internalType: "uint256", - name: "amount", - type: "uint256", - }, - ], - name: "transfer", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "from", - type: "address", - }, - { - internalType: "address", - name: "to", - type: "address", - }, - { - internalType: "uint256", - name: "amount", - type: "uint256", - }, - ], - name: "transferFrom", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "tssAddress", - outputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "tssAddressUpdater", - outputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "tssAddress_", - type: "address", - }, - { - internalType: "address", - name: "connectorAddress_", - type: "address", - }, - ], - name: "updateTssAndConnectorAddresses", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, -]; - -const _bytecode = - "0x60806040523480156200001157600080fd5b506040516200237c3803806200237c8339818101604052810190620000379190620002c8565b6040518060400160405280600481526020017f5a657461000000000000000000000000000000000000000000000000000000008152506040518060400160405280600481526020017f5a455441000000000000000000000000000000000000000000000000000000008152508160039080519060200190620000bb92919062000201565b508060049080519060200190620000d492919062000201565b505050600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614806200013f5750600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16145b1562000177576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b81600660006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555080600760006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505050620003c7565b8280546200020f9062000343565b90600052602060002090601f0160209004810192826200023357600085556200027f565b82601f106200024e57805160ff19168380011785556200027f565b828001600101855582156200027f579182015b828111156200027e57825182559160200191906001019062000261565b5b5090506200028e919062000292565b5090565b5b80821115620002ad57600081600090555060010162000293565b5090565b600081519050620002c281620003ad565b92915050565b60008060408385031215620002e257620002e1620003a8565b5b6000620002f285828601620002b1565b92505060206200030585828601620002b1565b9150509250929050565b60006200031c8262000323565b9050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600060028204905060018216806200035c57607f821691505b6020821081141562000373576200037262000379565b5b50919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b600080fd5b620003b8816200030f565b8114620003c457600080fd5b50565b611fa580620003d76000396000f3fe608060405234801561001057600080fd5b50600436106101215760003560e01c806342966c68116100ad57806395d89b411161007157806395d89b41146102f6578063a457c2d714610314578063a9059cbb14610344578063bff9662a14610374578063dd62ed3e1461039257610121565b806342966c68146102665780635b1125911461028257806370a08231146102a0578063779e3b63146102d057806379cc6790146102da57610121565b80631e458bee116100f45780631e458bee146101ae57806323b872dd146101ca578063313ce567146101fa578063328a01d014610218578063395093511461023657610121565b806306fdde0314610126578063095ea7b31461014457806315d57fd41461017457806318160ddd14610190575b600080fd5b61012e6103c2565b60405161013b91906118ea565b60405180910390f35b61015e60048036038101906101599190611621565b610454565b60405161016b91906118cf565b60405180910390f35b61018e6004803603810190610189919061158e565b610477565b005b610198610689565b6040516101a59190611a4c565b60405180910390f35b6101c860048036038101906101c39190611661565b610693565b005b6101e460048036038101906101df91906115ce565b610783565b6040516101f191906118cf565b60405180910390f35b6102026107b2565b60405161020f9190611a67565b60405180910390f35b6102206107bb565b60405161022d91906118b4565b60405180910390f35b610250600480360381019061024b9190611621565b6107e1565b60405161025d91906118cf565b60405180910390f35b610280600480360381019061027b91906116b4565b610818565b005b61028a61082c565b60405161029791906118b4565b60405180910390f35b6102ba60048036038101906102b59190611561565b610852565b6040516102c79190611a4c565b60405180910390f35b6102d861089a565b005b6102f460048036038101906102ef9190611621565b610a1a565b005b6102fe610b08565b60405161030b91906118ea565b60405180910390f35b61032e60048036038101906103299190611621565b610b9a565b60405161033b91906118cf565b60405180910390f35b61035e60048036038101906103599190611621565b610c11565b60405161036b91906118cf565b60405180910390f35b61037c610c34565b60405161038991906118b4565b60405180910390f35b6103ac60048036038101906103a7919061158e565b610c5a565b6040516103b99190611a4c565b60405180910390f35b6060600380546103d190611bba565b80601f01602080910402602001604051908101604052809291908181526020018280546103fd90611bba565b801561044a5780601f1061041f5761010080835404028352916020019161044a565b820191906000526020600020905b81548152906001019060200180831161042d57829003601f168201915b5050505050905090565b60008061045f610ce1565b905061046c818585610ce9565b600191505092915050565b600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141580156105235750600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614155b1561056557336040517fcdfcef9700000000000000000000000000000000000000000000000000000000815260040161055c91906118b4565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614806105cc5750600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16145b15610603576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b81600660006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555080600560006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505050565b6000600254905090565b600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461072557336040517f3fe32fba00000000000000000000000000000000000000000000000000000000815260040161071c91906118b4565b60405180910390fd5b61072f8383610eb4565b808373ffffffffffffffffffffffffffffffffffffffff167fc263b302aec62d29105026245f19e16f8e0137066ccd4a8bd941f716bd4096bb846040516107769190611a4c565b60405180910390a3505050565b60008061078e610ce1565b905061079b858285611014565b6107a68585856110a0565b60019150509392505050565b60006012905090565b600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000806107ec610ce1565b905061080d8185856107fe8589610c5a565b6108089190611a9e565b610ce9565b600191505092915050565b610829610823610ce1565b82611321565b50565b600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60008060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461092c57336040517fe700765e00000000000000000000000000000000000000000000000000000000815260040161092391906118b4565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff16600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614156109b5576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16600760006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610aac57336040517f3fe32fba000000000000000000000000000000000000000000000000000000008152600401610aa391906118b4565b60405180910390fd5b610ab682826114f8565b8173ffffffffffffffffffffffffffffffffffffffff167f919f7e2092ffcc9d09f599be18d8152860b0c054df788a33bc549cdd9d0f15b182604051610afc9190611a4c565b60405180910390a25050565b606060048054610b1790611bba565b80601f0160208091040260200160405190810160405280929190818152602001828054610b4390611bba565b8015610b905780601f10610b6557610100808354040283529160200191610b90565b820191906000526020600020905b815481529060010190602001808311610b7357829003601f168201915b5050505050905090565b600080610ba5610ce1565b90506000610bb38286610c5a565b905083811015610bf8576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610bef90611a0c565b60405180910390fd5b610c058286868403610ce9565b60019250505092915050565b600080610c1c610ce1565b9050610c298185856110a0565b600191505092915050565b600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415610d59576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610d50906119ec565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415610dc9576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610dc09061194c565b60405180910390fd5b80600160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92583604051610ea79190611a4c565b60405180910390a3505050565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415610f24576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610f1b90611a2c565b60405180910390fd5b610f3060008383611518565b8060026000828254610f429190611a9e565b92505081905550806000808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254610f979190611a9e565b925050819055508173ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef83604051610ffc9190611a4c565b60405180910390a36110106000838361151d565b5050565b60006110208484610c5a565b90507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff811461109a578181101561108c576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016110839061196c565b60405180910390fd5b6110998484848403610ce9565b5b50505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415611110576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611107906119cc565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611180576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016111779061190c565b60405180910390fd5b61118b838383611518565b60008060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905081811015611211576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016112089061198c565b60405180910390fd5b8181036000808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550816000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282546112a49190611a9e565b925050819055508273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040516113089190611a4c565b60405180910390a361131b84848461151d565b50505050565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611391576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611388906119ac565b60405180910390fd5b61139d82600083611518565b60008060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905081811015611423576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161141a9061192c565b60405180910390fd5b8181036000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550816002600082825461147a9190611af4565b92505081905550600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040516114df9190611a4c565b60405180910390a36114f38360008461151d565b505050565b61150a82611504610ce1565b83611014565b6115148282611321565b5050565b505050565b505050565b60008135905061153181611f2a565b92915050565b60008135905061154681611f41565b92915050565b60008135905061155b81611f58565b92915050565b60006020828403121561157757611576611c4a565b5b600061158584828501611522565b91505092915050565b600080604083850312156115a5576115a4611c4a565b5b60006115b385828601611522565b92505060206115c485828601611522565b9150509250929050565b6000806000606084860312156115e7576115e6611c4a565b5b60006115f586828701611522565b935050602061160686828701611522565b92505060406116178682870161154c565b9150509250925092565b6000806040838503121561163857611637611c4a565b5b600061164685828601611522565b92505060206116578582860161154c565b9150509250929050565b60008060006060848603121561167a57611679611c4a565b5b600061168886828701611522565b93505060206116998682870161154c565b92505060406116aa86828701611537565b9150509250925092565b6000602082840312156116ca576116c9611c4a565b5b60006116d88482850161154c565b91505092915050565b6116ea81611b28565b82525050565b6116f981611b3a565b82525050565b600061170a82611a82565b6117148185611a8d565b9350611724818560208601611b87565b61172d81611c4f565b840191505092915050565b6000611745602383611a8d565b915061175082611c60565b604082019050919050565b6000611768602283611a8d565b915061177382611caf565b604082019050919050565b600061178b602283611a8d565b915061179682611cfe565b604082019050919050565b60006117ae601d83611a8d565b91506117b982611d4d565b602082019050919050565b60006117d1602683611a8d565b91506117dc82611d76565b604082019050919050565b60006117f4602183611a8d565b91506117ff82611dc5565b604082019050919050565b6000611817602583611a8d565b915061182282611e14565b604082019050919050565b600061183a602483611a8d565b915061184582611e63565b604082019050919050565b600061185d602583611a8d565b915061186882611eb2565b604082019050919050565b6000611880601f83611a8d565b915061188b82611f01565b602082019050919050565b61189f81611b70565b82525050565b6118ae81611b7a565b82525050565b60006020820190506118c960008301846116e1565b92915050565b60006020820190506118e460008301846116f0565b92915050565b6000602082019050818103600083015261190481846116ff565b905092915050565b6000602082019050818103600083015261192581611738565b9050919050565b600060208201905081810360008301526119458161175b565b9050919050565b600060208201905081810360008301526119658161177e565b9050919050565b60006020820190508181036000830152611985816117a1565b9050919050565b600060208201905081810360008301526119a5816117c4565b9050919050565b600060208201905081810360008301526119c5816117e7565b9050919050565b600060208201905081810360008301526119e58161180a565b9050919050565b60006020820190508181036000830152611a058161182d565b9050919050565b60006020820190508181036000830152611a2581611850565b9050919050565b60006020820190508181036000830152611a4581611873565b9050919050565b6000602082019050611a616000830184611896565b92915050565b6000602082019050611a7c60008301846118a5565b92915050565b600081519050919050565b600082825260208201905092915050565b6000611aa982611b70565b9150611ab483611b70565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff03821115611ae957611ae8611bec565b5b828201905092915050565b6000611aff82611b70565b9150611b0a83611b70565b925082821015611b1d57611b1c611bec565b5b828203905092915050565b6000611b3382611b50565b9050919050565b60008115159050919050565b6000819050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b600060ff82169050919050565b60005b83811015611ba5578082015181840152602081019050611b8a565b83811115611bb4576000848401525b50505050565b60006002820490506001821680611bd257607f821691505b60208210811415611be657611be5611c1b565b5b50919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b600080fd5b6000601f19601f8301169050919050565b7f45524332303a207472616e7366657220746f20746865207a65726f206164647260008201527f6573730000000000000000000000000000000000000000000000000000000000602082015250565b7f45524332303a206275726e20616d6f756e7420657863656564732062616c616e60008201527f6365000000000000000000000000000000000000000000000000000000000000602082015250565b7f45524332303a20617070726f766520746f20746865207a65726f20616464726560008201527f7373000000000000000000000000000000000000000000000000000000000000602082015250565b7f45524332303a20696e73756666696369656e7420616c6c6f77616e6365000000600082015250565b7f45524332303a207472616e7366657220616d6f756e742065786365656473206260008201527f616c616e63650000000000000000000000000000000000000000000000000000602082015250565b7f45524332303a206275726e2066726f6d20746865207a65726f2061646472657360008201527f7300000000000000000000000000000000000000000000000000000000000000602082015250565b7f45524332303a207472616e736665722066726f6d20746865207a65726f20616460008201527f6472657373000000000000000000000000000000000000000000000000000000602082015250565b7f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460008201527f7265737300000000000000000000000000000000000000000000000000000000602082015250565b7f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f7760008201527f207a65726f000000000000000000000000000000000000000000000000000000602082015250565b7f45524332303a206d696e7420746f20746865207a65726f206164647265737300600082015250565b611f3381611b28565b8114611f3e57600080fd5b50565b611f4a81611b46565b8114611f5557600080fd5b50565b611f6181611b70565b8114611f6c57600080fd5b5056fea264697066735822122052e469a7dfcdffe4e3036c297d7df02a693d2ae3f67a8897f92a2edbe9af5a0c64736f6c63430008070033"; - -type ZetaNonEthConstructorParams = - | [signer?: Signer] - | ConstructorParameters; - -const isSuperArgs = ( - xs: ZetaNonEthConstructorParams -): xs is ConstructorParameters => xs.length > 1; - -export class ZetaNonEth__factory extends ContractFactory { - constructor(...args: ZetaNonEthConstructorParams) { - if (isSuperArgs(args)) { - super(...args); - } else { - super(_abi, _bytecode, args[0]); - } - } - - override deploy( - tssAddress_: string, - tssAddressUpdater_: string, - overrides?: Overrides & { from?: string | Promise } - ): Promise { - return super.deploy( - tssAddress_, - tssAddressUpdater_, - overrides || {} - ) as Promise; - } - override getDeployTransaction( - tssAddress_: string, - tssAddressUpdater_: string, - overrides?: Overrides & { from?: string | Promise } - ): TransactionRequest { - return super.getDeployTransaction( - tssAddress_, - tssAddressUpdater_, - overrides || {} - ); - } - override attach(address: string): ZetaNonEth { - return super.attach(address) as ZetaNonEth; - } - override connect(signer: Signer): ZetaNonEth__factory { - return super.connect(signer) as ZetaNonEth__factory; - } - - static readonly bytecode = _bytecode; - static readonly abi = _abi; - static createInterface(): ZetaNonEthInterface { - return new utils.Interface(_abi) as ZetaNonEthInterface; - } - static connect( - address: string, - signerOrProvider: Signer | Provider - ): ZetaNonEth { - return new Contract(address, _abi, signerOrProvider) as ZetaNonEth; - } -} diff --git a/packages/interfaces/typechain-types/factories/contracts/Zeta.non-eth.sol/index.ts b/packages/interfaces/typechain-types/factories/contracts/Zeta.non-eth.sol/index.ts deleted file mode 100644 index 3f68b234..00000000 --- a/packages/interfaces/typechain-types/factories/contracts/Zeta.non-eth.sol/index.ts +++ /dev/null @@ -1,4 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ -export { ZetaNonEth__factory } from "./ZetaNonEth__factory"; diff --git a/packages/interfaces/typechain-types/factories/contracts/ZetaConnector.base.sol/ZetaConnectorBase__factory.ts b/packages/interfaces/typechain-types/factories/contracts/ZetaConnector.base.sol/ZetaConnectorBase__factory.ts deleted file mode 100644 index 0fff3a7f..00000000 --- a/packages/interfaces/typechain-types/factories/contracts/ZetaConnector.base.sol/ZetaConnectorBase__factory.ts +++ /dev/null @@ -1,622 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ -import { Signer, utils, Contract, ContractFactory, Overrides } from "ethers"; -import type { Provider, TransactionRequest } from "@ethersproject/providers"; -import type { - ZetaConnectorBase, - ZetaConnectorBaseInterface, -} from "../../../contracts/ZetaConnector.base.sol/ZetaConnectorBase"; - -const _abi = [ - { - inputs: [ - { - internalType: "address", - name: "zetaToken_", - type: "address", - }, - { - internalType: "address", - name: "tssAddress_", - type: "address", - }, - { - internalType: "address", - name: "tssAddressUpdater_", - type: "address", - }, - { - internalType: "address", - name: "pauserAddress_", - type: "address", - }, - ], - stateMutability: "nonpayable", - type: "constructor", - }, - { - inputs: [ - { - internalType: "address", - name: "caller", - type: "address", - }, - ], - name: "CallerIsNotPauser", - type: "error", - }, - { - inputs: [ - { - internalType: "address", - name: "caller", - type: "address", - }, - ], - name: "CallerIsNotTss", - type: "error", - }, - { - inputs: [ - { - internalType: "address", - name: "caller", - type: "address", - }, - ], - name: "CallerIsNotTssOrUpdater", - type: "error", - }, - { - inputs: [ - { - internalType: "address", - name: "caller", - type: "address", - }, - ], - name: "CallerIsNotTssUpdater", - type: "error", - }, - { - inputs: [ - { - internalType: "uint256", - name: "maxSupply", - type: "uint256", - }, - ], - name: "ExceedsMaxSupply", - type: "error", - }, - { - inputs: [], - name: "InvalidAddress", - type: "error", - }, - { - inputs: [], - name: "ZetaTransferError", - type: "error", - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: "address", - name: "account", - type: "address", - }, - ], - name: "Paused", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: "address", - name: "updaterAddress", - type: "address", - }, - { - indexed: false, - internalType: "address", - name: "newTssAddress", - type: "address", - }, - ], - name: "PauserAddressUpdated", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: "address", - name: "zetaTxSenderAddress", - type: "address", - }, - { - indexed: false, - internalType: "address", - name: "newTssAddress", - type: "address", - }, - ], - name: "TSSAddressUpdated", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: "address", - name: "account", - type: "address", - }, - ], - name: "Unpaused", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: "bytes", - name: "zetaTxSenderAddress", - type: "bytes", - }, - { - indexed: true, - internalType: "uint256", - name: "sourceChainId", - type: "uint256", - }, - { - indexed: true, - internalType: "address", - name: "destinationAddress", - type: "address", - }, - { - indexed: false, - internalType: "uint256", - name: "zetaValue", - type: "uint256", - }, - { - indexed: false, - internalType: "bytes", - name: "message", - type: "bytes", - }, - { - indexed: true, - internalType: "bytes32", - name: "internalSendHash", - type: "bytes32", - }, - ], - name: "ZetaReceived", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: "address", - name: "zetaTxSenderAddress", - type: "address", - }, - { - indexed: false, - internalType: "uint256", - name: "sourceChainId", - type: "uint256", - }, - { - indexed: true, - internalType: "uint256", - name: "destinationChainId", - type: "uint256", - }, - { - indexed: false, - internalType: "bytes", - name: "destinationAddress", - type: "bytes", - }, - { - indexed: false, - internalType: "uint256", - name: "remainingZetaValue", - type: "uint256", - }, - { - indexed: false, - internalType: "bytes", - name: "message", - type: "bytes", - }, - { - indexed: true, - internalType: "bytes32", - name: "internalSendHash", - type: "bytes32", - }, - ], - name: "ZetaReverted", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: "address", - name: "sourceTxOriginAddress", - type: "address", - }, - { - indexed: true, - internalType: "address", - name: "zetaTxSenderAddress", - type: "address", - }, - { - indexed: true, - internalType: "uint256", - name: "destinationChainId", - type: "uint256", - }, - { - indexed: false, - internalType: "bytes", - name: "destinationAddress", - type: "bytes", - }, - { - indexed: false, - internalType: "uint256", - name: "zetaValueAndGas", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "destinationGasLimit", - type: "uint256", - }, - { - indexed: false, - internalType: "bytes", - name: "message", - type: "bytes", - }, - { - indexed: false, - internalType: "bytes", - name: "zetaParams", - type: "bytes", - }, - ], - name: "ZetaSent", - type: "event", - }, - { - inputs: [ - { - internalType: "bytes", - name: "zetaTxSenderAddress", - type: "bytes", - }, - { - internalType: "uint256", - name: "sourceChainId", - type: "uint256", - }, - { - internalType: "address", - name: "destinationAddress", - type: "address", - }, - { - internalType: "uint256", - name: "zetaValue", - type: "uint256", - }, - { - internalType: "bytes", - name: "message", - type: "bytes", - }, - { - internalType: "bytes32", - name: "internalSendHash", - type: "bytes32", - }, - ], - name: "onReceive", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "zetaTxSenderAddress", - type: "address", - }, - { - internalType: "uint256", - name: "sourceChainId", - type: "uint256", - }, - { - internalType: "bytes", - name: "destinationAddress", - type: "bytes", - }, - { - internalType: "uint256", - name: "destinationChainId", - type: "uint256", - }, - { - internalType: "uint256", - name: "remainingZetaValue", - type: "uint256", - }, - { - internalType: "bytes", - name: "message", - type: "bytes", - }, - { - internalType: "bytes32", - name: "internalSendHash", - type: "bytes32", - }, - ], - name: "onRevert", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "pause", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "paused", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "pauserAddress", - outputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "renounceTssAddressUpdater", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - components: [ - { - internalType: "uint256", - name: "destinationChainId", - type: "uint256", - }, - { - internalType: "bytes", - name: "destinationAddress", - type: "bytes", - }, - { - internalType: "uint256", - name: "destinationGasLimit", - type: "uint256", - }, - { - internalType: "bytes", - name: "message", - type: "bytes", - }, - { - internalType: "uint256", - name: "zetaValueAndGas", - type: "uint256", - }, - { - internalType: "bytes", - name: "zetaParams", - type: "bytes", - }, - ], - internalType: "struct ZetaInterfaces.SendInput", - name: "input", - type: "tuple", - }, - ], - name: "send", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "tssAddress", - outputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "tssAddressUpdater", - outputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "unpause", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "pauserAddress_", - type: "address", - }, - ], - name: "updatePauserAddress", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "tssAddress_", - type: "address", - }, - ], - name: "updateTssAddress", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "zetaToken", - outputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, -]; - -const _bytecode = - "0x60a06040523480156200001157600080fd5b50604051620012c3380380620012c383398181016040528101906200003791906200027c565b60008060006101000a81548160ff021916908315150217905550600073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff161480620000b95750600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16145b80620000f15750600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16145b80620001295750600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16145b1562000161576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8373ffffffffffffffffffffffffffffffffffffffff1660808173ffffffffffffffffffffffffffffffffffffffff1660601b8152505082600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555081600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555080600060016101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505050505062000341565b600081519050620002768162000327565b92915050565b6000806000806080858703121562000299576200029862000322565b5b6000620002a98782880162000265565b9450506020620002bc8782880162000265565b9350506040620002cf8782880162000265565b9250506060620002e28782880162000265565b91505092959194509250565b6000620002fb8262000302565b9050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600080fd5b6200033281620002ee565b81146200033e57600080fd5b50565b60805160601c610f636200036060003960006102160152610f636000f3fe608060405234801561001057600080fd5b50600436106100cf5760003560e01c80636128480f1161008c5780639122c344116100665780639122c344146101a2578063942a5e16146101be578063ec026901146101da578063f7fb869b146101f6576100cf565b80636128480f14610172578063779e3b631461018e5780638456cb5914610198576100cf565b806321e093b1146100d457806329dd214d146100f2578063328a01d01461010e5780633f4ba83a1461012c5780635b112591146101365780635c975abb14610154575b600080fd5b6100dc610214565b6040516100e99190610d76565b60405180910390f35b61010c60048036038101906101079190610bfa565b610238565b005b610116610242565b6040516101239190610d76565b60405180910390f35b610134610268565b005b61013e610304565b60405161014b9190610d76565b60405180910390f35b61015c61032a565b6040516101699190610dba565b60405180910390f35b61018c60048036038101906101879190610aeb565b610340565b005b6101966104b6565b005b6101a0610636565b005b6101bc60048036038101906101b79190610aeb565b6106d2565b005b6101d860048036038101906101d39190610b18565b6108a4565b005b6101f460048036038101906101ef9190610cc9565b6108af565b005b6101fe6108b2565b60405161020b9190610d76565b60405180910390f35b7f000000000000000000000000000000000000000000000000000000000000000081565b5050505050505050565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146102fa57336040517f4677a0d30000000000000000000000000000000000000000000000000000000081526004016102f19190610d76565b60405180910390fd5b6103026108d8565b565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60008060009054906101000a900460ff16905090565b600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146103d257336040517f4677a0d30000000000000000000000000000000000000000000000000000000081526004016103c99190610d76565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415610439576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b80600060016101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055507fd41d83655d484bdf299598751c371b2d92088667266fe3774b25a97bdd5d039733826040516104ab929190610d91565b60405180910390a150565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461054857336040517fe700765e00000000000000000000000000000000000000000000000000000000815260040161053f9190610d76565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff16600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614156105d1576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146106c857336040517f4677a0d30000000000000000000000000000000000000000000000000000000081526004016106bf9190610d76565b60405180910390fd5b6106d061093a565b565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415801561077e5750600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614155b156107c057336040517fcdfcef970000000000000000000000000000000000000000000000000000000081526004016107b79190610d76565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415610827576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b80600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055507fe79965b5c67dcfb2cf5fe152715e4a7256cee62a3d5dd8484fd8a8539eb8beff3382604051610899929190610d91565b60405180910390a150565b505050505050505050565b50565b600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6108e061099c565b60008060006101000a81548160ff0219169083151502179055507f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa6109236109e5565b6040516109309190610d76565b60405180910390a1565b6109426109ed565b60016000806101000a81548160ff0219169083151502179055507f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2586109856109e5565b6040516109929190610d76565b60405180910390a1565b6109a461032a565b6109e3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016109da90610dd5565b60405180910390fd5b565b600033905090565b6109f561032a565b15610a35576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610a2c90610df5565b60405180910390fd5b565b600081359050610a4681610ee8565b92915050565b600081359050610a5b81610eff565b92915050565b60008083601f840112610a7757610a76610e7d565b5b8235905067ffffffffffffffff811115610a9457610a93610e78565b5b602083019150836001820283011115610ab057610aaf610e87565b5b9250929050565b600060c08284031215610acd57610acc610e82565b5b81905092915050565b600081359050610ae581610f16565b92915050565b600060208284031215610b0157610b00610e91565b5b6000610b0f84828501610a37565b91505092915050565b600080600080600080600080600060e08a8c031215610b3a57610b39610e91565b5b6000610b488c828d01610a37565b9950506020610b598c828d01610ad6565b98505060408a013567ffffffffffffffff811115610b7a57610b79610e8c565b5b610b868c828d01610a61565b97509750506060610b998c828d01610ad6565b9550506080610baa8c828d01610ad6565b94505060a08a013567ffffffffffffffff811115610bcb57610bca610e8c565b5b610bd78c828d01610a61565b935093505060c0610bea8c828d01610a4c565b9150509295985092959850929598565b60008060008060008060008060c0898b031215610c1a57610c19610e91565b5b600089013567ffffffffffffffff811115610c3857610c37610e8c565b5b610c448b828c01610a61565b98509850506020610c578b828c01610ad6565b9650506040610c688b828c01610a37565b9550506060610c798b828c01610ad6565b945050608089013567ffffffffffffffff811115610c9a57610c99610e8c565b5b610ca68b828c01610a61565b935093505060a0610cb98b828c01610a4c565b9150509295985092959890939650565b600060208284031215610cdf57610cde610e91565b5b600082013567ffffffffffffffff811115610cfd57610cfc610e8c565b5b610d0984828501610ab7565b91505092915050565b610d1b81610e26565b82525050565b610d2a81610e38565b82525050565b6000610d3d601483610e15565b9150610d4882610e96565b602082019050919050565b6000610d60601083610e15565b9150610d6b82610ebf565b602082019050919050565b6000602082019050610d8b6000830184610d12565b92915050565b6000604082019050610da66000830185610d12565b610db36020830184610d12565b9392505050565b6000602082019050610dcf6000830184610d21565b92915050565b60006020820190508181036000830152610dee81610d30565b9050919050565b60006020820190508181036000830152610e0e81610d53565b9050919050565b600082825260208201905092915050565b6000610e3182610e4e565b9050919050565b60008115159050919050565b6000819050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b7f5061757361626c653a206e6f7420706175736564000000000000000000000000600082015250565b7f5061757361626c653a2070617573656400000000000000000000000000000000600082015250565b610ef181610e26565b8114610efc57600080fd5b50565b610f0881610e44565b8114610f1357600080fd5b50565b610f1f81610e6e565b8114610f2a57600080fd5b5056fea2646970667358221220c375137489548a3c1ee7a840e2abd35666df73012f23d94162d1b4c47171d05a64736f6c63430008070033"; - -type ZetaConnectorBaseConstructorParams = - | [signer?: Signer] - | ConstructorParameters; - -const isSuperArgs = ( - xs: ZetaConnectorBaseConstructorParams -): xs is ConstructorParameters => xs.length > 1; - -export class ZetaConnectorBase__factory extends ContractFactory { - constructor(...args: ZetaConnectorBaseConstructorParams) { - if (isSuperArgs(args)) { - super(...args); - } else { - super(_abi, _bytecode, args[0]); - } - } - - override deploy( - zetaToken_: string, - tssAddress_: string, - tssAddressUpdater_: string, - pauserAddress_: string, - overrides?: Overrides & { from?: string | Promise } - ): Promise { - return super.deploy( - zetaToken_, - tssAddress_, - tssAddressUpdater_, - pauserAddress_, - overrides || {} - ) as Promise; - } - override getDeployTransaction( - zetaToken_: string, - tssAddress_: string, - tssAddressUpdater_: string, - pauserAddress_: string, - overrides?: Overrides & { from?: string | Promise } - ): TransactionRequest { - return super.getDeployTransaction( - zetaToken_, - tssAddress_, - tssAddressUpdater_, - pauserAddress_, - overrides || {} - ); - } - override attach(address: string): ZetaConnectorBase { - return super.attach(address) as ZetaConnectorBase; - } - override connect(signer: Signer): ZetaConnectorBase__factory { - return super.connect(signer) as ZetaConnectorBase__factory; - } - - static readonly bytecode = _bytecode; - static readonly abi = _abi; - static createInterface(): ZetaConnectorBaseInterface { - return new utils.Interface(_abi) as ZetaConnectorBaseInterface; - } - static connect( - address: string, - signerOrProvider: Signer | Provider - ): ZetaConnectorBase { - return new Contract(address, _abi, signerOrProvider) as ZetaConnectorBase; - } -} diff --git a/packages/interfaces/typechain-types/factories/contracts/ZetaConnector.base.sol/index.ts b/packages/interfaces/typechain-types/factories/contracts/ZetaConnector.base.sol/index.ts deleted file mode 100644 index 8144ec28..00000000 --- a/packages/interfaces/typechain-types/factories/contracts/ZetaConnector.base.sol/index.ts +++ /dev/null @@ -1,4 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ -export { ZetaConnectorBase__factory } from "./ZetaConnectorBase__factory"; diff --git a/packages/interfaces/typechain-types/factories/contracts/ZetaConnector.eth.sol/ZetaConnectorEth__factory.ts b/packages/interfaces/typechain-types/factories/contracts/ZetaConnector.eth.sol/ZetaConnectorEth__factory.ts deleted file mode 100644 index 417553de..00000000 --- a/packages/interfaces/typechain-types/factories/contracts/ZetaConnector.eth.sol/ZetaConnectorEth__factory.ts +++ /dev/null @@ -1,635 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ -import { Signer, utils, Contract, ContractFactory, Overrides } from "ethers"; -import type { Provider, TransactionRequest } from "@ethersproject/providers"; -import type { - ZetaConnectorEth, - ZetaConnectorEthInterface, -} from "../../../contracts/ZetaConnector.eth.sol/ZetaConnectorEth"; - -const _abi = [ - { - inputs: [ - { - internalType: "address", - name: "zetaToken_", - type: "address", - }, - { - internalType: "address", - name: "tssAddress_", - type: "address", - }, - { - internalType: "address", - name: "tssAddressUpdater_", - type: "address", - }, - { - internalType: "address", - name: "pauserAddress_", - type: "address", - }, - ], - stateMutability: "nonpayable", - type: "constructor", - }, - { - inputs: [ - { - internalType: "address", - name: "caller", - type: "address", - }, - ], - name: "CallerIsNotPauser", - type: "error", - }, - { - inputs: [ - { - internalType: "address", - name: "caller", - type: "address", - }, - ], - name: "CallerIsNotTss", - type: "error", - }, - { - inputs: [ - { - internalType: "address", - name: "caller", - type: "address", - }, - ], - name: "CallerIsNotTssOrUpdater", - type: "error", - }, - { - inputs: [ - { - internalType: "address", - name: "caller", - type: "address", - }, - ], - name: "CallerIsNotTssUpdater", - type: "error", - }, - { - inputs: [ - { - internalType: "uint256", - name: "maxSupply", - type: "uint256", - }, - ], - name: "ExceedsMaxSupply", - type: "error", - }, - { - inputs: [], - name: "InvalidAddress", - type: "error", - }, - { - inputs: [], - name: "ZetaTransferError", - type: "error", - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: "address", - name: "account", - type: "address", - }, - ], - name: "Paused", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: "address", - name: "updaterAddress", - type: "address", - }, - { - indexed: false, - internalType: "address", - name: "newTssAddress", - type: "address", - }, - ], - name: "PauserAddressUpdated", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: "address", - name: "zetaTxSenderAddress", - type: "address", - }, - { - indexed: false, - internalType: "address", - name: "newTssAddress", - type: "address", - }, - ], - name: "TSSAddressUpdated", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: "address", - name: "account", - type: "address", - }, - ], - name: "Unpaused", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: "bytes", - name: "zetaTxSenderAddress", - type: "bytes", - }, - { - indexed: true, - internalType: "uint256", - name: "sourceChainId", - type: "uint256", - }, - { - indexed: true, - internalType: "address", - name: "destinationAddress", - type: "address", - }, - { - indexed: false, - internalType: "uint256", - name: "zetaValue", - type: "uint256", - }, - { - indexed: false, - internalType: "bytes", - name: "message", - type: "bytes", - }, - { - indexed: true, - internalType: "bytes32", - name: "internalSendHash", - type: "bytes32", - }, - ], - name: "ZetaReceived", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: "address", - name: "zetaTxSenderAddress", - type: "address", - }, - { - indexed: false, - internalType: "uint256", - name: "sourceChainId", - type: "uint256", - }, - { - indexed: true, - internalType: "uint256", - name: "destinationChainId", - type: "uint256", - }, - { - indexed: false, - internalType: "bytes", - name: "destinationAddress", - type: "bytes", - }, - { - indexed: false, - internalType: "uint256", - name: "remainingZetaValue", - type: "uint256", - }, - { - indexed: false, - internalType: "bytes", - name: "message", - type: "bytes", - }, - { - indexed: true, - internalType: "bytes32", - name: "internalSendHash", - type: "bytes32", - }, - ], - name: "ZetaReverted", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: "address", - name: "sourceTxOriginAddress", - type: "address", - }, - { - indexed: true, - internalType: "address", - name: "zetaTxSenderAddress", - type: "address", - }, - { - indexed: true, - internalType: "uint256", - name: "destinationChainId", - type: "uint256", - }, - { - indexed: false, - internalType: "bytes", - name: "destinationAddress", - type: "bytes", - }, - { - indexed: false, - internalType: "uint256", - name: "zetaValueAndGas", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "destinationGasLimit", - type: "uint256", - }, - { - indexed: false, - internalType: "bytes", - name: "message", - type: "bytes", - }, - { - indexed: false, - internalType: "bytes", - name: "zetaParams", - type: "bytes", - }, - ], - name: "ZetaSent", - type: "event", - }, - { - inputs: [], - name: "getLockedAmount", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "bytes", - name: "zetaTxSenderAddress", - type: "bytes", - }, - { - internalType: "uint256", - name: "sourceChainId", - type: "uint256", - }, - { - internalType: "address", - name: "destinationAddress", - type: "address", - }, - { - internalType: "uint256", - name: "zetaValue", - type: "uint256", - }, - { - internalType: "bytes", - name: "message", - type: "bytes", - }, - { - internalType: "bytes32", - name: "internalSendHash", - type: "bytes32", - }, - ], - name: "onReceive", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "zetaTxSenderAddress", - type: "address", - }, - { - internalType: "uint256", - name: "sourceChainId", - type: "uint256", - }, - { - internalType: "bytes", - name: "destinationAddress", - type: "bytes", - }, - { - internalType: "uint256", - name: "destinationChainId", - type: "uint256", - }, - { - internalType: "uint256", - name: "remainingZetaValue", - type: "uint256", - }, - { - internalType: "bytes", - name: "message", - type: "bytes", - }, - { - internalType: "bytes32", - name: "internalSendHash", - type: "bytes32", - }, - ], - name: "onRevert", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "pause", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "paused", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "pauserAddress", - outputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "renounceTssAddressUpdater", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - components: [ - { - internalType: "uint256", - name: "destinationChainId", - type: "uint256", - }, - { - internalType: "bytes", - name: "destinationAddress", - type: "bytes", - }, - { - internalType: "uint256", - name: "destinationGasLimit", - type: "uint256", - }, - { - internalType: "bytes", - name: "message", - type: "bytes", - }, - { - internalType: "uint256", - name: "zetaValueAndGas", - type: "uint256", - }, - { - internalType: "bytes", - name: "zetaParams", - type: "bytes", - }, - ], - internalType: "struct ZetaInterfaces.SendInput", - name: "input", - type: "tuple", - }, - ], - name: "send", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "tssAddress", - outputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "tssAddressUpdater", - outputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "unpause", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "pauserAddress_", - type: "address", - }, - ], - name: "updatePauserAddress", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "tssAddress_", - type: "address", - }, - ], - name: "updateTssAddress", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "zetaToken", - outputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, -]; - -const _bytecode = - "0x60a06040523480156200001157600080fd5b506040516200208b3803806200208b833981810160405281019062000037919062000284565b8383838360008060006101000a81548160ff021916908315150217905550600073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff161480620000bd5750600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16145b80620000f55750600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16145b806200012d5750600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16145b1562000165576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8373ffffffffffffffffffffffffffffffffffffffff1660808173ffffffffffffffffffffffffffffffffffffffff1660601b8152505082600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555081600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555080600060016101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550505050505050505062000349565b6000815190506200027e816200032f565b92915050565b60008060008060808587031215620002a157620002a06200032a565b5b6000620002b1878288016200026d565b9450506020620002c4878288016200026d565b9350506040620002d7878288016200026d565b9250506060620002ea878288016200026d565b91505092959194509250565b600062000303826200030a565b9050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600080fd5b6200033a81620002f6565b81146200034657600080fd5b50565b60805160601c611d07620003846000396000818161024f01528181610275015281816103b701528181610d3a0152610fbd0152611d076000f3fe608060405234801561001057600080fd5b50600436106100ea5760003560e01c80636128480f1161008c5780639122c344116100665780639122c344146101db578063942a5e16146101f7578063ec02690114610213578063f7fb869b1461022f576100ea565b80636128480f146101ab578063779e3b63146101c75780638456cb59146101d1576100ea565b8063328a01d0116100c8578063328a01d0146101475780633f4ba83a146101655780635b1125911461016f5780635c975abb1461018d576100ea565b806321e093b1146100ef578063252bc8861461010d57806329dd214d1461012b575b600080fd5b6100f761024d565b6040516101049190611828565b60405180910390f35b610115610271565b6040516101229190611a95565b60405180910390f35b610145600480360381019061014091906114df565b610321565b005b61014f61063a565b60405161015c9190611828565b60405180910390f35b61016d610660565b005b6101776106fc565b6040516101849190611828565b60405180910390f35b610195610722565b6040516101a291906119ad565b60405180910390f35b6101c560048036038101906101c091906113a3565b610738565b005b6101cf6108ae565b005b6101d9610a2e565b005b6101f560048036038101906101f091906113a3565b610aca565b005b610211600480360381019061020c91906113d0565b610c9c565b005b61022d600480360381019061022891906115ae565b610fb1565b005b610237611140565b6040516102449190611828565b60405180910390f35b7f000000000000000000000000000000000000000000000000000000000000000081565b60007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b81526004016102cc9190611828565b60206040518083038186803b1580156102e457600080fd5b505afa1580156102f8573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061031c91906115f7565b905090565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146103b357336040517fff70ace20000000000000000000000000000000000000000000000000000000081526004016103aa9190611828565b60405180910390fd5b60007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663a9059cbb87876040518363ffffffff1660e01b815260040161041092919061191f565b602060405180830381600087803b15801561042a57600080fd5b505af115801561043e573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061046291906114b2565b90508061049b576040517f20878f6200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008484905011156105d7578573ffffffffffffffffffffffffffffffffffffffff16633749c51a6040518060a001604052808c8c8080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f8201169050808301925050505050505081526020018a81526020018973ffffffffffffffffffffffffffffffffffffffff16815260200188815260200187878080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050508152506040518263ffffffff1660e01b81526004016105a49190611a51565b600060405180830381600087803b1580156105be57600080fd5b505af11580156105d2573d6000803e3d6000fd5b505050505b818673ffffffffffffffffffffffffffffffffffffffff16887ff1302855733b40d8acb467ee990b6d56c05c80e28ebcabfa6e6f3f57cb50d6988c8c8a8a8a6040516106279594939291906119c8565b60405180910390a4505050505050505050565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146106f257336040517f4677a0d30000000000000000000000000000000000000000000000000000000081526004016106e99190611828565b60405180910390fd5b6106fa611166565b565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60008060009054906101000a900460ff16905090565b600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146107ca57336040517f4677a0d30000000000000000000000000000000000000000000000000000000081526004016107c19190611828565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415610831576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b80600060016101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055507fd41d83655d484bdf299598751c371b2d92088667266fe3774b25a97bdd5d039733826040516108a3929190611843565b60405180910390a150565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461094057336040517fe700765e0000000000000000000000000000000000000000000000000000000081526004016109379190611828565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff16600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614156109c9576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610ac057336040517f4677a0d3000000000000000000000000000000000000000000000000000000008152600401610ab79190611828565b60405180910390fd5b610ac86111c8565b565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614158015610b765750600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614155b15610bb857336040517fcdfcef97000000000000000000000000000000000000000000000000000000008152600401610baf9190611828565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415610c1f576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b80600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055507fe79965b5c67dcfb2cf5fe152715e4a7256cee62a3d5dd8484fd8a8539eb8beff3382604051610c91929190611843565b60405180910390a150565b610ca461122a565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610d3657336040517fff70ace2000000000000000000000000000000000000000000000000000000008152600401610d2d9190611828565b60405180910390fd5b60007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663a9059cbb8b876040518363ffffffff1660e01b8152600401610d9392919061191f565b602060405180830381600087803b158015610dad57600080fd5b505af1158015610dc1573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610de591906114b2565b905080610e1e576040517f20878f6200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000848490501115610f60578973ffffffffffffffffffffffffffffffffffffffff16633ff0693c6040518060c001604052808d73ffffffffffffffffffffffffffffffffffffffff1681526020018c81526020018b8b8080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f82011690508083019250505050505050815260200189815260200188815260200187878080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050508152506040518263ffffffff1660e01b8152600401610f2d9190611a73565b600060405180830381600087803b158015610f4757600080fd5b505af1158015610f5b573d6000803e3d6000fd5b505050505b81867f521fb0b407c2eb9b1375530e9b9a569889992140a688bc076aa72c1712012c888c8c8c8c8b8b8b604051610f9d9796959493929190611948565b60405180910390a350505050505050505050565b610fb961122a565b60007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166323b872dd333085608001356040518463ffffffff1660e01b815260040161101c9392919061186c565b602060405180830381600087803b15801561103657600080fd5b505af115801561104a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061106e91906114b2565b9050806110a7576040517f20878f6200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b81600001353373ffffffffffffffffffffffffffffffffffffffff167f7ec1c94701e09b1652f3e1d307e60c4b9ebf99aff8c2079fd1d8c585e031c4e4328580602001906110f59190611ab0565b8760800135886040013589806060019061110f9190611ab0565b8b8060a0019061111f9190611ab0565b604051611134999897969594939291906118a3565b60405180910390a35050565b600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b61116e611274565b60008060006101000a81548160ff0219169083151502179055507f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa6111b16112bd565b6040516111be9190611828565b60405180910390a1565b6111d061122a565b60016000806101000a81548160ff0219169083151502179055507f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2586112136112bd565b6040516112209190611828565b60405180910390a1565b611232610722565b15611272576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161126990611a31565b60405180910390fd5b565b61127c610722565b6112bb576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016112b290611a11565b60405180910390fd5b565b600033905090565b6000813590506112d481611c75565b92915050565b6000815190506112e981611c8c565b92915050565b6000813590506112fe81611ca3565b92915050565b60008083601f84011261131a57611319611bea565b5b8235905067ffffffffffffffff81111561133757611336611be5565b5b60208301915083600182028301111561135357611352611bfe565b5b9250929050565b600060c082840312156113705761136f611bf4565b5b81905092915050565b60008135905061138881611cba565b92915050565b60008151905061139d81611cba565b92915050565b6000602082840312156113b9576113b8611c0d565b5b60006113c7848285016112c5565b91505092915050565b600080600080600080600080600060e08a8c0312156113f2576113f1611c0d565b5b60006114008c828d016112c5565b99505060206114118c828d01611379565b98505060408a013567ffffffffffffffff81111561143257611431611c08565b5b61143e8c828d01611304565b975097505060606114518c828d01611379565b95505060806114628c828d01611379565b94505060a08a013567ffffffffffffffff81111561148357611482611c08565b5b61148f8c828d01611304565b935093505060c06114a28c828d016112ef565b9150509295985092959850929598565b6000602082840312156114c8576114c7611c0d565b5b60006114d6848285016112da565b91505092915050565b60008060008060008060008060c0898b0312156114ff576114fe611c0d565b5b600089013567ffffffffffffffff81111561151d5761151c611c08565b5b6115298b828c01611304565b9850985050602061153c8b828c01611379565b965050604061154d8b828c016112c5565b955050606061155e8b828c01611379565b945050608089013567ffffffffffffffff81111561157f5761157e611c08565b5b61158b8b828c01611304565b935093505060a061159e8b828c016112ef565b9150509295985092959890939650565b6000602082840312156115c4576115c3611c0d565b5b600082013567ffffffffffffffff8111156115e2576115e1611c08565b5b6115ee8482850161135a565b91505092915050565b60006020828403121561160d5761160c611c0d565b5b600061161b8482850161138e565b91505092915050565b61162d81611b51565b82525050565b61163c81611b51565b82525050565b61164b81611b63565b82525050565b600061165d8385611b2f565b935061166a838584611ba3565b61167383611c12565b840190509392505050565b600061168982611b13565b6116938185611b1e565b93506116a3818560208601611bb2565b6116ac81611c12565b840191505092915050565b60006116c4601483611b40565b91506116cf82611c23565b602082019050919050565b60006116e7601083611b40565b91506116f282611c4c565b602082019050919050565b600060a083016000830151848203600086015261171a828261167e565b915050602083015161172f602086018261180a565b5060408301516117426040860182611624565b506060830151611755606086018261180a565b506080830151848203608086015261176d828261167e565b9150508091505092915050565b600060c0830160008301516117926000860182611624565b5060208301516117a5602086018261180a565b50604083015184820360408601526117bd828261167e565b91505060608301516117d2606086018261180a565b5060808301516117e5608086018261180a565b5060a083015184820360a08601526117fd828261167e565b9150508091505092915050565b61181381611b99565b82525050565b61182281611b99565b82525050565b600060208201905061183d6000830184611633565b92915050565b60006040820190506118586000830185611633565b6118656020830184611633565b9392505050565b60006060820190506118816000830186611633565b61188e6020830185611633565b61189b6040830184611819565b949350505050565b600060c0820190506118b8600083018c611633565b81810360208301526118cb818a8c611651565b90506118da6040830189611819565b6118e76060830188611819565b81810360808301526118fa818688611651565b905081810360a083015261190f818486611651565b90509a9950505050505050505050565b60006040820190506119346000830185611633565b6119416020830184611819565b9392505050565b600060a08201905061195d600083018a611633565b61196a6020830189611819565b818103604083015261197d818789611651565b905061198c6060830186611819565b818103608083015261199f818486611651565b905098975050505050505050565b60006020820190506119c26000830184611642565b92915050565b600060608201905081810360008301526119e3818789611651565b90506119f26020830186611819565b8181036040830152611a05818486611651565b90509695505050505050565b60006020820190508181036000830152611a2a816116b7565b9050919050565b60006020820190508181036000830152611a4a816116da565b9050919050565b60006020820190508181036000830152611a6b81846116fd565b905092915050565b60006020820190508181036000830152611a8d818461177a565b905092915050565b6000602082019050611aaa6000830184611819565b92915050565b60008083356001602003843603038112611acd57611acc611bf9565b5b80840192508235915067ffffffffffffffff821115611aef57611aee611bef565b5b602083019250600182023603831315611b0b57611b0a611c03565b5b509250929050565b600081519050919050565b600082825260208201905092915050565b600082825260208201905092915050565b600082825260208201905092915050565b6000611b5c82611b79565b9050919050565b60008115159050919050565b6000819050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b82818337600083830152505050565b60005b83811015611bd0578082015181840152602081019050611bb5565b83811115611bdf576000848401525b50505050565b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f5061757361626c653a206e6f7420706175736564000000000000000000000000600082015250565b7f5061757361626c653a2070617573656400000000000000000000000000000000600082015250565b611c7e81611b51565b8114611c8957600080fd5b50565b611c9581611b63565b8114611ca057600080fd5b50565b611cac81611b6f565b8114611cb757600080fd5b50565b611cc381611b99565b8114611cce57600080fd5b5056fea2646970667358221220d2e7d407d896bdfd48007009af0b4d7ffaf3855f30e9fb3a4cf50048a381ca1b64736f6c63430008070033"; - -type ZetaConnectorEthConstructorParams = - | [signer?: Signer] - | ConstructorParameters; - -const isSuperArgs = ( - xs: ZetaConnectorEthConstructorParams -): xs is ConstructorParameters => xs.length > 1; - -export class ZetaConnectorEth__factory extends ContractFactory { - constructor(...args: ZetaConnectorEthConstructorParams) { - if (isSuperArgs(args)) { - super(...args); - } else { - super(_abi, _bytecode, args[0]); - } - } - - override deploy( - zetaToken_: string, - tssAddress_: string, - tssAddressUpdater_: string, - pauserAddress_: string, - overrides?: Overrides & { from?: string | Promise } - ): Promise { - return super.deploy( - zetaToken_, - tssAddress_, - tssAddressUpdater_, - pauserAddress_, - overrides || {} - ) as Promise; - } - override getDeployTransaction( - zetaToken_: string, - tssAddress_: string, - tssAddressUpdater_: string, - pauserAddress_: string, - overrides?: Overrides & { from?: string | Promise } - ): TransactionRequest { - return super.getDeployTransaction( - zetaToken_, - tssAddress_, - tssAddressUpdater_, - pauserAddress_, - overrides || {} - ); - } - override attach(address: string): ZetaConnectorEth { - return super.attach(address) as ZetaConnectorEth; - } - override connect(signer: Signer): ZetaConnectorEth__factory { - return super.connect(signer) as ZetaConnectorEth__factory; - } - - static readonly bytecode = _bytecode; - static readonly abi = _abi; - static createInterface(): ZetaConnectorEthInterface { - return new utils.Interface(_abi) as ZetaConnectorEthInterface; - } - static connect( - address: string, - signerOrProvider: Signer | Provider - ): ZetaConnectorEth { - return new Contract(address, _abi, signerOrProvider) as ZetaConnectorEth; - } -} diff --git a/packages/interfaces/typechain-types/factories/contracts/ZetaConnector.eth.sol/index.ts b/packages/interfaces/typechain-types/factories/contracts/ZetaConnector.eth.sol/index.ts deleted file mode 100644 index 324f47bd..00000000 --- a/packages/interfaces/typechain-types/factories/contracts/ZetaConnector.eth.sol/index.ts +++ /dev/null @@ -1,4 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ -export { ZetaConnectorEth__factory } from "./ZetaConnectorEth__factory"; diff --git a/packages/interfaces/typechain-types/factories/contracts/ZetaConnector.non-eth.sol/ZetaConnectorNonEth__factory.ts b/packages/interfaces/typechain-types/factories/contracts/ZetaConnector.non-eth.sol/ZetaConnectorNonEth__factory.ts deleted file mode 100644 index 252f0138..00000000 --- a/packages/interfaces/typechain-types/factories/contracts/ZetaConnector.non-eth.sol/ZetaConnectorNonEth__factory.ts +++ /dev/null @@ -1,661 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ -import { Signer, utils, Contract, ContractFactory, Overrides } from "ethers"; -import type { Provider, TransactionRequest } from "@ethersproject/providers"; -import type { - ZetaConnectorNonEth, - ZetaConnectorNonEthInterface, -} from "../../../contracts/ZetaConnector.non-eth.sol/ZetaConnectorNonEth"; - -const _abi = [ - { - inputs: [ - { - internalType: "address", - name: "zetaTokenAddress_", - type: "address", - }, - { - internalType: "address", - name: "tssAddress_", - type: "address", - }, - { - internalType: "address", - name: "tssAddressUpdater_", - type: "address", - }, - { - internalType: "address", - name: "pauserAddress_", - type: "address", - }, - ], - stateMutability: "nonpayable", - type: "constructor", - }, - { - inputs: [ - { - internalType: "address", - name: "caller", - type: "address", - }, - ], - name: "CallerIsNotPauser", - type: "error", - }, - { - inputs: [ - { - internalType: "address", - name: "caller", - type: "address", - }, - ], - name: "CallerIsNotTss", - type: "error", - }, - { - inputs: [ - { - internalType: "address", - name: "caller", - type: "address", - }, - ], - name: "CallerIsNotTssOrUpdater", - type: "error", - }, - { - inputs: [ - { - internalType: "address", - name: "caller", - type: "address", - }, - ], - name: "CallerIsNotTssUpdater", - type: "error", - }, - { - inputs: [ - { - internalType: "uint256", - name: "maxSupply", - type: "uint256", - }, - ], - name: "ExceedsMaxSupply", - type: "error", - }, - { - inputs: [], - name: "InvalidAddress", - type: "error", - }, - { - inputs: [], - name: "ZetaTransferError", - type: "error", - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: "address", - name: "account", - type: "address", - }, - ], - name: "Paused", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: "address", - name: "updaterAddress", - type: "address", - }, - { - indexed: false, - internalType: "address", - name: "newTssAddress", - type: "address", - }, - ], - name: "PauserAddressUpdated", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: "address", - name: "zetaTxSenderAddress", - type: "address", - }, - { - indexed: false, - internalType: "address", - name: "newTssAddress", - type: "address", - }, - ], - name: "TSSAddressUpdated", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: "address", - name: "account", - type: "address", - }, - ], - name: "Unpaused", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: "bytes", - name: "zetaTxSenderAddress", - type: "bytes", - }, - { - indexed: true, - internalType: "uint256", - name: "sourceChainId", - type: "uint256", - }, - { - indexed: true, - internalType: "address", - name: "destinationAddress", - type: "address", - }, - { - indexed: false, - internalType: "uint256", - name: "zetaValue", - type: "uint256", - }, - { - indexed: false, - internalType: "bytes", - name: "message", - type: "bytes", - }, - { - indexed: true, - internalType: "bytes32", - name: "internalSendHash", - type: "bytes32", - }, - ], - name: "ZetaReceived", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: "address", - name: "zetaTxSenderAddress", - type: "address", - }, - { - indexed: false, - internalType: "uint256", - name: "sourceChainId", - type: "uint256", - }, - { - indexed: true, - internalType: "uint256", - name: "destinationChainId", - type: "uint256", - }, - { - indexed: false, - internalType: "bytes", - name: "destinationAddress", - type: "bytes", - }, - { - indexed: false, - internalType: "uint256", - name: "remainingZetaValue", - type: "uint256", - }, - { - indexed: false, - internalType: "bytes", - name: "message", - type: "bytes", - }, - { - indexed: true, - internalType: "bytes32", - name: "internalSendHash", - type: "bytes32", - }, - ], - name: "ZetaReverted", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: "address", - name: "sourceTxOriginAddress", - type: "address", - }, - { - indexed: true, - internalType: "address", - name: "zetaTxSenderAddress", - type: "address", - }, - { - indexed: true, - internalType: "uint256", - name: "destinationChainId", - type: "uint256", - }, - { - indexed: false, - internalType: "bytes", - name: "destinationAddress", - type: "bytes", - }, - { - indexed: false, - internalType: "uint256", - name: "zetaValueAndGas", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "destinationGasLimit", - type: "uint256", - }, - { - indexed: false, - internalType: "bytes", - name: "message", - type: "bytes", - }, - { - indexed: false, - internalType: "bytes", - name: "zetaParams", - type: "bytes", - }, - ], - name: "ZetaSent", - type: "event", - }, - { - inputs: [], - name: "getLockedAmount", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "maxSupply", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "bytes", - name: "zetaTxSenderAddress", - type: "bytes", - }, - { - internalType: "uint256", - name: "sourceChainId", - type: "uint256", - }, - { - internalType: "address", - name: "destinationAddress", - type: "address", - }, - { - internalType: "uint256", - name: "zetaValue", - type: "uint256", - }, - { - internalType: "bytes", - name: "message", - type: "bytes", - }, - { - internalType: "bytes32", - name: "internalSendHash", - type: "bytes32", - }, - ], - name: "onReceive", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "zetaTxSenderAddress", - type: "address", - }, - { - internalType: "uint256", - name: "sourceChainId", - type: "uint256", - }, - { - internalType: "bytes", - name: "destinationAddress", - type: "bytes", - }, - { - internalType: "uint256", - name: "destinationChainId", - type: "uint256", - }, - { - internalType: "uint256", - name: "remainingZetaValue", - type: "uint256", - }, - { - internalType: "bytes", - name: "message", - type: "bytes", - }, - { - internalType: "bytes32", - name: "internalSendHash", - type: "bytes32", - }, - ], - name: "onRevert", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "pause", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "paused", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "pauserAddress", - outputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "renounceTssAddressUpdater", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - components: [ - { - internalType: "uint256", - name: "destinationChainId", - type: "uint256", - }, - { - internalType: "bytes", - name: "destinationAddress", - type: "bytes", - }, - { - internalType: "uint256", - name: "destinationGasLimit", - type: "uint256", - }, - { - internalType: "bytes", - name: "message", - type: "bytes", - }, - { - internalType: "uint256", - name: "zetaValueAndGas", - type: "uint256", - }, - { - internalType: "bytes", - name: "zetaParams", - type: "bytes", - }, - ], - internalType: "struct ZetaInterfaces.SendInput", - name: "input", - type: "tuple", - }, - ], - name: "send", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "maxSupply_", - type: "uint256", - }, - ], - name: "setMaxSupply", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "tssAddress", - outputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "tssAddressUpdater", - outputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "unpause", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "pauserAddress_", - type: "address", - }, - ], - name: "updatePauserAddress", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "tssAddress_", - type: "address", - }, - ], - name: "updateTssAddress", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "zetaToken", - outputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, -]; - -const _bytecode = - "0x60a06040527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6003553480156200003557600080fd5b50604051620022e7380380620022e783398181016040528101906200005b9190620002a8565b8383838360008060006101000a81548160ff021916908315150217905550600073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff161480620000e15750600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16145b80620001195750600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16145b80620001515750600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16145b1562000189576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8373ffffffffffffffffffffffffffffffffffffffff1660808173ffffffffffffffffffffffffffffffffffffffff1660601b8152505082600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555081600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555080600060016101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050505050505050506200036d565b600081519050620002a28162000353565b92915050565b60008060008060808587031215620002c557620002c46200034e565b5b6000620002d58782880162000291565b9450506020620002e88782880162000291565b9350506040620002fb8782880162000291565b92505060606200030e8782880162000291565b91505092959194509250565b600062000327826200032e565b9050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600080fd5b6200035e816200031a565b81146200036a57600080fd5b50565b60805160601c611f31620003b66000396000818161029f015281816102c501528181610408015281816104f601528181610ebe01528181610fac01526111db0152611f316000f3fe608060405234801561001057600080fd5b50600436106101005760003560e01c80636f8b44b011610097578063942a5e1611610066578063942a5e1614610229578063d5abeb0114610245578063ec02690114610263578063f7fb869b1461027f57610100565b80636f8b44b0146101dd578063779e3b63146101f95780638456cb59146102035780639122c3441461020d57610100565b80633f4ba83a116100d35780633f4ba83a1461017b5780635b112591146101855780635c975abb146101a35780636128480f146101c157610100565b806321e093b114610105578063252bc8861461012357806329dd214d14610141578063328a01d01461015d575b600080fd5b61010d61029d565b60405161011a91906119e4565b60405180910390f35b61012b6102c1565b6040516101389190611c51565b60405180910390f35b61015b6004803603810190610156919061165f565b610371565b005b610165610721565b60405161017291906119e4565b60405180910390f35b610183610747565b005b61018d6107e3565b60405161019a91906119e4565b60405180910390f35b6101ab610809565b6040516101b89190611b69565b60405180910390f35b6101db60048036038101906101d69190611550565b61081f565b005b6101f760048036038101906101f29190611777565b610995565b005b610201610a31565b005b61020b610bb1565b005b61022760048036038101906102229190611550565b610c4d565b005b610243600480360381019061023e919061157d565b610e1f565b005b61024d6111cb565b60405161025a9190611c51565b60405180910390f35b61027d6004803603810190610278919061172e565b6111d1565b005b610287611302565b60405161029491906119e4565b60405180910390f35b7f000000000000000000000000000000000000000000000000000000000000000081565b60007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b815260040161031c91906119e4565b60206040518083038186803b15801561033457600080fd5b505afa158015610348573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061036c91906117a4565b905090565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461040357336040517fff70ace20000000000000000000000000000000000000000000000000000000081526004016103fa91906119e4565b60405180910390fd5b6003547f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166318160ddd6040518163ffffffff1660e01b815260040160206040518083038186803b15801561046c57600080fd5b505afa158015610480573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104a491906117a4565b856104af9190611d0d565b11156104f4576003546040517f3d3dbc830000000000000000000000000000000000000000000000000000000081526004016104eb9190611c51565b60405180910390fd5b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16631e458bee8686846040518463ffffffff1660e01b815260040161055193929190611acd565b600060405180830381600087803b15801561056b57600080fd5b505af115801561057f573d6000803e3d6000fd5b5050505060008383905011156106bf578473ffffffffffffffffffffffffffffffffffffffff16633749c51a6040518060a001604052808b8b8080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f8201169050808301925050505050505081526020018981526020018873ffffffffffffffffffffffffffffffffffffffff16815260200187815260200186868080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050508152506040518263ffffffff1660e01b815260040161068c9190611c0d565b600060405180830381600087803b1580156106a657600080fd5b505af11580156106ba573d6000803e3d6000fd5b505050505b808573ffffffffffffffffffffffffffffffffffffffff16877ff1302855733b40d8acb467ee990b6d56c05c80e28ebcabfa6e6f3f57cb50d6988b8b89898960405161070f959493929190611b84565b60405180910390a45050505050505050565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146107d957336040517f4677a0d30000000000000000000000000000000000000000000000000000000081526004016107d091906119e4565b60405180910390fd5b6107e1611328565b565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60008060009054906101000a900460ff16905090565b600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146108b157336040517f4677a0d30000000000000000000000000000000000000000000000000000000081526004016108a891906119e4565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415610918576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b80600060016101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055507fd41d83655d484bdf299598751c371b2d92088667266fe3774b25a97bdd5d0397338260405161098a9291906119ff565b60405180910390a150565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610a2757336040517fff70ace2000000000000000000000000000000000000000000000000000000008152600401610a1e91906119e4565b60405180910390fd5b8060038190555050565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610ac357336040517fe700765e000000000000000000000000000000000000000000000000000000008152600401610aba91906119e4565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff16600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161415610b4c576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610c4357336040517f4677a0d3000000000000000000000000000000000000000000000000000000008152600401610c3a91906119e4565b60405180910390fd5b610c4b61138a565b565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614158015610cf95750600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614155b15610d3b57336040517fcdfcef97000000000000000000000000000000000000000000000000000000008152600401610d3291906119e4565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415610da2576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b80600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055507fe79965b5c67dcfb2cf5fe152715e4a7256cee62a3d5dd8484fd8a8539eb8beff3382604051610e149291906119ff565b60405180910390a150565b610e276113ec565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610eb957336040517fff70ace2000000000000000000000000000000000000000000000000000000008152600401610eb091906119e4565b60405180910390fd5b6003547f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166318160ddd6040518163ffffffff1660e01b815260040160206040518083038186803b158015610f2257600080fd5b505afa158015610f36573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f5a91906117a4565b85610f659190611d0d565b1115610faa576003546040517f3d3dbc83000000000000000000000000000000000000000000000000000000008152600401610fa19190611c51565b60405180910390fd5b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16631e458bee8a86846040518463ffffffff1660e01b815260040161100793929190611acd565b600060405180830381600087803b15801561102157600080fd5b505af1158015611035573d6000803e3d6000fd5b50505050600083839050111561117b578873ffffffffffffffffffffffffffffffffffffffff16633ff0693c6040518060c001604052808c73ffffffffffffffffffffffffffffffffffffffff1681526020018b81526020018a8a8080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f82011690508083019250505050505050815260200188815260200187815260200186868080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050508152506040518263ffffffff1660e01b81526004016111489190611c2f565b600060405180830381600087803b15801561116257600080fd5b505af1158015611176573d6000803e3d6000fd5b505050505b80857f521fb0b407c2eb9b1375530e9b9a569889992140a688bc076aa72c1712012c888b8b8b8b8a8a8a6040516111b89796959493929190611b04565b60405180910390a3505050505050505050565b60035481565b6111d96113ec565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166379cc67903383608001356040518363ffffffff1660e01b8152600401611238929190611aa4565b600060405180830381600087803b15801561125257600080fd5b505af1158015611266573d6000803e3d6000fd5b5050505080600001353373ffffffffffffffffffffffffffffffffffffffff167f7ec1c94701e09b1652f3e1d307e60c4b9ebf99aff8c2079fd1d8c585e031c4e4328480602001906112b89190611c6c565b866080013587604001358880606001906112d29190611c6c565b8a8060a001906112e29190611c6c565b6040516112f799989796959493929190611a28565b60405180910390a350565b600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b611330611436565b60008060006101000a81548160ff0219169083151502179055507f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa61137361147f565b60405161138091906119e4565b60405180910390a1565b6113926113ec565b60016000806101000a81548160ff0219169083151502179055507f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2586113d561147f565b6040516113e291906119e4565b60405180910390a1565b6113f4610809565b15611434576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161142b90611bed565b60405180910390fd5b565b61143e610809565b61147d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161147490611bcd565b60405180910390fd5b565b600033905090565b60008135905061149681611eb6565b92915050565b6000813590506114ab81611ecd565b92915050565b60008083601f8401126114c7576114c6611e2b565b5b8235905067ffffffffffffffff8111156114e4576114e3611e26565b5b602083019150836001820283011115611500576114ff611e3f565b5b9250929050565b600060c0828403121561151d5761151c611e35565b5b81905092915050565b60008135905061153581611ee4565b92915050565b60008151905061154a81611ee4565b92915050565b60006020828403121561156657611565611e4e565b5b600061157484828501611487565b91505092915050565b600080600080600080600080600060e08a8c03121561159f5761159e611e4e565b5b60006115ad8c828d01611487565b99505060206115be8c828d01611526565b98505060408a013567ffffffffffffffff8111156115df576115de611e49565b5b6115eb8c828d016114b1565b975097505060606115fe8c828d01611526565b955050608061160f8c828d01611526565b94505060a08a013567ffffffffffffffff8111156116305761162f611e49565b5b61163c8c828d016114b1565b935093505060c061164f8c828d0161149c565b9150509295985092959850929598565b60008060008060008060008060c0898b03121561167f5761167e611e4e565b5b600089013567ffffffffffffffff81111561169d5761169c611e49565b5b6116a98b828c016114b1565b985098505060206116bc8b828c01611526565b96505060406116cd8b828c01611487565b95505060606116de8b828c01611526565b945050608089013567ffffffffffffffff8111156116ff576116fe611e49565b5b61170b8b828c016114b1565b935093505060a061171e8b828c0161149c565b9150509295985092959890939650565b60006020828403121561174457611743611e4e565b5b600082013567ffffffffffffffff81111561176257611761611e49565b5b61176e84828501611507565b91505092915050565b60006020828403121561178d5761178c611e4e565b5b600061179b84828501611526565b91505092915050565b6000602082840312156117ba576117b9611e4e565b5b60006117c88482850161153b565b91505092915050565b6117da81611d63565b82525050565b6117e981611d63565b82525050565b6117f881611d75565b82525050565b61180781611d81565b82525050565b60006118198385611ceb565b9350611826838584611db5565b61182f83611e53565b840190509392505050565b600061184582611ccf565b61184f8185611cda565b935061185f818560208601611dc4565b61186881611e53565b840191505092915050565b6000611880601483611cfc565b915061188b82611e64565b602082019050919050565b60006118a3601083611cfc565b91506118ae82611e8d565b602082019050919050565b600060a08301600083015184820360008601526118d6828261183a565b91505060208301516118eb60208601826119c6565b5060408301516118fe60408601826117d1565b50606083015161191160608601826119c6565b5060808301518482036080860152611929828261183a565b9150508091505092915050565b600060c08301600083015161194e60008601826117d1565b50602083015161196160208601826119c6565b5060408301518482036040860152611979828261183a565b915050606083015161198e60608601826119c6565b5060808301516119a160808601826119c6565b5060a083015184820360a08601526119b9828261183a565b9150508091505092915050565b6119cf81611dab565b82525050565b6119de81611dab565b82525050565b60006020820190506119f960008301846117e0565b92915050565b6000604082019050611a1460008301856117e0565b611a2160208301846117e0565b9392505050565b600060c082019050611a3d600083018c6117e0565b8181036020830152611a50818a8c61180d565b9050611a5f60408301896119d5565b611a6c60608301886119d5565b8181036080830152611a7f81868861180d565b905081810360a0830152611a9481848661180d565b90509a9950505050505050505050565b6000604082019050611ab960008301856117e0565b611ac660208301846119d5565b9392505050565b6000606082019050611ae260008301866117e0565b611aef60208301856119d5565b611afc60408301846117fe565b949350505050565b600060a082019050611b19600083018a6117e0565b611b2660208301896119d5565b8181036040830152611b3981878961180d565b9050611b4860608301866119d5565b8181036080830152611b5b81848661180d565b905098975050505050505050565b6000602082019050611b7e60008301846117ef565b92915050565b60006060820190508181036000830152611b9f81878961180d565b9050611bae60208301866119d5565b8181036040830152611bc181848661180d565b90509695505050505050565b60006020820190508181036000830152611be681611873565b9050919050565b60006020820190508181036000830152611c0681611896565b9050919050565b60006020820190508181036000830152611c2781846118b9565b905092915050565b60006020820190508181036000830152611c498184611936565b905092915050565b6000602082019050611c6660008301846119d5565b92915050565b60008083356001602003843603038112611c8957611c88611e3a565b5b80840192508235915067ffffffffffffffff821115611cab57611caa611e30565b5b602083019250600182023603831315611cc757611cc6611e44565b5b509250929050565b600081519050919050565b600082825260208201905092915050565b600082825260208201905092915050565b600082825260208201905092915050565b6000611d1882611dab565b9150611d2383611dab565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff03821115611d5857611d57611df7565b5b828201905092915050565b6000611d6e82611d8b565b9050919050565b60008115159050919050565b6000819050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b82818337600083830152505050565b60005b83811015611de2578082015181840152602081019050611dc7565b83811115611df1576000848401525b50505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f5061757361626c653a206e6f7420706175736564000000000000000000000000600082015250565b7f5061757361626c653a2070617573656400000000000000000000000000000000600082015250565b611ebf81611d63565b8114611eca57600080fd5b50565b611ed681611d81565b8114611ee157600080fd5b50565b611eed81611dab565b8114611ef857600080fd5b5056fea2646970667358221220ea4ce36ac5bd8e5a2dccb7294f409461e73e51ee4a817b222cf2cf63a329848e64736f6c63430008070033"; - -type ZetaConnectorNonEthConstructorParams = - | [signer?: Signer] - | ConstructorParameters; - -const isSuperArgs = ( - xs: ZetaConnectorNonEthConstructorParams -): xs is ConstructorParameters => xs.length > 1; - -export class ZetaConnectorNonEth__factory extends ContractFactory { - constructor(...args: ZetaConnectorNonEthConstructorParams) { - if (isSuperArgs(args)) { - super(...args); - } else { - super(_abi, _bytecode, args[0]); - } - } - - override deploy( - zetaTokenAddress_: string, - tssAddress_: string, - tssAddressUpdater_: string, - pauserAddress_: string, - overrides?: Overrides & { from?: string | Promise } - ): Promise { - return super.deploy( - zetaTokenAddress_, - tssAddress_, - tssAddressUpdater_, - pauserAddress_, - overrides || {} - ) as Promise; - } - override getDeployTransaction( - zetaTokenAddress_: string, - tssAddress_: string, - tssAddressUpdater_: string, - pauserAddress_: string, - overrides?: Overrides & { from?: string | Promise } - ): TransactionRequest { - return super.getDeployTransaction( - zetaTokenAddress_, - tssAddress_, - tssAddressUpdater_, - pauserAddress_, - overrides || {} - ); - } - override attach(address: string): ZetaConnectorNonEth { - return super.attach(address) as ZetaConnectorNonEth; - } - override connect(signer: Signer): ZetaConnectorNonEth__factory { - return super.connect(signer) as ZetaConnectorNonEth__factory; - } - - static readonly bytecode = _bytecode; - static readonly abi = _abi; - static createInterface(): ZetaConnectorNonEthInterface { - return new utils.Interface(_abi) as ZetaConnectorNonEthInterface; - } - static connect( - address: string, - signerOrProvider: Signer | Provider - ): ZetaConnectorNonEth { - return new Contract(address, _abi, signerOrProvider) as ZetaConnectorNonEth; - } -} diff --git a/packages/interfaces/typechain-types/factories/contracts/ZetaConnector.non-eth.sol/index.ts b/packages/interfaces/typechain-types/factories/contracts/ZetaConnector.non-eth.sol/index.ts deleted file mode 100644 index ab63c271..00000000 --- a/packages/interfaces/typechain-types/factories/contracts/ZetaConnector.non-eth.sol/index.ts +++ /dev/null @@ -1,4 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ -export { ZetaConnectorNonEth__factory } from "./ZetaConnectorNonEth__factory"; diff --git a/packages/interfaces/typechain-types/factories/contracts/ZetaInteractor__factory.ts b/packages/interfaces/typechain-types/factories/contracts/ZetaInteractor__factory.ts deleted file mode 100644 index b34920eb..00000000 --- a/packages/interfaces/typechain-types/factories/contracts/ZetaInteractor__factory.ts +++ /dev/null @@ -1,198 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ - -import { Contract, Signer, utils } from "ethers"; -import type { Provider } from "@ethersproject/providers"; -import type { - ZetaInteractor, - ZetaInteractorInterface, -} from "../../contracts/ZetaInteractor"; - -const _abi = [ - { - inputs: [], - name: "InvalidAddress", - type: "error", - }, - { - inputs: [ - { - internalType: "address", - name: "caller", - type: "address", - }, - ], - name: "InvalidCaller", - type: "error", - }, - { - inputs: [], - name: "InvalidDestinationChainId", - type: "error", - }, - { - inputs: [], - name: "InvalidZetaMessageCall", - type: "error", - }, - { - inputs: [], - name: "InvalidZetaRevertCall", - type: "error", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "address", - name: "previousOwner", - type: "address", - }, - { - indexed: true, - internalType: "address", - name: "newOwner", - type: "address", - }, - ], - name: "OwnershipTransferStarted", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "address", - name: "previousOwner", - type: "address", - }, - { - indexed: true, - internalType: "address", - name: "newOwner", - type: "address", - }, - ], - name: "OwnershipTransferred", - type: "event", - }, - { - inputs: [], - name: "acceptOwnership", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "connector", - outputs: [ - { - internalType: "contract ZetaConnector", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - name: "interactorsByChainId", - outputs: [ - { - internalType: "bytes", - name: "", - type: "bytes", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "owner", - outputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "pendingOwner", - outputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "renounceOwnership", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "destinationChainId", - type: "uint256", - }, - { - internalType: "bytes", - name: "contractAddress", - type: "bytes", - }, - ], - name: "setInteractorByChainId", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "newOwner", - type: "address", - }, - ], - name: "transferOwnership", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, -]; - -export class ZetaInteractor__factory { - static readonly abi = _abi; - static createInterface(): ZetaInteractorInterface { - return new utils.Interface(_abi) as ZetaInteractorInterface; - } - static connect( - address: string, - signerOrProvider: Signer | Provider - ): ZetaInteractor { - return new Contract(address, _abi, signerOrProvider) as ZetaInteractor; - } -} diff --git a/packages/interfaces/typechain-types/factories/contracts/ZetaTokenConsumerTrident.strategy.sol/WETH9__factory.ts b/packages/interfaces/typechain-types/factories/contracts/ZetaTokenConsumerTrident.strategy.sol/WETH9__factory.ts deleted file mode 100644 index 511e54d2..00000000 --- a/packages/interfaces/typechain-types/factories/contracts/ZetaTokenConsumerTrident.strategy.sol/WETH9__factory.ts +++ /dev/null @@ -1,74 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ - -import { Contract, Signer, utils } from "ethers"; -import type { Provider } from "@ethersproject/providers"; -import type { - WETH9, - WETH9Interface, -} from "../../../contracts/ZetaTokenConsumerTrident.strategy.sol/WETH9"; - -const _abi = [ - { - inputs: [], - name: "deposit", - outputs: [], - stateMutability: "payable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "to", - type: "address", - }, - ], - name: "depositTo", - outputs: [], - stateMutability: "payable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "wad", - type: "uint256", - }, - ], - name: "withdraw", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address payable", - name: "to", - type: "address", - }, - { - internalType: "uint256", - name: "value", - type: "uint256", - }, - ], - name: "withdrawTo", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, -]; - -export class WETH9__factory { - static readonly abi = _abi; - static createInterface(): WETH9Interface { - return new utils.Interface(_abi) as WETH9Interface; - } - static connect(address: string, signerOrProvider: Signer | Provider): WETH9 { - return new Contract(address, _abi, signerOrProvider) as WETH9; - } -} diff --git a/packages/interfaces/typechain-types/factories/contracts/ZetaTokenConsumerTrident.strategy.sol/ZetaTokenConsumerTridentErrors__factory.ts b/packages/interfaces/typechain-types/factories/contracts/ZetaTokenConsumerTrident.strategy.sol/ZetaTokenConsumerTridentErrors__factory.ts deleted file mode 100644 index 4d8a7ee7..00000000 --- a/packages/interfaces/typechain-types/factories/contracts/ZetaTokenConsumerTrident.strategy.sol/ZetaTokenConsumerTridentErrors__factory.ts +++ /dev/null @@ -1,45 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ - -import { Contract, Signer, utils } from "ethers"; -import type { Provider } from "@ethersproject/providers"; -import type { - ZetaTokenConsumerTridentErrors, - ZetaTokenConsumerTridentErrorsInterface, -} from "../../../contracts/ZetaTokenConsumerTrident.strategy.sol/ZetaTokenConsumerTridentErrors"; - -const _abi = [ - { - inputs: [], - name: "ErrorSendingETH", - type: "error", - }, - { - inputs: [], - name: "InputCantBeZero", - type: "error", - }, - { - inputs: [], - name: "ReentrancyError", - type: "error", - }, -]; - -export class ZetaTokenConsumerTridentErrors__factory { - static readonly abi = _abi; - static createInterface(): ZetaTokenConsumerTridentErrorsInterface { - return new utils.Interface(_abi) as ZetaTokenConsumerTridentErrorsInterface; - } - static connect( - address: string, - signerOrProvider: Signer | Provider - ): ZetaTokenConsumerTridentErrors { - return new Contract( - address, - _abi, - signerOrProvider - ) as ZetaTokenConsumerTridentErrors; - } -} diff --git a/packages/interfaces/typechain-types/factories/contracts/ZetaTokenConsumerTrident.strategy.sol/ZetaTokenConsumerTrident__factory.ts b/packages/interfaces/typechain-types/factories/contracts/ZetaTokenConsumerTrident.strategy.sol/ZetaTokenConsumerTrident__factory.ts deleted file mode 100644 index 98f36bc3..00000000 --- a/packages/interfaces/typechain-types/factories/contracts/ZetaTokenConsumerTrident.strategy.sol/ZetaTokenConsumerTrident__factory.ts +++ /dev/null @@ -1,384 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ -import { Signer, utils, Contract, ContractFactory, Overrides } from "ethers"; -import type { Provider, TransactionRequest } from "@ethersproject/providers"; -import type { - ZetaTokenConsumerTrident, - ZetaTokenConsumerTridentInterface, -} from "../../../contracts/ZetaTokenConsumerTrident.strategy.sol/ZetaTokenConsumerTrident"; - -const _abi = [ - { - inputs: [ - { - internalType: "address", - name: "zetaToken_", - type: "address", - }, - { - internalType: "address", - name: "uniswapV3Router_", - type: "address", - }, - { - internalType: "address", - name: "WETH9Address_", - type: "address", - }, - { - internalType: "address", - name: "poolFactory_", - type: "address", - }, - ], - stateMutability: "nonpayable", - type: "constructor", - }, - { - inputs: [], - name: "ErrorSendingETH", - type: "error", - }, - { - inputs: [], - name: "InputCantBeZero", - type: "error", - }, - { - inputs: [], - name: "InvalidAddress", - type: "error", - }, - { - inputs: [], - name: "ReentrancyError", - type: "error", - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: "uint256", - name: "amountIn", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "amountOut", - type: "uint256", - }, - ], - name: "EthExchangedForZeta", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: "address", - name: "token", - type: "address", - }, - { - indexed: false, - internalType: "uint256", - name: "amountIn", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "amountOut", - type: "uint256", - }, - ], - name: "TokenExchangedForZeta", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: "uint256", - name: "amountIn", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "amountOut", - type: "uint256", - }, - ], - name: "ZetaExchangedForEth", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: "address", - name: "token", - type: "address", - }, - { - indexed: false, - internalType: "uint256", - name: "amountIn", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "amountOut", - type: "uint256", - }, - ], - name: "ZetaExchangedForToken", - type: "event", - }, - { - inputs: [ - { - internalType: "address", - name: "destinationAddress", - type: "address", - }, - { - internalType: "uint256", - name: "minAmountOut", - type: "uint256", - }, - { - internalType: "uint256", - name: "zetaTokenAmount", - type: "uint256", - }, - ], - name: "getEthFromZeta", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "destinationAddress", - type: "address", - }, - { - internalType: "uint256", - name: "minAmountOut", - type: "uint256", - }, - { - internalType: "address", - name: "outputToken", - type: "address", - }, - { - internalType: "uint256", - name: "zetaTokenAmount", - type: "uint256", - }, - ], - name: "getTokenFromZeta", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "destinationAddress", - type: "address", - }, - { - internalType: "uint256", - name: "minAmountOut", - type: "uint256", - }, - ], - name: "getZetaFromEth", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "payable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "destinationAddress", - type: "address", - }, - { - internalType: "uint256", - name: "minAmountOut", - type: "uint256", - }, - { - internalType: "address", - name: "inputToken", - type: "address", - }, - { - internalType: "uint256", - name: "inputTokenAmount", - type: "uint256", - }, - ], - name: "getZetaFromToken", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "poolFactory", - outputs: [ - { - internalType: "contract ConcentratedLiquidityPoolFactory", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "tridentRouter", - outputs: [ - { - internalType: "contract IPoolRouter", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "zetaToken", - outputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - stateMutability: "payable", - type: "receive", - }, -]; - -const _bytecode = - "0x6101006040523480156200001257600080fd5b5060405162002add38038062002add833981810160405281019062000038919062000245565b600073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff161480620000a05750600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16145b80620000d85750600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16145b80620001105750600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16145b1562000148576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8373ffffffffffffffffffffffffffffffffffffffff1660a08173ffffffffffffffffffffffffffffffffffffffff1660601b815250508273ffffffffffffffffffffffffffffffffffffffff1660c08173ffffffffffffffffffffffffffffffffffffffff1660601b815250508073ffffffffffffffffffffffffffffffffffffffff1660e08173ffffffffffffffffffffffffffffffffffffffff1660601b815250508173ffffffffffffffffffffffffffffffffffffffff1660808173ffffffffffffffffffffffffffffffffffffffff1660601b81525050505050506200030a565b6000815190506200023f81620002f0565b92915050565b60008060008060808587031215620002625762000261620002eb565b5b600062000272878288016200022e565b945050602062000285878288016200022e565b935050604062000298878288016200022e565b9250506060620002ab878288016200022e565b91505092959194509250565b6000620002c482620002cb565b9050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600080fd5b620002fb81620002b7565b81146200030757600080fd5b50565b60805160601c60a05160601c60c05160601c60e05160601c6126c962000414600039600081816102e0015281816106ca015281816107d601528181610b0c01528181610cde015281816111a8015261129401526000818161042c0152818161064f01528181610a1201528181610c2301528181610e4901528181610f3e015281816110ed01526114f00152600081816102b401528181610521015281816107a601528181610bd901528181610c4501528181610c9101528181610da3015281816110a30152818161110f0152818161115b015261147b0152600081816102930152818161069e0152818161078501528181610cb20152818161117c015261126301526126c96000f3fe6080604052600436106100745760003560e01c80634219dc401161004e5780634219dc401461011857806354c49a2a1461014357806364b5528a14610180578063a53fb10b146101ab5761007b565b8063013b2ff81461008057806321e093b1146100b05780632405620a146100db5761007b565b3661007b57005b600080fd5b61009a60048036038101906100959190611bbd565b6101e8565b6040516100a7919061229d565b60405180910390f35b3480156100bc57600080fd5b506100c561051f565b6040516100d29190612068565b60405180910390f35b3480156100e757600080fd5b5061010260048036038101906100fd9190611bfd565b610543565b60405161010f919061229d565b60405180910390f35b34801561012457600080fd5b5061012d610b0a565b60405161013a9190612188565b60405180910390f35b34801561014f57600080fd5b5061016a60048036038101906101659190611c64565b610b2e565b604051610177919061229d565b60405180910390f35b34801561018c57600080fd5b50610195610f3c565b6040516101a291906121a3565b60405180910390f35b3480156101b757600080fd5b506101d260048036038101906101cd9190611bfd565b610f60565b6040516101df919061229d565b60405180910390f35b60008073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415610250576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600034141561028b576040517fb813f54900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000806102d87f00000000000000000000000000000000000000000000000000000000000000007f0000000000000000000000000000000000000000000000000000000000000000611602565b9150915060007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166371a258128484600060016040518563ffffffff1660e01b815260040161033f94939291906120ac565b60006040518083038186803b15801561035757600080fd5b505afa15801561036b573d6000803e3d6000fd5b505050506040513d6000823e3d601f19601f820116820180604052508101906103949190611cb7565b905060006040518060c00160405280600073ffffffffffffffffffffffffffffffffffffffff168152602001348152602001878152602001836000815181106103e0576103df6124b5565b5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1681526020018873ffffffffffffffffffffffffffffffffffffffff16815260200160001515815250905060007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663c07f5c3234846040518363ffffffff1660e01b81526004016104849190612282565b6020604051808303818588803b15801561049d57600080fd5b505af11580156104b1573d6000803e3d6000fd5b50505050506040513d601f19601f820116820180604052508101906104d69190611d2d565b90507f87890b0a30955b1db16cc894fbe24779ae05d9f337bfe8b6dfc0809b5bf9da1134826040516105099291906122b8565b60405180910390a1809550505050505092915050565b7f000000000000000000000000000000000000000000000000000000000000000081565b60008073ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff1614806105ab5750600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16145b156105e2576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600082141561061d576040517fb813f54900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61064a3330848673ffffffffffffffffffffffffffffffffffffffff16611652909392919063ffffffff16565b6106957f0000000000000000000000000000000000000000000000000000000000000000838573ffffffffffffffffffffffffffffffffffffffff166116db9092919063ffffffff16565b6000806106c2857f0000000000000000000000000000000000000000000000000000000000000000611602565b9150915060007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166371a258128484600060016040518563ffffffff1660e01b815260040161072994939291906120ac565b60006040518083038186803b15801561074157600080fd5b505afa158015610755573d6000803e3d6000fd5b505050506040513d6000823e3d601f19601f8201168201806040525081019061077e9190611cb7565b90506107ca7f00000000000000000000000000000000000000000000000000000000000000007f0000000000000000000000000000000000000000000000000000000000000000611602565b809350819450505060007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166371a258128585600060016040518563ffffffff1660e01b815260040161083594939291906120ac565b60006040518083038186803b15801561084d57600080fd5b505afa158015610861573d6000803e3d6000fd5b505050506040513d6000823e3d601f19601f8201168201806040525081019061088a9190611cb7565b90506000600267ffffffffffffffff8111156108a9576108a86124e4565b5b6040519080825280602002602001820160405280156108d75781602001602082028036833780820191505090505b509050826000815181106108ee576108ed6124b5565b5b60200260200101518160008151811061090a576109096124b5565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff168152505081600081518110610958576109576124b5565b5b602002602001015181600181518110610974576109736124b5565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff168152505060006040518060c001604052808a73ffffffffffffffffffffffffffffffffffffffff1681526020018981526020018b81526020018381526020018c73ffffffffffffffffffffffffffffffffffffffff16815260200160001515815250905060007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663363a9dba836040518263ffffffff1660e01b8152600401610a699190612260565b602060405180830381600087803b158015610a8357600080fd5b505af1158015610a97573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610abb9190611d2d565b90507f017190d3d99ee6d8dd0604ef1e71ff9802810c6485f57c9b2ed6169848dd119f8a8a83604051610af093929190612151565b60405180910390a180975050505050505050949350505050565b7f000000000000000000000000000000000000000000000000000000000000000081565b60008073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff161415610b96576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000821415610bd1576040517fb813f54900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610c1e3330847f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16611652909392919063ffffffff16565b610c897f0000000000000000000000000000000000000000000000000000000000000000837f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166116db9092919063ffffffff16565b600080610cd67f00000000000000000000000000000000000000000000000000000000000000007f0000000000000000000000000000000000000000000000000000000000000000611602565b9150915060007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166371a258128484600060016040518563ffffffff1660e01b8152600401610d3d94939291906120ac565b60006040518083038186803b158015610d5557600080fd5b505afa158015610d69573d6000803e3d6000fd5b505050506040513d6000823e3d601f19601f82011682018060405250810190610d929190611cb7565b905060006040518060c001604052807f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16815260200187815260200188815260200183600081518110610dfd57610dfc6124b5565b5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1681526020018973ffffffffffffffffffffffffffffffffffffffff16815260200160011515815250905060007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663c07f5c32836040518263ffffffff1660e01b8152600401610ea09190612282565b602060405180830381600087803b158015610eba57600080fd5b505af1158015610ece573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ef29190611d2d565b90507f74e171117e91660f493740924d8bad0caf48dc4fbccb767fb05935397a2c17ae8782604051610f259291906122b8565b60405180910390a180955050505050509392505050565b7f000000000000000000000000000000000000000000000000000000000000000081565b60008060009054906101000a900460ff1615610fa8576040517f29f745a700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60016000806101000a81548160ff021916908315150217905550600073ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff1614806110295750600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16145b15611060576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600082141561109b576040517fb813f54900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6110e83330847f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16611652909392919063ffffffff16565b6111537f0000000000000000000000000000000000000000000000000000000000000000837f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166116db9092919063ffffffff16565b6000806111a07f00000000000000000000000000000000000000000000000000000000000000007f0000000000000000000000000000000000000000000000000000000000000000611602565b9150915060007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166371a258128484600060016040518563ffffffff1660e01b815260040161120794939291906120ac565b60006040518083038186803b15801561121f57600080fd5b505afa158015611233573d6000803e3d6000fd5b505050506040513d6000823e3d601f19601f8201168201806040525081019061125c9190611cb7565b90506112887f000000000000000000000000000000000000000000000000000000000000000087611602565b809350819450505060007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166371a258128585600060016040518563ffffffff1660e01b81526004016112f394939291906120ac565b60006040518083038186803b15801561130b57600080fd5b505afa15801561131f573d6000803e3d6000fd5b505050506040513d6000823e3d601f19601f820116820180604052508101906113489190611cb7565b90506000600267ffffffffffffffff811115611367576113666124e4565b5b6040519080825280602002602001820160405280156113955781602001602082028036833780820191505090505b509050826000815181106113ac576113ab6124b5565b5b6020026020010151816000815181106113c8576113c76124b5565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff168152505081600081518110611416576114156124b5565b5b602002602001015181600181518110611432576114316124b5565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff168152505060006040518060c001604052807f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1681526020018981526020018b81526020018381526020018c73ffffffffffffffffffffffffffffffffffffffff16815260200160001515815250905060007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663363a9dba836040518263ffffffff1660e01b81526004016115479190612260565b602060405180830381600087803b15801561156157600080fd5b505af1158015611575573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115999190611d2d565b90507f0a7cb8f6e1d29e616c1209a3f418c17b3a9137005377f6dd072217b1ede2573b8a8a836040516115ce93929190612151565b60405180910390a18097505050505050505060008060006101000a81548160ff021916908315150217905550949350505050565b6000808273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1610156116445783839150915061164b565b8284915091505b9250929050565b6116d5846323b872dd60e01b858585604051602401611673939291906120f1565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050611839565b50505050565b6000811480611774575060008373ffffffffffffffffffffffffffffffffffffffff1663dd62ed3e30856040518363ffffffff1660e01b8152600401611722929190612083565b60206040518083038186803b15801561173a57600080fd5b505afa15801561174e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906117729190611d2d565b145b6117b3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016117aa90612240565b60405180910390fd5b6118348363095ea7b360e01b84846040516024016117d2929190612128565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050611839565b505050565b600061189b826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c65648152508573ffffffffffffffffffffffffffffffffffffffff166119009092919063ffffffff16565b90506000815111156118fb57808060200190518101906118bb9190611d00565b6118fa576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016118f190612220565b60405180910390fd5b5b505050565b606061190f8484600085611918565b90509392505050565b60608247101561195d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611954906121e0565b60405180910390fd5b61196685611a2c565b6119a5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161199c90612200565b60405180910390fd5b6000808673ffffffffffffffffffffffffffffffffffffffff1685876040516119ce9190612051565b60006040518083038185875af1925050503d8060008114611a0b576040519150601f19603f3d011682016040523d82523d6000602084013e611a10565b606091505b5091509150611a20828286611a4f565b92505050949350505050565b6000808273ffffffffffffffffffffffffffffffffffffffff163b119050919050565b60608315611a5f57829050611aaf565b600083511115611a725782518084602001fd5b816040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611aa691906121be565b60405180910390fd5b9392505050565b6000611ac9611ac484612306565b6122e1565b90508083825260208201905082856020860282011115611aec57611aeb612518565b5b60005b85811015611b1c5781611b028882611b3b565b845260208401935060208301925050600181019050611aef565b5050509392505050565b600081359050611b358161264e565b92915050565b600081519050611b4a8161264e565b92915050565b600082601f830112611b6557611b64612513565b5b8151611b75848260208601611ab6565b91505092915050565b600081519050611b8d81612665565b92915050565b600081359050611ba28161267c565b92915050565b600081519050611bb78161267c565b92915050565b60008060408385031215611bd457611bd3612522565b5b6000611be285828601611b26565b9250506020611bf385828601611b93565b9150509250929050565b60008060008060808587031215611c1757611c16612522565b5b6000611c2587828801611b26565b9450506020611c3687828801611b93565b9350506040611c4787828801611b26565b9250506060611c5887828801611b93565b91505092959194509250565b600080600060608486031215611c7d57611c7c612522565b5b6000611c8b86828701611b26565b9350506020611c9c86828701611b93565b9250506040611cad86828701611b93565b9150509250925092565b600060208284031215611ccd57611ccc612522565b5b600082015167ffffffffffffffff811115611ceb57611cea61251d565b5b611cf784828501611b50565b91505092915050565b600060208284031215611d1657611d15612522565b5b6000611d2484828501611b7e565b91505092915050565b600060208284031215611d4357611d42612522565b5b6000611d5184828501611ba8565b91505092915050565b6000611d668383611d72565b60208301905092915050565b611d7b8161239d565b82525050565b611d8a8161239d565b82525050565b6000611d9b82612342565b611da58185612370565b9350611db083612332565b8060005b83811015611de1578151611dc88882611d5a565b9750611dd383612363565b925050600181019050611db4565b5085935050505092915050565b611df7816123af565b82525050565b6000611e088261234d565b611e128185612381565b9350611e22818560208601612451565b80840191505092915050565b611e37816123e5565b82525050565b611e46816123f7565b82525050565b611e5581612409565b82525050565b611e648161241b565b82525050565b6000611e7582612358565b611e7f818561238c565b9350611e8f818560208601612451565b611e9881612527565b840191505092915050565b6000611eb060268361238c565b9150611ebb82612538565b604082019050919050565b6000611ed3601d8361238c565b9150611ede82612587565b602082019050919050565b6000611ef6602a8361238c565b9150611f01826125b0565b604082019050919050565b6000611f1960368361238c565b9150611f24826125ff565b604082019050919050565b600060c083016000830151611f476000860182611d72565b506020830151611f5a6020860182612033565b506040830151611f6d6040860182612033565b5060608301518482036060860152611f858282611d90565b9150506080830151611f9a6080860182611d72565b5060a0830151611fad60a0860182611dee565b508091505092915050565b60c082016000820151611fce6000850182611d72565b506020820151611fe16020850182612033565b506040820151611ff46040850182612033565b5060608201516120076060850182611d72565b50608082015161201a6080850182611d72565b5060a082015161202d60a0850182611dee565b50505050565b61203c816123db565b82525050565b61204b816123db565b82525050565b600061205d8284611dfd565b915081905092915050565b600060208201905061207d6000830184611d81565b92915050565b60006040820190506120986000830185611d81565b6120a56020830184611d81565b9392505050565b60006080820190506120c16000830187611d81565b6120ce6020830186611d81565b6120db6040830185611e4c565b6120e86060830184611e5b565b95945050505050565b60006060820190506121066000830186611d81565b6121136020830185611d81565b6121206040830184612042565b949350505050565b600060408201905061213d6000830185611d81565b61214a6020830184612042565b9392505050565b60006060820190506121666000830186611d81565b6121736020830185612042565b6121806040830184612042565b949350505050565b600060208201905061219d6000830184611e2e565b92915050565b60006020820190506121b86000830184611e3d565b92915050565b600060208201905081810360008301526121d88184611e6a565b905092915050565b600060208201905081810360008301526121f981611ea3565b9050919050565b6000602082019050818103600083015261221981611ec6565b9050919050565b6000602082019050818103600083015261223981611ee9565b9050919050565b6000602082019050818103600083015261225981611f0c565b9050919050565b6000602082019050818103600083015261227a8184611f2f565b905092915050565b600060c0820190506122976000830184611fb8565b92915050565b60006020820190506122b26000830184612042565b92915050565b60006040820190506122cd6000830185612042565b6122da6020830184612042565b9392505050565b60006122eb6122fc565b90506122f78282612484565b919050565b6000604051905090565b600067ffffffffffffffff821115612321576123206124e4565b5b602082029050602081019050919050565b6000819050602082019050919050565b600081519050919050565b600081519050919050565b600081519050919050565b6000602082019050919050565b600082825260208201905092915050565b600081905092915050565b600082825260208201905092915050565b60006123a8826123bb565b9050919050565b60008115159050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b60006123f08261242d565b9050919050565b60006124028261242d565b9050919050565b6000612414826123db565b9050919050565b6000612426826123db565b9050919050565b60006124388261243f565b9050919050565b600061244a826123bb565b9050919050565b60005b8381101561246f578082015181840152602081019050612454565b8381111561247e576000848401525b50505050565b61248d82612527565b810181811067ffffffffffffffff821117156124ac576124ab6124e4565b5b80604052505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600080fd5b600080fd5b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f416464726573733a20696e73756666696369656e742062616c616e636520666f60008201527f722063616c6c0000000000000000000000000000000000000000000000000000602082015250565b7f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000600082015250565b7f5361666545524332303a204552433230206f7065726174696f6e20646964206e60008201527f6f74207375636365656400000000000000000000000000000000000000000000602082015250565b7f5361666545524332303a20617070726f76652066726f6d206e6f6e2d7a65726f60008201527f20746f206e6f6e2d7a65726f20616c6c6f77616e636500000000000000000000602082015250565b6126578161239d565b811461266257600080fd5b50565b61266e816123af565b811461267957600080fd5b50565b612685816123db565b811461269057600080fd5b5056fea2646970667358221220c48bbb0e60356e945436838a0833d9efad43a4ccf55e6682b812d5f3d3ef759064736f6c63430008070033"; - -type ZetaTokenConsumerTridentConstructorParams = - | [signer?: Signer] - | ConstructorParameters; - -const isSuperArgs = ( - xs: ZetaTokenConsumerTridentConstructorParams -): xs is ConstructorParameters => xs.length > 1; - -export class ZetaTokenConsumerTrident__factory extends ContractFactory { - constructor(...args: ZetaTokenConsumerTridentConstructorParams) { - if (isSuperArgs(args)) { - super(...args); - } else { - super(_abi, _bytecode, args[0]); - } - } - - override deploy( - zetaToken_: string, - uniswapV3Router_: string, - WETH9Address_: string, - poolFactory_: string, - overrides?: Overrides & { from?: string | Promise } - ): Promise { - return super.deploy( - zetaToken_, - uniswapV3Router_, - WETH9Address_, - poolFactory_, - overrides || {} - ) as Promise; - } - override getDeployTransaction( - zetaToken_: string, - uniswapV3Router_: string, - WETH9Address_: string, - poolFactory_: string, - overrides?: Overrides & { from?: string | Promise } - ): TransactionRequest { - return super.getDeployTransaction( - zetaToken_, - uniswapV3Router_, - WETH9Address_, - poolFactory_, - overrides || {} - ); - } - override attach(address: string): ZetaTokenConsumerTrident { - return super.attach(address) as ZetaTokenConsumerTrident; - } - override connect(signer: Signer): ZetaTokenConsumerTrident__factory { - return super.connect(signer) as ZetaTokenConsumerTrident__factory; - } - - static readonly bytecode = _bytecode; - static readonly abi = _abi; - static createInterface(): ZetaTokenConsumerTridentInterface { - return new utils.Interface(_abi) as ZetaTokenConsumerTridentInterface; - } - static connect( - address: string, - signerOrProvider: Signer | Provider - ): ZetaTokenConsumerTrident { - return new Contract( - address, - _abi, - signerOrProvider - ) as ZetaTokenConsumerTrident; - } -} diff --git a/packages/interfaces/typechain-types/factories/contracts/ZetaTokenConsumerTrident.strategy.sol/index.ts b/packages/interfaces/typechain-types/factories/contracts/ZetaTokenConsumerTrident.strategy.sol/index.ts deleted file mode 100644 index aed02e47..00000000 --- a/packages/interfaces/typechain-types/factories/contracts/ZetaTokenConsumerTrident.strategy.sol/index.ts +++ /dev/null @@ -1,6 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ -export { WETH9__factory } from "./WETH9__factory"; -export { ZetaTokenConsumerTrident__factory } from "./ZetaTokenConsumerTrident__factory"; -export { ZetaTokenConsumerTridentErrors__factory } from "./ZetaTokenConsumerTridentErrors__factory"; diff --git a/packages/interfaces/typechain-types/factories/contracts/ZetaTokenConsumerUniV2.strategy.sol/ZetaTokenConsumerUniV2Errors__factory.ts b/packages/interfaces/typechain-types/factories/contracts/ZetaTokenConsumerUniV2.strategy.sol/ZetaTokenConsumerUniV2Errors__factory.ts deleted file mode 100644 index ce7dfe2e..00000000 --- a/packages/interfaces/typechain-types/factories/contracts/ZetaTokenConsumerUniV2.strategy.sol/ZetaTokenConsumerUniV2Errors__factory.ts +++ /dev/null @@ -1,35 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ - -import { Contract, Signer, utils } from "ethers"; -import type { Provider } from "@ethersproject/providers"; -import type { - ZetaTokenConsumerUniV2Errors, - ZetaTokenConsumerUniV2ErrorsInterface, -} from "../../../contracts/ZetaTokenConsumerUniV2.strategy.sol/ZetaTokenConsumerUniV2Errors"; - -const _abi = [ - { - inputs: [], - name: "InputCantBeZero", - type: "error", - }, -]; - -export class ZetaTokenConsumerUniV2Errors__factory { - static readonly abi = _abi; - static createInterface(): ZetaTokenConsumerUniV2ErrorsInterface { - return new utils.Interface(_abi) as ZetaTokenConsumerUniV2ErrorsInterface; - } - static connect( - address: string, - signerOrProvider: Signer | Provider - ): ZetaTokenConsumerUniV2Errors { - return new Contract( - address, - _abi, - signerOrProvider - ) as ZetaTokenConsumerUniV2Errors; - } -} diff --git a/packages/interfaces/typechain-types/factories/contracts/ZetaTokenConsumerUniV2.strategy.sol/ZetaTokenConsumerUniV2__factory.ts b/packages/interfaces/typechain-types/factories/contracts/ZetaTokenConsumerUniV2.strategy.sol/ZetaTokenConsumerUniV2__factory.ts deleted file mode 100644 index 1e2a027b..00000000 --- a/packages/interfaces/typechain-types/factories/contracts/ZetaTokenConsumerUniV2.strategy.sol/ZetaTokenConsumerUniV2__factory.ts +++ /dev/null @@ -1,326 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ -import { Signer, utils, Contract, ContractFactory, Overrides } from "ethers"; -import type { Provider, TransactionRequest } from "@ethersproject/providers"; -import type { - ZetaTokenConsumerUniV2, - ZetaTokenConsumerUniV2Interface, -} from "../../../contracts/ZetaTokenConsumerUniV2.strategy.sol/ZetaTokenConsumerUniV2"; - -const _abi = [ - { - inputs: [ - { - internalType: "address", - name: "zetaToken_", - type: "address", - }, - { - internalType: "address", - name: "uniswapV2Router_", - type: "address", - }, - ], - stateMutability: "nonpayable", - type: "constructor", - }, - { - inputs: [], - name: "InputCantBeZero", - type: "error", - }, - { - inputs: [], - name: "InvalidAddress", - type: "error", - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: "uint256", - name: "amountIn", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "amountOut", - type: "uint256", - }, - ], - name: "EthExchangedForZeta", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: "address", - name: "token", - type: "address", - }, - { - indexed: false, - internalType: "uint256", - name: "amountIn", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "amountOut", - type: "uint256", - }, - ], - name: "TokenExchangedForZeta", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: "uint256", - name: "amountIn", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "amountOut", - type: "uint256", - }, - ], - name: "ZetaExchangedForEth", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: "address", - name: "token", - type: "address", - }, - { - indexed: false, - internalType: "uint256", - name: "amountIn", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "amountOut", - type: "uint256", - }, - ], - name: "ZetaExchangedForToken", - type: "event", - }, - { - inputs: [ - { - internalType: "address", - name: "destinationAddress", - type: "address", - }, - { - internalType: "uint256", - name: "minAmountOut", - type: "uint256", - }, - { - internalType: "uint256", - name: "zetaTokenAmount", - type: "uint256", - }, - ], - name: "getEthFromZeta", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "destinationAddress", - type: "address", - }, - { - internalType: "uint256", - name: "minAmountOut", - type: "uint256", - }, - { - internalType: "address", - name: "outputToken", - type: "address", - }, - { - internalType: "uint256", - name: "zetaTokenAmount", - type: "uint256", - }, - ], - name: "getTokenFromZeta", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "destinationAddress", - type: "address", - }, - { - internalType: "uint256", - name: "minAmountOut", - type: "uint256", - }, - ], - name: "getZetaFromEth", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "payable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "destinationAddress", - type: "address", - }, - { - internalType: "uint256", - name: "minAmountOut", - type: "uint256", - }, - { - internalType: "address", - name: "inputToken", - type: "address", - }, - { - internalType: "uint256", - name: "inputTokenAmount", - type: "uint256", - }, - ], - name: "getZetaFromToken", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "zetaToken", - outputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, -]; - -const _bytecode = - "0x60e06040523480156200001157600080fd5b50604051620026aa380380620026aa83398181016040528101906200003791906200024e565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614806200009f5750600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16145b15620000d7576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8173ffffffffffffffffffffffffffffffffffffffff1660a08173ffffffffffffffffffffffffffffffffffffffff1660601b815250508073ffffffffffffffffffffffffffffffffffffffff1660c08173ffffffffffffffffffffffffffffffffffffffff1660601b815250508073ffffffffffffffffffffffffffffffffffffffff1663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b1580156200018c57600080fd5b505afa158015620001a1573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620001c791906200021c565b73ffffffffffffffffffffffffffffffffffffffff1660808173ffffffffffffffffffffffffffffffffffffffff1660601b815250505050620002e8565b6000815190506200021681620002ce565b92915050565b600060208284031215620002355762000234620002c9565b5b6000620002458482850162000205565b91505092915050565b60008060408385031215620002685762000267620002c9565b5b6000620002788582860162000205565b92505060206200028b8582860162000205565b9150509250929050565b6000620002a282620002a9565b9050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600080fd5b620002d98162000295565b8114620002e557600080fd5b50565b60805160601c60a05160601c60c05160601c6122e8620003c26000396000818161033401528181610598015281816108e101528181610b0f01528181610ca501528181610f0701526112700152600081816102c30152818161046a015281816106f10152818161086f01528181610ac501528181610b3101528181610bc501528181610ebd01528181610f29015281816110110152611140015260008181610254015281816105e2015281816106820152818161080001528181610c3401528181610f710152818161108001526111af01526122e86000f3fe60806040526004361061004a5760003560e01c8063013b2ff81461004f57806321e093b11461007f5780632405620a146100aa57806354c49a2a146100e7578063a53fb10b14610124575b600080fd5b610069600480360381019061006491906118ff565b610161565b6040516100769190611dc9565b60405180910390f35b34801561008b57600080fd5b50610094610468565b6040516100a19190611c4c565b60405180910390f35b3480156100b657600080fd5b506100d160048036038101906100cc919061193f565b61048c565b6040516100de9190611dc9565b60405180910390f35b3480156100f357600080fd5b5061010e600480360381019061010991906119a6565b610a1a565b60405161011b9190611dc9565b60405180910390f35b34801561013057600080fd5b5061014b6004803603810190610146919061193f565b610ddb565b6040516101589190611dc9565b60405180910390f35b60008073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614156101c9576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000341415610204576040517fb813f54900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000600267ffffffffffffffff81111561022157610220612103565b5b60405190808252806020026020018201604052801561024f5781602001602082028036833780820191505090505b5090507f000000000000000000000000000000000000000000000000000000000000000081600081518110610287576102866120d4565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff16815250507f0000000000000000000000000000000000000000000000000000000000000000816001815181106102f6576102f56120d4565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff168152505060007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16637ff36ab53486858960c84261037f9190611f6f565b6040518663ffffffff1660e01b815260040161039e9493929190611de4565b6000604051808303818588803b1580156103b757600080fd5b505af11580156103cb573d6000803e3d6000fd5b50505050506040513d6000823e3d601f19601f820116820180604052508101906103f591906119f9565b9050600081600184516104089190611fc5565b81518110610419576104186120d4565b5b602002602001015190507f87890b0a30955b1db16cc894fbe24779ae05d9f337bfe8b6dfc0809b5bf9da113482604051610454929190611e30565b60405180910390a180935050505092915050565b7f000000000000000000000000000000000000000000000000000000000000000081565b60008073ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff1614806104f45750600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16145b1561052b576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000821415610566576040517fb813f54900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6105933330848673ffffffffffffffffffffffffffffffffffffffff166113a9909392919063ffffffff16565b6105de7f0000000000000000000000000000000000000000000000000000000000000000838573ffffffffffffffffffffffffffffffffffffffff166114329092919063ffffffff16565b60607f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff16141561076357600267ffffffffffffffff81111561064f5761064e612103565b5b60405190808252806020026020018201604052801561067d5781602001602082028036833780820191505090505b5090507f0000000000000000000000000000000000000000000000000000000000000000816000815181106106b5576106b46120d4565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff16815250507f000000000000000000000000000000000000000000000000000000000000000081600181518110610724576107236120d4565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff16815250506108dd565b600367ffffffffffffffff81111561077e5761077d612103565b5b6040519080825280602002602001820160405280156107ac5781602001602082028036833780820191505090505b50905083816000815181106107c4576107c36120d4565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff16815250507f000000000000000000000000000000000000000000000000000000000000000081600181518110610833576108326120d4565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff16815250507f0000000000000000000000000000000000000000000000000000000000000000816002815181106108a2576108a16120d4565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff16815250505b60007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166338ed17398588858b60c84261092c9190611f6f565b6040518663ffffffff1660e01b815260040161094c959493929190611e59565b600060405180830381600087803b15801561096657600080fd5b505af115801561097a573d6000803e3d6000fd5b505050506040513d6000823e3d601f19601f820116820180604052508101906109a391906119f9565b9050600081600184516109b69190611fc5565b815181106109c7576109c66120d4565b5b602002602001015190507f017190d3d99ee6d8dd0604ef1e71ff9802810c6485f57c9b2ed6169848dd119f868683604051610a0493929190611cf0565b60405180910390a1809350505050949350505050565b60008073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff161415610a82576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000821415610abd576040517fb813f54900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610b0a3330847f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166113a9909392919063ffffffff16565b610b757f0000000000000000000000000000000000000000000000000000000000000000837f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166114329092919063ffffffff16565b6000600267ffffffffffffffff811115610b9257610b91612103565b5b604051908082528060200260200182016040528015610bc05781602001602082028036833780820191505090505b5090507f000000000000000000000000000000000000000000000000000000000000000081600081518110610bf857610bf76120d4565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff16815250507f000000000000000000000000000000000000000000000000000000000000000081600181518110610c6757610c666120d4565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff168152505060007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166318cbafe58587858a60c842610cf09190611f6f565b6040518663ffffffff1660e01b8152600401610d10959493929190611e59565b600060405180830381600087803b158015610d2a57600080fd5b505af1158015610d3e573d6000803e3d6000fd5b505050506040513d6000823e3d601f19601f82011682018060405250810190610d6791906119f9565b905060008160018451610d7a9190611fc5565b81518110610d8b57610d8a6120d4565b5b602002602001015190507f74e171117e91660f493740924d8bad0caf48dc4fbccb767fb05935397a2c17ae8582604051610dc6929190611e30565b60405180910390a18093505050509392505050565b60008073ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff161480610e435750600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16145b15610e7a576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000821415610eb5576040517fb813f54900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610f023330847f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166113a9909392919063ffffffff16565b610f6d7f0000000000000000000000000000000000000000000000000000000000000000837f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166114329092919063ffffffff16565b60607f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1614156110f257600267ffffffffffffffff811115610fde57610fdd612103565b5b60405190808252806020026020018201604052801561100c5781602001602082028036833780820191505090505b5090507f000000000000000000000000000000000000000000000000000000000000000081600081518110611044576110436120d4565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff16815250507f0000000000000000000000000000000000000000000000000000000000000000816001815181106110b3576110b26120d4565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff168152505061126c565b600367ffffffffffffffff81111561110d5761110c612103565b5b60405190808252806020026020018201604052801561113b5781602001602082028036833780820191505090505b5090507f000000000000000000000000000000000000000000000000000000000000000081600081518110611173576111726120d4565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff16815250507f0000000000000000000000000000000000000000000000000000000000000000816001815181106111e2576111e16120d4565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff16815250508381600281518110611231576112306120d4565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff16815250505b60007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166338ed17398588858b60c8426112bb9190611f6f565b6040518663ffffffff1660e01b81526004016112db959493929190611e59565b600060405180830381600087803b1580156112f557600080fd5b505af1158015611309573d6000803e3d6000fd5b505050506040513d6000823e3d601f19601f8201168201806040525081019061133291906119f9565b9050600081600184516113459190611fc5565b81518110611356576113556120d4565b5b602002602001015190507f0a7cb8f6e1d29e616c1209a3f418c17b3a9137005377f6dd072217b1ede2573b86868360405161139393929190611cf0565b60405180910390a1809350505050949350505050565b61142c846323b872dd60e01b8585856040516024016113ca93929190611c90565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050611590565b50505050565b60008114806114cb575060008373ffffffffffffffffffffffffffffffffffffffff1663dd62ed3e30856040518363ffffffff1660e01b8152600401611479929190611c67565b60206040518083038186803b15801561149157600080fd5b505afa1580156114a5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114c99190611a6f565b145b61150a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161150190611da9565b60405180910390fd5b61158b8363095ea7b360e01b8484604051602401611529929190611cc7565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050611590565b505050565b60006115f2826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c65648152508573ffffffffffffffffffffffffffffffffffffffff166116579092919063ffffffff16565b905060008151111561165257808060200190518101906116129190611a42565b611651576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161164890611d89565b60405180910390fd5b5b505050565b6060611666848460008561166f565b90509392505050565b6060824710156116b4576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016116ab90611d49565b60405180910390fd5b6116bd85611783565b6116fc576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016116f390611d69565b60405180910390fd5b6000808673ffffffffffffffffffffffffffffffffffffffff1685876040516117259190611c35565b60006040518083038185875af1925050503d8060008114611762576040519150601f19603f3d011682016040523d82523d6000602084013e611767565b606091505b50915091506117778282866117a6565b92505050949350505050565b6000808273ffffffffffffffffffffffffffffffffffffffff163b119050919050565b606083156117b657829050611806565b6000835111156117c95782518084602001fd5b816040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016117fd9190611d27565b60405180910390fd5b9392505050565b600061182061181b84611ed8565b611eb3565b9050808382526020820190508285602086028201111561184357611842612137565b5b60005b85811015611873578161185988826118ea565b845260208401935060208301925050600181019050611846565b5050509392505050565b60008135905061188c8161226d565b92915050565b600082601f8301126118a7576118a6612132565b5b81516118b784826020860161180d565b91505092915050565b6000815190506118cf81612284565b92915050565b6000813590506118e48161229b565b92915050565b6000815190506118f98161229b565b92915050565b6000806040838503121561191657611915612141565b5b60006119248582860161187d565b9250506020611935858286016118d5565b9150509250929050565b6000806000806080858703121561195957611958612141565b5b60006119678782880161187d565b9450506020611978878288016118d5565b93505060406119898782880161187d565b925050606061199a878288016118d5565b91505092959194509250565b6000806000606084860312156119bf576119be612141565b5b60006119cd8682870161187d565b93505060206119de868287016118d5565b92505060406119ef868287016118d5565b9150509250925092565b600060208284031215611a0f57611a0e612141565b5b600082015167ffffffffffffffff811115611a2d57611a2c61213c565b5b611a3984828501611892565b91505092915050565b600060208284031215611a5857611a57612141565b5b6000611a66848285016118c0565b91505092915050565b600060208284031215611a8557611a84612141565b5b6000611a93848285016118ea565b91505092915050565b6000611aa88383611ab4565b60208301905092915050565b611abd81611ff9565b82525050565b611acc81611ff9565b82525050565b6000611add82611f14565b611ae78185611f42565b9350611af283611f04565b8060005b83811015611b23578151611b0a8882611a9c565b9750611b1583611f35565b925050600181019050611af6565b5085935050505092915050565b6000611b3b82611f1f565b611b458185611f53565b9350611b55818560208601612041565b80840191505092915050565b6000611b6c82611f2a565b611b768185611f5e565b9350611b86818560208601612041565b611b8f81612146565b840191505092915050565b6000611ba7602683611f5e565b9150611bb282612157565b604082019050919050565b6000611bca601d83611f5e565b9150611bd5826121a6565b602082019050919050565b6000611bed602a83611f5e565b9150611bf8826121cf565b604082019050919050565b6000611c10603683611f5e565b9150611c1b8261221e565b604082019050919050565b611c2f81612037565b82525050565b6000611c418284611b30565b915081905092915050565b6000602082019050611c616000830184611ac3565b92915050565b6000604082019050611c7c6000830185611ac3565b611c896020830184611ac3565b9392505050565b6000606082019050611ca56000830186611ac3565b611cb26020830185611ac3565b611cbf6040830184611c26565b949350505050565b6000604082019050611cdc6000830185611ac3565b611ce96020830184611c26565b9392505050565b6000606082019050611d056000830186611ac3565b611d126020830185611c26565b611d1f6040830184611c26565b949350505050565b60006020820190508181036000830152611d418184611b61565b905092915050565b60006020820190508181036000830152611d6281611b9a565b9050919050565b60006020820190508181036000830152611d8281611bbd565b9050919050565b60006020820190508181036000830152611da281611be0565b9050919050565b60006020820190508181036000830152611dc281611c03565b9050919050565b6000602082019050611dde6000830184611c26565b92915050565b6000608082019050611df96000830187611c26565b8181036020830152611e0b8186611ad2565b9050611e1a6040830185611ac3565b611e276060830184611c26565b95945050505050565b6000604082019050611e456000830185611c26565b611e526020830184611c26565b9392505050565b600060a082019050611e6e6000830188611c26565b611e7b6020830187611c26565b8181036040830152611e8d8186611ad2565b9050611e9c6060830185611ac3565b611ea96080830184611c26565b9695505050505050565b6000611ebd611ece565b9050611ec98282612074565b919050565b6000604051905090565b600067ffffffffffffffff821115611ef357611ef2612103565b5b602082029050602081019050919050565b6000819050602082019050919050565b600081519050919050565b600081519050919050565b600081519050919050565b6000602082019050919050565b600082825260208201905092915050565b600081905092915050565b600082825260208201905092915050565b6000611f7a82612037565b9150611f8583612037565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff03821115611fba57611fb96120a5565b5b828201905092915050565b6000611fd082612037565b9150611fdb83612037565b925082821015611fee57611fed6120a5565b5b828203905092915050565b600061200482612017565b9050919050565b60008115159050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b60005b8381101561205f578082015181840152602081019050612044565b8381111561206e576000848401525b50505050565b61207d82612146565b810181811067ffffffffffffffff8211171561209c5761209b612103565b5b80604052505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600080fd5b600080fd5b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f416464726573733a20696e73756666696369656e742062616c616e636520666f60008201527f722063616c6c0000000000000000000000000000000000000000000000000000602082015250565b7f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000600082015250565b7f5361666545524332303a204552433230206f7065726174696f6e20646964206e60008201527f6f74207375636365656400000000000000000000000000000000000000000000602082015250565b7f5361666545524332303a20617070726f76652066726f6d206e6f6e2d7a65726f60008201527f20746f206e6f6e2d7a65726f20616c6c6f77616e636500000000000000000000602082015250565b61227681611ff9565b811461228157600080fd5b50565b61228d8161200b565b811461229857600080fd5b50565b6122a481612037565b81146122af57600080fd5b5056fea264697066735822122096bbf433ab5f9af6cea73831cc6f3b262fcabb5666aa2844c4d0d980bbd96a2c64736f6c63430008070033"; - -type ZetaTokenConsumerUniV2ConstructorParams = - | [signer?: Signer] - | ConstructorParameters; - -const isSuperArgs = ( - xs: ZetaTokenConsumerUniV2ConstructorParams -): xs is ConstructorParameters => xs.length > 1; - -export class ZetaTokenConsumerUniV2__factory extends ContractFactory { - constructor(...args: ZetaTokenConsumerUniV2ConstructorParams) { - if (isSuperArgs(args)) { - super(...args); - } else { - super(_abi, _bytecode, args[0]); - } - } - - override deploy( - zetaToken_: string, - uniswapV2Router_: string, - overrides?: Overrides & { from?: string | Promise } - ): Promise { - return super.deploy( - zetaToken_, - uniswapV2Router_, - overrides || {} - ) as Promise; - } - override getDeployTransaction( - zetaToken_: string, - uniswapV2Router_: string, - overrides?: Overrides & { from?: string | Promise } - ): TransactionRequest { - return super.getDeployTransaction( - zetaToken_, - uniswapV2Router_, - overrides || {} - ); - } - override attach(address: string): ZetaTokenConsumerUniV2 { - return super.attach(address) as ZetaTokenConsumerUniV2; - } - override connect(signer: Signer): ZetaTokenConsumerUniV2__factory { - return super.connect(signer) as ZetaTokenConsumerUniV2__factory; - } - - static readonly bytecode = _bytecode; - static readonly abi = _abi; - static createInterface(): ZetaTokenConsumerUniV2Interface { - return new utils.Interface(_abi) as ZetaTokenConsumerUniV2Interface; - } - static connect( - address: string, - signerOrProvider: Signer | Provider - ): ZetaTokenConsumerUniV2 { - return new Contract( - address, - _abi, - signerOrProvider - ) as ZetaTokenConsumerUniV2; - } -} diff --git a/packages/interfaces/typechain-types/factories/contracts/ZetaTokenConsumerUniV2.strategy.sol/index.ts b/packages/interfaces/typechain-types/factories/contracts/ZetaTokenConsumerUniV2.strategy.sol/index.ts deleted file mode 100644 index bff48c49..00000000 --- a/packages/interfaces/typechain-types/factories/contracts/ZetaTokenConsumerUniV2.strategy.sol/index.ts +++ /dev/null @@ -1,5 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ -export { ZetaTokenConsumerUniV2__factory } from "./ZetaTokenConsumerUniV2__factory"; -export { ZetaTokenConsumerUniV2Errors__factory } from "./ZetaTokenConsumerUniV2Errors__factory"; diff --git a/packages/interfaces/typechain-types/factories/contracts/ZetaTokenConsumerUniV3.strategy.sol/WETH9__factory.ts b/packages/interfaces/typechain-types/factories/contracts/ZetaTokenConsumerUniV3.strategy.sol/WETH9__factory.ts deleted file mode 100644 index f902674d..00000000 --- a/packages/interfaces/typechain-types/factories/contracts/ZetaTokenConsumerUniV3.strategy.sol/WETH9__factory.ts +++ /dev/null @@ -1,36 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ - -import { Contract, Signer, utils } from "ethers"; -import type { Provider } from "@ethersproject/providers"; -import type { - WETH9, - WETH9Interface, -} from "../../../contracts/ZetaTokenConsumerUniV3.strategy.sol/WETH9"; - -const _abi = [ - { - inputs: [ - { - internalType: "uint256", - name: "wad", - type: "uint256", - }, - ], - name: "withdraw", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, -]; - -export class WETH9__factory { - static readonly abi = _abi; - static createInterface(): WETH9Interface { - return new utils.Interface(_abi) as WETH9Interface; - } - static connect(address: string, signerOrProvider: Signer | Provider): WETH9 { - return new Contract(address, _abi, signerOrProvider) as WETH9; - } -} diff --git a/packages/interfaces/typechain-types/factories/contracts/ZetaTokenConsumerUniV3.strategy.sol/ZetaTokenConsumerUniV3Errors__factory.ts b/packages/interfaces/typechain-types/factories/contracts/ZetaTokenConsumerUniV3.strategy.sol/ZetaTokenConsumerUniV3Errors__factory.ts deleted file mode 100644 index 04046aad..00000000 --- a/packages/interfaces/typechain-types/factories/contracts/ZetaTokenConsumerUniV3.strategy.sol/ZetaTokenConsumerUniV3Errors__factory.ts +++ /dev/null @@ -1,45 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ - -import { Contract, Signer, utils } from "ethers"; -import type { Provider } from "@ethersproject/providers"; -import type { - ZetaTokenConsumerUniV3Errors, - ZetaTokenConsumerUniV3ErrorsInterface, -} from "../../../contracts/ZetaTokenConsumerUniV3.strategy.sol/ZetaTokenConsumerUniV3Errors"; - -const _abi = [ - { - inputs: [], - name: "ErrorSendingETH", - type: "error", - }, - { - inputs: [], - name: "InputCantBeZero", - type: "error", - }, - { - inputs: [], - name: "ReentrancyError", - type: "error", - }, -]; - -export class ZetaTokenConsumerUniV3Errors__factory { - static readonly abi = _abi; - static createInterface(): ZetaTokenConsumerUniV3ErrorsInterface { - return new utils.Interface(_abi) as ZetaTokenConsumerUniV3ErrorsInterface; - } - static connect( - address: string, - signerOrProvider: Signer | Provider - ): ZetaTokenConsumerUniV3Errors { - return new Contract( - address, - _abi, - signerOrProvider - ) as ZetaTokenConsumerUniV3Errors; - } -} diff --git a/packages/interfaces/typechain-types/factories/contracts/ZetaTokenConsumerUniV3.strategy.sol/ZetaTokenConsumerUniV3__factory.ts b/packages/interfaces/typechain-types/factories/contracts/ZetaTokenConsumerUniV3.strategy.sol/ZetaTokenConsumerUniV3__factory.ts deleted file mode 100644 index af1385dc..00000000 --- a/packages/interfaces/typechain-types/factories/contracts/ZetaTokenConsumerUniV3.strategy.sol/ZetaTokenConsumerUniV3__factory.ts +++ /dev/null @@ -1,435 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ -import { - Signer, - utils, - Contract, - ContractFactory, - BigNumberish, - Overrides, -} from "ethers"; -import type { Provider, TransactionRequest } from "@ethersproject/providers"; -import type { - ZetaTokenConsumerUniV3, - ZetaTokenConsumerUniV3Interface, -} from "../../../contracts/ZetaTokenConsumerUniV3.strategy.sol/ZetaTokenConsumerUniV3"; - -const _abi = [ - { - inputs: [ - { - internalType: "address", - name: "zetaToken_", - type: "address", - }, - { - internalType: "address", - name: "uniswapV3Router_", - type: "address", - }, - { - internalType: "address", - name: "quoter_", - type: "address", - }, - { - internalType: "address", - name: "WETH9Address_", - type: "address", - }, - { - internalType: "uint24", - name: "zetaPoolFee_", - type: "uint24", - }, - { - internalType: "uint24", - name: "tokenPoolFee_", - type: "uint24", - }, - ], - stateMutability: "nonpayable", - type: "constructor", - }, - { - inputs: [], - name: "ErrorSendingETH", - type: "error", - }, - { - inputs: [], - name: "InputCantBeZero", - type: "error", - }, - { - inputs: [], - name: "InvalidAddress", - type: "error", - }, - { - inputs: [], - name: "ReentrancyError", - type: "error", - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: "uint256", - name: "amountIn", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "amountOut", - type: "uint256", - }, - ], - name: "EthExchangedForZeta", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: "address", - name: "token", - type: "address", - }, - { - indexed: false, - internalType: "uint256", - name: "amountIn", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "amountOut", - type: "uint256", - }, - ], - name: "TokenExchangedForZeta", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: "uint256", - name: "amountIn", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "amountOut", - type: "uint256", - }, - ], - name: "ZetaExchangedForEth", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: "address", - name: "token", - type: "address", - }, - { - indexed: false, - internalType: "uint256", - name: "amountIn", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "amountOut", - type: "uint256", - }, - ], - name: "ZetaExchangedForToken", - type: "event", - }, - { - inputs: [ - { - internalType: "address", - name: "destinationAddress", - type: "address", - }, - { - internalType: "uint256", - name: "minAmountOut", - type: "uint256", - }, - { - internalType: "uint256", - name: "zetaTokenAmount", - type: "uint256", - }, - ], - name: "getEthFromZeta", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "destinationAddress", - type: "address", - }, - { - internalType: "uint256", - name: "minAmountOut", - type: "uint256", - }, - { - internalType: "address", - name: "outputToken", - type: "address", - }, - { - internalType: "uint256", - name: "zetaTokenAmount", - type: "uint256", - }, - ], - name: "getTokenFromZeta", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "destinationAddress", - type: "address", - }, - { - internalType: "uint256", - name: "minAmountOut", - type: "uint256", - }, - ], - name: "getZetaFromEth", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "payable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "destinationAddress", - type: "address", - }, - { - internalType: "uint256", - name: "minAmountOut", - type: "uint256", - }, - { - internalType: "address", - name: "inputToken", - type: "address", - }, - { - internalType: "uint256", - name: "inputTokenAmount", - type: "uint256", - }, - ], - name: "getZetaFromToken", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "quoter", - outputs: [ - { - internalType: "contract IQuoter", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "tokenPoolFee", - outputs: [ - { - internalType: "uint24", - name: "", - type: "uint24", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "uniswapV3Router", - outputs: [ - { - internalType: "contract ISwapRouter", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "zetaPoolFee", - outputs: [ - { - internalType: "uint24", - name: "", - type: "uint24", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "zetaToken", - outputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - stateMutability: "payable", - type: "receive", - }, -]; - -const _bytecode = - "0x6101406040523480156200001257600080fd5b50604051620025af380380620025af83398181016040528101906200003891906200028a565b600073ffffffffffffffffffffffffffffffffffffffff168673ffffffffffffffffffffffffffffffffffffffff161480620000a05750600073ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff16145b80620000d85750600073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff16145b80620001105750600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16145b1562000148576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8573ffffffffffffffffffffffffffffffffffffffff1660e08173ffffffffffffffffffffffffffffffffffffffff1660601b815250508473ffffffffffffffffffffffffffffffffffffffff166101008173ffffffffffffffffffffffffffffffffffffffff1660601b815250508373ffffffffffffffffffffffffffffffffffffffff166101208173ffffffffffffffffffffffffffffffffffffffff1660601b815250508273ffffffffffffffffffffffffffffffffffffffff1660c08173ffffffffffffffffffffffffffffffffffffffff1660601b815250508162ffffff1660808162ffffff1660e81b815250508062ffffff1660a08162ffffff1660e81b81525050505050505050620003a2565b6000815190506200026d816200036e565b92915050565b600081519050620002848162000388565b92915050565b60008060008060008060c08789031215620002aa57620002a962000369565b5b6000620002ba89828a016200025c565b9650506020620002cd89828a016200025c565b9550506040620002e089828a016200025c565b9450506060620002f389828a016200025c565b93505060806200030689828a0162000273565b92505060a06200031989828a0162000273565b9150509295509295509295565b600062000333826200033a565b9050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600062ffffff82169050919050565b600080fd5b620003798162000326565b81146200038557600080fd5b50565b62000393816200035a565b81146200039f57600080fd5b50565b60805160e81c60a05160e81c60c05160601c60e05160601c6101005160601c6101205160601c6120fc620004b360003960006111400152600081816104030152818161062301528181610761015281816108560152818161099101528181610b0301528181610ed30152611031015260008181610343015281816104f5015281816106dc01528181610947015281816109b301528181610a0701528181610e8901528181610ef50152610f480152600081816103070152818161069a01528181610a4301528181610bb00152610f8a01526000818161067901528181610d240152610fab01526000818161037f015281816106bb0152818161087a01528181610a7f0152610f6901526120fc6000f3fe60806040526004361061008a5760003560e01c80633cbd7005116100595780633cbd70051461015957806354c49a2a146101845780635d9dfdde146101c1578063a53fb10b146101ec578063c6bbd5a71461022957610091565b8063013b2ff81461009657806321e093b1146100c65780632405620a146100f15780632c76d7a61461012e57610091565b3661009157005b600080fd5b6100b060048036038101906100ab919061161a565b610254565b6040516100bd9190611d24565b60405180910390f35b3480156100d257600080fd5b506100db6104f3565b6040516100e89190611b18565b60405180910390f35b3480156100fd57600080fd5b506101186004803603810190610113919061165a565b610517565b6040516101259190611d24565b60405180910390f35b34801561013a57600080fd5b50610143610854565b6040516101509190611c0e565b60405180910390f35b34801561016557600080fd5b5061016e610878565b60405161017b9190611d09565b60405180910390f35b34801561019057600080fd5b506101ab60048036038101906101a691906116c1565b61089c565b6040516101b89190611d24565b60405180910390f35b3480156101cd57600080fd5b506101d6610d22565b6040516101e39190611d09565b60405180910390f35b3480156101f857600080fd5b50610213600480360381019061020e919061165a565b610d46565b6040516102209190611d24565b60405180910390f35b34801561023557600080fd5b5061023e61113e565b60405161024b9190611bf3565b60405180910390f35b60008073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614156102bc576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60003414156102f7576040517fb813f54900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60006040518061010001604052807f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1681526020017f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1681526020017f000000000000000000000000000000000000000000000000000000000000000062ffffff1681526020018573ffffffffffffffffffffffffffffffffffffffff16815260200160c8426103d19190611dab565b8152602001348152602001848152602001600073ffffffffffffffffffffffffffffffffffffffff16815250905060007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663414bf38934846040518363ffffffff1660e01b815260040161045b9190611ced565b6020604051808303818588803b15801561047457600080fd5b505af1158015610488573d6000803e3d6000fd5b50505050506040513d601f19601f820116820180604052508101906104ad9190611741565b90507f87890b0a30955b1db16cc894fbe24779ae05d9f337bfe8b6dfc0809b5bf9da1134826040516104e0929190611d3f565b60405180910390a1809250505092915050565b7f000000000000000000000000000000000000000000000000000000000000000081565b60008073ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff16148061057f5750600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16145b156105b6576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008214156105f1576040517fb813f54900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61061e3330848673ffffffffffffffffffffffffffffffffffffffff16611162909392919063ffffffff16565b6106697f0000000000000000000000000000000000000000000000000000000000000000838573ffffffffffffffffffffffffffffffffffffffff166111eb9092919063ffffffff16565b60006040518060a00160405280857f00000000000000000000000000000000000000000000000000000000000000007f00000000000000000000000000000000000000000000000000000000000000007f00000000000000000000000000000000000000000000000000000000000000007f000000000000000000000000000000000000000000000000000000000000000060405160200161070f959493929190611a8d565b60405160208183030381529060405281526020018773ffffffffffffffffffffffffffffffffffffffff16815260200160c84261074c9190611dab565b815260200184815260200186815250905060007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663c04b8d59836040518263ffffffff1660e01b81526004016107b89190611ccb565b602060405180830381600087803b1580156107d257600080fd5b505af11580156107e6573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061080a9190611741565b90507f017190d3d99ee6d8dd0604ef1e71ff9802810c6485f57c9b2ed6169848dd119f85858360405161083f93929190611bbc565b60405180910390a18092505050949350505050565b7f000000000000000000000000000000000000000000000000000000000000000081565b7f000000000000000000000000000000000000000000000000000000000000000081565b60008073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff161415610904576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600082141561093f576040517fb813f54900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61098c3330847f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16611162909392919063ffffffff16565b6109f77f0000000000000000000000000000000000000000000000000000000000000000837f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166111eb9092919063ffffffff16565b60006040518061010001604052807f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1681526020017f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1681526020017f000000000000000000000000000000000000000000000000000000000000000062ffffff1681526020013073ffffffffffffffffffffffffffffffffffffffff16815260200160c842610ad19190611dab565b8152602001848152602001858152602001600073ffffffffffffffffffffffffffffffffffffffff16815250905060007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663414bf389836040518263ffffffff1660e01b8152600401610b5a9190611ced565b602060405180830381600087803b158015610b7457600080fd5b505af1158015610b88573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610bac9190611741565b90507f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16632e1a7d4d826040518263ffffffff1660e01b8152600401610c079190611d24565b600060405180830381600087803b158015610c2157600080fd5b505af1158015610c35573d6000803e3d6000fd5b505050507f74e171117e91660f493740924d8bad0caf48dc4fbccb767fb05935397a2c17ae8482604051610c6a929190611d3f565b60405180910390a160008673ffffffffffffffffffffffffffffffffffffffff1682604051610c9890611b03565b60006040518083038185875af1925050503d8060008114610cd5576040519150601f19603f3d011682016040523d82523d6000602084013e610cda565b606091505b5050905080610d15576040517f3794aeaf00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8193505050509392505050565b7f000000000000000000000000000000000000000000000000000000000000000081565b60008060009054906101000a900460ff1615610d8e576040517f29f745a700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60016000806101000a81548160ff021916908315150217905550600073ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff161480610e0f5750600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16145b15610e46576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000821415610e81576040517fb813f54900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610ece3330847f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16611162909392919063ffffffff16565b610f397f0000000000000000000000000000000000000000000000000000000000000000837f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166111eb9092919063ffffffff16565b60006040518060a001604052807f00000000000000000000000000000000000000000000000000000000000000007f00000000000000000000000000000000000000000000000000000000000000007f00000000000000000000000000000000000000000000000000000000000000007f000000000000000000000000000000000000000000000000000000000000000089604051602001610fdf959493929190611a8d565b60405160208183030381529060405281526020018773ffffffffffffffffffffffffffffffffffffffff16815260200160c84261101c9190611dab565b815260200184815260200186815250905060007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663c04b8d59836040518263ffffffff1660e01b81526004016110889190611ccb565b602060405180830381600087803b1580156110a257600080fd5b505af11580156110b6573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110da9190611741565b90507f0a7cb8f6e1d29e616c1209a3f418c17b3a9137005377f6dd072217b1ede2573b85858360405161110f93929190611bbc565b60405180910390a1809250505060008060006101000a81548160ff021916908315150217905550949350505050565b7f000000000000000000000000000000000000000000000000000000000000000081565b6111e5846323b872dd60e01b85858560405160240161118393929190611b5c565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050611349565b50505050565b6000811480611284575060008373ffffffffffffffffffffffffffffffffffffffff1663dd62ed3e30856040518363ffffffff1660e01b8152600401611232929190611b33565b60206040518083038186803b15801561124a57600080fd5b505afa15801561125e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112829190611741565b145b6112c3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016112ba90611cab565b60405180910390fd5b6113448363095ea7b360e01b84846040516024016112e2929190611b93565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050611349565b505050565b60006113ab826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c65648152508573ffffffffffffffffffffffffffffffffffffffff166114109092919063ffffffff16565b905060008151111561140b57808060200190518101906113cb9190611714565b61140a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161140190611c8b565b60405180910390fd5b5b505050565b606061141f8484600085611428565b90509392505050565b60608247101561146d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161146490611c4b565b60405180910390fd5b6114768561153c565b6114b5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016114ac90611c6b565b60405180910390fd5b6000808673ffffffffffffffffffffffffffffffffffffffff1685876040516114de9190611aec565b60006040518083038185875af1925050503d806000811461151b576040519150601f19603f3d011682016040523d82523d6000602084013e611520565b606091505b509150915061153082828661155f565b92505050949350505050565b6000808273ffffffffffffffffffffffffffffffffffffffff163b119050919050565b6060831561156f578290506115bf565b6000835111156115825782518084602001fd5b816040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016115b69190611c29565b60405180910390fd5b9392505050565b6000813590506115d581612081565b92915050565b6000815190506115ea81612098565b92915050565b6000813590506115ff816120af565b92915050565b600081519050611614816120af565b92915050565b6000806040838503121561163157611630611f38565b5b600061163f858286016115c6565b9250506020611650858286016115f0565b9150509250929050565b6000806000806080858703121561167457611673611f38565b5b6000611682878288016115c6565b9450506020611693878288016115f0565b93505060406116a4878288016115c6565b92505060606116b5878288016115f0565b91505092959194509250565b6000806000606084860312156116da576116d9611f38565b5b60006116e8868287016115c6565b93505060206116f9868287016115f0565b925050604061170a868287016115f0565b9150509250925092565b60006020828403121561172a57611729611f38565b5b6000611738848285016115db565b91505092915050565b60006020828403121561175757611756611f38565b5b600061176584828501611605565b91505092915050565b61177781611e01565b82525050565b61178681611e01565b82525050565b61179d61179882611e01565b611ed3565b82525050565b60006117ae82611d68565b6117b88185611d7e565b93506117c8818560208601611ea0565b6117d181611f3d565b840191505092915050565b60006117e782611d68565b6117f18185611d8f565b9350611801818560208601611ea0565b80840191505092915050565b61181681611e58565b82525050565b61182581611e6a565b82525050565b600061183682611d73565b6118408185611d9a565b9350611850818560208601611ea0565b61185981611f3d565b840191505092915050565b6000611871602683611d9a565b915061187c82611f68565b604082019050919050565b6000611894600083611d8f565b915061189f82611fb7565b600082019050919050565b60006118b7601d83611d9a565b91506118c282611fba565b602082019050919050565b60006118da602a83611d9a565b91506118e582611fe3565b604082019050919050565b60006118fd603683611d9a565b915061190882612032565b604082019050919050565b600060a083016000830151848203600086015261193082826117a3565b9150506020830151611945602086018261176e565b5060408301516119586040860182611a6f565b50606083015161196b6060860182611a6f565b50608083015161197e6080860182611a6f565b508091505092915050565b610100820160008201516119a0600085018261176e565b5060208201516119b3602085018261176e565b5060408201516119c66040850182611a3a565b5060608201516119d9606085018261176e565b5060808201516119ec6080850182611a6f565b5060a08201516119ff60a0850182611a6f565b5060c0820151611a1260c0850182611a6f565b5060e0820151611a2560e0850182611a2b565b50505050565b611a3481611e1f565b82525050565b611a4381611e3f565b82525050565b611a5281611e3f565b82525050565b611a69611a6482611e3f565b611ef7565b82525050565b611a7881611e4e565b82525050565b611a8781611e4e565b82525050565b6000611a99828861178c565b601482019150611aa98287611a58565b600382019150611ab9828661178c565b601482019150611ac98285611a58565b600382019150611ad9828461178c565b6014820191508190509695505050505050565b6000611af882846117dc565b915081905092915050565b6000611b0e82611887565b9150819050919050565b6000602082019050611b2d600083018461177d565b92915050565b6000604082019050611b48600083018561177d565b611b55602083018461177d565b9392505050565b6000606082019050611b71600083018661177d565b611b7e602083018561177d565b611b8b6040830184611a7e565b949350505050565b6000604082019050611ba8600083018561177d565b611bb56020830184611a7e565b9392505050565b6000606082019050611bd1600083018661177d565b611bde6020830185611a7e565b611beb6040830184611a7e565b949350505050565b6000602082019050611c08600083018461180d565b92915050565b6000602082019050611c23600083018461181c565b92915050565b60006020820190508181036000830152611c43818461182b565b905092915050565b60006020820190508181036000830152611c6481611864565b9050919050565b60006020820190508181036000830152611c84816118aa565b9050919050565b60006020820190508181036000830152611ca4816118cd565b9050919050565b60006020820190508181036000830152611cc4816118f0565b9050919050565b60006020820190508181036000830152611ce58184611913565b905092915050565b600061010082019050611d036000830184611989565b92915050565b6000602082019050611d1e6000830184611a49565b92915050565b6000602082019050611d396000830184611a7e565b92915050565b6000604082019050611d546000830185611a7e565b611d616020830184611a7e565b9392505050565b600081519050919050565b600081519050919050565b600082825260208201905092915050565b600081905092915050565b600082825260208201905092915050565b6000611db682611e4e565b9150611dc183611e4e565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff03821115611df657611df5611f09565b5b828201905092915050565b6000611e0c82611e1f565b9050919050565b60008115159050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600062ffffff82169050919050565b6000819050919050565b6000611e6382611e7c565b9050919050565b6000611e7582611e7c565b9050919050565b6000611e8782611e8e565b9050919050565b6000611e9982611e1f565b9050919050565b60005b83811015611ebe578082015181840152602081019050611ea3565b83811115611ecd576000848401525b50505050565b6000611ede82611ee5565b9050919050565b6000611ef082611f5b565b9050919050565b6000611f0282611f4e565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b600080fd5b6000601f19601f8301169050919050565b60008160e81b9050919050565b60008160601b9050919050565b7f416464726573733a20696e73756666696369656e742062616c616e636520666f60008201527f722063616c6c0000000000000000000000000000000000000000000000000000602082015250565b50565b7f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000600082015250565b7f5361666545524332303a204552433230206f7065726174696f6e20646964206e60008201527f6f74207375636365656400000000000000000000000000000000000000000000602082015250565b7f5361666545524332303a20617070726f76652066726f6d206e6f6e2d7a65726f60008201527f20746f206e6f6e2d7a65726f20616c6c6f77616e636500000000000000000000602082015250565b61208a81611e01565b811461209557600080fd5b50565b6120a181611e13565b81146120ac57600080fd5b50565b6120b881611e4e565b81146120c357600080fd5b5056fea2646970667358221220ba1deb60c4dd172fd2aeafe06e35fd018f28f0cff1638cf114f21634020115e364736f6c63430008070033"; - -type ZetaTokenConsumerUniV3ConstructorParams = - | [signer?: Signer] - | ConstructorParameters; - -const isSuperArgs = ( - xs: ZetaTokenConsumerUniV3ConstructorParams -): xs is ConstructorParameters => xs.length > 1; - -export class ZetaTokenConsumerUniV3__factory extends ContractFactory { - constructor(...args: ZetaTokenConsumerUniV3ConstructorParams) { - if (isSuperArgs(args)) { - super(...args); - } else { - super(_abi, _bytecode, args[0]); - } - } - - override deploy( - zetaToken_: string, - uniswapV3Router_: string, - quoter_: string, - WETH9Address_: string, - zetaPoolFee_: BigNumberish, - tokenPoolFee_: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise { - return super.deploy( - zetaToken_, - uniswapV3Router_, - quoter_, - WETH9Address_, - zetaPoolFee_, - tokenPoolFee_, - overrides || {} - ) as Promise; - } - override getDeployTransaction( - zetaToken_: string, - uniswapV3Router_: string, - quoter_: string, - WETH9Address_: string, - zetaPoolFee_: BigNumberish, - tokenPoolFee_: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): TransactionRequest { - return super.getDeployTransaction( - zetaToken_, - uniswapV3Router_, - quoter_, - WETH9Address_, - zetaPoolFee_, - tokenPoolFee_, - overrides || {} - ); - } - override attach(address: string): ZetaTokenConsumerUniV3 { - return super.attach(address) as ZetaTokenConsumerUniV3; - } - override connect(signer: Signer): ZetaTokenConsumerUniV3__factory { - return super.connect(signer) as ZetaTokenConsumerUniV3__factory; - } - - static readonly bytecode = _bytecode; - static readonly abi = _abi; - static createInterface(): ZetaTokenConsumerUniV3Interface { - return new utils.Interface(_abi) as ZetaTokenConsumerUniV3Interface; - } - static connect( - address: string, - signerOrProvider: Signer | Provider - ): ZetaTokenConsumerUniV3 { - return new Contract( - address, - _abi, - signerOrProvider - ) as ZetaTokenConsumerUniV3; - } -} diff --git a/packages/interfaces/typechain-types/factories/contracts/ZetaTokenConsumerUniV3.strategy.sol/index.ts b/packages/interfaces/typechain-types/factories/contracts/ZetaTokenConsumerUniV3.strategy.sol/index.ts deleted file mode 100644 index ed161d53..00000000 --- a/packages/interfaces/typechain-types/factories/contracts/ZetaTokenConsumerUniV3.strategy.sol/index.ts +++ /dev/null @@ -1,6 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ -export { WETH9__factory } from "./WETH9__factory"; -export { ZetaTokenConsumerUniV3__factory } from "./ZetaTokenConsumerUniV3__factory"; -export { ZetaTokenConsumerUniV3Errors__factory } from "./ZetaTokenConsumerUniV3Errors__factory"; diff --git a/packages/interfaces/typechain-types/factories/contracts/index.ts b/packages/interfaces/typechain-types/factories/contracts/index.ts deleted file mode 100644 index 028b2e9e..00000000 --- a/packages/interfaces/typechain-types/factories/contracts/index.ts +++ /dev/null @@ -1,16 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ -export * as immutableCreate2FactorySol from "./ImmutableCreate2Factory.sol"; -export * as zetaEthSol from "./Zeta.eth.sol"; -export * as zetaNonEthSol from "./Zeta.non-eth.sol"; -export * as zetaConnectorBaseSol from "./ZetaConnector.base.sol"; -export * as zetaConnectorEthSol from "./ZetaConnector.eth.sol"; -export * as zetaConnectorNonEthSol from "./ZetaConnector.non-eth.sol"; -export * as zetaTokenConsumerTridentStrategySol from "./ZetaTokenConsumerTrident.strategy.sol"; -export * as zetaTokenConsumerUniV2StrategySol from "./ZetaTokenConsumerUniV2.strategy.sol"; -export * as zetaTokenConsumerUniV3StrategySol from "./ZetaTokenConsumerUniV3.strategy.sol"; -export * as interfaces from "./interfaces"; -export * as openzeppelin from "./openzeppelin"; -export * as testing from "./testing"; -export { ZetaInteractor__factory } from "./ZetaInteractor__factory"; diff --git a/packages/interfaces/typechain-types/factories/contracts/interfaces/ConnectorErrors__factory.ts b/packages/interfaces/typechain-types/factories/contracts/interfaces/ConnectorErrors__factory.ts deleted file mode 100644 index ad028930..00000000 --- a/packages/interfaces/typechain-types/factories/contracts/interfaces/ConnectorErrors__factory.ts +++ /dev/null @@ -1,86 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ - -import { Contract, Signer, utils } from "ethers"; -import type { Provider } from "@ethersproject/providers"; -import type { - ConnectorErrors, - ConnectorErrorsInterface, -} from "../../../contracts/interfaces/ConnectorErrors"; - -const _abi = [ - { - inputs: [ - { - internalType: "address", - name: "caller", - type: "address", - }, - ], - name: "CallerIsNotPauser", - type: "error", - }, - { - inputs: [ - { - internalType: "address", - name: "caller", - type: "address", - }, - ], - name: "CallerIsNotTss", - type: "error", - }, - { - inputs: [ - { - internalType: "address", - name: "caller", - type: "address", - }, - ], - name: "CallerIsNotTssOrUpdater", - type: "error", - }, - { - inputs: [ - { - internalType: "address", - name: "caller", - type: "address", - }, - ], - name: "CallerIsNotTssUpdater", - type: "error", - }, - { - inputs: [ - { - internalType: "uint256", - name: "maxSupply", - type: "uint256", - }, - ], - name: "ExceedsMaxSupply", - type: "error", - }, - { - inputs: [], - name: "ZetaTransferError", - type: "error", - }, -]; - -export class ConnectorErrors__factory { - static readonly abi = _abi; - static createInterface(): ConnectorErrorsInterface { - return new utils.Interface(_abi) as ConnectorErrorsInterface; - } - static connect( - address: string, - signerOrProvider: Signer | Provider - ): ConnectorErrors { - return new Contract(address, _abi, signerOrProvider) as ConnectorErrors; - } -} diff --git a/packages/interfaces/typechain-types/factories/contracts/interfaces/TridentConcentratedLiquidityPoolFactory.sol/ConcentratedLiquidityPoolFactory__factory.ts b/packages/interfaces/typechain-types/factories/contracts/interfaces/TridentConcentratedLiquidityPoolFactory.sol/ConcentratedLiquidityPoolFactory__factory.ts deleted file mode 100644 index f49929a5..00000000 --- a/packages/interfaces/typechain-types/factories/contracts/interfaces/TridentConcentratedLiquidityPoolFactory.sol/ConcentratedLiquidityPoolFactory__factory.ts +++ /dev/null @@ -1,66 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ - -import { Contract, Signer, utils } from "ethers"; -import type { Provider } from "@ethersproject/providers"; -import type { - ConcentratedLiquidityPoolFactory, - ConcentratedLiquidityPoolFactoryInterface, -} from "../../../../contracts/interfaces/TridentConcentratedLiquidityPoolFactory.sol/ConcentratedLiquidityPoolFactory"; - -const _abi = [ - { - inputs: [ - { - internalType: "address", - name: "token0", - type: "address", - }, - { - internalType: "address", - name: "token1", - type: "address", - }, - { - internalType: "uint256", - name: "startIndex", - type: "uint256", - }, - { - internalType: "uint256", - name: "count", - type: "uint256", - }, - ], - name: "getPools", - outputs: [ - { - internalType: "address[]", - name: "pairPools", - type: "address[]", - }, - ], - stateMutability: "view", - type: "function", - }, -]; - -export class ConcentratedLiquidityPoolFactory__factory { - static readonly abi = _abi; - static createInterface(): ConcentratedLiquidityPoolFactoryInterface { - return new utils.Interface( - _abi - ) as ConcentratedLiquidityPoolFactoryInterface; - } - static connect( - address: string, - signerOrProvider: Signer | Provider - ): ConcentratedLiquidityPoolFactory { - return new Contract( - address, - _abi, - signerOrProvider - ) as ConcentratedLiquidityPoolFactory; - } -} diff --git a/packages/interfaces/typechain-types/factories/contracts/interfaces/TridentConcentratedLiquidityPoolFactory.sol/index.ts b/packages/interfaces/typechain-types/factories/contracts/interfaces/TridentConcentratedLiquidityPoolFactory.sol/index.ts deleted file mode 100644 index d1fea771..00000000 --- a/packages/interfaces/typechain-types/factories/contracts/interfaces/TridentConcentratedLiquidityPoolFactory.sol/index.ts +++ /dev/null @@ -1,4 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ -export { ConcentratedLiquidityPoolFactory__factory } from "./ConcentratedLiquidityPoolFactory__factory"; diff --git a/packages/interfaces/typechain-types/factories/contracts/interfaces/TridentIPoolRouter.sol/IPoolRouter__factory.ts b/packages/interfaces/typechain-types/factories/contracts/interfaces/TridentIPoolRouter.sol/IPoolRouter__factory.ts deleted file mode 100644 index deb1bb44..00000000 --- a/packages/interfaces/typechain-types/factories/contracts/interfaces/TridentIPoolRouter.sol/IPoolRouter__factory.ts +++ /dev/null @@ -1,253 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ - -import { Contract, Signer, utils } from "ethers"; -import type { Provider } from "@ethersproject/providers"; -import type { - IPoolRouter, - IPoolRouterInterface, -} from "../../../../contracts/interfaces/TridentIPoolRouter.sol/IPoolRouter"; - -const _abi = [ - { - inputs: [ - { - components: [ - { - internalType: "address", - name: "tokenIn", - type: "address", - }, - { - internalType: "uint256", - name: "amountIn", - type: "uint256", - }, - { - internalType: "uint256", - name: "amountOutMinimum", - type: "uint256", - }, - { - internalType: "address[]", - name: "path", - type: "address[]", - }, - { - internalType: "address", - name: "to", - type: "address", - }, - { - internalType: "bool", - name: "unwrap", - type: "bool", - }, - ], - internalType: "struct IPoolRouter.ExactInputParams", - name: "params", - type: "tuple", - }, - ], - name: "exactInput", - outputs: [ - { - internalType: "uint256", - name: "amountOut", - type: "uint256", - }, - ], - stateMutability: "payable", - type: "function", - }, - { - inputs: [ - { - components: [ - { - internalType: "address", - name: "tokenIn", - type: "address", - }, - { - internalType: "uint256", - name: "amountIn", - type: "uint256", - }, - { - internalType: "uint256", - name: "amountOutMinimum", - type: "uint256", - }, - { - internalType: "address", - name: "pool", - type: "address", - }, - { - internalType: "address", - name: "to", - type: "address", - }, - { - internalType: "bool", - name: "unwrap", - type: "bool", - }, - ], - internalType: "struct IPoolRouter.ExactInputSingleParams", - name: "params", - type: "tuple", - }, - ], - name: "exactInputSingle", - outputs: [ - { - internalType: "uint256", - name: "amountOut", - type: "uint256", - }, - ], - stateMutability: "payable", - type: "function", - }, - { - inputs: [ - { - components: [ - { - internalType: "address", - name: "tokenIn", - type: "address", - }, - { - internalType: "uint256", - name: "amountOut", - type: "uint256", - }, - { - internalType: "uint256", - name: "amountInMaximum", - type: "uint256", - }, - { - internalType: "address[]", - name: "path", - type: "address[]", - }, - { - internalType: "address", - name: "to", - type: "address", - }, - { - internalType: "bool", - name: "unwrap", - type: "bool", - }, - ], - internalType: "struct IPoolRouter.ExactOutputParams", - name: "params", - type: "tuple", - }, - ], - name: "exactOutput", - outputs: [ - { - internalType: "uint256", - name: "amountIn", - type: "uint256", - }, - ], - stateMutability: "payable", - type: "function", - }, - { - inputs: [ - { - components: [ - { - internalType: "address", - name: "tokenIn", - type: "address", - }, - { - internalType: "uint256", - name: "amountOut", - type: "uint256", - }, - { - internalType: "uint256", - name: "amountInMaximum", - type: "uint256", - }, - { - internalType: "address", - name: "pool", - type: "address", - }, - { - internalType: "address", - name: "to", - type: "address", - }, - { - internalType: "bool", - name: "unwrap", - type: "bool", - }, - ], - internalType: "struct IPoolRouter.ExactOutputSingleParams", - name: "params", - type: "tuple", - }, - ], - name: "exactOutputSingle", - outputs: [ - { - internalType: "uint256", - name: "amountIn", - type: "uint256", - }, - ], - stateMutability: "payable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "token", - type: "address", - }, - { - internalType: "uint256", - name: "amount", - type: "uint256", - }, - { - internalType: "address", - name: "recipient", - type: "address", - }, - ], - name: "sweep", - outputs: [], - stateMutability: "payable", - type: "function", - }, -]; - -export class IPoolRouter__factory { - static readonly abi = _abi; - static createInterface(): IPoolRouterInterface { - return new utils.Interface(_abi) as IPoolRouterInterface; - } - static connect( - address: string, - signerOrProvider: Signer | Provider - ): IPoolRouter { - return new Contract(address, _abi, signerOrProvider) as IPoolRouter; - } -} diff --git a/packages/interfaces/typechain-types/factories/contracts/interfaces/TridentIPoolRouter.sol/index.ts b/packages/interfaces/typechain-types/factories/contracts/interfaces/TridentIPoolRouter.sol/index.ts deleted file mode 100644 index 48f758eb..00000000 --- a/packages/interfaces/typechain-types/factories/contracts/interfaces/TridentIPoolRouter.sol/index.ts +++ /dev/null @@ -1,4 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ -export { IPoolRouter__factory } from "./IPoolRouter__factory"; diff --git a/packages/interfaces/typechain-types/factories/contracts/interfaces/ZetaErrors__factory.ts b/packages/interfaces/typechain-types/factories/contracts/interfaces/ZetaErrors__factory.ts deleted file mode 100644 index 5f13d747..00000000 --- a/packages/interfaces/typechain-types/factories/contracts/interfaces/ZetaErrors__factory.ts +++ /dev/null @@ -1,80 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ - -import { Contract, Signer, utils } from "ethers"; -import type { Provider } from "@ethersproject/providers"; -import type { - ZetaErrors, - ZetaErrorsInterface, -} from "../../../contracts/interfaces/ZetaErrors"; - -const _abi = [ - { - inputs: [ - { - internalType: "address", - name: "caller", - type: "address", - }, - ], - name: "CallerIsNotConnector", - type: "error", - }, - { - inputs: [ - { - internalType: "address", - name: "caller", - type: "address", - }, - ], - name: "CallerIsNotTss", - type: "error", - }, - { - inputs: [ - { - internalType: "address", - name: "caller", - type: "address", - }, - ], - name: "CallerIsNotTssOrUpdater", - type: "error", - }, - { - inputs: [ - { - internalType: "address", - name: "caller", - type: "address", - }, - ], - name: "CallerIsNotTssUpdater", - type: "error", - }, - { - inputs: [], - name: "InvalidAddress", - type: "error", - }, - { - inputs: [], - name: "ZetaTransferError", - type: "error", - }, -]; - -export class ZetaErrors__factory { - static readonly abi = _abi; - static createInterface(): ZetaErrorsInterface { - return new utils.Interface(_abi) as ZetaErrorsInterface; - } - static connect( - address: string, - signerOrProvider: Signer | Provider - ): ZetaErrors { - return new Contract(address, _abi, signerOrProvider) as ZetaErrors; - } -} diff --git a/packages/interfaces/typechain-types/factories/contracts/interfaces/ZetaInteractorErrors__factory.ts b/packages/interfaces/typechain-types/factories/contracts/interfaces/ZetaInteractorErrors__factory.ts deleted file mode 100644 index cbeed5bc..00000000 --- a/packages/interfaces/typechain-types/factories/contracts/interfaces/ZetaInteractorErrors__factory.ts +++ /dev/null @@ -1,56 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ - -import { Contract, Signer, utils } from "ethers"; -import type { Provider } from "@ethersproject/providers"; -import type { - ZetaInteractorErrors, - ZetaInteractorErrorsInterface, -} from "../../../contracts/interfaces/ZetaInteractorErrors"; - -const _abi = [ - { - inputs: [ - { - internalType: "address", - name: "caller", - type: "address", - }, - ], - name: "InvalidCaller", - type: "error", - }, - { - inputs: [], - name: "InvalidDestinationChainId", - type: "error", - }, - { - inputs: [], - name: "InvalidZetaMessageCall", - type: "error", - }, - { - inputs: [], - name: "InvalidZetaRevertCall", - type: "error", - }, -]; - -export class ZetaInteractorErrors__factory { - static readonly abi = _abi; - static createInterface(): ZetaInteractorErrorsInterface { - return new utils.Interface(_abi) as ZetaInteractorErrorsInterface; - } - static connect( - address: string, - signerOrProvider: Signer | Provider - ): ZetaInteractorErrors { - return new Contract( - address, - _abi, - signerOrProvider - ) as ZetaInteractorErrors; - } -} diff --git a/packages/interfaces/typechain-types/factories/contracts/interfaces/ZetaInterfaces.sol/ZetaCommonErrors__factory.ts b/packages/interfaces/typechain-types/factories/contracts/interfaces/ZetaInterfaces.sol/ZetaCommonErrors__factory.ts deleted file mode 100644 index 87689d59..00000000 --- a/packages/interfaces/typechain-types/factories/contracts/interfaces/ZetaInterfaces.sol/ZetaCommonErrors__factory.ts +++ /dev/null @@ -1,31 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ - -import { Contract, Signer, utils } from "ethers"; -import type { Provider } from "@ethersproject/providers"; -import type { - ZetaCommonErrors, - ZetaCommonErrorsInterface, -} from "../../../../contracts/interfaces/ZetaInterfaces.sol/ZetaCommonErrors"; - -const _abi = [ - { - inputs: [], - name: "InvalidAddress", - type: "error", - }, -]; - -export class ZetaCommonErrors__factory { - static readonly abi = _abi; - static createInterface(): ZetaCommonErrorsInterface { - return new utils.Interface(_abi) as ZetaCommonErrorsInterface; - } - static connect( - address: string, - signerOrProvider: Signer | Provider - ): ZetaCommonErrors { - return new Contract(address, _abi, signerOrProvider) as ZetaCommonErrors; - } -} diff --git a/packages/interfaces/typechain-types/factories/contracts/interfaces/ZetaInterfaces.sol/ZetaConnector__factory.ts b/packages/interfaces/typechain-types/factories/contracts/interfaces/ZetaInterfaces.sol/ZetaConnector__factory.ts deleted file mode 100644 index 465d2798..00000000 --- a/packages/interfaces/typechain-types/factories/contracts/interfaces/ZetaInterfaces.sol/ZetaConnector__factory.ts +++ /dev/null @@ -1,71 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ - -import { Contract, Signer, utils } from "ethers"; -import type { Provider } from "@ethersproject/providers"; -import type { - ZetaConnector, - ZetaConnectorInterface, -} from "../../../../contracts/interfaces/ZetaInterfaces.sol/ZetaConnector"; - -const _abi = [ - { - inputs: [ - { - components: [ - { - internalType: "uint256", - name: "destinationChainId", - type: "uint256", - }, - { - internalType: "bytes", - name: "destinationAddress", - type: "bytes", - }, - { - internalType: "uint256", - name: "destinationGasLimit", - type: "uint256", - }, - { - internalType: "bytes", - name: "message", - type: "bytes", - }, - { - internalType: "uint256", - name: "zetaValueAndGas", - type: "uint256", - }, - { - internalType: "bytes", - name: "zetaParams", - type: "bytes", - }, - ], - internalType: "struct ZetaInterfaces.SendInput", - name: "input", - type: "tuple", - }, - ], - name: "send", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, -]; - -export class ZetaConnector__factory { - static readonly abi = _abi; - static createInterface(): ZetaConnectorInterface { - return new utils.Interface(_abi) as ZetaConnectorInterface; - } - static connect( - address: string, - signerOrProvider: Signer | Provider - ): ZetaConnector { - return new Contract(address, _abi, signerOrProvider) as ZetaConnector; - } -} diff --git a/packages/interfaces/typechain-types/factories/contracts/interfaces/ZetaInterfaces.sol/ZetaReceiver__factory.ts b/packages/interfaces/typechain-types/factories/contracts/interfaces/ZetaInterfaces.sol/ZetaReceiver__factory.ts deleted file mode 100644 index 174e14a4..00000000 --- a/packages/interfaces/typechain-types/factories/contracts/interfaces/ZetaInterfaces.sol/ZetaReceiver__factory.ts +++ /dev/null @@ -1,111 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ - -import { Contract, Signer, utils } from "ethers"; -import type { Provider } from "@ethersproject/providers"; -import type { - ZetaReceiver, - ZetaReceiverInterface, -} from "../../../../contracts/interfaces/ZetaInterfaces.sol/ZetaReceiver"; - -const _abi = [ - { - inputs: [ - { - components: [ - { - internalType: "bytes", - name: "zetaTxSenderAddress", - type: "bytes", - }, - { - internalType: "uint256", - name: "sourceChainId", - type: "uint256", - }, - { - internalType: "address", - name: "destinationAddress", - type: "address", - }, - { - internalType: "uint256", - name: "zetaValue", - type: "uint256", - }, - { - internalType: "bytes", - name: "message", - type: "bytes", - }, - ], - internalType: "struct ZetaInterfaces.ZetaMessage", - name: "zetaMessage", - type: "tuple", - }, - ], - name: "onZetaMessage", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - components: [ - { - internalType: "address", - name: "zetaTxSenderAddress", - type: "address", - }, - { - internalType: "uint256", - name: "sourceChainId", - type: "uint256", - }, - { - internalType: "bytes", - name: "destinationAddress", - type: "bytes", - }, - { - internalType: "uint256", - name: "destinationChainId", - type: "uint256", - }, - { - internalType: "uint256", - name: "remainingZetaValue", - type: "uint256", - }, - { - internalType: "bytes", - name: "message", - type: "bytes", - }, - ], - internalType: "struct ZetaInterfaces.ZetaRevert", - name: "zetaRevert", - type: "tuple", - }, - ], - name: "onZetaRevert", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, -]; - -export class ZetaReceiver__factory { - static readonly abi = _abi; - static createInterface(): ZetaReceiverInterface { - return new utils.Interface(_abi) as ZetaReceiverInterface; - } - static connect( - address: string, - signerOrProvider: Signer | Provider - ): ZetaReceiver { - return new Contract(address, _abi, signerOrProvider) as ZetaReceiver; - } -} diff --git a/packages/interfaces/typechain-types/factories/contracts/interfaces/ZetaInterfaces.sol/ZetaTokenConsumer__factory.ts b/packages/interfaces/typechain-types/factories/contracts/interfaces/ZetaInterfaces.sol/ZetaTokenConsumer__factory.ts deleted file mode 100644 index f325f41a..00000000 --- a/packages/interfaces/typechain-types/factories/contracts/interfaces/ZetaInterfaces.sol/ZetaTokenConsumer__factory.ts +++ /dev/null @@ -1,235 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ - -import { Contract, Signer, utils } from "ethers"; -import type { Provider } from "@ethersproject/providers"; -import type { - ZetaTokenConsumer, - ZetaTokenConsumerInterface, -} from "../../../../contracts/interfaces/ZetaInterfaces.sol/ZetaTokenConsumer"; - -const _abi = [ - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: "uint256", - name: "amountIn", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "amountOut", - type: "uint256", - }, - ], - name: "EthExchangedForZeta", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: "address", - name: "token", - type: "address", - }, - { - indexed: false, - internalType: "uint256", - name: "amountIn", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "amountOut", - type: "uint256", - }, - ], - name: "TokenExchangedForZeta", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: "uint256", - name: "amountIn", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "amountOut", - type: "uint256", - }, - ], - name: "ZetaExchangedForEth", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: "address", - name: "token", - type: "address", - }, - { - indexed: false, - internalType: "uint256", - name: "amountIn", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "amountOut", - type: "uint256", - }, - ], - name: "ZetaExchangedForToken", - type: "event", - }, - { - inputs: [ - { - internalType: "address", - name: "destinationAddress", - type: "address", - }, - { - internalType: "uint256", - name: "minAmountOut", - type: "uint256", - }, - { - internalType: "uint256", - name: "zetaTokenAmount", - type: "uint256", - }, - ], - name: "getEthFromZeta", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "destinationAddress", - type: "address", - }, - { - internalType: "uint256", - name: "minAmountOut", - type: "uint256", - }, - { - internalType: "address", - name: "outputToken", - type: "address", - }, - { - internalType: "uint256", - name: "zetaTokenAmount", - type: "uint256", - }, - ], - name: "getTokenFromZeta", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "destinationAddress", - type: "address", - }, - { - internalType: "uint256", - name: "minAmountOut", - type: "uint256", - }, - ], - name: "getZetaFromEth", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "payable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "destinationAddress", - type: "address", - }, - { - internalType: "uint256", - name: "minAmountOut", - type: "uint256", - }, - { - internalType: "address", - name: "inputToken", - type: "address", - }, - { - internalType: "uint256", - name: "inputTokenAmount", - type: "uint256", - }, - ], - name: "getZetaFromToken", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "nonpayable", - type: "function", - }, -]; - -export class ZetaTokenConsumer__factory { - static readonly abi = _abi; - static createInterface(): ZetaTokenConsumerInterface { - return new utils.Interface(_abi) as ZetaTokenConsumerInterface; - } - static connect( - address: string, - signerOrProvider: Signer | Provider - ): ZetaTokenConsumer { - return new Contract(address, _abi, signerOrProvider) as ZetaTokenConsumer; - } -} diff --git a/packages/interfaces/typechain-types/factories/contracts/interfaces/ZetaInterfaces.sol/index.ts b/packages/interfaces/typechain-types/factories/contracts/interfaces/ZetaInterfaces.sol/index.ts deleted file mode 100644 index 7dd58379..00000000 --- a/packages/interfaces/typechain-types/factories/contracts/interfaces/ZetaInterfaces.sol/index.ts +++ /dev/null @@ -1,7 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ -export { ZetaCommonErrors__factory } from "./ZetaCommonErrors__factory"; -export { ZetaConnector__factory } from "./ZetaConnector__factory"; -export { ZetaReceiver__factory } from "./ZetaReceiver__factory"; -export { ZetaTokenConsumer__factory } from "./ZetaTokenConsumer__factory"; diff --git a/packages/interfaces/typechain-types/factories/contracts/interfaces/ZetaNonEthInterface__factory.ts b/packages/interfaces/typechain-types/factories/contracts/interfaces/ZetaNonEthInterface__factory.ts deleted file mode 100644 index 366b8ca3..00000000 --- a/packages/interfaces/typechain-types/factories/contracts/interfaces/ZetaNonEthInterface__factory.ts +++ /dev/null @@ -1,250 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ - -import { Contract, Signer, utils } from "ethers"; -import type { Provider } from "@ethersproject/providers"; -import type { - ZetaNonEthInterface, - ZetaNonEthInterfaceInterface, -} from "../../../contracts/interfaces/ZetaNonEthInterface"; - -const _abi = [ - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "address", - name: "owner", - type: "address", - }, - { - indexed: true, - internalType: "address", - name: "spender", - type: "address", - }, - { - indexed: false, - internalType: "uint256", - name: "value", - type: "uint256", - }, - ], - name: "Approval", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "address", - name: "from", - type: "address", - }, - { - indexed: true, - internalType: "address", - name: "to", - type: "address", - }, - { - indexed: false, - internalType: "uint256", - name: "value", - type: "uint256", - }, - ], - name: "Transfer", - type: "event", - }, - { - inputs: [ - { - internalType: "address", - name: "owner", - type: "address", - }, - { - internalType: "address", - name: "spender", - type: "address", - }, - ], - name: "allowance", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "spender", - type: "address", - }, - { - internalType: "uint256", - name: "amount", - type: "uint256", - }, - ], - name: "approve", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "account", - type: "address", - }, - ], - name: "balanceOf", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "account", - type: "address", - }, - { - internalType: "uint256", - name: "amount", - type: "uint256", - }, - ], - name: "burnFrom", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "mintee", - type: "address", - }, - { - internalType: "uint256", - name: "value", - type: "uint256", - }, - { - internalType: "bytes32", - name: "internalSendHash", - type: "bytes32", - }, - ], - name: "mint", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "totalSupply", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "to", - type: "address", - }, - { - internalType: "uint256", - name: "amount", - type: "uint256", - }, - ], - name: "transfer", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "from", - type: "address", - }, - { - internalType: "address", - name: "to", - type: "address", - }, - { - internalType: "uint256", - name: "amount", - type: "uint256", - }, - ], - name: "transferFrom", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "nonpayable", - type: "function", - }, -]; - -export class ZetaNonEthInterface__factory { - static readonly abi = _abi; - static createInterface(): ZetaNonEthInterfaceInterface { - return new utils.Interface(_abi) as ZetaNonEthInterfaceInterface; - } - static connect( - address: string, - signerOrProvider: Signer | Provider - ): ZetaNonEthInterface { - return new Contract(address, _abi, signerOrProvider) as ZetaNonEthInterface; - } -} diff --git a/packages/interfaces/typechain-types/factories/contracts/interfaces/index.ts b/packages/interfaces/typechain-types/factories/contracts/interfaces/index.ts deleted file mode 100644 index 823d3b13..00000000 --- a/packages/interfaces/typechain-types/factories/contracts/interfaces/index.ts +++ /dev/null @@ -1,10 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ -export * as tridentConcentratedLiquidityPoolFactorySol from "./TridentConcentratedLiquidityPoolFactory.sol"; -export * as tridentIPoolRouterSol from "./TridentIPoolRouter.sol"; -export * as zetaInterfacesSol from "./ZetaInterfaces.sol"; -export { ConnectorErrors__factory } from "./ConnectorErrors__factory"; -export { ZetaErrors__factory } from "./ZetaErrors__factory"; -export { ZetaInteractorErrors__factory } from "./ZetaInteractorErrors__factory"; -export { ZetaNonEthInterface__factory } from "./ZetaNonEthInterface__factory"; diff --git a/packages/interfaces/typechain-types/factories/contracts/openzeppelin/Ownable2Step__factory.ts b/packages/interfaces/typechain-types/factories/contracts/openzeppelin/Ownable2Step__factory.ts deleted file mode 100644 index 87a3acfd..00000000 --- a/packages/interfaces/typechain-types/factories/contracts/openzeppelin/Ownable2Step__factory.ts +++ /dev/null @@ -1,117 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ - -import { Contract, Signer, utils } from "ethers"; -import type { Provider } from "@ethersproject/providers"; -import type { - Ownable2Step, - Ownable2StepInterface, -} from "../../../contracts/openzeppelin/Ownable2Step"; - -const _abi = [ - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "address", - name: "previousOwner", - type: "address", - }, - { - indexed: true, - internalType: "address", - name: "newOwner", - type: "address", - }, - ], - name: "OwnershipTransferStarted", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "address", - name: "previousOwner", - type: "address", - }, - { - indexed: true, - internalType: "address", - name: "newOwner", - type: "address", - }, - ], - name: "OwnershipTransferred", - type: "event", - }, - { - inputs: [], - name: "acceptOwnership", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "owner", - outputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "pendingOwner", - outputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "renounceOwnership", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "newOwner", - type: "address", - }, - ], - name: "transferOwnership", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, -]; - -export class Ownable2Step__factory { - static readonly abi = _abi; - static createInterface(): Ownable2StepInterface { - return new utils.Interface(_abi) as Ownable2StepInterface; - } - static connect( - address: string, - signerOrProvider: Signer | Provider - ): Ownable2Step { - return new Contract(address, _abi, signerOrProvider) as Ownable2Step; - } -} diff --git a/packages/interfaces/typechain-types/factories/contracts/openzeppelin/index.ts b/packages/interfaces/typechain-types/factories/contracts/openzeppelin/index.ts deleted file mode 100644 index 19bc8448..00000000 --- a/packages/interfaces/typechain-types/factories/contracts/openzeppelin/index.ts +++ /dev/null @@ -1,4 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ -export { Ownable2Step__factory } from "./Ownable2Step__factory"; diff --git a/packages/interfaces/typechain-types/factories/contracts/testing/TestUniswapV3Contracts.sol/INonfungiblePositionManager__factory.ts b/packages/interfaces/typechain-types/factories/contracts/testing/TestUniswapV3Contracts.sol/INonfungiblePositionManager__factory.ts deleted file mode 100644 index bf097a3f..00000000 --- a/packages/interfaces/typechain-types/factories/contracts/testing/TestUniswapV3Contracts.sol/INonfungiblePositionManager__factory.ts +++ /dev/null @@ -1,461 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ - -import { Contract, Signer, utils } from "ethers"; -import type { Provider } from "@ethersproject/providers"; -import type { - INonfungiblePositionManager, - INonfungiblePositionManagerInterface, -} from "../../../../contracts/testing/TestUniswapV3Contracts.sol/INonfungiblePositionManager"; - -const _abi = [ - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "uint256", - name: "tokenId", - type: "uint256", - }, - { - indexed: false, - internalType: "address", - name: "recipient", - type: "address", - }, - { - indexed: false, - internalType: "uint256", - name: "amount0", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "amount1", - type: "uint256", - }, - ], - name: "Collect", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "uint256", - name: "tokenId", - type: "uint256", - }, - { - indexed: false, - internalType: "uint128", - name: "liquidity", - type: "uint128", - }, - { - indexed: false, - internalType: "uint256", - name: "amount0", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "amount1", - type: "uint256", - }, - ], - name: "DecreaseLiquidity", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "uint256", - name: "tokenId", - type: "uint256", - }, - { - indexed: false, - internalType: "uint128", - name: "liquidity", - type: "uint128", - }, - { - indexed: false, - internalType: "uint256", - name: "amount0", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "amount1", - type: "uint256", - }, - ], - name: "IncreaseLiquidity", - type: "event", - }, - { - inputs: [ - { - internalType: "uint256", - name: "tokenId", - type: "uint256", - }, - ], - name: "burn", - outputs: [], - stateMutability: "payable", - type: "function", - }, - { - inputs: [ - { - components: [ - { - internalType: "uint256", - name: "tokenId", - type: "uint256", - }, - { - internalType: "address", - name: "recipient", - type: "address", - }, - { - internalType: "uint128", - name: "amount0Max", - type: "uint128", - }, - { - internalType: "uint128", - name: "amount1Max", - type: "uint128", - }, - ], - internalType: "struct INonfungiblePositionManager.CollectParams", - name: "params", - type: "tuple", - }, - ], - name: "collect", - outputs: [ - { - internalType: "uint256", - name: "amount0", - type: "uint256", - }, - { - internalType: "uint256", - name: "amount1", - type: "uint256", - }, - ], - stateMutability: "payable", - type: "function", - }, - { - inputs: [ - { - components: [ - { - internalType: "uint256", - name: "tokenId", - type: "uint256", - }, - { - internalType: "uint128", - name: "liquidity", - type: "uint128", - }, - { - internalType: "uint256", - name: "amount0Min", - type: "uint256", - }, - { - internalType: "uint256", - name: "amount1Min", - type: "uint256", - }, - { - internalType: "uint256", - name: "deadline", - type: "uint256", - }, - ], - internalType: - "struct INonfungiblePositionManager.DecreaseLiquidityParams", - name: "params", - type: "tuple", - }, - ], - name: "decreaseLiquidity", - outputs: [ - { - internalType: "uint256", - name: "amount0", - type: "uint256", - }, - { - internalType: "uint256", - name: "amount1", - type: "uint256", - }, - ], - stateMutability: "payable", - type: "function", - }, - { - inputs: [ - { - components: [ - { - internalType: "uint256", - name: "tokenId", - type: "uint256", - }, - { - internalType: "uint256", - name: "amount0Desired", - type: "uint256", - }, - { - internalType: "uint256", - name: "amount1Desired", - type: "uint256", - }, - { - internalType: "uint256", - name: "amount0Min", - type: "uint256", - }, - { - internalType: "uint256", - name: "amount1Min", - type: "uint256", - }, - { - internalType: "uint256", - name: "deadline", - type: "uint256", - }, - ], - internalType: - "struct INonfungiblePositionManager.IncreaseLiquidityParams", - name: "params", - type: "tuple", - }, - ], - name: "increaseLiquidity", - outputs: [ - { - internalType: "uint128", - name: "liquidity", - type: "uint128", - }, - { - internalType: "uint256", - name: "amount0", - type: "uint256", - }, - { - internalType: "uint256", - name: "amount1", - type: "uint256", - }, - ], - stateMutability: "payable", - type: "function", - }, - { - inputs: [ - { - components: [ - { - internalType: "address", - name: "token0", - type: "address", - }, - { - internalType: "address", - name: "token1", - type: "address", - }, - { - internalType: "uint24", - name: "fee", - type: "uint24", - }, - { - internalType: "int24", - name: "tickLower", - type: "int24", - }, - { - internalType: "int24", - name: "tickUpper", - type: "int24", - }, - { - internalType: "uint256", - name: "amount0Desired", - type: "uint256", - }, - { - internalType: "uint256", - name: "amount1Desired", - type: "uint256", - }, - { - internalType: "uint256", - name: "amount0Min", - type: "uint256", - }, - { - internalType: "uint256", - name: "amount1Min", - type: "uint256", - }, - { - internalType: "address", - name: "recipient", - type: "address", - }, - { - internalType: "uint256", - name: "deadline", - type: "uint256", - }, - ], - internalType: "struct INonfungiblePositionManager.MintParams", - name: "params", - type: "tuple", - }, - ], - name: "mint", - outputs: [ - { - internalType: "uint256", - name: "tokenId", - type: "uint256", - }, - { - internalType: "uint128", - name: "liquidity", - type: "uint128", - }, - { - internalType: "uint256", - name: "amount0", - type: "uint256", - }, - { - internalType: "uint256", - name: "amount1", - type: "uint256", - }, - ], - stateMutability: "payable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "tokenId", - type: "uint256", - }, - ], - name: "positions", - outputs: [ - { - internalType: "uint96", - name: "nonce", - type: "uint96", - }, - { - internalType: "address", - name: "operator", - type: "address", - }, - { - internalType: "address", - name: "token0", - type: "address", - }, - { - internalType: "address", - name: "token1", - type: "address", - }, - { - internalType: "uint24", - name: "fee", - type: "uint24", - }, - { - internalType: "int24", - name: "tickLower", - type: "int24", - }, - { - internalType: "int24", - name: "tickUpper", - type: "int24", - }, - { - internalType: "uint128", - name: "liquidity", - type: "uint128", - }, - { - internalType: "uint256", - name: "feeGrowthInside0LastX128", - type: "uint256", - }, - { - internalType: "uint256", - name: "feeGrowthInside1LastX128", - type: "uint256", - }, - { - internalType: "uint128", - name: "tokensOwed0", - type: "uint128", - }, - { - internalType: "uint128", - name: "tokensOwed1", - type: "uint128", - }, - ], - stateMutability: "view", - type: "function", - }, -]; - -export class INonfungiblePositionManager__factory { - static readonly abi = _abi; - static createInterface(): INonfungiblePositionManagerInterface { - return new utils.Interface(_abi) as INonfungiblePositionManagerInterface; - } - static connect( - address: string, - signerOrProvider: Signer | Provider - ): INonfungiblePositionManager { - return new Contract( - address, - _abi, - signerOrProvider - ) as INonfungiblePositionManager; - } -} diff --git a/packages/interfaces/typechain-types/factories/contracts/testing/TestUniswapV3Contracts.sol/IPoolInitializer__factory.ts b/packages/interfaces/typechain-types/factories/contracts/testing/TestUniswapV3Contracts.sol/IPoolInitializer__factory.ts deleted file mode 100644 index 9081a53e..00000000 --- a/packages/interfaces/typechain-types/factories/contracts/testing/TestUniswapV3Contracts.sol/IPoolInitializer__factory.ts +++ /dev/null @@ -1,60 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ - -import { Contract, Signer, utils } from "ethers"; -import type { Provider } from "@ethersproject/providers"; -import type { - IPoolInitializer, - IPoolInitializerInterface, -} from "../../../../contracts/testing/TestUniswapV3Contracts.sol/IPoolInitializer"; - -const _abi = [ - { - inputs: [ - { - internalType: "address", - name: "token0", - type: "address", - }, - { - internalType: "address", - name: "token1", - type: "address", - }, - { - internalType: "uint24", - name: "fee", - type: "uint24", - }, - { - internalType: "uint160", - name: "sqrtPriceX96", - type: "uint160", - }, - ], - name: "createAndInitializePoolIfNecessary", - outputs: [ - { - internalType: "address", - name: "pool", - type: "address", - }, - ], - stateMutability: "payable", - type: "function", - }, -]; - -export class IPoolInitializer__factory { - static readonly abi = _abi; - static createInterface(): IPoolInitializerInterface { - return new utils.Interface(_abi) as IPoolInitializerInterface; - } - static connect( - address: string, - signerOrProvider: Signer | Provider - ): IPoolInitializer { - return new Contract(address, _abi, signerOrProvider) as IPoolInitializer; - } -} diff --git a/packages/interfaces/typechain-types/factories/contracts/testing/TestUniswapV3Contracts.sol/index.ts b/packages/interfaces/typechain-types/factories/contracts/testing/TestUniswapV3Contracts.sol/index.ts deleted file mode 100644 index 9db2e56f..00000000 --- a/packages/interfaces/typechain-types/factories/contracts/testing/TestUniswapV3Contracts.sol/index.ts +++ /dev/null @@ -1,5 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ -export { INonfungiblePositionManager__factory } from "./INonfungiblePositionManager__factory"; -export { IPoolInitializer__factory } from "./IPoolInitializer__factory"; diff --git a/packages/interfaces/typechain-types/factories/contracts/testing/ZetaInteractorMock__factory.ts b/packages/interfaces/typechain-types/factories/contracts/testing/ZetaInteractorMock__factory.ts deleted file mode 100644 index a344caf7..00000000 --- a/packages/interfaces/typechain-types/factories/contracts/testing/ZetaInteractorMock__factory.ts +++ /dev/null @@ -1,335 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ -import { Signer, utils, Contract, ContractFactory, Overrides } from "ethers"; -import type { Provider, TransactionRequest } from "@ethersproject/providers"; -import type { - ZetaInteractorMock, - ZetaInteractorMockInterface, -} from "../../../contracts/testing/ZetaInteractorMock"; - -const _abi = [ - { - inputs: [ - { - internalType: "address", - name: "zetaConnectorAddress", - type: "address", - }, - ], - stateMutability: "nonpayable", - type: "constructor", - }, - { - inputs: [], - name: "InvalidAddress", - type: "error", - }, - { - inputs: [ - { - internalType: "address", - name: "caller", - type: "address", - }, - ], - name: "InvalidCaller", - type: "error", - }, - { - inputs: [], - name: "InvalidDestinationChainId", - type: "error", - }, - { - inputs: [], - name: "InvalidZetaMessageCall", - type: "error", - }, - { - inputs: [], - name: "InvalidZetaRevertCall", - type: "error", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "address", - name: "previousOwner", - type: "address", - }, - { - indexed: true, - internalType: "address", - name: "newOwner", - type: "address", - }, - ], - name: "OwnershipTransferStarted", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "address", - name: "previousOwner", - type: "address", - }, - { - indexed: true, - internalType: "address", - name: "newOwner", - type: "address", - }, - ], - name: "OwnershipTransferred", - type: "event", - }, - { - inputs: [], - name: "acceptOwnership", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "connector", - outputs: [ - { - internalType: "contract ZetaConnector", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - name: "interactorsByChainId", - outputs: [ - { - internalType: "bytes", - name: "", - type: "bytes", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - components: [ - { - internalType: "bytes", - name: "zetaTxSenderAddress", - type: "bytes", - }, - { - internalType: "uint256", - name: "sourceChainId", - type: "uint256", - }, - { - internalType: "address", - name: "destinationAddress", - type: "address", - }, - { - internalType: "uint256", - name: "zetaValue", - type: "uint256", - }, - { - internalType: "bytes", - name: "message", - type: "bytes", - }, - ], - internalType: "struct ZetaInterfaces.ZetaMessage", - name: "zetaMessage", - type: "tuple", - }, - ], - name: "onZetaMessage", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - components: [ - { - internalType: "address", - name: "zetaTxSenderAddress", - type: "address", - }, - { - internalType: "uint256", - name: "sourceChainId", - type: "uint256", - }, - { - internalType: "bytes", - name: "destinationAddress", - type: "bytes", - }, - { - internalType: "uint256", - name: "destinationChainId", - type: "uint256", - }, - { - internalType: "uint256", - name: "remainingZetaValue", - type: "uint256", - }, - { - internalType: "bytes", - name: "message", - type: "bytes", - }, - ], - internalType: "struct ZetaInterfaces.ZetaRevert", - name: "zetaRevert", - type: "tuple", - }, - ], - name: "onZetaRevert", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "owner", - outputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "pendingOwner", - outputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "renounceOwnership", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "destinationChainId", - type: "uint256", - }, - { - internalType: "bytes", - name: "contractAddress", - type: "bytes", - }, - ], - name: "setInteractorByChainId", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "newOwner", - type: "address", - }, - ], - name: "transferOwnership", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, -]; - -const _bytecode = - "0x60c06040523480156200001157600080fd5b506040516200123c3803806200123c833981810160405281019062000037919062000228565b80620000586200004c6200010760201b60201c565b6200010f60201b60201c565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415620000c0576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b46608081815250508073ffffffffffffffffffffffffffffffffffffffff1660a08173ffffffffffffffffffffffffffffffffffffffff1660601b815250505050620002ad565b600033905090565b600160006101000a81549073ffffffffffffffffffffffffffffffffffffffff02191690556200014a816200014d60201b620005bd1760201c565b50565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050816000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b600081519050620002228162000293565b92915050565b6000602082840312156200024157620002406200028e565b5b6000620002518482850162000211565b91505092915050565b600062000267826200026e565b9050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600080fd5b6200029e816200025a565b8114620002aa57600080fd5b50565b60805160a05160601c610f5f620002dd6000396000818161049b0152610683015260006103690152610f5f6000f3fe608060405234801561001057600080fd5b506004361061009e5760003560e01c806379ba50971161006657806379ba50971461013157806383f3084f1461013b5780638da5cb5b14610159578063e30c397814610177578063f2fde38b146101955761009e565b80632618143f146100a35780633749c51a146100d35780633ff0693c146100ef5780634fd3f7d71461010b578063715018a614610127575b600080fd5b6100bd60048036038101906100b891906109ea565b6101b1565b6040516100ca9190610c03565b60405180910390f35b6100ed60048036038101906100e89190610958565b610251565b005b610109600480360381019061010491906109a1565b6102e7565b005b61012560048036038101906101209190610a17565b6103c8565b005b61012f6103f8565b005b61013961040c565b005b610143610499565b6040516101509190610c25565b60405180910390f35b6101616104bd565b60405161016e9190610be8565b60405180910390f35b61017f6104e6565b60405161018c9190610be8565b60405180910390f35b6101af60048036038101906101aa919061092b565b610510565b005b600260205280600052604060002060009150905080546101d090610de4565b80601f01602080910402602001604051908101604052809291908181526020018280546101fc90610de4565b80156102495780601f1061021e57610100808354040283529160200191610249565b820191906000526020600020905b81548152906001019060200180831161022c57829003601f168201915b505050505081565b8061025a610681565b600260008260200135815260200190815260200160002060405161027e9190610bd1565b60405180910390208180600001906102969190610c80565b6040516102a4929190610bb8565b6040518091039020146102e3576040517fb473eb0a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5050565b806102f0610681565b3073ffffffffffffffffffffffffffffffffffffffff1681600001602081019061031a919061092b565b73ffffffffffffffffffffffffffffffffffffffff1614610367576040517fc03e9c3f00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b7f00000000000000000000000000000000000000000000000000000000000000008160200135146103c4576040517fc03e9c3f00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5050565b6103d0610713565b81816002600086815260200190815260200160002091906103f29291906107ca565b50505050565b610400610713565b61040a6000610791565b565b60006104166107c2565b90508073ffffffffffffffffffffffffffffffffffffffff166104376104e6565b73ffffffffffffffffffffffffffffffffffffffff161461048d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161048490610c40565b60405180910390fd5b61049681610791565b50565b7f000000000000000000000000000000000000000000000000000000000000000081565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b6000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b610518610713565b80600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508073ffffffffffffffffffffffffffffffffffffffff166105786104bd565b73ffffffffffffffffffffffffffffffffffffffff167f38d16b8cac22d99fc7c124b9cd0de2d3fa1faef420bfe791d8c362d765e2270060405160405180910390a350565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050816000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461071157336040517fcbd9d2e00000000000000000000000000000000000000000000000000000000081526004016107089190610be8565b60405180910390fd5b565b61071b6107c2565b73ffffffffffffffffffffffffffffffffffffffff166107396104bd565b73ffffffffffffffffffffffffffffffffffffffff161461078f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161078690610c60565b60405180910390fd5b565b600160006101000a81549073ffffffffffffffffffffffffffffffffffffffff02191690556107bf816105bd565b50565b600033905090565b8280546107d690610de4565b90600052602060002090601f0160209004810192826107f8576000855561083f565b82601f1061081157803560ff191683800117855561083f565b8280016001018555821561083f579182015b8281111561083e578235825591602001919060010190610823565b5b50905061084c9190610850565b5090565b5b80821115610869576000816000905550600101610851565b5090565b60008135905061087c81610efb565b92915050565b60008083601f84011261089857610897610e4a565b5b8235905067ffffffffffffffff8111156108b5576108b4610e45565b5b6020830191508360018202830111156108d1576108d0610e5e565b5b9250929050565b600060a082840312156108ee576108ed610e54565b5b81905092915050565b600060c0828403121561090d5761090c610e54565b5b81905092915050565b60008135905061092581610f12565b92915050565b60006020828403121561094157610940610e6d565b5b600061094f8482850161086d565b91505092915050565b60006020828403121561096e5761096d610e6d565b5b600082013567ffffffffffffffff81111561098c5761098b610e68565b5b610998848285016108d8565b91505092915050565b6000602082840312156109b7576109b6610e6d565b5b600082013567ffffffffffffffff8111156109d5576109d4610e68565b5b6109e1848285016108f7565b91505092915050565b600060208284031215610a00576109ff610e6d565b5b6000610a0e84828501610916565b91505092915050565b600080600060408486031215610a3057610a2f610e6d565b5b6000610a3e86828701610916565b935050602084013567ffffffffffffffff811115610a5f57610a5e610e68565b5b610a6b86828701610882565b92509250509250925092565b610a8081610d30565b82525050565b6000610a928385610d14565b9350610a9f838584610da2565b82840190509392505050565b6000610ab682610cf8565b610ac08185610d03565b9350610ad0818560208601610db1565b610ad981610e72565b840191505092915050565b60008154610af181610de4565b610afb8186610d14565b94506001821660008114610b165760018114610b2757610b5a565b60ff19831686528186019350610b5a565b610b3085610ce3565b60005b83811015610b5257815481890152600182019150602081019050610b33565b838801955050505b50505092915050565b610b6c81610d6c565b82525050565b6000610b7f602983610d1f565b9150610b8a82610e83565b604082019050919050565b6000610ba2602083610d1f565b9150610bad82610ed2565b602082019050919050565b6000610bc5828486610a86565b91508190509392505050565b6000610bdd8284610ae4565b915081905092915050565b6000602082019050610bfd6000830184610a77565b92915050565b60006020820190508181036000830152610c1d8184610aab565b905092915050565b6000602082019050610c3a6000830184610b63565b92915050565b60006020820190508181036000830152610c5981610b72565b9050919050565b60006020820190508181036000830152610c7981610b95565b9050919050565b60008083356001602003843603038112610c9d57610c9c610e59565b5b80840192508235915067ffffffffffffffff821115610cbf57610cbe610e4f565b5b602083019250600182023603831315610cdb57610cda610e63565b5b509250929050565b60008190508160005260206000209050919050565b600081519050919050565b600082825260208201905092915050565b600081905092915050565b600082825260208201905092915050565b6000610d3b82610d42565b9050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b6000610d7782610d7e565b9050919050565b6000610d8982610d90565b9050919050565b6000610d9b82610d42565b9050919050565b82818337600083830152505050565b60005b83811015610dcf578082015181840152602081019050610db4565b83811115610dde576000848401525b50505050565b60006002820490506001821680610dfc57607f821691505b60208210811415610e1057610e0f610e16565b5b50919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f4f776e61626c6532537465703a2063616c6c6572206973206e6f74207468652060008201527f6e6577206f776e65720000000000000000000000000000000000000000000000602082015250565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b610f0481610d30565b8114610f0f57600080fd5b50565b610f1b81610d62565b8114610f2657600080fd5b5056fea2646970667358221220c968b4310b80d53da5d57a8b75ec93498378e1d9ed40671288aca2faa05871f464736f6c63430008070033"; - -type ZetaInteractorMockConstructorParams = - | [signer?: Signer] - | ConstructorParameters; - -const isSuperArgs = ( - xs: ZetaInteractorMockConstructorParams -): xs is ConstructorParameters => xs.length > 1; - -export class ZetaInteractorMock__factory extends ContractFactory { - constructor(...args: ZetaInteractorMockConstructorParams) { - if (isSuperArgs(args)) { - super(...args); - } else { - super(_abi, _bytecode, args[0]); - } - } - - override deploy( - zetaConnectorAddress: string, - overrides?: Overrides & { from?: string | Promise } - ): Promise { - return super.deploy( - zetaConnectorAddress, - overrides || {} - ) as Promise; - } - override getDeployTransaction( - zetaConnectorAddress: string, - overrides?: Overrides & { from?: string | Promise } - ): TransactionRequest { - return super.getDeployTransaction(zetaConnectorAddress, overrides || {}); - } - override attach(address: string): ZetaInteractorMock { - return super.attach(address) as ZetaInteractorMock; - } - override connect(signer: Signer): ZetaInteractorMock__factory { - return super.connect(signer) as ZetaInteractorMock__factory; - } - - static readonly bytecode = _bytecode; - static readonly abi = _abi; - static createInterface(): ZetaInteractorMockInterface { - return new utils.Interface(_abi) as ZetaInteractorMockInterface; - } - static connect( - address: string, - signerOrProvider: Signer | Provider - ): ZetaInteractorMock { - return new Contract(address, _abi, signerOrProvider) as ZetaInteractorMock; - } -} diff --git a/packages/interfaces/typechain-types/factories/contracts/testing/ZetaReceiverMock__factory.ts b/packages/interfaces/typechain-types/factories/contracts/testing/ZetaReceiverMock__factory.ts deleted file mode 100644 index ac0984b9..00000000 --- a/packages/interfaces/typechain-types/factories/contracts/testing/ZetaReceiverMock__factory.ts +++ /dev/null @@ -1,173 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ -import { Signer, utils, Contract, ContractFactory, Overrides } from "ethers"; -import type { Provider, TransactionRequest } from "@ethersproject/providers"; -import type { - ZetaReceiverMock, - ZetaReceiverMockInterface, -} from "../../../contracts/testing/ZetaReceiverMock"; - -const _abi = [ - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: "address", - name: "destinationAddress", - type: "address", - }, - ], - name: "MockOnZetaMessage", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: "address", - name: "zetaTxSenderAddress", - type: "address", - }, - ], - name: "MockOnZetaRevert", - type: "event", - }, - { - inputs: [ - { - components: [ - { - internalType: "bytes", - name: "zetaTxSenderAddress", - type: "bytes", - }, - { - internalType: "uint256", - name: "sourceChainId", - type: "uint256", - }, - { - internalType: "address", - name: "destinationAddress", - type: "address", - }, - { - internalType: "uint256", - name: "zetaValue", - type: "uint256", - }, - { - internalType: "bytes", - name: "message", - type: "bytes", - }, - ], - internalType: "struct ZetaInterfaces.ZetaMessage", - name: "zetaMessage", - type: "tuple", - }, - ], - name: "onZetaMessage", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - components: [ - { - internalType: "address", - name: "zetaTxSenderAddress", - type: "address", - }, - { - internalType: "uint256", - name: "sourceChainId", - type: "uint256", - }, - { - internalType: "bytes", - name: "destinationAddress", - type: "bytes", - }, - { - internalType: "uint256", - name: "destinationChainId", - type: "uint256", - }, - { - internalType: "uint256", - name: "remainingZetaValue", - type: "uint256", - }, - { - internalType: "bytes", - name: "message", - type: "bytes", - }, - ], - internalType: "struct ZetaInterfaces.ZetaRevert", - name: "zetaRevert", - type: "tuple", - }, - ], - name: "onZetaRevert", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, -]; - -const _bytecode = - "0x608060405234801561001057600080fd5b506102d5806100206000396000f3fe608060405234801561001057600080fd5b50600436106100365760003560e01c80633749c51a1461003b5780633ff0693c14610057575b600080fd5b6100556004803603810190610050919061018b565b610073565b005b610071600480360381019061006c91906101d4565b6100bf565b005b7f72a301dee3abcbe15615f3e253229bf4b4f508460603d674991c9a777b833c6e8160400160208101906100a7919061015e565b6040516100b4919061022c565b60405180910390a150565b7f53bd04e26f94f13ff43da96839541821041c309c6f624712192cbe3a2d133cc48160000160208101906100f3919061015e565b604051610100919061022c565b60405180910390a150565b60008135905061011a81610288565b92915050565b600060a0828403121561013657610135610279565b5b81905092915050565b600060c0828403121561015557610154610279565b5b81905092915050565b60006020828403121561017457610173610283565b5b60006101828482850161010b565b91505092915050565b6000602082840312156101a1576101a0610283565b5b600082013567ffffffffffffffff8111156101bf576101be61027e565b5b6101cb84828501610120565b91505092915050565b6000602082840312156101ea576101e9610283565b5b600082013567ffffffffffffffff8111156102085761020761027e565b5b6102148482850161013f565b91505092915050565b61022681610247565b82525050565b6000602082019050610241600083018461021d565b92915050565b600061025282610259565b9050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600080fd5b600080fd5b600080fd5b61029181610247565b811461029c57600080fd5b5056fea26469706673582212206d9ab112510099dc99b35fd9426757716b4a84cc69366a29a94f07745edef2cc64736f6c63430008070033"; - -type ZetaReceiverMockConstructorParams = - | [signer?: Signer] - | ConstructorParameters; - -const isSuperArgs = ( - xs: ZetaReceiverMockConstructorParams -): xs is ConstructorParameters => xs.length > 1; - -export class ZetaReceiverMock__factory extends ContractFactory { - constructor(...args: ZetaReceiverMockConstructorParams) { - if (isSuperArgs(args)) { - super(...args); - } else { - super(_abi, _bytecode, args[0]); - } - } - - override deploy( - overrides?: Overrides & { from?: string | Promise } - ): Promise { - return super.deploy(overrides || {}) as Promise; - } - override getDeployTransaction( - overrides?: Overrides & { from?: string | Promise } - ): TransactionRequest { - return super.getDeployTransaction(overrides || {}); - } - override attach(address: string): ZetaReceiverMock { - return super.attach(address) as ZetaReceiverMock; - } - override connect(signer: Signer): ZetaReceiverMock__factory { - return super.connect(signer) as ZetaReceiverMock__factory; - } - - static readonly bytecode = _bytecode; - static readonly abi = _abi; - static createInterface(): ZetaReceiverMockInterface { - return new utils.Interface(_abi) as ZetaReceiverMockInterface; - } - static connect( - address: string, - signerOrProvider: Signer | Provider - ): ZetaReceiverMock { - return new Contract(address, _abi, signerOrProvider) as ZetaReceiverMock; - } -} diff --git a/packages/interfaces/typechain-types/factories/contracts/testing/index.ts b/packages/interfaces/typechain-types/factories/contracts/testing/index.ts deleted file mode 100644 index 32ab8513..00000000 --- a/packages/interfaces/typechain-types/factories/contracts/testing/index.ts +++ /dev/null @@ -1,6 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ -export * as testUniswapV3ContractsSol from "./TestUniswapV3Contracts.sol"; -export { ZetaInteractorMock__factory } from "./ZetaInteractorMock__factory"; -export { ZetaReceiverMock__factory } from "./ZetaReceiverMock__factory"; diff --git a/packages/interfaces/typechain-types/factories/index.ts b/packages/interfaces/typechain-types/factories/index.ts deleted file mode 100644 index 3eb87854..00000000 --- a/packages/interfaces/typechain-types/factories/index.ts +++ /dev/null @@ -1,6 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ -export * as openzeppelin from "./@openzeppelin"; -export * as uniswap from "./@uniswap"; -export * as contracts from "./contracts"; diff --git a/packages/interfaces/typechain-types/hardhat.d.ts b/packages/interfaces/typechain-types/hardhat.d.ts deleted file mode 100644 index f6d041f6..00000000 --- a/packages/interfaces/typechain-types/hardhat.d.ts +++ /dev/null @@ -1,465 +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: "Ownable", - signerOrOptions?: ethers.Signer | FactoryOptions - ): Promise; - getContractFactory( - name: "Pausable", - signerOrOptions?: ethers.Signer | FactoryOptions - ): Promise; - getContractFactory( - name: "ERC20", - signerOrOptions?: ethers.Signer | FactoryOptions - ): Promise; - getContractFactory( - name: "IERC20Permit", - signerOrOptions?: ethers.Signer | FactoryOptions - ): Promise; - getContractFactory( - name: "ERC20Burnable", - signerOrOptions?: ethers.Signer | FactoryOptions - ): Promise; - getContractFactory( - name: "IERC20Metadata", - signerOrOptions?: ethers.Signer | FactoryOptions - ): Promise; - getContractFactory( - name: "IERC20", - signerOrOptions?: ethers.Signer | FactoryOptions - ): Promise; - getContractFactory( - name: "IUniswapV2Factory", - signerOrOptions?: ethers.Signer | FactoryOptions - ): Promise; - getContractFactory( - name: "IUniswapV2Pair", - signerOrOptions?: ethers.Signer | FactoryOptions - ): Promise; - getContractFactory( - name: "IERC20", - signerOrOptions?: ethers.Signer | FactoryOptions - ): Promise; - getContractFactory( - name: "IUniswapV2Router01", - signerOrOptions?: ethers.Signer | FactoryOptions - ): Promise; - getContractFactory( - name: "IUniswapV2Router02", - signerOrOptions?: ethers.Signer | FactoryOptions - ): Promise; - getContractFactory( - name: "IWETH", - signerOrOptions?: ethers.Signer | FactoryOptions - ): Promise; - getContractFactory( - name: "UniswapV2Router02", - signerOrOptions?: ethers.Signer | FactoryOptions - ): Promise; - getContractFactory( - name: "IUniswapV3SwapCallback", - signerOrOptions?: ethers.Signer | FactoryOptions - ): Promise; - getContractFactory( - name: "IQuoter", - signerOrOptions?: ethers.Signer | FactoryOptions - ): Promise; - getContractFactory( - name: "ISwapRouter", - signerOrOptions?: ethers.Signer | FactoryOptions - ): Promise; - getContractFactory( - name: "ImmutableCreate2Factory", - signerOrOptions?: ethers.Signer | FactoryOptions - ): Promise; - getContractFactory( - name: "Ownable", - signerOrOptions?: ethers.Signer | FactoryOptions - ): Promise; - getContractFactory( - name: "ConnectorErrors", - signerOrOptions?: ethers.Signer | FactoryOptions - ): Promise; - getContractFactory( - name: "ConcentratedLiquidityPoolFactory", - signerOrOptions?: ethers.Signer | FactoryOptions - ): Promise; - getContractFactory( - name: "IPoolRouter", - signerOrOptions?: ethers.Signer | FactoryOptions - ): Promise; - getContractFactory( - name: "ZetaErrors", - signerOrOptions?: ethers.Signer | FactoryOptions - ): Promise; - getContractFactory( - name: "ZetaInteractorErrors", - signerOrOptions?: ethers.Signer | FactoryOptions - ): Promise; - getContractFactory( - name: "ZetaCommonErrors", - signerOrOptions?: ethers.Signer | FactoryOptions - ): Promise; - getContractFactory( - name: "ZetaConnector", - signerOrOptions?: ethers.Signer | FactoryOptions - ): Promise; - getContractFactory( - name: "ZetaReceiver", - signerOrOptions?: ethers.Signer | FactoryOptions - ): Promise; - getContractFactory( - name: "ZetaTokenConsumer", - signerOrOptions?: ethers.Signer | FactoryOptions - ): Promise; - getContractFactory( - name: "ZetaNonEthInterface", - signerOrOptions?: ethers.Signer | FactoryOptions - ): Promise; - getContractFactory( - name: "Ownable2Step", - signerOrOptions?: ethers.Signer | FactoryOptions - ): Promise; - getContractFactory( - name: "INonfungiblePositionManager", - signerOrOptions?: ethers.Signer | FactoryOptions - ): Promise; - getContractFactory( - name: "IPoolInitializer", - signerOrOptions?: ethers.Signer | FactoryOptions - ): Promise; - getContractFactory( - name: "ZetaInteractorMock", - signerOrOptions?: ethers.Signer | FactoryOptions - ): Promise; - getContractFactory( - name: "ZetaReceiverMock", - signerOrOptions?: ethers.Signer | FactoryOptions - ): Promise; - getContractFactory( - name: "ZetaEth", - signerOrOptions?: ethers.Signer | FactoryOptions - ): Promise; - getContractFactory( - name: "ZetaNonEth", - signerOrOptions?: ethers.Signer | FactoryOptions - ): Promise; - getContractFactory( - name: "ZetaConnectorBase", - signerOrOptions?: ethers.Signer | FactoryOptions - ): Promise; - getContractFactory( - name: "ZetaConnectorEth", - signerOrOptions?: ethers.Signer | FactoryOptions - ): Promise; - getContractFactory( - name: "ZetaConnectorNonEth", - signerOrOptions?: ethers.Signer | FactoryOptions - ): Promise; - getContractFactory( - name: "ZetaInteractor", - signerOrOptions?: ethers.Signer | FactoryOptions - ): Promise; - getContractFactory( - name: "WETH9", - signerOrOptions?: ethers.Signer | FactoryOptions - ): Promise; - getContractFactory( - name: "ZetaTokenConsumerTrident", - signerOrOptions?: ethers.Signer | FactoryOptions - ): Promise; - getContractFactory( - name: "ZetaTokenConsumerTridentErrors", - signerOrOptions?: ethers.Signer | FactoryOptions - ): Promise; - getContractFactory( - name: "ZetaTokenConsumerUniV2", - signerOrOptions?: ethers.Signer | FactoryOptions - ): Promise; - getContractFactory( - name: "ZetaTokenConsumerUniV2Errors", - signerOrOptions?: ethers.Signer | FactoryOptions - ): Promise; - getContractFactory( - name: "WETH9", - signerOrOptions?: ethers.Signer | FactoryOptions - ): Promise; - getContractFactory( - name: "ZetaTokenConsumerUniV3", - signerOrOptions?: ethers.Signer | FactoryOptions - ): Promise; - getContractFactory( - name: "ZetaTokenConsumerUniV3Errors", - signerOrOptions?: ethers.Signer | FactoryOptions - ): Promise; - - getContractAt( - name: "Ownable", - address: string, - signer?: ethers.Signer - ): Promise; - getContractAt( - name: "Pausable", - address: string, - signer?: ethers.Signer - ): Promise; - getContractAt( - name: "ERC20", - address: string, - signer?: ethers.Signer - ): Promise; - getContractAt( - name: "IERC20Permit", - address: string, - signer?: ethers.Signer - ): Promise; - getContractAt( - name: "ERC20Burnable", - address: string, - signer?: ethers.Signer - ): Promise; - getContractAt( - name: "IERC20Metadata", - address: string, - signer?: ethers.Signer - ): Promise; - getContractAt( - name: "IERC20", - address: string, - signer?: ethers.Signer - ): Promise; - getContractAt( - name: "IUniswapV2Factory", - address: string, - signer?: ethers.Signer - ): Promise; - getContractAt( - name: "IUniswapV2Pair", - address: string, - signer?: ethers.Signer - ): Promise; - getContractAt( - name: "IERC20", - address: string, - signer?: ethers.Signer - ): Promise; - getContractAt( - name: "IUniswapV2Router01", - address: string, - signer?: ethers.Signer - ): Promise; - getContractAt( - name: "IUniswapV2Router02", - address: string, - signer?: ethers.Signer - ): Promise; - getContractAt( - name: "IWETH", - address: string, - signer?: ethers.Signer - ): Promise; - getContractAt( - name: "UniswapV2Router02", - address: string, - signer?: ethers.Signer - ): Promise; - getContractAt( - name: "IUniswapV3SwapCallback", - address: string, - signer?: ethers.Signer - ): Promise; - getContractAt( - name: "IQuoter", - address: string, - signer?: ethers.Signer - ): Promise; - getContractAt( - name: "ISwapRouter", - address: string, - signer?: ethers.Signer - ): Promise; - getContractAt( - name: "ImmutableCreate2Factory", - address: string, - signer?: ethers.Signer - ): Promise; - getContractAt( - name: "Ownable", - address: string, - signer?: ethers.Signer - ): Promise; - getContractAt( - name: "ConnectorErrors", - address: string, - signer?: ethers.Signer - ): Promise; - getContractAt( - name: "ConcentratedLiquidityPoolFactory", - address: string, - signer?: ethers.Signer - ): Promise; - getContractAt( - name: "IPoolRouter", - address: string, - signer?: ethers.Signer - ): Promise; - getContractAt( - name: "ZetaErrors", - address: string, - signer?: ethers.Signer - ): Promise; - getContractAt( - name: "ZetaInteractorErrors", - address: string, - signer?: ethers.Signer - ): Promise; - getContractAt( - name: "ZetaCommonErrors", - address: string, - signer?: ethers.Signer - ): Promise; - getContractAt( - name: "ZetaConnector", - address: string, - signer?: ethers.Signer - ): Promise; - getContractAt( - name: "ZetaReceiver", - address: string, - signer?: ethers.Signer - ): Promise; - getContractAt( - name: "ZetaTokenConsumer", - address: string, - signer?: ethers.Signer - ): Promise; - getContractAt( - name: "ZetaNonEthInterface", - address: string, - signer?: ethers.Signer - ): Promise; - getContractAt( - name: "Ownable2Step", - address: string, - signer?: ethers.Signer - ): Promise; - getContractAt( - name: "INonfungiblePositionManager", - address: string, - signer?: ethers.Signer - ): Promise; - getContractAt( - name: "IPoolInitializer", - address: string, - signer?: ethers.Signer - ): Promise; - getContractAt( - name: "ZetaInteractorMock", - address: string, - signer?: ethers.Signer - ): Promise; - getContractAt( - name: "ZetaReceiverMock", - address: string, - signer?: ethers.Signer - ): Promise; - getContractAt( - name: "ZetaEth", - address: string, - signer?: ethers.Signer - ): Promise; - getContractAt( - name: "ZetaNonEth", - address: string, - signer?: ethers.Signer - ): Promise; - getContractAt( - name: "ZetaConnectorBase", - address: string, - signer?: ethers.Signer - ): Promise; - getContractAt( - name: "ZetaConnectorEth", - address: string, - signer?: ethers.Signer - ): Promise; - getContractAt( - name: "ZetaConnectorNonEth", - address: string, - signer?: ethers.Signer - ): Promise; - getContractAt( - name: "ZetaInteractor", - address: string, - signer?: ethers.Signer - ): Promise; - getContractAt( - name: "WETH9", - address: string, - signer?: ethers.Signer - ): Promise; - getContractAt( - name: "ZetaTokenConsumerTrident", - address: string, - signer?: ethers.Signer - ): Promise; - getContractAt( - name: "ZetaTokenConsumerTridentErrors", - address: string, - signer?: ethers.Signer - ): Promise; - getContractAt( - name: "ZetaTokenConsumerUniV2", - address: string, - signer?: ethers.Signer - ): Promise; - getContractAt( - name: "ZetaTokenConsumerUniV2Errors", - address: string, - signer?: ethers.Signer - ): Promise; - getContractAt( - name: "WETH9", - address: string, - signer?: ethers.Signer - ): Promise; - getContractAt( - name: "ZetaTokenConsumerUniV3", - address: string, - signer?: ethers.Signer - ): Promise; - getContractAt( - name: "ZetaTokenConsumerUniV3Errors", - 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/interfaces/typechain-types/index.ts b/packages/interfaces/typechain-types/index.ts deleted file mode 100644 index f4d94337..00000000 --- a/packages/interfaces/typechain-types/index.ts +++ /dev/null @@ -1,100 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ -import type * as openzeppelin from "./@openzeppelin"; -export type { openzeppelin }; -import type * as uniswap from "./@uniswap"; -export type { uniswap }; -import type * as contracts from "./contracts"; -export type { contracts }; -export * as factories from "./factories"; -export type { Ownable } from "./@openzeppelin/contracts/access/Ownable"; -export { Ownable__factory } from "./factories/@openzeppelin/contracts/access/Ownable__factory"; -export type { Pausable } from "./@openzeppelin/contracts/security/Pausable"; -export { Pausable__factory } from "./factories/@openzeppelin/contracts/security/Pausable__factory"; -export type { ERC20 } from "./@openzeppelin/contracts/token/ERC20/ERC20"; -export { ERC20__factory } from "./factories/@openzeppelin/contracts/token/ERC20/ERC20__factory"; -export type { IERC20Permit } from "./@openzeppelin/contracts/token/ERC20/extensions/draft-IERC20Permit.sol/IERC20Permit"; -export { IERC20Permit__factory } from "./factories/@openzeppelin/contracts/token/ERC20/extensions/draft-IERC20Permit.sol/IERC20Permit__factory"; -export type { ERC20Burnable } from "./@openzeppelin/contracts/token/ERC20/extensions/ERC20Burnable"; -export { ERC20Burnable__factory } from "./factories/@openzeppelin/contracts/token/ERC20/extensions/ERC20Burnable__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 { IERC20 } from "./@openzeppelin/contracts/token/ERC20/IERC20"; -export { IERC20__factory } from "./factories/@openzeppelin/contracts/token/ERC20/IERC20__factory"; -export type { IUniswapV2Factory } from "./@uniswap/v2-core/contracts/interfaces/IUniswapV2Factory"; -export { IUniswapV2Factory__factory } from "./factories/@uniswap/v2-core/contracts/interfaces/IUniswapV2Factory__factory"; -export type { IUniswapV2Pair } from "./@uniswap/v2-core/contracts/interfaces/IUniswapV2Pair"; -export { IUniswapV2Pair__factory } from "./factories/@uniswap/v2-core/contracts/interfaces/IUniswapV2Pair__factory"; -export type { IUniswapV2Router01 } from "./@uniswap/v2-periphery/contracts/interfaces/IUniswapV2Router01"; -export { IUniswapV2Router01__factory } from "./factories/@uniswap/v2-periphery/contracts/interfaces/IUniswapV2Router01__factory"; -export type { IUniswapV2Router02 } from "./@uniswap/v2-periphery/contracts/interfaces/IUniswapV2Router02"; -export { IUniswapV2Router02__factory } from "./factories/@uniswap/v2-periphery/contracts/interfaces/IUniswapV2Router02__factory"; -export type { IWETH } from "./@uniswap/v2-periphery/contracts/interfaces/IWETH"; -export { IWETH__factory } from "./factories/@uniswap/v2-periphery/contracts/interfaces/IWETH__factory"; -export type { UniswapV2Router02 } from "./@uniswap/v2-periphery/contracts/UniswapV2Router02"; -export { UniswapV2Router02__factory } from "./factories/@uniswap/v2-periphery/contracts/UniswapV2Router02__factory"; -export type { IUniswapV3SwapCallback } from "./@uniswap/v3-core/contracts/interfaces/callback/IUniswapV3SwapCallback"; -export { IUniswapV3SwapCallback__factory } from "./factories/@uniswap/v3-core/contracts/interfaces/callback/IUniswapV3SwapCallback__factory"; -export type { IQuoter } from "./@uniswap/v3-periphery/contracts/interfaces/IQuoter"; -export { IQuoter__factory } from "./factories/@uniswap/v3-periphery/contracts/interfaces/IQuoter__factory"; -export type { ISwapRouter } from "./@uniswap/v3-periphery/contracts/interfaces/ISwapRouter"; -export { ISwapRouter__factory } from "./factories/@uniswap/v3-periphery/contracts/interfaces/ISwapRouter__factory"; -export type { ImmutableCreate2Factory } from "./contracts/ImmutableCreate2Factory.sol/ImmutableCreate2Factory"; -export { ImmutableCreate2Factory__factory } from "./factories/contracts/ImmutableCreate2Factory.sol/ImmutableCreate2Factory__factory"; -export type { ConnectorErrors } from "./contracts/interfaces/ConnectorErrors"; -export { ConnectorErrors__factory } from "./factories/contracts/interfaces/ConnectorErrors__factory"; -export type { ConcentratedLiquidityPoolFactory } from "./contracts/interfaces/TridentConcentratedLiquidityPoolFactory.sol/ConcentratedLiquidityPoolFactory"; -export { ConcentratedLiquidityPoolFactory__factory } from "./factories/contracts/interfaces/TridentConcentratedLiquidityPoolFactory.sol/ConcentratedLiquidityPoolFactory__factory"; -export type { IPoolRouter } from "./contracts/interfaces/TridentIPoolRouter.sol/IPoolRouter"; -export { IPoolRouter__factory } from "./factories/contracts/interfaces/TridentIPoolRouter.sol/IPoolRouter__factory"; -export type { ZetaErrors } from "./contracts/interfaces/ZetaErrors"; -export { ZetaErrors__factory } from "./factories/contracts/interfaces/ZetaErrors__factory"; -export type { ZetaInteractorErrors } from "./contracts/interfaces/ZetaInteractorErrors"; -export { ZetaInteractorErrors__factory } from "./factories/contracts/interfaces/ZetaInteractorErrors__factory"; -export type { ZetaCommonErrors } from "./contracts/interfaces/ZetaInterfaces.sol/ZetaCommonErrors"; -export { ZetaCommonErrors__factory } from "./factories/contracts/interfaces/ZetaInterfaces.sol/ZetaCommonErrors__factory"; -export type { ZetaConnector } from "./contracts/interfaces/ZetaInterfaces.sol/ZetaConnector"; -export { ZetaConnector__factory } from "./factories/contracts/interfaces/ZetaInterfaces.sol/ZetaConnector__factory"; -export type { ZetaReceiver } from "./contracts/interfaces/ZetaInterfaces.sol/ZetaReceiver"; -export { ZetaReceiver__factory } from "./factories/contracts/interfaces/ZetaInterfaces.sol/ZetaReceiver__factory"; -export type { ZetaTokenConsumer } from "./contracts/interfaces/ZetaInterfaces.sol/ZetaTokenConsumer"; -export { ZetaTokenConsumer__factory } from "./factories/contracts/interfaces/ZetaInterfaces.sol/ZetaTokenConsumer__factory"; -export type { ZetaNonEthInterface } from "./contracts/interfaces/ZetaNonEthInterface"; -export { ZetaNonEthInterface__factory } from "./factories/contracts/interfaces/ZetaNonEthInterface__factory"; -export type { Ownable2Step } from "./contracts/openzeppelin/Ownable2Step"; -export { Ownable2Step__factory } from "./factories/contracts/openzeppelin/Ownable2Step__factory"; -export type { INonfungiblePositionManager } from "./contracts/testing/TestUniswapV3Contracts.sol/INonfungiblePositionManager"; -export { INonfungiblePositionManager__factory } from "./factories/contracts/testing/TestUniswapV3Contracts.sol/INonfungiblePositionManager__factory"; -export type { IPoolInitializer } from "./contracts/testing/TestUniswapV3Contracts.sol/IPoolInitializer"; -export { IPoolInitializer__factory } from "./factories/contracts/testing/TestUniswapV3Contracts.sol/IPoolInitializer__factory"; -export type { ZetaInteractorMock } from "./contracts/testing/ZetaInteractorMock"; -export { ZetaInteractorMock__factory } from "./factories/contracts/testing/ZetaInteractorMock__factory"; -export type { ZetaReceiverMock } from "./contracts/testing/ZetaReceiverMock"; -export { ZetaReceiverMock__factory } from "./factories/contracts/testing/ZetaReceiverMock__factory"; -export type { ZetaEth } from "./contracts/Zeta.eth.sol/ZetaEth"; -export { ZetaEth__factory } from "./factories/contracts/Zeta.eth.sol/ZetaEth__factory"; -export type { ZetaNonEth } from "./contracts/Zeta.non-eth.sol/ZetaNonEth"; -export { ZetaNonEth__factory } from "./factories/contracts/Zeta.non-eth.sol/ZetaNonEth__factory"; -export type { ZetaConnectorBase } from "./contracts/ZetaConnector.base.sol/ZetaConnectorBase"; -export { ZetaConnectorBase__factory } from "./factories/contracts/ZetaConnector.base.sol/ZetaConnectorBase__factory"; -export type { ZetaConnectorEth } from "./contracts/ZetaConnector.eth.sol/ZetaConnectorEth"; -export { ZetaConnectorEth__factory } from "./factories/contracts/ZetaConnector.eth.sol/ZetaConnectorEth__factory"; -export type { ZetaConnectorNonEth } from "./contracts/ZetaConnector.non-eth.sol/ZetaConnectorNonEth"; -export { ZetaConnectorNonEth__factory } from "./factories/contracts/ZetaConnector.non-eth.sol/ZetaConnectorNonEth__factory"; -export type { ZetaInteractor } from "./contracts/ZetaInteractor"; -export { ZetaInteractor__factory } from "./factories/contracts/ZetaInteractor__factory"; -export type { WETH9 } from "./contracts/ZetaTokenConsumerTrident.strategy.sol/WETH9"; -export { WETH9__factory } from "./factories/contracts/ZetaTokenConsumerTrident.strategy.sol/WETH9__factory"; -export type { ZetaTokenConsumerTrident } from "./contracts/ZetaTokenConsumerTrident.strategy.sol/ZetaTokenConsumerTrident"; -export { ZetaTokenConsumerTrident__factory } from "./factories/contracts/ZetaTokenConsumerTrident.strategy.sol/ZetaTokenConsumerTrident__factory"; -export type { ZetaTokenConsumerTridentErrors } from "./contracts/ZetaTokenConsumerTrident.strategy.sol/ZetaTokenConsumerTridentErrors"; -export { ZetaTokenConsumerTridentErrors__factory } from "./factories/contracts/ZetaTokenConsumerTrident.strategy.sol/ZetaTokenConsumerTridentErrors__factory"; -export type { ZetaTokenConsumerUniV2 } from "./contracts/ZetaTokenConsumerUniV2.strategy.sol/ZetaTokenConsumerUniV2"; -export { ZetaTokenConsumerUniV2__factory } from "./factories/contracts/ZetaTokenConsumerUniV2.strategy.sol/ZetaTokenConsumerUniV2__factory"; -export type { ZetaTokenConsumerUniV2Errors } from "./contracts/ZetaTokenConsumerUniV2.strategy.sol/ZetaTokenConsumerUniV2Errors"; -export { ZetaTokenConsumerUniV2Errors__factory } from "./factories/contracts/ZetaTokenConsumerUniV2.strategy.sol/ZetaTokenConsumerUniV2Errors__factory"; -export type { ZetaTokenConsumerUniV3 } from "./contracts/ZetaTokenConsumerUniV3.strategy.sol/ZetaTokenConsumerUniV3"; -export { ZetaTokenConsumerUniV3__factory } from "./factories/contracts/ZetaTokenConsumerUniV3.strategy.sol/ZetaTokenConsumerUniV3__factory"; -export type { ZetaTokenConsumerUniV3Errors } from "./contracts/ZetaTokenConsumerUniV3.strategy.sol/ZetaTokenConsumerUniV3Errors"; -export { ZetaTokenConsumerUniV3Errors__factory } from "./factories/contracts/ZetaTokenConsumerUniV3.strategy.sol/ZetaTokenConsumerUniV3Errors__factory"; diff --git a/packages/protocol-contracts/.env.example b/packages/protocol-contracts-deprecated/.env.example similarity index 100% rename from packages/protocol-contracts/.env.example rename to packages/protocol-contracts-deprecated/.env.example diff --git a/packages/protocol-contracts/.eslintrc.js b/packages/protocol-contracts-deprecated/.eslintrc.js similarity index 100% rename from packages/protocol-contracts/.eslintrc.js rename to packages/protocol-contracts-deprecated/.eslintrc.js diff --git a/packages/protocol-contracts/.npmignore b/packages/protocol-contracts-deprecated/.npmignore similarity index 100% rename from packages/protocol-contracts/.npmignore rename to packages/protocol-contracts-deprecated/.npmignore diff --git a/packages/protocol-contracts/README.md b/packages/protocol-contracts-deprecated/README.md similarity index 100% rename from packages/protocol-contracts/README.md rename to packages/protocol-contracts-deprecated/README.md diff --git a/packages/protocol-contracts/contracts/ZetaTokenConsumerTrident.strategy.sol b/packages/protocol-contracts-deprecated/contracts/ZetaTokenConsumerTrident.strategy.sol similarity index 98% rename from packages/protocol-contracts/contracts/ZetaTokenConsumerTrident.strategy.sol rename to packages/protocol-contracts-deprecated/contracts/ZetaTokenConsumerTrident.strategy.sol index 0c4c38d0..d12e029f 100644 --- a/packages/protocol-contracts/contracts/ZetaTokenConsumerTrident.strategy.sol +++ b/packages/protocol-contracts-deprecated/contracts/ZetaTokenConsumerTrident.strategy.sol @@ -5,7 +5,7 @@ import "@openzeppelin/contracts/interfaces/IERC20.sol"; import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol"; import "@uniswap/v3-periphery/contracts/interfaces/IQuoter.sol"; -import "./interfaces/ZetaInterfaces.sol"; +import "@zetachain/protocol-contracts/contracts/evm/interfaces/ZetaInterfaces.sol"; import "./interfaces/TridentConcentratedLiquidityPoolFactory.sol"; import "./interfaces/TridentIPoolRouter.sol"; diff --git a/packages/protocol-contracts/contracts/interfaces/TridentConcentratedLiquidityPoolFactory.sol b/packages/protocol-contracts-deprecated/contracts/interfaces/TridentConcentratedLiquidityPoolFactory.sol similarity index 100% rename from packages/protocol-contracts/contracts/interfaces/TridentConcentratedLiquidityPoolFactory.sol rename to packages/protocol-contracts-deprecated/contracts/interfaces/TridentConcentratedLiquidityPoolFactory.sol diff --git a/packages/protocol-contracts/contracts/interfaces/TridentIPoolRouter.sol b/packages/protocol-contracts-deprecated/contracts/interfaces/TridentIPoolRouter.sol similarity index 100% rename from packages/protocol-contracts/contracts/interfaces/TridentIPoolRouter.sol rename to packages/protocol-contracts-deprecated/contracts/interfaces/TridentIPoolRouter.sol diff --git a/packages/protocol-contracts/contracts/testing/TestContracts.sol b/packages/protocol-contracts-deprecated/contracts/testing/TestContracts.sol similarity index 100% rename from packages/protocol-contracts/contracts/testing/TestContracts.sol rename to packages/protocol-contracts-deprecated/contracts/testing/TestContracts.sol diff --git a/packages/protocol-contracts/hardhat.config.ts b/packages/protocol-contracts-deprecated/hardhat.config.ts similarity index 100% rename from packages/protocol-contracts/hardhat.config.ts rename to packages/protocol-contracts-deprecated/hardhat.config.ts diff --git a/packages/protocol-contracts/package.json b/packages/protocol-contracts-deprecated/package.json similarity index 89% rename from packages/protocol-contracts/package.json rename to packages/protocol-contracts-deprecated/package.json index fde81f91..edf6ae27 100644 --- a/packages/protocol-contracts/package.json +++ b/packages/protocol-contracts-deprecated/package.json @@ -1,10 +1,10 @@ { - "name": "@zetachain/protocol-contracts", + "name": "@zetachain/protocol-contracts-deprecated", "version": "0.0.3", "license": "MIT", "author": "zetachain", "publishConfig": { - "access": "public", + "access": "restricted", "registry": "https://registry.npmjs.org/" }, "scripts": { @@ -27,12 +27,12 @@ "devDependencies": { "@zetachain/addresses": "workspace:^", "@zetachain/addresses-tools": "workspace:^", - "@zetachain/interfaces": "workspace:^", + "@zetachain/protocol-contracts": "^0.0.4", "hardhat-abi-exporter": "^2.10.0", "tsconfig-paths": "^3.14.1" }, "dependencies": { - "@openzeppelin/contracts": "4.7.3", + "@openzeppelin/contracts": "^4.8.3", "@uniswap/v2-periphery": "1.1.0-beta.0", "@uniswap/v3-periphery": "1.1.0", "ethers": "5.6.8" diff --git a/packages/protocol-contracts/tsconfig.json b/packages/protocol-contracts-deprecated/tsconfig.json similarity index 100% rename from packages/protocol-contracts/tsconfig.json rename to packages/protocol-contracts-deprecated/tsconfig.json diff --git a/packages/protocol-contracts/contracts/ERC20Custody.sol b/packages/protocol-contracts/contracts/ERC20Custody.sol deleted file mode 100644 index 8afae8b3..00000000 --- a/packages/protocol-contracts/contracts/ERC20Custody.sol +++ /dev/null @@ -1,197 +0,0 @@ -// SPDX-License-Identifier: MIT -// v1.0, 2023-01-10 -pragma solidity 0.8.7; - -import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; -import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol"; - -/// @title ERC20Custody. -/// @notice ERC20Custody for depositing ERC20 assets into ZetaChain and making operations with them. -contract ERC20Custody { - using SafeERC20 for IERC20; - - error NotWhitelisted(); - error NotPaused(); - error InvalidSender(); - error InvalidTSSUpdater(); - error ZeroAddress(); - error IsPaused(); - error ZetaMaxFeeExceeded(); - error ZeroFee(); - - /// @notice If custody operations are paused. - bool public paused; - /// @notice TSSAddress is the TSS address collectively possessed by Zeta blockchain validators. - address public TSSAddress; - /// @notice Threshold Signature Scheme (TSS) [GG20] is a multi-sig ECDSA/EdDSA protocol. - address public TSSAddressUpdater; - /// @notice Current zeta fee for depositing funds into ZetaChain. - uint256 public zetaFee; - /// @notice Maximum zeta fee for transaction. - uint256 immutable public zetaMaxFee; - /// @notice Zeta ERC20 token . - IERC20 immutable public zeta; - /// @notice Mapping of whitelisted token => true/false. - mapping(IERC20 => bool) public whitelisted; - - event Paused(address sender); - event Unpaused(address sender); - event Whitelisted(IERC20 indexed asset); - event Unwhitelisted(IERC20 indexed asset); - event Deposited(bytes recipient, IERC20 indexed asset, uint256 amount, bytes message); - event Withdrawn(address indexed recipient, IERC20 indexed asset, uint256 amount); - event RenouncedTSSUpdater(address TSSAddressUpdater_); - event UpdatedTSSAddress(address TSSAddress_); - event UpdatedZetaFee(uint256 zetaFee_); - - /** - * @dev Only TSS address allowed modifier. - */ - modifier onlyTSS() { - if (msg.sender != TSSAddress) { - revert InvalidSender(); - } - _; - } - - /** - * @dev Only TSS address updater allowed modifier. - */ - modifier onlyTSSUpdater() { - if (msg.sender != TSSAddressUpdater) { - revert InvalidTSSUpdater(); - } - _; - } - - constructor(address TSSAddress_, address TSSAddressUpdater_, uint256 zetaFee_, uint256 zetaMaxFee_, IERC20 zeta_) { - TSSAddress = TSSAddress_; - TSSAddressUpdater = TSSAddressUpdater_; - zetaFee = zetaFee_; - zeta = zeta_; - zetaMaxFee = zetaMaxFee_; - } - - /** - * @dev Update the TSSAddress in case of Zeta blockchain validator nodes churn. - * @param TSSAddress_, new tss address. - */ - function updateTSSAddress(address TSSAddress_) external onlyTSSUpdater { - if (TSSAddress_ == address(0)) { - revert ZeroAddress(); - } - TSSAddress = TSSAddress_; - emit UpdatedTSSAddress(TSSAddress_); - } - - /** - * @dev Update zeta fee - * @param zetaFee_, new zeta fee - */ - function updateZetaFee(uint256 zetaFee_) external onlyTSS { - if (zetaFee_ == 0) { - revert ZeroFee(); - } - if (zetaFee_ > zetaMaxFee) { - revert ZetaMaxFeeExceeded(); - } - zetaFee = zetaFee_; - emit UpdatedZetaFee(zetaFee_); - } - - /** - * @dev Change the ownership of TSSAddressUpdater to the Zeta blockchain TSS nodes. - * Effectively, only Zeta blockchain validators collectively can update TSSAddress afterwards. - */ - function renounceTSSAddressUpdater() external onlyTSSUpdater { - if (TSSAddress == address(0)) { - revert ZeroAddress(); - } - TSSAddressUpdater = TSSAddress; - emit RenouncedTSSUpdater(msg.sender); - } - - /** - * @dev Pause custody operations. - */ - function pause() external onlyTSSUpdater { - if (paused) { - revert IsPaused(); - } - if (TSSAddress == address(0)) { - revert ZeroAddress(); - } - paused = true; - emit Paused(msg.sender); - } - - /** - * @dev Unpause custody operations. - */ - function unpause() external onlyTSSUpdater { - if (!paused) { - revert NotPaused(); - } - paused = false; - emit Unpaused(msg.sender); - } - - /** - * @dev Whitelist asset. - * @param asset, ERC20 asset. - */ - function whitelist(IERC20 asset) external onlyTSS { - whitelisted[asset] = true; - emit Whitelisted(asset); - } - - /** - * @dev Unwhitelist asset. - * @param asset, ERC20 asset. - */ - function unwhitelist(IERC20 asset) external onlyTSS { - whitelisted[asset] = false; - emit Unwhitelisted(asset); - } - - /** - * @dev Deposit asset amount to recipient with message that encodes additional zetachain evm call or message. - * @param recipient, recipient address. - * @param asset, ERC20 asset. - * @param amount, asset amount. - * @param message, bytes message or encoded zetechain call. - */ - function deposit(bytes calldata recipient, IERC20 asset, uint256 amount, bytes calldata message) external { - if (paused) { - revert IsPaused(); - } - if (!whitelisted[asset]) { - revert NotWhitelisted(); - } - if (zetaFee != 0 && address(zeta) != address(0)) { - zeta.safeTransferFrom(msg.sender, TSSAddress, zetaFee); - } - uint256 oldBalance = asset.balanceOf(address(this)); - asset.safeTransferFrom(msg.sender, address(this), amount); - // In case if there is a fee on a token transfer, we might not receive a full exepected amount - // and we need to correctly process that, o we subtract an old balance from a new balance, which should be an actual received amount. - emit Deposited(recipient, asset, asset.balanceOf(address(this)) - oldBalance, message); - } - - /** - * @dev Withdraw asset amount to recipient by custody TSS owner. - * @param recipient, recipient address. - * @param asset, ERC20 asset. - * @param amount, asset amount. - */ - function withdraw(address recipient, IERC20 asset, uint256 amount) external onlyTSS { - if (paused) { - revert IsPaused(); - } - if (!whitelisted[asset]) { - revert NotWhitelisted(); - } - IERC20(asset).safeTransfer(recipient, amount); - emit Withdrawn(recipient, asset, amount); - } -} diff --git a/packages/protocol-contracts/contracts/ImmutableCreate2Factory.sol b/packages/protocol-contracts/contracts/ImmutableCreate2Factory.sol deleted file mode 100644 index 96d2a91e..00000000 --- a/packages/protocol-contracts/contracts/ImmutableCreate2Factory.sol +++ /dev/null @@ -1,215 +0,0 @@ -pragma solidity 0.5.10; // optimization enabled, 99999 runs, evm: petersburg - -interface Ownable { - function transferOwnership(address newOwner) external; -} - -/** - * @title Immutable Create2 Contract Factory - * @author 0age - * @notice This contract provides a safeCreate2 function that takes a salt value - * and a block of initialization code as arguments and passes them into inline - * assembly. The contract prevents redeploys by maintaining a mapping of all - * contracts that have already been deployed, and prevents frontrunning or other - * collisions by requiring that the first 20 bytes of the salt are equal to the - * address of the caller (this can be bypassed by setting the first 20 bytes to - * the null address). There is also a view function that computes the address of - * the contract that will be created when submitting a given salt or nonce along - * with a given block of initialization code. - * @dev This contract has not yet been fully tested or audited - proceed with - * caution and please share any exploits or optimizations you discover. - */ -contract ImmutableCreate2Factory { - // mapping to track which addresses have already been deployed. - mapping(address => bool) private _deployed; - - function safeCreate2Internal(bytes32 salt, bytes memory initializationCode) - internal - returns (address deploymentAddress) - { - // move the initialization code from calldata to memory. - bytes memory initCode = initializationCode; - - // determine the target address for contract deployment. - address targetDeploymentAddress = address( - uint160( // downcast to match the address type. - uint256( // convert to uint to truncate upper digits. - keccak256( // compute the CREATE2 hash using 4 inputs. - abi.encodePacked( // pack all inputs to the hash together. - hex"ff", // start with 0xff to distinguish from RLP. - address(this), // this contract will be the caller. - salt, // pass in the supplied salt value. - keccak256(abi.encodePacked(initCode)) // pass in the hash of initialization code. - ) - ) - ) - ) - ); - - // ensure that a contract hasn't been previously deployed to target address. - require(!_deployed[targetDeploymentAddress], "Invalid contract creation - contract has already been deployed."); - - // using inline assembly: load data and length of data, then call CREATE2. - assembly { - // solhint-disable-line - let encoded_data := add(0x20, initCode) // load initialization code. - let encoded_size := mload(initCode) // load the init code's length. - deploymentAddress := create2( - // call CREATE2 with 4 arguments. - callvalue, // forward any attached value. - encoded_data, // pass in initialization code. - encoded_size, // pass in init code's length. - salt // pass in the salt value. - ) - } - - // check address against target to ensure that deployment was successful. - require( - deploymentAddress == targetDeploymentAddress, - "Failed to deploy contract using provided salt and initialization code." - ); - - // record the deployment of the contract to prevent redeploys. - _deployed[deploymentAddress] = true; - } - - /** - * @dev Create a contract using CREATE2 by submitting a given salt or nonce - * along with the initialization code for the contract. Note that the first 20 - * bytes of the salt must match those of the calling address, which prevents - * contract creation events from being submitted by unintended parties. - * @param salt bytes32 The nonce that will be passed into the CREATE2 call. - * @param initializationCode bytes The initialization code that will be passed - * into the CREATE2 call. - * @return Address of the contract that will be created, or the null address - * if a contract already exists at that address. - */ - function safeCreate2(bytes32 salt, bytes memory initializationCode) - public - payable - containsCaller(salt) - returns (address deploymentAddress) - { - return safeCreate2Internal(salt, initializationCode); - } - - /** - * @dev Compute the address of the contract that will be created when - * submitting a given salt or nonce to the contract along with the contract's - * initialization code. The CREATE2 address is computed in accordance with - * EIP-1014, and adheres to the formula therein of - * `keccak256( 0xff ++ address ++ salt ++ keccak256(init_code)))[12:]` when - * performing the computation. The computed address is then checked for any - * existing contract code - if so, the null address will be returned instead. - * @param salt bytes32 The nonce passed into the CREATE2 address calculation. - * @param initCode bytes The contract initialization code to be used. - * that will be passed into the CREATE2 address calculation. - * @return Address of the contract that will be created, or the null address - * if a contract has already been deployed to that address. - */ - function findCreate2Address(bytes32 salt, bytes calldata initCode) - external - view - returns (address deploymentAddress) - { - // determine the address where the contract will be deployed. - deploymentAddress = address( - uint160( // downcast to match the address type. - uint256( // convert to uint to truncate upper digits. - keccak256( // compute the CREATE2 hash using 4 inputs. - abi.encodePacked( // pack all inputs to the hash together. - hex"ff", // start with 0xff to distinguish from RLP. - address(this), // this contract will be the caller. - salt, // pass in the supplied salt value. - keccak256(abi.encodePacked(initCode)) // pass in the hash of initialization code. - ) - ) - ) - ) - ); - - // return null address to signify failure if contract has been deployed. - if (_deployed[deploymentAddress]) { - return address(0); - } - } - - /** - * @dev Compute the address of the contract that will be created when - * submitting a given salt or nonce to the contract along with the keccak256 - * hash of the contract's initialization code. The CREATE2 address is computed - * in accordance with EIP-1014, and adheres to the formula therein of - * `keccak256( 0xff ++ address ++ salt ++ keccak256(init_code)))[12:]` when - * performing the computation. The computed address is then checked for any - * existing contract code - if so, the null address will be returned instead. - * @param salt bytes32 The nonce passed into the CREATE2 address calculation. - * @param initCodeHash bytes32 The keccak256 hash of the initialization code - * that will be passed into the CREATE2 address calculation. - * @return Address of the contract that will be created, or the null address - * if a contract has already been deployed to that address. - */ - function findCreate2AddressViaHash(bytes32 salt, bytes32 initCodeHash) - external - view - returns (address deploymentAddress) - { - // determine the address where the contract will be deployed. - deploymentAddress = address( - uint160( // downcast to match the address type. - uint256( // convert to uint to truncate upper digits. - keccak256( // compute the CREATE2 hash using 4 inputs. - abi.encodePacked( // pack all inputs to the hash together. - hex"ff", // start with 0xff to distinguish from RLP. - address(this), // this contract will be the caller. - salt, // pass in the supplied salt value. - initCodeHash // pass in the hash of initialization code. - ) - ) - ) - ) - ); - - // return null address to signify failure if contract has been deployed. - if (_deployed[deploymentAddress]) { - return address(0); - } - } - - /** - * @dev Determine if a contract has already been deployed by the factory to a - * given address. - * @param deploymentAddress address The contract address to check. - * @return True if the contract has been deployed, false otherwise. - */ - function hasBeenDeployed(address deploymentAddress) external view returns (bool) { - // determine if a contract has been deployed to the provided address. - return _deployed[deploymentAddress]; - } - - /** - * @dev Modifier to ensure that the first 20 bytes of a submitted salt match - * those of the calling account. This provides protection against the salt - * being stolen by frontrunners or other attackers. The protection can also be - * bypassed if desired by setting each of the first 20 bytes to zero. - * @param salt bytes32 The salt value to check against the calling address. - */ - modifier containsCaller(bytes32 salt) { - // prevent contract submissions from being stolen from tx.pool by requiring - // that the first 20 bytes of the submitted salt match msg.sender. - require( - (address(bytes20(salt)) == msg.sender) || (bytes20(salt) == bytes20(0)), - "Invalid salt - first 20 bytes of the salt must match calling address." - ); - _; - } - - function safeCreate2AndTransfer(bytes32 salt, bytes calldata initializationCode) - external - payable - containsCaller(salt) - returns (address deploymentAddress) - { - deploymentAddress = safeCreate2Internal(salt, initializationCode); - Ownable(deploymentAddress).transferOwnership(msg.sender); - } -} diff --git a/packages/protocol-contracts/contracts/Zeta.eth.sol b/packages/protocol-contracts/contracts/Zeta.eth.sol deleted file mode 100644 index 65885364..00000000 --- a/packages/protocol-contracts/contracts/Zeta.eth.sol +++ /dev/null @@ -1,13 +0,0 @@ -// SPDX-License-Identifier: MIT -pragma solidity 0.8.7; - -import "@openzeppelin/contracts/token/ERC20/ERC20.sol"; - -/** - * @dev ZetaEth is an implementation of OpenZeppelin's ERC20 - */ -contract ZetaEth is ERC20("Zeta", "ZETA") { - constructor(uint256 initialSupply) { - _mint(msg.sender, initialSupply * (10 ** uint256(decimals()))); - } -} diff --git a/packages/protocol-contracts/contracts/Zeta.non-eth.sol b/packages/protocol-contracts/contracts/Zeta.non-eth.sol deleted file mode 100644 index 5ae786d8..00000000 --- a/packages/protocol-contracts/contracts/Zeta.non-eth.sol +++ /dev/null @@ -1,73 +0,0 @@ -// SPDX-License-Identifier: MIT -pragma solidity 0.8.7; - -import "@openzeppelin/contracts/token/ERC20/extensions/ERC20Burnable.sol"; - -import "./interfaces/ZetaErrors.sol"; - -import "./interfaces/ZetaNonEthInterface.sol"; - -contract ZetaNonEth is ZetaNonEthInterface, ERC20Burnable, ZetaErrors { - address public connectorAddress; - - /** - * @dev Collectively held by Zeta blockchain validators - */ - address public tssAddress; - - /** - * @dev Initially a multi-sig, eventually held by Zeta blockchain validators (via renounceTssAddressUpdater) - */ - address public tssAddressUpdater; - - event Minted(address indexed mintee, uint256 amount, bytes32 indexed internalSendHash); - - event Burnt(address indexed burnee, uint256 amount); - - constructor(address tssAddress_, address tssAddressUpdater_) ERC20("Zeta", "ZETA") { - if (tssAddress_ == address(0) || tssAddressUpdater_ == address(0)) revert InvalidAddress(); - - tssAddress = tssAddress_; - tssAddressUpdater = tssAddressUpdater_; - } - - function updateTssAndConnectorAddresses(address tssAddress_, address connectorAddress_) external { - if (msg.sender != tssAddressUpdater && msg.sender != tssAddress) revert CallerIsNotTssOrUpdater(msg.sender); - if (tssAddress_ == address(0) || connectorAddress_ == address(0)) revert InvalidAddress(); - - tssAddress = tssAddress_; - connectorAddress = connectorAddress_; - } - - /** - * @dev Sets tssAddressUpdater to be tssAddress - */ - function renounceTssAddressUpdater() external { - if (msg.sender != tssAddressUpdater) revert CallerIsNotTssUpdater(msg.sender); - if (tssAddress == address(0)) revert InvalidAddress(); - - tssAddressUpdater = tssAddress; - } - - function mint(address mintee, uint256 value, bytes32 internalSendHash) external override { - /** - * @dev Only Connector can mint. Minting requires burning the equivalent amount on another chain - */ - if (msg.sender != connectorAddress) revert CallerIsNotConnector(msg.sender); - - _mint(mintee, value); - - emit Minted(mintee, value, internalSendHash); - } - - function burnFrom(address account, uint256 amount) public override(ZetaNonEthInterface, ERC20Burnable) { - /** - * @dev Only Connector can burn. - */ - if (msg.sender != connectorAddress) revert CallerIsNotConnector(msg.sender); - - ERC20Burnable.burnFrom(account, amount); - - emit Burnt(account, amount); - } -} diff --git a/packages/protocol-contracts/contracts/ZetaConnector.base.sol b/packages/protocol-contracts/contracts/ZetaConnector.base.sol deleted file mode 100644 index c41799a5..00000000 --- a/packages/protocol-contracts/contracts/ZetaConnector.base.sol +++ /dev/null @@ -1,191 +0,0 @@ -// SPDX-License-Identifier: MIT -pragma solidity 0.8.7; - -import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; -import "@openzeppelin/contracts/security/Pausable.sol"; - -import "./interfaces/ConnectorErrors.sol"; -import "./interfaces/ZetaInterfaces.sol"; - -/** - * @dev Main abstraction of ZetaConnector. - * This contract manages interactions between TSS and different chains. - * There's an instance of this contract on each chain supported by ZetaChain. - */ -contract ZetaConnectorBase is ConnectorErrors, Pausable { - address public immutable zetaToken; - - /** - * @dev Multisig contract to pause incoming transactions. - * The responsibility of pausing outgoing transactions is left to the protocol for more flexibility. - */ - address public pauserAddress; - - /** - * @dev Collectively held by ZetaChain validators. - */ - address public tssAddress; - - /** - * @dev This address will start pointing to a multisig contract, then it will become the TSS address itself. - */ - address public tssAddressUpdater; - - event ZetaSent( - address sourceTxOriginAddress, - address indexed zetaTxSenderAddress, - uint256 indexed destinationChainId, - bytes destinationAddress, - uint256 zetaValueAndGas, - uint256 destinationGasLimit, - bytes message, - bytes zetaParams - ); - - event ZetaReceived( - bytes zetaTxSenderAddress, - uint256 indexed sourceChainId, - address indexed destinationAddress, - uint256 zetaValue, - bytes message, - bytes32 indexed internalSendHash - ); - - event ZetaReverted( - address zetaTxSenderAddress, - uint256 sourceChainId, - uint256 indexed destinationChainId, - bytes destinationAddress, - uint256 remainingZetaValue, - bytes message, - bytes32 indexed internalSendHash - ); - - event TSSAddressUpdated(address zetaTxSenderAddress, address newTssAddress); - - event PauserAddressUpdated(address updaterAddress, address newTssAddress); - - /** - * @dev Constructor requires initial addresses. - * zetaToken address is the only immutable one, while others can be updated. - */ - constructor(address zetaToken_, address tssAddress_, address tssAddressUpdater_, address pauserAddress_) { - if ( - zetaToken_ == address(0) || - tssAddress_ == address(0) || - tssAddressUpdater_ == address(0) || - pauserAddress_ == address(0) - ) { - revert ZetaCommonErrors.InvalidAddress(); - } - - zetaToken = zetaToken_; - tssAddress = tssAddress_; - tssAddressUpdater = tssAddressUpdater_; - pauserAddress = pauserAddress_; - } - - /** - * @dev Modifier to restrict actions to pauser address. - */ - modifier onlyPauser() { - if (msg.sender != pauserAddress) revert CallerIsNotPauser(msg.sender); - _; - } - - /** - * @dev Modifier to restrict actions to TSS address. - */ - modifier onlyTssAddress() { - if (msg.sender != tssAddress) revert CallerIsNotTss(msg.sender); - _; - } - - /** - * @dev Modifier to restrict actions to TSS updater address. - */ - modifier onlyTssUpdater() { - if (msg.sender != tssAddressUpdater) revert CallerIsNotTssUpdater(msg.sender); - _; - } - - /** - * @dev Update the pauser address. The only address allowed to do that is the current pauser. - */ - function updatePauserAddress(address pauserAddress_) external onlyPauser { - if (pauserAddress_ == address(0)) revert ZetaCommonErrors.InvalidAddress(); - - pauserAddress = pauserAddress_; - - emit PauserAddressUpdated(msg.sender, pauserAddress_); - } - - /** - * @dev Update the TSS address. The address can be updated by the TSS updater or the TSS address itself. - */ - function updateTssAddress(address tssAddress_) external { - if (msg.sender != tssAddress && msg.sender != tssAddressUpdater) revert CallerIsNotTssOrUpdater(msg.sender); - if (tssAddress_ == address(0)) revert ZetaCommonErrors.InvalidAddress(); - - tssAddress = tssAddress_; - - emit TSSAddressUpdated(msg.sender, tssAddress_); - } - - /** - * @dev Changes the ownership of tssAddressUpdater to be the one held by the ZetaChain TSS Signer nodes. - */ - function renounceTssAddressUpdater() external onlyTssUpdater { - if (tssAddress == address(0)) revert ZetaCommonErrors.InvalidAddress(); - - tssAddressUpdater = tssAddress; - } - - /** - * @dev Pause the input (send) transactions. - */ - - function pause() external onlyPauser { - _pause(); - } - - /** - * @dev Unpause the contract to allow transactions again. - */ - - function unpause() external onlyPauser { - _unpause(); - } - - /** - * @dev Entrypoint to send data and value through ZetaChain. - */ - function send(ZetaInterfaces.SendInput calldata input) external virtual {} - - /** - * @dev Handler to receive data from other chain. - * This method can be called only by TSS. Access validation is in implementation. - */ - function onReceive( - bytes calldata zetaTxSenderAddress, - uint256 sourceChainId, - address destinationAddress, - uint256 zetaValue, - bytes calldata message, - bytes32 internalSendHash - ) external virtual {} - - /** - * @dev Handler to receive errors from other chain. - * This method can be called only by TSS. Access validation is in implementation. - */ - function onRevert( - address zetaTxSenderAddress, - uint256 sourceChainId, - bytes calldata destinationAddress, - uint256 destinationChainId, - uint256 remainingZetaValue, - bytes calldata message, - bytes32 internalSendHash - ) external virtual {} -} diff --git a/packages/protocol-contracts/contracts/ZetaConnector.eth.sol b/packages/protocol-contracts/contracts/ZetaConnector.eth.sol deleted file mode 100644 index d0aa2115..00000000 --- a/packages/protocol-contracts/contracts/ZetaConnector.eth.sol +++ /dev/null @@ -1,112 +0,0 @@ -// SPDX-License-Identifier: MIT -pragma solidity 0.8.7; - -import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; - -import "./interfaces/ConnectorErrors.sol"; -import "./ZetaConnector.base.sol"; -import "./interfaces/ZetaInterfaces.sol"; - -/** - * @dev ETH implementation of ZetaConnector. - * This contract manages interactions between TSS and different chains. - * This version is only for Ethereum network because in the other chains we mint and burn and in this one we lock and unlock. - */ -contract ZetaConnectorEth is ZetaConnectorBase { - constructor( - address zetaToken_, - address tssAddress_, - address tssAddressUpdater_, - address pauserAddress_ - ) ZetaConnectorBase(zetaToken_, tssAddress_, tssAddressUpdater_, pauserAddress_) {} - - function getLockedAmount() external view returns (uint256) { - return IERC20(zetaToken).balanceOf(address(this)); - } - - /** - * @dev Entrypoint to send data through ZetaChain - * This call locks the token on the contract and emits an event with all the data needed by the protocol. - */ - function send(ZetaInterfaces.SendInput calldata input) external override whenNotPaused { - bool success = IERC20(zetaToken).transferFrom(msg.sender, address(this), input.zetaValueAndGas); - if (!success) revert ZetaTransferError(); - - emit ZetaSent( - tx.origin, - msg.sender, - input.destinationChainId, - input.destinationAddress, - input.zetaValueAndGas, - input.destinationGasLimit, - input.message, - input.zetaParams - ); - } - - /** - * @dev Handler to receive data from other chain. - * This method can be called only by TSS. - * Transfers the Zeta tokens to destination and calls onZetaMessage if it's needed. - */ - function onReceive( - bytes calldata zetaTxSenderAddress, - uint256 sourceChainId, - address destinationAddress, - uint256 zetaValue, - bytes calldata message, - bytes32 internalSendHash - ) external override onlyTssAddress { - bool success = IERC20(zetaToken).transfer(destinationAddress, zetaValue); - if (!success) revert ZetaTransferError(); - - if (message.length > 0) { - ZetaReceiver(destinationAddress).onZetaMessage( - ZetaInterfaces.ZetaMessage(zetaTxSenderAddress, sourceChainId, destinationAddress, zetaValue, message) - ); - } - - emit ZetaReceived(zetaTxSenderAddress, sourceChainId, destinationAddress, zetaValue, message, internalSendHash); - } - - /** - * @dev Handler to receive errors from other chain. - * This method can be called only by TSS. - * Transfers the Zeta tokens to destination and calls onZetaRevert if it's needed. - */ - function onRevert( - address zetaTxSenderAddress, - uint256 sourceChainId, - bytes calldata destinationAddress, - uint256 destinationChainId, - uint256 remainingZetaValue, - bytes calldata message, - bytes32 internalSendHash - ) external override whenNotPaused onlyTssAddress { - bool success = IERC20(zetaToken).transfer(zetaTxSenderAddress, remainingZetaValue); - if (!success) revert ZetaTransferError(); - - if (message.length > 0) { - ZetaReceiver(zetaTxSenderAddress).onZetaRevert( - ZetaInterfaces.ZetaRevert( - zetaTxSenderAddress, - sourceChainId, - destinationAddress, - destinationChainId, - remainingZetaValue, - message - ) - ); - } - - emit ZetaReverted( - zetaTxSenderAddress, - sourceChainId, - destinationChainId, - destinationAddress, - remainingZetaValue, - message, - internalSendHash - ); - } -} diff --git a/packages/protocol-contracts/contracts/ZetaConnector.non-eth.sol b/packages/protocol-contracts/contracts/ZetaConnector.non-eth.sol deleted file mode 100644 index 98cc8061..00000000 --- a/packages/protocol-contracts/contracts/ZetaConnector.non-eth.sol +++ /dev/null @@ -1,120 +0,0 @@ -// SPDX-License-Identifier: MIT -pragma solidity 0.8.7; - -import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; - -import "./ZetaConnector.base.sol"; -import "./interfaces/ZetaInterfaces.sol"; -import "./interfaces/ZetaNonEthInterface.sol"; - -/** - * @dev Non ETH implementation of ZetaConnector. - * This contract manages interactions between TSS and different chains. - * This version is for every chain but Etherum network because in the other chains we mint and burn and in Etherum we lock and unlock - */ -contract ZetaConnectorNonEth is ZetaConnectorBase { - uint256 public maxSupply = 2 ** 256 - 1; - - constructor( - address zetaTokenAddress_, - address tssAddress_, - address tssAddressUpdater_, - address pauserAddress_ - ) ZetaConnectorBase(zetaTokenAddress_, tssAddress_, tssAddressUpdater_, pauserAddress_) {} - - function getLockedAmount() external view returns (uint256) { - return ZetaNonEthInterface(zetaToken).balanceOf(address(this)); - } - - function setMaxSupply(uint256 maxSupply_) external onlyTssAddress { - maxSupply = maxSupply_; - } - - /** - * @dev Entry point to send data to protocol - * This call burn the token and emit an event with all the data needed by the protocol - */ - function send(ZetaInterfaces.SendInput calldata input) external override whenNotPaused { - ZetaNonEthInterface(zetaToken).burnFrom(msg.sender, input.zetaValueAndGas); - - emit ZetaSent( - tx.origin, - msg.sender, - input.destinationChainId, - input.destinationAddress, - input.zetaValueAndGas, - input.destinationGasLimit, - input.message, - input.zetaParams - ); - } - - /** - * @dev Handler to receive data from other chain. - * This method can be called only by TSS. - * Transfer the Zeta tokens to destination and calls onZetaMessage if it's needed. - * To perform the transfer mint new tokens, validating first the maxSupply allowed in the current chain. - */ - function onReceive( - bytes calldata zetaTxSenderAddress, - uint256 sourceChainId, - address destinationAddress, - uint256 zetaValue, - bytes calldata message, - bytes32 internalSendHash - ) external override onlyTssAddress { - if (zetaValue + ZetaNonEthInterface(zetaToken).totalSupply() > maxSupply) revert ExceedsMaxSupply(maxSupply); - ZetaNonEthInterface(zetaToken).mint(destinationAddress, zetaValue, internalSendHash); - - if (message.length > 0) { - ZetaReceiver(destinationAddress).onZetaMessage( - ZetaInterfaces.ZetaMessage(zetaTxSenderAddress, sourceChainId, destinationAddress, zetaValue, message) - ); - } - - emit ZetaReceived(zetaTxSenderAddress, sourceChainId, destinationAddress, zetaValue, message, internalSendHash); - } - - /** - * @dev Handler to receive errors from other chain. - * This method can be called only by TSS. - * Transfer the Zeta tokens to destination and calls onZetaRevert if it's needed. - * To perform the transfer mint new tokens, validating first the maxSupply allowed in the current chain. - */ - function onRevert( - address zetaTxSenderAddress, - uint256 sourceChainId, - bytes calldata destinationAddress, - uint256 destinationChainId, - uint256 remainingZetaValue, - bytes calldata message, - bytes32 internalSendHash - ) external override whenNotPaused onlyTssAddress { - if (remainingZetaValue + ZetaNonEthInterface(zetaToken).totalSupply() > maxSupply) - revert ExceedsMaxSupply(maxSupply); - ZetaNonEthInterface(zetaToken).mint(zetaTxSenderAddress, remainingZetaValue, internalSendHash); - - if (message.length > 0) { - ZetaReceiver(zetaTxSenderAddress).onZetaRevert( - ZetaInterfaces.ZetaRevert( - zetaTxSenderAddress, - sourceChainId, - destinationAddress, - destinationChainId, - remainingZetaValue, - message - ) - ); - } - - emit ZetaReverted( - zetaTxSenderAddress, - sourceChainId, - destinationChainId, - destinationAddress, - remainingZetaValue, - message, - internalSendHash - ); - } -} diff --git a/packages/protocol-contracts/contracts/ZetaInteractor.sol b/packages/protocol-contracts/contracts/ZetaInteractor.sol deleted file mode 100644 index bed6a780..00000000 --- a/packages/protocol-contracts/contracts/ZetaInteractor.sol +++ /dev/null @@ -1,57 +0,0 @@ -// SPDX-License-Identifier: MIT -pragma solidity 0.8.7; - -import "./openzeppelin/Ownable2Step.sol"; - -import "./interfaces/ZetaInterfaces.sol"; -import "./interfaces/ZetaInteractorErrors.sol"; - -abstract contract ZetaInteractor is Ownable2Step, ZetaInteractorErrors { - bytes32 constant ZERO_BYTES = keccak256(new bytes(0)); - uint256 internal immutable currentChainId; - ZetaConnector public immutable connector; - - /** - * @dev Maps a chain id to its corresponding address of the MultiChainSwap contract - * The address is expressed in bytes to allow non-EVM chains - * This mapping is useful, mainly, for two reasons: - * - Given a chain id, the contract is able to route a transaction to its corresponding address - * - To check that the messages (onZetaMessage, onZetaRevert) come from a trusted source - */ - mapping(uint256 => bytes) public interactorsByChainId; - - modifier isValidMessageCall(ZetaInterfaces.ZetaMessage calldata zetaMessage) { - _isValidCaller(); - if (keccak256(zetaMessage.zetaTxSenderAddress) != keccak256(interactorsByChainId[zetaMessage.sourceChainId])) - revert InvalidZetaMessageCall(); - _; - } - - modifier isValidRevertCall(ZetaInterfaces.ZetaRevert calldata zetaRevert) { - _isValidCaller(); - if (zetaRevert.zetaTxSenderAddress != address(this)) revert InvalidZetaRevertCall(); - if (zetaRevert.sourceChainId != currentChainId) revert InvalidZetaRevertCall(); - _; - } - - constructor(address zetaConnectorAddress) { - if (zetaConnectorAddress == address(0)) revert ZetaCommonErrors.InvalidAddress(); - currentChainId = block.chainid; - connector = ZetaConnector(zetaConnectorAddress); - } - - function _isValidCaller() private view { - if (msg.sender != address(connector)) revert InvalidCaller(msg.sender); - } - - /** - * @dev Useful for contracts that inherit from this one - */ - function _isValidChainId(uint256 chainId) internal view returns (bool) { - return (keccak256(interactorsByChainId[chainId]) != ZERO_BYTES); - } - - function setInteractorByChainId(uint256 destinationChainId, bytes calldata contractAddress) external onlyOwner { - interactorsByChainId[destinationChainId] = contractAddress; - } -} diff --git a/packages/protocol-contracts/contracts/ZetaTokenConsumerUniV2.strategy.sol b/packages/protocol-contracts/contracts/ZetaTokenConsumerUniV2.strategy.sol deleted file mode 100644 index 50e18202..00000000 --- a/packages/protocol-contracts/contracts/ZetaTokenConsumerUniV2.strategy.sol +++ /dev/null @@ -1,161 +0,0 @@ -// SPDX-License-Identifier: MIT -pragma solidity 0.8.7; - -import "@openzeppelin/contracts/interfaces/IERC20.sol"; -import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol"; -import "@uniswap/v2-periphery/contracts/interfaces/IUniswapV2Router02.sol"; - -import "./interfaces/ZetaInterfaces.sol"; - -interface ZetaTokenConsumerUniV2Errors { - error InputCantBeZero(); -} - -/** - * @dev Uniswap V2 strategy for ZetaTokenConsumer - */ -contract ZetaTokenConsumerUniV2 is ZetaTokenConsumer, ZetaTokenConsumerUniV2Errors { - using SafeERC20 for IERC20; - uint256 internal constant MAX_DEADLINE = 200; - - address internal immutable wETH; - address public immutable zetaToken; - - IUniswapV2Router02 internal immutable uniswapV2Router; - - constructor(address zetaToken_, address uniswapV2Router_) { - if (zetaToken_ == address(0) || uniswapV2Router_ == address(0)) revert ZetaCommonErrors.InvalidAddress(); - - zetaToken = zetaToken_; - uniswapV2Router = IUniswapV2Router02(uniswapV2Router_); - wETH = IUniswapV2Router02(uniswapV2Router_).WETH(); - } - - function getZetaFromEth( - address destinationAddress, - uint256 minAmountOut - ) external payable override returns (uint256) { - if (destinationAddress == address(0)) revert ZetaCommonErrors.InvalidAddress(); - if (msg.value == 0) revert InputCantBeZero(); - - address[] memory path = new address[](2); - path[0] = wETH; - path[1] = zetaToken; - - uint256[] memory amounts = uniswapV2Router.swapExactETHForTokens{value: msg.value}( - minAmountOut, - path, - destinationAddress, - block.timestamp + MAX_DEADLINE - ); - - uint256 amountOut = amounts[path.length - 1]; - - emit EthExchangedForZeta(msg.value, amountOut); - return amountOut; - } - - function getZetaFromToken( - address destinationAddress, - uint256 minAmountOut, - address inputToken, - uint256 inputTokenAmount - ) external override returns (uint256) { - if (destinationAddress == address(0) || inputToken == address(0)) revert ZetaCommonErrors.InvalidAddress(); - if (inputTokenAmount == 0) revert InputCantBeZero(); - - IERC20(inputToken).safeTransferFrom(msg.sender, address(this), inputTokenAmount); - IERC20(inputToken).safeApprove(address(uniswapV2Router), inputTokenAmount); - - address[] memory path; - if (inputToken == wETH) { - path = new address[](2); - path[0] = wETH; - path[1] = zetaToken; - } else { - path = new address[](3); - path[0] = inputToken; - path[1] = wETH; - path[2] = zetaToken; - } - - uint256[] memory amounts = uniswapV2Router.swapExactTokensForTokens( - inputTokenAmount, - minAmountOut, - path, - destinationAddress, - block.timestamp + MAX_DEADLINE - ); - uint256 amountOut = amounts[path.length - 1]; - - emit TokenExchangedForZeta(inputToken, inputTokenAmount, amountOut); - return amountOut; - } - - function getEthFromZeta( - address destinationAddress, - uint256 minAmountOut, - uint256 zetaTokenAmount - ) external override returns (uint256) { - if (destinationAddress == address(0)) revert ZetaCommonErrors.InvalidAddress(); - if (zetaTokenAmount == 0) revert InputCantBeZero(); - - IERC20(zetaToken).safeTransferFrom(msg.sender, address(this), zetaTokenAmount); - IERC20(zetaToken).safeApprove(address(uniswapV2Router), zetaTokenAmount); - - address[] memory path = new address[](2); - path[0] = zetaToken; - path[1] = wETH; - - uint256[] memory amounts = uniswapV2Router.swapExactTokensForETH( - zetaTokenAmount, - minAmountOut, - path, - destinationAddress, - block.timestamp + MAX_DEADLINE - ); - - uint256 amountOut = amounts[path.length - 1]; - - emit ZetaExchangedForEth(zetaTokenAmount, amountOut); - return amountOut; - } - - function getTokenFromZeta( - address destinationAddress, - uint256 minAmountOut, - address outputToken, - uint256 zetaTokenAmount - ) external override returns (uint256) { - if (destinationAddress == address(0) || outputToken == address(0)) revert ZetaCommonErrors.InvalidAddress(); - if (zetaTokenAmount == 0) revert InputCantBeZero(); - - IERC20(zetaToken).safeTransferFrom(msg.sender, address(this), zetaTokenAmount); - IERC20(zetaToken).safeApprove(address(uniswapV2Router), zetaTokenAmount); - - address[] memory path; - if (outputToken == wETH) { - path = new address[](2); - path[0] = zetaToken; - path[1] = wETH; - } else { - path = new address[](3); - path[0] = zetaToken; - path[1] = wETH; - path[2] = outputToken; - } - - uint256[] memory amounts = uniswapV2Router.swapExactTokensForTokens( - zetaTokenAmount, - minAmountOut, - path, - destinationAddress, - block.timestamp + MAX_DEADLINE - ); - - uint256 amountOut = amounts[path.length - 1]; - - emit ZetaExchangedForToken(outputToken, zetaTokenAmount, amountOut); - return amountOut; - } -} diff --git a/packages/protocol-contracts/contracts/ZetaTokenConsumerUniV3.strategy.sol b/packages/protocol-contracts/contracts/ZetaTokenConsumerUniV3.strategy.sol deleted file mode 100644 index 2b82db2c..00000000 --- a/packages/protocol-contracts/contracts/ZetaTokenConsumerUniV3.strategy.sol +++ /dev/null @@ -1,182 +0,0 @@ -// SPDX-License-Identifier: MIT -pragma solidity 0.8.7; - -import "@openzeppelin/contracts/interfaces/IERC20.sol"; -import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol"; -import "@uniswap/v3-periphery/contracts/interfaces/ISwapRouter.sol"; -import "@uniswap/v3-periphery/contracts/interfaces/IQuoter.sol"; - -import "./interfaces/ZetaInterfaces.sol"; - -interface ZetaTokenConsumerUniV3Errors { - error InputCantBeZero(); - - error ErrorSendingETH(); - - error ReentrancyError(); -} - -interface WETH9 { - function withdraw(uint256 wad) external; -} - -/** - * @dev Uniswap V3 strategy for ZetaTokenConsumer - */ -contract ZetaTokenConsumerUniV3 is ZetaTokenConsumer, ZetaTokenConsumerUniV3Errors { - using SafeERC20 for IERC20; - uint256 internal constant MAX_DEADLINE = 200; - - uint24 public immutable zetaPoolFee; - uint24 public immutable tokenPoolFee; - - address internal immutable WETH9Address; - address public immutable zetaToken; - - ISwapRouter public immutable uniswapV3Router; - IQuoter public immutable quoter; - - bool internal _locked; - - constructor( - address zetaToken_, - address uniswapV3Router_, - address quoter_, - address WETH9Address_, - uint24 zetaPoolFee_, - uint24 tokenPoolFee_ - ) { - if ( - zetaToken_ == address(0) || - uniswapV3Router_ == address(0) || - quoter_ == address(0) || - WETH9Address_ == address(0) - ) revert ZetaCommonErrors.InvalidAddress(); - - zetaToken = zetaToken_; - uniswapV3Router = ISwapRouter(uniswapV3Router_); - quoter = IQuoter(quoter_); - WETH9Address = WETH9Address_; - zetaPoolFee = zetaPoolFee_; - tokenPoolFee = tokenPoolFee_; - } - - modifier nonReentrant() { - if (_locked) revert ReentrancyError(); - _locked = true; - _; - _locked = false; - } - - receive() external payable {} - - function getZetaFromEth( - address destinationAddress, - uint256 minAmountOut - ) external payable override returns (uint256) { - if (destinationAddress == address(0)) revert ZetaCommonErrors.InvalidAddress(); - if (msg.value == 0) revert InputCantBeZero(); - - ISwapRouter.ExactInputSingleParams memory params = ISwapRouter.ExactInputSingleParams({ - deadline: block.timestamp + MAX_DEADLINE, - tokenIn: WETH9Address, - tokenOut: zetaToken, - fee: zetaPoolFee, - recipient: destinationAddress, - amountIn: msg.value, - amountOutMinimum: minAmountOut, - sqrtPriceLimitX96: 0 - }); - - uint256 amountOut = uniswapV3Router.exactInputSingle{value: msg.value}(params); - - emit EthExchangedForZeta(msg.value, amountOut); - return amountOut; - } - - function getZetaFromToken( - address destinationAddress, - uint256 minAmountOut, - address inputToken, - uint256 inputTokenAmount - ) external override returns (uint256) { - if (destinationAddress == address(0) || inputToken == address(0)) revert ZetaCommonErrors.InvalidAddress(); - if (inputTokenAmount == 0) revert InputCantBeZero(); - - IERC20(inputToken).safeTransferFrom(msg.sender, address(this), inputTokenAmount); - IERC20(inputToken).safeApprove(address(uniswapV3Router), inputTokenAmount); - - ISwapRouter.ExactInputParams memory params = ISwapRouter.ExactInputParams({ - deadline: block.timestamp + MAX_DEADLINE, - path: abi.encodePacked(inputToken, tokenPoolFee, WETH9Address, zetaPoolFee, zetaToken), - recipient: destinationAddress, - amountIn: inputTokenAmount, - amountOutMinimum: minAmountOut - }); - - uint256 amountOut = uniswapV3Router.exactInput(params); - - emit TokenExchangedForZeta(inputToken, inputTokenAmount, amountOut); - return amountOut; - } - - function getEthFromZeta( - address destinationAddress, - uint256 minAmountOut, - uint256 zetaTokenAmount - ) external override returns (uint256) { - if (destinationAddress == address(0)) revert ZetaCommonErrors.InvalidAddress(); - if (zetaTokenAmount == 0) revert InputCantBeZero(); - - IERC20(zetaToken).safeTransferFrom(msg.sender, address(this), zetaTokenAmount); - IERC20(zetaToken).safeApprove(address(uniswapV3Router), zetaTokenAmount); - - ISwapRouter.ExactInputSingleParams memory params = ISwapRouter.ExactInputSingleParams({ - deadline: block.timestamp + MAX_DEADLINE, - tokenIn: zetaToken, - tokenOut: WETH9Address, - fee: zetaPoolFee, - recipient: address(this), - amountIn: zetaTokenAmount, - amountOutMinimum: minAmountOut, - sqrtPriceLimitX96: 0 - }); - - uint256 amountOut = uniswapV3Router.exactInputSingle(params); - - WETH9(WETH9Address).withdraw(amountOut); - - emit ZetaExchangedForEth(zetaTokenAmount, amountOut); - - (bool sent, ) = destinationAddress.call{value: amountOut}(""); - if (!sent) revert ErrorSendingETH(); - - return amountOut; - } - - function getTokenFromZeta( - address destinationAddress, - uint256 minAmountOut, - address outputToken, - uint256 zetaTokenAmount - ) external override nonReentrant returns (uint256) { - if (destinationAddress == address(0) || outputToken == address(0)) revert ZetaCommonErrors.InvalidAddress(); - if (zetaTokenAmount == 0) revert InputCantBeZero(); - - IERC20(zetaToken).safeTransferFrom(msg.sender, address(this), zetaTokenAmount); - IERC20(zetaToken).safeApprove(address(uniswapV3Router), zetaTokenAmount); - - ISwapRouter.ExactInputParams memory params = ISwapRouter.ExactInputParams({ - deadline: block.timestamp + MAX_DEADLINE, - path: abi.encodePacked(zetaToken, zetaPoolFee, WETH9Address, tokenPoolFee, outputToken), - recipient: destinationAddress, - amountIn: zetaTokenAmount, - amountOutMinimum: minAmountOut - }); - - uint256 amountOut = uniswapV3Router.exactInput(params); - - emit ZetaExchangedForToken(outputToken, zetaTokenAmount, amountOut); - return amountOut; - } -} diff --git a/packages/protocol-contracts/contracts/interfaces/ConnectorErrors.sol b/packages/protocol-contracts/contracts/interfaces/ConnectorErrors.sol deleted file mode 100644 index 5fd7d744..00000000 --- a/packages/protocol-contracts/contracts/interfaces/ConnectorErrors.sol +++ /dev/null @@ -1,25 +0,0 @@ -// SPDX-License-Identifier: MIT -pragma solidity 0.8.7; - -/** - * @dev Interface with connector custom errors - */ -interface ConnectorErrors { - // @dev Thrown when caller is not the address defined as paused address - error CallerIsNotPauser(address caller); - - // @dev Thrown when caller is not the address defined as TSS address - error CallerIsNotTss(address caller); - - // @dev Thrown when caller is not the address defined as TSS Updater address - error CallerIsNotTssUpdater(address caller); - - // @dev Thrown when caller is not the address defined as TSS or TSS Updater address - error CallerIsNotTssOrUpdater(address caller); - - // @dev Thrown when Zeta can't be transferred for some reason - error ZetaTransferError(); - - // @dev Thrown when maxSupply will be exceed if minting will proceed - error ExceedsMaxSupply(uint256 maxSupply); -} diff --git a/packages/protocol-contracts/contracts/interfaces/ZetaErrors.sol b/packages/protocol-contracts/contracts/interfaces/ZetaErrors.sol deleted file mode 100644 index 88976a1f..00000000 --- a/packages/protocol-contracts/contracts/interfaces/ZetaErrors.sol +++ /dev/null @@ -1,25 +0,0 @@ -// SPDX-License-Identifier: MIT -pragma solidity 0.8.7; - -/** - * @dev Common custom errors - */ -interface ZetaErrors { - // @dev Thrown when caller is not the address defined as TSS address - error CallerIsNotTss(address caller); - - // @dev Thrown when caller is not the address defined as connector address - error CallerIsNotConnector(address caller); - - // @dev Thrown when caller is not the address defined as TSS Updater address - error CallerIsNotTssUpdater(address caller); - - // @dev Thrown when caller is not the address defined as TSS or TSS Updater address - error CallerIsNotTssOrUpdater(address caller); - - // @dev Thrown when a contract receives an invalid address param, mostly zero address validation - error InvalidAddress(); - - // @dev Thrown when Zeta can't be transferred for some reason - error ZetaTransferError(); -} diff --git a/packages/protocol-contracts/contracts/interfaces/ZetaInteractorErrors.sol b/packages/protocol-contracts/contracts/interfaces/ZetaInteractorErrors.sol deleted file mode 100644 index df10982f..00000000 --- a/packages/protocol-contracts/contracts/interfaces/ZetaInteractorErrors.sol +++ /dev/null @@ -1,19 +0,0 @@ -// SPDX-License-Identifier: MIT -pragma solidity 0.8.7; - -/** - * @dev Interface with Zeta Interactor errors - */ -interface ZetaInteractorErrors { - // @dev Thrown when try to send a message or tokens to a non whitelisted chain - error InvalidDestinationChainId(); - - // @dev Thrown when the caller is invalid. e.g.: if onZetaMessage or onZetaRevert are not called by Connector - error InvalidCaller(address caller); - - // @dev Thrown when message on onZetaMessage has the wrong format - error InvalidZetaMessageCall(); - - // @dev Thrown when message on onZetaRevert has the wrong format - error InvalidZetaRevertCall(); -} diff --git a/packages/protocol-contracts/contracts/interfaces/ZetaInterfaces.sol b/packages/protocol-contracts/contracts/interfaces/ZetaInterfaces.sol deleted file mode 100644 index d078d6d0..00000000 --- a/packages/protocol-contracts/contracts/interfaces/ZetaInterfaces.sol +++ /dev/null @@ -1,108 +0,0 @@ -// SPDX-License-Identifier: MIT -pragma solidity 0.8.7; - -interface ZetaInterfaces { - /** - * @dev Use SendInput to interact with the Connector: connector.send(SendInput) - */ - struct SendInput { - /// @dev Chain id of the destination chain. More about chain ids https://docs.zetachain.com/learn/glossary#chain-id - uint256 destinationChainId; - /// @dev Address receiving the message on the destination chain (expressed in bytes since it can be non-EVM) - bytes destinationAddress; - /// @dev Gas limit for the destination chain's transaction - uint256 destinationGasLimit; - /// @dev An encoded, arbitrary message to be parsed by the destination contract - bytes message; - /// @dev ZETA to be sent cross-chain + ZetaChain gas fees + destination chain gas fees (expressed in ZETA) - uint256 zetaValueAndGas; - /// @dev Optional parameters for the ZetaChain protocol - bytes zetaParams; - } - - /** - * @dev Our Connector calls onZetaMessage with this struct as argument - */ - struct ZetaMessage { - bytes zetaTxSenderAddress; - uint256 sourceChainId; - address destinationAddress; - /// @dev Remaining ZETA from zetaValueAndGas after subtracting ZetaChain gas fees and destination gas fees - uint256 zetaValue; - bytes message; - } - - /** - * @dev Our Connector calls onZetaRevert with this struct as argument - */ - struct ZetaRevert { - address zetaTxSenderAddress; - uint256 sourceChainId; - bytes destinationAddress; - uint256 destinationChainId; - /// @dev Equals to: zetaValueAndGas - ZetaChain gas fees - destination chain gas fees - source chain revert tx gas fees - uint256 remainingZetaValue; - bytes message; - } -} - -interface ZetaConnector { - /** - * @dev Sending value and data cross-chain is as easy as calling connector.send(SendInput) - */ - function send(ZetaInterfaces.SendInput calldata input) external; -} - -interface ZetaReceiver { - /** - * @dev onZetaMessage is called when a cross-chain message reaches a contract - */ - function onZetaMessage(ZetaInterfaces.ZetaMessage calldata zetaMessage) external; - - /** - * @dev onZetaRevert is called when a cross-chain message reverts. - * It's useful to rollback to the original state - */ - function onZetaRevert(ZetaInterfaces.ZetaRevert calldata zetaRevert) external; -} - -/** - * @dev ZetaTokenConsumer makes it easier to handle the following situations: - * - Getting Zeta using native coin (to pay for destination gas while using `connector.send`) - * - Getting Zeta using a token (to pay for destination gas while using `connector.send`) - * - Getting native coin using Zeta (to return unused destination gas when `onZetaRevert` is executed) - * - Getting a token using Zeta (to return unused destination gas when `onZetaRevert` is executed) - * @dev The interface can be implemented using different strategies, like UniswapV2, UniswapV3, etc - */ -interface ZetaTokenConsumer { - event EthExchangedForZeta(uint256 amountIn, uint256 amountOut); - event TokenExchangedForZeta(address token, uint256 amountIn, uint256 amountOut); - event ZetaExchangedForEth(uint256 amountIn, uint256 amountOut); - event ZetaExchangedForToken(address token, uint256 amountIn, uint256 amountOut); - - function getZetaFromEth(address destinationAddress, uint256 minAmountOut) external payable returns (uint256); - - function getZetaFromToken( - address destinationAddress, - uint256 minAmountOut, - address inputToken, - uint256 inputTokenAmount - ) external returns (uint256); - - function getEthFromZeta( - address destinationAddress, - uint256 minAmountOut, - uint256 zetaTokenAmount - ) external returns (uint256); - - function getTokenFromZeta( - address destinationAddress, - uint256 minAmountOut, - address outputToken, - uint256 zetaTokenAmount - ) external returns (uint256); -} - -interface ZetaCommonErrors { - error InvalidAddress(); -} diff --git a/packages/protocol-contracts/contracts/interfaces/ZetaNonEthInterface.sol b/packages/protocol-contracts/contracts/interfaces/ZetaNonEthInterface.sol deleted file mode 100644 index 164645cd..00000000 --- a/packages/protocol-contracts/contracts/interfaces/ZetaNonEthInterface.sol +++ /dev/null @@ -1,13 +0,0 @@ -// SPDX-License-Identifier: MIT -pragma solidity 0.8.7; - -import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; - -/** - * @dev ZetaNonEthInterface is a mintable / burnable version of IERC20 - */ -interface ZetaNonEthInterface is IERC20 { - function burnFrom(address account, uint256 amount) external; - - function mint(address mintee, uint256 value, bytes32 internalSendHash) external; -} diff --git a/packages/protocol-contracts/contracts/openzeppelin/Ownable2Step.sol b/packages/protocol-contracts/contracts/openzeppelin/Ownable2Step.sol deleted file mode 100644 index d08053f5..00000000 --- a/packages/protocol-contracts/contracts/openzeppelin/Ownable2Step.sol +++ /dev/null @@ -1,57 +0,0 @@ -// SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v4.7.0) (access/Ownable.sol) - -pragma solidity ^0.8.0; - -import "@openzeppelin/contracts/access/Ownable.sol"; - -/** - * @dev Contract module which provides access control mechanism, where - * there is an account (an owner) that can be granted exclusive access to - * specific functions. - * - * By default, the owner account will be the one that deploys the contract. This - * can later be changed with {transferOwnership} and {acceptOwnership}. - * - * This module is used through inheritance. It will make available all functions - * from parent (Ownable). - */ -abstract contract Ownable2Step is Ownable { - address private _pendingOwner; - - event OwnershipTransferStarted(address indexed previousOwner, address indexed newOwner); - - /** - * @dev Returns the address of the pending owner. - */ - function pendingOwner() public view virtual returns (address) { - return _pendingOwner; - } - - /** - * @dev Starts the ownership transfer of the contract to a new account. Replaces the pending transfer if there is one. - * Can only be called by the current owner. - */ - function transferOwnership(address newOwner) public virtual override onlyOwner { - _pendingOwner = newOwner; - emit OwnershipTransferStarted(owner(), newOwner); - } - - /** - * @dev Transfers ownership of the contract to a new account (`newOwner`) and deletes any pending owner. - * Internal function without access restriction. - */ - function _transferOwnership(address newOwner) internal virtual override { - delete _pendingOwner; - super._transferOwnership(newOwner); - } - - /** - * @dev The new owner accepts the ownership transfer. - */ - function acceptOwnership() external { - address sender = _msgSender(); - require(pendingOwner() == sender, "Ownable2Step: caller is not the new owner"); - _transferOwnership(sender); - } -} diff --git a/packages/protocol-contracts/contracts/testing/TestUniswapV3Contracts.sol b/packages/protocol-contracts/contracts/testing/TestUniswapV3Contracts.sol deleted file mode 100644 index b6564cdc..00000000 --- a/packages/protocol-contracts/contracts/testing/TestUniswapV3Contracts.sol +++ /dev/null @@ -1,181 +0,0 @@ -// SPDX-License-Identifier: GPL-2.0-or-later -pragma solidity >=0.7.5; -pragma abicoder v2; - -/// @title Non-fungible token for positions -/// @notice Wraps Uniswap V3 positions in a non-fungible token interface which allows for them to be transferred -/// and authorized. -interface INonfungiblePositionManager { - /// @notice Emitted when liquidity is increased for a position NFT - /// @dev Also emitted when a token is minted - /// @param tokenId The ID of the token for which liquidity was increased - /// @param liquidity The amount by which liquidity for the NFT position was increased - /// @param amount0 The amount of token0 that was paid for the increase in liquidity - /// @param amount1 The amount of token1 that was paid for the increase in liquidity - event IncreaseLiquidity(uint256 indexed tokenId, uint128 liquidity, uint256 amount0, uint256 amount1); - /// @notice Emitted when liquidity is decreased for a position NFT - /// @param tokenId The ID of the token for which liquidity was decreased - /// @param liquidity The amount by which liquidity for the NFT position was decreased - /// @param amount0 The amount of token0 that was accounted for the decrease in liquidity - /// @param amount1 The amount of token1 that was accounted for the decrease in liquidity - event DecreaseLiquidity(uint256 indexed tokenId, uint128 liquidity, uint256 amount0, uint256 amount1); - /// @notice Emitted when tokens are collected for a position NFT - /// @dev The amounts reported may not be exactly equivalent to the amounts transferred, due to rounding behavior - /// @param tokenId The ID of the token for which underlying tokens were collected - /// @param recipient The address of the account that received the collected tokens - /// @param amount0 The amount of token0 owed to the position that was collected - /// @param amount1 The amount of token1 owed to the position that was collected - event Collect(uint256 indexed tokenId, address recipient, uint256 amount0, uint256 amount1); - - /// @notice Returns the position information associated with a given token ID. - /// @dev Throws if the token ID is not valid. - /// @param tokenId The ID of the token that represents the position - /// @return nonce The nonce for permits - /// @return operator The address that is approved for spending - /// @return token0 The address of the token0 for a specific pool - /// @return token1 The address of the token1 for a specific pool - /// @return fee The fee associated with the pool - /// @return tickLower The lower end of the tick range for the position - /// @return tickUpper The higher end of the tick range for the position - /// @return liquidity The liquidity of the position - /// @return feeGrowthInside0LastX128 The fee growth of token0 as of the last action on the individual position - /// @return feeGrowthInside1LastX128 The fee growth of token1 as of the last action on the individual position - /// @return tokensOwed0 The uncollected amount of token0 owed to the position as of the last computation - /// @return tokensOwed1 The uncollected amount of token1 owed to the position as of the last computation - function positions(uint256 tokenId) - external - view - returns ( - uint96 nonce, - address operator, - address token0, - address token1, - uint24 fee, - int24 tickLower, - int24 tickUpper, - uint128 liquidity, - uint256 feeGrowthInside0LastX128, - uint256 feeGrowthInside1LastX128, - uint128 tokensOwed0, - uint128 tokensOwed1 - ); - - struct MintParams { - address token0; - address token1; - uint24 fee; - int24 tickLower; - int24 tickUpper; - uint256 amount0Desired; - uint256 amount1Desired; - uint256 amount0Min; - uint256 amount1Min; - address recipient; - uint256 deadline; - } - - /// @notice Creates a new position wrapped in a NFT - /// @dev Call this when the pool does exist and is initialized. Note that if the pool is created but not initialized - /// a method does not exist, i.e. the pool is assumed to be initialized. - /// @param params The params necessary to mint a position, encoded as `MintParams` in calldata - /// @return tokenId The ID of the token that represents the minted position - /// @return liquidity The amount of liquidity for this position - /// @return amount0 The amount of token0 - /// @return amount1 The amount of token1 - function mint(MintParams calldata params) - external - payable - returns ( - uint256 tokenId, - uint128 liquidity, - uint256 amount0, - uint256 amount1 - ); - - struct IncreaseLiquidityParams { - uint256 tokenId; - uint256 amount0Desired; - uint256 amount1Desired; - uint256 amount0Min; - uint256 amount1Min; - uint256 deadline; - } - - /// @notice Increases the amount of liquidity in a position, with tokens paid by the `msg.sender` - /// @param params tokenId The ID of the token for which liquidity is being increased, - /// amount0Desired The desired amount of token0 to be spent, - /// amount1Desired The desired amount of token1 to be spent, - /// amount0Min The minimum amount of token0 to spend, which serves as a slippage check, - /// amount1Min The minimum amount of token1 to spend, which serves as a slippage check, - /// deadline The time by which the transaction must be included to effect the change - /// @return liquidity The new liquidity amount as a result of the increase - /// @return amount0 The amount of token0 to acheive resulting liquidity - /// @return amount1 The amount of token1 to acheive resulting liquidity - function increaseLiquidity(IncreaseLiquidityParams calldata params) - external - payable - returns ( - uint128 liquidity, - uint256 amount0, - uint256 amount1 - ); - - struct DecreaseLiquidityParams { - uint256 tokenId; - uint128 liquidity; - uint256 amount0Min; - uint256 amount1Min; - uint256 deadline; - } - - /// @notice Decreases the amount of liquidity in a position and accounts it to the position - /// @param params tokenId The ID of the token for which liquidity is being decreased, - /// amount The amount by which liquidity will be decreased, - /// amount0Min The minimum amount of token0 that should be accounted for the burned liquidity, - /// amount1Min The minimum amount of token1 that should be accounted for the burned liquidity, - /// deadline The time by which the transaction must be included to effect the change - /// @return amount0 The amount of token0 accounted to the position's tokens owed - /// @return amount1 The amount of token1 accounted to the position's tokens owed - function decreaseLiquidity(DecreaseLiquidityParams calldata params) - external - payable - returns (uint256 amount0, uint256 amount1); - - struct CollectParams { - uint256 tokenId; - address recipient; - uint128 amount0Max; - uint128 amount1Max; - } - - /// @notice Collects up to a maximum amount of fees owed to a specific position to the recipient - /// @param params tokenId The ID of the NFT for which tokens are being collected, - /// recipient The account that should receive the tokens, - /// amount0Max The maximum amount of token0 to collect, - /// amount1Max The maximum amount of token1 to collect - /// @return amount0 The amount of fees collected in token0 - /// @return amount1 The amount of fees collected in token1 - function collect(CollectParams calldata params) external payable returns (uint256 amount0, uint256 amount1); - - /// @notice Burns a token ID, which deletes it from the NFT contract. The token must have 0 liquidity and all tokens - /// must be collected first. - /// @param tokenId The ID of the token that is being burned - function burn(uint256 tokenId) external payable; -} - -// import "@uniswap/v3-periphery/contracts/interfaces/IPoolInitializer.sol"; -interface IPoolInitializer { - /// @notice Creates a new pool if it does not exist, then initializes if not initialized - /// @dev This method can be bundled with others via IMulticall for the first action (e.g. mint) performed against a pool - /// @param token0 The contract address of token0 of the pool - /// @param token1 The contract address of token1 of the pool - /// @param fee The fee amount of the v3 pool for the specified token pair - /// @param sqrtPriceX96 The initial square root price of the pool as a Q64.96 value - /// @return pool Returns the pool address based on the pair of tokens and fee, will return the newly created pool address if necessary - function createAndInitializePoolIfNecessary( - address token0, - address token1, - uint24 fee, - uint160 sqrtPriceX96 - ) external payable returns (address pool); -} diff --git a/packages/protocol-contracts/contracts/testing/ZetaInteractorMock.sol b/packages/protocol-contracts/contracts/testing/ZetaInteractorMock.sol deleted file mode 100644 index 8b472fd9..00000000 --- a/packages/protocol-contracts/contracts/testing/ZetaInteractorMock.sol +++ /dev/null @@ -1,21 +0,0 @@ -// SPDX-License-Identifier: MIT -pragma solidity 0.8.7; - -import "../openzeppelin/Ownable2Step.sol"; -import "../ZetaInteractor.sol"; - -contract ZetaInteractorMock is Ownable2Step, ZetaInteractor, ZetaReceiver { - constructor(address zetaConnectorAddress) ZetaInteractor(zetaConnectorAddress) {} - - function onZetaMessage(ZetaInterfaces.ZetaMessage calldata zetaMessage) - external - override - isValidMessageCall(zetaMessage) - {} - - function onZetaRevert(ZetaInterfaces.ZetaRevert calldata zetaRevert) - external - override - isValidRevertCall(zetaRevert) - {} -} diff --git a/packages/protocol-contracts/contracts/testing/ZetaReceiverMock.sol b/packages/protocol-contracts/contracts/testing/ZetaReceiverMock.sol deleted file mode 100644 index 808d07b7..00000000 --- a/packages/protocol-contracts/contracts/testing/ZetaReceiverMock.sol +++ /dev/null @@ -1,18 +0,0 @@ -// SPDX-License-Identifier: MIT -pragma solidity 0.8.7; - -import "../interfaces/ZetaInterfaces.sol"; - -contract ZetaReceiverMock is ZetaReceiver { - event MockOnZetaMessage(address destinationAddress); - - event MockOnZetaRevert(address zetaTxSenderAddress); - - function onZetaMessage(ZetaInterfaces.ZetaMessage calldata zetaMessage) external override { - emit MockOnZetaMessage(zetaMessage.destinationAddress); - } - - function onZetaRevert(ZetaInterfaces.ZetaRevert calldata zetaRevert) external override { - emit MockOnZetaRevert(zetaRevert.zetaTxSenderAddress); - } -} diff --git a/packages/protocol-contracts/lib/ImmutableCreate2Factory/ImmutableCreate2Factory.helpers.ts b/packages/protocol-contracts/lib/ImmutableCreate2Factory/ImmutableCreate2Factory.helpers.ts deleted file mode 100644 index bbf48bb6..00000000 --- a/packages/protocol-contracts/lib/ImmutableCreate2Factory/ImmutableCreate2Factory.helpers.ts +++ /dev/null @@ -1,79 +0,0 @@ -import { Provider, TransactionReceipt } from "@ethersproject/providers"; -import { ImmutableCreate2Factory__factory } from "@zetachain/interfaces/typechain-types"; -import assert from "assert"; -import { ethers, Signer } from "ethers"; - -export const buildBytecode = (constructorTypes: any[], constructorArgs: any[], contractBytecode: string) => - `${contractBytecode}${encodeParams(constructorTypes, constructorArgs).slice(2)}`; - -export const buildCreate2Address = (saltHex: string, byteCode: string, factoryAddress: string) => { - const payload = ethers.utils.keccak256( - `0x${["ff", factoryAddress, saltHex, ethers.utils.keccak256(byteCode)].map(x => x.replace(/0x/, "")).join("")}` - ); - - return `0x${payload.slice(-40)}`.toLowerCase(); -}; - -export const numberToUint256 = (value: number) => { - const hex = value.toString(16); - return `0x${"0".repeat(64 - hex.length)}${hex}`; -}; - -export const saltToHex = (salt: string, signerAddress: string) => { - let salthex = ethers.utils.formatBytes32String(salt); - return `${signerAddress}${salthex.slice(2)}`.substring(0, salthex.length); -}; - -export const encodeParam = (dataType: any, data: any) => { - const abiCoder = ethers.utils.defaultAbiCoder; - return abiCoder.encode([dataType], [data]); -}; - -export const encodeParams = (dataTypes: any[], data: any[]) => { - const abiCoder = ethers.utils.defaultAbiCoder; - return abiCoder.encode(dataTypes, data); -}; - -export async function deployContractToAddress({ - factoryAddress, - salt, - contractBytecode, - constructorTypes = [] as string[], - constructorArgs = [] as any[], - signer, - transferOwner = false -}: { - constructorArgs?: any[]; - constructorTypes?: string[]; - contractBytecode: string; - factoryAddress: string; - salt: string; - signer: Signer; - transferOwner?: boolean; -}) { - const factory = ImmutableCreate2Factory__factory.connect(factoryAddress, signer); - - const bytecode = buildBytecode(constructorTypes, constructorArgs, contractBytecode); - - const computedAddr = await factory.findCreate2Address(salt, bytecode); - - const call = transferOwner ? factory.safeCreate2AndTransfer : factory.safeCreate2; - const tx = await call(salt, bytecode, { - gasLimit: 6000000 - }); - const result = await tx.wait(); - - return { - address: computedAddr as string, - receipt: result as TransactionReceipt, - txHash: result.transactionHash as string - }; -} - -/** - * Determines if there's a contract deployed on the provided address. - */ -export async function isDeployed(address: string, provider: Provider) { - const code = await provider.getCode(address); - return code.slice(2).length > 0; -} diff --git a/packages/protocol-contracts/lib/address.helpers.ts b/packages/protocol-contracts/lib/address.helpers.ts deleted file mode 100644 index d6c498f2..00000000 --- a/packages/protocol-contracts/lib/address.helpers.ts +++ /dev/null @@ -1,23 +0,0 @@ -import { getAddress as getAddressLib, NetworkName, ZetaAddress, ZetaNetworkName } from "@zetachain/addresses"; -import { network } from "hardhat"; - -const MissingZetaNetworkError = new Error( - "ZETA_NETWORK is not defined, please set the environment variable (e.g.: ZETA_NETWORK=athens )" -); - -export const getAddress = ( - address: ZetaAddress, - { - customNetworkName, - customZetaNetwork - }: { customNetworkName?: NetworkName; customZetaNetwork?: ZetaNetworkName } = {} -): string => { - const { name: _networkName } = network; - const networkName = customNetworkName || _networkName; - - const { ZETA_NETWORK: _ZETA_NETWORK } = process.env; - const zetaNetwork = customZetaNetwork || _ZETA_NETWORK; - - if (!zetaNetwork) throw MissingZetaNetworkError; - return getAddressLib({ address, networkName, zetaNetwork }); -}; diff --git a/packages/protocol-contracts/lib/contracts.constants.ts b/packages/protocol-contracts/lib/contracts.constants.ts deleted file mode 100644 index a773fdd1..00000000 --- a/packages/protocol-contracts/lib/contracts.constants.ts +++ /dev/null @@ -1,13 +0,0 @@ -export const ZETA_INITIAL_SUPPLY = 2_100_000_000; - -export const MAX_ETH_ADDRESS = "0xffffffffffffffffffffffffffffffffffffffff"; - -// dev: this values should be calculated using get-salt script -export const ZETA_TOKEN_SALT_NUMBER_ETH = "38208"; -export const ZETA_TOKEN_SALT_NUMBER_NON_ETH = "29411"; - -// dev: this values should be calculated using get-salt script -export const ZETA_CONNECTOR_SALT_NUMBER_ETH = "62538"; -export const ZETA_CONNECTOR_SALT_NUMBER_NON_ETH = "4945"; - -export const ZETA_CONSUMER_SALT_NUMBER = "0"; diff --git a/packages/protocol-contracts/lib/contracts.helpers.ts b/packages/protocol-contracts/lib/contracts.helpers.ts deleted file mode 100644 index e86c473f..00000000 --- a/packages/protocol-contracts/lib/contracts.helpers.ts +++ /dev/null @@ -1,172 +0,0 @@ -import { - ImmutableCreate2Factory, - ImmutableCreate2Factory__factory, - ZetaConnectorBase, - ZetaConnectorBase__factory as ZetaConnectorBaseFactory, - ZetaConnectorEth, - ZetaConnectorEth__factory as ZetaConnectorEthFactory, - ZetaConnectorNonEth, - ZetaConnectorNonEth__factory as ZetaConnectorNonEthFactory, - ZetaEth, - ZetaEth__factory as ZetaEthFactory, - ZetaInteractorMock, - ZetaInteractorMock__factory as ZetaInteractorMockFactory, - ZetaNonEth, - ZetaNonEth__factory as ZetaNonEthFactory, - ZetaReceiverMock, - ZetaReceiverMock__factory as ZetaReceiverMockFactory, - ZetaTokenConsumerUniV2, - ZetaTokenConsumerUniV2__factory as ZetaTokenConsumerUniV2Factory, - ZetaTokenConsumerUniV3, - ZetaTokenConsumerUniV3__factory as ZetaTokenConsumerUniV3Factory, -} from "@zetachain/interfaces/typechain-types"; -import { BaseContract, ContractFactory } from "ethers"; -import { ethers } from "hardhat"; - -export const isEthNetworkName = (networkName: string) => - networkName === "eth-localnet" || networkName === "goerli" || networkName === "eth-mainnet"; - -export const deployZetaConnectorBase = async ({ args }: { args: Parameters }) => { - const Factory = (await ethers.getContractFactory("ZetaConnectorBase")) as ZetaConnectorBaseFactory; - - const zetaConnectorContract = (await Factory.deploy(...args)) as ZetaConnectorBase; - - await zetaConnectorContract.deployed(); - - return zetaConnectorContract; -}; - -export const deployZetaConnectorEth = async ({ args }: { args: Parameters }) => { - const Factory = (await ethers.getContractFactory("ZetaConnectorEth")) as ZetaConnectorEthFactory; - - const zetaConnectorContract = (await Factory.deploy(...args)) as ZetaConnectorEth; - - await zetaConnectorContract.deployed(); - - return zetaConnectorContract; -}; - -export const deployZetaConnectorNonEth = async ({ - args, -}: { - args: Parameters; -}) => { - const Factory = (await ethers.getContractFactory("ZetaConnectorNonEth")) as ZetaConnectorNonEthFactory; - - const zetaConnectorContract = (await Factory.deploy(...args)) as ZetaConnectorNonEth; - - await zetaConnectorContract.deployed(); - - return zetaConnectorContract; -}; - -export const deployZetaReceiverMock = async () => { - const Factory = (await ethers.getContractFactory("ZetaReceiverMock")) as ZetaReceiverMockFactory; - - const zetaReceiverMock = (await Factory.deploy()) as ZetaReceiverMock; - - await zetaReceiverMock.deployed(); - - return zetaReceiverMock; -}; - -export const deployZetaEth = async ({ args }: { args: Parameters }) => { - const Factory = (await ethers.getContractFactory("ZetaEth")) as ZetaEthFactory; - - const zetaEthContract = (await Factory.deploy(...args)) as ZetaEth; - - await zetaEthContract.deployed(); - - return zetaEthContract; -}; - -export const deployZetaNonEth = async ({ args }: { args: Parameters }) => { - const Factory = (await ethers.getContractFactory("ZetaNonEth")) as ZetaNonEthFactory; - - const zetaNonEthContract = (await Factory.deploy(...args)) as ZetaNonEth; - - await zetaNonEthContract.deployed(); - - return zetaNonEthContract; -}; - -export const deployImmutableCreate2Factory = async () => { - const Factory = (await ethers.getContractFactory("ImmutableCreate2Factory")) as ImmutableCreate2Factory__factory; - - const ImmutableCreate2FactoryContract = (await Factory.deploy()) as ImmutableCreate2Factory; - - await ImmutableCreate2FactoryContract.deployed(); - - return ImmutableCreate2FactoryContract; -}; - -export const getZetaConnectorEth = async (params: GetContractParams) => - getContract({ - contractName: "ZetaConnectorEth", - ...params, - }); - -export const getZetaConnectorNonEth = async (params: GetContractParams) => - getContract({ - contractName: "ZetaConnectorNonEth", - ...params, - }); - -export const getZetaFactoryNonEth = async (params: GetContractParams) => - await getContract({ - contractName: "ZetaNonEth", - ...params, - }); - -export const getZetaFactoryEth = async (params: GetContractParams) => - await getContract({ - contractName: "ZetaNonEth", - ...params, - }); - -export const getZetaInteractorMock = async (zetaToken: string) => - getContract({ - contractName: "ZetaInteractorMock", - deployParams: [zetaToken], - }); - -export const getZetaTokenConsumerUniV2Strategy = async (params: GetContractParams) => - getContract({ - contractName: "ZetaTokenConsumerUniV2", - ...params, - }); - -export const getZetaTokenConsumerUniV3Strategy = async (params: GetContractParams) => - getContract({ - contractName: "ZetaTokenConsumerUniV3", - ...params, - }); - -export type GetContractParams = - | { - deployParams: Parameters; - existingContractAddress?: null; - } - | { - deployParams?: null; - existingContractAddress: string; - }; - -export const getContract = async ({ - contractName, - deployParams, - existingContractAddress, -}: GetContractParams & { contractName: string }): Promise => { - const ContractFactory = (await ethers.getContractFactory(contractName)) as Factory; - - const isGetExistingContract = Boolean(existingContractAddress); - if (isGetExistingContract) { - console.log("Getting existing contract from address:", existingContractAddress); - return ContractFactory.attach(existingContractAddress!) as Contract; - } - - const contract = (await ContractFactory.deploy(...deployParams!)) as Contract; - await contract.deployed(); - - return contract; -}; diff --git a/packages/protocol-contracts/lib/zeta-interactor/ZetaInteractor.helpers.ts b/packages/protocol-contracts/lib/zeta-interactor/ZetaInteractor.helpers.ts deleted file mode 100644 index d93bf01d..00000000 --- a/packages/protocol-contracts/lib/zeta-interactor/ZetaInteractor.helpers.ts +++ /dev/null @@ -1,8 +0,0 @@ -import { ZetaInteractorMock, ZetaInteractorMock__factory } from "../../typechain-types"; -import { getContract } from "../contracts.helpers"; - -export const getZetaInteractorMock = async (zetaToken: string) => - getContract({ - contractName: "ZetaInteractorMock", - deployParams: [zetaToken], - }); diff --git a/packages/protocol-contracts/scripts/deploy-immutable-create2-factory.ts b/packages/protocol-contracts/scripts/deploy-immutable-create2-factory.ts deleted file mode 100644 index fd16b288..00000000 --- a/packages/protocol-contracts/scripts/deploy-immutable-create2-factory.ts +++ /dev/null @@ -1,27 +0,0 @@ -import { isNetworkName } from "@zetachain/addresses"; -import { saveAddress } from "@zetachain/addresses-tools"; -import { network } from "hardhat"; - -import { deployImmutableCreate2Factory as deploy } from "../lib/contracts.helpers"; - -export async function deployImmutableCreate2Factory() { - if (!isNetworkName(network.name)) { - throw new Error(`network.name: ${network.name} isn't supported.`); - } - - console.log(`Deploying ImmutableCreate2Factory to ${network.name}`); - - const contract = await deploy(); - - saveAddress("immutableCreate2Factory", contract.address); - console.log("Deployed ImmutableCreate2Factory. Address:", contract.address); -} - -if (!process.env.EXECUTE_PROGRAMMATICALLY) { - deployImmutableCreate2Factory() - .then(() => process.exit(0)) - .catch((error) => { - console.error(error); - process.exit(1); - }); -} diff --git a/packages/protocol-contracts/scripts/deploy-zeta-connector.ts b/packages/protocol-contracts/scripts/deploy-zeta-connector.ts deleted file mode 100644 index 8543e2a2..00000000 --- a/packages/protocol-contracts/scripts/deploy-zeta-connector.ts +++ /dev/null @@ -1,38 +0,0 @@ -import { isNetworkName } from "@zetachain/addresses"; -import { saveAddress } from "@zetachain/addresses-tools"; -import { Contract } from "ethers"; -import { network } from "hardhat"; - -import { getAddress } from "../lib/address.helpers"; -import { deployZetaConnectorEth, deployZetaConnectorNonEth, isEthNetworkName } from "../lib/contracts.helpers"; - -export async function deployZetaConnector() { - if (!isNetworkName(network.name)) { - throw new Error(`network.name: ${network.name} isn't supported.`); - } - - let contract: Contract; - console.log(`Deploying ZetaConnector to ${network.name}`); - - if (isEthNetworkName(network.name)) { - contract = await deployZetaConnectorEth({ - args: [getAddress("zetaToken"), getAddress("tss"), getAddress("tssUpdater"), getAddress("tssUpdater")] - }); - } else { - contract = await deployZetaConnectorNonEth({ - args: [getAddress("zetaToken"), getAddress("tss"), getAddress("tssUpdater"), getAddress("tssUpdater")] - }); - } - - saveAddress("connector", contract.address); - console.log("Deployed ZetaConnector. Address:", contract.address); -} - -if (!process.env.EXECUTE_PROGRAMMATICALLY) { - deployZetaConnector() - .then(() => process.exit(0)) - .catch(error => { - console.error(error); - process.exit(1); - }); -} diff --git a/packages/protocol-contracts/scripts/deploy-zeta-token.ts b/packages/protocol-contracts/scripts/deploy-zeta-token.ts deleted file mode 100644 index c3e19697..00000000 --- a/packages/protocol-contracts/scripts/deploy-zeta-token.ts +++ /dev/null @@ -1,38 +0,0 @@ -import { isNetworkName } from "@zetachain/addresses"; -import { saveAddress } from "@zetachain/addresses-tools"; -import { Contract } from "ethers"; -import { network } from "hardhat"; - -import { getAddress } from "../lib/address.helpers"; -import { ZETA_INITIAL_SUPPLY } from "../lib/contracts.constants"; -import { deployZetaEth, deployZetaNonEth, isEthNetworkName } from "../lib/contracts.helpers"; - -export async function deployZetaToken() { - if (!isNetworkName(network.name)) { - throw new Error(`network.name: ${network.name} isn't supported.`); - } - - let contract: Contract; - - if (isEthNetworkName(network.name)) { - contract = await deployZetaEth({ - args: [ZETA_INITIAL_SUPPLY] - }); - } else { - contract = await deployZetaNonEth({ - args: [getAddress("tss"), getAddress("tssUpdater")] - }); - } - - saveAddress("zetaToken", contract.address); - console.log("Deployed Zeta to:", contract.address); -} - -if (!process.env.EXECUTE_PROGRAMMATICALLY) { - deployZetaToken() - .then(() => process.exit(0)) - .catch(error => { - console.error(error); - process.exit(1); - }); -} diff --git a/packages/protocol-contracts/scripts/deploy.ts b/packages/protocol-contracts/scripts/deploy.ts deleted file mode 100644 index 5193f051..00000000 --- a/packages/protocol-contracts/scripts/deploy.ts +++ /dev/null @@ -1,38 +0,0 @@ -import { isLocalNetworkName } from "@zetachain/addresses"; -import { saveAddress } from "@zetachain/addresses-tools"; -import { ethers, network } from "hardhat"; - -import { isEthNetworkName } from "../lib/contracts.helpers"; -import { deployZetaConnector } from "./deploy-zeta-connector"; -import { deployZetaToken } from "./deploy-zeta-token"; -import { setZetaAddresses } from "./set-zeta-token-addresses"; - -async function main() { - if (isLocalNetworkName(network.name)) { - const [owner] = await ethers.getSigners(); - saveAddress("tssUpdater", owner.address); - } - - await deployZetaToken(); - await deployZetaConnector(); - - /** - * @description The Eth implementation of Zeta token doesn't need any address - */ - if (isEthNetworkName(network.name)) return; - - /** - * @description Avoid setting Zeta addresses for local network, - * since it must be done after starting the local Zeta node - */ - if (!isLocalNetworkName(network.name)) { - await setZetaAddresses(); - } -} - -main() - .then(() => process.exit(0)) - .catch((error) => { - console.error(error); - process.exit(1); - }); diff --git a/packages/protocol-contracts/scripts/deterministic-deploy-zeta-connector.ts b/packages/protocol-contracts/scripts/deterministic-deploy-zeta-connector.ts deleted file mode 100644 index 54f7ad72..00000000 --- a/packages/protocol-contracts/scripts/deterministic-deploy-zeta-connector.ts +++ /dev/null @@ -1,63 +0,0 @@ -import { isNetworkName } from "@zetachain/addresses"; -import { saveAddress } from "@zetachain/addresses-tools"; -import { ZetaConnectorEth__factory, ZetaConnectorNonEth__factory } from "@zetachain/interfaces/typechain-types"; -import { BigNumber } from "ethers"; -import { ethers, network } from "hardhat"; - -import { getAddress } from "../lib/address.helpers"; -import { ZETA_CONNECTOR_SALT_NUMBER_ETH, ZETA_CONNECTOR_SALT_NUMBER_NON_ETH } from "../lib/contracts.constants"; -import { isEthNetworkName } from "../lib/contracts.helpers"; -import { deployContractToAddress, saltToHex } from "../lib/ImmutableCreate2Factory/ImmutableCreate2Factory.helpers"; - -const DEPLOYER_ADDRESS = process.env.DEPLOYER_ADDRESS ?? ""; - -export async function deterministicDeployZetaConnector() { - if (!isNetworkName(network.name)) { - throw new Error(`network.name: ${network.name} isn't supported.`); - } - - const accounts = await ethers.getSigners(); - const [signer] = accounts; - - const saltNumber = isEthNetworkName(network.name) - ? ZETA_CONNECTOR_SALT_NUMBER_ETH - : ZETA_CONNECTOR_SALT_NUMBER_NON_ETH; - const saltStr = BigNumber.from(saltNumber).toHexString(); - - const zetaToken = getAddress("zetaToken"); - const tss = getAddress("tss"); - const tssUpdater = getAddress("tssUpdater"); - const immutableCreate2Factory = getAddress("immutableCreate2Factory"); - - const salthex = saltToHex(saltStr, DEPLOYER_ADDRESS); - const constructorTypes = ["address", "address", "address", "address"]; - const constructorArgs = [zetaToken, tss, tssUpdater, tssUpdater]; - - let contractBytecode; - if (isEthNetworkName(network.name)) { - contractBytecode = ZetaConnectorEth__factory.bytecode; - } else { - contractBytecode = ZetaConnectorNonEth__factory.bytecode; - } - - const { address } = await deployContractToAddress({ - constructorArgs, - constructorTypes, - contractBytecode, - factoryAddress: immutableCreate2Factory, - salt: salthex, - signer - }); - - saveAddress("connector", address); - console.log("Deployed ZetaConnector. Address:", address); -} - -if (!process.env.EXECUTE_PROGRAMMATICALLY) { - deterministicDeployZetaConnector() - .then(() => process.exit(0)) - .catch(error => { - console.error(error); - process.exit(1); - }); -} diff --git a/packages/protocol-contracts/scripts/deterministic-deploy-zeta-consumer-v2.ts b/packages/protocol-contracts/scripts/deterministic-deploy-zeta-consumer-v2.ts deleted file mode 100644 index 7df82fc6..00000000 --- a/packages/protocol-contracts/scripts/deterministic-deploy-zeta-consumer-v2.ts +++ /dev/null @@ -1,55 +0,0 @@ -import { isNetworkName } from "@zetachain/addresses"; -import { saveAddress } from "@zetachain/addresses-tools"; -import { ZetaTokenConsumerUniV2__factory } from "@zetachain/interfaces/typechain-types"; -import { BigNumber } from "ethers"; -import { ethers, network } from "hardhat"; - -import { getAddress } from "../lib/address.helpers"; -import { ZETA_CONSUMER_SALT_NUMBER } from "../lib/contracts.constants"; -import { deployContractToAddress, saltToHex } from "../lib/ImmutableCreate2Factory/ImmutableCreate2Factory.helpers"; - -const DEPLOYER_ADDRESS = process.env.DEPLOYER_ADDRESS ?? ""; - -export async function deterministicDeployZetaConsumer() { - if (!isNetworkName(network.name)) { - throw new Error(`network.name: ${network.name} isn't supported.`); - } - - const accounts = await ethers.getSigners(); - const [signer] = accounts; - - const saltNumber = ZETA_CONSUMER_SALT_NUMBER; - const saltStr = BigNumber.from(saltNumber).toHexString(); - - const zetaToken = getAddress("zetaToken"); - const uniswapV2Router02 = getAddress("uniswapV2Router02"); - - const immutableCreate2Factory = getAddress("immutableCreate2Factory"); - - const salthex = saltToHex(saltStr, DEPLOYER_ADDRESS); - const constructorTypes = ["address", "address"]; - const constructorArgs = [zetaToken, uniswapV2Router02]; - - const contractBytecode = ZetaTokenConsumerUniV2__factory.bytecode; - - const { address } = await deployContractToAddress({ - constructorArgs, - constructorTypes, - contractBytecode, - factoryAddress: immutableCreate2Factory, - salt: salthex, - signer - }); - - saveAddress("zetaTokenConsumerUniV2", address); - console.log("Deployed ZetaConsumer. Address:", address); -} - -if (!process.env.EXECUTE_PROGRAMMATICALLY) { - deterministicDeployZetaConsumer() - .then(() => process.exit(0)) - .catch(error => { - console.error(error); - process.exit(1); - }); -} diff --git a/packages/protocol-contracts/scripts/deterministic-deploy-zeta-consumer-v3.ts b/packages/protocol-contracts/scripts/deterministic-deploy-zeta-consumer-v3.ts deleted file mode 100644 index e596e804..00000000 --- a/packages/protocol-contracts/scripts/deterministic-deploy-zeta-consumer-v3.ts +++ /dev/null @@ -1,41 +0,0 @@ -import { isNetworkName } from "@zetachain/addresses"; -import { saveAddress } from "@zetachain/addresses-tools"; -import { ZetaTokenConsumerUniV3__factory } from "@zetachain/interfaces/typechain-types"; -import { ethers, network } from "hardhat"; - -import { getAddress } from "../lib/address.helpers"; - -export async function deterministicDeployZetaConsumer() { - if (!isNetworkName(network.name)) { - throw new Error(`network.name: ${network.name} isn't supported.`); - } - - const accounts = await ethers.getSigners(); - const [signer] = accounts; - - const zetaToken = getAddress("zetaToken"); - const uniswapV3Router = getAddress("uniswapV3Router"); - const quoter = getAddress("uniswapV3Quoter"); - const WETH9Address = getAddress("weth9"); - const zetaPoolFee = 500; - const tokenPoolFee = 3000; - - console.log([zetaToken, uniswapV3Router, quoter, WETH9Address, zetaPoolFee, tokenPoolFee]); - - const Factory = new ZetaTokenConsumerUniV3__factory(signer); - const contract = await Factory.deploy(zetaToken, uniswapV3Router, quoter, WETH9Address, zetaPoolFee, tokenPoolFee); - await contract.deployed(); - const address = contract.address; - - saveAddress("zetaTokenConsumerUniV3", address); - console.log("Deployed ZetaConsumer. Address:", address); -} - -if (!process.env.EXECUTE_PROGRAMMATICALLY) { - deterministicDeployZetaConsumer() - .then(() => process.exit(0)) - .catch(error => { - console.error(error); - process.exit(1); - }); -} diff --git a/packages/protocol-contracts/scripts/deterministic-deploy-zeta-token.ts b/packages/protocol-contracts/scripts/deterministic-deploy-zeta-token.ts deleted file mode 100644 index c29a9e1d..00000000 --- a/packages/protocol-contracts/scripts/deterministic-deploy-zeta-token.ts +++ /dev/null @@ -1,69 +0,0 @@ -import { isNetworkName } from "@zetachain/addresses"; -import { saveAddress } from "@zetachain/addresses-tools"; -import { ZetaEth__factory, ZetaNonEth__factory } from "@zetachain/interfaces/typechain-types"; -import { BigNumber } from "ethers"; -import { ethers, network } from "hardhat"; - -import { getAddress } from "../lib/address.helpers"; -import { - ZETA_INITIAL_SUPPLY, - ZETA_TOKEN_SALT_NUMBER_ETH, - ZETA_TOKEN_SALT_NUMBER_NON_ETH -} from "../lib/contracts.constants"; -import { isEthNetworkName } from "../lib/contracts.helpers"; -import { deployContractToAddress, saltToHex } from "../lib/ImmutableCreate2Factory/ImmutableCreate2Factory.helpers"; - -const DEPLOYER_ADDRESS = process.env.DEPLOYER_ADDRESS ?? ""; - -export async function deterministicDeployZetaToken() { - if (!isNetworkName(network.name)) { - throw new Error(`network.name: ${network.name} isn't supported.`); - } - - const accounts = await ethers.getSigners(); - const [signer] = accounts; - - const saltNumber = isEthNetworkName(network.name) ? ZETA_TOKEN_SALT_NUMBER_ETH : ZETA_TOKEN_SALT_NUMBER_NON_ETH; - const saltStr = BigNumber.from(saltNumber).toHexString(); - - const tss = getAddress("tss"); - const tssUpdater = getAddress("tssUpdater"); - const immutableCreate2Factory = getAddress("immutableCreate2Factory"); - - const salthex = saltToHex(saltStr, DEPLOYER_ADDRESS); - - let constructorTypes; - let constructorArgs; - let contractBytecode; - - if (isEthNetworkName(network.name)) { - constructorTypes = ["uint256"]; - constructorArgs = [ZETA_INITIAL_SUPPLY.toString()]; - contractBytecode = ZetaEth__factory.bytecode; - } else { - constructorTypes = ["address", "address"]; - constructorArgs = [tss, tssUpdater]; - contractBytecode = ZetaNonEth__factory.bytecode; - } - - const { address } = await deployContractToAddress({ - constructorArgs, - constructorTypes, - contractBytecode, - factoryAddress: immutableCreate2Factory, - salt: salthex, - signer - }); - - saveAddress("zetaToken", address); - console.log("Deployed zetaToken. Address:", address); -} - -if (!process.env.EXECUTE_PROGRAMMATICALLY) { - deterministicDeployZetaToken() - .then(() => process.exit(0)) - .catch(error => { - console.error(error); - process.exit(1); - }); -} diff --git a/packages/protocol-contracts/scripts/deterministic-deploy.helpers.ts b/packages/protocol-contracts/scripts/deterministic-deploy.helpers.ts deleted file mode 100644 index e41ae279..00000000 --- a/packages/protocol-contracts/scripts/deterministic-deploy.helpers.ts +++ /dev/null @@ -1,42 +0,0 @@ -import { BigNumber } from "ethers"; - -import { getAddress } from "../lib/address.helpers"; -import { MAX_ETH_ADDRESS } from "../lib/contracts.constants"; -import { - buildBytecode, - buildCreate2Address, - saltToHex -} from "../lib/ImmutableCreate2Factory/ImmutableCreate2Factory.helpers"; - -export const calculateBestSalt = async ( - maxIterations: BigNumber, - deployerAddress: string, - constructorTypes: string[], - constructorArgs: string[], - contractBytecode: string -) => { - const immutableCreate2Factory = getAddress("immutableCreate2Factory"); - - let minAddress = MAX_ETH_ADDRESS; - let minAddressSalt = ""; - let minIndex = BigNumber.from(0); - - for (let i = BigNumber.from(0); i.lt(maxIterations); i = i.add(BigNumber.from(1))) { - const saltStr = i.toHexString(); - const salthex = saltToHex(saltStr, deployerAddress); - - const bytecode = buildBytecode(constructorTypes, constructorArgs, contractBytecode); - const expectedAddress = buildCreate2Address(salthex, bytecode, immutableCreate2Factory); - if (expectedAddress < minAddress) { - minAddress = expectedAddress; - minAddressSalt = saltStr; - minIndex = i; - console.log(minAddress, minAddressSalt, i.toString()); - } - if (i.mod(10000).isZero()) { - console.log("step", i.toString()); - } - } - - console.log(minAddress, minAddressSalt, minIndex.toString()); -}; diff --git a/packages/protocol-contracts/scripts/deterministic-get-salt-zeta-connector.ts b/packages/protocol-contracts/scripts/deterministic-get-salt-zeta-connector.ts deleted file mode 100644 index a437800c..00000000 --- a/packages/protocol-contracts/scripts/deterministic-get-salt-zeta-connector.ts +++ /dev/null @@ -1,44 +0,0 @@ -import { isNetworkName } from "@zetachain/addresses"; -import { ZetaConnectorEth__factory, ZetaConnectorNonEth__factory } from "@zetachain/interfaces/typechain-types"; -import { BigNumber } from "ethers"; -import { network } from "hardhat"; - -import { getAddress } from "../lib/address.helpers"; -import { isEthNetworkName } from "../lib/contracts.helpers"; -import { calculateBestSalt } from "./deterministic-deploy.helpers"; - -const MAX_ITERATIONS = BigNumber.from(100000); -const DEPLOYER_ADDRESS = process.env.DEPLOYER_ADDRESS ?? ""; - -export async function deterministicDeployGetSaltZetaConnector() { - if (!isNetworkName(network.name)) { - throw new Error(`network.name: ${network.name} isn't supported.`); - } - - const zetaToken = getAddress("zetaToken"); - const tss = getAddress("tss"); - const tssUpdater = getAddress("tssUpdater"); - - // @todo: decide which address use as pauser - const constructorTypes = ["address", "address", "address", "address"]; - const constructorArgs = [zetaToken, tss, tssUpdater, tssUpdater]; - - let contractBytecode; - - if (isEthNetworkName(network.name)) { - contractBytecode = ZetaConnectorEth__factory.bytecode; - } else { - contractBytecode = ZetaConnectorNonEth__factory.bytecode; - } - - calculateBestSalt(MAX_ITERATIONS, DEPLOYER_ADDRESS, constructorTypes, constructorArgs, contractBytecode); -} - -if (!process.env.EXECUTE_PROGRAMMATICALLY) { - deterministicDeployGetSaltZetaConnector() - .then(() => process.exit(0)) - .catch(error => { - console.error(error); - process.exit(1); - }); -} diff --git a/packages/protocol-contracts/scripts/deterministic-get-salt-zeta-token.ts b/packages/protocol-contracts/scripts/deterministic-get-salt-zeta-token.ts deleted file mode 100644 index 337455bf..00000000 --- a/packages/protocol-contracts/scripts/deterministic-get-salt-zeta-token.ts +++ /dev/null @@ -1,46 +0,0 @@ -import { isNetworkName } from "@zetachain/addresses"; -import { ZetaEth__factory, ZetaNonEth__factory } from "@zetachain/interfaces/typechain-types"; -import { BigNumber } from "ethers"; -import { network } from "hardhat"; - -import { getAddress } from "../lib/address.helpers"; -import { ZETA_INITIAL_SUPPLY } from "../lib/contracts.constants"; -import { isEthNetworkName } from "../lib/contracts.helpers"; -import { calculateBestSalt } from "./deterministic-deploy.helpers"; - -const MAX_ITERATIONS = BigNumber.from(100000); -const DEPLOYER_ADDRESS = process.env.DEPLOYER_ADDRESS ?? ""; - -export async function deterministicDeployGetSaltZetaToken() { - if (!isNetworkName(network.name)) { - throw new Error(`network.name: ${network.name} isn't supported.`); - } - - const tss = getAddress("tss"); - const tssUpdater = getAddress("tssUpdater"); - - let constructorTypes; - let constructorArgs; - let contractBytecode; - - if (isEthNetworkName(network.name)) { - constructorTypes = ["uint256"]; - constructorArgs = [ZETA_INITIAL_SUPPLY.toString()]; - contractBytecode = ZetaEth__factory.bytecode; - } else { - constructorTypes = ["address", "address"]; - constructorArgs = [tss, tssUpdater]; - contractBytecode = ZetaNonEth__factory.bytecode; - } - - calculateBestSalt(MAX_ITERATIONS, DEPLOYER_ADDRESS, constructorTypes, constructorArgs, contractBytecode); -} - -if (!process.env.EXECUTE_PROGRAMMATICALLY) { - deterministicDeployGetSaltZetaToken() - .then(() => process.exit(0)) - .catch(error => { - console.error(error); - process.exit(1); - }); -} diff --git a/packages/protocol-contracts/scripts/send-tss-gas.ts b/packages/protocol-contracts/scripts/send-tss-gas.ts deleted file mode 100644 index 8f83fd37..00000000 --- a/packages/protocol-contracts/scripts/send-tss-gas.ts +++ /dev/null @@ -1,26 +0,0 @@ -import { isNetworkName } from "@zetachain/addresses"; -import { ethers, network } from "hardhat"; - -import { getAddress } from "../lib/address.helpers"; - -async function sendGas() { - if (!isNetworkName(network.name)) { - throw new Error(`network.name: ${network.name} isn't supported.`); - } - - const [signer] = await ethers.getSigners(); - const sendGasTx = { - from: signer.address, - to: getAddress("tss"), - value: ethers.utils.parseEther("1.0") - }; - await signer.sendTransaction(sendGasTx); - console.log(`Sent 1.0 Ether from ${signer.address} to TSS address (${getAddress("tss")}).`); -} - -sendGas() - .then(() => process.exit(0)) - .catch(error => { - console.error(error); - process.exit(1); - }); diff --git a/packages/protocol-contracts/scripts/set-zeta-token-addresses.ts b/packages/protocol-contracts/scripts/set-zeta-token-addresses.ts deleted file mode 100644 index 5cbbeb86..00000000 --- a/packages/protocol-contracts/scripts/set-zeta-token-addresses.ts +++ /dev/null @@ -1,30 +0,0 @@ -import { isNetworkName } from "@zetachain/addresses"; -import { ZetaNonEth__factory as ZetaNonEthFactory } from "@zetachain/interfaces/typechain-types"; -import { ethers, network } from "hardhat"; - -import { getAddress } from "../lib/address.helpers"; - -export async function setZetaAddresses() { - if (!isNetworkName(network.name)) { - throw new Error(`network.name: ${network.name} isn't supported.`); - } - - const factory = (await ethers.getContractFactory("ZetaNonEth")) as ZetaNonEthFactory; - - const [, tssSigner] = await ethers.getSigners(); - - const contract = factory.attach(getAddress("zetaToken")).connect(tssSigner); - - console.log("Updating"); - await (await contract.updateTssAndConnectorAddresses(getAddress("tss"), getAddress("connector"))).wait(); - console.log("Updated"); -} - -if (!process.env.EXECUTE_PROGRAMMATICALLY) { - setZetaAddresses() - .then(() => process.exit(0)) - .catch(error => { - console.error(error); - process.exit(1); - }); -} diff --git a/packages/protocol-contracts/scripts/test-zeta-send.ts b/packages/protocol-contracts/scripts/test-zeta-send.ts deleted file mode 100644 index 7ebed773..00000000 --- a/packages/protocol-contracts/scripts/test-zeta-send.ts +++ /dev/null @@ -1,34 +0,0 @@ -import { getChainId } from "@zetachain/addresses"; -import { ZetaConnectorEth__factory as ZetaConnectorEthFactory } from "@zetachain/interfaces/typechain-types"; -import { AbiCoder } from "ethers/lib/utils"; -import { ethers } from "hardhat"; - -import { getAddress } from "../lib/address.helpers"; - -const encoder = new AbiCoder(); - -async function main() { - const factory = (await ethers.getContractFactory("ZetaConnectorEth")) as ZetaConnectorEthFactory; - const accounts = await ethers.getSigners(); - const contract = factory.attach(getAddress("connector")); - - console.log(`Sending To ${accounts[0].address}`); - await ( - await contract.send({ - destinationAddress: encoder.encode(["address"], [accounts[0].address]), - destinationChainId: getChainId("bsc-testnet"), - destinationGasLimit: 1_000_000, - message: encoder.encode(["address"], [accounts[0].address]), - zetaParams: [], - zetaValueAndGas: "10000000000000000000" - }) - ).wait(); - console.log("Sent"); -} - -main() - .then(() => process.exit(0)) - .catch(error => { - console.error(error); - process.exit(1); - }); diff --git a/packages/protocol-contracts/scripts/token-approval.ts b/packages/protocol-contracts/scripts/token-approval.ts deleted file mode 100644 index 8242d484..00000000 --- a/packages/protocol-contracts/scripts/token-approval.ts +++ /dev/null @@ -1,32 +0,0 @@ -import { isNetworkName } from "@zetachain/addresses"; -import { ethers, network } from "hardhat"; - -import { getAddress } from "../lib/address.helpers"; -import { getZetaFactoryEth, getZetaFactoryNonEth, isEthNetworkName } from "../lib/contracts.helpers"; - -const approvalAmount = ethers.utils.parseEther("10000000.0"); - -export async function setTokenApproval() { - if (!isNetworkName(network.name)) { - throw new Error(`network.name: ${network.name} isn't supported.`); - } - - let contract; - if (isEthNetworkName(network.name)) { - contract = await getZetaFactoryEth({ deployParams: null, existingContractAddress: getAddress("zetaToken") }); - } else { - contract = await getZetaFactoryNonEth({ deployParams: null, existingContractAddress: getAddress("zetaToken") }); - } - - let tx = await contract.approve(getAddress("connector"), approvalAmount); - tx.wait(); - - console.log(`Approved Connector Contract ${getAddress("connector")} for ${approvalAmount} `); -} - -setTokenApproval() - .then(() => process.exit(0)) - .catch(error => { - console.error(error); - process.exit(1); - }); diff --git a/packages/protocol-contracts/scripts/update-tss-address.ts b/packages/protocol-contracts/scripts/update-tss-address.ts deleted file mode 100644 index 0332975e..00000000 --- a/packages/protocol-contracts/scripts/update-tss-address.ts +++ /dev/null @@ -1,41 +0,0 @@ -import { isNetworkName } from "@zetachain/addresses"; -import { saveAddress } from "@zetachain/addresses-tools"; -import { ethers, network } from "hardhat"; - -import { getAddress } from "../lib/address.helpers"; -import { getZetaConnectorEth, getZetaConnectorNonEth, isEthNetworkName } from "../lib/contracts.helpers"; - -async function sendGas() { - if (!isNetworkName(network.name)) { - throw new Error(`network.name: ${network.name} isn't supported.`); - } - - const [, tssUpdaterSigner] = await ethers.getSigners(); - - const newTssAddress = "0x0000000000000000000000000000000000000000"; - - if (isEthNetworkName(network.name)) { - const contract = ( - await getZetaConnectorEth({ deployParams: null, existingContractAddress: getAddress("connector") }) - ).connect(tssUpdaterSigner); - - await (await contract.updateTssAddress(newTssAddress)).wait(); - } else { - const contract = ( - await getZetaConnectorNonEth({ deployParams: null, existingContractAddress: getAddress("connector") }) - ).connect(tssUpdaterSigner); - - await (await contract.updateTssAddress(newTssAddress)).wait(); - } - - console.log(`Updated TSS address from ${getAddress("tss")} to ${newTssAddress}.`); - - saveAddress("tss", newTssAddress); -} - -sendGas() - .then(() => process.exit(0)) - .catch(error => { - console.error(error); - process.exit(1); - }); diff --git a/packages/protocol-contracts/scripts/update-zeta-connector.ts b/packages/protocol-contracts/scripts/update-zeta-connector.ts deleted file mode 100644 index a2765a5c..00000000 --- a/packages/protocol-contracts/scripts/update-zeta-connector.ts +++ /dev/null @@ -1,33 +0,0 @@ -import { isNetworkName } from "@zetachain/addresses"; -import { ethers, network } from "hardhat"; - -import { getAddress } from "../lib/address.helpers"; -import { getZetaFactoryNonEth, isEthNetworkName } from "../lib/contracts.helpers"; - -async function updateZetaConnector() { - if (!isNetworkName(network.name)) { - throw new Error(`network.name: ${network.name} isn't supported.`); - } - - const [, tssUpdaterSigner] = await ethers.getSigners(); - - if (isEthNetworkName(network.name)) { - throw new Error(`network.name: ${network.name} isn't supported.`); - } - - const contract = ( - await getZetaFactoryNonEth({ deployParams: null, existingContractAddress: getAddress("zetaToken") }) - ).connect(tssUpdaterSigner); - - await (await contract.updateTssAndConnectorAddresses(getAddress("tss"), getAddress("connector"))).wait(); - - console.log(`Updated TSS address to ${getAddress("tss")}.`); - console.log(`Updated Connector address to ${getAddress("connector")}.`); -} - -updateZetaConnector() - .then(() => process.exit(0)) - .catch(error => { - console.error(error); - process.exit(1); - }); diff --git a/packages/protocol-contracts/scripts/verify-contracts.ts b/packages/protocol-contracts/scripts/verify-contracts.ts deleted file mode 100644 index 632d0f59..00000000 --- a/packages/protocol-contracts/scripts/verify-contracts.ts +++ /dev/null @@ -1,53 +0,0 @@ -import hardhat, { network } from "hardhat"; - -import { getAddress } from "../lib/address.helpers"; -import { ZETA_INITIAL_SUPPLY } from "../lib/contracts.constants"; -import { isEthNetworkName } from "../lib/contracts.helpers"; - -/** - * @description Prevents breaking the execution flow when contract A is verified (so verifying again throws) - * and contract B isn't yet verified - */ -const handleCatch = (e: any) => e?.message && console.error(e.message); - -async function main() { - if (isEthNetworkName(network.name)) { - await hardhat - .run("verify:verify", { - address: getAddress("zetaToken"), - constructorArguments: [ZETA_INITIAL_SUPPLY], - contract: "contracts/evm/Zeta.eth.sol:ZetaEth" - }) - .catch(handleCatch); - - await hardhat - .run("verify:verify", { - address: getAddress("connector"), - constructorArguments: [getAddress("zetaToken"), getAddress("tss"), getAddress("tssUpdater")], - contract: "contracts/evm/ZetaConnector.eth.sol:ZetaConnectorEth" - }) - .catch(handleCatch); - } else { - await hardhat - .run("verify:verify", { - address: getAddress("zetaToken"), - constructorArguments: [getAddress("tss"), getAddress("tssUpdater")] - }) - .catch(handleCatch); - - await hardhat - .run("verify:verify", { - address: getAddress("connector"), - constructorArguments: [getAddress("zetaToken"), getAddress("tss"), getAddress("tssUpdater")], - contract: "contracts/evm/ZetaConnector.non-eth.sol:ZetaConnectorNonEth" - }) - .catch(handleCatch); - } -} - -main() - .then(() => process.exit(0)) - .catch(error => { - console.error(error); - process.exit(1); - }); diff --git a/packages/protocol-contracts/test/ImmutableCreate2Factory.spec.ts b/packages/protocol-contracts/test/ImmutableCreate2Factory.spec.ts deleted file mode 100644 index 8db7d0ea..00000000 --- a/packages/protocol-contracts/test/ImmutableCreate2Factory.spec.ts +++ /dev/null @@ -1,128 +0,0 @@ -import { SignerWithAddress } from "@nomiclabs/hardhat-ethers/signers"; -import { - IERC20__factory, - ImmutableCreate2Factory, - ImmutableCreate2Factory__factory, - ZetaEth__factory, - ZetaInteractorMock__factory -} from "@zetachain/interfaces/typechain-types"; -import chai, { expect } from "chai"; -import { parseEther } from "ethers/lib/utils"; -import { ethers } from "hardhat"; - -import { MAX_ETH_ADDRESS } from "../lib/contracts.constants"; -import { - buildBytecode, - buildCreate2Address, - deployContractToAddress, - isDeployed, - saltToHex -} from "../lib/ImmutableCreate2Factory/ImmutableCreate2Factory.helpers"; - -chai.should(); - -describe("Deterministic deployment tests", () => { - let immutableCreate2: ImmutableCreate2Factory; - - let accounts: SignerWithAddress[]; - let signer: SignerWithAddress; - - beforeEach(async () => { - accounts = await ethers.getSigners(); - [signer] = accounts; - - const immutableCreate2Factory = new ImmutableCreate2Factory__factory(signer); - immutableCreate2 = await immutableCreate2Factory.deploy(); - }); - - describe("Deploy zeta token with deterministic deployment", () => { - it("Should deploy a contract", async () => { - const salthex = saltToHex("hola", signer.address); - const constructorTypes = ["uint256"]; - const constructorArgs = ["2100000000"]; - const contractBytecode = ZetaEth__factory.bytecode; - - const bytecode = buildBytecode(constructorTypes, constructorArgs, contractBytecode); - const expectedAddress = await immutableCreate2.findCreate2Address(salthex, bytecode); - - // Deploy contract - const { address } = await deployContractToAddress({ - constructorArgs: constructorArgs, - constructorTypes: constructorTypes, - contractBytecode: ZetaEth__factory.bytecode, - factoryAddress: immutableCreate2.address, - salt: salthex, - signer: signer - }); - - expect(address).to.be.eq(expectedAddress); - - // Query if contract deployed at address - const success = await isDeployed(address, ethers.provider); - expect(success).to.be.true; - - const token = IERC20__factory.connect(address, signer); - const totalSup = await token.totalSupply(); - expect(totalSup.toString()).to.be.eq(parseEther(constructorArgs[0])); - }); - }); - - it("Should deploy with leading zeros", async () => { - let saltStr = "0"; - - let minAddress = MAX_ETH_ADDRESS; - let minAddressSalt = ""; - for (let i = 0; i < 300; i++) { - const salthex = saltToHex(saltStr, signer.address); - const constructorTypes = ["uint256"]; - const constructorArgs = ["2100000000"]; - const contractBytecode = ZetaEth__factory.bytecode; - - const bytecode = buildBytecode(constructorTypes, constructorArgs, contractBytecode); - const expectedAddress = buildCreate2Address(salthex, bytecode, immutableCreate2.address); - if (expectedAddress < minAddress) { - minAddress = expectedAddress; - minAddressSalt = saltStr; - } - saltStr = i.toString(); - } - - expect(minAddress.substring(0, 4)).to.be.eq("0x00"); - }); - - it("Should generate same address offchain and onchain", async () => { - let saltStr = "0"; - - const salthex = saltToHex(saltStr, signer.address); - const constructorTypes = ["uint256"]; - const constructorArgs = ["2100000000"]; - const contractBytecode = ZetaEth__factory.bytecode; - - const bytecode = buildBytecode(constructorTypes, constructorArgs, contractBytecode); - const expectedAddress = await immutableCreate2.findCreate2Address(salthex, bytecode); - const expectedAddressOffchain = buildCreate2Address(salthex, bytecode, immutableCreate2.address); - expect(expectedAddress.toLocaleLowerCase()).to.be.eq(expectedAddressOffchain); - }); - - it("Should deploy and transfer ownership to deployer", async () => { - let saltStr = "0"; - - const salthex = saltToHex(saltStr, signer.address); - const constructorTypes = ["address"]; - const constructorArgs = [signer.address]; - - const { address } = await deployContractToAddress({ - constructorArgs: constructorArgs, - constructorTypes: constructorTypes, - contractBytecode: ZetaInteractorMock__factory.bytecode, - factoryAddress: immutableCreate2.address, - salt: salthex, - signer: signer, - transferOwner: true - }); - - const contract = ZetaInteractorMock__factory.connect(address, signer); - await contract.acceptOwnership(); - expect(await contract.owner()).to.be.eq(signer.address); - }); -}); diff --git a/packages/protocol-contracts/test/Zeta.non-eth.spec.ts b/packages/protocol-contracts/test/Zeta.non-eth.spec.ts deleted file mode 100644 index 5d5729d1..00000000 --- a/packages/protocol-contracts/test/Zeta.non-eth.spec.ts +++ /dev/null @@ -1,159 +0,0 @@ -import { SignerWithAddress } from "@nomiclabs/hardhat-ethers/signers"; -import { ZetaConnectorNonEth, ZetaNonEth, ZetaReceiverMock } from "@zetachain/interfaces/typechain-types"; -import { expect } from "chai"; -import { parseEther } from "ethers/lib/utils"; -import { ethers } from "hardhat"; - -import { deployZetaConnectorNonEth, deployZetaNonEth, deployZetaReceiverMock } from "../lib/contracts.helpers"; - -describe("ZetaNonEth tests", () => { - let zetaTokenNonEthContract: ZetaNonEth; - let zetaReceiverMockContract: ZetaReceiverMock; - let zetaConnectorNonEthContract: ZetaConnectorNonEth; - let tssUpdater: SignerWithAddress; - let tssSigner: SignerWithAddress; - let randomSigner: SignerWithAddress; - let pauserSigner: SignerWithAddress; - - const tssUpdaterApproveConnectorNonEth = async () => { - await (await zetaTokenNonEthContract.approve(zetaConnectorNonEthContract.address, parseEther("100000"))).wait(); - }; - - const mint100kZetaNonEth = async (transferTo: string) => { - const zeta100k = parseEther("100000"); - - await ( - await zetaConnectorNonEthContract - .connect(tssSigner) - .onReceive(randomSigner.address, 1, transferTo, zeta100k, [], ethers.constants.HashZero) - ).wait(); - }; - - const transfer100kZetaNonEth = async (transferTo: string) => { - await mint100kZetaNonEth(tssUpdater.address); - - await (await zetaTokenNonEthContract.connect(tssUpdater).transfer(transferTo, 100_000)).wait(); - }; - - beforeEach(async () => { - const accounts = await ethers.getSigners(); - [tssUpdater, tssSigner, randomSigner, pauserSigner] = accounts; - - zetaTokenNonEthContract = await deployZetaNonEth({ - args: [tssSigner.address, tssUpdater.address], - }); - - zetaReceiverMockContract = await deployZetaReceiverMock(); - zetaConnectorNonEthContract = await deployZetaConnectorNonEth({ - args: [zetaTokenNonEthContract.address, tssSigner.address, tssUpdater.address, pauserSigner.address], - }); - - await zetaTokenNonEthContract.updateTssAndConnectorAddresses( - tssSigner.address, - zetaConnectorNonEthContract.address - ); - - await mint100kZetaNonEth(tssUpdater.address); - }); - - describe("updateTssAndConnectorAddresses", () => { - it("Should revert if the caller is not tssAddressUpdater or TSS", async () => { - expect( - zetaTokenNonEthContract - .connect(randomSigner) - .updateTssAndConnectorAddresses(randomSigner.address, zetaConnectorNonEthContract.address) - ).to.be.revertedWith(`CallerIsNotTssOrUpdater("${randomSigner.address}")`); - }); - - it("Should change the addresses if the caller is tssAddressUpdater", async () => { - await ( - await zetaTokenNonEthContract.updateTssAndConnectorAddresses(randomSigner.address, randomSigner.address) - ).wait(); - - expect(await zetaTokenNonEthContract.tssAddress()).to.equal(randomSigner.address); - expect(await zetaTokenNonEthContract.connectorAddress()).to.equal(randomSigner.address); - }); - - it("Should change the addresses if the caller is TSS", async () => { - await ( - await zetaTokenNonEthContract - .connect(tssSigner) - .updateTssAndConnectorAddresses(randomSigner.address, randomSigner.address) - ).wait(); - - expect(await zetaTokenNonEthContract.tssAddress()).to.equal(randomSigner.address); - expect(await zetaTokenNonEthContract.connectorAddress()).to.equal(randomSigner.address); - }); - }); - - describe("renounceTssAddressUpdater", () => { - it("Should revert if the caller is not tssAddressUpdater", async () => { - expect(zetaTokenNonEthContract.connect(randomSigner).renounceTssAddressUpdater()).to.be.revertedWith( - `CallerIsNotTssUpdater("${randomSigner.address}")` - ); - }); - - it("Should change tssAddressUpdater to tssAddress if the caller is tssAddressUpdater", async () => { - await (await zetaTokenNonEthContract.renounceTssAddressUpdater()).wait(); - - expect(await zetaTokenNonEthContract.tssAddressUpdater()).to.equal(tssSigner.address); - }); - }); - - describe("mint", () => { - it("Should revert if the caller is not the Connector contract", async () => { - expect( - zetaTokenNonEthContract.connect(randomSigner).mint(tssUpdater.address, 100_000, ethers.constants.AddressZero) - ).to.be.revertedWith(`CallerIsNotConnector("${randomSigner.address}")`); - }); - - it("Should emit `Minted` on success", async () => { - const zetaMintedFilter = zetaTokenNonEthContract.filters.Minted(); - const e1 = await zetaTokenNonEthContract.queryFilter(zetaMintedFilter); - expect(e1.length).to.equal(1); - - await ( - await zetaConnectorNonEthContract - .connect(tssSigner) - .onReceive( - randomSigner.address, - 1, - zetaReceiverMockContract.address, - 1000, - new ethers.utils.AbiCoder().encode(["string"], ["hello"]), - ethers.constants.HashZero - ) - ).wait(); - - const e2 = await zetaTokenNonEthContract.queryFilter(zetaMintedFilter); - expect(e2.length).to.equal(2); - }); - }); - - describe("burnFrom", () => { - it("Should revert if the caller is not the Connector contract", async () => { - expect(zetaTokenNonEthContract.connect(randomSigner).burnFrom(tssUpdater.address, 100_000)).to.be.revertedWith( - `CallerIsNotConnector("${randomSigner.address}")` - ); - }); - - it("Should emit `Burnt` on success", async () => { - await tssUpdaterApproveConnectorNonEth(); - const zetaBurntFilter = zetaTokenNonEthContract.filters.Burnt(); - const e1 = await zetaTokenNonEthContract.queryFilter(zetaBurntFilter); - expect(e1.length).to.equal(0); - - await zetaConnectorNonEthContract.send({ - destinationAddress: randomSigner.address, - destinationChainId: 1, - destinationGasLimit: 2500000, - message: new ethers.utils.AbiCoder().encode(["string"], ["hello"]), - zetaParams: new ethers.utils.AbiCoder().encode(["string"], ["hello"]), - zetaValueAndGas: 1000, - }); - - const e2 = await zetaTokenNonEthContract.queryFilter(zetaBurntFilter); - expect(e2.length).to.equal(1); - }); - }); -}); diff --git a/packages/protocol-contracts/test/ZetaConnector.spec.ts b/packages/protocol-contracts/test/ZetaConnector.spec.ts deleted file mode 100644 index 19ec83cd..00000000 --- a/packages/protocol-contracts/test/ZetaConnector.spec.ts +++ /dev/null @@ -1,872 +0,0 @@ -import { SignerWithAddress } from "@nomiclabs/hardhat-ethers/signers"; -import { - ZetaConnectorBase, - ZetaConnectorEth, - ZetaConnectorNonEth, - ZetaEth, - ZetaNonEth, - ZetaReceiverMock -} from "@zetachain/interfaces/typechain-types"; -import { expect } from "chai"; -import { parseEther } from "ethers/lib/utils"; -import { ethers } from "hardhat"; - -import { - deployZetaConnectorBase, - deployZetaConnectorEth, - deployZetaConnectorNonEth, - deployZetaEth, - deployZetaNonEth, - deployZetaReceiverMock -} from "../lib/contracts.helpers"; - -describe("ZetaConnector tests", () => { - let zetaTokenEthContract: ZetaEth; - let zetaTokenNonEthContract: ZetaNonEth; - let zetaConnectorBaseContract: ZetaConnectorBase; - let zetaConnectorEthContract: ZetaConnectorEth; - let zetaReceiverMockContract: ZetaReceiverMock; - let zetaConnectorNonEthContract: ZetaConnectorNonEth; - - let tssUpdater: SignerWithAddress; - let tssSigner: SignerWithAddress; - let randomSigner: SignerWithAddress; - let pauserSigner: SignerWithAddress; - - const tssUpdaterApproveConnectorEth = async () => { - await (await zetaTokenEthContract.approve(zetaConnectorEthContract.address, parseEther("100000"))).wait(); - }; - - const tssUpdaterApproveConnectorNonEth = async () => { - await (await zetaTokenNonEthContract.approve(zetaConnectorNonEthContract.address, parseEther("100000"))).wait(); - }; - - const transfer100kZetaEth = async (transferTo: string) => { - await (await zetaTokenEthContract.transfer(transferTo, 100_000)).wait(); - }; - - const mint100kZetaNonEth = async (transferTo: string) => { - const zeta100k = parseEther("100000"); - - await ( - await zetaConnectorNonEthContract - .connect(tssSigner) - .onReceive(randomSigner.address, 1, transferTo, zeta100k, [], ethers.constants.HashZero) - ).wait(); - }; - - const transfer100kZetaNonEth = async (transferTo: string) => { - await mint100kZetaNonEth(tssUpdater.address); - - await (await zetaTokenNonEthContract.connect(tssUpdater).transfer(transferTo, 100_000)).wait(); - }; - - beforeEach(async () => { - const accounts = await ethers.getSigners(); - [tssUpdater, tssSigner, randomSigner, pauserSigner] = accounts; - - zetaTokenEthContract = await deployZetaEth({ - args: [100_000] - }); - - zetaTokenNonEthContract = await deployZetaNonEth({ - args: [tssSigner.address, tssUpdater.address] - }); - - zetaReceiverMockContract = await deployZetaReceiverMock(); - zetaConnectorBaseContract = await deployZetaConnectorBase({ - args: [zetaTokenEthContract.address, tssSigner.address, tssUpdater.address, pauserSigner.address] - }); - zetaConnectorEthContract = await deployZetaConnectorEth({ - args: [zetaTokenEthContract.address, tssSigner.address, tssUpdater.address, pauserSigner.address] - }); - zetaConnectorNonEthContract = await deployZetaConnectorNonEth({ - args: [zetaTokenNonEthContract.address, tssSigner.address, tssUpdater.address, pauserSigner.address] - }); - - await zetaTokenNonEthContract.updateTssAndConnectorAddresses( - tssSigner.address, - zetaConnectorNonEthContract.address - ); - - await mint100kZetaNonEth(tssUpdater.address); - }); - - describe("ZetaConnector.base", () => { - describe("updateTssAddress", () => { - it("Should revert if the caller is not TSS or TSS updater", async () => { - await expect(zetaConnectorBaseContract.connect(randomSigner).updateTssAddress(randomSigner.address)) - .to.revertedWith("CallerIsNotTssOrUpdater") - .withArgs(randomSigner.address); - }); - - it("Should revert if the new TSS address is invalid", async () => { - await expect( - zetaConnectorBaseContract.updateTssAddress("0x0000000000000000000000000000000000000000") - ).to.revertedWith("InvalidAddress"); - }); - - it("Should change the TSS address if called by TSS", async () => { - await (await zetaConnectorBaseContract.connect(tssSigner).updateTssAddress(randomSigner.address)).wait(); - - const address = await zetaConnectorBaseContract.tssAddress(); - - expect(address).to.equal(randomSigner.address); - }); - - it("Should change the TSS address if called by TSS updater", async () => { - await (await zetaConnectorBaseContract.updateTssAddress(randomSigner.address)).wait(); - - const address = await zetaConnectorBaseContract.tssAddress(); - - expect(address).to.equal(randomSigner.address); - }); - }); - - describe("updatePauserAddress", () => { - it("Should revert if the caller is not the Pauser", async () => { - await expect(zetaConnectorBaseContract.connect(randomSigner).updatePauserAddress(randomSigner.address)) - .to.revertedWith("CallerIsNotPauser") - .withArgs(randomSigner.address); - }); - - it("Should revert if the new Pauser address is invalid", async () => { - await expect( - zetaConnectorBaseContract - .connect(pauserSigner) - .updatePauserAddress("0x0000000000000000000000000000000000000000") - ).to.revertedWith("InvalidAddress"); - }); - - it("Should change the Pauser address if called by Pauser", async () => { - await (await zetaConnectorBaseContract.connect(pauserSigner).updatePauserAddress(randomSigner.address)).wait(); - - const address = await zetaConnectorBaseContract.pauserAddress(); - - expect(address).to.equal(randomSigner.address); - }); - - it("Should emit `PauserAddressUpdated` on success", async () => { - const pauserAddressUpdatedFilter = zetaConnectorBaseContract.filters.PauserAddressUpdated(); - const e1 = await zetaConnectorBaseContract.queryFilter(pauserAddressUpdatedFilter); - expect(e1.length).to.equal(0); - - await (await zetaConnectorBaseContract.connect(pauserSigner).updatePauserAddress(randomSigner.address)).wait(); - - const address = await zetaConnectorBaseContract.pauserAddress(); - - expect(address).to.equal(randomSigner.address); - - const e2 = await zetaConnectorBaseContract.queryFilter(pauserAddressUpdatedFilter); - expect(e2.length).to.equal(1); - }); - }); - - describe("pause, unpause", () => { - it("Should revert if not called by the Pauser", async () => { - await expect(zetaConnectorBaseContract.connect(randomSigner).pause()) - .to.revertedWith("CallerIsNotPauser") - .withArgs(randomSigner.address); - - await expect(zetaConnectorBaseContract.connect(randomSigner).unpause()) - .to.revertedWith("CallerIsNotPauser") - .withArgs(randomSigner.address); - }); - - it("Should pause if called by the Pauser", async () => { - await (await zetaConnectorBaseContract.connect(pauserSigner).pause()).wait(); - const paused1 = await zetaConnectorBaseContract.paused(); - expect(paused1).to.equal(true); - - await (await zetaConnectorBaseContract.connect(pauserSigner).unpause()).wait(); - const paused2 = await zetaConnectorBaseContract.paused(); - expect(paused2).to.equal(false); - }); - }); - }); - - describe("ZetaConnector.eth", () => { - describe("send", () => { - it("Should revert if the contract is paused", async () => { - await (await zetaConnectorEthContract.connect(pauserSigner).pause()).wait(); - const paused1 = await zetaConnectorEthContract.paused(); - expect(paused1).to.equal(true); - - await expect( - zetaConnectorEthContract.send({ - destinationAddress: randomSigner.address, - destinationChainId: 1, - destinationGasLimit: 2500000, - message: new ethers.utils.AbiCoder().encode(["string"], ["hello"]), - zetaParams: new ethers.utils.AbiCoder().encode(["string"], ["hello"]), - zetaValueAndGas: 1000 - }) - ).to.revertedWith("Pausable: paused"); - }); - - it("Should revert if the zetaTxSender has no enough zeta", async () => { - await ( - await zetaTokenEthContract.connect(randomSigner).approve(zetaConnectorEthContract.address, 100_000) - ).wait(); - - await expect( - zetaConnectorEthContract.connect(randomSigner).send({ - destinationAddress: randomSigner.address, - destinationChainId: 1, - destinationGasLimit: 2500000, - message: new ethers.utils.AbiCoder().encode(["string"], ["hello"]), - zetaParams: new ethers.utils.AbiCoder().encode(["string"], ["hello"]), - zetaValueAndGas: 1000 - }) - ).to.revertedWith("ERC20: transfer amount exceeds balance"); - }); - - it("Should revert if the zetaTxSender didn't allow ZetaConnector to spend Zeta token", async () => { - await expect( - zetaConnectorEthContract.send({ - destinationAddress: randomSigner.address, - destinationChainId: 1, - destinationGasLimit: 2500000, - message: new ethers.utils.AbiCoder().encode(["string"], ["hello"]), - zetaParams: new ethers.utils.AbiCoder().encode(["string"], ["hello"]), - zetaValueAndGas: 1000 - }) - ).to.revertedWith("ERC20: insufficient allowance"); - }); - - it("Should transfer Zeta token from the zetaTxSender account to the Connector contract", async () => { - const initialBalanceDeployer = await zetaTokenEthContract.balanceOf(tssUpdater.address); - const initialBalanceConnector = await zetaTokenEthContract.balanceOf(zetaConnectorEthContract.address); - - expect(initialBalanceDeployer.toString()).to.equal("100000000000000000000000"); - expect(initialBalanceConnector.toString()).to.equal("0"); - - await tssUpdaterApproveConnectorEth(); - - await ( - await zetaConnectorEthContract.send({ - destinationAddress: randomSigner.address, - destinationChainId: 1, - destinationGasLimit: 2500000, - message: new ethers.utils.AbiCoder().encode(["string"], ["hello"]), - zetaParams: new ethers.utils.AbiCoder().encode(["string"], ["hello"]), - zetaValueAndGas: 1000 - }) - ).wait(); - - const finalBalanceDeployer = await zetaTokenEthContract.balanceOf(tssUpdater.address); - const finalBalanceConnector = await zetaTokenEthContract.balanceOf(zetaConnectorEthContract.address); - - expect(finalBalanceDeployer.toString()).to.equal("99999999999999999999000"); - expect(finalBalanceConnector.toString()).to.equal("1000"); - }); - - it("Should emit `ZetaSent` on success", async () => { - const zetaSentFilter = zetaConnectorEthContract.filters.ZetaSent(); - const e1 = await zetaConnectorEthContract.queryFilter(zetaSentFilter); - expect(e1.length).to.equal(0); - - await zetaConnectorEthContract.send({ - destinationAddress: randomSigner.address, - destinationChainId: 1, - destinationGasLimit: 2500000, - message: new ethers.utils.AbiCoder().encode(["string"], ["hello"]), - zetaParams: new ethers.utils.AbiCoder().encode(["string"], ["hello"]), - zetaValueAndGas: 0 - }); - - const e2 = await zetaConnectorEthContract.queryFilter(zetaSentFilter); - expect(e2.length).to.equal(1); - }); - - it("Should emit `ZetaSent` with tx.origin as the first parameter", async () => { - const zetaSentFilter = zetaConnectorEthContract.filters.ZetaSent(); - const e1 = await zetaConnectorEthContract.queryFilter(zetaSentFilter); - expect(e1.length).to.equal(0); - - await zetaConnectorEthContract.connect(randomSigner).send({ - destinationAddress: randomSigner.address, - destinationChainId: 1, - destinationGasLimit: 2500000, - message: new ethers.utils.AbiCoder().encode(["string"], ["hello"]), - zetaParams: new ethers.utils.AbiCoder().encode(["string"], ["hello"]), - zetaValueAndGas: 0 - }); - - const e2 = await zetaConnectorEthContract.queryFilter(zetaSentFilter); - expect(e2[0].args[0].toString()).to.equal(randomSigner.address); - }); - }); - - describe("onReceive", () => { - it("Should not revert if the contract is paused", async () => { - await (await zetaConnectorEthContract.connect(pauserSigner).pause()).wait(); - const paused1 = await zetaConnectorEthContract.paused(); - expect(paused1).to.equal(true); - - await expect( - zetaConnectorEthContract - .connect(tssSigner) - .onReceive( - tssUpdater.address, - 1, - zetaReceiverMockContract.address, - 0, - new ethers.utils.AbiCoder().encode(["string"], ["hello"]), - ethers.constants.HashZero - ) - ).to.be.not.reverted; - }); - - it("Should revert if not called by TSS address", async () => { - await expect( - zetaConnectorEthContract.onReceive( - tssUpdater.address, - 1, - randomSigner.address, - 1000, - new ethers.utils.AbiCoder().encode(["string"], ["hello"]), - ethers.constants.HashZero - ) - ) - .to.revertedWith("CallerIsNotTss") - .withArgs(tssUpdater.address); - }); - - it("Should revert if Zeta transfer fails", async () => { - await expect( - zetaConnectorEthContract - .connect(tssSigner) - .onReceive( - randomSigner.address, - 1, - randomSigner.address, - 1000, - new ethers.utils.AbiCoder().encode(["string"], ["hello"]), - ethers.constants.HashZero - ) - ).to.revertedWith("ERC20: transfer amount exceeds balance"); - }); - - it("Should transfer to the receiver address", async () => { - await transfer100kZetaEth(zetaConnectorEthContract.address); - - const initialBalanceConnector = await zetaTokenEthContract.balanceOf(zetaConnectorEthContract.address); - const initialBalanceReceiver = await zetaTokenEthContract.balanceOf(zetaReceiverMockContract.address); - expect(initialBalanceConnector.toString()).to.equal("100000"); - expect(initialBalanceReceiver.toString()).to.equal("0"); - - await ( - await zetaConnectorEthContract - .connect(tssSigner) - .onReceive( - randomSigner.address, - 1, - zetaReceiverMockContract.address, - 1000, - new ethers.utils.AbiCoder().encode(["string"], ["hello"]), - ethers.constants.HashZero - ) - ).wait(); - - const finalBalanceConnector = await zetaTokenEthContract.balanceOf(zetaConnectorEthContract.address); - const finalBalanceReceiver = await zetaTokenEthContract.balanceOf(zetaReceiverMockContract.address); - - expect(finalBalanceConnector.toString()).to.equal("99000"); - expect(finalBalanceReceiver.toString()).to.equal("1000"); - }); - - it("Should emit `ZetaReceived` on success", async () => { - await transfer100kZetaEth(zetaConnectorEthContract.address); - - const zetaReceivedFilter = zetaConnectorEthContract.filters.ZetaReceived(); - const e1 = await zetaConnectorEthContract.queryFilter(zetaReceivedFilter); - expect(e1.length).to.equal(0); - - await ( - await zetaConnectorEthContract - .connect(tssSigner) - .onReceive( - randomSigner.address, - 1, - zetaReceiverMockContract.address, - 1000, - new ethers.utils.AbiCoder().encode(["string"], ["hello"]), - ethers.constants.HashZero - ) - ).wait(); - - const e2 = await zetaConnectorEthContract.queryFilter(zetaReceivedFilter); - expect(e2.length).to.equal(1); - }); - }); - - describe("onRevert", () => { - it("Should revert if the contract is paused", async () => { - await (await zetaConnectorEthContract.connect(pauserSigner).pause()).wait(); - const paused1 = await zetaConnectorEthContract.paused(); - expect(paused1).to.equal(true); - - await expect( - zetaConnectorEthContract.onRevert( - randomSigner.address, - 1, - randomSigner.address, - 2, - 1000, - new ethers.utils.AbiCoder().encode(["string"], ["hello"]), - ethers.constants.HashZero - ) - ).to.revertedWith("Pausable: paused"); - }); - - it("Should revert if not called by TSS address", async () => { - await expect( - zetaConnectorEthContract.onRevert( - randomSigner.address, - 1, - tssUpdater.address, - 1, - 1000, - new ethers.utils.AbiCoder().encode(["string"], ["hello"]), - ethers.constants.HashZero - ) - ) - .to.revertedWith("CallerIsNotTss") - .withArgs(tssUpdater.address); - }); - - it("Should transfer to the zetaTxSender address", async () => { - await transfer100kZetaEth(zetaConnectorEthContract.address); - - const initialBalanceConnector = await zetaTokenEthContract.balanceOf(zetaConnectorEthContract.address); - const initialBalanceZetaTxSender = await zetaTokenEthContract.balanceOf(zetaReceiverMockContract.address); - expect(initialBalanceConnector.toString()).to.equal("100000"); - expect(initialBalanceZetaTxSender.toString()).to.equal("0"); - - await ( - await zetaConnectorEthContract - .connect(tssSigner) - .onRevert( - zetaReceiverMockContract.address, - 1, - randomSigner.address, - 1, - 1000, - new ethers.utils.AbiCoder().encode(["string"], ["hello"]), - ethers.constants.HashZero - ) - ).wait(); - - const finalBalanceConnector = await zetaTokenEthContract.balanceOf(zetaConnectorEthContract.address); - const finalBalanceZetaTxSender = await zetaTokenEthContract.balanceOf(zetaReceiverMockContract.address); - - expect(finalBalanceConnector.toString()).to.equal("99000"); - expect(finalBalanceZetaTxSender.toString()).to.equal("1000"); - }); - - it("Should emit `ZetaReverted` on success", async () => { - await transfer100kZetaEth(zetaConnectorEthContract.address); - - const zetaRevertedFilter = zetaConnectorEthContract.filters.ZetaReverted(); - const e1 = await zetaConnectorEthContract.queryFilter(zetaRevertedFilter); - expect(e1.length).to.equal(0); - - await ( - await zetaConnectorEthContract - .connect(tssSigner) - .onRevert( - zetaReceiverMockContract.address, - 1, - randomSigner.address, - 1, - 1000, - new ethers.utils.AbiCoder().encode(["string"], ["hello"]), - ethers.constants.HashZero - ) - ).wait(); - - const e2 = await zetaConnectorEthContract.queryFilter(zetaRevertedFilter); - expect(e2.length).to.equal(1); - }); - }); - }); - - describe("ZetaConnector.non-eth", () => { - describe("send", () => { - it("Should revert if the contract is paused", async () => { - await (await zetaConnectorNonEthContract.connect(pauserSigner).pause()).wait(); - const paused1 = await zetaConnectorNonEthContract.paused(); - expect(paused1).to.equal(true); - - await expect( - zetaConnectorNonEthContract.send({ - destinationAddress: randomSigner.address, - destinationChainId: 1, - destinationGasLimit: 2500000, - message: new ethers.utils.AbiCoder().encode(["string"], ["hello"]), - zetaParams: new ethers.utils.AbiCoder().encode(["string"], ["hello"]), - zetaValueAndGas: 1000 - }) - ).to.revertedWith("Pausable: paused"); - }); - - it("Should revert if the zetaTxSender has no enough zeta", async () => { - await ( - await zetaTokenEthContract.connect(randomSigner).approve(zetaConnectorEthContract.address, 100_000) - ).wait(); - - await expect( - zetaConnectorNonEthContract.connect(randomSigner).send({ - destinationAddress: randomSigner.address, - destinationChainId: 1, - destinationGasLimit: 2500000, - message: new ethers.utils.AbiCoder().encode(["string"], ["hello"]), - zetaParams: new ethers.utils.AbiCoder().encode(["string"], ["hello"]), - zetaValueAndGas: 1000 - }) - ).to.revertedWith("ERC20: insufficient allowance"); - }); - - it("Should revert if the zetaTxSender didn't allow ZetaConnector to spend Zeta token", async () => { - await expect( - zetaConnectorNonEthContract.send({ - destinationAddress: randomSigner.address, - destinationChainId: 1, - destinationGasLimit: 2500000, - message: new ethers.utils.AbiCoder().encode(["string"], ["hello"]), - zetaParams: new ethers.utils.AbiCoder().encode(["string"], ["hello"]), - zetaValueAndGas: 1000 - }) - ).to.revertedWith("ERC20: insufficient allowance"); - }); - - it("Should burn Zeta token from the zetaTxSender account", async () => { - const initialBalanceDeployer = await zetaTokenNonEthContract.balanceOf(tssUpdater.address); - expect(initialBalanceDeployer.toString()).to.equal(parseEther("100000")); - - await tssUpdaterApproveConnectorNonEth(); - - await ( - await zetaConnectorNonEthContract.send({ - destinationAddress: randomSigner.address, - destinationChainId: 1, - destinationGasLimit: 2500000, - message: new ethers.utils.AbiCoder().encode(["string"], ["hello"]), - zetaParams: new ethers.utils.AbiCoder().encode(["string"], ["hello"]), - zetaValueAndGas: parseEther("1") - }) - ).wait(); - - const finalBalanceDeployer = await zetaTokenNonEthContract.balanceOf(tssUpdater.address); - expect(finalBalanceDeployer.toString()).to.equal(parseEther("99999")); - }); - - it("Should emit `ZetaSent` on success", async () => { - const zetaSentFilter = zetaConnectorNonEthContract.filters.ZetaSent(); - const e1 = await zetaConnectorNonEthContract.queryFilter(zetaSentFilter); - expect(e1.length).to.equal(0); - - await zetaConnectorNonEthContract.send({ - destinationAddress: randomSigner.address, - destinationChainId: 1, - destinationGasLimit: 2500000, - message: new ethers.utils.AbiCoder().encode(["string"], ["hello"]), - zetaParams: new ethers.utils.AbiCoder().encode(["string"], ["hello"]), - zetaValueAndGas: 0 - }); - - const e2 = await zetaConnectorNonEthContract.queryFilter(zetaSentFilter); - expect(e2.length).to.equal(1); - }); - - it("Should emit `ZetaSent` with tx.origin as the first parameter", async () => { - const zetaSentFilter = zetaConnectorNonEthContract.filters.ZetaSent(); - const e1 = await zetaConnectorNonEthContract.queryFilter(zetaSentFilter); - expect(e1.length).to.equal(0); - - await zetaConnectorNonEthContract.connect(randomSigner).send({ - destinationAddress: randomSigner.address, - destinationChainId: 1, - destinationGasLimit: 2500000, - message: new ethers.utils.AbiCoder().encode(["string"], ["hello"]), - zetaParams: new ethers.utils.AbiCoder().encode(["string"], ["hello"]), - zetaValueAndGas: 0 - }); - - const e2 = await zetaConnectorNonEthContract.queryFilter(zetaSentFilter); - expect(e2[0].args[0].toString()).to.equal(randomSigner.address); - }); - }); - - describe("onReceive", () => { - it("Should not revert if the contract is paused", async () => { - await (await zetaConnectorNonEthContract.connect(pauserSigner).pause()).wait(); - const paused1 = await zetaConnectorNonEthContract.paused(); - expect(paused1).to.equal(true); - - await expect( - zetaConnectorNonEthContract - .connect(tssSigner) - .onReceive( - tssUpdater.address, - 1, - zetaReceiverMockContract.address, - 0, - new ethers.utils.AbiCoder().encode(["string"], ["hello"]), - ethers.constants.HashZero - ) - ).to.be.not.reverted; - }); - - it("Should revert if not called by TSS address", async () => { - await expect( - zetaConnectorNonEthContract.onReceive( - tssUpdater.address, - 1, - randomSigner.address, - 1000, - new ethers.utils.AbiCoder().encode(["string"], ["hello"]), - ethers.constants.HashZero - ) - ) - .to.revertedWith("CallerIsNotTss") - .withArgs(tssUpdater.address); - }); - - it("Should revert if mint fails", async () => { - /** - * Update TSS and Connector addresses so minting fails - */ - await zetaTokenNonEthContract.updateTssAndConnectorAddresses(tssSigner.address, randomSigner.address); - - await expect( - zetaConnectorNonEthContract - .connect(tssSigner) - .onReceive( - randomSigner.address, - 1, - zetaReceiverMockContract.address, - 1000, - new ethers.utils.AbiCoder().encode(["string"], ["hello"]), - ethers.constants.HashZero - ) - ) - .to.revertedWith("CallerIsNotConnector") - .withArgs(zetaConnectorNonEthContract.address); - }); - - it("Should mint on the receiver address", async () => { - const initialBalanceReceiver = await zetaTokenNonEthContract.balanceOf(zetaReceiverMockContract.address); - expect(initialBalanceReceiver.toString()).to.equal("0"); - - await ( - await zetaConnectorNonEthContract - .connect(tssSigner) - .onReceive( - randomSigner.address, - 1, - zetaReceiverMockContract.address, - 1000, - new ethers.utils.AbiCoder().encode(["string"], ["hello"]), - ethers.constants.HashZero - ) - ).wait(); - - const finalBalanceReceiver = await zetaTokenNonEthContract.balanceOf(zetaReceiverMockContract.address); - - expect(finalBalanceReceiver.toString()).to.equal("1000"); - }); - - it("Should emit `ZetaReceived` on success", async () => { - const zetaReceivedFilter = zetaConnectorNonEthContract.filters.ZetaReceived(); - const e1 = await zetaConnectorNonEthContract.queryFilter(zetaReceivedFilter); - expect(e1.length).to.equal(1); - - await ( - await zetaConnectorNonEthContract - .connect(tssSigner) - .onReceive( - randomSigner.address, - 1, - zetaReceiverMockContract.address, - 1000, - new ethers.utils.AbiCoder().encode(["string"], ["hello"]), - ethers.constants.HashZero - ) - ).wait(); - - const e2 = await zetaConnectorNonEthContract.queryFilter(zetaReceivedFilter); - expect(e2.length).to.equal(2); - }); - }); - - describe("onRevert", () => { - it("Should revert if the contract is paused", async () => { - await (await zetaConnectorNonEthContract.connect(pauserSigner).pause()).wait(); - const paused1 = await zetaConnectorNonEthContract.paused(); - expect(paused1).to.equal(true); - - await expect( - zetaConnectorNonEthContract.onRevert( - randomSigner.address, - 1, - randomSigner.address, - 2, - 1000, - new ethers.utils.AbiCoder().encode(["string"], ["hello"]), - ethers.constants.HashZero - ) - ).to.revertedWith("Pausable: paused"); - }); - - it("Should revert if not called by TSS address", async () => { - await expect( - zetaConnectorNonEthContract.onRevert( - randomSigner.address, - 1, - tssUpdater.address, - 1, - 1000, - new ethers.utils.AbiCoder().encode(["string"], ["hello"]), - ethers.constants.HashZero - ) - ) - .to.revertedWith("CallerIsNotTss") - .withArgs(tssUpdater.address); - }); - - it("Should mint on the zetaTxSender address", async () => { - const initialBalanceZetaTxSender = await zetaTokenNonEthContract.balanceOf(zetaReceiverMockContract.address); - expect(initialBalanceZetaTxSender.toString()).to.equal("0"); - - await ( - await zetaConnectorNonEthContract - .connect(tssSigner) - .onRevert( - zetaReceiverMockContract.address, - 1, - randomSigner.address, - 1, - 1000, - new ethers.utils.AbiCoder().encode(["string"], ["hello"]), - ethers.constants.HashZero - ) - ).wait(); - - const finalBalanceZetaTxSender = await zetaTokenNonEthContract.balanceOf(zetaReceiverMockContract.address); - expect(finalBalanceZetaTxSender.toString()).to.equal("1000"); - }); - - it("Should emit `ZetaReverted` on success", async () => { - await transfer100kZetaNonEth(zetaConnectorNonEthContract.address); - - const zetaRevertedFilter = zetaConnectorNonEthContract.filters.ZetaReverted(); - const e1 = await zetaConnectorNonEthContract.queryFilter(zetaRevertedFilter); - expect(e1.length).to.equal(0); - - await ( - await zetaConnectorNonEthContract - .connect(tssSigner) - .onRevert( - zetaReceiverMockContract.address, - 1, - randomSigner.address, - 1, - 1000, - new ethers.utils.AbiCoder().encode(["string"], ["hello"]), - ethers.constants.HashZero - ) - ).wait(); - - const e2 = await zetaConnectorNonEthContract.queryFilter(zetaRevertedFilter); - expect(e2.length).to.equal(1); - }); - }); - - describe("MaxSupply", () => { - describe("setMaxSupply", () => { - it("Should revert if the caller is not the TSS address", async () => { - await expect(zetaConnectorNonEthContract.connect(randomSigner).setMaxSupply(0)) - .to.revertedWith("CallerIsNotTss") - .withArgs(randomSigner.address); - }); - - it("Should revert if want to mint more than MaxSupply", async () => { - await zetaConnectorNonEthContract.connect(tssSigner).setMaxSupply(999); - await expect( - zetaConnectorNonEthContract - .connect(tssSigner) - .onReceive( - randomSigner.address, - 1, - zetaReceiverMockContract.address, - 1000, - new ethers.utils.AbiCoder().encode(["string"], ["hello"]), - ethers.constants.HashZero - ) - ) - .to.revertedWith("ExceedsMaxSupply") - .withArgs(999); - }); - }); - - describe("onReceive, onRevert (mint)", () => { - it("Should mint if total supply + supply to add < max supply", async () => { - const supplyToAdd = 1000; - const initialSupply = await zetaTokenNonEthContract.totalSupply(); - - await zetaConnectorNonEthContract.connect(tssSigner).setMaxSupply(initialSupply.add(supplyToAdd)); - - await expect( - zetaConnectorNonEthContract - .connect(tssSigner) - .onReceive( - randomSigner.address, - 1, - zetaReceiverMockContract.address, - supplyToAdd, - new ethers.utils.AbiCoder().encode(["string"], ["hello"]), - ethers.constants.HashZero - ) - ).to.be.not.reverted; - - const finalSupply = await zetaTokenNonEthContract.totalSupply(); - - expect(finalSupply).to.eq(initialSupply.add(supplyToAdd)); - - await expect( - zetaConnectorNonEthContract - .connect(tssSigner) - .onReceive( - randomSigner.address, - 1, - zetaReceiverMockContract.address, - 1, - new ethers.utils.AbiCoder().encode(["string"], ["hello"]), - ethers.constants.HashZero - ) - ) - .to.revertedWith("ExceedsMaxSupply") - .withArgs(initialSupply.add(supplyToAdd)); - - await expect( - zetaConnectorNonEthContract - .connect(tssSigner) - .onRevert( - randomSigner.address, - 1, - randomSigner.address, - 2, - 1000, - new ethers.utils.AbiCoder().encode(["string"], ["hello"]), - ethers.constants.HashZero - ) - ) - .to.revertedWith("ExceedsMaxSupply") - .withArgs(initialSupply.add(supplyToAdd)); - }); - }); - }); - }); -}); diff --git a/packages/protocol-contracts/test/ZetaInteractor.spec.ts b/packages/protocol-contracts/test/ZetaInteractor.spec.ts deleted file mode 100644 index 1448c3b6..00000000 --- a/packages/protocol-contracts/test/ZetaInteractor.spec.ts +++ /dev/null @@ -1,119 +0,0 @@ -import { SignerWithAddress } from "@nomiclabs/hardhat-ethers/signers"; -import { ZetaInteractorMock } from "@zetachain/interfaces/typechain-types"; -import chai, { expect } from "chai"; -import { ethers } from "hardhat"; - -import { getZetaInteractorMock } from "../lib/contracts.helpers"; - -chai.should(); - -describe("ZetaInteractor tests", () => { - let zetaInteractorMock: ZetaInteractorMock; - const chainAId = 1; - const chainBId = 2; - - let accounts: SignerWithAddress[]; - let deployer: SignerWithAddress; - let crossChainContractB: SignerWithAddress; - let zetaConnector: SignerWithAddress; - - const encoder = new ethers.utils.AbiCoder(); - - beforeEach(async () => { - accounts = await ethers.getSigners(); - [deployer, crossChainContractB, zetaConnector] = accounts; - - zetaInteractorMock = await getZetaInteractorMock(zetaConnector.address); - - const encodedCrossChainAddressB = ethers.utils.solidityPack(["address"], [crossChainContractB.address]); - await (await zetaInteractorMock.setInteractorByChainId(chainBId, encodedCrossChainAddressB)).wait(); - }); - - describe("onCreate", () => { - it("Should revert if constructor param is zero address", async () => { - const Factory = await ethers.getContractFactory("ZetaInteractorMock"); - await expect(Factory.deploy(ethers.constants.AddressZero)).to.be.revertedWith("InvalidAddress"); - }); - - it("Should revert if the zetaTxSenderAddress it not in interactorsByChainId", async () => { - await expect( - zetaInteractorMock.connect(zetaConnector).onZetaMessage({ - destinationAddress: crossChainContractB.address, - message: encoder.encode(["address"], [crossChainContractB.address]), - sourceChainId: chainBId, - zetaTxSenderAddress: ethers.utils.solidityPack(["address"], [zetaInteractorMock.address]), - zetaValue: 0 - }) - ).to.be.revertedWith("InvalidZetaMessageCall"); - }); - }); - - describe("onZetaMessage", () => { - it("Should revert if the caller is not ZetaConnector", async () => { - await expect( - zetaInteractorMock.onZetaMessage({ - destinationAddress: crossChainContractB.address, - message: encoder.encode(["address"], [zetaInteractorMock.address]), - sourceChainId: chainBId, - zetaTxSenderAddress: ethers.utils.solidityPack(["address"], [zetaInteractorMock.address]), - zetaValue: 0 - }) - ) - .to.be.revertedWith("InvalidCaller") - .withArgs(deployer.address); - }); - - it("Should revert if the zetaTxSenderAddress it not in interactorsByChainId", async () => { - await expect( - zetaInteractorMock.connect(zetaConnector).onZetaMessage({ - destinationAddress: crossChainContractB.address, - message: encoder.encode(["address"], [crossChainContractB.address]), - sourceChainId: chainBId, - zetaTxSenderAddress: ethers.utils.solidityPack(["address"], [zetaInteractorMock.address]), - zetaValue: 0 - }) - ).to.be.revertedWith("InvalidZetaMessageCall"); - }); - }); - - describe("onZetaRevert", () => { - it("Should revert if the caller is not ZetaConnector", async () => { - await expect( - zetaInteractorMock.onZetaRevert({ - destinationAddress: ethers.utils.solidityPack(["address"], [crossChainContractB.address]), - destinationChainId: chainBId, - message: encoder.encode(["address"], [zetaInteractorMock.address]), - remainingZetaValue: 0, - sourceChainId: chainAId, - zetaTxSenderAddress: deployer.address - }) - ) - .to.be.revertedWith("InvalidCaller") - .withArgs(deployer.address); - }); - }); - - describe("transferOwnership", () => { - it("Should transfer ownership", async () => { - const randomSigner = accounts[3]; - await zetaInteractorMock.transferOwnership(randomSigner.address); - await zetaInteractorMock.connect(randomSigner).acceptOwnership(); - await expect(await zetaInteractorMock.owner()).to.be.eq(randomSigner.address); - }); - - it("Should keep the ownership until accept", async () => { - const randomSigner = accounts[3]; - await zetaInteractorMock.transferOwnership(randomSigner.address); - await expect(await zetaInteractorMock.owner()).to.be.eq(deployer.address); - }); - - it("Should revert if old owner want to do some action", async () => { - const randomSigner = accounts[3]; - await zetaInteractorMock.transferOwnership(randomSigner.address); - await zetaInteractorMock.connect(randomSigner).acceptOwnership(); - await expect(zetaInteractorMock.transferOwnership(randomSigner.address)).to.be.revertedWith( - "Ownable: caller is not the owner" - ); - }); - }); -}); diff --git a/packages/protocol-contracts/test/ZetaTokenConsumer.spec.ts b/packages/protocol-contracts/test/ZetaTokenConsumer.spec.ts deleted file mode 100644 index 258ae669..00000000 --- a/packages/protocol-contracts/test/ZetaTokenConsumer.spec.ts +++ /dev/null @@ -1,286 +0,0 @@ -import { MaxUint256 } from "@ethersproject/constants"; -import { parseEther, parseUnits } from "@ethersproject/units"; -import { SignerWithAddress } from "@nomiclabs/hardhat-ethers/signers"; -import { - IERC20, - IERC20__factory, - INonfungiblePositionManager, - INonfungiblePositionManager__factory, - IPoolInitializer__factory, - UniswapV2Router02__factory, - ZetaTokenConsumer, - ZetaTokenConsumerUniV2, - ZetaTokenConsumerUniV3 -} from "@zetachain/interfaces/typechain-types"; -import chai, { expect } from "chai"; -import { BigNumber } from "ethers"; -import { ethers } from "hardhat"; - -import { getAddress } from "../lib/address.helpers"; -import { - deployZetaNonEth, - getZetaTokenConsumerUniV2Strategy, - getZetaTokenConsumerUniV3Strategy -} from "../lib/contracts.helpers"; -import { parseZetaConsumerLog } from "./test.helpers"; - -chai.should(); - -describe("ZetaTokenConsumer tests", () => { - let uniswapV2RouterAddr: string; - let uniswapV3RouterAddr: string; - let USDCAddr: string; - - let zetaTokenConsumerUniV2: ZetaTokenConsumerUniV2; - let zetaTokenConsumerUniV3: ZetaTokenConsumerUniV3; - let zetaTokenNonEthAddress: string; - let zetaTokenNonEth: IERC20; - - let accounts: SignerWithAddress[]; - let tssUpdater: SignerWithAddress; - let tssSigner: SignerWithAddress; - let randomSigner: SignerWithAddress; - - const getNow = async () => { - const block = await ethers.provider.getBlock("latest"); - return block.timestamp; - }; - - const swapToken = async (signer: SignerWithAddress, tokenAddress: string, expectedAmount: BigNumber) => { - const uniswapRouter = UniswapV2Router02__factory.connect(uniswapV2RouterAddr, signer); - - const WETH = await uniswapRouter.WETH(); - const path = [WETH, tokenAddress]; - const tx = await uniswapRouter - .connect(signer) - .swapETHForExactTokens(expectedAmount, path, signer.address, (await getNow()) + 360, { value: parseEther("10") }); - - await tx.wait(); - }; - - /** - * @todo (andy): WIP, not in use yet - */ - const createPoolV3 = async (signer: SignerWithAddress, tokenAddress: string) => { - const DAI = getAddress("dai", { - customNetworkName: "eth-mainnet", - customZetaNetwork: "mainnet" - }); - - const UNI_NFT_MANAGER_V3 = getAddress("uniswapV3NftManager", { - customNetworkName: "eth-mainnet", - customZetaNetwork: "mainnet" - }); - - const USDC = getAddress("usdc", { - customNetworkName: "eth-mainnet", - customZetaNetwork: "mainnet" - }); - - await swapToken(signer, DAI, parseUnits("10000", 18)); - - const token = IERC20__factory.connect(USDC, signer); - const tx1 = await token.approve(UNI_NFT_MANAGER_V3, MaxUint256); - await tx1.wait(); - - const token2 = IERC20__factory.connect(DAI, signer); - const tx2 = await token2.approve(UNI_NFT_MANAGER_V3, MaxUint256); - await tx2.wait(); - - const uniswapRouter = INonfungiblePositionManager__factory.connect(UNI_NFT_MANAGER_V3, signer); - - const uniswapNFTManager = IPoolInitializer__factory.connect(UNI_NFT_MANAGER_V3, signer); - const tx3 = await uniswapNFTManager.createAndInitializePoolIfNecessary( - USDC, - DAI, - 3000, - "80000000000000000000000000000" - ); - await tx3.wait(); - - const params: INonfungiblePositionManager.MintParamsStruct = { - amount0Desired: parseEther("10"), - amount0Min: 0, - amount1Desired: parseEther("10"), - amount1Min: 0, - deadline: (await getNow()) + 360, - fee: 3000, - recipient: signer.address, - tickLower: 193, - tickUpper: 194, - token0: USDC, - token1: DAI - }; - - const tx4 = await uniswapRouter.mint(params); - await tx4.wait(); - }; - - beforeEach(async () => { - accounts = await ethers.getSigners(); - [tssUpdater, tssSigner, randomSigner] = accounts; - - zetaTokenNonEth = await deployZetaNonEth({ - args: [tssSigner.address, tssUpdater.address] - }); - - uniswapV2RouterAddr = getAddress("uniswapV2Router02", { - customNetworkName: "eth-mainnet", - customZetaNetwork: "mainnet" - }); - - const DAI = getAddress("dai", { - customNetworkName: "eth-mainnet", - customZetaNetwork: "mainnet" - }); - - const UNI_QUOTER_V3 = getAddress("uniswapV3Quoter", { - customNetworkName: "eth-mainnet", - customZetaNetwork: "mainnet" - }); - - const UNI_ROUTER_V3 = getAddress("uniswapV3Router", { - customNetworkName: "eth-mainnet", - customZetaNetwork: "mainnet" - }); - - const WETH9 = getAddress("weth9", { - customNetworkName: "eth-mainnet", - customZetaNetwork: "mainnet" - }); - - USDCAddr = getAddress("usdc", { - customNetworkName: "eth-mainnet", - customZetaNetwork: "mainnet" - }); - - // For testing purposes we use an existing uni v3 pool - await swapToken(tssUpdater, DAI, parseEther("10000")); - await swapToken(randomSigner, DAI, parseEther("10000")); - await swapToken(randomSigner, DAI, parseEther("10000")); - await swapToken(randomSigner, DAI, parseEther("10000")); - await swapToken(randomSigner, DAI, parseEther("10000")); - zetaTokenNonEthAddress = DAI; - zetaTokenNonEth = IERC20__factory.connect(zetaTokenNonEthAddress, tssSigner); - - zetaTokenConsumerUniV2 = await getZetaTokenConsumerUniV2Strategy({ - deployParams: [zetaTokenNonEthAddress, uniswapV2RouterAddr] - }); - - uniswapV3RouterAddr = UNI_ROUTER_V3; - zetaTokenConsumerUniV3 = await getZetaTokenConsumerUniV3Strategy({ - deployParams: [zetaTokenNonEthAddress, uniswapV3RouterAddr, UNI_QUOTER_V3, WETH9, 3000, 3000] - }); - }); - - describe("getZetaFromEth", () => { - const shouldGetZetaFromETH = async (zetaTokenConsumer: ZetaTokenConsumer) => { - const initialZetaBalance = await zetaTokenNonEth.balanceOf(randomSigner.address); - const tx = await zetaTokenConsumer.getZetaFromEth(randomSigner.address, 1, { value: parseEther("1") }); - - const result = await tx.wait(); - const eventNames = parseZetaConsumerLog(result.logs); - expect(eventNames.filter(e => e === "EthExchangedForZeta")).to.have.lengthOf(1); - - const finalZetaBalance = await zetaTokenNonEth.balanceOf(randomSigner.address); - expect(finalZetaBalance).to.be.gt(initialZetaBalance); - }; - - it("Should get zeta from eth using UniV2", async () => { - const zetaTokenConsumer = zetaTokenConsumerUniV2.connect(randomSigner); - await shouldGetZetaFromETH(zetaTokenConsumer); - }); - - it("Should get zeta from eth using UniV3", async () => { - const zetaTokenConsumer = zetaTokenConsumerUniV3.connect(randomSigner); - await shouldGetZetaFromETH(zetaTokenConsumer); - }); - }); - - describe("getZetaFromToken", () => { - const shouldGetZetaFromToken = async (zetaTokenConsumer: ZetaTokenConsumer) => { - const USDCContract = IERC20__factory.connect(USDCAddr, randomSigner); - await swapToken(randomSigner, USDCAddr, parseUnits("10000", 6)); - - const initialZetaBalance = await zetaTokenNonEth.balanceOf(randomSigner.address); - const tx1 = await USDCContract.approve(zetaTokenConsumer.address, MaxUint256); - await tx1.wait(); - - const tx2 = await zetaTokenConsumer.getZetaFromToken(randomSigner.address, 1, USDCAddr, parseUnits("100", 6)); - const result = await tx2.wait(); - - const eventNames = parseZetaConsumerLog(result.logs); - expect(eventNames.filter(e => e === "TokenExchangedForZeta")).to.have.lengthOf(1); - - const finalZetaBalance = await zetaTokenNonEth.balanceOf(randomSigner.address); - expect(finalZetaBalance).to.be.gt(initialZetaBalance); - }; - - it("Should get zeta from token using UniV2", async () => { - const zetaTokenConsumer = zetaTokenConsumerUniV2.connect(randomSigner); - await shouldGetZetaFromToken(zetaTokenConsumer); - }); - - it("Should get zeta from token using UniV3", async () => { - const zetaTokenConsumer = zetaTokenConsumerUniV3.connect(randomSigner); - await shouldGetZetaFromToken(zetaTokenConsumer); - }); - }); - - describe("getEthFromZeta", () => { - const shouldGetETHFromZeta = async (zetaTokenConsumer: ZetaTokenConsumer) => { - const initialEthBalance = await ethers.provider.getBalance(randomSigner.address); - const tx1 = await zetaTokenNonEth.connect(randomSigner).approve(zetaTokenConsumer.address, MaxUint256); - await tx1.wait(); - - const tx2 = await zetaTokenConsumer.getEthFromZeta(randomSigner.address, 1, parseUnits("5000", 18)); - const result = await tx2.wait(); - - const eventNames = parseZetaConsumerLog(result.logs); - expect(eventNames.filter(e => e === "ZetaExchangedForEth")).to.have.lengthOf(1); - - const finalEthBalance = await ethers.provider.getBalance(randomSigner.address); - expect(finalEthBalance).to.be.gt(initialEthBalance); - }; - - it("Should get eth from zeta using UniV2", async () => { - const zetaTokenConsumer = zetaTokenConsumerUniV2.connect(randomSigner); - await shouldGetETHFromZeta(zetaTokenConsumer); - }); - - it("Should get eth from zeta using UniV3", async () => { - const zetaTokenConsumer = zetaTokenConsumerUniV3.connect(randomSigner); - - await shouldGetETHFromZeta(zetaTokenConsumer); - }); - }); - - describe("getTokenFromZeta", () => { - const shouldGetTokenFromZeta = async (zetaTokenConsumer: ZetaTokenConsumer) => { - const USDCContract = IERC20__factory.connect(USDCAddr, randomSigner); - - const initialTokenBalance = await USDCContract.balanceOf(randomSigner.address); - const tx1 = await zetaTokenNonEth.connect(randomSigner).approve(zetaTokenConsumer.address, MaxUint256); - await tx1.wait(); - - const tx2 = await zetaTokenConsumer.getTokenFromZeta(randomSigner.address, 1, USDCAddr, parseUnits("5000", 18)); - const result = await tx2.wait(); - - const eventNames = parseZetaConsumerLog(result.logs); - expect(eventNames.filter(e => e === "ZetaExchangedForToken")).to.have.lengthOf(1); - - const finalTokenBalance = await USDCContract.balanceOf(randomSigner.address); - expect(finalTokenBalance).to.be.gt(initialTokenBalance); - }; - - it("Should get token from zeta using UniV2", async () => { - const zetaTokenConsumer = zetaTokenConsumerUniV2.connect(randomSigner); - await shouldGetTokenFromZeta(zetaTokenConsumer); - }); - - it("Should get token from zeta using UniV3", async () => { - const zetaTokenConsumer = zetaTokenConsumerUniV3.connect(randomSigner); - await shouldGetTokenFromZeta(zetaTokenConsumer); - }); - }); -}); diff --git a/packages/protocol-contracts/test/test.helpers.ts b/packages/protocol-contracts/test/test.helpers.ts deleted file mode 100644 index 4f0950b2..00000000 --- a/packages/protocol-contracts/test/test.helpers.ts +++ /dev/null @@ -1,18 +0,0 @@ -import { ZetaTokenConsumer__factory } from "@zetachain/interfaces/typechain-types"; -import { BigNumber, ContractReceipt } from "ethers"; - -export const parseZetaConsumerLog = (logs: ContractReceipt["logs"]) => { - const iface = ZetaTokenConsumer__factory.createInterface(); - - const eventNames = logs.map(log => { - try { - const parsedLog = iface.parseLog(log); - - return parsedLog.name; - } catch (e) { - return "NO_ZETA_LOG"; - } - }); - - return eventNames; -}; diff --git a/packages/zeta-app-contracts/contracts/multi-chain-value/MultiChainValue.sol b/packages/zeta-app-contracts/contracts/multi-chain-value/MultiChainValue.sol index 8a8bc07e..e250ef3b 100644 --- a/packages/zeta-app-contracts/contracts/multi-chain-value/MultiChainValue.sol +++ b/packages/zeta-app-contracts/contracts/multi-chain-value/MultiChainValue.sol @@ -2,9 +2,9 @@ pragma solidity 0.8.7; import "@openzeppelin/contracts/access/Ownable.sol"; -import "@zetachain/protocol-contracts/contracts/Zeta.eth.sol"; -import "@zetachain/protocol-contracts/contracts/ZetaInteractor.sol"; -import "@zetachain/protocol-contracts/contracts/interfaces/ZetaInterfaces.sol"; +import "@zetachain/protocol-contracts/contracts/evm/Zeta.eth.sol"; +import "@zetachain/protocol-contracts/contracts/evm/tools/ZetaInteractor.sol"; +import "@zetachain/protocol-contracts/contracts/evm/interfaces/ZetaInterfaces.sol"; /** * @dev Custom errors for contract MultiChainValue diff --git a/packages/zeta-app-contracts/contracts/multi-chain-value/test/ZetaConnectorMock.sol b/packages/zeta-app-contracts/contracts/multi-chain-value/test/ZetaConnectorMock.sol index 5debe3a7..8a9ca23d 100644 --- a/packages/zeta-app-contracts/contracts/multi-chain-value/test/ZetaConnectorMock.sol +++ b/packages/zeta-app-contracts/contracts/multi-chain-value/test/ZetaConnectorMock.sol @@ -1,7 +1,7 @@ // SPDX-License-Identifier: MIT pragma solidity 0.8.7; -import "@zetachain/protocol-contracts/contracts/interfaces/ZetaInterfaces.sol"; +import "@zetachain/protocol-contracts/contracts/evm/interfaces/ZetaInterfaces.sol"; contract ZetaConnectorMockValue is ZetaConnector { function send(ZetaInterfaces.SendInput calldata input) external override {} diff --git a/packages/zeta-app-contracts/contracts/shared/ImmutableCreate2Factory.sol b/packages/zeta-app-contracts/contracts/shared/ImmutableCreate2Factory.sol index 9e47166d..b97a3210 100644 --- a/packages/zeta-app-contracts/contracts/shared/ImmutableCreate2Factory.sol +++ b/packages/zeta-app-contracts/contracts/shared/ImmutableCreate2Factory.sol @@ -5,4 +5,4 @@ pragma solidity 0.5.10; * @dev Contracts that need to be compiled for testing purposes */ -import "@zetachain/protocol-contracts/contracts/ImmutableCreate2Factory.sol"; +import "@zetachain/protocol-contracts/contracts/evm/tools/ImmutableCreate2Factory.sol"; diff --git a/packages/zeta-app-contracts/package.json b/packages/zeta-app-contracts/package.json index 67c47de6..118bd45a 100644 --- a/packages/zeta-app-contracts/package.json +++ b/packages/zeta-app-contracts/package.json @@ -29,11 +29,10 @@ "tsconfig-paths": "^3.14.1" }, "dependencies": { - "@openzeppelin/contracts": "4.7.3", + "@openzeppelin/contracts": "^4.8.3", "@zetachain/addresses": "workspace:^", "@zetachain/addresses-tools": "workspace:^", - "@zetachain/interfaces": "workspace:^", - "@zetachain/protocol-contracts": "workspace:^", + "@zetachain/protocol-contracts": "^0.0.6", "ethers": "5.6.8" } } diff --git a/packages/zevm-example-contracts/contracts/multi-output/ZetaMultiOutput.sol b/packages/zevm-example-contracts/contracts/multi-output/ZetaMultiOutput.sol index ded20bc7..acbc04cc 100644 --- a/packages/zevm-example-contracts/contracts/multi-output/ZetaMultiOutput.sol +++ b/packages/zevm-example-contracts/contracts/multi-output/ZetaMultiOutput.sol @@ -2,7 +2,7 @@ pragma solidity 0.8.7; import "@openzeppelin/contracts/access/Ownable.sol"; -import "@zetachain/zevm-protocol-contracts/contracts/system/SystemContract.sol"; +import "@zetachain/protocol-contracts/contracts/zevm/SystemContract.sol"; import "../shared/BytesHelperLib.sol"; import "../shared/SwapHelperLib.sol"; diff --git a/packages/zevm-example-contracts/contracts/shared/SwapHelperLib.sol b/packages/zevm-example-contracts/contracts/shared/SwapHelperLib.sol index 0118b32c..59f18880 100644 --- a/packages/zevm-example-contracts/contracts/shared/SwapHelperLib.sol +++ b/packages/zevm-example-contracts/contracts/shared/SwapHelperLib.sol @@ -3,7 +3,7 @@ pragma solidity =0.8.7; import "@uniswap/v2-periphery/contracts/interfaces/IUniswapV2Router02.sol"; import "@uniswap/v2-periphery/contracts/interfaces/IUniswapV2Router01.sol"; -import "@zetachain/zevm-protocol-contracts/contracts/interfaces/IZRC20.sol"; +import "@zetachain/protocol-contracts/contracts/zevm/interfaces/IZRC20.sol"; library SwapHelperLib { uint16 internal constant MAX_DEADLINE = 200; diff --git a/packages/zevm-example-contracts/contracts/shared/TestSystemContract.sol b/packages/zevm-example-contracts/contracts/shared/TestSystemContract.sol index cb469f62..3343bff5 100644 --- a/packages/zevm-example-contracts/contracts/shared/TestSystemContract.sol +++ b/packages/zevm-example-contracts/contracts/shared/TestSystemContract.sol @@ -1,8 +1,8 @@ // SPDX-License-Identifier: MIT pragma solidity 0.8.7; -import "@zetachain/zevm-protocol-contracts/contracts/interfaces/zContract.sol"; -import "@zetachain/zevm-protocol-contracts/contracts/interfaces/IZRC20.sol"; +import "@zetachain/protocol-contracts/contracts/zevm/interfaces/zContract.sol"; +import "@zetachain/protocol-contracts/contracts/zevm/interfaces/IZRC20.sol"; interface SystemContractErrors { error CallerIsNotFungibleModule(); diff --git a/packages/zevm-example-contracts/contracts/zeta-swap/ZetaCurveSwapDemo.sol b/packages/zevm-example-contracts/contracts/zeta-swap/ZetaCurveSwapDemo.sol index 89784826..885b2957 100644 --- a/packages/zevm-example-contracts/contracts/zeta-swap/ZetaCurveSwapDemo.sol +++ b/packages/zevm-example-contracts/contracts/zeta-swap/ZetaCurveSwapDemo.sol @@ -1,8 +1,8 @@ // SPDX-License-Identifier: MIT pragma solidity 0.8.7; -import "@zetachain/zevm-protocol-contracts/contracts/interfaces/zContract.sol"; -import "@zetachain/zevm-protocol-contracts/contracts/interfaces/IZRC20.sol"; +import "@zetachain/protocol-contracts/contracts/zevm/interfaces/zContract.sol"; +import "@zetachain/protocol-contracts/contracts/zevm/interfaces/IZRC20.sol"; interface ICRV3 { function exchange(uint256 i, uint256 j, uint256 dx, uint256 min_dy, bool use_eth) external returns (uint256); diff --git a/packages/zevm-example-contracts/contracts/zeta-swap/ZetaSwap.sol b/packages/zevm-example-contracts/contracts/zeta-swap/ZetaSwap.sol index e1c07a4b..a7dc4b3a 100644 --- a/packages/zevm-example-contracts/contracts/zeta-swap/ZetaSwap.sol +++ b/packages/zevm-example-contracts/contracts/zeta-swap/ZetaSwap.sol @@ -4,8 +4,8 @@ pragma solidity 0.8.7; import "@uniswap/v2-periphery/contracts/interfaces/IUniswapV2Router02.sol"; import "@uniswap/v2-periphery/contracts/interfaces/IUniswapV2Router01.sol"; -import "@zetachain/zevm-protocol-contracts/contracts/interfaces/zContract.sol"; -import "@zetachain/zevm-protocol-contracts/contracts/interfaces/IZRC20.sol"; +import "@zetachain/protocol-contracts/contracts/zevm/interfaces/zContract.sol"; +import "@zetachain/protocol-contracts/contracts/zevm/interfaces/IZRC20.sol"; interface ZetaSwapErrors { error WrongGasContract(); diff --git a/packages/zevm-example-contracts/contracts/zeta-swap/ZetaSwapBtcInbound.sol b/packages/zevm-example-contracts/contracts/zeta-swap/ZetaSwapBtcInbound.sol index 6b4526c7..22ed1797 100644 --- a/packages/zevm-example-contracts/contracts/zeta-swap/ZetaSwapBtcInbound.sol +++ b/packages/zevm-example-contracts/contracts/zeta-swap/ZetaSwapBtcInbound.sol @@ -2,7 +2,7 @@ pragma solidity 0.8.7; import "./ZetaSwap.sol"; -import "@zetachain/zevm-protocol-contracts/contracts/system/SystemContract.sol"; +import "@zetachain/protocol-contracts/contracts/zevm/SystemContract.sol"; contract ZetaSwapBtcInbound is ZetaSwap { address immutable systemContractAddress; diff --git a/packages/zevm-example-contracts/contracts/zeta-swap/ZetaSwapBtcInboundV2.sol b/packages/zevm-example-contracts/contracts/zeta-swap/ZetaSwapBtcInboundV2.sol index aed544af..9606d0e1 100644 --- a/packages/zevm-example-contracts/contracts/zeta-swap/ZetaSwapBtcInboundV2.sol +++ b/packages/zevm-example-contracts/contracts/zeta-swap/ZetaSwapBtcInboundV2.sol @@ -1,8 +1,8 @@ // SPDX-License-Identifier: MIT pragma solidity 0.8.7; -import "@zetachain/zevm-protocol-contracts/contracts/system/SystemContract.sol"; -import "@zetachain/zevm-protocol-contracts/contracts/interfaces/zContract.sol"; +import "@zetachain/protocol-contracts/contracts/zevm/SystemContract.sol"; +import "@zetachain/protocol-contracts/contracts/zevm/interfaces/zContract.sol"; import "../shared/BytesHelperLib.sol"; import "../shared/SwapHelperLib.sol"; diff --git a/packages/zevm-example-contracts/contracts/zeta-swap/ZetaSwapV2.sol b/packages/zevm-example-contracts/contracts/zeta-swap/ZetaSwapV2.sol index 95fd0e3a..e521e577 100644 --- a/packages/zevm-example-contracts/contracts/zeta-swap/ZetaSwapV2.sol +++ b/packages/zevm-example-contracts/contracts/zeta-swap/ZetaSwapV2.sol @@ -1,8 +1,8 @@ // SPDX-License-Identifier: MIT pragma solidity 0.8.7; -import "@zetachain/zevm-protocol-contracts/contracts/system/SystemContract.sol"; -import "@zetachain/zevm-protocol-contracts/contracts/interfaces/zContract.sol"; +import "@zetachain/protocol-contracts/contracts/zevm/SystemContract.sol"; +import "@zetachain/protocol-contracts/contracts/zevm/interfaces/zContract.sol"; import "../shared/SwapHelperLib.sol"; diff --git a/packages/zevm-example-contracts/package.json b/packages/zevm-example-contracts/package.json index eaae7ebd..9c43aa71 100644 --- a/packages/zevm-example-contracts/package.json +++ b/packages/zevm-example-contracts/package.json @@ -29,12 +29,11 @@ "tsconfig-paths": "^3.14.1" }, "dependencies": { - "@openzeppelin/contracts": "4.7.3", + "@openzeppelin/contracts": "^4.8.3", "@uniswap/v2-periphery": "1.1.0-beta.0", "@zetachain/addresses": "workspace:^", "@zetachain/addresses-tools": "workspace:^", - "@zetachain/interfaces": "workspace:^", - "@zetachain/zevm-protocol-contracts": "workspace:^", + "@zetachain/protocol-contracts": "^0.0.6", "ethers": "5.6.8" } } diff --git a/packages/zevm-protocol-contracts/.env.example b/packages/zevm-protocol-contracts/.env.example deleted file mode 100644 index d53e3d1a..00000000 --- a/packages/zevm-protocol-contracts/.env.example +++ /dev/null @@ -1,2 +0,0 @@ -ALCHEMY_API_KEY_MAINNET= -ALCHEMY_API_KEY_GOERLI= \ No newline at end of file diff --git a/packages/zevm-protocol-contracts/.eslintrc.js b/packages/zevm-protocol-contracts/.eslintrc.js deleted file mode 100644 index 77b8f69a..00000000 --- a/packages/zevm-protocol-contracts/.eslintrc.js +++ /dev/null @@ -1,23 +0,0 @@ -const path = require("path"); - -const OFF = 0; - -module.exports = { - env: { - browser: false, - es2021: true, - mocha: true, - node: true, - }, - extends: ["../../.eslintrc.js"], - rules: { - "no-console": OFF, - }, - settings: { - "import/resolver": { - typescript: { - project: path.join(__dirname, "tsconfig.json"), - }, - }, - }, -}; diff --git a/packages/zevm-protocol-contracts/README.md b/packages/zevm-protocol-contracts/README.md deleted file mode 100644 index 13e96f86..00000000 --- a/packages/zevm-protocol-contracts/README.md +++ /dev/null @@ -1,16 +0,0 @@ -# ZetaEVM Protocol contracts - -> ⚠️ The contracts **are not audited yet**, use at your own risk. - -## Environment variables - -Follow the template in `.env.example`. - -* The private key should **not** include `0x`. -* To verify your contracts, you'll need api keys both in BSCScan and Etherscan. - -## Running Tests - -```bash - yarn test -``` diff --git a/packages/zevm-protocol-contracts/contracts/interfaces/IZRC20.sol b/packages/zevm-protocol-contracts/contracts/interfaces/IZRC20.sol deleted file mode 100644 index ecd97122..00000000 --- a/packages/zevm-protocol-contracts/contracts/interfaces/IZRC20.sol +++ /dev/null @@ -1,31 +0,0 @@ -// SPDX-License-Identifier: MIT -pragma solidity 0.8.7; - -interface IZRC20 { - function totalSupply() external view returns (uint256); - - function balanceOf(address account) external view returns (uint256); - - function transfer(address recipient, uint256 amount) external returns (bool); - - function allowance(address owner, address spender) external view returns (uint256); - - function approve(address spender, uint256 amount) external returns (bool); - - function transferFrom( - address sender, - address recipient, - uint256 amount - ) external returns (bool); - - function deposit(address to, uint256 amount) external returns (bool); - - function withdraw(bytes memory to, uint256 amount) external returns (bool); - - function withdrawGasFee() external view returns (address, uint256); - - event Transfer(address indexed from, address indexed to, uint256 value); - event Approval(address indexed owner, address indexed spender, uint256 value); - event Deposit(bytes from, address indexed to, uint256 value); - event Withdrawal(address indexed from, bytes to, uint256 value); -} diff --git a/packages/zevm-protocol-contracts/contracts/interfaces/zContract.sol b/packages/zevm-protocol-contracts/contracts/interfaces/zContract.sol deleted file mode 100644 index 5ede1549..00000000 --- a/packages/zevm-protocol-contracts/contracts/interfaces/zContract.sol +++ /dev/null @@ -1,10 +0,0 @@ -// SPDX-License-Identifier: MIT -pragma solidity 0.8.7; - -interface zContract { - function onCrossChainCall( - address zrc20, - uint256 amount, - bytes calldata message - ) external; -} diff --git a/packages/zevm-protocol-contracts/contracts/system/SystemContract.sol b/packages/zevm-protocol-contracts/contracts/system/SystemContract.sol deleted file mode 100644 index 93daf83f..00000000 --- a/packages/zevm-protocol-contracts/contracts/system/SystemContract.sol +++ /dev/null @@ -1,115 +0,0 @@ -// SPDX-License-Identifier: MIT -pragma solidity 0.8.7; - -import "../interfaces/zContract.sol"; -import "../interfaces/IZRC20.sol"; - -interface SystemContractErrors { - error CallerIsNotFungibleModule(); - - error InvalidTarget(); - - error CantBeIdenticalAddresses(); - - error CantBeZeroAddress(); -} - -contract SystemContract is SystemContractErrors { - mapping(uint256 => uint256) public gasPriceByChainId; - mapping(uint256 => address) public gasCoinZRC20ByChainId; - mapping(uint256 => address) public gasZetaPoolByChainId; - - address public constant FUNGIBLE_MODULE_ADDRESS = 0x735b14BB79463307AAcBED86DAf3322B1e6226aB; - address public wZetaContractAddress; - address public uniswapv2FactoryAddress; - address public uniswapv2Router02Address; - - event SystemContractDeployed(); - event SetGasPrice(uint256, uint256); - event SetGasCoin(uint256, address); - event SetGasZetaPool(uint256, address); - event SetWZeta(address); - - constructor( - address wzeta_, - address uniswapv2Factory_, - address uniswapv2Router02_ - ) { - if (msg.sender != FUNGIBLE_MODULE_ADDRESS) revert CallerIsNotFungibleModule(); - wZetaContractAddress = wzeta_; - uniswapv2FactoryAddress = uniswapv2Factory_; - uniswapv2Router02Address = uniswapv2Router02_; - emit SystemContractDeployed(); - } - - // deposit foreign coins into ZRC20 and call user specified contract on zEVM - function depositAndCall( - address zrc20, - uint256 amount, - address target, - bytes calldata message - ) external { - if (msg.sender != FUNGIBLE_MODULE_ADDRESS) revert CallerIsNotFungibleModule(); - if (target == FUNGIBLE_MODULE_ADDRESS || target == address(this)) revert InvalidTarget(); - - IZRC20(zrc20).deposit(target, amount); - zContract(target).onCrossChainCall(zrc20, amount, message); - } - - // returns sorted token addresses, used to handle return values from pairs sorted in this order - function sortTokens(address tokenA, address tokenB) internal pure returns (address token0, address token1) { - if (tokenA == tokenB) revert CantBeIdenticalAddresses(); - (token0, token1) = tokenA < tokenB ? (tokenA, tokenB) : (tokenB, tokenA); - if (token0 == address(0)) revert CantBeZeroAddress(); - } - - // calculates the CREATE2 address for a pair without making any external calls - function uniswapv2PairFor( - address factory, - address tokenA, - address tokenB - ) public pure returns (address pair) { - (address token0, address token1) = sortTokens(tokenA, tokenB); - pair = address( - uint160( - uint256( - keccak256( - abi.encodePacked( - hex"ff", - factory, - keccak256(abi.encodePacked(token0, token1)), - hex"96e8ac4277198ff8b6f785478aa9a39f403cb768dd02cbee326c3e7da348845f" // init code hash - ) - ) - ) - ) - ); - } - - // fungible module updates the gas price oracle periodically - function setGasPrice(uint256 chainID, uint256 price) external { - if (msg.sender != FUNGIBLE_MODULE_ADDRESS) revert CallerIsNotFungibleModule(); - gasPriceByChainId[chainID] = price; - emit SetGasPrice(chainID, price); - } - - function setGasCoinZRC20(uint256 chainID, address zrc20) external { - if (msg.sender != FUNGIBLE_MODULE_ADDRESS) revert CallerIsNotFungibleModule(); - gasCoinZRC20ByChainId[chainID] = zrc20; - emit SetGasCoin(chainID, zrc20); - } - - // set the pool wzeta/erc20 address - function setGasZetaPool(uint256 chainID, address erc20) external { - if (msg.sender != FUNGIBLE_MODULE_ADDRESS) revert CallerIsNotFungibleModule(); - address pool = uniswapv2PairFor(uniswapv2FactoryAddress, wZetaContractAddress, erc20); - gasZetaPoolByChainId[chainID] = pool; - emit SetGasZetaPool(chainID, pool); - } - - function setWZETAContractAddress(address addr) external { - if (msg.sender != FUNGIBLE_MODULE_ADDRESS) revert CallerIsNotFungibleModule(); - wZetaContractAddress = addr; - emit SetWZeta(wZetaContractAddress); - } -} diff --git a/packages/zevm-protocol-contracts/hardhat.config.ts b/packages/zevm-protocol-contracts/hardhat.config.ts deleted file mode 100644 index 53562131..00000000 --- a/packages/zevm-protocol-contracts/hardhat.config.ts +++ /dev/null @@ -1,46 +0,0 @@ -import "@nomiclabs/hardhat-etherscan"; -import "@nomiclabs/hardhat-waffle"; -import "@typechain/hardhat"; -import "hardhat-gas-reporter"; -import "solidity-coverage"; -import "tsconfig-paths/register"; - -import { getHardhatConfigNetworks, getHardhatConfigScanners } from "@zetachain/addresses-tools/src/networks"; -import * as dotenv from "dotenv"; -import type { HardhatUserConfig } from "hardhat/types"; - -dotenv.config(); - -const PRIVATE_KEYS = process.env.PRIVATE_KEY !== undefined ? [`0x${process.env.PRIVATE_KEY}`] : []; - -const config: HardhatUserConfig = { - etherscan: { - ...getHardhatConfigScanners(), - }, - gasReporter: { - currency: "USD", - enabled: process.env.REPORT_GAS !== undefined, - }, - networks: { - ...getHardhatConfigNetworks(PRIVATE_KEYS), - }, - solidity: { - compilers: [ - { version: "0.5.10" /** For create2 factory */ }, - { version: "0.6.6" /** For uniswap v2 */ }, - { version: "0.8.7" }, - ], - settings: { - /** - * @see {@link https://smock.readthedocs.io/en/latest/getting-started.html} - */ - outputSelection: { - "*": { - "*": ["storageLayout"], - }, - }, - }, - }, -}; - -export default config; diff --git a/packages/zevm-protocol-contracts/package.json b/packages/zevm-protocol-contracts/package.json deleted file mode 100644 index a327952f..00000000 --- a/packages/zevm-protocol-contracts/package.json +++ /dev/null @@ -1,37 +0,0 @@ -{ - "name": "@zetachain/zevm-protocol-contracts", - "version": "0.0.1", - "license": "MIT", - "author": "zetachain", - "publishConfig": { - "access": "public", - "registry": "https://registry.npmjs.org/" - }, - "scripts": { - "clean": "npx hardhat clean", - "compile": "npx hardhat compile", - "prepublishOnly": "echo 'This package has no prepublishOnly tasks.'", - "multi-chain-swap:deploy-local": "ZETA_NETWORK=troy EXECUTE_PROGRAMMATICALLY=true npx hardhat run scripts/multi-chain-swap/deploy.ts --network hardhat", - "multi-chain-swap:deploy": "ZETA_NETWORK=athens EXECUTE_PROGRAMMATICALLY=true npx hardhat run scripts/multi-chain-swap/deploy.ts", - "lint:fix": "npm run lint:js:fix && npm run lint:sol:fix", - "lint:js:fix": "eslint --ext .js,.ts . --fix", - "lint:js": "eslint --ext .js,.ts .", - "lint:sol:fix": "prettier --write \"contracts/**/*.sol\"", - "lint:sol": "solhint 'contracts/**/*.sol' && prettier -c 'contracts/**/*.sol'", - "lint": "npm run lint:js && npm run lint:sol", - "test:watch": "echo You need to install `entr` to run this command && find contracts/**/** lib/**/** test/**/** -iname '*.sol' -o -iname '*.ts' | entr -cnr npx hardhat test", - "test": "npx hardhat test", - "tsc:watch": "npx tsc --watch" - }, - "devDependencies": { - "hardhat-gas-reporter": "^1.0.8", - "solidity-coverage": "^0.7.20", - "tsconfig-paths": "^3.14.1" - }, - "dependencies": { - "@openzeppelin/contracts": "4.7.3", - "@uniswap/v2-periphery": "1.1.0-beta.0", - "@zetachain/addresses-tools": "workspace:^", - "ethers": "5.6.8" - } -} diff --git a/packages/zevm-protocol-contracts/tsconfig.json b/packages/zevm-protocol-contracts/tsconfig.json deleted file mode 100644 index 355cfda5..00000000 --- a/packages/zevm-protocol-contracts/tsconfig.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "extends": "../../tsconfig.json", - "include": ["./scripts", "./lib", "./test", "./tests", "./typechain", "./**/*.json", "typechain-types"], - "exclude": ["artifacts", "cache"], - "files": ["./hardhat.config.ts"], - "compilerOptions": { - "baseUrl": ".", - "paths": { - "@zetachain/addresses": ["../addresses/src/index"], - "@zetachain/addresses/*": ["../addresses/src/*"], - "@zetachain/interfaces": ["../interfaces/src/index"] - } - } -} diff --git a/yarn.lock b/yarn.lock index 648f1b6e..6a83c891 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1737,10 +1737,10 @@ __metadata: languageName: node linkType: hard -"@openzeppelin/contracts@npm:4.7.3": - version: 4.7.3 - resolution: "@openzeppelin/contracts@npm:4.7.3" - checksum: 18382fcacf7cfd652f5dd0e70c08f08ea74eaa8ff11e9f9850639ada70198ae01a3f9493d89a52d724f2db394e9616bf6258017804612ba273167cf657fbb073 +"@openzeppelin/contracts@npm:^4.8.3": + version: 4.8.3 + resolution: "@openzeppelin/contracts@npm:4.8.3" + checksum: aea130d38d46840c5cbe3adbaa9a7ac645e4bd66ad3f3baf2fa78588c408d1a686170b3408c9e2e5e05530fba22ecdc00d7efb6b27852a8b29f91accbc0af255 languageName: node linkType: hard @@ -2720,13 +2720,13 @@ __metadata: resolution: "@zetachain/example-contracts@workspace:packages/example-contracts" dependencies: "@defi-wonderland/smock": ^2.3.4 - "@openzeppelin/contracts": 4.7.3 + "@openzeppelin/contracts": ^4.8.3 "@uniswap/v2-periphery": 1.1.0-beta.0 "@uniswap/v3-periphery": 1.1.0 "@zetachain/addresses": "workspace:^" "@zetachain/addresses-tools": "workspace:^" - "@zetachain/interfaces": "workspace:^" - "@zetachain/protocol-contracts": "workspace:^" + "@zetachain/protocol-contracts": ^0.0.6 + "@zetachain/protocol-contracts-deprecated": "workspace:^" ethers: 5.6.8 hardhat-gas-reporter: ^1.0.8 solidity-coverage: ^0.7.20 @@ -2734,38 +2734,51 @@ __metadata: languageName: unknown linkType: soft -"@zetachain/interfaces@workspace:^, @zetachain/interfaces@workspace:packages/interfaces": +"@zetachain/interfaces-deprecated@workspace:packages/interfaces-deprecated": version: 0.0.0-use.local - resolution: "@zetachain/interfaces@workspace:packages/interfaces" + resolution: "@zetachain/interfaces-deprecated@workspace:packages/interfaces-deprecated" languageName: unknown linkType: soft -"@zetachain/protocol-contracts@workspace:^, @zetachain/protocol-contracts@workspace:packages/protocol-contracts": +"@zetachain/protocol-contracts-deprecated@workspace:^, @zetachain/protocol-contracts-deprecated@workspace:packages/protocol-contracts-deprecated": version: 0.0.0-use.local - resolution: "@zetachain/protocol-contracts@workspace:packages/protocol-contracts" + resolution: "@zetachain/protocol-contracts-deprecated@workspace:packages/protocol-contracts-deprecated" dependencies: - "@openzeppelin/contracts": 4.7.3 + "@openzeppelin/contracts": ^4.8.3 "@uniswap/v2-periphery": 1.1.0-beta.0 "@uniswap/v3-periphery": 1.1.0 "@zetachain/addresses": "workspace:^" "@zetachain/addresses-tools": "workspace:^" - "@zetachain/interfaces": "workspace:^" + "@zetachain/protocol-contracts": ^0.0.4 ethers: 5.6.8 hardhat-abi-exporter: ^2.10.0 tsconfig-paths: ^3.14.1 languageName: unknown linkType: soft +"@zetachain/protocol-contracts@npm:^0.0.4": + version: 0.0.4 + resolution: "@zetachain/protocol-contracts@npm:0.0.4" + checksum: 64a6c97ff65528b7c17ab258ea5a614b91b99b9569c40f6bac5549209724137037f3dfb2ac39c463897e2648162457c2466eb0ca93bc10efa914c85140b32b5b + languageName: node + linkType: hard + +"@zetachain/protocol-contracts@npm:^0.0.6": + version: 0.0.6 + resolution: "@zetachain/protocol-contracts@npm:0.0.6" + checksum: a35368ff57d1d49eb65034453acc9bb045378765af630cdca82cc6182536a90d6b2bbef23288b7154d25d2f878a4350d9764a52f83a09604e019f028a7a729db + languageName: node + linkType: hard + "@zetachain/zeta-app-contracts@workspace:packages/zeta-app-contracts": version: 0.0.0-use.local resolution: "@zetachain/zeta-app-contracts@workspace:packages/zeta-app-contracts" dependencies: "@defi-wonderland/smock": ^2.3.4 - "@openzeppelin/contracts": 4.7.3 + "@openzeppelin/contracts": ^4.8.3 "@zetachain/addresses": "workspace:^" "@zetachain/addresses-tools": "workspace:^" - "@zetachain/interfaces": "workspace:^" - "@zetachain/protocol-contracts": "workspace:^" + "@zetachain/protocol-contracts": ^0.0.6 ethers: 5.6.8 hardhat-gas-reporter: ^1.0.8 solidity-coverage: ^0.7.20 @@ -2777,26 +2790,11 @@ __metadata: version: 0.0.0-use.local resolution: "@zetachain/zevm-example-contracts@workspace:packages/zevm-example-contracts" dependencies: - "@openzeppelin/contracts": 4.7.3 + "@openzeppelin/contracts": ^4.8.3 "@uniswap/v2-periphery": 1.1.0-beta.0 "@zetachain/addresses": "workspace:^" "@zetachain/addresses-tools": "workspace:^" - "@zetachain/interfaces": "workspace:^" - "@zetachain/zevm-protocol-contracts": "workspace:^" - ethers: 5.6.8 - hardhat-gas-reporter: ^1.0.8 - solidity-coverage: ^0.7.20 - tsconfig-paths: ^3.14.1 - languageName: unknown - linkType: soft - -"@zetachain/zevm-protocol-contracts@workspace:^, @zetachain/zevm-protocol-contracts@workspace:packages/zevm-protocol-contracts": - version: 0.0.0-use.local - resolution: "@zetachain/zevm-protocol-contracts@workspace:packages/zevm-protocol-contracts" - dependencies: - "@openzeppelin/contracts": 4.7.3 - "@uniswap/v2-periphery": 1.1.0-beta.0 - "@zetachain/addresses-tools": "workspace:^" + "@zetachain/protocol-contracts": ^0.0.6 ethers: 5.6.8 hardhat-gas-reporter: ^1.0.8 solidity-coverage: ^0.7.20 From 145e65e8a69e2e76c13e7411c298747d7c615261 Mon Sep 17 00:00:00 2001 From: Andres Martin Aiello <50411235+andresaiello@users.noreply.github.com> Date: Fri, 19 May 2023 12:29:01 -0300 Subject: [PATCH 073/115] Develop v1 of liquidity incentives (#74) * Develop v1 of liquidity incentives * remove lib * update contracts * remove unused code * first test * update test * add complex test * add test * add comment * update to use custom errores * add test and refactor * add custom rewards * rename * move nonReentrant * add deploy script * add comment * refactor * add script to read contract data * add Synthetix test cases * Update packages/zevm-app-contracts/test/LiquidityIncentives.spec.ts Co-authored-by: Lucas * Add timelock and cooldown to token (#90) * add cooldown and min staking * etc * update docker file * update dockerfile * add protocol-contracts-deprecated to dockerfile * merge issues --------- Co-authored-by: Lucas --- Dockerfile | 2 + packages/zevm-app-contracts/.env.example | 2 + packages/zevm-app-contracts/.eslintrc.js | 23 + packages/zevm-app-contracts/README.md | 16 + .../RewardDistributor.sol | 130 ++++ .../RewardDistributorFactory.sol | 79 +++ .../Synthetixio/Owned.sol | 38 ++ .../Synthetixio/Pausable.sol | 46 ++ .../RewardsDistributionRecipient.sol | 21 + .../Synthetixio/StakingRewards.sol | 181 ++++++ .../interfaces/IStakingRewards.sol | 33 + .../contracts/shared/BytesHelperLib.sol | 22 + .../contracts/shared/SwapHelperLib.sol | 93 +++ .../contracts/shared/TestContracts.sol | 8 + .../contracts/shared/TestSystemContract.sol | 79 +++ .../contracts/shared/TestUniswapContracts.sol | 10 + .../contracts/shared/TestZRC20.sol | 33 + packages/zevm-app-contracts/hardhat.config.ts | 46 ++ packages/zevm-app-contracts/package.json | 39 ++ packages/zevm-app-contracts/scripts/deploy.ts | 99 +++ .../scripts/readRewardsData.ts | 64 ++ .../test/LiquidityIncentives.spec.ts | 450 +++++++++++++ .../test/Synthetixio/StakingRewards.ts | 558 ++++++++++++++++ .../test/Synthetixio/common.js | 72 +++ .../test/Synthetixio/utils.js | 600 ++++++++++++++++++ .../zevm-app-contracts/test/test.helpers.ts | 71 +++ packages/zevm-app-contracts/tsconfig.json | 14 + .../scripts/zeta-swap/get-system-data.ts | 2 + yarn.lock | 29 +- 29 files changed, 2854 insertions(+), 6 deletions(-) create mode 100644 packages/zevm-app-contracts/.env.example create mode 100644 packages/zevm-app-contracts/.eslintrc.js create mode 100644 packages/zevm-app-contracts/README.md create mode 100644 packages/zevm-app-contracts/contracts/liquidity-incentives/RewardDistributor.sol create mode 100644 packages/zevm-app-contracts/contracts/liquidity-incentives/RewardDistributorFactory.sol create mode 100644 packages/zevm-app-contracts/contracts/liquidity-incentives/Synthetixio/Owned.sol create mode 100644 packages/zevm-app-contracts/contracts/liquidity-incentives/Synthetixio/Pausable.sol create mode 100644 packages/zevm-app-contracts/contracts/liquidity-incentives/Synthetixio/RewardsDistributionRecipient.sol create mode 100644 packages/zevm-app-contracts/contracts/liquidity-incentives/Synthetixio/StakingRewards.sol create mode 100644 packages/zevm-app-contracts/contracts/liquidity-incentives/Synthetixio/interfaces/IStakingRewards.sol create mode 100644 packages/zevm-app-contracts/contracts/shared/BytesHelperLib.sol create mode 100644 packages/zevm-app-contracts/contracts/shared/SwapHelperLib.sol create mode 100644 packages/zevm-app-contracts/contracts/shared/TestContracts.sol create mode 100644 packages/zevm-app-contracts/contracts/shared/TestSystemContract.sol create mode 100644 packages/zevm-app-contracts/contracts/shared/TestUniswapContracts.sol create mode 100644 packages/zevm-app-contracts/contracts/shared/TestZRC20.sol create mode 100644 packages/zevm-app-contracts/hardhat.config.ts create mode 100644 packages/zevm-app-contracts/package.json create mode 100644 packages/zevm-app-contracts/scripts/deploy.ts create mode 100644 packages/zevm-app-contracts/scripts/readRewardsData.ts create mode 100644 packages/zevm-app-contracts/test/LiquidityIncentives.spec.ts create mode 100644 packages/zevm-app-contracts/test/Synthetixio/StakingRewards.ts create mode 100644 packages/zevm-app-contracts/test/Synthetixio/common.js create mode 100644 packages/zevm-app-contracts/test/Synthetixio/utils.js create mode 100644 packages/zevm-app-contracts/test/test.helpers.ts create mode 100644 packages/zevm-app-contracts/tsconfig.json diff --git a/Dockerfile b/Dockerfile index 01784859..5b847e85 100644 --- a/Dockerfile +++ b/Dockerfile @@ -14,6 +14,7 @@ COPY packages/zevm-example-contracts/package.json ./packages/zevm-example-contra COPY packages/addresses/package.json packages/addresses/package.json COPY packages/example-contracts/package.json ./packages/example-contracts/package.json COPY packages/zeta-app-contracts/package.json ./packages/zeta-app-contracts/package.json +COPY packages/protocol-contracts-deprecated/package.json ./packages/protocol-contracts-deprecated/package.json RUN yarn install ; exit 0 COPY . ./ @@ -24,6 +25,7 @@ RUN yarn add solc@0.5.10 solc@0.6.6 solc@0.7.6 solc@0.8.7 RUN cd packages/example-contracts && npx hardhat compile && cd - RUN cd packages/zeta-app-contracts && npx hardhat compile && cd - RUN cd packages/zevm-example-contracts && npx hardhat compile && cd - +RUN cd packages/protocol-contracts-deprecated && npx hardhat compile && cd - WORKDIR /home/zetachain/ diff --git a/packages/zevm-app-contracts/.env.example b/packages/zevm-app-contracts/.env.example new file mode 100644 index 00000000..d53e3d1a --- /dev/null +++ b/packages/zevm-app-contracts/.env.example @@ -0,0 +1,2 @@ +ALCHEMY_API_KEY_MAINNET= +ALCHEMY_API_KEY_GOERLI= \ No newline at end of file diff --git a/packages/zevm-app-contracts/.eslintrc.js b/packages/zevm-app-contracts/.eslintrc.js new file mode 100644 index 00000000..77b8f69a --- /dev/null +++ b/packages/zevm-app-contracts/.eslintrc.js @@ -0,0 +1,23 @@ +const path = require("path"); + +const OFF = 0; + +module.exports = { + env: { + browser: false, + es2021: true, + mocha: true, + node: true, + }, + extends: ["../../.eslintrc.js"], + rules: { + "no-console": OFF, + }, + settings: { + "import/resolver": { + typescript: { + project: path.join(__dirname, "tsconfig.json"), + }, + }, + }, +}; diff --git a/packages/zevm-app-contracts/README.md b/packages/zevm-app-contracts/README.md new file mode 100644 index 00000000..af7d3c4b --- /dev/null +++ b/packages/zevm-app-contracts/README.md @@ -0,0 +1,16 @@ +# ZetaEVM App contracts + +> ⚠️ The contracts **are not audited yet**, use at your own risk. + +## Environment variables + +Follow the template in `.env.example`. + +* The private key should **not** include `0x`. +* To verify your contracts, you'll need api keys both in BSCScan and Etherscan. + +## Running Tests + +```bash + yarn test +``` diff --git a/packages/zevm-app-contracts/contracts/liquidity-incentives/RewardDistributor.sol b/packages/zevm-app-contracts/contracts/liquidity-incentives/RewardDistributor.sol new file mode 100644 index 00000000..a782370b --- /dev/null +++ b/packages/zevm-app-contracts/contracts/liquidity-incentives/RewardDistributor.sol @@ -0,0 +1,130 @@ +// SPDX-License-Identifier: MIT +pragma solidity 0.8.7; + +import "@openzeppelin/contracts/interfaces/IERC20.sol"; +import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol"; +import "@uniswap/v2-periphery/contracts/interfaces/IUniswapV2Router02.sol"; +import "@uniswap/v2-core/contracts/interfaces/IUniswapV2Pair.sol"; + +import "@zetachain/protocol-contracts/contracts/zevm/SystemContract.sol"; + +import "./Synthetixio/StakingRewards.sol"; + +contract RewardDistributor is StakingRewards { + uint16 internal constant MAX_DEADLINE = 200; + + IERC20 public stakingTokenA; + IERC20 public stakingTokenB; + SystemContract private systemContract; + uint256 minCoolDown; + uint256 minStakingPeriod; + mapping(address => uint256) public lastDeposit; + mapping(address => uint256) public unlockTokensAt; + + error ZeroStakeAmount(); + error InvalidTokenAddress(); + error MinimumStakingPeriodNotMet(); + + constructor( + address owner, + address rewardsDistribution, + address rewardsToken, + address stakingToken, + address stakingTokenA_, + address stakingTokenB_, + address systemContract_ + ) StakingRewards(owner, rewardsDistribution, rewardsToken, stakingToken) { + stakingTokenA = IERC20(stakingTokenA_); + stakingTokenB = IERC20(stakingTokenB_); + systemContract = SystemContract(systemContract_); + } + + function _addLiquidity(uint256 tokenAmountA, uint256 tokenAmountB) internal returns (uint256) { + stakingTokenA.transferFrom(msg.sender, address(this), tokenAmountA); + stakingTokenA.approve(systemContract.uniswapv2Router02Address(), tokenAmountA); + + stakingTokenB.transferFrom(msg.sender, address(this), tokenAmountB); + stakingTokenB.approve(systemContract.uniswapv2Router02Address(), tokenAmountB); + + (, , uint LPTokenAmount) = IUniswapV2Router02(systemContract.uniswapv2Router02Address()).addLiquidity( + address(stakingTokenA), + address(stakingTokenB), + tokenAmountA, + tokenAmountB, + 0, + 0, + address(this), + block.timestamp + MAX_DEADLINE + ); + + return LPTokenAmount; + } + + /// @param tokenAddress Token you already know the amount you want to deposit + /// @param amount Amount of token you want to deposit + /// @return Amount of the other token you will need to execute addLiquidityAndStake + function otherTokenByAmount(address tokenAddress, uint256 amount) public view returns (uint256) { + address otherTokenAddress = address(stakingTokenA) == tokenAddress + ? address(stakingTokenB) + : address(stakingTokenA); + address poolAddress = systemContract.uniswapv2PairFor( + systemContract.uniswapv2FactoryAddress(), + tokenAddress, + otherTokenAddress + ); + (uint256 tokenReserve, uint256 otherTokenReserve, ) = IUniswapV2Pair(poolAddress).getReserves(); + + if (IUniswapV2Pair(poolAddress).token0() == otherTokenAddress) + (otherTokenReserve, tokenReserve) = (tokenReserve, otherTokenReserve); + + return (otherTokenReserve * amount) / tokenReserve; + } + + function addLiquidityAndStake(address tokenAddress, uint256 amount) external nonReentrant { + if (amount == 0) revert ZeroStakeAmount(); + address otherTokenAddress = address(stakingTokenA) == tokenAddress + ? address(stakingTokenB) + : address(stakingTokenA); + address poolAddress = systemContract.uniswapv2PairFor( + systemContract.uniswapv2FactoryAddress(), + tokenAddress, + otherTokenAddress + ); + if (poolAddress != address(stakingToken)) revert InvalidTokenAddress(); + uint256 otherTokenAmount = otherTokenByAmount(tokenAddress, amount); + + if (tokenAddress == address(stakingTokenB)) { + (amount, otherTokenAmount) = (otherTokenAmount, amount); + } + + lastDeposit[msg.sender] = block.timestamp; + unlockTokensAt[msg.sender] = type(uint256).max; + uint256 LPTokenAmount = _addLiquidity(amount, otherTokenAmount); + _stakeFromContract(LPTokenAmount); + } + + function setMinCoolDown(uint256 minCoolDown_) external onlyOwner { + minCoolDown = minCoolDown_; + } + + function setMinStakingPeriod(uint256 minStakingPeriod_) external onlyOwner { + minStakingPeriod = minStakingPeriod_; + } + + function stake(uint256 amount) public override { + if (amount == 0) revert ZeroStakeAmount(); + lastDeposit[msg.sender] = block.timestamp; + unlockTokensAt[msg.sender] = type(uint256).max; + super.stake(amount); + } + + function beginCoolDown() external { + if (lastDeposit[msg.sender] + minStakingPeriod > block.timestamp) revert MinimumStakingPeriodNotMet(); + unlockTokensAt[msg.sender] = block.timestamp + minCoolDown; + } + + function withdraw(uint256 amount) public override { + if (unlockTokensAt[msg.sender] > block.timestamp) revert MinimumStakingPeriodNotMet(); + super.withdraw(amount); + } +} diff --git a/packages/zevm-app-contracts/contracts/liquidity-incentives/RewardDistributorFactory.sol b/packages/zevm-app-contracts/contracts/liquidity-incentives/RewardDistributorFactory.sol new file mode 100644 index 00000000..992622a1 --- /dev/null +++ b/packages/zevm-app-contracts/contracts/liquidity-incentives/RewardDistributorFactory.sol @@ -0,0 +1,79 @@ +// SPDX-License-Identifier: MIT +pragma solidity 0.8.7; + +import "@openzeppelin/contracts/interfaces/IERC20.sol"; +import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol"; + +import "@zetachain/protocol-contracts/contracts/zevm/SystemContract.sol"; + +import "./RewardDistributor.sol"; + +contract RewardDistributorFactory { + address public immutable zetaTokenAddress; + SystemContract private immutable _systemContract; + + mapping(uint256 => address) public incentivesContracts; + uint256 public incentivesContractsLen; + + event RewardDistributorCreated( + address rewardDistributorContract, + address stakingTokenA, + address stakingTokenB, + address LPStakingToken, + address rewardsToken, + address owner + ); + + constructor(address _zetaTokenAddress, address systemContract) { + zetaTokenAddress = _zetaTokenAddress; + _systemContract = SystemContract(systemContract); + } + + function createTokenIncentive( + address owner, + ///@dev _rewardsDistribution is one who can set the amount of token to reward + address rewardsDistribution, + address rewardsToken, + address stakingTokenA, + address stakingTokenB + ) external { + if (stakingTokenB == address(0)) { + stakingTokenB = zetaTokenAddress; + } + if (rewardsToken == address(0)) { + rewardsToken = zetaTokenAddress; + } + address LPTokenAddress = _systemContract.uniswapv2PairFor( + _systemContract.uniswapv2FactoryAddress(), + stakingTokenA, + stakingTokenB + ); + RewardDistributor incentiveContract = new RewardDistributor( + owner, + rewardsDistribution, + rewardsToken, + LPTokenAddress, + stakingTokenA, + stakingTokenB, + address(_systemContract) + ); + incentivesContracts[incentivesContractsLen++] = address(incentiveContract); + + emit RewardDistributorCreated( + address(incentiveContract), + stakingTokenA, + stakingTokenB, + LPTokenAddress, + rewardsToken, + owner + ); + } + + function getIncentiveContracts() public view returns (address[] memory) { + address[] memory result = new address[](incentivesContractsLen); + for (uint256 i = 0; i < incentivesContractsLen; i++) { + result[i] = incentivesContracts[i]; + } + return result; + } +} diff --git a/packages/zevm-app-contracts/contracts/liquidity-incentives/Synthetixio/Owned.sol b/packages/zevm-app-contracts/contracts/liquidity-incentives/Synthetixio/Owned.sol new file mode 100644 index 00000000..e56155f3 --- /dev/null +++ b/packages/zevm-app-contracts/contracts/liquidity-incentives/Synthetixio/Owned.sol @@ -0,0 +1,38 @@ +// SPDX-License-Identifier: MIT +pragma solidity 0.8.7; + +// https://docs.synthetix.io/contracts/source/contracts/owned +contract Owned { + address public owner; + address public nominatedOwner; + + constructor(address _owner) public { + require(_owner != address(0), "Owner address cannot be 0"); + owner = _owner; + emit OwnerChanged(address(0), _owner); + } + + function nominateNewOwner(address _owner) external onlyOwner { + nominatedOwner = _owner; + emit OwnerNominated(_owner); + } + + function acceptOwnership() external { + require(msg.sender == nominatedOwner, "You must be nominated before you can accept ownership"); + emit OwnerChanged(owner, nominatedOwner); + owner = nominatedOwner; + nominatedOwner = address(0); + } + + modifier onlyOwner() { + _onlyOwner(); + _; + } + + function _onlyOwner() private view { + require(msg.sender == owner, "Only the contract owner may perform this action"); + } + + event OwnerNominated(address newOwner); + event OwnerChanged(address oldOwner, address newOwner); +} diff --git a/packages/zevm-app-contracts/contracts/liquidity-incentives/Synthetixio/Pausable.sol b/packages/zevm-app-contracts/contracts/liquidity-incentives/Synthetixio/Pausable.sol new file mode 100644 index 00000000..496af3b9 --- /dev/null +++ b/packages/zevm-app-contracts/contracts/liquidity-incentives/Synthetixio/Pausable.sol @@ -0,0 +1,46 @@ +// SPDX-License-Identifier: MIT +pragma solidity 0.8.7; + +// Inheritance +import "./Owned.sol"; + +// https://docs.synthetix.io/contracts/source/contracts/pausable +abstract contract Pausable is Owned { + uint public lastPauseTime; + bool public paused; + + constructor() { + // This contract is abstract, and thus cannot be instantiated directly + require(owner != address(0), "Owner must be set"); + // Paused will be false, and lastPauseTime will be 0 upon initialisation + } + + /** + * @notice Change the paused state of the contract + * @dev Only the contract owner may call this. + */ + function setPaused(bool _paused) external onlyOwner { + // Ensure we're actually changing the state before we do anything + if (_paused == paused) { + return; + } + + // Set our paused state. + paused = _paused; + + // If applicable, set the last pause time. + if (paused) { + lastPauseTime = block.timestamp; + } + + // Let everyone know that our pause state has changed. + emit PauseChanged(paused); + } + + event PauseChanged(bool isPaused); + + modifier notPaused() { + require(!paused, "This action cannot be performed while the contract is paused"); + _; + } +} diff --git a/packages/zevm-app-contracts/contracts/liquidity-incentives/Synthetixio/RewardsDistributionRecipient.sol b/packages/zevm-app-contracts/contracts/liquidity-incentives/Synthetixio/RewardsDistributionRecipient.sol new file mode 100644 index 00000000..c0efa456 --- /dev/null +++ b/packages/zevm-app-contracts/contracts/liquidity-incentives/Synthetixio/RewardsDistributionRecipient.sol @@ -0,0 +1,21 @@ +// SPDX-License-Identifier: MIT +pragma solidity 0.8.7; + +// Inheritance +import "./Owned.sol"; + +// https://docs.synthetix.io/contracts/source/contracts/rewardsdistributionrecipient +abstract contract RewardsDistributionRecipient is Owned { + address public rewardsDistribution; + + function notifyRewardAmount(uint256 reward) external virtual; + + modifier onlyRewardsDistribution() { + require(msg.sender == rewardsDistribution, "Caller is not RewardsDistribution contract"); + _; + } + + function setRewardsDistribution(address _rewardsDistribution) external onlyOwner { + rewardsDistribution = _rewardsDistribution; + } +} diff --git a/packages/zevm-app-contracts/contracts/liquidity-incentives/Synthetixio/StakingRewards.sol b/packages/zevm-app-contracts/contracts/liquidity-incentives/Synthetixio/StakingRewards.sol new file mode 100644 index 00000000..3ef2a800 --- /dev/null +++ b/packages/zevm-app-contracts/contracts/liquidity-incentives/Synthetixio/StakingRewards.sol @@ -0,0 +1,181 @@ +// SPDX-License-Identifier: MIT +pragma solidity 0.8.7; + +import "@openzeppelin/contracts/utils/math/SafeMath.sol"; +import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol"; +import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; + +// Inheritance +import "./interfaces/IStakingRewards.sol"; +import "./RewardsDistributionRecipient.sol"; +import "./Pausable.sol"; + +// https://docs.synthetix.io/contracts/source/contracts/stakingrewards +contract StakingRewards is RewardsDistributionRecipient, ReentrancyGuard, Pausable { + using SafeMath for uint256; + using SafeERC20 for IERC20; + + /* ========== STATE VARIABLES ========== */ + + IERC20 public rewardsToken; + IERC20 public stakingToken; + uint256 public periodFinish = 0; + uint256 public rewardRate = 0; + uint256 public rewardsDuration = 7 days; + uint256 public lastUpdateTime; + uint256 public rewardPerTokenStored; + + mapping(address => uint256) public userRewardPerTokenPaid; + mapping(address => uint256) public rewards; + + uint256 internal _totalSupply; + mapping(address => uint256) internal _balances; + + /* ========== CONSTRUCTOR ========== */ + + constructor( + address _owner, + address _rewardsDistribution, + address _rewardsToken, + address _stakingToken + ) public Owned(_owner) { + rewardsToken = IERC20(_rewardsToken); + stakingToken = IERC20(_stakingToken); + rewardsDistribution = _rewardsDistribution; + } + + /* ========== VIEWS ========== */ + + function totalSupply() external view returns (uint256) { + return _totalSupply; + } + + function balanceOf(address account) external view returns (uint256) { + return _balances[account]; + } + + function lastTimeRewardApplicable() public view returns (uint256) { + return block.timestamp < periodFinish ? block.timestamp : periodFinish; + } + + function rewardPerToken() public view returns (uint256) { + if (_totalSupply == 0) { + return rewardPerTokenStored; + } + return + rewardPerTokenStored.add( + lastTimeRewardApplicable().sub(lastUpdateTime).mul(rewardRate).mul(1e18).div(_totalSupply) + ); + } + + function earned(address account) public view returns (uint256) { + return + _balances[account].mul(rewardPerToken().sub(userRewardPerTokenPaid[account])).div(1e18).add( + rewards[account] + ); + } + + function getRewardForDuration() external view returns (uint256) { + return rewardRate.mul(rewardsDuration); + } + + /* ========== MUTATIVE FUNCTIONS ========== */ + + function stake(uint256 amount) public virtual nonReentrant notPaused updateReward(msg.sender) { + require(amount > 0, "Cannot stake 0"); + _totalSupply = _totalSupply.add(amount); + _balances[msg.sender] = _balances[msg.sender].add(amount); + stakingToken.safeTransferFrom(msg.sender, address(this), amount); + emit Staked(msg.sender, amount); + } + + ///@dev This function is added to support staking from the same contract without the need of an extra transfer + function _stakeFromContract(uint256 amount) internal notPaused updateReward(msg.sender) { + require(amount > 0, "Cannot stake 0"); + _totalSupply = _totalSupply.add(amount); + _balances[msg.sender] = _balances[msg.sender].add(amount); + emit Staked(msg.sender, amount); + } + + function withdraw(uint256 amount) public virtual nonReentrant updateReward(msg.sender) { + require(amount > 0, "Cannot withdraw 0"); + _totalSupply = _totalSupply.sub(amount); + _balances[msg.sender] = _balances[msg.sender].sub(amount); + stakingToken.safeTransfer(msg.sender, amount); + emit Withdrawn(msg.sender, amount); + } + + function getReward() public nonReentrant updateReward(msg.sender) { + uint256 reward = rewards[msg.sender]; + if (reward > 0) { + rewards[msg.sender] = 0; + rewardsToken.safeTransfer(msg.sender, reward); + emit RewardPaid(msg.sender, reward); + } + } + + function exit() external { + withdraw(_balances[msg.sender]); + getReward(); + } + + /* ========== RESTRICTED FUNCTIONS ========== */ + + function notifyRewardAmount(uint256 reward) external override onlyRewardsDistribution updateReward(address(0)) { + if (block.timestamp >= periodFinish) { + rewardRate = reward.div(rewardsDuration); + } else { + uint256 remaining = periodFinish.sub(block.timestamp); + uint256 leftover = remaining.mul(rewardRate); + rewardRate = reward.add(leftover).div(rewardsDuration); + } + + // Ensure the provided reward amount is not more than the balance in the contract. + // This keeps the reward rate in the right range, preventing overflows due to + // very high values of rewardRate in the earned and rewardsPerToken functions; + // Reward + leftover must be less than 2^256 / 10^18 to avoid overflow. + uint balance = rewardsToken.balanceOf(address(this)); + require(rewardRate <= balance.div(rewardsDuration), "Provided reward too high"); + + lastUpdateTime = block.timestamp; + periodFinish = block.timestamp.add(rewardsDuration); + emit RewardAdded(reward); + } + + // Added to support recovering LP Rewards from other systems such as BAL to be distributed to holders + function recoverERC20(address tokenAddress, uint256 tokenAmount) external onlyOwner { + require(tokenAddress != address(stakingToken), "Cannot withdraw the staking token"); + IERC20(tokenAddress).safeTransfer(owner, tokenAmount); + emit Recovered(tokenAddress, tokenAmount); + } + + function setRewardsDuration(uint256 _rewardsDuration) external onlyOwner { + require( + block.timestamp > periodFinish, + "Previous rewards period must be complete before changing the duration for the new period" + ); + rewardsDuration = _rewardsDuration; + emit RewardsDurationUpdated(rewardsDuration); + } + + /* ========== MODIFIERS ========== */ + + modifier updateReward(address account) { + rewardPerTokenStored = rewardPerToken(); + lastUpdateTime = lastTimeRewardApplicable(); + if (account != address(0)) { + rewards[account] = earned(account); + userRewardPerTokenPaid[account] = rewardPerTokenStored; + } + _; + } + + /* ========== EVENTS ========== */ + + event RewardAdded(uint256 reward); + event Staked(address indexed user, uint256 amount); + event Withdrawn(address indexed user, uint256 amount); + event RewardPaid(address indexed user, uint256 reward); + event RewardsDurationUpdated(uint256 newDuration); + event Recovered(address token, uint256 amount); +} diff --git a/packages/zevm-app-contracts/contracts/liquidity-incentives/Synthetixio/interfaces/IStakingRewards.sol b/packages/zevm-app-contracts/contracts/liquidity-incentives/Synthetixio/interfaces/IStakingRewards.sol new file mode 100644 index 00000000..23afa2c4 --- /dev/null +++ b/packages/zevm-app-contracts/contracts/liquidity-incentives/Synthetixio/interfaces/IStakingRewards.sol @@ -0,0 +1,33 @@ +// SPDX-License-Identifier: MIT +pragma solidity 0.8.7; + +// https://docs.synthetix.io/contracts/source/interfaces/istakingrewards +interface IStakingRewards { + // Views + + function balanceOf(address account) external view returns (uint256); + + function earned(address account) external view returns (uint256); + + function getRewardForDuration() external view returns (uint256); + + function lastTimeRewardApplicable() external view returns (uint256); + + function rewardPerToken() external view returns (uint256); + + function rewardsDistribution() external view returns (address); + + function rewardsToken() external view returns (address); + + function totalSupply() external view returns (uint256); + + // Mutative + + function exit() external; + + function getReward() external; + + function stake(uint256 amount) external; + + function withdraw(uint256 amount) external; +} diff --git a/packages/zevm-app-contracts/contracts/shared/BytesHelperLib.sol b/packages/zevm-app-contracts/contracts/shared/BytesHelperLib.sol new file mode 100644 index 00000000..122de889 --- /dev/null +++ b/packages/zevm-app-contracts/contracts/shared/BytesHelperLib.sol @@ -0,0 +1,22 @@ +// SPDX-License-Identifier: UNLICENSED +pragma solidity =0.8.7; + +library BytesHelperLib { + function bytesToAddress(bytes calldata data, uint256 offset) internal pure returns (address output) { + bytes memory b = data[offset:offset + 20]; + assembly { + output := mload(add(b, 20)) + } + } + + function bytesToUint32(bytes calldata data, uint256 offset) internal pure returns (uint32 output) { + bytes memory b = data[offset:offset + 4]; + assembly { + output := mload(add(b, 4)) + } + } + + function addressToBytes(address someAddress) internal pure returns (bytes32) { + return bytes32(uint256(uint160(someAddress))); + } +} diff --git a/packages/zevm-app-contracts/contracts/shared/SwapHelperLib.sol b/packages/zevm-app-contracts/contracts/shared/SwapHelperLib.sol new file mode 100644 index 00000000..59f18880 --- /dev/null +++ b/packages/zevm-app-contracts/contracts/shared/SwapHelperLib.sol @@ -0,0 +1,93 @@ +// SPDX-License-Identifier: UNLICENSED +pragma solidity =0.8.7; + +import "@uniswap/v2-periphery/contracts/interfaces/IUniswapV2Router02.sol"; +import "@uniswap/v2-periphery/contracts/interfaces/IUniswapV2Router01.sol"; +import "@zetachain/protocol-contracts/contracts/zevm/interfaces/IZRC20.sol"; + +library SwapHelperLib { + uint16 internal constant MAX_DEADLINE = 200; + + error WrongGasContract(); + + error NotEnoughToPayGasFee(); + + error CantBeIdenticalAddresses(); + + error CantBeZeroAddress(); + + // returns sorted token addresses, used to handle return values from pairs sorted in this order + function sortTokens(address tokenA, address tokenB) internal pure returns (address token0, address token1) { + if (tokenA == tokenB) revert CantBeIdenticalAddresses(); + (token0, token1) = tokenA < tokenB ? (tokenA, tokenB) : (tokenB, tokenA); + if (token0 == address(0)) revert CantBeZeroAddress(); + } + + // calculates the CREATE2 address for a pair without making any external calls + function uniswapv2PairFor(address factory, address tokenA, address tokenB) public pure returns (address pair) { + (address token0, address token1) = sortTokens(tokenA, tokenB); + pair = address( + uint160( + uint256( + keccak256( + abi.encodePacked( + hex"ff", + factory, + keccak256(abi.encodePacked(token0, token1)), + hex"96e8ac4277198ff8b6f785478aa9a39f403cb768dd02cbee326c3e7da348845f" // init code hash + ) + ) + ) + ) + ); + } + + function _doWithdrawal(address targetZRC20, uint256 amount, bytes32 receipient) internal { + (address gasZRC20, uint256 gasFee) = IZRC20(targetZRC20).withdrawGasFee(); + + if (gasZRC20 != targetZRC20) revert WrongGasContract(); + if (gasFee >= amount) revert NotEnoughToPayGasFee(); + + IZRC20(targetZRC20).approve(targetZRC20, gasFee); + IZRC20(targetZRC20).withdraw(abi.encodePacked(receipient), amount - gasFee); + } + + function _existsPairPool(address uniswapV2Factory, address zrc20A, address zrc20B) internal view returns (bool) { + address uniswapPool = uniswapv2PairFor(uniswapV2Factory, zrc20A, zrc20B); + return IZRC20(zrc20A).balanceOf(uniswapPool) > 0 && IZRC20(zrc20B).balanceOf(uniswapPool) > 0; + } + + function _doSwap( + address zetaToken, + address uniswapV2Factory, + address uniswapV2Router, + address zrc20, + uint256 amount, + address targetZRC20, + uint256 minAmountOut + ) internal returns (uint256) { + bool existsPairPool = _existsPairPool(uniswapV2Factory, zrc20, targetZRC20); + + address[] memory path; + if (existsPairPool) { + path = new address[](2); + path[0] = zrc20; + path[1] = targetZRC20; + } else { + path = new address[](3); + path[0] = zrc20; + path[1] = zetaToken; + path[2] = targetZRC20; + } + + IZRC20(zrc20).approve(address(uniswapV2Router), amount); + uint256[] memory amounts = IUniswapV2Router01(uniswapV2Router).swapExactTokensForTokens( + amount, + minAmountOut, + path, + address(this), + block.timestamp + MAX_DEADLINE + ); + return amounts[path.length - 1]; + } +} diff --git a/packages/zevm-app-contracts/contracts/shared/TestContracts.sol b/packages/zevm-app-contracts/contracts/shared/TestContracts.sol new file mode 100644 index 00000000..2c222aa8 --- /dev/null +++ b/packages/zevm-app-contracts/contracts/shared/TestContracts.sol @@ -0,0 +1,8 @@ +// SPDX-License-Identifier: MIT +pragma solidity 0.8.7; + +/** + * @dev Contracts that need to be compiled for testing purposes + */ + +import "@openzeppelin/contracts/token/ERC20/ERC20.sol"; diff --git a/packages/zevm-app-contracts/contracts/shared/TestSystemContract.sol b/packages/zevm-app-contracts/contracts/shared/TestSystemContract.sol new file mode 100644 index 00000000..15e6186e --- /dev/null +++ b/packages/zevm-app-contracts/contracts/shared/TestSystemContract.sol @@ -0,0 +1,79 @@ +// SPDX-License-Identifier: MIT +pragma solidity 0.8.7; + +import "@zetachain/protocol-contracts/contracts/zevm/interfaces/zContract.sol"; +import "@zetachain/protocol-contracts/contracts/zevm/interfaces/IZRC20.sol"; + +interface SystemContractErrors { + error CallerIsNotFungibleModule(); + + error InvalidTarget(); + + error CantBeIdenticalAddresses(); + + error CantBeZeroAddress(); +} + +contract TestSystemContract is SystemContractErrors { + mapping(uint256 => uint256) public gasPriceByChainId; + mapping(uint256 => address) public gasCoinZRC20ByChainId; + mapping(uint256 => address) public gasZetaPoolByChainId; + + address public wZetaContractAddress; + address public uniswapv2FactoryAddress; + address public uniswapv2Router02Address; + + event SystemContractDeployed(); + event SetGasPrice(uint256, uint256); + event SetGasCoin(uint256, address); + event SetGasZetaPool(uint256, address); + event SetWZeta(address); + + constructor(address wzeta_, address uniswapv2Factory_, address uniswapv2Router02_) { + wZetaContractAddress = wzeta_; + uniswapv2FactoryAddress = uniswapv2Factory_; + uniswapv2Router02Address = uniswapv2Router02_; + emit SystemContractDeployed(); + } + + // fungible module updates the gas price oracle periodically + function setGasPrice(uint256 chainID, uint256 price) external { + gasPriceByChainId[chainID] = price; + emit SetGasPrice(chainID, price); + } + + function setGasCoinZRC20(uint256 chainID, address zrc20) external { + gasCoinZRC20ByChainId[chainID] = zrc20; + emit SetGasCoin(chainID, zrc20); + } + + function setWZETAContractAddress(address addr) external { + wZetaContractAddress = addr; + emit SetWZeta(wZetaContractAddress); + } + + // returns sorted token addresses, used to handle return values from pairs sorted in this order + function sortTokens(address tokenA, address tokenB) internal pure returns (address token0, address token1) { + if (tokenA == tokenB) revert CantBeIdenticalAddresses(); + (token0, token1) = tokenA < tokenB ? (tokenA, tokenB) : (tokenB, tokenA); + if (token0 == address(0)) revert CantBeZeroAddress(); + } + + function uniswapv2PairFor(address factory, address tokenA, address tokenB) public pure returns (address pair) { + (address token0, address token1) = sortTokens(tokenA, tokenB); + pair = address( + uint160( + uint256( + keccak256( + abi.encodePacked( + hex"ff", + factory, + keccak256(abi.encodePacked(token0, token1)), + hex"96e8ac4277198ff8b6f785478aa9a39f403cb768dd02cbee326c3e7da348845f" // init code hash + ) + ) + ) + ) + ); + } +} diff --git a/packages/zevm-app-contracts/contracts/shared/TestUniswapContracts.sol b/packages/zevm-app-contracts/contracts/shared/TestUniswapContracts.sol new file mode 100644 index 00000000..53520a08 --- /dev/null +++ b/packages/zevm-app-contracts/contracts/shared/TestUniswapContracts.sol @@ -0,0 +1,10 @@ +// SPDX-License-Identifier: MIT +pragma solidity 0.6.6; + +/** + * @dev Contracts that need to be compiled for testing purposes + */ + +import "@uniswap/v2-core/contracts/interfaces/IUniswapV2Factory.sol"; +import "@uniswap/v2-core/contracts/interfaces/IUniswapV2Pair.sol"; +import "@uniswap/v2-periphery/contracts/UniswapV2Router02.sol"; diff --git a/packages/zevm-app-contracts/contracts/shared/TestZRC20.sol b/packages/zevm-app-contracts/contracts/shared/TestZRC20.sol new file mode 100644 index 00000000..1d3ef364 --- /dev/null +++ b/packages/zevm-app-contracts/contracts/shared/TestZRC20.sol @@ -0,0 +1,33 @@ +// SPDX-License-Identifier: MIT +pragma solidity =0.8.7; + +import "@openzeppelin/contracts/token/ERC20/ERC20.sol"; +import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; + +import "./BytesHelperLib.sol"; + +contract TestZRC20 is ERC20 { + constructor(uint256 initialSupply, string memory name, string memory symbol) ERC20(name, symbol) { + _mint(msg.sender, initialSupply * (10 ** uint256(decimals()))); + } + + function deposit(address to, uint256 amount) external returns (bool) { + return true; + } + + function bytesToAddress(bytes calldata data, uint256 offset, uint256 size) public pure returns (address output) { + bytes memory b = data[offset:offset + size]; + assembly { + output := mload(add(b, size)) + } + } + + function withdraw(bytes calldata to, uint256 amount) external returns (bool) { + address toAddress = BytesHelperLib.bytesToAddress(to, 12); + return transfer(toAddress, amount); + } + + function withdrawGasFee() external view returns (address, uint256) { + return (address(this), 0); + } +} diff --git a/packages/zevm-app-contracts/hardhat.config.ts b/packages/zevm-app-contracts/hardhat.config.ts new file mode 100644 index 00000000..53562131 --- /dev/null +++ b/packages/zevm-app-contracts/hardhat.config.ts @@ -0,0 +1,46 @@ +import "@nomiclabs/hardhat-etherscan"; +import "@nomiclabs/hardhat-waffle"; +import "@typechain/hardhat"; +import "hardhat-gas-reporter"; +import "solidity-coverage"; +import "tsconfig-paths/register"; + +import { getHardhatConfigNetworks, getHardhatConfigScanners } from "@zetachain/addresses-tools/src/networks"; +import * as dotenv from "dotenv"; +import type { HardhatUserConfig } from "hardhat/types"; + +dotenv.config(); + +const PRIVATE_KEYS = process.env.PRIVATE_KEY !== undefined ? [`0x${process.env.PRIVATE_KEY}`] : []; + +const config: HardhatUserConfig = { + etherscan: { + ...getHardhatConfigScanners(), + }, + gasReporter: { + currency: "USD", + enabled: process.env.REPORT_GAS !== undefined, + }, + networks: { + ...getHardhatConfigNetworks(PRIVATE_KEYS), + }, + solidity: { + compilers: [ + { version: "0.5.10" /** For create2 factory */ }, + { version: "0.6.6" /** For uniswap v2 */ }, + { version: "0.8.7" }, + ], + settings: { + /** + * @see {@link https://smock.readthedocs.io/en/latest/getting-started.html} + */ + outputSelection: { + "*": { + "*": ["storageLayout"], + }, + }, + }, + }, +}; + +export default config; diff --git a/packages/zevm-app-contracts/package.json b/packages/zevm-app-contracts/package.json new file mode 100644 index 00000000..3324315a --- /dev/null +++ b/packages/zevm-app-contracts/package.json @@ -0,0 +1,39 @@ +{ + "name": "@zetachain/zevm-app-contracts", + "version": "0.0.1", + "license": "MIT", + "private": true, + "author": "zetachain", + "publishConfig": { + "access": "public", + "registry": "https://registry.npmjs.org/" + }, + "scripts": { + "clean": "npx hardhat clean", + "compile": "npx hardhat compile", + "multi-chain-swap:deploy-local": "ZETA_NETWORK=troy EXECUTE_PROGRAMMATICALLY=true npx hardhat run scripts/multi-chain-swap/deploy.ts --network hardhat", + "multi-chain-swap:deploy": "ZETA_NETWORK=athens EXECUTE_PROGRAMMATICALLY=true npx hardhat run scripts/multi-chain-swap/deploy.ts", + "lint:fix": "npm run lint:js:fix && npm run lint:sol:fix", + "lint:js:fix": "eslint --ext .js,.ts . --fix", + "lint:js": "eslint --ext .js,.ts .", + "lint:sol:fix": "prettier --write \"contracts/**/*.sol\"", + "lint:sol": "solhint 'contracts/**/*.sol' && prettier -c 'contracts/**/*.sol'", + "lint": "npm run lint:js && npm run lint:sol", + "test:watch": "echo You need to install `entr` to run this command && find contracts/**/** lib/**/** test/**/** -iname '*.sol' -o -iname '*.ts' | entr -cnr npx hardhat test", + "test": "npx hardhat test", + "tsc:watch": "npx tsc --watch" + }, + "devDependencies": { + "hardhat-gas-reporter": "^1.0.8", + "solidity-coverage": "^0.7.20", + "tsconfig-paths": "^3.14.1" + }, + "dependencies": { + "@openzeppelin/contracts": "4.7.3", + "@uniswap/v2-periphery": "1.1.0-beta.0", + "@zetachain/addresses": "workspace:^", + "@zetachain/addresses-tools": "workspace:^", + "@zetachain/protocol-contracts": "^0.0.6", + "ethers": "5.6.8" + } +} diff --git a/packages/zevm-app-contracts/scripts/deploy.ts b/packages/zevm-app-contracts/scripts/deploy.ts new file mode 100644 index 00000000..06d1f2b4 --- /dev/null +++ b/packages/zevm-app-contracts/scripts/deploy.ts @@ -0,0 +1,99 @@ +import { BigNumber } from "@ethersproject/bignumber"; +import { SignerWithAddress } from "@nomiclabs/hardhat-ethers/signers"; +import { getChainId, isNetworkName, NetworkName } from "@zetachain/addresses"; +import { parseEther } from "ethers/lib/utils"; +import { ethers, network } from "hardhat"; + +import { + ERC20__factory, + RewardDistributor__factory, + RewardDistributorFactory, + RewardDistributorFactory__factory, + SystemContract, + SystemContract__factory +} from "../typechain-types"; + +const networkName = network.name; +const REWARD_DURATION = BigNumber.from("604800"); // 1 week +const REWARDS_AMOUNT = parseEther("10"); + +//@todo: this is here because need to import address pkg but this pkg will be move to new repo, +// so will refactor when it will be done + +export const SYSTEM_CONTRACT = "0x239e96c8f17C85c30100AC26F635Ea15f23E9c67"; + +interface Pair { + TokenA: string; + TokenB: string; +} + +export const sortPair = (token1: string, token2: string): Pair => { + if (token1 < token2) { + return { TokenA: token1, TokenB: token2 }; + } + return { TokenA: token2, TokenB: token1 }; +}; + +const getZRC20Address = async (systemContract: SystemContract, network: NetworkName) => { + const tokenAddress = await systemContract.gasCoinZRC20ByChainId(getChainId(network)); + return tokenAddress; +}; + +const deployRewardByNetwork = async ( + deployer: SignerWithAddress, + systemContract: SystemContract, + networkName: NetworkName, + rewardDistributorFactory: RewardDistributorFactory +) => { + const tokenAddress = await getZRC20Address(systemContract, networkName); + const zetaTokenAddress = await systemContract.wZetaContractAddress(); + + const tx = await rewardDistributorFactory.createTokenIncentive( + deployer.address, + deployer.address, + zetaTokenAddress, + // @dev: now we send both tokens so contract calculate internaly LP address + zetaTokenAddress, + tokenAddress + ); + + const receipt = await tx.wait(); + + const event = receipt.events?.find(e => e.event === "RewardDistributorCreated"); + + const { rewardDistributorContract: rewardDistributorContractAddress } = event?.args as any; + + const rewardDistributorContract = await RewardDistributor__factory.connect( + rewardDistributorContractAddress, + deployer + ); + + const ZETA = ERC20__factory.connect(zetaTokenAddress, deployer); + await ZETA.transfer(rewardDistributorContract.address, REWARDS_AMOUNT); + await rewardDistributorContract.setRewardsDuration(REWARD_DURATION); + await rewardDistributorContract.notifyRewardAmount(REWARDS_AMOUNT); + + console.log("RewardDistributor deployed to:", rewardDistributorContract.address); +}; + +async function main() { + const [deployer] = await ethers.getSigners(); + if (!isNetworkName(networkName)) throw new Error("Invalid network name"); + const systemContract = await SystemContract__factory.connect(SYSTEM_CONTRACT, deployer); + const zetaTokenAddress = await systemContract.wZetaContractAddress(); + + const RewardDistributorFactoryFactory = (await ethers.getContractFactory( + "RewardDistributorFactory" + )) as RewardDistributorFactory__factory; + + const rewardDistributorFactory = await RewardDistributorFactoryFactory.deploy(zetaTokenAddress, SYSTEM_CONTRACT); + await rewardDistributorFactory.deployed(); + console.log("RewardDistributorFactory deployed to:", rewardDistributorFactory.address); + + await deployRewardByNetwork(deployer, systemContract, "goerli", rewardDistributorFactory); +} + +main().catch(error => { + console.error(error); + process.exit(1); +}); diff --git a/packages/zevm-app-contracts/scripts/readRewardsData.ts b/packages/zevm-app-contracts/scripts/readRewardsData.ts new file mode 100644 index 00000000..bfb04de0 --- /dev/null +++ b/packages/zevm-app-contracts/scripts/readRewardsData.ts @@ -0,0 +1,64 @@ +import { isNetworkName } from "@zetachain/addresses"; +import { ethers, network } from "hardhat"; + +import { RewardDistributor__factory, RewardDistributorFactory__factory } from "../typechain-types"; + +const networkName = network.name; + +//@todo: this is here because need to import address pkg but this pkg will be move to new repo, +// so will refactor when it will be done + +export const FACTORY_CONTRACT = "0xf05Bc79b88026fbC32221926308405C2Bf919f2E"; + +const readRewardData = async (rewardContractAddress: string) => { + const [deployer] = await ethers.getSigners(); + const rewardDistributorContract = await RewardDistributor__factory.connect(rewardContractAddress, deployer); + + const stakingTokenA = await rewardDistributorContract.stakingTokenA(); + const stakingTokenB = await rewardDistributorContract.stakingTokenB(); + + const rewardsToken = await rewardDistributorContract.rewardsToken(); + const stakingToken = await rewardDistributorContract.stakingToken(); + const periodFinish = await rewardDistributorContract.periodFinish(); + const rewardRate = await rewardDistributorContract.rewardRate(); + const rewardsDuration = await rewardDistributorContract.rewardsDuration(); + const lastUpdateTime = await rewardDistributorContract.lastUpdateTime(); + const rewardPerTokenStored = await rewardDistributorContract.rewardPerTokenStored(); + + console.table({ + contract: rewardContractAddress, + lastUpdateTime: `${lastUpdateTime.toString()}-${new Date(lastUpdateTime.toNumber() * 1000).toISOString()}`, + periodFinish: `${periodFinish.toString()}-${new Date(periodFinish.toNumber() * 1000).toISOString()}`, + rewardPerTokenStored: rewardPerTokenStored.toString(), + rewardRate: rewardRate.toString(), + rewardsDuration: rewardsDuration.toString(), + rewardsToken: rewardsToken, + stakingToken: stakingToken, + stakingTokenA, + stakingTokenB + }); +}; + +async function main() { + const [deployer] = await ethers.getSigners(); + if (!isNetworkName(networkName)) throw new Error("Invalid network name"); + + const rewardDistributorFactory = RewardDistributorFactory__factory.connect(FACTORY_CONTRACT, deployer); + const incentivesContractsLen = await rewardDistributorFactory.incentivesContractsLen(); + + const incentiveContracts: string[] = []; + for (let i = 0; i < incentivesContractsLen.toNumber(); i++) { + const incentiveContract = await rewardDistributorFactory.incentivesContracts(i); + incentiveContracts.push(incentiveContract); + } + + console.log("incentiveContracts", incentiveContracts); + incentiveContracts.forEach(async incentiveContract => { + await readRewardData(incentiveContract); + }); +} + +main().catch(error => { + console.error(error); + process.exit(1); +}); diff --git a/packages/zevm-app-contracts/test/LiquidityIncentives.spec.ts b/packages/zevm-app-contracts/test/LiquidityIncentives.spec.ts new file mode 100644 index 00000000..37e1beb2 --- /dev/null +++ b/packages/zevm-app-contracts/test/LiquidityIncentives.spec.ts @@ -0,0 +1,450 @@ +import { BigNumber } from "@ethersproject/bignumber"; +import { AddressZero } from "@ethersproject/constants"; +import { parseUnits } from "@ethersproject/units"; +import { SignerWithAddress } from "@nomiclabs/hardhat-ethers/signers"; +import { getAddress as getAddressLib } from "@zetachain/addresses"; +import { expect } from "chai"; +import { parseEther } from "ethers/lib/utils"; +import { ethers, network } from "hardhat"; + +import { + ERC20, + IWETH, + RewardDistributor, + RewardDistributorFactory, + RewardDistributorFactory__factory, + TestSystemContract, + TestZRC20 +} from "../typechain-types"; +import { evmSetup } from "./test.helpers"; + +const REWARD_DURATION = BigNumber.from("604800"); // 1 week +const REWARDS_AMOUNT = parseEther("1000"); +const ERROR_TOLERANCE = parseEther("0.1"); + +describe("LiquidityIncentives tests", () => { + let ZETA: IWETH; + let ZETA_ERC20: ERC20; + let ZRC20Contracts: TestZRC20[]; + let ZRC20Contract: TestZRC20; + let systemContract: TestSystemContract; + + let accounts: SignerWithAddress[]; + let deployer: SignerWithAddress; + + let rewardDistributorFactory: RewardDistributorFactory; + let rewardDistributorContract: RewardDistributor; + + const stakeToken = async (signer: SignerWithAddress, amount: BigNumber) => { + const zetaNeeded = await rewardDistributorContract.otherTokenByAmount(ZRC20Contract.address, amount); + await ZRC20Contract.transfer(signer.address, amount); + await ZETA_ERC20.transfer(signer.address, zetaNeeded); + + await ZRC20Contract.connect(signer).approve(rewardDistributorContract.address, amount); + await ZETA_ERC20.connect(signer).approve(rewardDistributorContract.address, zetaNeeded); + + return await rewardDistributorContract.connect(signer).addLiquidityAndStake(ZRC20Contract.address, amount); + }; + + beforeEach(async () => { + accounts = await ethers.getSigners(); + [deployer] = accounts; + + await network.provider.send("hardhat_setBalance", [deployer.address, parseUnits("1000000").toHexString()]); + + const uniswapRouterAddr = getAddressLib({ + address: "uniswapV2Router02", + networkName: "eth-mainnet", + zetaNetwork: "mainnet" + }); + + const uniswapFactoryAddr = getAddressLib({ + address: "uniswapV2Factory", + networkName: "eth-mainnet", + zetaNetwork: "mainnet" + }); + + const wGasToken = getAddressLib({ + address: "weth9", + networkName: "eth-mainnet", + zetaNetwork: "mainnet" + }); + + ZETA = (await ethers.getContractAt("IWETH", wGasToken)) as IWETH; + ZETA_ERC20 = (await ethers.getContractAt("ERC20", wGasToken)) as ERC20; + await ZETA.deposit({ value: parseEther("10000") }); + + const evmSetupResult = await evmSetup(wGasToken, uniswapFactoryAddr, uniswapRouterAddr); + ZRC20Contracts = evmSetupResult.ZRC20Contracts; + ZRC20Contract = ZRC20Contracts[0]; + systemContract = evmSetupResult.systemContract; + + const RewardDistributorFactoryFactory = (await ethers.getContractFactory( + "RewardDistributorFactory" + )) as RewardDistributorFactory__factory; + rewardDistributorFactory = (await RewardDistributorFactoryFactory.deploy( + wGasToken, + systemContract.address + )) as RewardDistributorFactory; + await rewardDistributorFactory.deployed(); + + const tx = await rewardDistributorFactory.createTokenIncentive( + deployer.address, + deployer.address, + AddressZero, + ZRC20Contract.address, + AddressZero + ); + const receipt = await tx.wait(); + const event = receipt.events?.find(e => e.event === "RewardDistributorCreated"); + expect(event).to.not.be.undefined; + + const { rewardDistributorContract: rewardDistributorContractAddress } = event?.args as any; + rewardDistributorContract = (await ethers.getContractAt( + "RewardDistributor", + rewardDistributorContractAddress + )) as RewardDistributor; + }); + + describe("LiquidityIncentives", () => { + it("Should create an incentive contract", async () => { + const uniswapv2FactoryAddress = await systemContract.uniswapv2FactoryAddress(); + const tx = await rewardDistributorFactory.createTokenIncentive( + deployer.address, + deployer.address, + AddressZero, + ZRC20Contract.address, + AddressZero + ); + const receipt = await tx.wait(); + + const event = receipt.events?.find(e => e.event === "RewardDistributorCreated"); + expect(event).to.not.be.undefined; + + const { stakingTokenA, stakingTokenB, LPStakingToken, rewardsToken, owner } = event?.args as any; + expect(stakingTokenA).to.be.eq(ZRC20Contract.address); + expect(stakingTokenB).to.be.eq(ZETA.address); + const LPTokenAddress = await systemContract.uniswapv2PairFor( + uniswapv2FactoryAddress, + ZRC20Contract.address, + ZETA.address + ); + expect(LPStakingToken).to.be.eq(LPTokenAddress); + expect(rewardsToken).to.be.eq(ZETA.address); + expect(owner).to.be.eq(deployer.address); + }); + }); + + it("Should create an incentive", async () => { + await ZETA.transfer(rewardDistributorContract.address, REWARDS_AMOUNT); + await rewardDistributorContract.setRewardsDuration(REWARD_DURATION); + await rewardDistributorContract.notifyRewardAmount(REWARDS_AMOUNT); + const rewardRate = await rewardDistributorContract.rewardRate(); + expect(rewardRate).to.be.closeTo(REWARDS_AMOUNT.div(REWARD_DURATION), ERROR_TOLERANCE); + }); + + it("Should store incentive contract in registry", async () => { + const initialIncentivesContractsLen = await rewardDistributorFactory.incentivesContractsLen(); + const tx = await rewardDistributorFactory.createTokenIncentive( + deployer.address, + deployer.address, + AddressZero, + ZRC20Contract.address, + AddressZero + ); + const receipt = await tx.wait(); + + const event = receipt.events?.find(e => e.event === "RewardDistributorCreated"); + expect(event).to.not.be.undefined; + + const { rewardDistributorContract } = event?.args as any; + expect(rewardDistributorContract).to.not.be.undefined; + + const finalIncentivesContractsLen = await rewardDistributorFactory.incentivesContractsLen(); + expect(initialIncentivesContractsLen).to.be.eq(finalIncentivesContractsLen.sub(1)); + const incentivesContract = await rewardDistributorFactory.incentivesContracts(finalIncentivesContractsLen.sub(1)); + expect(incentivesContract).to.be.eq(rewardDistributorContract); + }); + + it("Should calculate the token required to swap", async () => { + const zetaRequired = await rewardDistributorContract.otherTokenByAmount(ZRC20Contract.address, parseEther("10")); + const tokenRequired = await rewardDistributorContract.otherTokenByAmount(ZETA.address, parseEther("10")); + // @dev This validation works because we create all the liquidity for this test with 1 ZETA:2 Token ratio (see addZetaEthLiquidity) + expect(zetaRequired).to.be.closeTo(parseEther("5"), ERROR_TOLERANCE); + expect(tokenRequired).to.be.closeTo(parseEther("20"), ERROR_TOLERANCE); + }); + + it("Should create an incentive and should be able to use it", async () => { + await ZETA.transfer(rewardDistributorContract.address, REWARDS_AMOUNT); + await rewardDistributorContract.setRewardsDuration(REWARD_DURATION); + await rewardDistributorContract.notifyRewardAmount(REWARDS_AMOUNT); + + const sampleAccount = accounts[0]; + const stakedAmount = parseEther("100"); + + await stakeToken(sampleAccount, stakedAmount); + + await network.provider.send("evm_increaseTime", [REWARD_DURATION.div(2).toNumber()]); + await network.provider.send("evm_mine"); + + const earned = await rewardDistributorContract.earned(sampleAccount.address); + expect(earned).to.be.closeTo(REWARDS_AMOUNT.div(2), ERROR_TOLERANCE); + }); + + it("Should distribute rewards between two users", async () => { + await ZETA.transfer(rewardDistributorContract.address, REWARDS_AMOUNT); + await rewardDistributorContract.setRewardsDuration(REWARD_DURATION); + await rewardDistributorContract.notifyRewardAmount(REWARDS_AMOUNT); + + const sampleAccount1 = accounts[1]; + const sampleAccount2 = accounts[2]; + const stakedAmount1 = parseEther("100"); + const stakedAmount2 = parseEther("100"); + + await stakeToken(sampleAccount1, stakedAmount1); + await stakeToken(sampleAccount2, stakedAmount2); + + await network.provider.send("evm_increaseTime", [REWARD_DURATION.div(2).toNumber()]); + await network.provider.send("evm_mine"); + + let earned1 = await rewardDistributorContract.earned(sampleAccount1.address); + expect(earned1).to.be.closeTo(REWARDS_AMOUNT.div(4), ERROR_TOLERANCE); + + let earned2 = await rewardDistributorContract.earned(sampleAccount2.address); + expect(earned2).to.be.closeTo(REWARDS_AMOUNT.div(4), ERROR_TOLERANCE); + + await network.provider.send("evm_increaseTime", [REWARD_DURATION.div(2).toNumber()]); + await network.provider.send("evm_mine"); + + earned1 = await rewardDistributorContract.earned(sampleAccount1.address); + expect(earned1).to.be.closeTo(REWARDS_AMOUNT.div(2), ERROR_TOLERANCE); + earned2 = await rewardDistributorContract.earned(sampleAccount2.address); + expect(earned2).to.be.closeTo(REWARDS_AMOUNT.div(2), ERROR_TOLERANCE); + + let zetaBalance = BigNumber.from(0); + zetaBalance = await ZETA_ERC20.balanceOf(sampleAccount1.address); + expect(zetaBalance).to.be.eq(0); + zetaBalance = await ZETA_ERC20.balanceOf(sampleAccount2.address); + expect(zetaBalance).to.be.eq(0); + + await rewardDistributorContract.connect(sampleAccount1).getReward(); + zetaBalance = await ZETA_ERC20.balanceOf(sampleAccount1.address); + expect(zetaBalance).to.be.closeTo(REWARDS_AMOUNT.div(2), ERROR_TOLERANCE); + zetaBalance = await ZETA_ERC20.balanceOf(sampleAccount2.address); + expect(zetaBalance).to.be.eq(0); + + await rewardDistributorContract.connect(sampleAccount2).getReward(); + zetaBalance = await ZETA_ERC20.balanceOf(sampleAccount1.address); + expect(zetaBalance).to.be.closeTo(REWARDS_AMOUNT.div(2), ERROR_TOLERANCE); + zetaBalance = await ZETA_ERC20.balanceOf(sampleAccount2.address); + expect(zetaBalance).to.be.closeTo(REWARDS_AMOUNT.div(2), ERROR_TOLERANCE); + }); + + it("Should distribute rewards between two users different proportion", async () => { + await ZETA.transfer(rewardDistributorContract.address, REWARDS_AMOUNT); + await rewardDistributorContract.setRewardsDuration(REWARD_DURATION); + await rewardDistributorContract.notifyRewardAmount(REWARDS_AMOUNT); + + const sampleAccount1 = accounts[3]; + const sampleAccount2 = accounts[4]; + const stakedAmount1 = parseEther("30"); + const stakedAmount2 = parseEther("10"); + + await stakeToken(sampleAccount1, stakedAmount1); + await stakeToken(sampleAccount2, stakedAmount2); + + await network.provider.send("evm_increaseTime", [REWARD_DURATION.div(2).toNumber()]); + await network.provider.send("evm_mine"); + + let earned1 = await rewardDistributorContract.earned(sampleAccount1.address); + expect(earned1).to.be.closeTo( + REWARDS_AMOUNT.div(2) + .div(4) + .mul(3), + ERROR_TOLERANCE + ); + + let earned2 = await rewardDistributorContract.earned(sampleAccount2.address); + expect(earned2).to.be.closeTo(REWARDS_AMOUNT.div(2).div(4), ERROR_TOLERANCE); + + await network.provider.send("evm_increaseTime", [REWARD_DURATION.div(2).toNumber()]); + await network.provider.send("evm_mine"); + + earned1 = await rewardDistributorContract.earned(sampleAccount1.address); + expect(earned1).to.be.closeTo(REWARDS_AMOUNT.div(4).mul(3), ERROR_TOLERANCE); + earned2 = await rewardDistributorContract.earned(sampleAccount2.address); + expect(earned2).to.be.closeTo(REWARDS_AMOUNT.div(4), ERROR_TOLERANCE); + + let zetaBalance = BigNumber.from(0); + zetaBalance = await ZETA_ERC20.balanceOf(sampleAccount1.address); + expect(zetaBalance).to.be.eq(0); + zetaBalance = await ZETA_ERC20.balanceOf(sampleAccount2.address); + expect(zetaBalance).to.be.eq(0); + + await rewardDistributorContract.connect(sampleAccount1).getReward(); + zetaBalance = await ZETA_ERC20.balanceOf(sampleAccount1.address); + expect(zetaBalance).to.be.closeTo(REWARDS_AMOUNT.div(4).mul(3), ERROR_TOLERANCE); + zetaBalance = await ZETA_ERC20.balanceOf(sampleAccount2.address); + expect(zetaBalance).to.be.eq(0); + + await rewardDistributorContract.connect(sampleAccount2).getReward(); + zetaBalance = await ZETA_ERC20.balanceOf(sampleAccount1.address); + expect(zetaBalance).to.be.closeTo(REWARDS_AMOUNT.div(4).mul(3), ERROR_TOLERANCE); + zetaBalance = await ZETA_ERC20.balanceOf(sampleAccount2.address); + expect(zetaBalance).to.be.closeTo(REWARDS_AMOUNT.div(4), ERROR_TOLERANCE); + }); + + it("Should prevent unstaking when minimum staking period has not elapsed", async () => { + const MIN_STAKING_PERIOD = 1000; + await ZETA.transfer(rewardDistributorContract.address, REWARDS_AMOUNT); + await rewardDistributorContract.setMinStakingPeriod(MIN_STAKING_PERIOD); + await rewardDistributorContract.setRewardsDuration(REWARD_DURATION); + await rewardDistributorContract.notifyRewardAmount(REWARDS_AMOUNT); + + const sampleAccount = accounts[0]; + const stakedAmount = parseEther("100"); + + await stakeToken(sampleAccount, stakedAmount); + + await network.provider.send("evm_increaseTime", [MIN_STAKING_PERIOD - 2]); + await network.provider.send("evm_mine"); + + const LPStaked = await rewardDistributorContract.balanceOf(sampleAccount.address); + const withdraw = rewardDistributorContract.connect(sampleAccount).withdraw(LPStaked); + await expect(withdraw).to.be.revertedWith("MinimumStakingPeriodNotMet"); + }); + + it("Should prevent starting cool down when minimum staking period has not passed", async () => { + const MIN_STAKING_PERIOD = 1000; + await ZETA.transfer(rewardDistributorContract.address, REWARDS_AMOUNT); + await rewardDistributorContract.setMinStakingPeriod(MIN_STAKING_PERIOD); + await rewardDistributorContract.setRewardsDuration(REWARD_DURATION); + await rewardDistributorContract.notifyRewardAmount(REWARDS_AMOUNT); + + const sampleAccount = accounts[0]; + const stakedAmount = parseEther("100"); + + await stakeToken(sampleAccount, stakedAmount); + + await network.provider.send("evm_increaseTime", [MIN_STAKING_PERIOD - 3]); + await network.provider.send("evm_mine"); + + const withdraw = rewardDistributorContract.connect(sampleAccount).beginCoolDown(); + await expect(withdraw).to.be.revertedWith("MinimumStakingPeriodNotMet"); + }); + + it("Should allow unstaking when minimum staking period has been fulfilled", async () => { + const MIN_STAKING_PERIOD = 1000; + await ZETA.transfer(rewardDistributorContract.address, REWARDS_AMOUNT); + await rewardDistributorContract.setMinStakingPeriod(MIN_STAKING_PERIOD); + await rewardDistributorContract.setRewardsDuration(REWARD_DURATION); + await rewardDistributorContract.notifyRewardAmount(REWARDS_AMOUNT); + + const sampleAccount = accounts[0]; + const stakedAmount = parseEther("100"); + + await stakeToken(sampleAccount, stakedAmount); + + await network.provider.send("evm_increaseTime", [MIN_STAKING_PERIOD + 2]); + await network.provider.send("evm_mine"); + + await rewardDistributorContract.connect(sampleAccount).beginCoolDown(); + + const LPStaked = await rewardDistributorContract.balanceOf(sampleAccount.address); + const withdraw = rewardDistributorContract.connect(sampleAccount).withdraw(LPStaked); + await expect(withdraw).not.to.be.reverted; + }); + + it("Should prevent unstaking when minimum cool down period has not been reached", async () => { + const MIN_STAKING_PERIOD = 1000; + const MIN_COOL_DOWN = 1000; + await ZETA.transfer(rewardDistributorContract.address, REWARDS_AMOUNT); + await rewardDistributorContract.setMinStakingPeriod(MIN_STAKING_PERIOD); + await rewardDistributorContract.setMinCoolDown(MIN_COOL_DOWN); + await rewardDistributorContract.setRewardsDuration(REWARD_DURATION); + await rewardDistributorContract.notifyRewardAmount(REWARDS_AMOUNT); + + const sampleAccount = accounts[0]; + const stakedAmount = parseEther("100"); + + await stakeToken(sampleAccount, stakedAmount); + + await network.provider.send("evm_increaseTime", [MIN_STAKING_PERIOD + 2]); + await network.provider.send("evm_mine"); + + await rewardDistributorContract.connect(sampleAccount).beginCoolDown(); + + const LPStaked = await rewardDistributorContract.balanceOf(sampleAccount.address); + const withdraw = rewardDistributorContract.connect(sampleAccount).withdraw(LPStaked); + await expect(withdraw).to.be.revertedWith("MinimumStakingPeriodNotMet"); + }); + + it("Should allow unstaking when minimum cool down period has been satisfied", async () => { + const MIN_STAKING_PERIOD = 1000; + const MIN_COOL_DOWN = 1000; + await ZETA.transfer(rewardDistributorContract.address, REWARDS_AMOUNT); + await rewardDistributorContract.setMinStakingPeriod(MIN_STAKING_PERIOD); + await rewardDistributorContract.setMinCoolDown(MIN_COOL_DOWN); + await rewardDistributorContract.setRewardsDuration(REWARD_DURATION); + await rewardDistributorContract.notifyRewardAmount(REWARDS_AMOUNT); + + const sampleAccount = accounts[0]; + const stakedAmount = parseEther("100"); + + await stakeToken(sampleAccount, stakedAmount); + + await network.provider.send("evm_increaseTime", [MIN_STAKING_PERIOD + 2]); + await network.provider.send("evm_mine"); + + await rewardDistributorContract.connect(sampleAccount).beginCoolDown(); + + await network.provider.send("evm_increaseTime", [MIN_COOL_DOWN + 2]); + await network.provider.send("evm_mine"); + + const LPStaked = await rewardDistributorContract.balanceOf(sampleAccount.address); + const withdraw = rewardDistributorContract.connect(sampleAccount).withdraw(LPStaked); + await expect(withdraw).not.to.be.reverted; + }); + + it("Should prevent exit when minimum staking period has not elapsed", async () => { + const MIN_STAKING_PERIOD = 1000; + await ZETA.transfer(rewardDistributorContract.address, REWARDS_AMOUNT); + await rewardDistributorContract.setMinStakingPeriod(MIN_STAKING_PERIOD); + await rewardDistributorContract.setRewardsDuration(REWARD_DURATION); + await rewardDistributorContract.notifyRewardAmount(REWARDS_AMOUNT); + + const sampleAccount = accounts[0]; + const stakedAmount = parseEther("100"); + + await stakeToken(sampleAccount, stakedAmount); + + await network.provider.send("evm_increaseTime", [MIN_STAKING_PERIOD - 2]); + await network.provider.send("evm_mine"); + + const withdraw = rewardDistributorContract.connect(sampleAccount).exit(); + await expect(withdraw).to.be.revertedWith("MinimumStakingPeriodNotMet"); + }); + + it("Should prevent exit when minimum cool down period has not been reached", async () => { + const MIN_STAKING_PERIOD = 1000; + const MIN_COOL_DOWN = 1000; + await ZETA.transfer(rewardDistributorContract.address, REWARDS_AMOUNT); + await rewardDistributorContract.setMinStakingPeriod(MIN_STAKING_PERIOD); + await rewardDistributorContract.setMinCoolDown(MIN_COOL_DOWN); + await rewardDistributorContract.setRewardsDuration(REWARD_DURATION); + await rewardDistributorContract.notifyRewardAmount(REWARDS_AMOUNT); + + const sampleAccount = accounts[0]; + const stakedAmount = parseEther("100"); + + await stakeToken(sampleAccount, stakedAmount); + + await network.provider.send("evm_increaseTime", [MIN_STAKING_PERIOD + 2]); + await network.provider.send("evm_mine"); + + await rewardDistributorContract.connect(sampleAccount).beginCoolDown(); + + const withdraw = rewardDistributorContract.connect(sampleAccount).exit(); + await expect(withdraw).to.be.revertedWith("MinimumStakingPeriodNotMet"); + }); +}); diff --git a/packages/zevm-app-contracts/test/Synthetixio/StakingRewards.ts b/packages/zevm-app-contracts/test/Synthetixio/StakingRewards.ts new file mode 100644 index 00000000..f302f1d7 --- /dev/null +++ b/packages/zevm-app-contracts/test/Synthetixio/StakingRewards.ts @@ -0,0 +1,558 @@ +import { parseUnits } from "@ethersproject/units"; +import { SignerWithAddress } from "@nomiclabs/hardhat-ethers/signers"; +import { BigNumber } from "ethers"; +import { parseEther } from "ethers/lib/utils"; +import { ethers } from "hardhat"; + +import { StakingRewards, StakingRewards__factory, TestZRC20, TestZRC20__factory } from "../../typechain-types"; + +const { assert, addSnapshotBeforeRestoreAfterEach } = require("./common"); + +const { currentTime, fastForward } = require("./utils")(); + +const toUnit = parseEther; + +const mockToken = async (acount: SignerWithAddress, name: string, symbol: string) => { + const ZRC20Factory = (await ethers.getContractFactory("TestZRC20")) as TestZRC20__factory; + const token = (await ZRC20Factory.connect(acount).deploy(parseUnits("1000000"), name, symbol)) as TestZRC20; + return token; +}; + +describe("StakingRewards", () => { + let owner: any, stakingAccount1: any, rewardsDistribution: any; + + // Synthetix is the rewardsToken + let rewardsToken: any, stakingToken: any, externalRewardsToken: any, stakingRewards: any; + + const DAY = 86400; + const ZERO_BN = BigNumber.from(0); + + addSnapshotBeforeRestoreAfterEach(); + + before(async () => { + const accounts = await ethers.getSigners(); + owner = accounts[0]; + stakingAccount1 = accounts[1]; + rewardsDistribution = accounts[2]; + + stakingToken = await mockToken(owner, "Staking Token", "STKN"); + externalRewardsToken = await mockToken(owner, "External Rewards Token", "MOAR"); + rewardsToken = await mockToken(owner, "Synthetix", "SNK"); + + const StakingRewardsFactory = (await ethers.getContractFactory("StakingRewards")) as StakingRewards__factory; + stakingRewards = (await StakingRewardsFactory.deploy( + owner.address, + rewardsDistribution.address, + rewardsToken.address, + stakingToken.address + )) as StakingRewards; + await stakingRewards.deployed(); + }); + + describe("Constructor & Settings", () => { + it("should set rewards token on constructor", async () => { + assert.equal(await stakingRewards.rewardsToken(), rewardsToken.address); + }); + + it("should staking token on constructor", async () => { + assert.equal(await stakingRewards.stakingToken(), stakingToken.address); + }); + + it("should set owner on constructor", async () => { + const ownerAddress = await stakingRewards.owner(); + assert.equal(ownerAddress, owner.address); + }); + }); + + describe("Function permissions", () => { + const rewardValue = toUnit("1.0"); + + before(async () => { + await rewardsToken.connect(owner).transfer(stakingRewards.address, rewardValue); + }); + }); + + describe("Pausable", async () => { + beforeEach(async () => { + await stakingRewards.connect(owner).setPaused(true); + }); + it("should revert calling stake() when paused", async () => { + const totalToStake = toUnit("100"); + await stakingToken.connect(owner).transfer(stakingAccount1.address, totalToStake); + await stakingToken.connect(stakingAccount1).approve(stakingRewards.address, totalToStake); + + await assert.revert( + stakingRewards.connect(stakingAccount1).stake(totalToStake), + "This action cannot be performed while the contract is paused" + ); + }); + it("should not revert calling stake() when unpaused", async () => { + await stakingRewards.connect(owner).setPaused(false); + + const totalToStake = toUnit("100"); + await stakingToken.connect(owner).transfer(stakingAccount1.address, totalToStake); + await stakingToken.connect(stakingAccount1).approve(stakingRewards.address, totalToStake); + + await stakingRewards.connect(stakingAccount1).stake(totalToStake); + }); + }); + + describe("External Rewards Recovery", () => { + const amount = toUnit("5000"); + beforeEach(async () => { + // Send ERC20 to StakingRewards Contract + await externalRewardsToken.connect(owner).transfer(stakingRewards.address, amount); + assert.bnEqual(await externalRewardsToken.balanceOf(stakingRewards.address), amount); + }); + it("only owner can call recoverERC20", async () => { + const accounts = await ethers.getSigners(); + for (let i = 0; i < accounts.length; i++) { + const account = accounts[i]; + if (account.address !== owner.address) { + await assert.revert( + stakingRewards.connect(account).recoverERC20(externalRewardsToken.address, amount), + "Only the contract owner may perform this action" + ); + } else { + await stakingRewards.connect(account).recoverERC20(externalRewardsToken.address, amount); + } + } + }); + it("should revert if recovering staking token", async () => { + await assert.revert( + stakingRewards.connect(owner).recoverERC20(stakingToken.address, amount), + "Cannot withdraw the staking token" + ); + }); + it("should retrieve external token from StakingRewards and reduce contracts balance", async () => { + await stakingRewards.connect(owner).recoverERC20(externalRewardsToken.address, amount); + assert.bnEqual(await externalRewardsToken.balanceOf(stakingRewards.address), ZERO_BN); + }); + it("should retrieve external token from StakingRewards and increase owners balance", async () => { + const ownerMOARBalanceBefore = await externalRewardsToken.balanceOf(owner.address); + + await stakingRewards.connect(owner).recoverERC20(externalRewardsToken.address, amount); + + const ownerMOARBalanceAfter = await externalRewardsToken.balanceOf(owner.address); + assert.bnEqual(ownerMOARBalanceAfter.sub(ownerMOARBalanceBefore), amount); + }); + it("should emit Recovered event", async () => { + const transaction = await stakingRewards.connect(owner).recoverERC20(externalRewardsToken.address, amount); + const receipt = await transaction.wait(); + const event = receipt.events?.find((e: any) => e.event === "Recovered"); + assert.eventEqual(event, "Recovered", { + amount: amount, + token: externalRewardsToken.address + }); + }); + }); + + describe("lastTimeRewardApplicable()", () => { + it("should return 0", async () => { + assert.bnEqual(await stakingRewards.lastTimeRewardApplicable(), ZERO_BN); + }); + + describe("when updated", () => { + it("should equal current timestamp", async () => { + await rewardsToken.connect(owner).transfer(stakingRewards.address, toUnit("1")); + await stakingRewards.connect(rewardsDistribution).notifyRewardAmount(toUnit("1")); + + const cur = await currentTime(); + const lastTimeReward = await stakingRewards.lastTimeRewardApplicable(); + + assert.equal(cur.toString(), lastTimeReward.toString()); + }); + }); + }); + + describe("rewardPerToken()", () => { + it("should return 0", async () => { + assert.bnEqual(await stakingRewards.rewardPerToken(), ZERO_BN); + }); + + it("should be > 0", async () => { + const totalToStake = toUnit("100"); + await stakingToken.connect(owner).transfer(stakingAccount1.address, totalToStake); + await stakingToken.connect(stakingAccount1).approve(stakingRewards.address, totalToStake); + await stakingRewards.connect(stakingAccount1).stake(totalToStake); + + const totalSupply = await stakingRewards.totalSupply(); + assert.bnGt(totalSupply, ZERO_BN); + + const rewardValue = toUnit("5000.0"); + await rewardsToken.connect(owner).transfer(stakingRewards.address, rewardValue); + await stakingRewards.connect(rewardsDistribution).notifyRewardAmount(rewardValue); + + await fastForward(DAY); + + const rewardPerToken = await stakingRewards.rewardPerToken(); + assert.bnGt(rewardPerToken, ZERO_BN); + }); + }); + + describe("stake()", () => { + it("staking increases staking balance", async () => { + const totalToStake = toUnit("100"); + await stakingToken.connect(owner).transfer(stakingAccount1.address, totalToStake); + await stakingToken.connect(stakingAccount1).approve(stakingRewards.address, totalToStake); + + const initialStakeBal = await stakingRewards.balanceOf(stakingAccount1.address); + const initialLpBal = await stakingToken.balanceOf(stakingAccount1.address); + + await stakingRewards.connect(stakingAccount1).stake(totalToStake); + + const postStakeBal = await stakingRewards.balanceOf(stakingAccount1.address); + const postLpBal = await stakingToken.balanceOf(stakingAccount1.address); + + assert.bnLt(postLpBal, initialLpBal); + assert.bnGt(postStakeBal, initialStakeBal); + }); + + it("cannot stake 0", async () => { + await assert.revert(stakingRewards.stake("0"), "Cannot stake 0"); + }); + }); + + describe("earned()", () => { + it("should be 0 when not staking", async () => { + assert.bnEqual(await stakingRewards.earned(stakingAccount1.address), ZERO_BN); + }); + + it("should be > 0 when staking", async () => { + const totalToStake = toUnit("100"); + await stakingToken.connect(owner).transfer(stakingAccount1.address, totalToStake); + await stakingToken.connect(stakingAccount1).approve(stakingRewards.address, totalToStake); + await stakingRewards.connect(stakingAccount1).stake(totalToStake); + + const rewardValue = toUnit("5000.0"); + await rewardsToken.connect(owner).transfer(stakingRewards.address, rewardValue); + await stakingRewards.connect(rewardsDistribution).notifyRewardAmount(rewardValue); + + await fastForward(DAY); + + const earned = await stakingRewards.earned(stakingAccount1.address); + + assert.bnGt(earned, ZERO_BN); + }); + + it("rewardRate should increase if new rewards come before DURATION ends", async () => { + const totalToDistribute = toUnit("5000"); + + await rewardsToken.connect(owner).transfer(stakingRewards.address, totalToDistribute); + await stakingRewards.connect(rewardsDistribution).notifyRewardAmount(totalToDistribute); + + const rewardRateInitial = await stakingRewards.rewardRate(); + + await rewardsToken.connect(owner).transfer(stakingRewards.address, totalToDistribute); + await stakingRewards.connect(rewardsDistribution).notifyRewardAmount(totalToDistribute); + + const rewardRateLater = await stakingRewards.rewardRate(); + + assert.bnGt(rewardRateInitial, ZERO_BN); + assert.bnGt(rewardRateLater, rewardRateInitial); + }); + + it("rewards token balance should rollover after DURATION", async () => { + const totalToStake = toUnit("100"); + const totalToDistribute = toUnit("5000"); + + await stakingToken.connect(owner).transfer(stakingAccount1.address, totalToStake); + await stakingToken.connect(stakingAccount1).approve(stakingRewards.address, totalToStake); + await stakingRewards.connect(stakingAccount1).stake(totalToStake); + + await rewardsToken.connect(owner).transfer(stakingRewards.address, totalToDistribute); + await stakingRewards.connect(rewardsDistribution).notifyRewardAmount(totalToDistribute); + + await fastForward(DAY * 7); + const earnedFirst = await stakingRewards.earned(stakingAccount1.address); + + await rewardsToken.connect(owner).transfer(stakingRewards.address, totalToDistribute); + await stakingRewards.connect(rewardsDistribution).notifyRewardAmount(totalToDistribute); + + await fastForward(DAY * 7); + const earnedSecond = await stakingRewards.earned(stakingAccount1.address); + + assert.bnEqual(earnedSecond, earnedFirst.add(earnedFirst)); + }); + }); + + describe("getReward()", () => { + it("should increase rewards token balance", async () => { + const totalToStake = toUnit("100"); + const totalToDistribute = toUnit("5000"); + + await stakingToken.connect(owner).transfer(stakingAccount1.address, totalToStake); + await stakingToken.connect(stakingAccount1).approve(stakingRewards.address, totalToStake); + await stakingRewards.connect(stakingAccount1).stake(totalToStake); + + await rewardsToken.connect(owner).transfer(stakingRewards.address, totalToDistribute); + await stakingRewards.connect(rewardsDistribution).notifyRewardAmount(totalToDistribute); + + await fastForward(DAY); + + const initialRewardBal = await rewardsToken.balanceOf(stakingAccount1.address); + const initialEarnedBal = await stakingRewards.earned(stakingAccount1.address); + await stakingRewards.connect(stakingAccount1).getReward(); + const postRewardBal = await rewardsToken.balanceOf(stakingAccount1.address); + const postEarnedBal = await stakingRewards.earned(stakingAccount1.address); + + assert.bnLt(postEarnedBal, initialEarnedBal); + assert.bnGt(postRewardBal, initialRewardBal); + }); + }); + + describe("setRewardsDuration()", () => { + const sevenDays = DAY * 7; + const seventyDays = DAY * 70; + it("should increase rewards duration before starting distribution", async () => { + const defaultDuration = await stakingRewards.rewardsDuration(); + assert.bnEqual(defaultDuration, sevenDays); + + await stakingRewards.connect(owner).setRewardsDuration(seventyDays); + const newDuration = await stakingRewards.rewardsDuration(); + assert.bnEqual(newDuration, seventyDays); + }); + it("should revert when setting setRewardsDuration before the period has finished", async () => { + const totalToStake = toUnit("100"); + const totalToDistribute = toUnit("5000"); + + await stakingToken.connect(owner).transfer(stakingAccount1.address, totalToStake); + await stakingToken.connect(stakingAccount1).approve(stakingRewards.address, totalToStake); + await stakingRewards.connect(stakingAccount1).stake(totalToStake); + + await rewardsToken.connect(owner).transfer(stakingRewards.address, totalToDistribute); + await stakingRewards.connect(rewardsDistribution).notifyRewardAmount(totalToDistribute); + + await fastForward(DAY); + + await assert.revert( + stakingRewards.connect(owner).setRewardsDuration(seventyDays), + "Previous rewards period must be complete before changing the duration for the new period" + ); + }); + it("should update when setting setRewardsDuration after the period has finished", async () => { + const totalToStake = toUnit("100"); + const totalToDistribute = toUnit("5000"); + await stakingToken.connect(owner).transfer(stakingAccount1.address, totalToStake); + await stakingToken.connect(stakingAccount1).approve(stakingRewards.address, totalToStake); + await stakingRewards.connect(stakingAccount1).stake(totalToStake); + + await rewardsToken.connect(owner).transfer(stakingRewards.address, totalToDistribute); + await stakingRewards.connect(rewardsDistribution).notifyRewardAmount(totalToDistribute); + + await fastForward(DAY * 8); + + const transaction = await stakingRewards.connect(owner).setRewardsDuration(seventyDays); + const receipt = await transaction.wait(); + const event = receipt.events?.find((e: any) => e.event === "RewardsDurationUpdated"); + assert.eventEqual(event, "RewardsDurationUpdated", { + newDuration: seventyDays + }); + const newDuration = await stakingRewards.rewardsDuration(); + assert.bnEqual(newDuration, seventyDays); + await stakingRewards.connect(rewardsDistribution).notifyRewardAmount(totalToDistribute); + }); + + it("should update when setting setRewardsDuration after the period has finished", async () => { + const totalToStake = toUnit("100"); + const totalToDistribute = toUnit("5000"); + + await stakingToken.connect(owner).transfer(stakingAccount1.address, totalToStake); + await stakingToken.connect(stakingAccount1).approve(stakingRewards.address, totalToStake); + await stakingRewards.connect(stakingAccount1).stake(totalToStake); + + await rewardsToken.connect(owner).transfer(stakingRewards.address, totalToDistribute); + await stakingRewards.connect(rewardsDistribution).notifyRewardAmount(totalToDistribute); + + await fastForward(DAY * 4); + await stakingRewards.connect(stakingAccount1).getReward(); + await fastForward(DAY * 4); + + // New Rewards period much lower + await rewardsToken.connect(owner).transfer(stakingRewards.address, totalToDistribute); + const transaction = await stakingRewards.connect(owner).setRewardsDuration(seventyDays); + const receipt = await transaction.wait(); + const event = receipt.events?.find((e: any) => e.event === "RewardsDurationUpdated"); + assert.eventEqual(event, "RewardsDurationUpdated", { + newDuration: seventyDays + }); + + const newDuration = await stakingRewards.rewardsDuration(); + assert.bnEqual(newDuration, seventyDays); + + await stakingRewards.connect(rewardsDistribution).notifyRewardAmount(totalToDistribute); + + await fastForward(DAY * 71); + await stakingRewards.connect(stakingAccount1).getReward(); + }); + }); + + describe("getRewardForDuration()", () => { + it("should increase rewards token balance", async () => { + const totalToDistribute = toUnit("5000"); + await rewardsToken.connect(owner).transfer(stakingRewards.address, totalToDistribute); + await stakingRewards.connect(rewardsDistribution).notifyRewardAmount(totalToDistribute); + + const rewardForDuration = await stakingRewards.getRewardForDuration(); + + const duration = await stakingRewards.rewardsDuration(); + const rewardRate = await stakingRewards.rewardRate(); + + assert.bnGt(rewardForDuration, ZERO_BN); + assert.bnEqual(rewardForDuration, duration.mul(rewardRate)); + }); + }); + + describe("withdraw()", () => { + it("cannot withdraw if nothing staked", async () => { + await assert.revert( + stakingRewards.withdraw(toUnit("100")), + "Arithmetic operation underflowed or overflowed outside of an unchecked block" + ); + }); + + it("should increases lp token balance and decreases staking balance", async () => { + const totalToStake = toUnit("100"); + await stakingToken.connect(owner).transfer(stakingAccount1.address, totalToStake); + await stakingToken.connect(stakingAccount1).approve(stakingRewards.address, totalToStake); + await stakingRewards.connect(stakingAccount1).stake(totalToStake); + + const initialStakingTokenBal = await stakingToken.balanceOf(stakingAccount1.address); + const initialStakeBal = await stakingRewards.balanceOf(stakingAccount1.address); + + await stakingRewards.connect(stakingAccount1).withdraw(totalToStake); + + const postStakingTokenBal = await stakingToken.balanceOf(stakingAccount1.address); + const postStakeBal = await stakingRewards.balanceOf(stakingAccount1.address); + + assert.bnEqual(postStakeBal.add(totalToStake), initialStakeBal); + assert.bnEqual(initialStakingTokenBal.add(totalToStake), postStakingTokenBal); + }); + + it("cannot withdraw 0", async () => { + await assert.revert(stakingRewards.withdraw("0"), "Cannot withdraw 0"); + }); + }); + + describe("exit()", () => { + it("should retrieve all earned and increase rewards bal", async () => { + const totalToStake = toUnit("100"); + const totalToDistribute = toUnit("5000"); + + await stakingToken.connect(owner).transfer(stakingAccount1.address, totalToStake); + await stakingToken.connect(stakingAccount1).approve(stakingRewards.address, totalToStake); + await stakingRewards.connect(stakingAccount1).stake(totalToStake); + + await rewardsToken.connect(owner).transfer(stakingRewards.address, totalToDistribute); + await stakingRewards.connect(rewardsDistribution).notifyRewardAmount(toUnit("5000.0")); + + await fastForward(DAY); + + const initialRewardBal = await rewardsToken.balanceOf(stakingAccount1.address); + const initialEarnedBal = await stakingRewards.earned(stakingAccount1.address); + await stakingRewards.connect(stakingAccount1).exit(); + const postRewardBal = await rewardsToken.balanceOf(stakingAccount1.address); + const postEarnedBal = await stakingRewards.earned(stakingAccount1.address); + + assert.bnLt(postEarnedBal, initialEarnedBal); + assert.bnGt(postRewardBal, initialRewardBal); + assert.bnEqual(postEarnedBal, ZERO_BN); + }); + }); + + describe("notifyRewardAmount()", () => { + let localStakingRewards: any; + + before(async () => { + const StakingRewardsFactory = (await ethers.getContractFactory("StakingRewards")) as StakingRewards__factory; + localStakingRewards = (await StakingRewardsFactory.deploy( + owner.address, + rewardsDistribution.address, + rewardsToken.address, + stakingToken.address + )) as StakingRewards; + await localStakingRewards.deployed(); + }); + + it("Reverts if the provided reward is greater than the balance.", async () => { + const rewardValue = toUnit("1000"); + await rewardsToken.connect(owner).transfer(localStakingRewards.address, rewardValue); + await assert.revert( + localStakingRewards.connect(rewardsDistribution).notifyRewardAmount(rewardValue.add(toUnit("0.1"))), + "Provided reward too high" + ); + }); + + it("Reverts if the provided reward is greater than the balance, plus rolled-over balance.", async () => { + const rewardValue = toUnit("1000"); + await rewardsToken.connect(owner).transfer(localStakingRewards.address, rewardValue); + localStakingRewards.connect(rewardsDistribution).notifyRewardAmount(rewardValue); + await rewardsToken.connect(owner).transfer(localStakingRewards.address, rewardValue); + // Now take into account any leftover quantity. + await assert.revert( + localStakingRewards.connect(rewardsDistribution).notifyRewardAmount(rewardValue.add(toUnit("0.1"))), + "Provided reward too high" + ); + }); + }); + + describe("Integration Tests", () => { + before(async () => { + // Set rewardDistribution address + await stakingRewards.connect(owner).setRewardsDistribution(rewardsDistribution.address); + assert.equal(await stakingRewards.rewardsDistribution(), rewardsDistribution.address); + }); + + it("stake and claim", async () => { + // Transfer some LP Tokens to user + const totalToStake = toUnit("500"); + await stakingToken.connect(owner).transfer(stakingAccount1.address, totalToStake); + + // Stake LP Tokens + await stakingToken.connect(stakingAccount1).approve(stakingRewards.address, totalToStake); + await stakingRewards.connect(stakingAccount1).stake(totalToStake); + + // Distribute some rewards + const totalToDistribute = toUnit("35000"); + + // Transfer Rewards to the RewardsDistribution contract address + await rewardsToken.connect(owner).transfer(rewardsDistribution.address, totalToDistribute); + await rewardsToken.connect(rewardsDistribution).transfer(stakingRewards.address, totalToDistribute); + await stakingRewards.connect(rewardsDistribution).notifyRewardAmount(totalToDistribute); + + // Period finish should be ~7 days from now + const periodFinish = await stakingRewards.periodFinish(); + const curTimestamp = await currentTime(); + assert.equal(parseInt(periodFinish.toString(), 10), curTimestamp + DAY * 7); + + // Reward duration is 7 days, so we'll + // Fastforward time by 6 days to prevent expiration + await fastForward(DAY * 6); + // Reward rate and reward per token + const rewardRate = await stakingRewards.rewardRate(); + assert.bnGt(rewardRate, ZERO_BN); + const rewardPerToken = await stakingRewards.rewardPerToken(); + assert.bnGt(rewardPerToken, ZERO_BN); + // Make sure we earned in proportion to reward per token + const rewardRewardsEarned = await stakingRewards.earned(stakingAccount1.address); + assert.bnEqual(rewardRewardsEarned, rewardPerToken.mul(totalToStake).div(toUnit("1"))); + // Make sure after withdrawing, we still have the ~amount of rewardRewards + // The two values will be a bit different as time has "passed" + const initialWithdraw = toUnit("100"); + await stakingRewards.connect(stakingAccount1).withdraw(initialWithdraw); + assert.bnEqual(initialWithdraw, await stakingToken.balanceOf(stakingAccount1.address)); + const rewardRewardsEarnedPostWithdraw = await stakingRewards.earned(stakingAccount1.address); + assert.bnClose(rewardRewardsEarned, rewardRewardsEarnedPostWithdraw, toUnit("0.1")); + // Get rewards + const initialRewardBal = await rewardsToken.balanceOf(stakingAccount1.address); + await stakingRewards.connect(stakingAccount1).getReward(); + const postRewardRewardBal = await rewardsToken.balanceOf(stakingAccount1.address); + assert.bnGt(postRewardRewardBal, initialRewardBal); + // Exit + const preExitLPBal = await stakingToken.balanceOf(stakingAccount1.address); + await stakingRewards.connect(stakingAccount1).exit(); + const postExitLPBal = await stakingToken.balanceOf(stakingAccount1.address); + assert.bnGt(postExitLPBal, preExitLPBal); + }); + }); +}); diff --git a/packages/zevm-app-contracts/test/Synthetixio/common.js b/packages/zevm-app-contracts/test/Synthetixio/common.js new file mode 100644 index 00000000..2eca73dd --- /dev/null +++ b/packages/zevm-app-contracts/test/Synthetixio/common.js @@ -0,0 +1,72 @@ +const { web3 } = require("hardhat"); + +const { assert } = require("chai"); + +const { + assertEventEqual, + assertEventsEqual, + assertBNEqual, + assertBNNotEqual, + assertBNClose, + assertBNGreaterEqualThan, + assertBNGreaterThan, + assertBNLessEqualThan, + assertBNLessThan, + assertDeepEqual, + assertInvalidOpcode, + assertUnitEqual, + assertUnitNotEqual, + assertRevert, + fromUnit, + takeSnapshot, + restoreSnapshot +} = require("./utils")(); + +let lastSnapshotId; + +module.exports = { + addSnapshotBeforeRestoreAfter() { + before(async () => { + lastSnapshotId = await takeSnapshot(); + }); + + after(async () => { + await restoreSnapshot(lastSnapshotId); + }); + }, + + // And this is our test sandboxing. It snapshots and restores between each test. + // Note: if a test suite uses fastForward at all, then it MUST also use these snapshots, + // otherwise it will update the block time of the EVM and future tests that expect a + // starting timestamp will fail. + addSnapshotBeforeRestoreAfterEach() { + beforeEach(async () => { + lastSnapshotId = await takeSnapshot(); + }); + + afterEach(async () => { + await restoreSnapshot(lastSnapshotId); + }); + }, + + // So we don't have to constantly import our assert helpers everywhere + // we'll just tag them onto the assert object for easy access. + assert: Object.assign({}, assert, { + bnClose: assertBNClose, + bnEqual: assertBNEqual, + bnGt: assertBNGreaterThan, + bnGte: assertBNGreaterEqualThan, + bnLt: assertBNLessThan, + bnLte: assertBNLessEqualThan, + bnNotEqual: assertBNNotEqual, + deepEqual: assertDeepEqual, + etherEqual: assertUnitEqual, + etherNotEqual: assertUnitNotEqual, + eventEqual: assertEventEqual, + eventsEqual: assertEventsEqual, + invalidOpcode: assertInvalidOpcode, + revert: assertRevert, + unitEqual: assertUnitEqual, + unitNotEqual: assertUnitNotEqual + }) +}; diff --git a/packages/zevm-app-contracts/test/Synthetixio/utils.js b/packages/zevm-app-contracts/test/Synthetixio/utils.js new file mode 100644 index 00000000..dcf769e2 --- /dev/null +++ b/packages/zevm-app-contracts/test/Synthetixio/utils.js @@ -0,0 +1,600 @@ +const { assert } = require("chai"); + +const hardhat = require("hardhat"); +// Note: the below is hardhat internal and is subject to change +const ethers = require("ethers"); + +const BN = require("bn.js"); + +const { toBN, toWei, fromWei, hexToAscii } = require("web3-utils"); +const UNIT = toWei(new BN("1"), "ether"); + +module.exports = () => { + /** + * Sets default properties on the jsonrpc object and promisifies it so we don't have to copy/paste everywhere. + */ + const send = async payload => { + if (!payload.jsonrpc) payload.jsonrpc = "2.0"; + if (!payload.id) payload.id = new Date().getTime(); + result = await hardhat.network.provider.send(payload.method, payload.params); + return result; + }; + + /** + * Mines a single block in Ganache (evm_mine is non-standard) + */ + const mineBlock = () => send({ method: "evm_mine" }); + + /** + * Gets the time of the last block. + */ + const currentTime = async () => { + const { timestamp } = await hardhat.ethers.provider.getBlock("latest"); + return timestamp; + }; + + /** + * Increases the time in the EVM. + * @param seconds Number of seconds to increase the time by + */ + const fastForward = async seconds => { + // It's handy to be able to be able to pass big numbers in as we can just + // query them from the contract, then send them back. If not changed to + // a number, this causes much larger fast forwards than expected without error. + if (BN.isBN(seconds)) seconds = seconds.toNumber(); + + // And same with strings. + if (typeof seconds === "string") seconds = parseFloat(seconds); + + let params = { + method: "evm_increaseTime", + params: [seconds] + }; + + if (hardhat.ovm) { + params = { + method: "evm_setNextBlockTimestamp", + params: [(await currentTime()) + seconds] + }; + } + + await send(params); + + await mineBlock(); + }; + + /** + * Increases the time in the EVM to as close to a specific date as possible + * NOTE: Because this operation figures out the amount of seconds to jump then applies that to the EVM, + * sometimes the result can vary by a second or two depending on how fast or slow the local EVM is responding. + * @param time Date object representing the desired time at the end of the operation + */ + const fastForwardTo = async time => { + if (typeof time === "string") time = parseInt(time); + + const timestamp = await currentTime(); + const now = new Date(timestamp * 1000); + if (time < now) + throw new Error( + `Time parameter (${time}) is less than now ${now}. You can only fast forward to times in the future.` + ); + + const secondsBetween = Math.floor((time.getTime() - now.getTime()) / 1000); + + await fastForward(secondsBetween); + }; + + /** + * Takes a snapshot and returns the ID of the snapshot for restoring later. + */ + const takeSnapshot = async () => { + const result = await send({ method: "evm_snapshot" }); + await mineBlock(); + + return result; + }; + + /** + * Restores a snapshot that was previously taken with takeSnapshot + * @param id The ID that was returned when takeSnapshot was called. + */ + const restoreSnapshot = async id => { + await send({ + method: "evm_revert", + params: [id] + }); + await mineBlock(); + }; + + /** + * Translates an amount to our canonical unit. We happen to use 10^18, which means we can + * use the built in web3 method for convenience, but if unit ever changes in our contracts + * we should be able to update the conversion factor here. + * @param amount The amount you want to re-base to UNIT + */ + const toUnit = amount => toBN(toWei(amount.toString(), "ether")); + const fromUnit = amount => fromWei(amount, "ether"); + + /** + * Translates an amount to our canonical precise unit. We happen to use 10^27, which means we can + * use the built in web3 method for convenience, but if precise unit ever changes in our contracts + * we should be able to update the conversion factor here. + * @param amount The amount you want to re-base to PRECISE_UNIT + */ + const PRECISE_UNIT_STRING = "1000000000000000000000000000"; + const PRECISE_UNIT = toBN(PRECISE_UNIT_STRING); + + const toPreciseUnit = amount => { + // Code is largely lifted from the guts of web3 toWei here: + // https://github.com/ethjs/ethjs-unit/blob/master/src/index.js + const amountString = amount.toString(); + + // Is it negative? + var negative = amountString.substring(0, 1) === "-"; + if (negative) { + amount = amount.substring(1); + } + + if (amount === ".") { + throw new Error(`Error converting number ${amount} to precise unit, invalid value`); + } + + // Split it into a whole and fractional part + // eslint-disable-next-line prefer-const + let [whole, fraction, ...rest] = amount.split("."); + if (rest.length > 0) { + throw new Error(`Error converting number ${amount} to precise unit, too many decimal points`); + } + + if (!whole) { + whole = "0"; + } + if (!fraction) { + fraction = "0"; + } + if (fraction.length > PRECISE_UNIT_STRING.length - 1) { + throw new Error(`Error converting number ${amount} to precise unit, too many decimal places`); + } + + while (fraction.length < PRECISE_UNIT_STRING.length - 1) { + fraction += "0"; + } + + whole = new BN(whole); + fraction = new BN(fraction); + let result = whole.mul(PRECISE_UNIT).add(fraction); + + if (negative) { + result = result.mul(new BN("-1")); + } + + return result; + }; + + const fromPreciseUnit = amount => { + // Code is largely lifted from the guts of web3 fromWei here: + // https://github.com/ethjs/ethjs-unit/blob/master/src/index.js + const negative = amount.lt(new BN("0")); + + if (negative) { + amount = amount.mul(new BN("-1")); + } + + let fraction = amount.mod(PRECISE_UNIT).toString(); + + while (fraction.length < PRECISE_UNIT_STRING.length - 1) { + fraction = `0${fraction}`; + } + + // Chop zeros off the end if there are extras. + fraction = fraction.replace(/0+$/, ""); + + const whole = amount.div(PRECISE_UNIT).toString(); + let value = `${whole}${fraction === "" ? "" : `.${fraction}`}`; + + if (negative) { + value = `-${value}`; + } + + return value; + }; + + /* + * Multiplies x and y interpreting them as fixed point decimal numbers. + */ + const multiplyDecimal = (x, y, unit = UNIT) => { + const xBN = BN.isBN(x) ? x : new BN(x); + const yBN = BN.isBN(y) ? y : new BN(y); + return xBN.mul(yBN).div(unit); + }; + + /* + * Divides x and y interpreting them as fixed point decimal numbers. + */ + const divideDecimal = (x, y, unit = UNIT) => { + const xBN = BN.isBN(x) ? x : new BN(x); + const yBN = BN.isBN(y) ? y : new BN(y); + return xBN.mul(unit).div(yBN); + }; + + /* + * Multiplies x and y interpreting them as fixed point decimal numbers, + * with rounding. + */ + const multiplyDecimalRound = (x, y) => { + let result = x.mul(y).div(toUnit(0.1)); + if (result.mod(toBN(10)).gte(toBN(5))) { + result = result.add(toBN(10)); + } + return result.div(toBN(10)); + }; + + /* + * Divides x and y interpreting them as fixed point decimal numbers, + * with rounding. + */ + const divideDecimalRound = (x, y) => { + let result = x.mul(toUnit(10)).div(y); + if (result.mod(toBN(10)).gte(toBN(5))) { + result = result.add(toBN(10)); + } + return result.div(toBN(10)); + }; + + /* + * Exponentiation by squares of x^n, interpreting them as fixed point decimal numbers. + */ + const powerToDecimal = (x, n, unit = UNIT) => { + let xBN = BN.isBN(x) ? x : new BN(x); + let temp = unit; + while (n > 0) { + if (n % 2 !== 0) { + temp = temp.mul(xBN).div(unit); + } + xBN = xBN.mul(xBN).div(unit); + n = parseInt(n / 2); + } + return temp; + }; + + /** + * Convenience method to assert that an event matches a shape + * @param actualEventOrTransaction The transaction receipt, or event as returned in the event logs from web3 + * @param expectedEvent The event name you expect + * @param expectedArgs The args you expect in object notation, e.g. { newOracle: '0x...', updatedAt: '...' } + */ + const assertEventEqual = (actualEventOrTransaction, expectedEvent, expectedArgs) => { + // If they pass in a whole transaction we need to extract the first log, otherwise we already have what we need + const event = Array.isArray(actualEventOrTransaction.logs) + ? actualEventOrTransaction.logs[0] + : actualEventOrTransaction; + + if (!event) { + assert.fail(new Error("No event was generated from this transaction")); + } + + // Assert the names are the same. + assert.strictEqual(event.event, expectedEvent); + + assertDeepEqual(event.args, expectedArgs); + // Note: this means that if you don't assert args they'll pass regardless. + // Ensure you pass in all the args you need to assert on. + }; + + /** + * Converts a hex string of bytes into a UTF8 string with \0 characters (from padding) removed + */ + const bytesToString = bytes => { + const result = hexToAscii(bytes); + return result.replace(/\0/g, ""); + }; + + const assertEventsEqual = (transaction, ...expectedEventsAndArgs) => { + if (expectedEventsAndArgs.length % 2 > 0) + throw new Error("Please call assert.eventsEqual with names and args as pairs."); + if (expectedEventsAndArgs.length <= 2) + throw new Error("Expected events and args can be called with just assert.eventEqual as there's only one event."); + + for (let i = 0; i < expectedEventsAndArgs.length; i += 2) { + const log = transaction.logs[Math.floor(i / 2)]; + + assert.strictEqual(log.event, expectedEventsAndArgs[i], "Event name mismatch"); + assertDeepEqual(log.args, expectedEventsAndArgs[i + 1], "Event args mismatch"); + } + }; + + /** + * Convenience method to assert that two BN.js instances are equal. + * @param actualBN The BN.js instance you received + * @param expectedBN The BN.js amount you expected to receive + * @param context The description to log if we fail the assertion + */ + const assertBNEqual = (actualBN, expectedBN, context) => { + assert.strictEqual(actualBN.toString(), expectedBN.toString(), context); + }; + + /** + * Convenience method to assert that two BN.js instances are NOT equal. + * @param actualBN The BN.js instance you received + * @param expectedBN The BN.js amount you expected NOT to receive + * @param context The description to log if we fail the assertion + */ + const assertBNNotEqual = (actualBN, expectedBN) => { + assert.notStrictEqual(actualBN.toString(), expectedBN.toString(), context); + }; + + /** + * Convenience method to assert that two BN.js instances are within 100 units of each other. + * @param actualBN The BN.js instance you received + * @param expectedBN The BN.js amount you expected to receive, allowing a variance of +/- 100 units + */ + const assertBNClose = (actualBN, expectedBN, varianceParam = "10") => { + const actual = BN.isBN(actualBN) ? actualBN : new BN(actualBN.toString()); + const expected = BN.isBN(expectedBN) ? expectedBN : new BN(expectedBN.toString()); + const variance = BN.isBN(varianceParam) ? varianceParam : new BN(varianceParam.toString()); + assert.ok(actual.gte(expected.sub(variance)), `${actual} !~= ${expected} (maxVariance ${variance.toString()})`); + assert.ok(actual.lte(expected.add(variance)), `${actual} !~= ${expected} (maxVariance ${variance.toString()})`); + }; + + /** + * Convenience method to assert that the value of left operand is greater than then value of the right operand + * @param aBN The left operand BN.js instance + * @param bBN The right operand BN.js instance + */ + const assertBNGreaterThan = (aBN, bBN) => { + assert.ok(aBN.gt(bBN), `${aBN.toString()} is not greater than ${bBN.toString()}`); + }; + + /** + * Convenience method to assert that the value of left operand is greater than or equal then value of the right operand + * @param aBN The left operand BN.js instance + * @param bBN The right operand BN.js instance + */ + const assertBNGreaterEqualThan = (aBN, bBN) => { + assert.ok(aBN.gte(bBN), `${aBN.toString()} is not greater than or equal to ${bBN.toString()}`); + }; + + /** + * Convenience method to assert that the value of left operand is less than then value of the right operand + * @param aBN The left operand BN.js instance + * @param bBN The right operand BN.js instance + */ + const assertBNLessThan = (aBN, bBN) => { + assert.ok(aBN.lt(bBN), `${aBN.toString()} is not less than ${bBN.toString()}`); + }; + + /** + * Convenience method to assert that the value of left operand is less than then value of the right operand + * @param aBN The left operand BN.js instance + * @param bBN The right operand BN.js instance + */ + const assertBNLessEqualThan = (aBN, bBN) => { + assert.ok(aBN.lte(bBN), `${aBN.toString()} is not less than or equal to ${bBN.toString()}`); + }; + + /** + * Convenience method to assert that two objects or arrays which contain nested BN.js instances are equal. + * @param actual What you received + * @param expected The shape you expected + */ + const assertDeepEqual = (actual, expected, context) => { + // Check if it's a value type we can assert on straight away. + if (BN.isBN(actual) || BN.isBN(expected)) { + assertBNEqual(actual, expected, context); + } else if ( + typeof expected === "string" || + typeof actual === "string" || + typeof expected === "number" || + typeof actual === "number" || + typeof expected === "boolean" || + typeof actual === "boolean" + ) { + assert.strictEqual(actual, expected, context); + } + // Otherwise dig through the deeper object and recurse + else if (Array.isArray(expected)) { + // check lengths + let len = actual.length; + if (len === undefined) { + // If `actual` is not a real array we'll try to interpret the keys of it + // as if it secretly wants to be one. + // We take the keys that are integers as the array part, and get the `length` of that. + // This is because this method is used to check event args or view result structs + // that are shaped like {0: bla, 1: foo, blaName: bla, fooName: foo}. FML-JS + const intLike = Object.keys(actual).filter(k => k.match(/^\d+$/g) !== null); + len = intLike.length; + } + assert.strictEqual(len, expected.length, `array length`); + // check elements + for (let i = 0; i < expected.length; i++) { + assertDeepEqual(actual[i], expected[i], `(array index: ${i}) `); + } + } else { + for (const key of Object.keys(expected)) { + assertDeepEqual(actual[key], expected[key], `(key: ${key}) `); + } + } + }; + + /** + * Convenience method to assert that an amount of ether (or other 10^18 number) was received from a contract. + * @param actualWei The value retrieved from a smart contract or wallet in wei + * @param expectedAmount The amount you expect e.g. '1' + * @param expectedUnit The unit you expect e.g. 'gwei'. Defaults to 'ether' + */ + const assertUnitEqual = (actualWei, expectedAmount, expectedUnit = "ether") => { + assertBNEqual(actualWei, toWei(expectedAmount, expectedUnit)); + }; + + /** + * Convenience method to assert that an amount of ether (or other 10^18 number) was NOT received from a contract. + * @param actualWei The value retrieved from a smart contract or wallet in wei + * @param expectedAmount The amount you expect NOT to be equal to e.g. '1' + * @param expectedUnit The unit you expect e.g. 'gwei'. Defaults to 'ether' + */ + const assertUnitNotEqual = (actualWei, expectedAmount, expectedUnit = "ether") => { + assertBNNotEqual(actualWei, toWei(expectedAmount, expectedUnit)); + }; + + /** + * Convenience method to assert that the return of the given block when invoked or promise causes a + * revert to occur, with an optional revert message. + * @param blockOrPromise The JS block (i.e. function that when invoked returns a promise) or a promise itself + * @param reason Optional reason string to search for in revert message + */ + const assertRevert = async (blockOrPromise, reason) => { + let errorCaught = false; + try { + const result = typeof blockOrPromise === "function" ? blockOrPromise() : blockOrPromise; + await result; + } catch (error) { + assert.include(error.message, "revert"); + if (reason) { + assert.include(error.message, reason); + } + errorCaught = true; + } + + assert.strictEqual(errorCaught, true, "Operation did not revert as expected"); + }; + + const assertInvalidOpcode = async blockOrPromise => { + let errorCaught = false; + try { + const result = typeof blockOrPromise === "function" ? blockOrPromise() : blockOrPromise; + await result; + } catch (error) { + assert.include(error.message, "invalid opcode"); + errorCaught = true; + } + + assert.strictEqual(errorCaught, true, "Operation did not cause an invalid opcode error as expected"); + }; + + /** + * Gets the ETH balance for the account address + * @param account Ethereum wallet address + */ + const getEthBalance = account => web3.eth.getBalance(account); + + const loadLocalUsers = () => { + return normalizeHardhatNetworkAccountsConfig(accounts).map(({ privateKey }) => ({ + private: privateKey, + public: web3.eth.accounts.privateKeyToAccount(privateKey).address + })); + }; + + const isCompileRequired = () => { + // get last modified sol file + const latestSolTimestamp = getLatestSolTimestamp(CONTRACTS_FOLDER); + + // get last build + const { earliestCompiledTimestamp } = loadCompiledFiles({ buildPath }); + + return latestSolTimestamp > earliestCompiledTimestamp; + }; + + // create a factory to deploy mock price aggregators + const createMockAggregatorFactory = async account => { + const { abi, bytecode } = getCompiledArtifacts("MockAggregatorV2V3"); + return new ethers.ContractFactory(abi, bytecode, account); + }; + + // load artifacts needed for contract instances + const getCompiledArtifacts = contract => { + const { compiled } = loadCompiledFiles({ buildPath }); + const { + abi, + evm: { + bytecode: { object: bytecode } + } + } = compiled[contract]; + return { abi, bytecode }; + }; + + const setupProvider = ({ providerUrl, privateKey, publicKey }) => { + const provider = new ethers.providers.JsonRpcProvider(providerUrl); + + let wallet; + if (publicKey) { + wallet = provider.getSigner(publicKey); + wallet.address = publicKey; + } else { + wallet = new ethers.Wallet(privateKey || ethers.Wallet.createRandom().privateKey, provider); + } + + return { + provider, + wallet: wallet || undefined + }; + }; + + const getContract = ({ + contract, + source = contract, + network = "mainnet", + useOvm = false, + deploymentPath = undefined, + wallet, + provider + }) => { + const target = getTarget({ contract, deploymentPath, fs, network, path, useOvm }); + const sourceData = getSource({ + contract: source, + deploymentPath, + fs, + network, + path, + useOvm + }); + + return new ethers.Contract(target.address, sourceData.abi, wallet || provider); + }; + + return { + assertBNClose, + assertBNEqual, + assertBNGreaterEqualThan, + assertBNGreaterThan, + assertBNLessEqualThan, + assertBNLessThan, + assertBNNotEqual, + assertDeepEqual, + assertEventEqual, + assertEventsEqual, + assertInvalidOpcode, + + assertRevert, + assertUnitEqual, + assertUnitNotEqual, + + bytesToString, + createMockAggregatorFactory, + + currentTime, + divideDecimal, + divideDecimalRound, + fastForward, + fastForwardTo, + fromPreciseUnit, + fromUnit, + getCompiledArtifacts, + getContract, + getEthBalance, + isCompileRequired, + loadLocalUsers, + mineBlock, + multiplyDecimal, + + multiplyDecimalRound, + powerToDecimal, + + restoreSnapshot, + setupProvider, + takeSnapshot, + toBN, + + toPreciseUnit, + toUnit + }; +}; diff --git a/packages/zevm-app-contracts/test/test.helpers.ts b/packages/zevm-app-contracts/test/test.helpers.ts new file mode 100644 index 00000000..0bee3648 --- /dev/null +++ b/packages/zevm-app-contracts/test/test.helpers.ts @@ -0,0 +1,71 @@ +import { MaxUint256 } from "@ethersproject/constants"; +import { parseUnits } from "@ethersproject/units"; +import { SignerWithAddress } from "@nomiclabs/hardhat-ethers/signers"; +import { ethers } from "hardhat"; + +import { + TestSystemContract, + TestSystemContract__factory, + TestZRC20, + TestZRC20__factory, + UniswapV2Router02__factory +} from "../typechain-types"; + +const addZetaEthLiquidity = async (signer: SignerWithAddress, token: TestZRC20, uniswapRouterAddr: string) => { + const block = await ethers.provider.getBlock("latest"); + + const tx1 = await token.approve(uniswapRouterAddr, MaxUint256); + await tx1.wait(); + + const uniswapRouterFork = UniswapV2Router02__factory.connect(uniswapRouterAddr, signer); + + const tx2 = await uniswapRouterFork.addLiquidityETH( + token.address, + parseUnits("2000"), + 0, + 0, + signer.address, + block.timestamp + 360, + { value: parseUnits("1000") } + ); + await tx2.wait(); +}; + +interface EvmSetupResult { + ZRC20Contracts: TestZRC20[]; + systemContract: TestSystemContract; +} + +export const evmSetup = async ( + wGasToken: string, + uniswapFactoryAddr: string, + uniswapRouterAddr: string +): Promise => { + const [signer] = await ethers.getSigners(); + + const ZRC20Factory = (await ethers.getContractFactory("TestZRC20")) as TestZRC20__factory; + + const token1Contract = (await ZRC20Factory.deploy(parseUnits("1000000"), "tBNB", "tBNB")) as TestZRC20; + const token2Contract = (await ZRC20Factory.deploy(parseUnits("1000000"), "gETH", "gETH")) as TestZRC20; + const token3Contract = (await ZRC20Factory.deploy(parseUnits("1000000"), "tMATIC", "tMATIC")) as TestZRC20; + + const ZRC20Contracts = [token1Contract, token2Contract, token3Contract]; + + const SystemContractFactory = (await ethers.getContractFactory("TestSystemContract")) as TestSystemContract__factory; + + const systemContract = (await SystemContractFactory.deploy( + wGasToken, + uniswapFactoryAddr, + uniswapRouterAddr + )) as TestSystemContract; + + await systemContract.setGasCoinZRC20(97, ZRC20Contracts[0].address); + await systemContract.setGasCoinZRC20(5, ZRC20Contracts[1].address); + await systemContract.setGasCoinZRC20(80001, ZRC20Contracts[2].address); + + await addZetaEthLiquidity(signer, ZRC20Contracts[0], uniswapRouterAddr); + await addZetaEthLiquidity(signer, ZRC20Contracts[1], uniswapRouterAddr); + await addZetaEthLiquidity(signer, ZRC20Contracts[2], uniswapRouterAddr); + + return { ZRC20Contracts, systemContract }; +}; diff --git a/packages/zevm-app-contracts/tsconfig.json b/packages/zevm-app-contracts/tsconfig.json new file mode 100644 index 00000000..355cfda5 --- /dev/null +++ b/packages/zevm-app-contracts/tsconfig.json @@ -0,0 +1,14 @@ +{ + "extends": "../../tsconfig.json", + "include": ["./scripts", "./lib", "./test", "./tests", "./typechain", "./**/*.json", "typechain-types"], + "exclude": ["artifacts", "cache"], + "files": ["./hardhat.config.ts"], + "compilerOptions": { + "baseUrl": ".", + "paths": { + "@zetachain/addresses": ["../addresses/src/index"], + "@zetachain/addresses/*": ["../addresses/src/*"], + "@zetachain/interfaces": ["../interfaces/src/index"] + } + } +} diff --git a/packages/zevm-example-contracts/scripts/zeta-swap/get-system-data.ts b/packages/zevm-example-contracts/scripts/zeta-swap/get-system-data.ts index 4074f063..42a71b7b 100644 --- a/packages/zevm-example-contracts/scripts/zeta-swap/get-system-data.ts +++ b/packages/zevm-example-contracts/scripts/zeta-swap/get-system-data.ts @@ -9,6 +9,8 @@ import { SYSTEM_CONTRACT } from "../systemConstants"; const getZRC20Address = async (systemContract: SystemContract, network: NetworkName) => { const tokenAddress = await systemContract.gasCoinZRC20ByChainId(getChainId(network)); console.log(`${getGasSymbolByNetwork(network)}`, tokenAddress); + const tokenAddressLP = await systemContract.gasZetaPoolByChainId(getChainId(network)); + console.log(`${getGasSymbolByNetwork(network)} LP`, tokenAddressLP); }; async function main() { diff --git a/yarn.lock b/yarn.lock index 6a83c891..cc413a84 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1737,6 +1737,13 @@ __metadata: languageName: node linkType: hard +"@openzeppelin/contracts@npm:4.7.3": + version: 4.7.3 + resolution: "@openzeppelin/contracts@npm:4.7.3" + checksum: 18382fcacf7cfd652f5dd0e70c08f08ea74eaa8ff11e9f9850639ada70198ae01a3f9493d89a52d724f2db394e9616bf6258017804612ba273167cf657fbb073 + languageName: node + linkType: hard + "@openzeppelin/contracts@npm:^4.8.3": version: 4.8.3 resolution: "@openzeppelin/contracts@npm:4.8.3" @@ -2734,12 +2741,6 @@ __metadata: languageName: unknown linkType: soft -"@zetachain/interfaces-deprecated@workspace:packages/interfaces-deprecated": - version: 0.0.0-use.local - resolution: "@zetachain/interfaces-deprecated@workspace:packages/interfaces-deprecated" - languageName: unknown - linkType: soft - "@zetachain/protocol-contracts-deprecated@workspace:^, @zetachain/protocol-contracts-deprecated@workspace:packages/protocol-contracts-deprecated": version: 0.0.0-use.local resolution: "@zetachain/protocol-contracts-deprecated@workspace:packages/protocol-contracts-deprecated" @@ -2786,6 +2787,22 @@ __metadata: languageName: unknown linkType: soft +"@zetachain/zevm-app-contracts@workspace:packages/zevm-app-contracts": + version: 0.0.0-use.local + resolution: "@zetachain/zevm-app-contracts@workspace:packages/zevm-app-contracts" + dependencies: + "@openzeppelin/contracts": 4.7.3 + "@uniswap/v2-periphery": 1.1.0-beta.0 + "@zetachain/addresses": "workspace:^" + "@zetachain/addresses-tools": "workspace:^" + "@zetachain/protocol-contracts": ^0.0.6 + ethers: 5.6.8 + hardhat-gas-reporter: ^1.0.8 + solidity-coverage: ^0.7.20 + tsconfig-paths: ^3.14.1 + languageName: unknown + linkType: soft + "@zetachain/zevm-example-contracts@workspace:packages/zevm-example-contracts": version: 0.0.0-use.local resolution: "@zetachain/zevm-example-contracts@workspace:packages/zevm-example-contracts" From 9aebe382aa6a36b2e90e311a39f401d9ef3e063b Mon Sep 17 00:00:00 2001 From: Andres Martin Aiello <50411235+andresaiello@users.noreply.github.com> Date: Mon, 22 May 2023 11:45:18 -0300 Subject: [PATCH 074/115] Fix ZRC20 protocol bug (#94) * Fix ZRC20 protocol bug * rebase fix --- .../contracts/zeta-swap/ZetaSwap.sol | 119 +++--------------- .../zeta-swap/ZetaSwapBtcInbound.sol | 49 ++++---- .../zeta-swap/ZetaSwapBtcInboundV2.sol | 33 ----- .../contracts/zeta-swap/ZetaSwapV2.sol | 32 ----- .../scripts/zeta-swap/deploy.ts | 32 +---- .../zevm-example-contracts/test/Swap.spec.ts | 55 +------- 6 files changed, 44 insertions(+), 276 deletions(-) delete mode 100644 packages/zevm-example-contracts/contracts/zeta-swap/ZetaSwapBtcInboundV2.sol delete mode 100644 packages/zevm-example-contracts/contracts/zeta-swap/ZetaSwapV2.sol diff --git a/packages/zevm-example-contracts/contracts/zeta-swap/ZetaSwap.sol b/packages/zevm-example-contracts/contracts/zeta-swap/ZetaSwap.sol index a7dc4b3a..feab5e7c 100644 --- a/packages/zevm-example-contracts/contracts/zeta-swap/ZetaSwap.sol +++ b/packages/zevm-example-contracts/contracts/zeta-swap/ZetaSwap.sol @@ -1,112 +1,16 @@ // SPDX-License-Identifier: MIT pragma solidity 0.8.7; -import "@uniswap/v2-periphery/contracts/interfaces/IUniswapV2Router02.sol"; -import "@uniswap/v2-periphery/contracts/interfaces/IUniswapV2Router01.sol"; - +import "@zetachain/protocol-contracts/contracts/zevm/SystemContract.sol"; import "@zetachain/protocol-contracts/contracts/zevm/interfaces/zContract.sol"; -import "@zetachain/protocol-contracts/contracts/zevm/interfaces/IZRC20.sol"; - -interface ZetaSwapErrors { - error WrongGasContract(); - - error NotEnoughToPayGasFee(); - - error CantBeIdenticalAddresses(); - - error CantBeZeroAddress(); -} - -contract ZetaSwap is zContract, ZetaSwapErrors { - uint16 internal constant MAX_DEADLINE = 200; - address public immutable zetaToken; - address public immutable uniswapV2Factory; - address public immutable uniswapV2Router; +import "../shared/SwapHelperLib.sol"; - constructor(address zetaToken_, address uniswapV2Factory_, address uniswapV2Router_) { - if (zetaToken_ == address(0) || uniswapV2Factory_ == address(0) || uniswapV2Router_ == address(0)) - revert CantBeZeroAddress(); - zetaToken = zetaToken_; - uniswapV2Factory = uniswapV2Factory_; - uniswapV2Router = uniswapV2Router_; - } - - // returns sorted token addresses, used to handle return values from pairs sorted in this order - function sortTokens(address tokenA, address tokenB) internal pure returns (address token0, address token1) { - if (tokenA == tokenB) revert CantBeIdenticalAddresses(); - (token0, token1) = tokenA < tokenB ? (tokenA, tokenB) : (tokenB, tokenA); - if (token0 == address(0)) revert CantBeZeroAddress(); - } +contract ZetaSwap is zContract { + SystemContract public immutable systemContract; - // calculates the CREATE2 address for a pair without making any external calls - function uniswapv2PairFor(address factory, address tokenA, address tokenB) public pure returns (address pair) { - (address token0, address token1) = sortTokens(tokenA, tokenB); - pair = address( - uint160( - uint256( - keccak256( - abi.encodePacked( - hex"ff", - factory, - keccak256(abi.encodePacked(token0, token1)), - hex"96e8ac4277198ff8b6f785478aa9a39f403cb768dd02cbee326c3e7da348845f" // init code hash - ) - ) - ) - ) - ); - } - - function encode(address zrc20, address recipient, uint256 minAmountOut) public pure returns (bytes memory) { - return abi.encode(zrc20, recipient, minAmountOut); - } - - function _doWithdrawal(address targetZRC20, uint256 amount, bytes32 receipient) private { - (address gasZRC20, uint256 gasFee) = IZRC20(targetZRC20).withdrawGasFee(); - - if (gasZRC20 != targetZRC20) revert WrongGasContract(); - if (gasFee >= amount) revert NotEnoughToPayGasFee(); - - IZRC20(targetZRC20).approve(targetZRC20, gasFee); - IZRC20(targetZRC20).withdraw(abi.encodePacked(receipient), amount - gasFee); - } - - function _existsPairPool(address zrc20A, address zrc20B) private view returns (bool) { - address uniswapPool = uniswapv2PairFor(uniswapV2Factory, zrc20A, zrc20B); - return IZRC20(zrc20A).balanceOf(uniswapPool) > 0 && IZRC20(zrc20B).balanceOf(uniswapPool) > 0; - } - - function _doSwap( - address zrc20, - uint256 amount, - address targetZRC20, - bytes32 receipient, - uint256 minAmountOut - ) internal { - bool existsPairPool = _existsPairPool(zrc20, targetZRC20); - - address[] memory path; - if (existsPairPool) { - path = new address[](2); - path[0] = zrc20; - path[1] = targetZRC20; - } else { - path = new address[](3); - path[0] = zrc20; - path[1] = zetaToken; - path[2] = targetZRC20; - } - - IZRC20(zrc20).approve(address(uniswapV2Router), amount); - uint256[] memory amounts = IUniswapV2Router01(uniswapV2Router).swapExactTokensForTokens( - amount, - minAmountOut, - path, - address(this), - block.timestamp + MAX_DEADLINE - ); - _doWithdrawal(targetZRC20, amounts[path.length - 1], receipient); + constructor(address systemContractAddress) { + systemContract = SystemContract(systemContractAddress); } function onCrossChainCall(address zrc20, uint256 amount, bytes calldata message) external virtual override { @@ -114,6 +18,15 @@ contract ZetaSwap is zContract, ZetaSwapErrors { message, (address, bytes32, uint256) ); - _doSwap(zrc20, amount, targetZRC20, receipient, minAmountOut); + uint256 outputAmount = SwapHelperLib._doSwap( + systemContract.wZetaContractAddress(), + systemContract.uniswapv2FactoryAddress(), + systemContract.uniswapv2Router02Address(), + zrc20, + amount, + targetZRC20, + minAmountOut + ); + SwapHelperLib._doWithdrawal(targetZRC20, outputAmount, receipient); } } diff --git a/packages/zevm-example-contracts/contracts/zeta-swap/ZetaSwapBtcInbound.sol b/packages/zevm-example-contracts/contracts/zeta-swap/ZetaSwapBtcInbound.sol index 22ed1797..3a8e7230 100644 --- a/packages/zevm-example-contracts/contracts/zeta-swap/ZetaSwapBtcInbound.sol +++ b/packages/zevm-example-contracts/contracts/zeta-swap/ZetaSwapBtcInbound.sol @@ -1,40 +1,33 @@ // SPDX-License-Identifier: MIT pragma solidity 0.8.7; -import "./ZetaSwap.sol"; import "@zetachain/protocol-contracts/contracts/zevm/SystemContract.sol"; +import "@zetachain/protocol-contracts/contracts/zevm/interfaces/zContract.sol"; -contract ZetaSwapBtcInbound is ZetaSwap { - address immutable systemContractAddress; +import "../shared/BytesHelperLib.sol"; +import "../shared/SwapHelperLib.sol"; - constructor( - address zetaToken_, - address uniswapV2Factory_, - address uniswapV2Router_, - address systemContractAddress_ - ) ZetaSwap(zetaToken_, uniswapV2Factory_, uniswapV2Router_) { - systemContractAddress = systemContractAddress_; - } - - function bytesToAddress(bytes calldata data, uint256 offset, uint256 size) private pure returns (address output) { - bytes memory b = data[offset:offset + size]; - assembly { - output := mload(add(b, size)) - } - } +contract ZetaSwapBtcInbound { + SystemContract public immutable systemContract; - function bytesToUint32(bytes calldata data, uint256 offset, uint256 size) private pure returns (uint32 output) { - bytes memory b = data[offset:offset + size]; - assembly { - output := mload(add(b, size)) - } + constructor(address systemContractAddress) { + systemContract = SystemContract(systemContractAddress); } - function onCrossChainCall(address zrc20, uint256 amount, bytes calldata message) external override { - address receipient = bytesToAddress(message, 0, 20); - uint32 targetZRC20ChainId = bytesToUint32(message, 20, 4); - address targetZRC20 = SystemContract(systemContractAddress).gasCoinZRC20ByChainId(targetZRC20ChainId); + function onCrossChainCall(address zrc20, uint256 amount, bytes calldata message) external { + address receipient = BytesHelperLib.bytesToAddress(message, 0); + uint32 targetZRC20ChainId = BytesHelperLib.bytesToUint32(message, 20); + address targetZRC20 = systemContract.gasCoinZRC20ByChainId(targetZRC20ChainId); - _doSwap(zrc20, amount, targetZRC20, bytes32(uint256(uint160(receipient))), 0); + uint256 outputAmount = SwapHelperLib._doSwap( + systemContract.wZetaContractAddress(), + systemContract.uniswapv2FactoryAddress(), + systemContract.uniswapv2Router02Address(), + zrc20, + amount, + targetZRC20, + 0 + ); + SwapHelperLib._doWithdrawal(targetZRC20, outputAmount, BytesHelperLib.addressToBytes(receipient)); } } diff --git a/packages/zevm-example-contracts/contracts/zeta-swap/ZetaSwapBtcInboundV2.sol b/packages/zevm-example-contracts/contracts/zeta-swap/ZetaSwapBtcInboundV2.sol deleted file mode 100644 index 9606d0e1..00000000 --- a/packages/zevm-example-contracts/contracts/zeta-swap/ZetaSwapBtcInboundV2.sol +++ /dev/null @@ -1,33 +0,0 @@ -// SPDX-License-Identifier: MIT -pragma solidity 0.8.7; - -import "@zetachain/protocol-contracts/contracts/zevm/SystemContract.sol"; -import "@zetachain/protocol-contracts/contracts/zevm/interfaces/zContract.sol"; - -import "../shared/BytesHelperLib.sol"; -import "../shared/SwapHelperLib.sol"; - -contract ZetaSwapBtcInboundV2 { - SystemContract public immutable systemContract; - - constructor(address systemContractAddress) { - systemContract = SystemContract(systemContractAddress); - } - - function onCrossChainCall(address zrc20, uint256 amount, bytes calldata message) external { - address receipient = BytesHelperLib.bytesToAddress(message, 0); - uint32 targetZRC20ChainId = BytesHelperLib.bytesToUint32(message, 20); - address targetZRC20 = systemContract.gasCoinZRC20ByChainId(targetZRC20ChainId); - - uint256 outputAmount = SwapHelperLib._doSwap( - systemContract.wZetaContractAddress(), - systemContract.uniswapv2FactoryAddress(), - systemContract.uniswapv2Router02Address(), - zrc20, - amount, - targetZRC20, - 0 - ); - SwapHelperLib._doWithdrawal(targetZRC20, outputAmount, BytesHelperLib.addressToBytes(receipient)); - } -} diff --git a/packages/zevm-example-contracts/contracts/zeta-swap/ZetaSwapV2.sol b/packages/zevm-example-contracts/contracts/zeta-swap/ZetaSwapV2.sol deleted file mode 100644 index e521e577..00000000 --- a/packages/zevm-example-contracts/contracts/zeta-swap/ZetaSwapV2.sol +++ /dev/null @@ -1,32 +0,0 @@ -// SPDX-License-Identifier: MIT -pragma solidity 0.8.7; - -import "@zetachain/protocol-contracts/contracts/zevm/SystemContract.sol"; -import "@zetachain/protocol-contracts/contracts/zevm/interfaces/zContract.sol"; - -import "../shared/SwapHelperLib.sol"; - -contract ZetaSwapV2 is zContract { - SystemContract public immutable systemContract; - - constructor(address systemContractAddress) { - systemContract = SystemContract(systemContractAddress); - } - - function onCrossChainCall(address zrc20, uint256 amount, bytes calldata message) external virtual override { - (address targetZRC20, bytes32 receipient, uint256 minAmountOut) = abi.decode( - message, - (address, bytes32, uint256) - ); - uint256 outputAmount = SwapHelperLib._doSwap( - systemContract.wZetaContractAddress(), - systemContract.uniswapv2FactoryAddress(), - systemContract.uniswapv2Router02Address(), - zrc20, - amount, - targetZRC20, - minAmountOut - ); - SwapHelperLib._doWithdrawal(targetZRC20, outputAmount, receipient); - } -} diff --git a/packages/zevm-example-contracts/scripts/zeta-swap/deploy.ts b/packages/zevm-example-contracts/scripts/zeta-swap/deploy.ts index 565caa3b..3b88997e 100644 --- a/packages/zevm-example-contracts/scripts/zeta-swap/deploy.ts +++ b/packages/zevm-example-contracts/scripts/zeta-swap/deploy.ts @@ -1,4 +1,3 @@ -import { getAddress } from "@zetachain/addresses"; import { saveAddress } from "@zetachain/addresses-tools"; import { ethers } from "hardhat"; @@ -8,42 +7,19 @@ import { SYSTEM_CONTRACT } from "../systemConstants"; const main = async () => { console.log(`Deploying ZetaSwap...`); - const WZETA_ADDRESS = getAddress({ - address: "weth9", - networkName: "athens", - zetaNetwork: "athens" - }); - - const UNISWAP_FACTORY_ADDRESS = getAddress({ - address: "uniswapV2Factory", - networkName: "athens", - zetaNetwork: "athens" - }); - - const UNISWAP_ROUTER_ADDRESS = getAddress({ - address: "uniswapV2Router02", - networkName: "athens", - zetaNetwork: "athens" - }); - const Factory = (await ethers.getContractFactory("ZetaSwap")) as ZetaSwap__factory; - const contract = (await Factory.deploy(WZETA_ADDRESS, UNISWAP_FACTORY_ADDRESS, UNISWAP_ROUTER_ADDRESS)) as ZetaSwap; + const contract = (await Factory.deploy(SYSTEM_CONTRACT)) as ZetaSwap; await contract.deployed(); console.log("Deployed ZetaSwap. Address:", contract.address); - saveAddress("zetaSwap", contract.address); + // saveAddress("zetaSwap", contract.address); const FactoryBTC = (await ethers.getContractFactory("ZetaSwapBtcInbound")) as ZetaSwapBtcInbound__factory; - const contractBTC = (await FactoryBTC.deploy( - WZETA_ADDRESS, - UNISWAP_FACTORY_ADDRESS, - UNISWAP_ROUTER_ADDRESS, - SYSTEM_CONTRACT - )) as ZetaSwapBtcInbound; + const contractBTC = (await FactoryBTC.deploy(SYSTEM_CONTRACT)) as ZetaSwapBtcInbound; await contractBTC.deployed(); console.log("Deployed zetaSwapBtcInbound. Address:", contractBTC.address); - saveAddress("zetaSwapBtcInbound", contractBTC.address); + // saveAddress("zetaSwapBtcInbound", contractBTC.address); }; main().catch(error => { diff --git a/packages/zevm-example-contracts/test/Swap.spec.ts b/packages/zevm-example-contracts/test/Swap.spec.ts index 3f9111d9..c8a497a2 100644 --- a/packages/zevm-example-contracts/test/Swap.spec.ts +++ b/packages/zevm-example-contracts/test/Swap.spec.ts @@ -12,19 +12,13 @@ import { ZetaSwap, ZetaSwap__factory, ZetaSwapBtcInbound, - ZetaSwapBtcInbound__factory, - ZetaSwapBtcInboundV2, - ZetaSwapBtcInboundV2__factory, - ZetaSwapV2, - ZetaSwapV2__factory + ZetaSwapBtcInbound__factory } from "../typechain-types"; import { evmSetup } from "./test.helpers"; describe("ZetaSwap tests", () => { let zetaSwapContract: ZetaSwap; - let zetaSwapV2Contract: ZetaSwapV2; let zetaSwapBTCContract: ZetaSwapBtcInbound; - let zetaSwapBTCV2Contract: ZetaSwapBtcInboundV2; let ZRC20Contracts: TestZRC20[]; let systemContract: TestSystemContract; @@ -60,25 +54,12 @@ describe("ZetaSwap tests", () => { systemContract = evmSetupResult.systemContract; const FactorySwap = (await ethers.getContractFactory("ZetaSwap")) as ZetaSwap__factory; - zetaSwapContract = (await FactorySwap.deploy(wGasToken, uniswapFactoryAddr, uniswapRouterAddr)) as ZetaSwap; + zetaSwapContract = (await FactorySwap.deploy(systemContract.address)) as ZetaSwap; await zetaSwapContract.deployed(); - const FactorySwapV2 = (await ethers.getContractFactory("ZetaSwapV2")) as ZetaSwapV2__factory; - zetaSwapV2Contract = (await FactorySwapV2.deploy(systemContract.address)) as ZetaSwapV2; - await zetaSwapV2Contract.deployed(); - const FactoryBTC = (await ethers.getContractFactory("ZetaSwapBtcInbound")) as ZetaSwapBtcInbound__factory; - zetaSwapBTCContract = (await FactoryBTC.deploy( - wGasToken, - uniswapFactoryAddr, - uniswapRouterAddr, - systemContract.address - )) as ZetaSwapBtcInbound; + zetaSwapBTCContract = (await FactoryBTC.deploy(systemContract.address)) as ZetaSwapBtcInbound; await zetaSwapBTCContract.deployed(); - - const FactoryBTCV2 = (await ethers.getContractFactory("ZetaSwapBtcInboundV2")) as ZetaSwapBtcInboundV2__factory; - zetaSwapBTCV2Contract = (await FactoryBTCV2.deploy(systemContract.address)) as ZetaSwapBtcInboundV2; - await zetaSwapBTCV2Contract.deployed(); }); describe("zetaSwap", () => { @@ -91,21 +72,6 @@ describe("ZetaSwap tests", () => { const params = getSwapParams(deployer.address, ZRC20Contracts[1].address, BigNumber.from(0)); await zetaSwapContract.onCrossChainCall(ZRC20Contracts[0].address, amount, params); - const endBalance = await ZRC20Contracts[1].balanceOf(deployer.address); - await expect(endBalance).to.be.gt(initBalance); - }); - }); - - describe("zetaSwapV2", () => { - it("Should do swap", async () => { - const amount = parseUnits("10"); - await ZRC20Contracts[0].transfer(zetaSwapV2Contract.address, amount); - - const initBalance = await ZRC20Contracts[1].balanceOf(deployer.address); - - const params = getSwapParams(deployer.address, ZRC20Contracts[1].address, BigNumber.from(0)); - await zetaSwapV2Contract.onCrossChainCall(ZRC20Contracts[0].address, amount, params); - const endBalance = await ZRC20Contracts[1].balanceOf(deployer.address); expect(endBalance).to.be.gt(initBalance); }); @@ -125,19 +91,4 @@ describe("ZetaSwap tests", () => { expect(endBalance).to.be.gt(initBalance); }); }); - - describe("zetaSwapBTCV2", () => { - it("Should do swap", async () => { - const amount = parseUnits("1"); - await ZRC20Contracts[0].transfer(zetaSwapBTCV2Contract.address, amount); - - const initBalance = await ZRC20Contracts[1].balanceOf(deployer.address); - - const params = getBitcoinTxMemoForTest(deployer.address, "5"); - await zetaSwapBTCV2Contract.onCrossChainCall(ZRC20Contracts[0].address, amount, params); - - const endBalance = await ZRC20Contracts[1].balanceOf(deployer.address); - expect(endBalance).to.be.gt(initBalance); - }); - }); }); From e5f3372d7f6b1d31f96d166b038431fe018835b9 Mon Sep 17 00:00:00 2001 From: Andres Martin Aiello <50411235+andresaiello@users.noreply.github.com> Date: Mon, 22 May 2023 12:48:09 -0300 Subject: [PATCH 075/115] Bump @openzeppelin/contracts from 4.7.3 to 4.8.3 (#96) --- packages/zevm-app-contracts/package.json | 2 +- yarn.lock | 11 ++--------- 2 files changed, 3 insertions(+), 10 deletions(-) diff --git a/packages/zevm-app-contracts/package.json b/packages/zevm-app-contracts/package.json index 3324315a..04233d8c 100644 --- a/packages/zevm-app-contracts/package.json +++ b/packages/zevm-app-contracts/package.json @@ -29,7 +29,7 @@ "tsconfig-paths": "^3.14.1" }, "dependencies": { - "@openzeppelin/contracts": "4.7.3", + "@openzeppelin/contracts": "4.8.3", "@uniswap/v2-periphery": "1.1.0-beta.0", "@zetachain/addresses": "workspace:^", "@zetachain/addresses-tools": "workspace:^", diff --git a/yarn.lock b/yarn.lock index cc413a84..60e7e649 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1737,14 +1737,7 @@ __metadata: languageName: node linkType: hard -"@openzeppelin/contracts@npm:4.7.3": - version: 4.7.3 - resolution: "@openzeppelin/contracts@npm:4.7.3" - checksum: 18382fcacf7cfd652f5dd0e70c08f08ea74eaa8ff11e9f9850639ada70198ae01a3f9493d89a52d724f2db394e9616bf6258017804612ba273167cf657fbb073 - languageName: node - linkType: hard - -"@openzeppelin/contracts@npm:^4.8.3": +"@openzeppelin/contracts@npm:4.8.3, @openzeppelin/contracts@npm:^4.8.3": version: 4.8.3 resolution: "@openzeppelin/contracts@npm:4.8.3" checksum: aea130d38d46840c5cbe3adbaa9a7ac645e4bd66ad3f3baf2fa78588c408d1a686170b3408c9e2e5e05530fba22ecdc00d7efb6b27852a8b29f91accbc0af255 @@ -2791,7 +2784,7 @@ __metadata: version: 0.0.0-use.local resolution: "@zetachain/zevm-app-contracts@workspace:packages/zevm-app-contracts" dependencies: - "@openzeppelin/contracts": 4.7.3 + "@openzeppelin/contracts": 4.8.3 "@uniswap/v2-periphery": 1.1.0-beta.0 "@zetachain/addresses": "workspace:^" "@zetachain/addresses-tools": "workspace:^" From 669aadad52661d514b698b13855f4b158e883805 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 22 May 2023 12:56:32 -0300 Subject: [PATCH 076/115] Bump http-cache-semantics from 4.1.0 to 4.1.1 (#67) Bumps [http-cache-semantics](https://github.com/kornelski/http-cache-semantics) from 4.1.0 to 4.1.1. - [Release notes](https://github.com/kornelski/http-cache-semantics/releases) - [Commits](https://github.com/kornelski/http-cache-semantics/compare/v4.1.0...v4.1.1) --- updated-dependencies: - dependency-name: http-cache-semantics dependency-type: indirect ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- yarn.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/yarn.lock b/yarn.lock index 60e7e649..01e05301 100644 --- a/yarn.lock +++ b/yarn.lock @@ -7203,9 +7203,9 @@ __metadata: linkType: hard "http-cache-semantics@npm:^4.0.0, http-cache-semantics@npm:^4.1.0": - version: 4.1.0 - resolution: "http-cache-semantics@npm:4.1.0" - checksum: 974de94a81c5474be07f269f9fd8383e92ebb5a448208223bfb39e172a9dbc26feff250192ecc23b9593b3f92098e010406b0f24bd4d588d631f80214648ed42 + version: 4.1.1 + resolution: "http-cache-semantics@npm:4.1.1" + checksum: 83ac0bc60b17a3a36f9953e7be55e5c8f41acc61b22583060e8dedc9dd5e3607c823a88d0926f9150e571f90946835c7fe150732801010845c72cd8bbff1a236 languageName: node linkType: hard From 71392a03427719b7aa121809066449bb8ca83bc2 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 22 May 2023 12:56:53 -0300 Subject: [PATCH 077/115] Bump decode-uri-component from 0.2.0 to 0.2.2 (#65) Bumps [decode-uri-component](https://github.com/SamVerschueren/decode-uri-component) from 0.2.0 to 0.2.2. - [Release notes](https://github.com/SamVerschueren/decode-uri-component/releases) - [Commits](https://github.com/SamVerschueren/decode-uri-component/compare/v0.2.0...v0.2.2) --- updated-dependencies: - dependency-name: decode-uri-component dependency-type: indirect ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- yarn.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/yarn.lock b/yarn.lock index 01e05301..78117ccc 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4584,9 +4584,9 @@ __metadata: linkType: hard "decode-uri-component@npm:^0.2.0": - version: 0.2.0 - resolution: "decode-uri-component@npm:0.2.0" - checksum: f3749344ab9305ffcfe4bfe300e2dbb61fc6359e2b736812100a3b1b6db0a5668cba31a05e4b45d4d63dbf1a18dfa354cd3ca5bb3ededddabb8cd293f4404f94 + version: 0.2.2 + resolution: "decode-uri-component@npm:0.2.2" + checksum: 95476a7d28f267292ce745eac3524a9079058bbb35767b76e3ee87d42e34cd0275d2eb19d9d08c3e167f97556e8a2872747f5e65cbebcac8b0c98d83e285f139 languageName: node linkType: hard From ae4b2bf1c1c018f1040e34801d2af8460e949acb Mon Sep 17 00:00:00 2001 From: Andres Martin Aiello <50411235+andresaiello@users.noreply.github.com> Date: Tue, 23 May 2023 10:51:41 -0300 Subject: [PATCH 078/115] Publish address 0.0.10 (#97) --- packages/addresses/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/addresses/package.json b/packages/addresses/package.json index e0260b71..14cb2b84 100644 --- a/packages/addresses/package.json +++ b/packages/addresses/package.json @@ -1,6 +1,6 @@ { "name": "@zetachain/addresses", - "version": "0.0.9", + "version": "0.0.10", "license": "MIT", "author": "zetachain", "publishConfig": { From e9e8e4e1fa1413091bcb8132d4c3c1b2c91f928c Mon Sep 17 00:00:00 2001 From: Andres Martin Aiello <50411235+andresaiello@users.noreply.github.com> Date: Wed, 24 May 2023 11:01:05 -0300 Subject: [PATCH 079/115] Remove ZetaTokenConsumerTrident from zetachain repo (#98) Remove ZetaTokenConsumerTrident to zetachain repo --- Dockerfile | 2 - .../MultiChainSwapTrident.strategy.sol | 2 +- packages/example-contracts/package.json | 3 +- .../.env.example | 18 -- .../.eslintrc.js | 23 -- .../protocol-contracts-deprecated/.npmignore | 20 -- .../protocol-contracts-deprecated/README.md | 10 - .../ZetaTokenConsumerTrident.strategy.sol | 202 ------------------ ...ridentConcentratedLiquidityPoolFactory.sol | 23 -- .../interfaces/TridentIPoolRouter.sol | 75 ------- .../contracts/testing/TestContracts.sol | 10 - .../hardhat.config.ts | 44 ---- .../package.json | 40 ---- .../tsconfig.json | 16 -- yarn.lock | 72 +------ 15 files changed, 13 insertions(+), 547 deletions(-) delete mode 100644 packages/protocol-contracts-deprecated/.env.example delete mode 100644 packages/protocol-contracts-deprecated/.eslintrc.js delete mode 100644 packages/protocol-contracts-deprecated/.npmignore delete mode 100644 packages/protocol-contracts-deprecated/README.md delete mode 100644 packages/protocol-contracts-deprecated/contracts/ZetaTokenConsumerTrident.strategy.sol delete mode 100644 packages/protocol-contracts-deprecated/contracts/interfaces/TridentConcentratedLiquidityPoolFactory.sol delete mode 100644 packages/protocol-contracts-deprecated/contracts/interfaces/TridentIPoolRouter.sol delete mode 100644 packages/protocol-contracts-deprecated/contracts/testing/TestContracts.sol delete mode 100644 packages/protocol-contracts-deprecated/hardhat.config.ts delete mode 100644 packages/protocol-contracts-deprecated/package.json delete mode 100644 packages/protocol-contracts-deprecated/tsconfig.json diff --git a/Dockerfile b/Dockerfile index 5b847e85..01784859 100644 --- a/Dockerfile +++ b/Dockerfile @@ -14,7 +14,6 @@ COPY packages/zevm-example-contracts/package.json ./packages/zevm-example-contra COPY packages/addresses/package.json packages/addresses/package.json COPY packages/example-contracts/package.json ./packages/example-contracts/package.json COPY packages/zeta-app-contracts/package.json ./packages/zeta-app-contracts/package.json -COPY packages/protocol-contracts-deprecated/package.json ./packages/protocol-contracts-deprecated/package.json RUN yarn install ; exit 0 COPY . ./ @@ -25,7 +24,6 @@ RUN yarn add solc@0.5.10 solc@0.6.6 solc@0.7.6 solc@0.8.7 RUN cd packages/example-contracts && npx hardhat compile && cd - RUN cd packages/zeta-app-contracts && npx hardhat compile && cd - RUN cd packages/zevm-example-contracts && npx hardhat compile && cd - -RUN cd packages/protocol-contracts-deprecated && npx hardhat compile && cd - WORKDIR /home/zetachain/ diff --git a/packages/example-contracts/contracts/multi-chain-swap/MultiChainSwapTrident.strategy.sol b/packages/example-contracts/contracts/multi-chain-swap/MultiChainSwapTrident.strategy.sol index edb46709..49c64171 100644 --- a/packages/example-contracts/contracts/multi-chain-swap/MultiChainSwapTrident.strategy.sol +++ b/packages/example-contracts/contracts/multi-chain-swap/MultiChainSwapTrident.strategy.sol @@ -3,7 +3,7 @@ pragma solidity 0.8.7; import "@openzeppelin/contracts/interfaces/IERC20.sol"; import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol"; -import "@zetachain/protocol-contracts-deprecated/contracts/ZetaTokenConsumerTrident.strategy.sol"; +import "@zetachain/protocol-contracts/contracts/evm/tools/ZetaTokenConsumerTrident.strategy.sol"; import "./MultiChainSwapErrors.sol"; import "./MultiChainSwap.sol"; diff --git a/packages/example-contracts/package.json b/packages/example-contracts/package.json index e0aeb91c..3f6b1d57 100644 --- a/packages/example-contracts/package.json +++ b/packages/example-contracts/package.json @@ -36,8 +36,7 @@ "@uniswap/v3-periphery": "1.1.0", "@zetachain/addresses": "workspace:^", "@zetachain/addresses-tools": "workspace:^", - "@zetachain/protocol-contracts": "^0.0.6", - "@zetachain/protocol-contracts-deprecated": "workspace:^", + "@zetachain/protocol-contracts": "^0.0.7", "ethers": "5.6.8" } } diff --git a/packages/protocol-contracts-deprecated/.env.example b/packages/protocol-contracts-deprecated/.env.example deleted file mode 100644 index fa720306..00000000 --- a/packages/protocol-contracts-deprecated/.env.example +++ /dev/null @@ -1,18 +0,0 @@ -ALCHEMY_API_KEY_MAINNET= -ALCHEMY_API_KEY_GOERLI= - -PRIVATE_KEY= - -TSS_PRIVATE_KEY= - -# ETHER -ETHERSCAN_API_KEY= - -# POLYGON -POYLGONSCAN_API_KEY= - -# BSC -BSCSCAN_API_KEY= - -# Deployer address. This is needed to calculate salt in deterministic deployments -DEPLOYER_ADDRESS= \ No newline at end of file diff --git a/packages/protocol-contracts-deprecated/.eslintrc.js b/packages/protocol-contracts-deprecated/.eslintrc.js deleted file mode 100644 index 77b8f69a..00000000 --- a/packages/protocol-contracts-deprecated/.eslintrc.js +++ /dev/null @@ -1,23 +0,0 @@ -const path = require("path"); - -const OFF = 0; - -module.exports = { - env: { - browser: false, - es2021: true, - mocha: true, - node: true, - }, - extends: ["../../.eslintrc.js"], - rules: { - "no-console": OFF, - }, - settings: { - "import/resolver": { - typescript: { - project: path.join(__dirname, "tsconfig.json"), - }, - }, - }, -}; diff --git a/packages/protocol-contracts-deprecated/.npmignore b/packages/protocol-contracts-deprecated/.npmignore deleted file mode 100644 index d80f8693..00000000 --- a/packages/protocol-contracts-deprecated/.npmignore +++ /dev/null @@ -1,20 +0,0 @@ -# https://docs.npmjs.com/misc/developers#keeping-files-out-of-your-package -cache -scripts -lib -artifacts -# Tests -test -# Build tools -.travis.yml -.jenkins.yml -.codeclimate.yml -# Linters -.jscsrc -.jshintrc -.eslintrc* -.env -.env.example -# Editor settings -.idea -.editorconfig \ No newline at end of file diff --git a/packages/protocol-contracts-deprecated/README.md b/packages/protocol-contracts-deprecated/README.md deleted file mode 100644 index e8cda3cd..00000000 --- a/packages/protocol-contracts-deprecated/README.md +++ /dev/null @@ -1,10 +0,0 @@ -# ZetaChain Protocol Contracts - -This package includes: -* Contracts that interact directly with the protocol (Connector, Zeta token). -* Utilities and interfaces to make it easy to develop multichain dApps on ZetaChain (ZetaInteractor, ZetaInterfaces, ZetaTokenConsumer). - -## Addresses - -* TSS address: collectively held by Zeta blockchain validators. -* TSS Updater address: a Gnosis multi-sig that's under an OpenZeppelin TimeLock for security and transparency. Eventually, the ownership of this role will be delegated to the TSS address. diff --git a/packages/protocol-contracts-deprecated/contracts/ZetaTokenConsumerTrident.strategy.sol b/packages/protocol-contracts-deprecated/contracts/ZetaTokenConsumerTrident.strategy.sol deleted file mode 100644 index d12e029f..00000000 --- a/packages/protocol-contracts-deprecated/contracts/ZetaTokenConsumerTrident.strategy.sol +++ /dev/null @@ -1,202 +0,0 @@ -// SPDX-License-Identifier: MIT -pragma solidity 0.8.7; - -import "@openzeppelin/contracts/interfaces/IERC20.sol"; -import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol"; -import "@uniswap/v3-periphery/contracts/interfaces/IQuoter.sol"; - -import "@zetachain/protocol-contracts/contracts/evm/interfaces/ZetaInterfaces.sol"; -import "./interfaces/TridentConcentratedLiquidityPoolFactory.sol"; -import "./interfaces/TridentIPoolRouter.sol"; - -interface ZetaTokenConsumerTridentErrors { - error InputCantBeZero(); - - error ErrorSendingETH(); - - error ReentrancyError(); -} - -interface WETH9 { - function deposit() external payable; - - function withdraw(uint256 wad) external; - - function depositTo(address to) external payable; - - function withdrawTo(address payable to, uint256 value) external; -} - -/** - * @dev Trident strategy for ZetaTokenConsumer - */ -contract ZetaTokenConsumerTrident is ZetaTokenConsumer, ZetaTokenConsumerTridentErrors { - using SafeERC20 for IERC20; - uint256 internal constant MAX_DEADLINE = 200; - - address internal immutable WETH9Address; - address public immutable zetaToken; - - IPoolRouter public immutable tridentRouter; - ConcentratedLiquidityPoolFactory public immutable poolFactory; - - bool internal _locked; - - constructor(address zetaToken_, address uniswapV3Router_, address WETH9Address_, address poolFactory_) { - if ( - zetaToken_ == address(0) || - uniswapV3Router_ == address(0) || - WETH9Address_ == address(0) || - poolFactory_ == address(0) - ) revert ZetaCommonErrors.InvalidAddress(); - - zetaToken = zetaToken_; - tridentRouter = IPoolRouter(uniswapV3Router_); - poolFactory = ConcentratedLiquidityPoolFactory(poolFactory_); - WETH9Address = WETH9Address_; - } - - modifier nonReentrant() { - if (_locked) revert ReentrancyError(); - _locked = true; - _; - _locked = false; - } - - receive() external payable {} - - function getPair(address token0, address token1) internal pure returns (address, address) { - if (token0 < token1) return (token0, token1); - - return (token1, token0); - } - - function getZetaFromEth( - address destinationAddress, - uint256 minAmountOut - ) external payable override returns (uint256) { - if (destinationAddress == address(0)) revert ZetaCommonErrors.InvalidAddress(); - if (msg.value == 0) revert InputCantBeZero(); - - (address token0, address token1) = getPair(WETH9Address, zetaToken); - address[] memory pairPools = poolFactory.getPools(token0, token1, 0, 1); - - IPoolRouter.ExactInputSingleParams memory params = IPoolRouter.ExactInputSingleParams({ - tokenIn: address(0), - amountIn: msg.value, - amountOutMinimum: minAmountOut, - pool: pairPools[0], - to: destinationAddress, - unwrap: false - }); - - uint256 amountOut = tridentRouter.exactInputSingle{value: msg.value}(params); - - emit EthExchangedForZeta(msg.value, amountOut); - return amountOut; - } - - function getZetaFromToken( - address destinationAddress, - uint256 minAmountOut, - address inputToken, - uint256 inputTokenAmount - ) external override returns (uint256) { - if (destinationAddress == address(0) || inputToken == address(0)) revert ZetaCommonErrors.InvalidAddress(); - if (inputTokenAmount == 0) revert InputCantBeZero(); - - IERC20(inputToken).safeTransferFrom(msg.sender, address(this), inputTokenAmount); - IERC20(inputToken).safeApprove(address(tridentRouter), inputTokenAmount); - - (address token0, address token1) = getPair(inputToken, WETH9Address); - address[] memory pairPools1 = poolFactory.getPools(token0, token1, 0, 1); - - (token0, token1) = getPair(WETH9Address, zetaToken); - address[] memory pairPools2 = poolFactory.getPools(token0, token1, 0, 1); - - address[] memory path = new address[](2); - path[0] = pairPools1[0]; - path[1] = pairPools2[0]; - - IPoolRouter.ExactInputParams memory params = IPoolRouter.ExactInputParams({ - tokenIn: inputToken, - amountIn: inputTokenAmount, - amountOutMinimum: minAmountOut, - path: path, - to: destinationAddress, - unwrap: false - }); - - uint256 amountOut = tridentRouter.exactInput(params); - - emit TokenExchangedForZeta(inputToken, inputTokenAmount, amountOut); - return amountOut; - } - - function getEthFromZeta( - address destinationAddress, - uint256 minAmountOut, - uint256 zetaTokenAmount - ) external override returns (uint256) { - if (destinationAddress == address(0)) revert ZetaCommonErrors.InvalidAddress(); - if (zetaTokenAmount == 0) revert InputCantBeZero(); - - IERC20(zetaToken).safeTransferFrom(msg.sender, address(this), zetaTokenAmount); - IERC20(zetaToken).safeApprove(address(tridentRouter), zetaTokenAmount); - - (address token0, address token1) = getPair(zetaToken, WETH9Address); - address[] memory pairPools = poolFactory.getPools(token0, token1, 0, 1); - - IPoolRouter.ExactInputSingleParams memory params = IPoolRouter.ExactInputSingleParams({ - tokenIn: zetaToken, - amountIn: zetaTokenAmount, - amountOutMinimum: minAmountOut, - pool: pairPools[0], - to: destinationAddress, - unwrap: true - }); - - uint256 amountOut = tridentRouter.exactInputSingle(params); - - emit ZetaExchangedForEth(zetaTokenAmount, amountOut); - - return amountOut; - } - - function getTokenFromZeta( - address destinationAddress, - uint256 minAmountOut, - address outputToken, - uint256 zetaTokenAmount - ) external override nonReentrant returns (uint256) { - if (destinationAddress == address(0) || outputToken == address(0)) revert ZetaCommonErrors.InvalidAddress(); - if (zetaTokenAmount == 0) revert InputCantBeZero(); - - IERC20(zetaToken).safeTransferFrom(msg.sender, address(this), zetaTokenAmount); - IERC20(zetaToken).safeApprove(address(tridentRouter), zetaTokenAmount); - - (address token0, address token1) = getPair(zetaToken, WETH9Address); - address[] memory pairPools1 = poolFactory.getPools(token0, token1, 0, 1); - - (token0, token1) = getPair(WETH9Address, outputToken); - address[] memory pairPools2 = poolFactory.getPools(token0, token1, 0, 1); - - address[] memory path = new address[](2); - path[0] = pairPools1[0]; - path[1] = pairPools2[0]; - - IPoolRouter.ExactInputParams memory params = IPoolRouter.ExactInputParams({ - tokenIn: zetaToken, - amountIn: zetaTokenAmount, - amountOutMinimum: minAmountOut, - path: path, - to: destinationAddress, - unwrap: false - }); - - uint256 amountOut = tridentRouter.exactInput(params); - - emit ZetaExchangedForToken(outputToken, zetaTokenAmount, amountOut); - return amountOut; - } -} diff --git a/packages/protocol-contracts-deprecated/contracts/interfaces/TridentConcentratedLiquidityPoolFactory.sol b/packages/protocol-contracts-deprecated/contracts/interfaces/TridentConcentratedLiquidityPoolFactory.sol deleted file mode 100644 index d8c28898..00000000 --- a/packages/protocol-contracts-deprecated/contracts/interfaces/TridentConcentratedLiquidityPoolFactory.sol +++ /dev/null @@ -1,23 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0 - -/* - * - * ##### ## # # #### ###### ## ##### ##### #### ##### #### #### #### # - * # # # # ## # # # # # # # # # # # # # # # # # # # # - * # # # # # # # # ##### # # # # # # # # # # # # # # # - * ##### ###### # # # # ### # ###### ##### ##### # # # # # # # # # - * # # # # ## # # # # # # # # # # # # # # # # # # - * # # # # # #### ###### # # # # # #### # #### #### #### ###### - * - */ - -pragma solidity >=0.8.0; - -interface ConcentratedLiquidityPoolFactory { - function getPools( - address token0, - address token1, - uint256 startIndex, - uint256 count - ) external view returns (address[] memory pairPools); -} diff --git a/packages/protocol-contracts-deprecated/contracts/interfaces/TridentIPoolRouter.sol b/packages/protocol-contracts-deprecated/contracts/interfaces/TridentIPoolRouter.sol deleted file mode 100644 index b5e8bb3e..00000000 --- a/packages/protocol-contracts-deprecated/contracts/interfaces/TridentIPoolRouter.sol +++ /dev/null @@ -1,75 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0 - -/* - * - * ##### ## # # #### ###### ## ##### ##### #### ##### #### #### #### # - * # # # # ## # # # # # # # # # # # # # # # # # # # # - * # # # # # # # # ##### # # # # # # # # # # # # # # # - * ##### ###### # # # # ### # ###### ##### ##### # # # # # # # # # - * # # # # ## # # # # # # # # # # # # # # # # # # - * # # # # # #### ###### # # # # # #### # #### #### #### ###### - * - */ - -pragma solidity >=0.8.0; - -interface IPoolRouter { - struct ExactInputSingleParams { - address tokenIn; /// @dev the input token address. If tokenIn is address(0), msg.value will be wrapped and used as input token - uint256 amountIn; /// @dev The amount of input tokens to send - uint256 amountOutMinimum; /// @dev minimum required amount of output token after swap - address pool; /// @dev pool address to swap - address to; /// @dev address to receive - bool unwrap; /// @dev unwrap if output token is wrapped klay - } - - struct ExactInputParams { - address tokenIn; /// @dev the token address to swap-in. If tokenIn is address(0), msg.value will be wrapped and used as input token - uint256 amountIn; /// @dev The amount of input tokens to send. - uint256 amountOutMinimum; /// @dev minimum required amount of output token after swap - address[] path; /// @dev An array of pool addresses to pass through - address to; /// @dev recipient of the output tokens - bool unwrap; /// @dev unwrap if output token is wrapped klay - } - - struct ExactOutputSingleParams { - address tokenIn; /// @dev the input token address. If tokenIn is address(0), msg.value will be wrapped and used as input token - uint256 amountOut; /// @dev The amount of output tokens to receive - uint256 amountInMaximum; /// @dev maximum available amount of input token after swap - address pool; /// @dev pool address to swap - address to; /// @dev address to receive - bool unwrap; /// @dev unwrap if output token is wrapped klay - } - - struct ExactOutputParams { - address tokenIn; /// @dev the token address to swap-in. If tokenIn is address(0), msg.value will be wrapped and used as input token - uint256 amountOut; /// @dev The amount of output tokens to receive - uint256 amountInMaximum; /// @dev maximum available amount of input token after swap - address[] path; /// @dev An array of pool addresses to pass through - address to; /// @dev recipient of the output tokens - bool unwrap; /// @dev unwrap if output token is wrapped klay - } - - /// @notice Swap amountIn of one token for as much as possible of another token - /// @param params The parameters necessary for the swap, encoded as ExactInputSingleParams in calldata - function exactInputSingle(ExactInputSingleParams calldata params) external payable returns (uint256 amountOut); - - /// @notice Swap amountIn of one token for as much as possible of another along the specified path - /// @param params The parameters necessary for the multi-hop swap, encoded as ExactInputParams in calldata - function exactInput(ExactInputParams calldata params) external payable returns (uint256 amountOut); - - /// @notice Swaps as little as possible of one token for `amountOut` of another token - /// @param params The parameters necessary for the swap, encoded as ExactOutputSingleParams in calldata - function exactOutputSingle(ExactOutputSingleParams calldata params) external payable returns (uint256 amountIn); - - /// @notice Swaps as little as possible of one token for `amountOut` of another along the specified path (reversed) - /// @param params The parameters necessary for the multi-hop swap, encoded as ExactOutputParams in calldata - function exactOutput(ExactOutputParams calldata params) external payable returns (uint256 amountIn); - - /// @notice Recover mistakenly sent tokens - function sweep( - address token, - uint256 amount, - address recipient - ) external payable; -} diff --git a/packages/protocol-contracts-deprecated/contracts/testing/TestContracts.sol b/packages/protocol-contracts-deprecated/contracts/testing/TestContracts.sol deleted file mode 100644 index 53520a08..00000000 --- a/packages/protocol-contracts-deprecated/contracts/testing/TestContracts.sol +++ /dev/null @@ -1,10 +0,0 @@ -// SPDX-License-Identifier: MIT -pragma solidity 0.6.6; - -/** - * @dev Contracts that need to be compiled for testing purposes - */ - -import "@uniswap/v2-core/contracts/interfaces/IUniswapV2Factory.sol"; -import "@uniswap/v2-core/contracts/interfaces/IUniswapV2Pair.sol"; -import "@uniswap/v2-periphery/contracts/UniswapV2Router02.sol"; diff --git a/packages/protocol-contracts-deprecated/hardhat.config.ts b/packages/protocol-contracts-deprecated/hardhat.config.ts deleted file mode 100644 index a16a8956..00000000 --- a/packages/protocol-contracts-deprecated/hardhat.config.ts +++ /dev/null @@ -1,44 +0,0 @@ -import "@nomiclabs/hardhat-waffle"; -import "@nomiclabs/hardhat-etherscan"; -import "@typechain/hardhat"; -import "tsconfig-paths/register"; -import "hardhat-abi-exporter"; - -import { getHardhatConfigNetworks, getHardhatConfigScanners } from "@zetachain/addresses-tools/networks"; -import * as dotenv from "dotenv"; -import type { HardhatUserConfig } from "hardhat/types"; - -dotenv.config(); - -const PRIVATE_KEYS = - process.env.PRIVATE_KEY !== undefined ? [`0x${process.env.PRIVATE_KEY}`, `0x${process.env.TSS_PRIVATE_KEY}`] : []; - -const config: HardhatUserConfig = { - abiExporter: [ - { - format: "json", - path: "../interfaces/abi/json", - runOnCompile: true, - }, - ], - etherscan: { - ...getHardhatConfigScanners(), - }, - networks: { - ...getHardhatConfigNetworks(PRIVATE_KEYS), - }, - solidity: { - compilers: [ - { version: "0.5.10" /** For create2 factory */ }, - { version: "0.6.6" /** For uniswap v2 */ }, - { version: "0.7.6" /** For uniswap v3 */ }, - { version: "0.8.7" }, - ], - }, - typechain: { - alwaysGenerateOverloads: false, - outDir: "../interfaces/typechain-types", - }, -}; - -export default config; diff --git a/packages/protocol-contracts-deprecated/package.json b/packages/protocol-contracts-deprecated/package.json deleted file mode 100644 index edf6ae27..00000000 --- a/packages/protocol-contracts-deprecated/package.json +++ /dev/null @@ -1,40 +0,0 @@ -{ - "name": "@zetachain/protocol-contracts-deprecated", - "version": "0.0.3", - "license": "MIT", - "author": "zetachain", - "publishConfig": { - "access": "restricted", - "registry": "https://registry.npmjs.org/" - }, - "scripts": { - "clean": "npx hardhat clean", - "compile": "npx hardhat compile", - "deploy": "EXECUTE_PROGRAMMATICALLY=true npx hardhat run scripts/deploy.ts", - "prepublishOnly": "echo 'This package has no prepublishOnly tasks.'", - "deploy-local": "ZETA_NETWORK=troy EXECUTE_PROGRAMMATICALLY=true npx hardhat run scripts/deploy.ts --network hardhat", - "lint:fix": "npm run lint:js:fix && npm run lint:sol:fix", - "lint:js:fix": "eslint --ext .js,.ts . --fix", - "lint:js": "eslint --ext .js,.ts .", - "lint:sol:fix": "prettier --write \"contracts/**/*.sol\"", - "lint:sol": "solhint 'contracts/**/*.sol' && prettier -c 'contracts/**/*.sol'", - "lint": "npm run lint:js && npm run lint:sol", - "test:watch": "echo You need to install `entr` to run this command && find contracts test -iname '*.sol' -o -iname '*.spec.ts' | entr -cnr npx hardhat test", - "test": "npx hardhat test", - "tsc:watch": "npx tsc --watch", - "verify": "npx hardhat run scripts/verify-contracts.ts" - }, - "devDependencies": { - "@zetachain/addresses": "workspace:^", - "@zetachain/addresses-tools": "workspace:^", - "@zetachain/protocol-contracts": "^0.0.4", - "hardhat-abi-exporter": "^2.10.0", - "tsconfig-paths": "^3.14.1" - }, - "dependencies": { - "@openzeppelin/contracts": "^4.8.3", - "@uniswap/v2-periphery": "1.1.0-beta.0", - "@uniswap/v3-periphery": "1.1.0", - "ethers": "5.6.8" - } -} diff --git a/packages/protocol-contracts-deprecated/tsconfig.json b/packages/protocol-contracts-deprecated/tsconfig.json deleted file mode 100644 index d2b12130..00000000 --- a/packages/protocol-contracts-deprecated/tsconfig.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "extends": "../../tsconfig.json", - "include": ["./scripts", "./lib", "./test", "./typechain-types", "./**/*.json", "typechain-types"], - "exclude": ["artifacts", "cache"], - "files": ["./hardhat.config.ts"], - "compilerOptions": { - "baseUrl": ".", - "paths": { - "@zetachain/addresses/*": ["../addresses/src/*"], - "@zetachain/addresses": ["../addresses/src/index.ts"], - "@zetachain/addresses-tools/*": ["../addresses-tools/src/*"], - "@zetachain/addresses-tools": ["../addresses-tools/src/index.ts"], - "@zetachain/interfaces/*": ["../interfaces/*"] - } - } -} diff --git a/yarn.lock b/yarn.lock index 78117ccc..feb5c4ff 100644 --- a/yarn.lock +++ b/yarn.lock @@ -575,7 +575,7 @@ __metadata: languageName: node linkType: hard -"@ethersproject/abi@npm:^5.0.0-beta.146, @ethersproject/abi@npm:^5.1.2, @ethersproject/abi@npm:^5.5.0": +"@ethersproject/abi@npm:^5.0.0-beta.146, @ethersproject/abi@npm:^5.1.2": version: 5.6.0 resolution: "@ethersproject/abi@npm:5.6.0" dependencies: @@ -2725,8 +2725,7 @@ __metadata: "@uniswap/v3-periphery": 1.1.0 "@zetachain/addresses": "workspace:^" "@zetachain/addresses-tools": "workspace:^" - "@zetachain/protocol-contracts": ^0.0.6 - "@zetachain/protocol-contracts-deprecated": "workspace:^" + "@zetachain/protocol-contracts": ^0.0.7 ethers: 5.6.8 hardhat-gas-reporter: ^1.0.8 solidity-coverage: ^0.7.20 @@ -2734,29 +2733,6 @@ __metadata: languageName: unknown linkType: soft -"@zetachain/protocol-contracts-deprecated@workspace:^, @zetachain/protocol-contracts-deprecated@workspace:packages/protocol-contracts-deprecated": - version: 0.0.0-use.local - resolution: "@zetachain/protocol-contracts-deprecated@workspace:packages/protocol-contracts-deprecated" - dependencies: - "@openzeppelin/contracts": ^4.8.3 - "@uniswap/v2-periphery": 1.1.0-beta.0 - "@uniswap/v3-periphery": 1.1.0 - "@zetachain/addresses": "workspace:^" - "@zetachain/addresses-tools": "workspace:^" - "@zetachain/protocol-contracts": ^0.0.4 - ethers: 5.6.8 - hardhat-abi-exporter: ^2.10.0 - tsconfig-paths: ^3.14.1 - languageName: unknown - linkType: soft - -"@zetachain/protocol-contracts@npm:^0.0.4": - version: 0.0.4 - resolution: "@zetachain/protocol-contracts@npm:0.0.4" - checksum: 64a6c97ff65528b7c17ab258ea5a614b91b99b9569c40f6bac5549209724137037f3dfb2ac39c463897e2648162457c2466eb0ca93bc10efa914c85140b32b5b - languageName: node - linkType: hard - "@zetachain/protocol-contracts@npm:^0.0.6": version: 0.0.6 resolution: "@zetachain/protocol-contracts@npm:0.0.6" @@ -2764,6 +2740,13 @@ __metadata: languageName: node linkType: hard +"@zetachain/protocol-contracts@npm:^0.0.7": + version: 0.0.7 + resolution: "@zetachain/protocol-contracts@npm:0.0.7" + checksum: 83cf3d534878b5748479a18aec8702c45db74b92473cc1ab693562623e5e11a5270f4b5bd9ca52c1adc1ebeea5f5e5ebb9089be7d171a975cefbf37f586f8bd5 + languageName: node + linkType: hard + "@zetachain/zeta-app-contracts@workspace:packages/zeta-app-contracts": version: 0.0.0-use.local resolution: "@zetachain/zeta-app-contracts@workspace:packages/zeta-app-contracts" @@ -3027,7 +3010,7 @@ __metadata: languageName: node linkType: hard -"ansi-colors@npm:^4.1.0, ansi-colors@npm:^4.1.3": +"ansi-colors@npm:^4.1.3": version: 4.1.3 resolution: "ansi-colors@npm:4.1.3" checksum: a9c2ec842038a1fabc7db9ece7d3177e2fe1c5dc6f0c51ecfbf5f39911427b89c00b5dc6b8bd95f82a26e9b16aaae2e83d45f060e98070ce4d1333038edceb0e @@ -4681,20 +4664,6 @@ __metadata: languageName: node linkType: hard -"delete-empty@npm:^3.0.0": - version: 3.0.0 - resolution: "delete-empty@npm:3.0.0" - dependencies: - ansi-colors: ^4.1.0 - minimist: ^1.2.0 - path-starts-with: ^2.0.0 - rimraf: ^2.6.2 - bin: - delete-empty: bin/cli.js - checksum: 1e2b030346683f49b12460b91d7e1793fc61e9aa0be152a1b31317363632e92426be270f8d635b89d3915ae7da753dcfa6e3bd200f62edf21eaa876ef4443fd2 - languageName: node - linkType: hard - "depd@npm:2.0.0": version: 2.0.0 resolution: "depd@npm:2.0.0" @@ -6936,18 +6905,6 @@ __metadata: languageName: node linkType: hard -"hardhat-abi-exporter@npm:^2.10.0": - version: 2.10.0 - resolution: "hardhat-abi-exporter@npm:2.10.0" - dependencies: - "@ethersproject/abi": ^5.5.0 - delete-empty: ^3.0.0 - peerDependencies: - hardhat: ^2.0.0 - checksum: 9f32e097b256ea8308d9e738594c88895db387f17b6f92924bad7de2f3209ca26754a8519940578622f9e8df7e19bd1e4e47058c0cef8d100d4ad2977650f5e7 - languageName: node - linkType: hard - "hardhat-gas-reporter@npm:^1.0.8": version: 1.0.8 resolution: "hardhat-gas-reporter@npm:1.0.8" @@ -9738,13 +9695,6 @@ __metadata: languageName: node linkType: hard -"path-starts-with@npm:^2.0.0": - version: 2.0.0 - resolution: "path-starts-with@npm:2.0.0" - checksum: c780e5feb53f37a0cc78c446181aac2d1e4554e5693bbc4ad03c99157b9411ade26a3503dcd5b3b8f0fd56d36daa60ce5a8c24d66b54a400c812fe11eb5bcab9 - languageName: node - linkType: hard - "path-to-regexp@npm:0.1.7": version: 0.1.7 resolution: "path-to-regexp@npm:0.1.7" @@ -10510,7 +10460,7 @@ __metadata: languageName: node linkType: hard -"rimraf@npm:^2.2.8, rimraf@npm:^2.6.2": +"rimraf@npm:^2.2.8": version: 2.7.1 resolution: "rimraf@npm:2.7.1" dependencies: From 69cd5cfd1940610ed81a0e76e363d4ee3c2e46c3 Mon Sep 17 00:00:00 2001 From: Andres Martin Aiello <50411235+andresaiello@users.noreply.github.com> Date: Mon, 29 May 2023 12:43:55 -0300 Subject: [PATCH 080/115] Release a new version of address-tools on npm (#99) --- packages/addresses-tools/package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/addresses-tools/package.json b/packages/addresses-tools/package.json index 246c382b..9c96df5f 100644 --- a/packages/addresses-tools/package.json +++ b/packages/addresses-tools/package.json @@ -1,6 +1,6 @@ { "name": "@zetachain/addresses-tools", - "version": "0.0.7", + "version": "0.0.8", "license": "MIT", "author": "zetachain", "publishConfig": { @@ -20,4 +20,4 @@ "devDependencies": { "@zetachain/addresses": "workspace:^" } -} +} \ No newline at end of file From 47d5bcf1d5657c55ce922ff74df10b26af936589 Mon Sep 17 00:00:00 2001 From: Andres Martin Aiello <50411235+andresaiello@users.noreply.github.com> Date: Tue, 20 Jun 2023 11:47:44 -0300 Subject: [PATCH 081/115] Remove extra consolelog from address pkg (#102) --- packages/addresses/package.json | 13 ++++--------- packages/addresses/src/addresses.helpers.ts | 2 -- packages/addresses/vite.config.js | 20 -------------------- 3 files changed, 4 insertions(+), 31 deletions(-) delete mode 100644 packages/addresses/vite.config.js diff --git a/packages/addresses/package.json b/packages/addresses/package.json index 14cb2b84..7a93a196 100644 --- a/packages/addresses/package.json +++ b/packages/addresses/package.json @@ -1,23 +1,18 @@ { "name": "@zetachain/addresses", - "version": "0.0.10", + "version": "0.0.11", "license": "MIT", "author": "zetachain", "publishConfig": { "access": "public", "registry": "https://registry.npmjs.org/" }, - "main": "./dist/zetachain-addresses.umd.js", - "module": "./dist/zetachain-addresses.mjs", - "types": "./dist/index.d.ts", "files": [ "dist" ], + "main": "", "exports": { - ".": { - "import": "./dist/zetachain-addresses.mjs", - "require": "./dist/zetachain-addresses.umd.js" - } + ".": "./dist/index.js" }, "scripts": { "tsc:watch": "npx tsc --watch", @@ -27,4 +22,4 @@ "vite": "^3.1.0", "vite-plugin-dts": "^1.4.1" } -} +} \ No newline at end of file diff --git a/packages/addresses/src/addresses.helpers.ts b/packages/addresses/src/addresses.helpers.ts index 046e2e4f..b6a9e437 100644 --- a/packages/addresses/src/addresses.helpers.ts +++ b/packages/addresses/src/addresses.helpers.ts @@ -167,8 +167,6 @@ export const getAddress = ({ if (!isNetworkName(networkName)) throw getInvalidNetworkError(networkName, false); if (!isZetaNetworkName(zetaNetwork)) throw getInvalidNetworkError(networkName, true); - console.log(`Getting ${address} address from ${zetaNetwork}: ${networkName}.`); - if (isZetaLocalnet(zetaNetwork) && isLocalNetworkName(networkName)) { return getLocalnetList()[zetaNetwork][networkName][address]; } diff --git a/packages/addresses/vite.config.js b/packages/addresses/vite.config.js deleted file mode 100644 index 2b07be2d..00000000 --- a/packages/addresses/vite.config.js +++ /dev/null @@ -1,20 +0,0 @@ -// vite.config.js -import { resolve } from "path"; -import { defineConfig } from "vite"; -import dts from "vite-plugin-dts"; - -export default defineConfig({ - build: { - lib: { - entry: resolve(__dirname, "./src/index.ts"), - // the proper extensions will be added - fileName: "zetachain-addresses", - name: "ZetachainAddresses" - } - }, - plugins: [ - dts({ - insertTypesEntry: true - }) - ] -}); From f73a62a1456e8bc048e163eff330aa59f08d12de Mon Sep 17 00:00:00 2001 From: Andres Martin Aiello <50411235+andresaiello@users.noreply.github.com> Date: Tue, 4 Jul 2023 14:54:01 -0300 Subject: [PATCH 082/115] Deploy send contract to Athens3 (#105) --- packages/addresses-tools/package.json | 5 ++- .../addresses-tools/src/addresses.helpers.ts | 9 +++- packages/addresses/package.json | 4 +- packages/addresses/src/addresses.athens.json | 2 +- packages/zeta-app-contracts/package.json | 2 +- .../scripts/multi-chain-value/deploy.ts | 44 +++++++++++-------- yarn.lock | 10 ++++- 7 files changed, 50 insertions(+), 26 deletions(-) diff --git a/packages/addresses-tools/package.json b/packages/addresses-tools/package.json index 9c96df5f..868556c2 100644 --- a/packages/addresses-tools/package.json +++ b/packages/addresses-tools/package.json @@ -18,6 +18,7 @@ "prepublishOnly": "npx tsc" }, "devDependencies": { - "@zetachain/addresses": "workspace:^" + "@zetachain/addresses": "workspace:^", + "@zetachain/protocol-contracts": "^1.0.1-athens3" } -} \ No newline at end of file +} diff --git a/packages/addresses-tools/src/addresses.helpers.ts b/packages/addresses-tools/src/addresses.helpers.ts index 3e7d79e6..8b0289f3 100644 --- a/packages/addresses-tools/src/addresses.helpers.ts +++ b/packages/addresses-tools/src/addresses.helpers.ts @@ -21,6 +21,8 @@ import { ZetaNetworkName, ZetaTestnetNetworkName } from "@zetachain/addresses"; +import { ZetaProtocolNetwork } from "@zetachain/protocol-contracts/dist/lib"; +import { ProtocolNetworkNetworkNameMap } from "@zetachain/protocol-contracts/dist/lib/address.helpers"; import dotenv from "dotenv"; import { readdirSync, readFileSync, writeFileSync } from "fs"; import { network } from "hardhat"; @@ -31,7 +33,7 @@ import { deepCloneSerializable } from "./misc.helpers"; const LOCAL_PKG = "addresses-tools"; const PUBLIC_PKG = "addresses"; -const dirname = __dirname.replace(LOCAL_PKG, PUBLIC_PKG); +const dirname = __dirname.replace(LOCAL_PKG, PUBLIC_PKG).replace("dist", "src"); export const getScanVariable = ({ customNetworkName }: { customNetworkName?: string } = {}): string => { const networkName = customNetworkName || network.name; @@ -290,3 +292,8 @@ export const loadAddressFromFile = async ( throw new Error(`Invalid ZETA_NETWORK + network combination ${ZETA_NETWORK} ${networkName}.`); }; + +export const getProtocolNetwork = (value: NetworkName): ZetaProtocolNetwork | undefined => { + //@ts-expect-error + return Object.keys(ProtocolNetworkNetworkNameMap).find(key => ProtocolNetworkNetworkNameMap[key] === value); +}; diff --git a/packages/addresses/package.json b/packages/addresses/package.json index 7a93a196..91690818 100644 --- a/packages/addresses/package.json +++ b/packages/addresses/package.json @@ -10,7 +10,7 @@ "files": [ "dist" ], - "main": "", + "main": "./dist/", "exports": { ".": "./dist/index.js" }, @@ -22,4 +22,4 @@ "vite": "^3.1.0", "vite-plugin-dts": "^1.4.1" } -} \ No newline at end of file +} diff --git a/packages/addresses/src/addresses.athens.json b/packages/addresses/src/addresses.athens.json index 6fe05a65..cf5c2285 100644 --- a/packages/addresses/src/addresses.athens.json +++ b/packages/addresses/src/addresses.athens.json @@ -131,7 +131,7 @@ "immutableCreate2Factory": "", "multiChainSwap": "", "multiChainSwapZetaConnector": "", - "multiChainValue": "", + "multiChainValue": "0x14BeC0E4A8e7bF7A02Af54Ad81a57a9fcA4D37Fd", "tridentPoolFactory": "", "tss": "", "tssUpdater": "", diff --git a/packages/zeta-app-contracts/package.json b/packages/zeta-app-contracts/package.json index 118bd45a..9fa1def8 100644 --- a/packages/zeta-app-contracts/package.json +++ b/packages/zeta-app-contracts/package.json @@ -32,7 +32,7 @@ "@openzeppelin/contracts": "^4.8.3", "@zetachain/addresses": "workspace:^", "@zetachain/addresses-tools": "workspace:^", - "@zetachain/protocol-contracts": "^0.0.6", + "@zetachain/protocol-contracts": "^1.0.1-athens3", "ethers": "5.6.8" } } diff --git a/packages/zeta-app-contracts/scripts/multi-chain-value/deploy.ts b/packages/zeta-app-contracts/scripts/multi-chain-value/deploy.ts index fa8c33eb..1408ac04 100644 --- a/packages/zeta-app-contracts/scripts/multi-chain-value/deploy.ts +++ b/packages/zeta-app-contracts/scripts/multi-chain-value/deploy.ts @@ -1,9 +1,9 @@ -import { getChainId, isNetworkName, isZetaTestnet } from "@zetachain/addresses"; -import { saveAddress } from "@zetachain/addresses-tools"; -import { network } from "hardhat"; +import { getChainId, isNetworkName, isZetaTestnet, NetworkName } from "@zetachain/addresses"; +import { getProtocolNetwork, saveAddress } from "@zetachain/addresses-tools"; +import { getAddress } from "@zetachain/protocol-contracts/dist/lib"; +import { ethers, network } from "hardhat"; -import { getMultiChainValue } from "../../lib/multi-chain-value/MultiChainValue.helpers"; -import { getAddress } from "../../lib/shared/address.helpers"; +import { MultiChainValue, MultiChainValue__factory } from "../../typechain-types"; const networkName = network.name; const { ZETA_NETWORK } = process.env; @@ -11,31 +11,39 @@ const { ZETA_NETWORK } = process.env; async function main() { if (!isNetworkName(networkName)) throw new Error("Invalid network name"); - const multiChainValueContract = await getMultiChainValue(getAddress("multiChainValue")); + const protocolNetwork = getProtocolNetwork(networkName); + if (!protocolNetwork) throw new Error("Invalid network name"); + + const connectorAddress = getAddress("connector", protocolNetwork); + const zetaTokenAddress = getAddress("zetaToken", protocolNetwork); + + const Factory = (await ethers.getContractFactory("MultiChainValue")) as MultiChainValue__factory; + const contract = (await Factory.deploy(connectorAddress, zetaTokenAddress)) as MultiChainValue; + await contract.deployed(); + + //@ts-expect-error + console.log("MultiChainValue deployed to:", contract.address); if (isZetaTestnet(ZETA_NETWORK)) { networkName !== "goerli" && - (await (await multiChainValueContract.addAvailableChainId(getChainId("goerli"))) - .wait() - .catch(e => console.error(e))); + (await (await contract.addAvailableChainId(getChainId("goerli"))).wait().catch((e: any) => console.error(e))); networkName !== "polygon-mumbai" && - (await (await multiChainValueContract.addAvailableChainId(getChainId("polygon-mumbai"))) + (await (await contract.addAvailableChainId(getChainId("polygon-mumbai"))) .wait() - .catch(e => console.error(e))); + .catch((e: any) => console.error(e))); networkName !== "bsc-testnet" && - (await (await multiChainValueContract.addAvailableChainId(getChainId("bsc-testnet"))) + (await (await contract.addAvailableChainId(getChainId("bsc-testnet"))) .wait() - .catch(e => console.error(e))); + .catch((e: any) => console.error(e))); - networkName !== "ropsten" && - (await (await multiChainValueContract.addAvailableChainId(getChainId("ropsten"))) - .wait() - .catch(e => console.error(e))); + networkName !== "athens" && + (await (await contract.addAvailableChainId(getChainId("athens"))).wait().catch((e: any) => console.error(e))); } - saveAddress("multiChainValue", multiChainValueContract.address); + //@ts-expect-error + saveAddress("multiChainValue", contract.address); } main().catch(error => { diff --git a/yarn.lock b/yarn.lock index feb5c4ff..8e0d4099 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2703,6 +2703,7 @@ __metadata: resolution: "@zetachain/addresses-tools@workspace:packages/addresses-tools" dependencies: "@zetachain/addresses": "workspace:^" + "@zetachain/protocol-contracts": ^1.0.1-athens3 languageName: unknown linkType: soft @@ -2747,6 +2748,13 @@ __metadata: languageName: node linkType: hard +"@zetachain/protocol-contracts@npm:^1.0.1-athens3": + version: 1.0.1-athens3 + resolution: "@zetachain/protocol-contracts@npm:1.0.1-athens3" + checksum: b0877c78160ae233ef3786e2e62fa8352592c97711903c10bad9a9fe74683a4a28eaa242d4a5091f0aa594ea8879eb8e0cee108c3a1f61262756a04bb6e5a1a2 + languageName: node + linkType: hard + "@zetachain/zeta-app-contracts@workspace:packages/zeta-app-contracts": version: 0.0.0-use.local resolution: "@zetachain/zeta-app-contracts@workspace:packages/zeta-app-contracts" @@ -2755,7 +2763,7 @@ __metadata: "@openzeppelin/contracts": ^4.8.3 "@zetachain/addresses": "workspace:^" "@zetachain/addresses-tools": "workspace:^" - "@zetachain/protocol-contracts": ^0.0.6 + "@zetachain/protocol-contracts": ^1.0.1-athens3 ethers: 5.6.8 hardhat-gas-reporter: ^1.0.8 solidity-coverage: ^0.7.20 From 2df7647001b9dd058b471440f701474ffcf341f0 Mon Sep 17 00:00:00 2001 From: Andres Martin Aiello <50411235+andresaiello@users.noreply.github.com> Date: Mon, 10 Jul 2023 13:51:11 -0300 Subject: [PATCH 083/115] Remove Ropsten and upgrade to Athens3 (#106) * Remove Ropsten and upgrade to Athens3 * rename Athens version --- .../addresses-tools/src/addresses.helpers.ts | 9 +-- packages/addresses-tools/src/index.ts | 1 + packages/addresses-tools/src/networks.ts | 12 +-- .../src/system-addresses.helpers.ts | 49 ++++++++++++ packages/addresses/src/addresses.athens.json | 77 +++++++------------ packages/addresses/src/addresses.helpers.ts | 7 +- .../lib/shared/network.constants.ts | 6 -- .../scripts/multi-chain-value/deploy.ts | 2 - .../scripts/multi-chain-value/send-value.ts | 7 +- packages/zevm-app-contracts/scripts/deploy.ts | 6 +- .../scripts/multi-output/deploy.ts | 3 +- .../scripts/systemConstants.ts | 24 ------ .../zeta-swap/add-liquidity-zeta-uniswap.ts | 5 +- .../scripts/zeta-swap/deploy.ts | 4 +- .../scripts/zeta-swap/get-system-data.ts | 4 +- .../scripts/zeta-swap/stress-swap.ts | 4 +- .../scripts/zeta-swap/swap-on-zevm.ts | 4 +- .../scripts/zeta-swap/swap.ts | 3 +- 18 files changed, 107 insertions(+), 120 deletions(-) create mode 100644 packages/addresses-tools/src/system-addresses.helpers.ts delete mode 100644 packages/zevm-example-contracts/scripts/systemConstants.ts diff --git a/packages/addresses-tools/src/addresses.helpers.ts b/packages/addresses-tools/src/addresses.helpers.ts index 8b0289f3..9dcfa820 100644 --- a/packages/addresses-tools/src/addresses.helpers.ts +++ b/packages/addresses-tools/src/addresses.helpers.ts @@ -52,8 +52,7 @@ export const getScanVariable = ({ customNetworkName }: { customNetworkName?: str "klaytn-baobab": "", "klaytn-cypress": "", "polygon-localnet": "", - "polygon-mumbai": process.env.POLYGONSCAN_API_KEY || "", - ropsten: process.env.ETHERSCAN_API_KEY || "" + "polygon-mumbai": process.env.POLYGONSCAN_API_KEY || "" }; return v[networkName]; @@ -76,8 +75,7 @@ export const getExplorerUrl = ({ customNetworkName }: { customNetworkName?: stri "klaytn-baobab": "https://baobab.scope.klaytn.com/", "klaytn-cypress": "https://scope.klaytn.com/", "polygon-localnet": "", - "polygon-mumbai": "https://mumbai.polygonscan.com/", - ropsten: "https://ropsten.etherscan.io/" + "polygon-mumbai": "https://mumbai.polygonscan.com/" }; return v[networkName]; @@ -96,8 +94,7 @@ export const getGasSymbolByNetwork = (networkName: NetworkName): string => { "klaytn-baobab": "KLAY", "klaytn-cypress": "KLAY", "polygon-localnet": "MATIC", - "polygon-mumbai": "MATIC", - ropsten: "BYEBYE" + "polygon-mumbai": "MATIC" }; return v[networkName]; diff --git a/packages/addresses-tools/src/index.ts b/packages/addresses-tools/src/index.ts index fca9c8a4..c79a885a 100644 --- a/packages/addresses-tools/src/index.ts +++ b/packages/addresses-tools/src/index.ts @@ -1,2 +1,3 @@ export * from "./addresses.helpers"; export * from "./networks"; +export * from "./system-addresses.helpers"; diff --git a/packages/addresses-tools/src/networks.ts b/packages/addresses-tools/src/networks.ts index 4665cc19..ded55177 100644 --- a/packages/addresses-tools/src/networks.ts +++ b/packages/addresses-tools/src/networks.ts @@ -6,7 +6,8 @@ export const getHardhatConfigNetworks = (PRIVATE_KEYS: string[]): NetworksUserCo // chainId: 7001, gas: 5000000, gasPrice: 80000000000, - url: `https://api.athens2.zetachain.com/evm`, + // url: `https://api.athens2.zetachain.com/evm`, //A2 + url: `https://zetachain-athens-evm.blockpi.network/v1/rpc/public`, //A3 }, "bsc-localnet": { gas: 5000000, @@ -66,19 +67,12 @@ export const getHardhatConfigNetworks = (PRIVATE_KEYS: string[]): NetworksUserCo gasPrice: 80000000000, url: "https://rpc.ankr.com/polygon_mumbai", }, - ropsten: { - accounts: PRIVATE_KEYS, - gas: 9000000, - gasPrice: 80000000000, - url: "https://ropsten.infura.io/v3/", - }, }); export const getHardhatConfigScanners = () => ({ apiKey: { bscTestnet: process.env.BSCSCAN_API_KEY, goerli: process.env.ETHERSCAN_API_KEY, - polygonMumbai: process.env.POYLGONSCAN_API_KEY, - ropsten: process.env.ETHERSCAN_API_KEY, + polygonMumbai: process.env.POYLGONSCAN_API_KEY }, }); diff --git a/packages/addresses-tools/src/system-addresses.helpers.ts b/packages/addresses-tools/src/system-addresses.helpers.ts new file mode 100644 index 00000000..5ca86bf2 --- /dev/null +++ b/packages/addresses-tools/src/system-addresses.helpers.ts @@ -0,0 +1,49 @@ +import { NetworkName } from "@zetachain/addresses"; +import { getAddress, getZRC20Address as getZRC20AddressFromProtocol } from "@zetachain/protocol-contracts/dist/lib"; + +export type AthensVersion = "Athens2" | "Athens3"; + +export type ZRC20 = "gETH" | "tBNB" | "tBTC" | "tMATIC"; + +//@dev: Legacy addresses to make it simple if is needed to run a script pointing to Athens2 +const ATHENS2_SYSTEM_CONTRACT = "0x239e96c8f17C85c30100AC26F635Ea15f23E9c67"; +const ATHENS2_ZRC20Addresses: Record = { + gETH: "0x91d18e54DAf4F677cB28167158d6dd21F6aB3921", + tBNB: "0x13A0c5930C028511Dc02665E7285134B6d11A5f4", + tBTC: "0x48f80608B672DC30DC7e3dbBd0343c5F02C738Eb", + tMATIC: "0xd97B1de3619ed2c6BEb3860147E30cA8A7dC9891" +}; + +export const getSystemContractAddress = (version: AthensVersion = "Athens3") => { + if (version === "Athens2") { + return ATHENS2_SYSTEM_CONTRACT; + } + return getAddress("systemContract", "zeta_testnet"); +}; + +export const getZRC20Address = (version: AthensVersion = "Athens3") => { + if (version === "Athens2") { + return ATHENS2_ZRC20Addresses; + } + const ZRC20Addresses: Record = { + gETH: getZRC20AddressFromProtocol("bsc_testnet"), + tBNB: getZRC20AddressFromProtocol("bsc_testnet"), + // tBTC: getZRC20AddressFromProtocol(""), + tBTC: "0x0", + tMATIC: getZRC20AddressFromProtocol("mumbai_testnet") + }; + + return ZRC20Addresses; +}; + +export type SwappableNetwork = Extract; + +export const isSwappableNetwork = (network: string): network is SwappableNetwork => + network === "bitcoin-test" || network === "bsc-testnet" || network === "goerli" || network === "polygon-mumbai"; + +export const ChainToZRC20: Record = { + "bitcoin-test": "tBTC", + "bsc-testnet": "tBNB", + goerli: "gETH", + "polygon-mumbai": "tMATIC" +}; diff --git a/packages/addresses/src/addresses.athens.json b/packages/addresses/src/addresses.athens.json index cf5c2285..f488b19a 100644 --- a/packages/addresses/src/addresses.athens.json +++ b/packages/addresses/src/addresses.athens.json @@ -1,16 +1,16 @@ { "bsc-testnet": { - "connector": "0x000054d3A0Bc83Ec7808F52fCdC28A96c89F6C5c", + "connector": "0x0000ecb8cdd25a18f12daa23f6422e07fbf8b9e1", "crossChainCounter": "", - "crossChainNft": "0xF7f6534C8f70f6001Fc267b55abfAA8B8a41Ea2e", + "crossChainNft": "", "dai": "", "immutableCreate2Factory": "0x095a03c6a68137fE9a566bBc3e552F299d8b886d", - "multiChainSwap": "0xa0b5cbdc4d14c4f4d36483ec0de310919f3b2d90", + "multiChainSwap": "", "multiChainSwapZetaConnector": "", - "multiChainValue": "0x54284C0b4948FE2F93D3a0Dc17fA3587b16eE19F", + "multiChainValue": "0x064516547ECd3b2D1709e1b2798Aae92b1C8a84C", "tridentPoolFactory": "", - "tss": "0x7c125C1d515b8945841b3d5144a060115C58725F", - "tssUpdater": "0x7274d1d5dddef36aac53dd45b93487ce01ef0a55", + "tss": "0x8531a5aB847ff5B22D855633C25ED1DA3255247e", + "tssUpdater": "0x55122f7590164Ac222504436943FAB17B62F5d7d", "uniswapV2Factory": "", "uniswapV2Router02": "0x9Ac64Cc6e4415144C455BD8E4837Fea55603e5c3", "uniswapV3NftManager": "", @@ -20,22 +20,22 @@ "weth9": "", "zetaSwap": "", "zetaSwapBtcInbound": "", - "zetaToken": "0x000080383847bd75f91c168269aa74004877592f", - "zetaTokenConsumerUniV2": "0xa67b03930eb53d0462dCc0835e97964C062042fb", + "zetaToken": "0x0000c9ec4042283e8139c74f4c64bcd1e0b9b54f", + "zetaTokenConsumerUniV2": "", "zetaTokenConsumerUniV3": "" }, "goerli": { - "connector": "0x00007d0BA516a2bA02D77907d3a1348C1187Ae62", + "connector": "0x00005e3125aba53c5652f9f0ce1a4cf91d8b15ea", "crossChainCounter": "", - "crossChainNft": "0xfE9eb065cab82421D06C8eD41c31Beb473a5Fa7e", + "crossChainNft": "", "dai": "", "immutableCreate2Factory": "0x095a03c6a68137fE9a566bBc3e552F299d8b886d", - "multiChainSwap": "0x805fE47D1FE7d86496753bB4B36206953c1ae660", + "multiChainSwap": "", "multiChainSwapZetaConnector": "", - "multiChainValue": "0x31F884940B3876290A16B183b841bbE7E4965743", + "multiChainValue": "0x14BeC0E4A8e7bF7A02Af54Ad81a57a9fcA4D37Fd", "tridentPoolFactory": "", - "tss": "0x7c125C1d515b8945841b3d5144a060115C58725F", - "tssUpdater": "0x7274d1d5dddef36aac53dd45b93487ce01ef0a55", + "tss": "0x8531a5aB847ff5B22D855633C25ED1DA3255247e", + "tssUpdater": "0x55122f7590164Ac222504436943FAB17B62F5d7d", "uniswapV2Factory": "", "uniswapV2Router02": "0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D", "uniswapV3NftManager": "", @@ -45,22 +45,22 @@ "weth9": "", "zetaSwap": "", "zetaSwapBtcInbound": "", - "zetaToken": "0xCc7bb2D219A0FC08033E130629C2B854b7bA9195", - "zetaTokenConsumerUniV2": "0xDDB1C86c69f258F6d33377a8725404E4393326bB", + "zetaToken": "0x0000c304d2934c00db1d51995b9f6996affd17c0", + "zetaTokenConsumerUniV2": "", "zetaTokenConsumerUniV3": "" }, "polygon-mumbai": { - "connector": "0x000054d3A0Bc83Ec7808F52fCdC28A96c89F6C5c", + "connector": "0x00005e3125aba53c5652f9f0ce1a4cf91d8b15ea", "crossChainCounter": "", "crossChainNft": "", "dai": "", "immutableCreate2Factory": "0x095a03c6a68137fE9a566bBc3e552F299d8b886d", - "multiChainSwap": "0xaf28cb0d9E045170E1642321B964740784E7dC64", + "multiChainSwap": "", "tridentPoolFactory": "", "multiChainSwapZetaConnector": "", - "multiChainValue": "0x15D434879B65d7008Dec00f191e578D8E90D026b", - "tss": "0x7c125C1d515b8945841b3d5144a060115C58725F", - "tssUpdater": "0x7274d1d5dddef36aac53dd45b93487ce01ef0a55", + "multiChainValue": "0x14BeC0E4A8e7bF7A02Af54Ad81a57a9fcA4D37Fd", + "tss": "0x8531a5aB847ff5B22D855633C25ED1DA3255247e", + "tssUpdater": "0x55122f7590164Ac222504436943FAB17B62F5d7d", "uniswapV2Factory": "", "uniswapV2Router02": "0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D", "uniswapV3NftManager": "", @@ -70,18 +70,17 @@ "weth9": "0x9c3C9283D3e44854697Cd22D3Faa240Cfb032889", "zetaSwap": "", "zetaSwapBtcInbound": "", - "zetaToken": "0x000080383847bd75f91c168269aa74004877592f", + "zetaToken": "0x0000c9ec4042283e8139c74f4c64bcd1e0b9b54f", "zetaTokenConsumerUniV2": "", - "zetaTokenConsumerUniV3": "0xCa7185cA7AB06fA60060d4D65C50b6883cc70419" + "zetaTokenConsumerUniV3": "" }, - "ropsten": { + "klaytn-baobab": { "connector": "", "crossChainCounter": "", "crossChainNft": "", "dai": "", "immutableCreate2Factory": "", "multiChainSwap": "", - "multiChainSwapZetaConnector": "", "multiChainValue": "", "tridentPoolFactory": "", "tss": "", @@ -99,30 +98,6 @@ "zetaTokenConsumerUniV2": "", "zetaTokenConsumerUniV3": "" }, - "klaytn-baobab": { - "connector": "0x000054d3A0Bc83Ec7808F52fCdC28A96c89F6C5c", - "crossChainCounter": "", - "crossChainNft": "", - "dai": "", - "immutableCreate2Factory": "0x095a03c6a68137fE9a566bBc3e552F299d8b886d", - "multiChainSwap": "0xf254632444601120166809AB7B0A4fC59a3d8A61", - "multiChainValue": "0x4f97Bc7ed459111296583e92a62f17D20B20825d", - "tridentPoolFactory": "0x2be2C91cCA2df52b41a9e42723c46fD029359c95", - "tss": "0x7c125C1d515b8945841b3d5144a060115C58725F", - "tssUpdater": "0x7274d1d5dddef36aac53dd45b93487ce01ef0a55", - "uniswapV2Factory": "", - "uniswapV2Router02": "", - "uniswapV3NftManager": "", - "uniswapV3Quoter": "0x42271971dbF42fbfEaF7F428604a86760300cB5B", - "uniswapV3Router": "0x42271971dbF42fbfEaF7F428604a86760300cB5B", - "usdc": "", - "weth9": "0x0339d5Eb6D195Ba90B13ed1BCeAa97EbD198b106", - "zetaSwap": "", - "zetaSwapBtcInbound": "", - "zetaToken": "0x000080383847bD75F91c168269Aa74004877592f", - "zetaTokenConsumerUniV2": "", - "zetaTokenConsumerUniV3": "" - }, "athens": { "connector": "", "crossChainCounter": "", @@ -142,8 +117,8 @@ "uniswapV3Router": "", "usdc": "", "weth9": "0x5F0b1a82749cb4E2278EC87F8BF6B618dC71a8bf", - "zetaSwap": "0x71Ec5c05Aa669c4922569c1D33F7a81aaa218138", - "zetaSwapBtcInbound": "0x79c73Ba355f84feFFcDA2D2Cd4D61b9c795919Cc", + "zetaSwap": "0xd886b7Af031F9a505310bA01951948BD1d673aF1", + "zetaSwapBtcInbound": "0x064516547ECd3b2D1709e1b2798Aae92b1C8a84C", "zetaToken": "", "zetaTokenConsumerUniV2": "", "zetaTokenConsumerUniV3": "" diff --git a/packages/addresses/src/addresses.helpers.ts b/packages/addresses/src/addresses.helpers.ts index b6a9e437..a2dbd5cb 100644 --- a/packages/addresses/src/addresses.helpers.ts +++ b/packages/addresses/src/addresses.helpers.ts @@ -85,15 +85,13 @@ export type TestnetNetworkName = | "bsc-testnet" | "goerli" | "klaytn-baobab" - | "polygon-mumbai" - | "ropsten"; + | "polygon-mumbai"; export type ZetaTestnetNetworkName = "athens"; export type TestnetAddressGroup = Record; export const isTestnetNetworkName = (networkName: string): networkName is TestnetNetworkName => networkName === "goerli" || networkName === "bsc-testnet" || networkName === "polygon-mumbai" || - networkName === "ropsten" || networkName === "klaytn-baobab" || networkName === "athens"; export const isZetaTestnet = (networkName: string | undefined): networkName is ZetaTestnetNetworkName => @@ -139,8 +137,7 @@ export const getChainId = (networkName: NetworkName) => { "klaytn-baobab": 1001, "klaytn-cypress": 8217, "polygon-localnet": 80001, - "polygon-mumbai": 80001, - ropsten: 3 + "polygon-mumbai": 80001 }; return chainIds[networkName]; diff --git a/packages/example-contracts/lib/shared/network.constants.ts b/packages/example-contracts/lib/shared/network.constants.ts index c4489629..47319b47 100644 --- a/packages/example-contracts/lib/shared/network.constants.ts +++ b/packages/example-contracts/lib/shared/network.constants.ts @@ -81,12 +81,6 @@ export const networkVariables: Record = { connectorAddress: "", crossChainId: 0, crossChainName: "" - }, - ropsten: { - chainId: 0, - connectorAddress: "", - crossChainId: 0, - crossChainName: "" } }; diff --git a/packages/zeta-app-contracts/scripts/multi-chain-value/deploy.ts b/packages/zeta-app-contracts/scripts/multi-chain-value/deploy.ts index 1408ac04..cdc2158a 100644 --- a/packages/zeta-app-contracts/scripts/multi-chain-value/deploy.ts +++ b/packages/zeta-app-contracts/scripts/multi-chain-value/deploy.ts @@ -21,7 +21,6 @@ async function main() { const contract = (await Factory.deploy(connectorAddress, zetaTokenAddress)) as MultiChainValue; await contract.deployed(); - //@ts-expect-error console.log("MultiChainValue deployed to:", contract.address); if (isZetaTestnet(ZETA_NETWORK)) { @@ -42,7 +41,6 @@ async function main() { (await (await contract.addAvailableChainId(getChainId("athens"))).wait().catch((e: any) => console.error(e))); } - //@ts-expect-error saveAddress("multiChainValue", contract.address); } diff --git a/packages/zeta-app-contracts/scripts/multi-chain-value/send-value.ts b/packages/zeta-app-contracts/scripts/multi-chain-value/send-value.ts index 19dc237a..b1d0d28d 100644 --- a/packages/zeta-app-contracts/scripts/multi-chain-value/send-value.ts +++ b/packages/zeta-app-contracts/scripts/multi-chain-value/send-value.ts @@ -17,7 +17,8 @@ async function main() { const amount = parseEther("1"); - await zetaToken.approve(multiChainValueContract.address, amount.mul(10)); + const tx = await zetaToken.approve(multiChainValueContract.address, amount.mul(10)); + await tx.wait(); if (isZetaTestnet(ZETA_NETWORK)) { networkName !== "goerli" && @@ -56,10 +57,10 @@ async function main() { ) ).wait()); - networkName !== "ropsten" && + networkName !== "athens" && (await ( await multiChainValueContract.send( - getChainId("ropsten"), + getChainId("athens"), ethers.utils.solidityPack(["address"], [process.env.PUBLIC_KEY_1]), amount ) diff --git a/packages/zevm-app-contracts/scripts/deploy.ts b/packages/zevm-app-contracts/scripts/deploy.ts index 06d1f2b4..1f987b64 100644 --- a/packages/zevm-app-contracts/scripts/deploy.ts +++ b/packages/zevm-app-contracts/scripts/deploy.ts @@ -1,6 +1,7 @@ import { BigNumber } from "@ethersproject/bignumber"; import { SignerWithAddress } from "@nomiclabs/hardhat-ethers/signers"; import { getChainId, isNetworkName, NetworkName } from "@zetachain/addresses"; +import { getSystemContractAddress } from "@zetachain/addresses-tools"; import { parseEther } from "ethers/lib/utils"; import { ethers, network } from "hardhat"; @@ -17,10 +18,7 @@ const networkName = network.name; const REWARD_DURATION = BigNumber.from("604800"); // 1 week const REWARDS_AMOUNT = parseEther("10"); -//@todo: this is here because need to import address pkg but this pkg will be move to new repo, -// so will refactor when it will be done - -export const SYSTEM_CONTRACT = "0x239e96c8f17C85c30100AC26F635Ea15f23E9c67"; +const SYSTEM_CONTRACT = getSystemContractAddress(); interface Pair { TokenA: string; diff --git a/packages/zevm-example-contracts/scripts/multi-output/deploy.ts b/packages/zevm-example-contracts/scripts/multi-output/deploy.ts index 82070567..63847095 100644 --- a/packages/zevm-example-contracts/scripts/multi-output/deploy.ts +++ b/packages/zevm-example-contracts/scripts/multi-output/deploy.ts @@ -1,10 +1,11 @@ +import { getSystemContractAddress } from "@zetachain/addresses-tools"; import { ethers } from "hardhat"; import { ZetaMultiOutput, ZetaMultiOutput__factory } from "../../typechain-types"; -import { SYSTEM_CONTRACT } from "../systemConstants"; const main = async () => { console.log(`Deploying MultiOutput...`); + const SYSTEM_CONTRACT = getSystemContractAddress(); const Factory = (await ethers.getContractFactory("ZetaMultiOutput")) as ZetaMultiOutput__factory; const contract = (await Factory.deploy(SYSTEM_CONTRACT)) as ZetaMultiOutput; diff --git a/packages/zevm-example-contracts/scripts/systemConstants.ts b/packages/zevm-example-contracts/scripts/systemConstants.ts deleted file mode 100644 index 9349b55e..00000000 --- a/packages/zevm-example-contracts/scripts/systemConstants.ts +++ /dev/null @@ -1,24 +0,0 @@ -import { isNetworkName, NetworkName } from "@zetachain/addresses"; - -export const SYSTEM_CONTRACT = "0x239e96c8f17C85c30100AC26F635Ea15f23E9c67"; - -export type ZRC20 = "gETH" | "tBNB" | "tBTC" | "tMATIC"; - -export const ZRC20Addresses: Record = { - gETH: "0x91d18e54DAf4F677cB28167158d6dd21F6aB3921", - tBNB: "0x13A0c5930C028511Dc02665E7285134B6d11A5f4", - tBTC: "0x48f80608B672DC30DC7e3dbBd0343c5F02C738Eb", - tMATIC: "0xd97B1de3619ed2c6BEb3860147E30cA8A7dC9891" -}; - -export type SwappableNetwork = Extract; - -export const isSwappableNetwork = (network: string): network is SwappableNetwork => - network === "bitcoin-test" || network === "bsc-testnet" || network === "goerli" || network === "polygon-mumbai"; - -export const ChainToZRC20: Record = { - "bitcoin-test": "tBTC", - "bsc-testnet": "tBNB", - goerli: "gETH", - "polygon-mumbai": "tMATIC" -}; diff --git a/packages/zevm-example-contracts/scripts/zeta-swap/add-liquidity-zeta-uniswap.ts b/packages/zevm-example-contracts/scripts/zeta-swap/add-liquidity-zeta-uniswap.ts index 8a0815cb..787f8d69 100644 --- a/packages/zevm-example-contracts/scripts/zeta-swap/add-liquidity-zeta-uniswap.ts +++ b/packages/zevm-example-contracts/scripts/zeta-swap/add-liquidity-zeta-uniswap.ts @@ -4,7 +4,7 @@ import { SignerWithAddress } from "@nomiclabs/hardhat-ethers/signers"; import { getChainId } from "@zetachain/addresses"; import { NetworkName } from "@zetachain/addresses"; import { getAddress } from "@zetachain/addresses"; -import { getGasSymbolByNetwork } from "@zetachain/addresses-tools"; +import { getGasSymbolByNetwork, getSystemContractAddress } from "@zetachain/addresses-tools"; import { BigNumber } from "ethers"; import { ethers } from "hardhat"; @@ -17,7 +17,8 @@ import { SystemContract__factory, UniswapV2Router02__factory } from "../../typechain-types"; -import { SYSTEM_CONTRACT } from "../systemConstants"; + +const SYSTEM_CONTRACT = getSystemContractAddress(); const BTC_TO_ADD = parseUnits("0", 8); const ETH_TO_ADD = parseUnits("1500"); diff --git a/packages/zevm-example-contracts/scripts/zeta-swap/deploy.ts b/packages/zevm-example-contracts/scripts/zeta-swap/deploy.ts index 3b88997e..27456e2a 100644 --- a/packages/zevm-example-contracts/scripts/zeta-swap/deploy.ts +++ b/packages/zevm-example-contracts/scripts/zeta-swap/deploy.ts @@ -1,11 +1,11 @@ -import { saveAddress } from "@zetachain/addresses-tools"; +import { getSystemContractAddress, saveAddress } from "@zetachain/addresses-tools"; import { ethers } from "hardhat"; import { ZetaSwap, ZetaSwap__factory, ZetaSwapBtcInbound, ZetaSwapBtcInbound__factory } from "../../typechain-types"; -import { SYSTEM_CONTRACT } from "../systemConstants"; const main = async () => { console.log(`Deploying ZetaSwap...`); + const SYSTEM_CONTRACT = getSystemContractAddress(); const Factory = (await ethers.getContractFactory("ZetaSwap")) as ZetaSwap__factory; const contract = (await Factory.deploy(SYSTEM_CONTRACT)) as ZetaSwap; diff --git a/packages/zevm-example-contracts/scripts/zeta-swap/get-system-data.ts b/packages/zevm-example-contracts/scripts/zeta-swap/get-system-data.ts index 42a71b7b..fddb9f7b 100644 --- a/packages/zevm-example-contracts/scripts/zeta-swap/get-system-data.ts +++ b/packages/zevm-example-contracts/scripts/zeta-swap/get-system-data.ts @@ -1,10 +1,9 @@ import { getChainId } from "@zetachain/addresses"; import { NetworkName } from "@zetachain/addresses"; -import { getGasSymbolByNetwork } from "@zetachain/addresses-tools"; +import { getGasSymbolByNetwork, getSystemContractAddress } from "@zetachain/addresses-tools"; import { ethers } from "hardhat"; import { SystemContract, SystemContract__factory } from "../../typechain-types"; -import { SYSTEM_CONTRACT } from "../systemConstants"; const getZRC20Address = async (systemContract: SystemContract, network: NetworkName) => { const tokenAddress = await systemContract.gasCoinZRC20ByChainId(getChainId(network)); @@ -15,6 +14,7 @@ const getZRC20Address = async (systemContract: SystemContract, network: NetworkN async function main() { const [deployer] = await ethers.getSigners(); + const SYSTEM_CONTRACT = getSystemContractAddress(); const systemContract = await SystemContract__factory.connect(SYSTEM_CONTRACT, deployer); const uniswapFactoryAddress = await systemContract.uniswapv2FactoryAddress(); diff --git a/packages/zevm-example-contracts/scripts/zeta-swap/stress-swap.ts b/packages/zevm-example-contracts/scripts/zeta-swap/stress-swap.ts index d76d3c77..3c55596b 100644 --- a/packages/zevm-example-contracts/scripts/zeta-swap/stress-swap.ts +++ b/packages/zevm-example-contracts/scripts/zeta-swap/stress-swap.ts @@ -11,11 +11,13 @@ import { BigNumber } from "@ethersproject/bignumber"; import { formatEther, parseEther } from "@ethersproject/units"; import { SignerWithAddress } from "@nomiclabs/hardhat-ethers/signers"; import { getAddress } from "@zetachain/addresses"; +import { ChainToZRC20, getZRC20Address, isSwappableNetwork, SwappableNetwork } from "@zetachain/addresses-tools"; import { ethers, network } from "hardhat"; -import { ChainToZRC20, isSwappableNetwork, SwappableNetwork, ZRC20Addresses } from "../systemConstants"; import { getSwapData } from "./helpers"; +const ZRC20Addresses = getZRC20Address(); + interface SwapToChainParams { destinationNetwork: SwappableNetwork; nonce: number; diff --git a/packages/zevm-example-contracts/scripts/zeta-swap/swap-on-zevm.ts b/packages/zevm-example-contracts/scripts/zeta-swap/swap-on-zevm.ts index 0293cda2..14d660c9 100644 --- a/packages/zevm-example-contracts/scripts/zeta-swap/swap-on-zevm.ts +++ b/packages/zevm-example-contracts/scripts/zeta-swap/swap-on-zevm.ts @@ -1,11 +1,11 @@ import { BigNumber } from "@ethersproject/bignumber"; import { parseUnits } from "@ethersproject/units"; import { getAddress, isZetaNetworkName } from "@zetachain/addresses"; +import { getZRC20Address } from "@zetachain/addresses-tools"; import { ethers } from "hardhat"; import { network } from "hardhat"; import { ERC20__factory, ZetaSwap__factory, ZetaSwapBtcInbound__factory } from "../../typechain-types"; -import { ZRC20Addresses } from "../systemConstants"; import { getSwapParams } from "./helpers"; const USE_BTC_SWAP = true; @@ -14,6 +14,8 @@ const SAMPLE_MEMO = "0x25A92a5853702F199bb2d805Bba05d67025214A800000005"; // 0xA const main = async () => { if (!isZetaNetworkName(network.name) || !network.name) throw new Error("Invalid network name"); const [signer] = await ethers.getSigners(); + + const ZRC20Addresses = getZRC20Address(); const zetaSwap = getAddress({ address: USE_BTC_SWAP ? "zetaSwapBtcInbound" : "zetaSwap", networkName: "athens", diff --git a/packages/zevm-example-contracts/scripts/zeta-swap/swap.ts b/packages/zevm-example-contracts/scripts/zeta-swap/swap.ts index 0e4e475e..970af04c 100644 --- a/packages/zevm-example-contracts/scripts/zeta-swap/swap.ts +++ b/packages/zevm-example-contracts/scripts/zeta-swap/swap.ts @@ -1,14 +1,15 @@ import { BigNumber } from "@ethersproject/bignumber"; import { parseEther } from "@ethersproject/units"; import { getAddress, isNetworkName } from "@zetachain/addresses"; +import { getZRC20Address } from "@zetachain/addresses-tools"; import { ethers } from "hardhat"; import { network } from "hardhat"; -import { ZRC20Addresses } from "../systemConstants"; import { getSwapData } from "./helpers"; const main = async () => { if (!isNetworkName(network.name) || !network.name) throw new Error("Invalid network name"); + const ZRC20Addresses = getZRC20Address(); const destinationToken = network.name == "goerli" ? ZRC20Addresses["tMATIC"] : ZRC20Addresses["gETH"]; From 715d418d9a765534d825fea7631f6f383b4c9c81 Mon Sep 17 00:00:00 2001 From: Andres Martin Aiello <50411235+andresaiello@users.noreply.github.com> Date: Tue, 1 Aug 2023 13:48:09 -0300 Subject: [PATCH 084/115] Redeploy swap (#110) * Redeploy swap * upgrade protocol-contracts * redeploy contracts * update deployParams log * update yarn --- packages/addresses-tools/src/networks.ts | 2 +- packages/addresses/src/addresses.athens.json | 28 +++++++++---------- packages/addresses/src/addresses.helpers.ts | 4 +-- packages/addresses/src/addresses.mainnet.json | 6 ++-- packages/addresses/src/addresses.troy.json | 14 +++++----- .../MultiChainSwapUniV3.strategy.sol | 11 ++++++-- packages/example-contracts/package.json | 4 +-- .../deploy-multi-chain-swap-v3.ts | 14 +++++++--- .../deploy-multi-chain-swap.ts | 1 + yarn.lock | 10 +++---- 10 files changed, 54 insertions(+), 40 deletions(-) diff --git a/packages/addresses-tools/src/networks.ts b/packages/addresses-tools/src/networks.ts index ded55177..9fb86a5c 100644 --- a/packages/addresses-tools/src/networks.ts +++ b/packages/addresses-tools/src/networks.ts @@ -18,7 +18,7 @@ export const getHardhatConfigNetworks = (PRIVATE_KEYS: string[]): NetworksUserCo accounts: PRIVATE_KEYS, gas: 5000000, gasPrice: 80000000000, - url: `https://data-seed-prebsc-1-s1.binance.org:8545`, + url: `https://rpc.ankr.com/bsc_testnet_chapel`, }, "eth-localnet": { gas: 2100000, diff --git a/packages/addresses/src/addresses.athens.json b/packages/addresses/src/addresses.athens.json index f488b19a..2b4a74fa 100644 --- a/packages/addresses/src/addresses.athens.json +++ b/packages/addresses/src/addresses.athens.json @@ -5,19 +5,19 @@ "crossChainNft": "", "dai": "", "immutableCreate2Factory": "0x095a03c6a68137fE9a566bBc3e552F299d8b886d", - "multiChainSwap": "", + "multiChainSwap": "0x8BD7144Ddb59c9Fa3Dcf809998521E9cAD946fa1", "multiChainSwapZetaConnector": "", "multiChainValue": "0x064516547ECd3b2D1709e1b2798Aae92b1C8a84C", "tridentPoolFactory": "", "tss": "0x8531a5aB847ff5B22D855633C25ED1DA3255247e", "tssUpdater": "0x55122f7590164Ac222504436943FAB17B62F5d7d", "uniswapV2Factory": "", - "uniswapV2Router02": "0x9Ac64Cc6e4415144C455BD8E4837Fea55603e5c3", - "uniswapV3NftManager": "", - "uniswapV3Quoter": "", - "uniswapV3Router": "", + "uniswapV2Router02": "0xD99D1c33F9fC3444f8101754aBC46c52416550D1", + "uniswapV3PoolFactory": "", + "uniswapV3Quoter": "0x10ed43c718714eb63d5aa57b78b54704e256024e", + "uniswapV3Router": "0x10ed43c718714eb63d5aa57b78b54704e256024e", "usdc": "", - "weth9": "", + "weth9": "0xbb4cdb9cbd36b01bd1cbaebf2de08d9173bc095c", "zetaSwap": "", "zetaSwapBtcInbound": "", "zetaToken": "0x0000c9ec4042283e8139c74f4c64bcd1e0b9b54f", @@ -30,7 +30,7 @@ "crossChainNft": "", "dai": "", "immutableCreate2Factory": "0x095a03c6a68137fE9a566bBc3e552F299d8b886d", - "multiChainSwap": "", + "multiChainSwap": "0x323745f16C93e56a98012970c28788498d8B3a14", "multiChainSwapZetaConnector": "", "multiChainValue": "0x14BeC0E4A8e7bF7A02Af54Ad81a57a9fcA4D37Fd", "tridentPoolFactory": "", @@ -38,7 +38,7 @@ "tssUpdater": "0x55122f7590164Ac222504436943FAB17B62F5d7d", "uniswapV2Factory": "", "uniswapV2Router02": "0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D", - "uniswapV3NftManager": "", + "uniswapV3PoolFactory": "", "uniswapV3Quoter": "", "uniswapV3Router": "", "usdc": "", @@ -50,12 +50,12 @@ "zetaTokenConsumerUniV3": "" }, "polygon-mumbai": { - "connector": "0x00005e3125aba53c5652f9f0ce1a4cf91d8b15ea", + "connector": "0x0000ecb8cdd25a18f12daa23f6422e07fbf8b9e1", "crossChainCounter": "", "crossChainNft": "", "dai": "", "immutableCreate2Factory": "0x095a03c6a68137fE9a566bBc3e552F299d8b886d", - "multiChainSwap": "", + "multiChainSwap": "0xb1b812b664c28E1bA1d35De925Ae88b7Bc7cdCF5", "tridentPoolFactory": "", "multiChainSwapZetaConnector": "", "multiChainValue": "0x14BeC0E4A8e7bF7A02Af54Ad81a57a9fcA4D37Fd", @@ -63,7 +63,7 @@ "tssUpdater": "0x55122f7590164Ac222504436943FAB17B62F5d7d", "uniswapV2Factory": "", "uniswapV2Router02": "0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D", - "uniswapV3NftManager": "", + "uniswapV3PoolFactory": "0x1F98431c8aD98523631AE4a59f267346ea31F984", "uniswapV3Quoter": "0xb27308f9F90D607463bb33eA1BeBb41C27CE5AB6", "uniswapV3Router": "0xE592427A0AEce92De3Edee1F18E0157C05861564", "usdc": "", @@ -87,7 +87,7 @@ "tssUpdater": "", "uniswapV2Factory": "", "uniswapV2Router02": "", - "uniswapV3NftManager": "", + "uniswapV3PoolFactory": "", "uniswapV3Quoter": "", "uniswapV3Router": "", "usdc": "", @@ -112,7 +112,7 @@ "tssUpdater": "", "uniswapV2Factory": "0x9fd96203f7b22bCF72d9DCb40ff98302376cE09c", "uniswapV2Router02": "0x2ca7d64A7EFE2D62A725E2B35Cf7230D6677FfEe", - "uniswapV3NftManager": "", + "uniswapV3PoolFactory": "", "uniswapV3Quoter": "", "uniswapV3Router": "", "usdc": "", @@ -137,7 +137,7 @@ "tssUpdater": "", "uniswapV2Factory": "", "uniswapV2Router02": "", - "uniswapV3NftManager": "", + "uniswapV3PoolFactory": "", "uniswapV3Quoter": "", "uniswapV3Router": "", "usdc": "", diff --git a/packages/addresses/src/addresses.helpers.ts b/packages/addresses/src/addresses.helpers.ts index a2dbd5cb..c47a418d 100644 --- a/packages/addresses/src/addresses.helpers.ts +++ b/packages/addresses/src/addresses.helpers.ts @@ -16,7 +16,7 @@ export type ZetaAddress = | "tssUpdater" | "uniswapV2Factory" | "uniswapV2Router02" - | "uniswapV3NftManager" + | "uniswapV3PoolFactory" | "uniswapV3Quoter" | "uniswapV3Router" | "usdc" @@ -42,7 +42,7 @@ const zetaAddresses: Record = { tssUpdater: true, uniswapV2Factory: true, uniswapV2Router02: true, - uniswapV3NftManager: true, + uniswapV3PoolFactory: true, uniswapV3Quoter: true, uniswapV3Router: true, usdc: true, diff --git a/packages/addresses/src/addresses.mainnet.json b/packages/addresses/src/addresses.mainnet.json index 82bce6ee..180c8363 100644 --- a/packages/addresses/src/addresses.mainnet.json +++ b/packages/addresses/src/addresses.mainnet.json @@ -8,7 +8,7 @@ "tss": "", "tssUpdater": "", "uniswapV2Router02": "0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D", - "uniswapV3NftManager": "0xC36442b4a4522E871399CD717aBDD847Ab11FE88", + "uniswapV3PoolFactory": "0xC36442b4a4522E871399CD717aBDD847Ab11FE88", "uniswapV3Quoter": "0xb27308f9F90D607463bb33eA1BeBb41C27CE5AB6", "uniswapV3Router": "0xE592427A0AEce92De3Edee1F18E0157C05861564", "usdc": "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48", @@ -31,7 +31,7 @@ "tss": "", "tssUpdater": "", "uniswapV2Router02": "", - "uniswapV3NftManager": "", + "uniswapV3PoolFactory": "", "uniswapV3Quoter": "", "uniswapV3Router": "", "usdc": "", @@ -45,4 +45,4 @@ "uniswapV2Factory": "", "zetaSwap": "" } -} +} \ No newline at end of file diff --git a/packages/addresses/src/addresses.troy.json b/packages/addresses/src/addresses.troy.json index 18ad510f..c254b205 100644 --- a/packages/addresses/src/addresses.troy.json +++ b/packages/addresses/src/addresses.troy.json @@ -9,7 +9,7 @@ "tss": "0x70997970c51812dc3a010c7d01b50e0d17dc79c8", "tssUpdater": "0x70997970c51812dc3a010c7d01b50e0d17dc79c8", "uniswapV2Router02": "0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D", - "uniswapV3NftManager": "", + "uniswapV3PoolFactory": "", "uniswapV3Quoter": "", "uniswapV3Router": "", "usdc": "", @@ -27,12 +27,12 @@ "crossChainCounter": "", "crossChainNft": "", "dai": "", - "multiChainSwap":"", + "multiChainSwap": "", "multiChainValue": "", "tss": "0x8C001e2204000D8ED10cAcf0F68106b68e036A26", "tssUpdater": "0xfBec4048e09749515110c89D881EcDcA4460D377", "uniswapV2Router02": "", - "uniswapV3NftManager": "", + "uniswapV3PoolFactory": "", "uniswapV3Quoter": "", "uniswapV3Router": "", "usdc": "", @@ -50,12 +50,12 @@ "crossChainCounter": "", "crossChainNft": "", "dai": "", - "multiChainSwap":"", + "multiChainSwap": "", "multiChainValue": "", "tss": "0x8C001e2204000D8ED10cAcf0F68106b68e036A26", "tssUpdater": "0x12Dc2227AA4b98b00Ff8148fDA9Ef750929B0F68", "uniswapV2Router02": "", - "uniswapV3NftManager": "", + "uniswapV3PoolFactory": "", "uniswapV3Quoter": "", "uniswapV3Router": "", "usdc": "", @@ -73,12 +73,12 @@ "crossChainCounter": "", "crossChainNft": "", "dai": "", - "multiChainSwap":"", + "multiChainSwap": "", "multiChainValue": "", "tss": "0x8C001e2204000D8ED10cAcf0F68106b68e036A26", "tssUpdater": "0x78C18E214174A08Fc32e174fb203Aba05B016789", "uniswapV2Router02": "", - "uniswapV3NftManager": "", + "uniswapV3PoolFactory": "", "uniswapV3Quoter": "", "uniswapV3Router": "", "usdc": "", diff --git a/packages/example-contracts/contracts/multi-chain-swap/MultiChainSwapUniV3.strategy.sol b/packages/example-contracts/contracts/multi-chain-swap/MultiChainSwapUniV3.strategy.sol index 010a37f0..3dc44410 100644 --- a/packages/example-contracts/contracts/multi-chain-swap/MultiChainSwapUniV3.strategy.sol +++ b/packages/example-contracts/contracts/multi-chain-swap/MultiChainSwapUniV3.strategy.sol @@ -16,12 +16,19 @@ contract MultiChainSwapUniV3 is MultiChainSwap, ZetaInteractor, MultiChainSwapEr address zetaConnector_, address zetaToken_, address uniswapV3Router_, - address quoter_, + address uniswapV3Factory_, address WETH9Address_, uint24 zetaPoolFee_, uint24 tokenPoolFee_ ) - ZetaTokenConsumerUniV3(zetaToken_, uniswapV3Router_, quoter_, WETH9Address_, zetaPoolFee_, tokenPoolFee_) + ZetaTokenConsumerUniV3( + zetaToken_, + uniswapV3Router_, + uniswapV3Factory_, + WETH9Address_, + zetaPoolFee_, + tokenPoolFee_ + ) ZetaInteractor(zetaConnector_) {} diff --git a/packages/example-contracts/package.json b/packages/example-contracts/package.json index 3f6b1d57..e6b326e8 100644 --- a/packages/example-contracts/package.json +++ b/packages/example-contracts/package.json @@ -36,7 +36,7 @@ "@uniswap/v3-periphery": "1.1.0", "@zetachain/addresses": "workspace:^", "@zetachain/addresses-tools": "workspace:^", - "@zetachain/protocol-contracts": "^0.0.7", + "@zetachain/protocol-contracts": "^0.0.8", "ethers": "5.6.8" } -} +} \ No newline at end of file diff --git a/packages/example-contracts/scripts/multi-chain-swap/deploy-multi-chain-swap-v3.ts b/packages/example-contracts/scripts/multi-chain-swap/deploy-multi-chain-swap-v3.ts index d62811f9..6c82f687 100644 --- a/packages/example-contracts/scripts/multi-chain-swap/deploy-multi-chain-swap-v3.ts +++ b/packages/example-contracts/scripts/multi-chain-swap/deploy-multi-chain-swap-v3.ts @@ -4,6 +4,8 @@ import { network } from "hardhat"; import { getMultiChainSwapUniV3 } from "../../lib/multi-chain-swap/MultiChainSwap.helpers"; import { getAddress } from "../../lib/shared/address.helpers"; +import { GetContractParams } from "../../lib/shared/deploy.helpers"; +import { MultiChainSwapUniV3__factory } from "../../typechain-types"; export async function deployMultiChainSwap() { if (!isNetworkName(network.name) || !network.name) throw new Error("Invalid network name"); @@ -12,15 +14,19 @@ export async function deployMultiChainSwap() { const ZETA_TOKEN = getAddress("zetaToken"); - const UNI_QUOTER_V3 = getAddress("uniswapV3Quoter"); + const UNI_FACTORY_V3 = getAddress("uniswapV3PoolFactory"); const UNI_ROUTER_V3 = getAddress("uniswapV3Router"); const WETH = getAddress("weth9"); - const multiChainSwapContract = await getMultiChainSwapUniV3({ - deployParams: [CONNECTOR, ZETA_TOKEN, UNI_ROUTER_V3, UNI_QUOTER_V3, WETH, 500, 3000] - }); + const deployParams: GetContractParams = { + deployParams: [CONNECTOR, ZETA_TOKEN, UNI_ROUTER_V3, UNI_FACTORY_V3, WETH, 500, 3000] + }; + + console.log(deployParams); + + const multiChainSwapContract = await getMultiChainSwapUniV3(deployParams); saveAddress("multiChainSwap", multiChainSwapContract.address); } diff --git a/packages/example-contracts/scripts/multi-chain-swap/deploy-multi-chain-swap.ts b/packages/example-contracts/scripts/multi-chain-swap/deploy-multi-chain-swap.ts index 8ed8ce24..15adea60 100644 --- a/packages/example-contracts/scripts/multi-chain-swap/deploy-multi-chain-swap.ts +++ b/packages/example-contracts/scripts/multi-chain-swap/deploy-multi-chain-swap.ts @@ -7,6 +7,7 @@ import { getAddress } from "../../lib/shared/address.helpers"; export async function deployMultiChainSwap() { if (!isNetworkName(network.name) || !network.name) throw new Error("Invalid network name"); + console.log([getAddress("connector"), getAddress("zetaToken"), getAddress("uniswapV2Router02")]); const multiChainSwapContract = await getMultiChainSwapUniV2({ deployParams: [getAddress("connector"), getAddress("zetaToken"), getAddress("uniswapV2Router02")] diff --git a/yarn.lock b/yarn.lock index 8e0d4099..502aeaf5 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2726,7 +2726,7 @@ __metadata: "@uniswap/v3-periphery": 1.1.0 "@zetachain/addresses": "workspace:^" "@zetachain/addresses-tools": "workspace:^" - "@zetachain/protocol-contracts": ^0.0.7 + "@zetachain/protocol-contracts": ^0.0.8 ethers: 5.6.8 hardhat-gas-reporter: ^1.0.8 solidity-coverage: ^0.7.20 @@ -2741,10 +2741,10 @@ __metadata: languageName: node linkType: hard -"@zetachain/protocol-contracts@npm:^0.0.7": - version: 0.0.7 - resolution: "@zetachain/protocol-contracts@npm:0.0.7" - checksum: 83cf3d534878b5748479a18aec8702c45db74b92473cc1ab693562623e5e11a5270f4b5bd9ca52c1adc1ebeea5f5e5ebb9089be7d171a975cefbf37f586f8bd5 +"@zetachain/protocol-contracts@npm:^0.0.8": + version: 0.0.8 + resolution: "@zetachain/protocol-contracts@npm:0.0.8" + checksum: 050d31604636ba09e1ff7a0ba4d8341c50d0b78883b67c90018957697791afed41d0428f0423591d22bf6c088d0499c075243bb88860953376b539c25966bc2c languageName: node linkType: hard From 57d542b0ee681259f03584297663131f88eb3334 Mon Sep 17 00:00:00 2001 From: Andres Martin Aiello <50411235+andresaiello@users.noreply.github.com> Date: Mon, 7 Aug 2023 11:15:30 -0300 Subject: [PATCH 085/115] Add sendZeta to send contract (#108) --- packages/addresses/src/addresses.athens.json | 4 +- .../multi-chain-value/MultiChainValue.sol | 26 ++++++ .../contracts/shared/IWZeta.sol | 16 ++++ .../scripts/multi-chain-value/send-value.ts | 85 ++++++++----------- 4 files changed, 80 insertions(+), 51 deletions(-) create mode 100644 packages/zeta-app-contracts/contracts/shared/IWZeta.sol diff --git a/packages/addresses/src/addresses.athens.json b/packages/addresses/src/addresses.athens.json index 2b4a74fa..9c31fc2f 100644 --- a/packages/addresses/src/addresses.athens.json +++ b/packages/addresses/src/addresses.athens.json @@ -106,7 +106,7 @@ "immutableCreate2Factory": "", "multiChainSwap": "", "multiChainSwapZetaConnector": "", - "multiChainValue": "0x14BeC0E4A8e7bF7A02Af54Ad81a57a9fcA4D37Fd", + "multiChainValue": "0x82aC45D07dEe4DBDe050e838beF345347DEd99a8", "tridentPoolFactory": "", "tss": "", "tssUpdater": "", @@ -119,7 +119,7 @@ "weth9": "0x5F0b1a82749cb4E2278EC87F8BF6B618dC71a8bf", "zetaSwap": "0xd886b7Af031F9a505310bA01951948BD1d673aF1", "zetaSwapBtcInbound": "0x064516547ECd3b2D1709e1b2798Aae92b1C8a84C", - "zetaToken": "", + "zetaToken": "0x5F0b1a82749cb4E2278EC87F8BF6B618dC71a8bf", "zetaTokenConsumerUniV2": "", "zetaTokenConsumerUniV3": "" }, diff --git a/packages/zeta-app-contracts/contracts/multi-chain-value/MultiChainValue.sol b/packages/zeta-app-contracts/contracts/multi-chain-value/MultiChainValue.sol index e250ef3b..f27d05bf 100644 --- a/packages/zeta-app-contracts/contracts/multi-chain-value/MultiChainValue.sol +++ b/packages/zeta-app-contracts/contracts/multi-chain-value/MultiChainValue.sol @@ -5,6 +5,7 @@ import "@openzeppelin/contracts/access/Ownable.sol"; import "@zetachain/protocol-contracts/contracts/evm/Zeta.eth.sol"; import "@zetachain/protocol-contracts/contracts/evm/tools/ZetaInteractor.sol"; import "@zetachain/protocol-contracts/contracts/evm/interfaces/ZetaInterfaces.sol"; +import "../shared/IWZeta.sol"; /** * @dev Custom errors for contract MultiChainValue @@ -52,6 +53,31 @@ contract MultiChainValue is ZetaInteractor, MultiChainValueErrors { delete availableChainIds[destinationChainId]; } + /** + * @dev If the destination chain is a valid chain, send the Zeta tokens to that chain + */ + function sendZeta(uint256 destinationChainId, bytes calldata destinationAddress) public payable { + uint256 zetaValueAndGas = msg.value; + + if (!availableChainIds[destinationChainId]) revert InvalidDestinationChainId(); + if (zetaValueAndGas == 0) revert InvalidZetaValueAndGas(); + + IWZeta(zetaToken).deposit{value: zetaValueAndGas}(); + bool success1 = ZetaEth(zetaToken).approve(address(connector), zetaValueAndGas); + if (!success1) revert ErrorTransferringZeta(); + + connector.send( + ZetaInterfaces.SendInput({ + destinationChainId: destinationChainId, + destinationAddress: destinationAddress, + destinationGasLimit: 300000, + message: abi.encode(), + zetaValueAndGas: zetaValueAndGas, + zetaParams: abi.encode("") + }) + ); + } + /** * @dev If the destination chain is a valid chain, send the Zeta tokens to that chain */ diff --git a/packages/zeta-app-contracts/contracts/shared/IWZeta.sol b/packages/zeta-app-contracts/contracts/shared/IWZeta.sol new file mode 100644 index 00000000..1a9efe91 --- /dev/null +++ b/packages/zeta-app-contracts/contracts/shared/IWZeta.sol @@ -0,0 +1,16 @@ +// SPDX-License-Identifier: MIT +pragma solidity 0.8.7; + +interface IWZeta { + function deposit() external payable; + + function withdraw(uint wad) external; + + function totalSupply() external view returns (uint); + + function approve(address guy, uint wad) external returns (bool); + + function transfer(address dst, uint wad) external returns (bool); + + function transferFrom(address src, address dst, uint wad) external returns (bool); +} diff --git a/packages/zeta-app-contracts/scripts/multi-chain-value/send-value.ts b/packages/zeta-app-contracts/scripts/multi-chain-value/send-value.ts index b1d0d28d..44bb08ac 100644 --- a/packages/zeta-app-contracts/scripts/multi-chain-value/send-value.ts +++ b/packages/zeta-app-contracts/scripts/multi-chain-value/send-value.ts @@ -1,72 +1,59 @@ -import { getChainId, isNetworkName, isZetaTestnet } from "@zetachain/addresses"; +import { getChainId, isNetworkName, isZetaTestnet, NetworkName } from "@zetachain/addresses"; +import { BigNumber } from "ethers"; import { parseEther } from "ethers/lib/utils"; import { ethers, network } from "hardhat"; import { getMultiChainValue } from "../../lib/multi-chain-value/MultiChainValue.helpers"; import { getAddress } from "../../lib/shared/address.helpers"; import { getErc20 } from "../../lib/shared/deploy.helpers"; +import { MultiChainValue } from "../../typechain-types"; const networkName = network.name; const { ZETA_NETWORK } = process.env; -async function main() { +const doTranfer = async ( + sourceChain: NetworkName, + multiChainValueContract: MultiChainValue, + chainId: number, + amount: BigNumber, + destinationAddress: string +) => { + if (getChainId(sourceChain) == chainId) return; + + if (sourceChain === "athens") { + const tx = await multiChainValueContract.sendZeta(chainId, destinationAddress, { value: amount }); + await tx.wait(); + return; + } + + const tx = await multiChainValueContract.send(chainId, destinationAddress, amount); + await tx.wait(); +}; + +const main = async () => { if (!isNetworkName(networkName)) throw new Error("Invalid network name"); const multiChainValueContract = await getMultiChainValue(getAddress("multiChainValue")); - const zetaToken = await getErc20(getAddress("zetaToken")); + const [signer] = await ethers.getSigners(); const amount = parseEther("1"); - const tx = await zetaToken.approve(multiChainValueContract.address, amount.mul(10)); - await tx.wait(); + if (ZETA_NETWORK !== "athens") { + const zetaToken = await getErc20(getAddress("zetaToken")); + const tx = await zetaToken.approve(multiChainValueContract.address, amount.mul(10)); + await tx.wait(); + } if (isZetaTestnet(ZETA_NETWORK)) { - networkName !== "goerli" && - (await ( - await multiChainValueContract.send( - getChainId("goerli"), - ethers.utils.solidityPack(["address"], [process.env.PUBLIC_KEY_1]), - amount - ) - ).wait()); - - networkName !== "klaytn-baobab" && - (await ( - await multiChainValueContract.send( - getChainId("klaytn-baobab"), - ethers.utils.solidityPack(["address"], [process.env.PUBLIC_KEY_1]), - amount - ) - ).wait()); - - networkName !== "polygon-mumbai" && - (await ( - await multiChainValueContract.send( - getChainId("polygon-mumbai"), - ethers.utils.solidityPack(["address"], [process.env.PUBLIC_KEY_1]), - amount - ) - ).wait()); - - networkName !== "bsc-testnet" && - (await ( - await multiChainValueContract.send( - getChainId("bsc-testnet"), - ethers.utils.solidityPack(["address"], [process.env.PUBLIC_KEY_1]), - amount - ) - ).wait()); + const destinationAddress = ethers.utils.solidityPack(["address"], [process.env.PUBLIC_KEY_1 ?? signer.address]); - networkName !== "athens" && - (await ( - await multiChainValueContract.send( - getChainId("athens"), - ethers.utils.solidityPack(["address"], [process.env.PUBLIC_KEY_1]), - amount - ) - ).wait()); + await doTranfer(ZETA_NETWORK, multiChainValueContract, getChainId("goerli"), amount, destinationAddress); + // await doTranfer(ZETA_NETWORK, multiChainValueContract, getChainId("klaytn-baobab"), amount, destinationAddress); + await doTranfer(ZETA_NETWORK, multiChainValueContract, getChainId("polygon-mumbai"), amount, destinationAddress); + await doTranfer(ZETA_NETWORK, multiChainValueContract, getChainId("bsc-testnet"), amount, destinationAddress); + await doTranfer(ZETA_NETWORK, multiChainValueContract, getChainId("athens"), amount, destinationAddress); } -} +}; main().catch(error => { console.error(error); From 0d1e9ee95138cb50c8ed853c0155aa16cbd2008d Mon Sep 17 00:00:00 2001 From: Andres Martin Aiello <50411235+andresaiello@users.noreply.github.com> Date: Fri, 25 Aug 2023 11:39:53 -0300 Subject: [PATCH 086/115] Update ZetaChain repo to protocol-contracts 2.0 (#111) * Update ZetaChain repo to protocol-contracts 2.0 * fix * rename * rm extra file --- packages/addresses-tools/package.json | 2 +- .../src/system-addresses.helpers.ts | 4 +-- packages/example-contracts/package.json | 4 +-- packages/zeta-app-contracts/hardhat.config.ts | 2 ++ packages/zeta-app-contracts/package.json | 2 +- .../contracts/shared/TestSystemContract.sol | 2 +- .../contracts/shared/TestZRC20.sol | 2 +- packages/zevm-app-contracts/package.json | 2 +- .../test/LiquidityIncentives.spec.ts | 12 +++---- .../test/Synthetixio/StakingRewards.ts | 6 ++-- .../zevm-app-contracts/test/test.helpers.ts | 26 +++++++-------- .../multi-output/ZetaMultiOutput.sol | 12 ++++++- ...temContract.sol => MockSystemContract.sol} | 8 ++++- .../shared/{TestZRC20.sol => MockZRC20.sol} | 2 +- .../contracts/zeta-swap/ZetaCurveSwapDemo.sol | 7 +++- .../contracts/zeta-swap/ZetaSwap.sol | 12 ++++++- .../zeta-swap/ZetaSwapBtcInbound.sol | 14 ++++++-- packages/zevm-example-contracts/package.json | 2 +- .../test/MultipleOutput.spec.ts | 18 +++++------ .../zevm-example-contracts/test/Swap.spec.ts | 16 +++++----- .../test/test.helpers.ts | 26 +++++++-------- yarn.lock | 32 ++++++------------- 22 files changed, 121 insertions(+), 92 deletions(-) rename packages/zevm-example-contracts/contracts/shared/{TestSystemContract.sol => MockSystemContract.sol} (81%) rename packages/zevm-example-contracts/contracts/shared/{TestZRC20.sol => MockZRC20.sol} (97%) diff --git a/packages/addresses-tools/package.json b/packages/addresses-tools/package.json index 868556c2..9d239f32 100644 --- a/packages/addresses-tools/package.json +++ b/packages/addresses-tools/package.json @@ -19,6 +19,6 @@ }, "devDependencies": { "@zetachain/addresses": "workspace:^", - "@zetachain/protocol-contracts": "^1.0.1-athens3" + "@zetachain/protocol-contracts": "^2.0.1" } } diff --git a/packages/addresses-tools/src/system-addresses.helpers.ts b/packages/addresses-tools/src/system-addresses.helpers.ts index 5ca86bf2..6bb2e6d9 100644 --- a/packages/addresses-tools/src/system-addresses.helpers.ts +++ b/packages/addresses-tools/src/system-addresses.helpers.ts @@ -26,9 +26,9 @@ export const getZRC20Address = (version: AthensVersion = "Athens3") => { return ATHENS2_ZRC20Addresses; } const ZRC20Addresses: Record = { - gETH: getZRC20AddressFromProtocol("bsc_testnet"), + gETH: getZRC20AddressFromProtocol("goerli_testnet"), tBNB: getZRC20AddressFromProtocol("bsc_testnet"), - // tBTC: getZRC20AddressFromProtocol(""), + // tBTC: getZRC20AddressFromProtocol("bitcoin-test"), tBTC: "0x0", tMATIC: getZRC20AddressFromProtocol("mumbai_testnet") }; diff --git a/packages/example-contracts/package.json b/packages/example-contracts/package.json index e6b326e8..832a5f89 100644 --- a/packages/example-contracts/package.json +++ b/packages/example-contracts/package.json @@ -36,7 +36,7 @@ "@uniswap/v3-periphery": "1.1.0", "@zetachain/addresses": "workspace:^", "@zetachain/addresses-tools": "workspace:^", - "@zetachain/protocol-contracts": "^0.0.8", + "@zetachain/protocol-contracts": "^2.0.1", "ethers": "5.6.8" } -} \ No newline at end of file +} diff --git a/packages/zeta-app-contracts/hardhat.config.ts b/packages/zeta-app-contracts/hardhat.config.ts index 53562131..62cb5c23 100644 --- a/packages/zeta-app-contracts/hardhat.config.ts +++ b/packages/zeta-app-contracts/hardhat.config.ts @@ -29,6 +29,8 @@ const config: HardhatUserConfig = { { version: "0.5.10" /** For create2 factory */ }, { version: "0.6.6" /** For uniswap v2 */ }, { version: "0.8.7" }, + { version: "0.4.18" /** For WETH / WZETA */ }, + ], settings: { /** diff --git a/packages/zeta-app-contracts/package.json b/packages/zeta-app-contracts/package.json index 9fa1def8..060f68f4 100644 --- a/packages/zeta-app-contracts/package.json +++ b/packages/zeta-app-contracts/package.json @@ -32,7 +32,7 @@ "@openzeppelin/contracts": "^4.8.3", "@zetachain/addresses": "workspace:^", "@zetachain/addresses-tools": "workspace:^", - "@zetachain/protocol-contracts": "^1.0.1-athens3", + "@zetachain/protocol-contracts": "^2.0.1", "ethers": "5.6.8" } } diff --git a/packages/zevm-app-contracts/contracts/shared/TestSystemContract.sol b/packages/zevm-app-contracts/contracts/shared/TestSystemContract.sol index 15e6186e..ad00cc3b 100644 --- a/packages/zevm-app-contracts/contracts/shared/TestSystemContract.sol +++ b/packages/zevm-app-contracts/contracts/shared/TestSystemContract.sol @@ -14,7 +14,7 @@ interface SystemContractErrors { error CantBeZeroAddress(); } -contract TestSystemContract is SystemContractErrors { +contract MockSystemContract is SystemContractErrors { mapping(uint256 => uint256) public gasPriceByChainId; mapping(uint256 => address) public gasCoinZRC20ByChainId; mapping(uint256 => address) public gasZetaPoolByChainId; diff --git a/packages/zevm-app-contracts/contracts/shared/TestZRC20.sol b/packages/zevm-app-contracts/contracts/shared/TestZRC20.sol index 1d3ef364..49f5f334 100644 --- a/packages/zevm-app-contracts/contracts/shared/TestZRC20.sol +++ b/packages/zevm-app-contracts/contracts/shared/TestZRC20.sol @@ -6,7 +6,7 @@ import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import "./BytesHelperLib.sol"; -contract TestZRC20 is ERC20 { +contract MockZRC20 is ERC20 { constructor(uint256 initialSupply, string memory name, string memory symbol) ERC20(name, symbol) { _mint(msg.sender, initialSupply * (10 ** uint256(decimals()))); } diff --git a/packages/zevm-app-contracts/package.json b/packages/zevm-app-contracts/package.json index 04233d8c..4c77918b 100644 --- a/packages/zevm-app-contracts/package.json +++ b/packages/zevm-app-contracts/package.json @@ -33,7 +33,7 @@ "@uniswap/v2-periphery": "1.1.0-beta.0", "@zetachain/addresses": "workspace:^", "@zetachain/addresses-tools": "workspace:^", - "@zetachain/protocol-contracts": "^0.0.6", + "@zetachain/protocol-contracts": "^2.0.1", "ethers": "5.6.8" } } diff --git a/packages/zevm-app-contracts/test/LiquidityIncentives.spec.ts b/packages/zevm-app-contracts/test/LiquidityIncentives.spec.ts index 37e1beb2..5c22aa55 100644 --- a/packages/zevm-app-contracts/test/LiquidityIncentives.spec.ts +++ b/packages/zevm-app-contracts/test/LiquidityIncentives.spec.ts @@ -10,11 +10,11 @@ import { ethers, network } from "hardhat"; import { ERC20, IWETH, + MockSystemContract, + MockZRC20, RewardDistributor, RewardDistributorFactory, - RewardDistributorFactory__factory, - TestSystemContract, - TestZRC20 + RewardDistributorFactory__factory } from "../typechain-types"; import { evmSetup } from "./test.helpers"; @@ -25,9 +25,9 @@ const ERROR_TOLERANCE = parseEther("0.1"); describe("LiquidityIncentives tests", () => { let ZETA: IWETH; let ZETA_ERC20: ERC20; - let ZRC20Contracts: TestZRC20[]; - let ZRC20Contract: TestZRC20; - let systemContract: TestSystemContract; + let ZRC20Contracts: MockZRC20[]; + let ZRC20Contract: MockZRC20; + let systemContract: MockSystemContract; let accounts: SignerWithAddress[]; let deployer: SignerWithAddress; diff --git a/packages/zevm-app-contracts/test/Synthetixio/StakingRewards.ts b/packages/zevm-app-contracts/test/Synthetixio/StakingRewards.ts index f302f1d7..c76c67be 100644 --- a/packages/zevm-app-contracts/test/Synthetixio/StakingRewards.ts +++ b/packages/zevm-app-contracts/test/Synthetixio/StakingRewards.ts @@ -4,7 +4,7 @@ import { BigNumber } from "ethers"; import { parseEther } from "ethers/lib/utils"; import { ethers } from "hardhat"; -import { StakingRewards, StakingRewards__factory, TestZRC20, TestZRC20__factory } from "../../typechain-types"; +import { MockZRC20, MockZRC20__factory, StakingRewards, StakingRewards__factory } from "../../typechain-types"; const { assert, addSnapshotBeforeRestoreAfterEach } = require("./common"); @@ -13,8 +13,8 @@ const { currentTime, fastForward } = require("./utils")(); const toUnit = parseEther; const mockToken = async (acount: SignerWithAddress, name: string, symbol: string) => { - const ZRC20Factory = (await ethers.getContractFactory("TestZRC20")) as TestZRC20__factory; - const token = (await ZRC20Factory.connect(acount).deploy(parseUnits("1000000"), name, symbol)) as TestZRC20; + const ZRC20Factory = (await ethers.getContractFactory("MockZRC20")) as MockZRC20__factory; + const token = (await ZRC20Factory.connect(acount).deploy(parseUnits("1000000"), name, symbol)) as MockZRC20; return token; }; diff --git a/packages/zevm-app-contracts/test/test.helpers.ts b/packages/zevm-app-contracts/test/test.helpers.ts index 0bee3648..cad35d1c 100644 --- a/packages/zevm-app-contracts/test/test.helpers.ts +++ b/packages/zevm-app-contracts/test/test.helpers.ts @@ -4,14 +4,14 @@ import { SignerWithAddress } from "@nomiclabs/hardhat-ethers/signers"; import { ethers } from "hardhat"; import { - TestSystemContract, - TestSystemContract__factory, - TestZRC20, - TestZRC20__factory, + MockSystemContract, + MockSystemContract__factory, + MockZRC20, + MockZRC20__factory, UniswapV2Router02__factory } from "../typechain-types"; -const addZetaEthLiquidity = async (signer: SignerWithAddress, token: TestZRC20, uniswapRouterAddr: string) => { +const addZetaEthLiquidity = async (signer: SignerWithAddress, token: MockZRC20, uniswapRouterAddr: string) => { const block = await ethers.provider.getBlock("latest"); const tx1 = await token.approve(uniswapRouterAddr, MaxUint256); @@ -32,8 +32,8 @@ const addZetaEthLiquidity = async (signer: SignerWithAddress, token: TestZRC20, }; interface EvmSetupResult { - ZRC20Contracts: TestZRC20[]; - systemContract: TestSystemContract; + ZRC20Contracts: MockZRC20[]; + systemContract: MockSystemContract; } export const evmSetup = async ( @@ -43,21 +43,21 @@ export const evmSetup = async ( ): Promise => { const [signer] = await ethers.getSigners(); - const ZRC20Factory = (await ethers.getContractFactory("TestZRC20")) as TestZRC20__factory; + const ZRC20Factory = (await ethers.getContractFactory("MockZRC20")) as MockZRC20__factory; - const token1Contract = (await ZRC20Factory.deploy(parseUnits("1000000"), "tBNB", "tBNB")) as TestZRC20; - const token2Contract = (await ZRC20Factory.deploy(parseUnits("1000000"), "gETH", "gETH")) as TestZRC20; - const token3Contract = (await ZRC20Factory.deploy(parseUnits("1000000"), "tMATIC", "tMATIC")) as TestZRC20; + const token1Contract = (await ZRC20Factory.deploy(parseUnits("1000000"), "tBNB", "tBNB")) as MockZRC20; + const token2Contract = (await ZRC20Factory.deploy(parseUnits("1000000"), "gETH", "gETH")) as MockZRC20; + const token3Contract = (await ZRC20Factory.deploy(parseUnits("1000000"), "tMATIC", "tMATIC")) as MockZRC20; const ZRC20Contracts = [token1Contract, token2Contract, token3Contract]; - const SystemContractFactory = (await ethers.getContractFactory("TestSystemContract")) as TestSystemContract__factory; + const SystemContractFactory = (await ethers.getContractFactory("MockSystemContract")) as MockSystemContract__factory; const systemContract = (await SystemContractFactory.deploy( wGasToken, uniswapFactoryAddr, uniswapRouterAddr - )) as TestSystemContract; + )) as MockSystemContract; await systemContract.setGasCoinZRC20(97, ZRC20Contracts[0].address); await systemContract.setGasCoinZRC20(5, ZRC20Contracts[1].address); diff --git a/packages/zevm-example-contracts/contracts/multi-output/ZetaMultiOutput.sol b/packages/zevm-example-contracts/contracts/multi-output/ZetaMultiOutput.sol index acbc04cc..ec1cede1 100644 --- a/packages/zevm-example-contracts/contracts/multi-output/ZetaMultiOutput.sol +++ b/packages/zevm-example-contracts/contracts/multi-output/ZetaMultiOutput.sol @@ -21,6 +21,11 @@ contract ZetaMultiOutput is zContract, Ownable, ZetaMultiOutputErrors { systemContract = SystemContract(systemContractAddress); } + modifier onlySystem() { + require(msg.sender == address(systemContract), "Only system contract can call this function"); + _; + } + function registerDestinationToken(address destinationToken) external onlyOwner { destinationTokens.push(destinationToken); emit DestinationRegistered(destinationToken); @@ -36,7 +41,12 @@ contract ZetaMultiOutput is zContract, Ownable, ZetaMultiOutputErrors { return total; } - function onCrossChainCall(address zrc20, uint256 amount, bytes calldata message) external virtual override { + function onCrossChainCall( + zContext calldata context, + address zrc20, + uint256 amount, + bytes calldata message + ) external virtual override onlySystem { if (_getTotalTransfers(zrc20) == 0) revert NoAvailableTransfers(); address receipient = BytesHelperLib.bytesToAddress(message, 0); diff --git a/packages/zevm-example-contracts/contracts/shared/TestSystemContract.sol b/packages/zevm-example-contracts/contracts/shared/MockSystemContract.sol similarity index 81% rename from packages/zevm-example-contracts/contracts/shared/TestSystemContract.sol rename to packages/zevm-example-contracts/contracts/shared/MockSystemContract.sol index 3343bff5..0687e73a 100644 --- a/packages/zevm-example-contracts/contracts/shared/TestSystemContract.sol +++ b/packages/zevm-example-contracts/contracts/shared/MockSystemContract.sol @@ -14,7 +14,7 @@ interface SystemContractErrors { error CantBeZeroAddress(); } -contract TestSystemContract is SystemContractErrors { +contract MockSystemContract is SystemContractErrors { mapping(uint256 => uint256) public gasPriceByChainId; mapping(uint256 => address) public gasCoinZRC20ByChainId; mapping(uint256 => address) public gasZetaPoolByChainId; @@ -51,4 +51,10 @@ contract TestSystemContract is SystemContractErrors { wZetaContractAddress = addr; emit SetWZeta(wZetaContractAddress); } + + function onCrossChainCall(address target, address zrc20, uint256 amount, bytes calldata message) external { + zContext memory context = zContext({sender: msg.sender, origin: "", chainID: block.chainid}); + IZRC20(zrc20).transfer(target, amount); + zContract(target).onCrossChainCall(context, zrc20, amount, message); + } } diff --git a/packages/zevm-example-contracts/contracts/shared/TestZRC20.sol b/packages/zevm-example-contracts/contracts/shared/MockZRC20.sol similarity index 97% rename from packages/zevm-example-contracts/contracts/shared/TestZRC20.sol rename to packages/zevm-example-contracts/contracts/shared/MockZRC20.sol index 1d3ef364..49f5f334 100644 --- a/packages/zevm-example-contracts/contracts/shared/TestZRC20.sol +++ b/packages/zevm-example-contracts/contracts/shared/MockZRC20.sol @@ -6,7 +6,7 @@ import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import "./BytesHelperLib.sol"; -contract TestZRC20 is ERC20 { +contract MockZRC20 is ERC20 { constructor(uint256 initialSupply, string memory name, string memory symbol) ERC20(name, symbol) { _mint(msg.sender, initialSupply * (10 ** uint256(decimals()))); } diff --git a/packages/zevm-example-contracts/contracts/zeta-swap/ZetaCurveSwapDemo.sol b/packages/zevm-example-contracts/contracts/zeta-swap/ZetaCurveSwapDemo.sol index 885b2957..856bc216 100644 --- a/packages/zevm-example-contracts/contracts/zeta-swap/ZetaCurveSwapDemo.sol +++ b/packages/zevm-example-contracts/contracts/zeta-swap/ZetaCurveSwapDemo.sol @@ -50,7 +50,12 @@ contract ZetaCurveSwapDemo is zContract, ZetaCurveSwapErrors { IZRC20(targetZRC20).withdraw(abi.encodePacked(receipient), amount - gasFee); } - function onCrossChainCall(address zrc20, uint256 amount, bytes calldata message) external override { + function onCrossChainCall( + zContext calldata context, + address zrc20, + uint256 amount, + bytes calldata message + ) external override { (address targetZRC20, bytes32 receipient, ) = abi.decode(message, (address, bytes32, uint256)); address[] memory path = new address[](2); diff --git a/packages/zevm-example-contracts/contracts/zeta-swap/ZetaSwap.sol b/packages/zevm-example-contracts/contracts/zeta-swap/ZetaSwap.sol index feab5e7c..35eacc04 100644 --- a/packages/zevm-example-contracts/contracts/zeta-swap/ZetaSwap.sol +++ b/packages/zevm-example-contracts/contracts/zeta-swap/ZetaSwap.sol @@ -13,7 +13,17 @@ contract ZetaSwap is zContract { systemContract = SystemContract(systemContractAddress); } - function onCrossChainCall(address zrc20, uint256 amount, bytes calldata message) external virtual override { + modifier onlySystem() { + require(msg.sender == address(systemContract), "Only system contract can call this function"); + _; + } + + function onCrossChainCall( + zContext calldata context, + address zrc20, + uint256 amount, + bytes calldata message + ) external virtual override onlySystem { (address targetZRC20, bytes32 receipient, uint256 minAmountOut) = abi.decode( message, (address, bytes32, uint256) diff --git a/packages/zevm-example-contracts/contracts/zeta-swap/ZetaSwapBtcInbound.sol b/packages/zevm-example-contracts/contracts/zeta-swap/ZetaSwapBtcInbound.sol index 3a8e7230..cd85dd00 100644 --- a/packages/zevm-example-contracts/contracts/zeta-swap/ZetaSwapBtcInbound.sol +++ b/packages/zevm-example-contracts/contracts/zeta-swap/ZetaSwapBtcInbound.sol @@ -7,14 +7,24 @@ import "@zetachain/protocol-contracts/contracts/zevm/interfaces/zContract.sol"; import "../shared/BytesHelperLib.sol"; import "../shared/SwapHelperLib.sol"; -contract ZetaSwapBtcInbound { +contract ZetaSwapBtcInbound is zContract { SystemContract public immutable systemContract; constructor(address systemContractAddress) { systemContract = SystemContract(systemContractAddress); } - function onCrossChainCall(address zrc20, uint256 amount, bytes calldata message) external { + modifier onlySystem() { + require(msg.sender == address(systemContract), "Only system contract can call this function"); + _; + } + + function onCrossChainCall( + zContext calldata context, + address zrc20, + uint256 amount, + bytes calldata message + ) external virtual override onlySystem { address receipient = BytesHelperLib.bytesToAddress(message, 0); uint32 targetZRC20ChainId = BytesHelperLib.bytesToUint32(message, 20); address targetZRC20 = systemContract.gasCoinZRC20ByChainId(targetZRC20ChainId); diff --git a/packages/zevm-example-contracts/package.json b/packages/zevm-example-contracts/package.json index 9c43aa71..e38c3f5e 100644 --- a/packages/zevm-example-contracts/package.json +++ b/packages/zevm-example-contracts/package.json @@ -33,7 +33,7 @@ "@uniswap/v2-periphery": "1.1.0-beta.0", "@zetachain/addresses": "workspace:^", "@zetachain/addresses-tools": "workspace:^", - "@zetachain/protocol-contracts": "^0.0.6", + "@zetachain/protocol-contracts": "^2.0.1", "ethers": "5.6.8" } } diff --git a/packages/zevm-example-contracts/test/MultipleOutput.spec.ts b/packages/zevm-example-contracts/test/MultipleOutput.spec.ts index 4523d602..0d5be5bb 100644 --- a/packages/zevm-example-contracts/test/MultipleOutput.spec.ts +++ b/packages/zevm-example-contracts/test/MultipleOutput.spec.ts @@ -5,13 +5,13 @@ import { expect } from "chai"; import { ethers, network } from "hardhat"; import { getMultiOutputForTest } from "../scripts/zeta-swap/helpers"; -import { TestSystemContract, TestZRC20, ZetaMultiOutput, ZetaMultiOutput__factory } from "../typechain-types"; +import { MockSystemContract, MockZRC20, ZetaMultiOutput, ZetaMultiOutput__factory } from "../typechain-types"; import { evmSetup } from "./test.helpers"; describe("ZetaSwap tests", () => { let zetaMultiOutputContract: ZetaMultiOutput; - let ZRC20Contracts: TestZRC20[]; - let systemContract: TestSystemContract; + let ZRC20Contracts: MockZRC20[]; + let systemContract: MockSystemContract; let accounts: SignerWithAddress[]; let deployer: SignerWithAddress; @@ -60,10 +60,10 @@ describe("ZetaSwap tests", () => { const initBalanceToken2 = await ZRC20Contracts[2].balanceOf(deployer.address); const amount = parseUnits("10"); - await ZRC20Contracts[0].transfer(zetaMultiOutputContract.address, amount); + await ZRC20Contracts[0].transfer(systemContract.address, amount); const params = getMultiOutputForTest(deployer.address); - await zetaMultiOutputContract.onCrossChainCall(ZRC20Contracts[0].address, amount, params); + await systemContract.onCrossChainCall(zetaMultiOutputContract.address, ZRC20Contracts[0].address, amount, params); const endBalanceToken0 = await ZRC20Contracts[0].balanceOf(deployer.address); const endBalanceToken1 = await ZRC20Contracts[1].balanceOf(deployer.address); @@ -85,11 +85,11 @@ describe("ZetaSwap tests", () => { await zetaMultiOutputContract.deployed(); const amount = parseUnits("10"); - await ZRC20Contracts[0].transfer(zetaMultiOutputContract.address, amount); + await ZRC20Contracts[0].transfer(systemContract.address, amount); const params = getMultiOutputForTest(deployer.address); await expect( - zetaMultiOutputContract.onCrossChainCall(ZRC20Contracts[0].address, amount, params) + systemContract.onCrossChainCall(zetaMultiOutputContract.address, ZRC20Contracts[0].address, amount, params) ).to.be.revertedWith("NoAvailableTransfers"); }); @@ -100,11 +100,11 @@ describe("ZetaSwap tests", () => { zetaMultiOutputContract.registerDestinationToken(ZRC20Contracts[0].address); const amount = parseUnits("10"); - await ZRC20Contracts[0].transfer(zetaMultiOutputContract.address, amount); + await ZRC20Contracts[0].transfer(systemContract.address, amount); const params = getMultiOutputForTest(deployer.address); await expect( - zetaMultiOutputContract.onCrossChainCall(ZRC20Contracts[0].address, amount, params) + systemContract.onCrossChainCall(zetaMultiOutputContract.address, ZRC20Contracts[0].address, amount, params) ).to.be.revertedWith("NoAvailableTransfers"); }); }); diff --git a/packages/zevm-example-contracts/test/Swap.spec.ts b/packages/zevm-example-contracts/test/Swap.spec.ts index c8a497a2..9b3f4bc5 100644 --- a/packages/zevm-example-contracts/test/Swap.spec.ts +++ b/packages/zevm-example-contracts/test/Swap.spec.ts @@ -7,8 +7,8 @@ import { ethers, network } from "hardhat"; import { getBitcoinTxMemoForTest, getSwapParams } from "../scripts/zeta-swap/helpers"; import { - TestSystemContract, - TestZRC20, + MockSystemContract, + MockZRC20, ZetaSwap, ZetaSwap__factory, ZetaSwapBtcInbound, @@ -19,8 +19,8 @@ import { evmSetup } from "./test.helpers"; describe("ZetaSwap tests", () => { let zetaSwapContract: ZetaSwap; let zetaSwapBTCContract: ZetaSwapBtcInbound; - let ZRC20Contracts: TestZRC20[]; - let systemContract: TestSystemContract; + let ZRC20Contracts: MockZRC20[]; + let systemContract: MockSystemContract; let accounts: SignerWithAddress[]; let deployer: SignerWithAddress; @@ -65,12 +65,12 @@ describe("ZetaSwap tests", () => { describe("zetaSwap", () => { it("Should do swap", async () => { const amount = parseUnits("10"); - await ZRC20Contracts[0].transfer(zetaSwapContract.address, amount); + await ZRC20Contracts[0].transfer(systemContract.address, amount); const initBalance = await ZRC20Contracts[1].balanceOf(deployer.address); const params = getSwapParams(deployer.address, ZRC20Contracts[1].address, BigNumber.from(0)); - await zetaSwapContract.onCrossChainCall(ZRC20Contracts[0].address, amount, params); + await systemContract.onCrossChainCall(zetaSwapContract.address, ZRC20Contracts[0].address, amount, params); const endBalance = await ZRC20Contracts[1].balanceOf(deployer.address); expect(endBalance).to.be.gt(initBalance); @@ -80,12 +80,12 @@ describe("ZetaSwap tests", () => { describe("zetaSwapBTC", () => { it("Should do swap", async () => { const amount = parseUnits("1"); - await ZRC20Contracts[0].transfer(zetaSwapBTCContract.address, amount); + await ZRC20Contracts[0].transfer(systemContract.address, amount); const initBalance = await ZRC20Contracts[1].balanceOf(deployer.address); const params = getBitcoinTxMemoForTest(deployer.address, "5"); - await zetaSwapBTCContract.onCrossChainCall(ZRC20Contracts[0].address, amount, params); + await systemContract.onCrossChainCall(zetaSwapBTCContract.address, ZRC20Contracts[0].address, amount, params); const endBalance = await ZRC20Contracts[1].balanceOf(deployer.address); expect(endBalance).to.be.gt(initBalance); diff --git a/packages/zevm-example-contracts/test/test.helpers.ts b/packages/zevm-example-contracts/test/test.helpers.ts index b6a98e96..2cb1ae33 100644 --- a/packages/zevm-example-contracts/test/test.helpers.ts +++ b/packages/zevm-example-contracts/test/test.helpers.ts @@ -4,14 +4,14 @@ import { SignerWithAddress } from "@nomiclabs/hardhat-ethers/signers"; import { ethers } from "hardhat"; import { - TestSystemContract, - TestSystemContract__factory, - TestZRC20, - TestZRC20__factory, + MockSystemContract, + MockSystemContract__factory, + MockZRC20, + MockZRC20__factory, UniswapV2Router02__factory } from "../typechain-types"; -const addZetaEthLiquidity = async (signer: SignerWithAddress, token: TestZRC20, uniswapRouterAddr: string) => { +const addZetaEthLiquidity = async (signer: SignerWithAddress, token: MockZRC20, uniswapRouterAddr: string) => { const block = await ethers.provider.getBlock("latest"); const tx1 = await token.approve(uniswapRouterAddr, MaxUint256); @@ -32,8 +32,8 @@ const addZetaEthLiquidity = async (signer: SignerWithAddress, token: TestZRC20, }; interface EvmSetupResult { - ZRC20Contracts: TestZRC20[]; - systemContract: TestSystemContract; + ZRC20Contracts: MockZRC20[]; + systemContract: MockSystemContract; } export const evmSetup = async ( @@ -43,21 +43,21 @@ export const evmSetup = async ( ): Promise => { const [signer] = await ethers.getSigners(); - const ZRC20Factory = (await ethers.getContractFactory("TestZRC20")) as TestZRC20__factory; + const ZRC20Factory = (await ethers.getContractFactory("MockZRC20")) as MockZRC20__factory; - const token1Contract = (await ZRC20Factory.deploy(parseUnits("1000000"), "tBNB", "tBNB")) as TestZRC20; - const token2Contract = (await ZRC20Factory.deploy(parseUnits("1000000"), "gETH", "gETH")) as TestZRC20; - const token3Contract = (await ZRC20Factory.deploy(parseUnits("1000000"), "tMATIC", "tMATIC")) as TestZRC20; + const token1Contract = (await ZRC20Factory.deploy(parseUnits("1000000"), "tBNB", "tBNB")) as MockZRC20; + const token2Contract = (await ZRC20Factory.deploy(parseUnits("1000000"), "gETH", "gETH")) as MockZRC20; + const token3Contract = (await ZRC20Factory.deploy(parseUnits("1000000"), "tMATIC", "tMATIC")) as MockZRC20; const ZRC20Contracts = [token1Contract, token2Contract, token3Contract]; - const SystemContractFactory = (await ethers.getContractFactory("TestSystemContract")) as TestSystemContract__factory; + const SystemContractFactory = (await ethers.getContractFactory("MockSystemContract")) as MockSystemContract__factory; const systemContract = (await SystemContractFactory.deploy( wGasToken, uniswapFactoryAddr, uniswapRouterAddr - )) as TestSystemContract; + )) as MockSystemContract; await systemContract.setGasCoinZRC20(97, ZRC20Contracts[0].address); await systemContract.setGasCoinZRC20(5, ZRC20Contracts[1].address); diff --git a/yarn.lock b/yarn.lock index 502aeaf5..e128e04b 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2703,7 +2703,7 @@ __metadata: resolution: "@zetachain/addresses-tools@workspace:packages/addresses-tools" dependencies: "@zetachain/addresses": "workspace:^" - "@zetachain/protocol-contracts": ^1.0.1-athens3 + "@zetachain/protocol-contracts": ^2.0.1 languageName: unknown linkType: soft @@ -2726,7 +2726,7 @@ __metadata: "@uniswap/v3-periphery": 1.1.0 "@zetachain/addresses": "workspace:^" "@zetachain/addresses-tools": "workspace:^" - "@zetachain/protocol-contracts": ^0.0.8 + "@zetachain/protocol-contracts": ^2.0.1 ethers: 5.6.8 hardhat-gas-reporter: ^1.0.8 solidity-coverage: ^0.7.20 @@ -2734,24 +2734,10 @@ __metadata: languageName: unknown linkType: soft -"@zetachain/protocol-contracts@npm:^0.0.6": - version: 0.0.6 - resolution: "@zetachain/protocol-contracts@npm:0.0.6" - checksum: a35368ff57d1d49eb65034453acc9bb045378765af630cdca82cc6182536a90d6b2bbef23288b7154d25d2f878a4350d9764a52f83a09604e019f028a7a729db - languageName: node - linkType: hard - -"@zetachain/protocol-contracts@npm:^0.0.8": - version: 0.0.8 - resolution: "@zetachain/protocol-contracts@npm:0.0.8" - checksum: 050d31604636ba09e1ff7a0ba4d8341c50d0b78883b67c90018957697791afed41d0428f0423591d22bf6c088d0499c075243bb88860953376b539c25966bc2c - languageName: node - linkType: hard - -"@zetachain/protocol-contracts@npm:^1.0.1-athens3": - version: 1.0.1-athens3 - resolution: "@zetachain/protocol-contracts@npm:1.0.1-athens3" - checksum: b0877c78160ae233ef3786e2e62fa8352592c97711903c10bad9a9fe74683a4a28eaa242d4a5091f0aa594ea8879eb8e0cee108c3a1f61262756a04bb6e5a1a2 +"@zetachain/protocol-contracts@npm:^2.0.1": + version: 2.0.1 + resolution: "@zetachain/protocol-contracts@npm:2.0.1" + checksum: 1a5056e1f21b49be7975e9e4d98c429f7e53203ff194bcd262eeb9da91b48543149224b96e39e9808bf8fd55d5df5cc1c99de6e6626ad10541b3c2599a3f2477 languageName: node linkType: hard @@ -2763,7 +2749,7 @@ __metadata: "@openzeppelin/contracts": ^4.8.3 "@zetachain/addresses": "workspace:^" "@zetachain/addresses-tools": "workspace:^" - "@zetachain/protocol-contracts": ^1.0.1-athens3 + "@zetachain/protocol-contracts": ^2.0.1 ethers: 5.6.8 hardhat-gas-reporter: ^1.0.8 solidity-coverage: ^0.7.20 @@ -2779,7 +2765,7 @@ __metadata: "@uniswap/v2-periphery": 1.1.0-beta.0 "@zetachain/addresses": "workspace:^" "@zetachain/addresses-tools": "workspace:^" - "@zetachain/protocol-contracts": ^0.0.6 + "@zetachain/protocol-contracts": ^2.0.1 ethers: 5.6.8 hardhat-gas-reporter: ^1.0.8 solidity-coverage: ^0.7.20 @@ -2795,7 +2781,7 @@ __metadata: "@uniswap/v2-periphery": 1.1.0-beta.0 "@zetachain/addresses": "workspace:^" "@zetachain/addresses-tools": "workspace:^" - "@zetachain/protocol-contracts": ^0.0.6 + "@zetachain/protocol-contracts": ^2.0.1 ethers: 5.6.8 hardhat-gas-reporter: ^1.0.8 solidity-coverage: ^0.7.20 From f551f8a255cea669b3d3ef6e697e26340dd9ffd1 Mon Sep 17 00:00:00 2001 From: Andres Martin Aiello <50411235+andresaiello@users.noreply.github.com> Date: Fri, 25 Aug 2023 11:45:43 -0300 Subject: [PATCH 087/115] Deploy rewards to Athens2 and 3 (#104) * Deploy rewards to Athens2 * make public time restrictions --- .../RewardDistributor.sol | 4 +- .../zevm-app-contracts/scripts/add-reward.ts | 114 ++++++++++++++++++ packages/zevm-app-contracts/scripts/deploy.ts | 72 +---------- ...eadRewardsData.ts => read-rewards-data.ts} | 6 +- 4 files changed, 119 insertions(+), 77 deletions(-) create mode 100644 packages/zevm-app-contracts/scripts/add-reward.ts rename packages/zevm-app-contracts/scripts/{readRewardsData.ts => read-rewards-data.ts} (91%) diff --git a/packages/zevm-app-contracts/contracts/liquidity-incentives/RewardDistributor.sol b/packages/zevm-app-contracts/contracts/liquidity-incentives/RewardDistributor.sol index a782370b..4635aabc 100644 --- a/packages/zevm-app-contracts/contracts/liquidity-incentives/RewardDistributor.sol +++ b/packages/zevm-app-contracts/contracts/liquidity-incentives/RewardDistributor.sol @@ -16,8 +16,8 @@ contract RewardDistributor is StakingRewards { IERC20 public stakingTokenA; IERC20 public stakingTokenB; SystemContract private systemContract; - uint256 minCoolDown; - uint256 minStakingPeriod; + uint256 public minCoolDown; + uint256 public minStakingPeriod; mapping(address => uint256) public lastDeposit; mapping(address => uint256) public unlockTokensAt; diff --git a/packages/zevm-app-contracts/scripts/add-reward.ts b/packages/zevm-app-contracts/scripts/add-reward.ts new file mode 100644 index 00000000..bde66ff2 --- /dev/null +++ b/packages/zevm-app-contracts/scripts/add-reward.ts @@ -0,0 +1,114 @@ +import { BigNumber } from "@ethersproject/bignumber"; +import { SignerWithAddress } from "@nomiclabs/hardhat-ethers/signers"; +import { getChainId, isNetworkName, NetworkName } from "@zetachain/addresses"; +import { parseEther } from "ethers/lib/utils"; +import { ethers, network } from "hardhat"; + +import { SYSTEM_CONTRACT } from "../../zevm-example-contracts/scripts/systemConstants"; +import { + ERC20__factory, + RewardDistributor__factory, + RewardDistributorFactory, + RewardDistributorFactory__factory, + SystemContract, + SystemContract__factory +} from "../typechain-types"; +import { FACTORY_CONTRACT } from "./deploy"; + +const networkName = network.name; +const REWARD_DURATION = BigNumber.from("604800").mul(8); // 1 week * 8 +const REWARDS_AMOUNT = parseEther("500"); + +const getZRC20Address = async (systemContract: SystemContract, network: NetworkName) => { + const tokenAddress = await systemContract.gasCoinZRC20ByChainId(getChainId(network)); + return tokenAddress; +}; + +const deployRewardByNetwork = async ( + deployer: SignerWithAddress, + systemContract: SystemContract, + networkName: NetworkName, + rewardDistributorFactory: RewardDistributorFactory +) => { + const tokenAddress = await getZRC20Address(systemContract, networkName); + const zetaTokenAddress = await systemContract.wZetaContractAddress(); + + const tx = await rewardDistributorFactory.createTokenIncentive( + deployer.address, + deployer.address, + zetaTokenAddress, + // @dev: now we send both tokens so contract calculate internaly LP address + zetaTokenAddress, + tokenAddress + ); + + const receipt = await tx.wait(); + + const event = receipt.events?.find(e => e.event === "RewardDistributorCreated"); + + const { rewardDistributorContract: rewardDistributorContractAddress } = event?.args as any; + + console.log("RewardDistributor deployed to:", rewardDistributorContractAddress); + + return rewardDistributorContractAddress; +}; + +const addReward = async ( + deployer: SignerWithAddress, + systemContract: SystemContract, + rewardDistributorContractAddress: string +) => { + const zetaTokenAddress = await systemContract.wZetaContractAddress(); + + const rewardDistributorContract = await RewardDistributor__factory.connect( + rewardDistributorContractAddress, + deployer + ); + + const ZETA = ERC20__factory.connect(zetaTokenAddress, deployer); + await ZETA.transfer(rewardDistributorContract.address, REWARDS_AMOUNT.mul(2)); + await rewardDistributorContract.setRewardsDuration(REWARD_DURATION); + await rewardDistributorContract.notifyRewardAmount(REWARDS_AMOUNT); + + console.log("Reward added to:", rewardDistributorContract.address); +}; + +async function main() { + const [deployer] = await ethers.getSigners(); + if (!isNetworkName(networkName)) throw new Error("Invalid network name"); + const systemContract = await SystemContract__factory.connect(SYSTEM_CONTRACT, deployer); + + const rewardDistributorFactory = RewardDistributorFactory__factory.connect(FACTORY_CONTRACT, deployer); + let rewardContractAddress = ""; + // @dev: you can write your own address here to add reward to an existing contract + // rewardContractAddress = "0x0dee8b6e2d2035a798b67c68d47f941718a62263"; + rewardContractAddress = await deployRewardByNetwork(deployer, systemContract, "goerli", rewardDistributorFactory); + await addReward(deployer, systemContract, rewardContractAddress); + + rewardContractAddress = await deployRewardByNetwork( + deployer, + systemContract, + "bsc-testnet", + rewardDistributorFactory + ); + await addReward(deployer, systemContract, rewardContractAddress); + rewardContractAddress = await deployRewardByNetwork( + deployer, + systemContract, + "bitcoin-test", + rewardDistributorFactory + ); + await addReward(deployer, systemContract, rewardContractAddress); + rewardContractAddress = await deployRewardByNetwork( + deployer, + systemContract, + "polygon-mumbai", + rewardDistributorFactory + ); + await addReward(deployer, systemContract, rewardContractAddress); +} + +main().catch(error => { + console.error(error); + process.exit(1); +}); diff --git a/packages/zevm-app-contracts/scripts/deploy.ts b/packages/zevm-app-contracts/scripts/deploy.ts index 1f987b64..762efde7 100644 --- a/packages/zevm-app-contracts/scripts/deploy.ts +++ b/packages/zevm-app-contracts/scripts/deploy.ts @@ -1,79 +1,13 @@ -import { BigNumber } from "@ethersproject/bignumber"; -import { SignerWithAddress } from "@nomiclabs/hardhat-ethers/signers"; -import { getChainId, isNetworkName, NetworkName } from "@zetachain/addresses"; +import { isNetworkName } from "@zetachain/addresses"; import { getSystemContractAddress } from "@zetachain/addresses-tools"; -import { parseEther } from "ethers/lib/utils"; import { ethers, network } from "hardhat"; -import { - ERC20__factory, - RewardDistributor__factory, - RewardDistributorFactory, - RewardDistributorFactory__factory, - SystemContract, - SystemContract__factory -} from "../typechain-types"; +import { RewardDistributorFactory__factory, SystemContract__factory } from "../typechain-types"; const networkName = network.name; -const REWARD_DURATION = BigNumber.from("604800"); // 1 week -const REWARDS_AMOUNT = parseEther("10"); const SYSTEM_CONTRACT = getSystemContractAddress(); -interface Pair { - TokenA: string; - TokenB: string; -} - -export const sortPair = (token1: string, token2: string): Pair => { - if (token1 < token2) { - return { TokenA: token1, TokenB: token2 }; - } - return { TokenA: token2, TokenB: token1 }; -}; - -const getZRC20Address = async (systemContract: SystemContract, network: NetworkName) => { - const tokenAddress = await systemContract.gasCoinZRC20ByChainId(getChainId(network)); - return tokenAddress; -}; - -const deployRewardByNetwork = async ( - deployer: SignerWithAddress, - systemContract: SystemContract, - networkName: NetworkName, - rewardDistributorFactory: RewardDistributorFactory -) => { - const tokenAddress = await getZRC20Address(systemContract, networkName); - const zetaTokenAddress = await systemContract.wZetaContractAddress(); - - const tx = await rewardDistributorFactory.createTokenIncentive( - deployer.address, - deployer.address, - zetaTokenAddress, - // @dev: now we send both tokens so contract calculate internaly LP address - zetaTokenAddress, - tokenAddress - ); - - const receipt = await tx.wait(); - - const event = receipt.events?.find(e => e.event === "RewardDistributorCreated"); - - const { rewardDistributorContract: rewardDistributorContractAddress } = event?.args as any; - - const rewardDistributorContract = await RewardDistributor__factory.connect( - rewardDistributorContractAddress, - deployer - ); - - const ZETA = ERC20__factory.connect(zetaTokenAddress, deployer); - await ZETA.transfer(rewardDistributorContract.address, REWARDS_AMOUNT); - await rewardDistributorContract.setRewardsDuration(REWARD_DURATION); - await rewardDistributorContract.notifyRewardAmount(REWARDS_AMOUNT); - - console.log("RewardDistributor deployed to:", rewardDistributorContract.address); -}; - async function main() { const [deployer] = await ethers.getSigners(); if (!isNetworkName(networkName)) throw new Error("Invalid network name"); @@ -87,8 +21,6 @@ async function main() { const rewardDistributorFactory = await RewardDistributorFactoryFactory.deploy(zetaTokenAddress, SYSTEM_CONTRACT); await rewardDistributorFactory.deployed(); console.log("RewardDistributorFactory deployed to:", rewardDistributorFactory.address); - - await deployRewardByNetwork(deployer, systemContract, "goerli", rewardDistributorFactory); } main().catch(error => { diff --git a/packages/zevm-app-contracts/scripts/readRewardsData.ts b/packages/zevm-app-contracts/scripts/read-rewards-data.ts similarity index 91% rename from packages/zevm-app-contracts/scripts/readRewardsData.ts rename to packages/zevm-app-contracts/scripts/read-rewards-data.ts index bfb04de0..b7fe2975 100644 --- a/packages/zevm-app-contracts/scripts/readRewardsData.ts +++ b/packages/zevm-app-contracts/scripts/read-rewards-data.ts @@ -2,14 +2,10 @@ import { isNetworkName } from "@zetachain/addresses"; import { ethers, network } from "hardhat"; import { RewardDistributor__factory, RewardDistributorFactory__factory } from "../typechain-types"; +import { FACTORY_CONTRACT } from "./deploy"; const networkName = network.name; -//@todo: this is here because need to import address pkg but this pkg will be move to new repo, -// so will refactor when it will be done - -export const FACTORY_CONTRACT = "0xf05Bc79b88026fbC32221926308405C2Bf919f2E"; - const readRewardData = async (rewardContractAddress: string) => { const [deployer] = await ethers.getSigners(); const rewardDistributorContract = await RewardDistributor__factory.connect(rewardContractAddress, deployer); From f11e620061bebfcfbeaf38064ba55a9d3e6e3b41 Mon Sep 17 00:00:00 2001 From: Andres Martin Aiello <50411235+andresaiello@users.noreply.github.com> Date: Fri, 1 Sep 2023 12:43:12 -0300 Subject: [PATCH 088/115] Organize zetachain repo (#115) --- packages/addresses-tools/package.json | 2 +- packages/addresses/src/addresses.athens.json | 10 ++++++++-- packages/addresses/src/addresses.helpers.ts | 2 ++ packages/example-contracts/package.json | 2 +- packages/zeta-app-contracts/package.json | 2 +- .../liquidity-incentives/RewardDistributor.sol | 5 +++++ ...stemContract.sol => MockSystemContract.sol} | 6 ++++++ .../shared/{TestZRC20.sol => MockZRC20.sol} | 0 .../contracts/zeta-swap/ZetaCurveSwapDemo.sol | 0 .../contracts/zeta-swap/ZetaSwap.sol | 0 .../contracts/zeta-swap/ZetaSwapBtcInbound.sol | 0 packages/zevm-app-contracts/package.json | 2 +- .../{ => liquidity-incentives}/add-reward.ts | 16 ++++++++++++---- .../{ => liquidity-incentives}/deploy.ts | 5 +++-- .../read-rewards-data.ts | 12 +++++++++--- .../zeta-swap/add-liquidity-zeta-uniswap.ts | 0 .../scripts/zeta-swap/deploy.ts | 4 ++-- .../scripts/zeta-swap/get-system-data.ts | 1 + .../scripts/zeta-swap/helpers.ts | 0 .../scripts/zeta-swap/send.ts | 0 .../scripts/zeta-swap/stress-swap.ts | 0 .../scripts/zeta-swap/swap-on-zevm.ts | 0 .../scripts/zeta-swap/swap.ts | 0 .../test/Swap.spec.ts | 6 +++--- packages/zevm-example-contracts/package.json | 2 +- yarn.lock | 18 +++++++++--------- 26 files changed, 65 insertions(+), 30 deletions(-) rename packages/zevm-app-contracts/contracts/shared/{TestSystemContract.sol => MockSystemContract.sol} (89%) rename packages/zevm-app-contracts/contracts/shared/{TestZRC20.sol => MockZRC20.sol} (100%) rename packages/{zevm-example-contracts => zevm-app-contracts}/contracts/zeta-swap/ZetaCurveSwapDemo.sol (100%) rename packages/{zevm-example-contracts => zevm-app-contracts}/contracts/zeta-swap/ZetaSwap.sol (100%) rename packages/{zevm-example-contracts => zevm-app-contracts}/contracts/zeta-swap/ZetaSwapBtcInbound.sol (100%) rename packages/zevm-app-contracts/scripts/{ => liquidity-incentives}/add-reward.ts (90%) rename packages/zevm-app-contracts/scripts/{ => liquidity-incentives}/deploy.ts (84%) rename packages/zevm-app-contracts/scripts/{ => liquidity-incentives}/read-rewards-data.ts (89%) rename packages/{zevm-example-contracts => zevm-app-contracts}/scripts/zeta-swap/add-liquidity-zeta-uniswap.ts (100%) rename packages/{zevm-example-contracts => zevm-app-contracts}/scripts/zeta-swap/deploy.ts (90%) rename packages/{zevm-example-contracts => zevm-app-contracts}/scripts/zeta-swap/get-system-data.ts (97%) rename packages/{zevm-example-contracts => zevm-app-contracts}/scripts/zeta-swap/helpers.ts (100%) rename packages/{zevm-example-contracts => zevm-app-contracts}/scripts/zeta-swap/send.ts (100%) rename packages/{zevm-example-contracts => zevm-app-contracts}/scripts/zeta-swap/stress-swap.ts (100%) rename packages/{zevm-example-contracts => zevm-app-contracts}/scripts/zeta-swap/swap-on-zevm.ts (100%) rename packages/{zevm-example-contracts => zevm-app-contracts}/scripts/zeta-swap/swap.ts (100%) rename packages/{zevm-example-contracts => zevm-app-contracts}/test/Swap.spec.ts (96%) diff --git a/packages/addresses-tools/package.json b/packages/addresses-tools/package.json index 9d239f32..e77f2b69 100644 --- a/packages/addresses-tools/package.json +++ b/packages/addresses-tools/package.json @@ -19,6 +19,6 @@ }, "devDependencies": { "@zetachain/addresses": "workspace:^", - "@zetachain/protocol-contracts": "^2.0.1" + "@zetachain/protocol-contracts": "^2.1.0" } } diff --git a/packages/addresses/src/addresses.athens.json b/packages/addresses/src/addresses.athens.json index 9c31fc2f..413e3a2d 100644 --- a/packages/addresses/src/addresses.athens.json +++ b/packages/addresses/src/addresses.athens.json @@ -8,6 +8,7 @@ "multiChainSwap": "0x8BD7144Ddb59c9Fa3Dcf809998521E9cAD946fa1", "multiChainSwapZetaConnector": "", "multiChainValue": "0x064516547ECd3b2D1709e1b2798Aae92b1C8a84C", + "rewardDistributorFactory": "", "tridentPoolFactory": "", "tss": "0x8531a5aB847ff5B22D855633C25ED1DA3255247e", "tssUpdater": "0x55122f7590164Ac222504436943FAB17B62F5d7d", @@ -33,6 +34,7 @@ "multiChainSwap": "0x323745f16C93e56a98012970c28788498d8B3a14", "multiChainSwapZetaConnector": "", "multiChainValue": "0x14BeC0E4A8e7bF7A02Af54Ad81a57a9fcA4D37Fd", + "rewardDistributorFactory": "", "tridentPoolFactory": "", "tss": "0x8531a5aB847ff5B22D855633C25ED1DA3255247e", "tssUpdater": "0x55122f7590164Ac222504436943FAB17B62F5d7d", @@ -56,6 +58,7 @@ "dai": "", "immutableCreate2Factory": "0x095a03c6a68137fE9a566bBc3e552F299d8b886d", "multiChainSwap": "0xb1b812b664c28E1bA1d35De925Ae88b7Bc7cdCF5", + "rewardDistributorFactory": "", "tridentPoolFactory": "", "multiChainSwapZetaConnector": "", "multiChainValue": "0x14BeC0E4A8e7bF7A02Af54Ad81a57a9fcA4D37Fd", @@ -82,6 +85,7 @@ "immutableCreate2Factory": "", "multiChainSwap": "", "multiChainValue": "", + "rewardDistributorFactory": "", "tridentPoolFactory": "", "tss": "", "tssUpdater": "", @@ -107,6 +111,7 @@ "multiChainSwap": "", "multiChainSwapZetaConnector": "", "multiChainValue": "0x82aC45D07dEe4DBDe050e838beF345347DEd99a8", + "rewardDistributorFactory": "0x3a969d797A28d61e8127562944E639a5824F1219", "tridentPoolFactory": "", "tss": "", "tssUpdater": "", @@ -117,8 +122,8 @@ "uniswapV3Router": "", "usdc": "", "weth9": "0x5F0b1a82749cb4E2278EC87F8BF6B618dC71a8bf", - "zetaSwap": "0xd886b7Af031F9a505310bA01951948BD1d673aF1", - "zetaSwapBtcInbound": "0x064516547ECd3b2D1709e1b2798Aae92b1C8a84C", + "zetaSwap": "0x44D1F1f9289DBA1Cf5824bd667184cEBE020aA1c", + "zetaSwapBtcInbound": "0x008b393933D5CA2457Df570CA5D628380FFf6da4", "zetaToken": "0x5F0b1a82749cb4E2278EC87F8BF6B618dC71a8bf", "zetaTokenConsumerUniV2": "", "zetaTokenConsumerUniV3": "" @@ -132,6 +137,7 @@ "multiChainSwap": "", "multiChainSwapZetaConnector": "", "multiChainValue": "", + "rewardDistributorFactory": "", "tridentPoolFactory": "", "tss": "", "tssUpdater": "", diff --git a/packages/addresses/src/addresses.helpers.ts b/packages/addresses/src/addresses.helpers.ts index c47a418d..e3a21f84 100644 --- a/packages/addresses/src/addresses.helpers.ts +++ b/packages/addresses/src/addresses.helpers.ts @@ -11,6 +11,7 @@ export type ZetaAddress = | "multiChainSwap" | "multiChainSwapZetaConnector" | "multiChainValue" + | "rewardDistributorFactory" | "tridentPoolFactory" | "tss" | "tssUpdater" @@ -37,6 +38,7 @@ const zetaAddresses: Record = { multiChainSwap: true, multiChainSwapZetaConnector: true, multiChainValue: true, + rewardDistributorFactory: true, tridentPoolFactory: true, tss: true, tssUpdater: true, diff --git a/packages/example-contracts/package.json b/packages/example-contracts/package.json index 832a5f89..5a207dbd 100644 --- a/packages/example-contracts/package.json +++ b/packages/example-contracts/package.json @@ -36,7 +36,7 @@ "@uniswap/v3-periphery": "1.1.0", "@zetachain/addresses": "workspace:^", "@zetachain/addresses-tools": "workspace:^", - "@zetachain/protocol-contracts": "^2.0.1", + "@zetachain/protocol-contracts": "^2.1.0", "ethers": "5.6.8" } } diff --git a/packages/zeta-app-contracts/package.json b/packages/zeta-app-contracts/package.json index 060f68f4..792cfb8e 100644 --- a/packages/zeta-app-contracts/package.json +++ b/packages/zeta-app-contracts/package.json @@ -32,7 +32,7 @@ "@openzeppelin/contracts": "^4.8.3", "@zetachain/addresses": "workspace:^", "@zetachain/addresses-tools": "workspace:^", - "@zetachain/protocol-contracts": "^2.0.1", + "@zetachain/protocol-contracts": "^2.1.0", "ethers": "5.6.8" } } diff --git a/packages/zevm-app-contracts/contracts/liquidity-incentives/RewardDistributor.sol b/packages/zevm-app-contracts/contracts/liquidity-incentives/RewardDistributor.sol index 4635aabc..5b2f6693 100644 --- a/packages/zevm-app-contracts/contracts/liquidity-incentives/RewardDistributor.sol +++ b/packages/zevm-app-contracts/contracts/liquidity-incentives/RewardDistributor.sol @@ -25,6 +25,9 @@ contract RewardDistributor is StakingRewards { error InvalidTokenAddress(); error MinimumStakingPeriodNotMet(); + event MinCoolDownUpdated(address callerAddress, uint256 minCoolDown); + event MinStakingPeriodUpdated(address callerAddress, uint256 minStakingPeriod); + constructor( address owner, address rewardsDistribution, @@ -105,10 +108,12 @@ contract RewardDistributor is StakingRewards { function setMinCoolDown(uint256 minCoolDown_) external onlyOwner { minCoolDown = minCoolDown_; + emit MinCoolDownUpdated(msg.sender, minCoolDown_); } function setMinStakingPeriod(uint256 minStakingPeriod_) external onlyOwner { minStakingPeriod = minStakingPeriod_; + emit MinStakingPeriodUpdated(msg.sender, minStakingPeriod_); } function stake(uint256 amount) public override { diff --git a/packages/zevm-app-contracts/contracts/shared/TestSystemContract.sol b/packages/zevm-app-contracts/contracts/shared/MockSystemContract.sol similarity index 89% rename from packages/zevm-app-contracts/contracts/shared/TestSystemContract.sol rename to packages/zevm-app-contracts/contracts/shared/MockSystemContract.sol index ad00cc3b..43dff81c 100644 --- a/packages/zevm-app-contracts/contracts/shared/TestSystemContract.sol +++ b/packages/zevm-app-contracts/contracts/shared/MockSystemContract.sol @@ -76,4 +76,10 @@ contract MockSystemContract is SystemContractErrors { ) ); } + + function onCrossChainCall(address target, address zrc20, uint256 amount, bytes calldata message) external { + zContext memory context = zContext({sender: msg.sender, origin: "", chainID: block.chainid}); + IZRC20(zrc20).transfer(target, amount); + zContract(target).onCrossChainCall(context, zrc20, amount, message); + } } diff --git a/packages/zevm-app-contracts/contracts/shared/TestZRC20.sol b/packages/zevm-app-contracts/contracts/shared/MockZRC20.sol similarity index 100% rename from packages/zevm-app-contracts/contracts/shared/TestZRC20.sol rename to packages/zevm-app-contracts/contracts/shared/MockZRC20.sol diff --git a/packages/zevm-example-contracts/contracts/zeta-swap/ZetaCurveSwapDemo.sol b/packages/zevm-app-contracts/contracts/zeta-swap/ZetaCurveSwapDemo.sol similarity index 100% rename from packages/zevm-example-contracts/contracts/zeta-swap/ZetaCurveSwapDemo.sol rename to packages/zevm-app-contracts/contracts/zeta-swap/ZetaCurveSwapDemo.sol diff --git a/packages/zevm-example-contracts/contracts/zeta-swap/ZetaSwap.sol b/packages/zevm-app-contracts/contracts/zeta-swap/ZetaSwap.sol similarity index 100% rename from packages/zevm-example-contracts/contracts/zeta-swap/ZetaSwap.sol rename to packages/zevm-app-contracts/contracts/zeta-swap/ZetaSwap.sol diff --git a/packages/zevm-example-contracts/contracts/zeta-swap/ZetaSwapBtcInbound.sol b/packages/zevm-app-contracts/contracts/zeta-swap/ZetaSwapBtcInbound.sol similarity index 100% rename from packages/zevm-example-contracts/contracts/zeta-swap/ZetaSwapBtcInbound.sol rename to packages/zevm-app-contracts/contracts/zeta-swap/ZetaSwapBtcInbound.sol diff --git a/packages/zevm-app-contracts/package.json b/packages/zevm-app-contracts/package.json index 4c77918b..129277e9 100644 --- a/packages/zevm-app-contracts/package.json +++ b/packages/zevm-app-contracts/package.json @@ -33,7 +33,7 @@ "@uniswap/v2-periphery": "1.1.0-beta.0", "@zetachain/addresses": "workspace:^", "@zetachain/addresses-tools": "workspace:^", - "@zetachain/protocol-contracts": "^2.0.1", + "@zetachain/protocol-contracts": "^2.1.0", "ethers": "5.6.8" } } diff --git a/packages/zevm-app-contracts/scripts/add-reward.ts b/packages/zevm-app-contracts/scripts/liquidity-incentives/add-reward.ts similarity index 90% rename from packages/zevm-app-contracts/scripts/add-reward.ts rename to packages/zevm-app-contracts/scripts/liquidity-incentives/add-reward.ts index bde66ff2..9a81e16e 100644 --- a/packages/zevm-app-contracts/scripts/add-reward.ts +++ b/packages/zevm-app-contracts/scripts/liquidity-incentives/add-reward.ts @@ -1,10 +1,11 @@ import { BigNumber } from "@ethersproject/bignumber"; import { SignerWithAddress } from "@nomiclabs/hardhat-ethers/signers"; import { getChainId, isNetworkName, NetworkName } from "@zetachain/addresses"; +import { getAddress } from "@zetachain/addresses"; +import { getSystemContractAddress } from "@zetachain/addresses-tools"; import { parseEther } from "ethers/lib/utils"; import { ethers, network } from "hardhat"; -import { SYSTEM_CONTRACT } from "../../zevm-example-contracts/scripts/systemConstants"; import { ERC20__factory, RewardDistributor__factory, @@ -12,8 +13,9 @@ import { RewardDistributorFactory__factory, SystemContract, SystemContract__factory -} from "../typechain-types"; -import { FACTORY_CONTRACT } from "./deploy"; +} from "../../typechain-types"; + +const SYSTEM_CONTRACT = getSystemContractAddress(); const networkName = network.name; const REWARD_DURATION = BigNumber.from("604800").mul(8); // 1 week * 8 @@ -78,7 +80,13 @@ async function main() { if (!isNetworkName(networkName)) throw new Error("Invalid network name"); const systemContract = await SystemContract__factory.connect(SYSTEM_CONTRACT, deployer); - const rewardDistributorFactory = RewardDistributorFactory__factory.connect(FACTORY_CONTRACT, deployer); + const factoryContractAddress = getAddress({ + address: "rewardDistributorFactory", + networkName: network.name, + zetaNetwork: "athens" + }); + + const rewardDistributorFactory = RewardDistributorFactory__factory.connect(factoryContractAddress, deployer); let rewardContractAddress = ""; // @dev: you can write your own address here to add reward to an existing contract // rewardContractAddress = "0x0dee8b6e2d2035a798b67c68d47f941718a62263"; diff --git a/packages/zevm-app-contracts/scripts/deploy.ts b/packages/zevm-app-contracts/scripts/liquidity-incentives/deploy.ts similarity index 84% rename from packages/zevm-app-contracts/scripts/deploy.ts rename to packages/zevm-app-contracts/scripts/liquidity-incentives/deploy.ts index 762efde7..1dea2854 100644 --- a/packages/zevm-app-contracts/scripts/deploy.ts +++ b/packages/zevm-app-contracts/scripts/liquidity-incentives/deploy.ts @@ -1,8 +1,8 @@ import { isNetworkName } from "@zetachain/addresses"; -import { getSystemContractAddress } from "@zetachain/addresses-tools"; +import { getSystemContractAddress, saveAddress } from "@zetachain/addresses-tools"; import { ethers, network } from "hardhat"; -import { RewardDistributorFactory__factory, SystemContract__factory } from "../typechain-types"; +import { RewardDistributorFactory__factory, SystemContract__factory } from "../../typechain-types"; const networkName = network.name; @@ -21,6 +21,7 @@ async function main() { const rewardDistributorFactory = await RewardDistributorFactoryFactory.deploy(zetaTokenAddress, SYSTEM_CONTRACT); await rewardDistributorFactory.deployed(); console.log("RewardDistributorFactory deployed to:", rewardDistributorFactory.address); + saveAddress("rewardDistributorFactory", rewardDistributorFactory.address); } main().catch(error => { diff --git a/packages/zevm-app-contracts/scripts/read-rewards-data.ts b/packages/zevm-app-contracts/scripts/liquidity-incentives/read-rewards-data.ts similarity index 89% rename from packages/zevm-app-contracts/scripts/read-rewards-data.ts rename to packages/zevm-app-contracts/scripts/liquidity-incentives/read-rewards-data.ts index b7fe2975..bb31a2d9 100644 --- a/packages/zevm-app-contracts/scripts/read-rewards-data.ts +++ b/packages/zevm-app-contracts/scripts/liquidity-incentives/read-rewards-data.ts @@ -1,8 +1,8 @@ import { isNetworkName } from "@zetachain/addresses"; +import { getAddress } from "@zetachain/addresses"; import { ethers, network } from "hardhat"; -import { RewardDistributor__factory, RewardDistributorFactory__factory } from "../typechain-types"; -import { FACTORY_CONTRACT } from "./deploy"; +import { RewardDistributor__factory, RewardDistributorFactory__factory } from "../../typechain-types"; const networkName = network.name; @@ -39,7 +39,13 @@ async function main() { const [deployer] = await ethers.getSigners(); if (!isNetworkName(networkName)) throw new Error("Invalid network name"); - const rewardDistributorFactory = RewardDistributorFactory__factory.connect(FACTORY_CONTRACT, deployer); + const factoryContractAddress = getAddress({ + address: "rewardDistributorFactory", + networkName: network.name, + zetaNetwork: "athens" + }); + + const rewardDistributorFactory = RewardDistributorFactory__factory.connect(factoryContractAddress, deployer); const incentivesContractsLen = await rewardDistributorFactory.incentivesContractsLen(); const incentiveContracts: string[] = []; diff --git a/packages/zevm-example-contracts/scripts/zeta-swap/add-liquidity-zeta-uniswap.ts b/packages/zevm-app-contracts/scripts/zeta-swap/add-liquidity-zeta-uniswap.ts similarity index 100% rename from packages/zevm-example-contracts/scripts/zeta-swap/add-liquidity-zeta-uniswap.ts rename to packages/zevm-app-contracts/scripts/zeta-swap/add-liquidity-zeta-uniswap.ts diff --git a/packages/zevm-example-contracts/scripts/zeta-swap/deploy.ts b/packages/zevm-app-contracts/scripts/zeta-swap/deploy.ts similarity index 90% rename from packages/zevm-example-contracts/scripts/zeta-swap/deploy.ts rename to packages/zevm-app-contracts/scripts/zeta-swap/deploy.ts index 27456e2a..292ed069 100644 --- a/packages/zevm-example-contracts/scripts/zeta-swap/deploy.ts +++ b/packages/zevm-app-contracts/scripts/zeta-swap/deploy.ts @@ -12,14 +12,14 @@ const main = async () => { await contract.deployed(); console.log("Deployed ZetaSwap. Address:", contract.address); - // saveAddress("zetaSwap", contract.address); + saveAddress("zetaSwap", contract.address); const FactoryBTC = (await ethers.getContractFactory("ZetaSwapBtcInbound")) as ZetaSwapBtcInbound__factory; const contractBTC = (await FactoryBTC.deploy(SYSTEM_CONTRACT)) as ZetaSwapBtcInbound; await contractBTC.deployed(); console.log("Deployed zetaSwapBtcInbound. Address:", contractBTC.address); - // saveAddress("zetaSwapBtcInbound", contractBTC.address); + saveAddress("zetaSwapBtcInbound", contractBTC.address); }; main().catch(error => { diff --git a/packages/zevm-example-contracts/scripts/zeta-swap/get-system-data.ts b/packages/zevm-app-contracts/scripts/zeta-swap/get-system-data.ts similarity index 97% rename from packages/zevm-example-contracts/scripts/zeta-swap/get-system-data.ts rename to packages/zevm-app-contracts/scripts/zeta-swap/get-system-data.ts index fddb9f7b..2e7db88c 100644 --- a/packages/zevm-example-contracts/scripts/zeta-swap/get-system-data.ts +++ b/packages/zevm-app-contracts/scripts/zeta-swap/get-system-data.ts @@ -15,6 +15,7 @@ const getZRC20Address = async (systemContract: SystemContract, network: NetworkN async function main() { const [deployer] = await ethers.getSigners(); const SYSTEM_CONTRACT = getSystemContractAddress(); + console.log(`SYSTEM CONTRACT:`, SYSTEM_CONTRACT); const systemContract = await SystemContract__factory.connect(SYSTEM_CONTRACT, deployer); const uniswapFactoryAddress = await systemContract.uniswapv2FactoryAddress(); diff --git a/packages/zevm-example-contracts/scripts/zeta-swap/helpers.ts b/packages/zevm-app-contracts/scripts/zeta-swap/helpers.ts similarity index 100% rename from packages/zevm-example-contracts/scripts/zeta-swap/helpers.ts rename to packages/zevm-app-contracts/scripts/zeta-swap/helpers.ts diff --git a/packages/zevm-example-contracts/scripts/zeta-swap/send.ts b/packages/zevm-app-contracts/scripts/zeta-swap/send.ts similarity index 100% rename from packages/zevm-example-contracts/scripts/zeta-swap/send.ts rename to packages/zevm-app-contracts/scripts/zeta-swap/send.ts diff --git a/packages/zevm-example-contracts/scripts/zeta-swap/stress-swap.ts b/packages/zevm-app-contracts/scripts/zeta-swap/stress-swap.ts similarity index 100% rename from packages/zevm-example-contracts/scripts/zeta-swap/stress-swap.ts rename to packages/zevm-app-contracts/scripts/zeta-swap/stress-swap.ts diff --git a/packages/zevm-example-contracts/scripts/zeta-swap/swap-on-zevm.ts b/packages/zevm-app-contracts/scripts/zeta-swap/swap-on-zevm.ts similarity index 100% rename from packages/zevm-example-contracts/scripts/zeta-swap/swap-on-zevm.ts rename to packages/zevm-app-contracts/scripts/zeta-swap/swap-on-zevm.ts diff --git a/packages/zevm-example-contracts/scripts/zeta-swap/swap.ts b/packages/zevm-app-contracts/scripts/zeta-swap/swap.ts similarity index 100% rename from packages/zevm-example-contracts/scripts/zeta-swap/swap.ts rename to packages/zevm-app-contracts/scripts/zeta-swap/swap.ts diff --git a/packages/zevm-example-contracts/test/Swap.spec.ts b/packages/zevm-app-contracts/test/Swap.spec.ts similarity index 96% rename from packages/zevm-example-contracts/test/Swap.spec.ts rename to packages/zevm-app-contracts/test/Swap.spec.ts index 9b3f4bc5..355b2f85 100644 --- a/packages/zevm-example-contracts/test/Swap.spec.ts +++ b/packages/zevm-app-contracts/test/Swap.spec.ts @@ -5,7 +5,7 @@ import { getAddress as getAddressLib } from "@zetachain/addresses"; import { expect } from "chai"; import { ethers, network } from "hardhat"; -import { getBitcoinTxMemoForTest, getSwapParams } from "../scripts/zeta-swap/helpers"; +import { evmSetup } from "../../zevm-example-contracts/test/test.helpers"; import { MockSystemContract, MockZRC20, @@ -13,8 +13,8 @@ import { ZetaSwap__factory, ZetaSwapBtcInbound, ZetaSwapBtcInbound__factory -} from "../typechain-types"; -import { evmSetup } from "./test.helpers"; +} from "../../zevm-example-contracts/typechain-types"; +import { getBitcoinTxMemoForTest, getSwapParams } from "../scripts/zeta-swap/helpers"; describe("ZetaSwap tests", () => { let zetaSwapContract: ZetaSwap; diff --git a/packages/zevm-example-contracts/package.json b/packages/zevm-example-contracts/package.json index e38c3f5e..1a91e45d 100644 --- a/packages/zevm-example-contracts/package.json +++ b/packages/zevm-example-contracts/package.json @@ -33,7 +33,7 @@ "@uniswap/v2-periphery": "1.1.0-beta.0", "@zetachain/addresses": "workspace:^", "@zetachain/addresses-tools": "workspace:^", - "@zetachain/protocol-contracts": "^2.0.1", + "@zetachain/protocol-contracts": "^2.1.0", "ethers": "5.6.8" } } diff --git a/yarn.lock b/yarn.lock index e128e04b..b95cdf61 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2703,7 +2703,7 @@ __metadata: resolution: "@zetachain/addresses-tools@workspace:packages/addresses-tools" dependencies: "@zetachain/addresses": "workspace:^" - "@zetachain/protocol-contracts": ^2.0.1 + "@zetachain/protocol-contracts": ^2.1.0 languageName: unknown linkType: soft @@ -2726,7 +2726,7 @@ __metadata: "@uniswap/v3-periphery": 1.1.0 "@zetachain/addresses": "workspace:^" "@zetachain/addresses-tools": "workspace:^" - "@zetachain/protocol-contracts": ^2.0.1 + "@zetachain/protocol-contracts": ^2.1.0 ethers: 5.6.8 hardhat-gas-reporter: ^1.0.8 solidity-coverage: ^0.7.20 @@ -2734,10 +2734,10 @@ __metadata: languageName: unknown linkType: soft -"@zetachain/protocol-contracts@npm:^2.0.1": - version: 2.0.1 - resolution: "@zetachain/protocol-contracts@npm:2.0.1" - checksum: 1a5056e1f21b49be7975e9e4d98c429f7e53203ff194bcd262eeb9da91b48543149224b96e39e9808bf8fd55d5df5cc1c99de6e6626ad10541b3c2599a3f2477 +"@zetachain/protocol-contracts@npm:^2.1.0": + version: 2.1.0 + resolution: "@zetachain/protocol-contracts@npm:2.1.0" + checksum: 0b9a7c869c351eca415b6e6097f79243a3d150b57da8161ab7f7ccb969d0315e2c48d417fcdb8d71375227e58560481e3a4572e6c689224e89bd404ab519e37b languageName: node linkType: hard @@ -2749,7 +2749,7 @@ __metadata: "@openzeppelin/contracts": ^4.8.3 "@zetachain/addresses": "workspace:^" "@zetachain/addresses-tools": "workspace:^" - "@zetachain/protocol-contracts": ^2.0.1 + "@zetachain/protocol-contracts": ^2.1.0 ethers: 5.6.8 hardhat-gas-reporter: ^1.0.8 solidity-coverage: ^0.7.20 @@ -2765,7 +2765,7 @@ __metadata: "@uniswap/v2-periphery": 1.1.0-beta.0 "@zetachain/addresses": "workspace:^" "@zetachain/addresses-tools": "workspace:^" - "@zetachain/protocol-contracts": ^2.0.1 + "@zetachain/protocol-contracts": ^2.1.0 ethers: 5.6.8 hardhat-gas-reporter: ^1.0.8 solidity-coverage: ^0.7.20 @@ -2781,7 +2781,7 @@ __metadata: "@uniswap/v2-periphery": 1.1.0-beta.0 "@zetachain/addresses": "workspace:^" "@zetachain/addresses-tools": "workspace:^" - "@zetachain/protocol-contracts": ^2.0.1 + "@zetachain/protocol-contracts": ^2.1.0 ethers: 5.6.8 hardhat-gas-reporter: ^1.0.8 solidity-coverage: ^0.7.20 From 90685e848171d367a7474999c11e70a306c39830 Mon Sep 17 00:00:00 2001 From: Andres Martin Aiello <50411235+andresaiello@users.noreply.github.com> Date: Mon, 4 Sep 2023 11:47:22 -0300 Subject: [PATCH 089/115] Add onZetaRevert to send contract (#116) --- .../multi-chain-value/MultiChainValue.sol | 12 ++++++++-- .../test/ZetaConnectorMock.sol | 21 ++++++++++++++++ .../test/MultiChainValue.spec.ts | 24 +++++++++++++++++++ 3 files changed, 55 insertions(+), 2 deletions(-) diff --git a/packages/zeta-app-contracts/contracts/multi-chain-value/MultiChainValue.sol b/packages/zeta-app-contracts/contracts/multi-chain-value/MultiChainValue.sol index f27d05bf..d2f319f7 100644 --- a/packages/zeta-app-contracts/contracts/multi-chain-value/MultiChainValue.sol +++ b/packages/zeta-app-contracts/contracts/multi-chain-value/MultiChainValue.sol @@ -71,7 +71,7 @@ contract MultiChainValue is ZetaInteractor, MultiChainValueErrors { destinationChainId: destinationChainId, destinationAddress: destinationAddress, destinationGasLimit: 300000, - message: abi.encode(), + message: abi.encode(msg.sender), zetaValueAndGas: zetaValueAndGas, zetaParams: abi.encode("") }) @@ -94,10 +94,18 @@ contract MultiChainValue is ZetaInteractor, MultiChainValueErrors { destinationChainId: destinationChainId, destinationAddress: destinationAddress, destinationGasLimit: 300000, - message: abi.encode(), + message: abi.encode(msg.sender), zetaValueAndGas: zetaValueAndGas, zetaParams: abi.encode("") }) ); } + + function onZetaRevert(ZetaInterfaces.ZetaRevert calldata zetaRevert) external isValidRevertCall(zetaRevert) { + address messageFrom = abi.decode(zetaRevert.message, (address)); + + bool success1 = ZetaEth(zetaToken).approve(address(this), zetaRevert.remainingZetaValue); + bool success2 = ZetaEth(zetaToken).transferFrom(address(this), messageFrom, zetaRevert.remainingZetaValue); + if (!(success1 && success2)) revert ErrorTransferringZeta(); + } } diff --git a/packages/zeta-app-contracts/contracts/multi-chain-value/test/ZetaConnectorMock.sol b/packages/zeta-app-contracts/contracts/multi-chain-value/test/ZetaConnectorMock.sol index 8a9ca23d..e1fedcd9 100644 --- a/packages/zeta-app-contracts/contracts/multi-chain-value/test/ZetaConnectorMock.sol +++ b/packages/zeta-app-contracts/contracts/multi-chain-value/test/ZetaConnectorMock.sol @@ -5,4 +5,25 @@ import "@zetachain/protocol-contracts/contracts/evm/interfaces/ZetaInterfaces.so contract ZetaConnectorMockValue is ZetaConnector { function send(ZetaInterfaces.SendInput calldata input) external override {} + + function onRevert( + address zetaTxSenderAddress, + uint256 sourceChainId, + bytes calldata destinationAddress, + uint256 destinationChainId, + uint256 remainingZetaValue, + bytes calldata message, + bytes32 internalSendHash + ) external { + ZetaReceiver(zetaTxSenderAddress).onZetaRevert( + ZetaInterfaces.ZetaRevert( + zetaTxSenderAddress, + sourceChainId, + destinationAddress, + destinationChainId, + remainingZetaValue, + message + ) + ); + } } diff --git a/packages/zeta-app-contracts/test/MultiChainValue.spec.ts b/packages/zeta-app-contracts/test/MultiChainValue.spec.ts index 609dea12..c37f9ced 100644 --- a/packages/zeta-app-contracts/test/MultiChainValue.spec.ts +++ b/packages/zeta-app-contracts/test/MultiChainValue.spec.ts @@ -1,6 +1,7 @@ import { SignerWithAddress } from "@nomiclabs/hardhat-ethers/signers"; import { ZetaEth } from "@zetachain/interfaces/typechain-types"; import { expect } from "chai"; +import { parseEther } from "ethers/lib/utils"; import { ethers } from "hardhat"; import { @@ -24,6 +25,8 @@ describe("MultiChainValue tests", () => { let deployerAddress: string; let account1Address: string; + const encoder = new ethers.utils.AbiCoder(); + beforeEach(async () => { zetaConnectorMockContract = await deployZetaConnectorMock(); zetaEthMockContract = await deployZetaEthMock(); @@ -89,6 +92,27 @@ describe("MultiChainValue tests", () => { await (await multiChainValueContractA.addAvailableChainId(1)).wait(); }); + it("Should send the tokens back to the sender", async () => { + await (await multiChainValueContractA.addAvailableChainId(chainAId)).wait(); + const chainId = await deployer.getChainId(); + + const remainingZetaValue = parseEther("15"); + await zetaEthMockContract.transfer(multiChainValueContractA.address, remainingZetaValue); + + await zetaConnectorMockContract.onRevert( + multiChainValueContractA.address, + chainId, + ethers.utils.solidityPack(["address"], [multiChainValueContractA.address]), + chainBId, + remainingZetaValue, + encoder.encode(["address"], [account1.address]), + ethers.utils.hexZeroPad("0x0", 32) + ); + + const balance = await zetaEthMockContract.balanceOf(account1.address); + await expect(balance).to.be.eq(remainingZetaValue); + }); + describe("Given a valid input", () => { it("Should send value", async () => { await (await multiChainValueContractA.addAvailableChainId(1)).wait(); From c80a37f0e873c53e76af79ef90e8eb536c776f50 Mon Sep 17 00:00:00 2001 From: Andres Martin Aiello <50411235+andresaiello@users.noreply.github.com> Date: Tue, 12 Sep 2023 16:24:39 -0300 Subject: [PATCH 090/115] Add native token support to StakingReward contract (#117) * Add native token support to StakingReward contract * remove extra var * remove extra import * remove unused code --- .../Synthetixio/StakingRewards.sol | 26 ++++- .../test/LiquidityIncentives.spec.ts | 94 +++++++++++++++++-- .../test/Synthetixio/StakingRewards.ts | 16 ++-- 3 files changed, 118 insertions(+), 18 deletions(-) diff --git a/packages/zevm-app-contracts/contracts/liquidity-incentives/Synthetixio/StakingRewards.sol b/packages/zevm-app-contracts/contracts/liquidity-incentives/Synthetixio/StakingRewards.sol index 3ef2a800..d2e39461 100644 --- a/packages/zevm-app-contracts/contracts/liquidity-incentives/Synthetixio/StakingRewards.sol +++ b/packages/zevm-app-contracts/contracts/liquidity-incentives/Synthetixio/StakingRewards.sol @@ -105,18 +105,33 @@ contract StakingRewards is RewardsDistributionRecipient, ReentrancyGuard, Pausab emit Withdrawn(msg.sender, amount); } - function getReward() public nonReentrant updateReward(msg.sender) { + function getReward(bool unwrap) public nonReentrant updateReward(msg.sender) { uint256 reward = rewards[msg.sender]; if (reward > 0) { rewards[msg.sender] = 0; - rewardsToken.safeTransfer(msg.sender, reward); + if (unwrap) { + // The 4-byte signature of the function "withdraw(uint256)" + // This is calculated as: bytes4(keccak256("withdraw(uint256)")) + bytes4 functionSignature = 0x2e1a7d4d; + + // Construct the call data + // Here, 'wad' is set to reward + bytes memory data = abi.encodeWithSelector(functionSignature, reward); + + // Make the low-level call + (bool success, ) = address(rewardsToken).call(data); + require(success, "Reward is not a wrapped asset"); + + (success, ) = msg.sender.call{value: reward}(""); + require(success, "Transfer failed"); + } else rewardsToken.safeTransfer(msg.sender, reward); emit RewardPaid(msg.sender, reward); } } - function exit() external { + function exit(bool unwrap) external { withdraw(_balances[msg.sender]); - getReward(); + getReward(unwrap); } /* ========== RESTRICTED FUNCTIONS ========== */ @@ -178,4 +193,7 @@ contract StakingRewards is RewardsDistributionRecipient, ReentrancyGuard, Pausab event RewardPaid(address indexed user, uint256 reward); event RewardsDurationUpdated(uint256 newDuration); event Recovered(address token, uint256 amount); + + // Function to accept Ether + receive() external payable {} } diff --git a/packages/zevm-app-contracts/test/LiquidityIncentives.spec.ts b/packages/zevm-app-contracts/test/LiquidityIncentives.spec.ts index 5c22aa55..743460f8 100644 --- a/packages/zevm-app-contracts/test/LiquidityIncentives.spec.ts +++ b/packages/zevm-app-contracts/test/LiquidityIncentives.spec.ts @@ -227,13 +227,13 @@ describe("LiquidityIncentives tests", () => { zetaBalance = await ZETA_ERC20.balanceOf(sampleAccount2.address); expect(zetaBalance).to.be.eq(0); - await rewardDistributorContract.connect(sampleAccount1).getReward(); + await rewardDistributorContract.connect(sampleAccount1).getReward(false); zetaBalance = await ZETA_ERC20.balanceOf(sampleAccount1.address); expect(zetaBalance).to.be.closeTo(REWARDS_AMOUNT.div(2), ERROR_TOLERANCE); zetaBalance = await ZETA_ERC20.balanceOf(sampleAccount2.address); expect(zetaBalance).to.be.eq(0); - await rewardDistributorContract.connect(sampleAccount2).getReward(); + await rewardDistributorContract.connect(sampleAccount2).getReward(false); zetaBalance = await ZETA_ERC20.balanceOf(sampleAccount1.address); expect(zetaBalance).to.be.closeTo(REWARDS_AMOUNT.div(2), ERROR_TOLERANCE); zetaBalance = await ZETA_ERC20.balanceOf(sampleAccount2.address); @@ -281,13 +281,13 @@ describe("LiquidityIncentives tests", () => { zetaBalance = await ZETA_ERC20.balanceOf(sampleAccount2.address); expect(zetaBalance).to.be.eq(0); - await rewardDistributorContract.connect(sampleAccount1).getReward(); + await rewardDistributorContract.connect(sampleAccount1).getReward(false); zetaBalance = await ZETA_ERC20.balanceOf(sampleAccount1.address); expect(zetaBalance).to.be.closeTo(REWARDS_AMOUNT.div(4).mul(3), ERROR_TOLERANCE); zetaBalance = await ZETA_ERC20.balanceOf(sampleAccount2.address); expect(zetaBalance).to.be.eq(0); - await rewardDistributorContract.connect(sampleAccount2).getReward(); + await rewardDistributorContract.connect(sampleAccount2).getReward(false); zetaBalance = await ZETA_ERC20.balanceOf(sampleAccount1.address); expect(zetaBalance).to.be.closeTo(REWARDS_AMOUNT.div(4).mul(3), ERROR_TOLERANCE); zetaBalance = await ZETA_ERC20.balanceOf(sampleAccount2.address); @@ -421,7 +421,7 @@ describe("LiquidityIncentives tests", () => { await network.provider.send("evm_increaseTime", [MIN_STAKING_PERIOD - 2]); await network.provider.send("evm_mine"); - const withdraw = rewardDistributorContract.connect(sampleAccount).exit(); + const withdraw = rewardDistributorContract.connect(sampleAccount).exit(false); await expect(withdraw).to.be.revertedWith("MinimumStakingPeriodNotMet"); }); @@ -444,7 +444,89 @@ describe("LiquidityIncentives tests", () => { await rewardDistributorContract.connect(sampleAccount).beginCoolDown(); - const withdraw = rewardDistributorContract.connect(sampleAccount).exit(); + const withdraw = rewardDistributorContract.connect(sampleAccount).exit(false); await expect(withdraw).to.be.revertedWith("MinimumStakingPeriodNotMet"); }); + + it("Should distribute rewards between two users using native token", async () => { + await ZETA.transfer(rewardDistributorContract.address, REWARDS_AMOUNT); + await rewardDistributorContract.setRewardsDuration(REWARD_DURATION); + await rewardDistributorContract.notifyRewardAmount(REWARDS_AMOUNT); + + const sampleAccount1 = accounts[1]; + const sampleAccount2 = accounts[2]; + const stakedAmount1 = parseEther("100"); + const stakedAmount2 = parseEther("100"); + + await stakeToken(sampleAccount1, stakedAmount1); + await stakeToken(sampleAccount2, stakedAmount2); + + await network.provider.send("evm_increaseTime", [REWARD_DURATION.div(2).toNumber()]); + await network.provider.send("evm_mine"); + + let earned1 = await rewardDistributorContract.earned(sampleAccount1.address); + expect(earned1).to.be.closeTo(REWARDS_AMOUNT.div(4), ERROR_TOLERANCE); + + let earned2 = await rewardDistributorContract.earned(sampleAccount2.address); + expect(earned2).to.be.closeTo(REWARDS_AMOUNT.div(4), ERROR_TOLERANCE); + + await network.provider.send("evm_increaseTime", [REWARD_DURATION.div(2).toNumber()]); + await network.provider.send("evm_mine"); + + earned1 = await rewardDistributorContract.earned(sampleAccount1.address); + expect(earned1).to.be.closeTo(REWARDS_AMOUNT.div(2), ERROR_TOLERANCE); + earned2 = await rewardDistributorContract.earned(sampleAccount2.address); + expect(earned2).to.be.closeTo(REWARDS_AMOUNT.div(2), ERROR_TOLERANCE); + + let zetaBalance = BigNumber.from(0); + const zetaInitialBalanceAccount1 = await ethers.provider.getBalance(sampleAccount1.address); + const zetaInitialBalanceAccount2 = await ethers.provider.getBalance(sampleAccount2.address); + + await rewardDistributorContract.connect(sampleAccount1).getReward(true); + zetaBalance = await ethers.provider.getBalance(sampleAccount1.address); + expect(zetaBalance.sub(zetaInitialBalanceAccount1)).to.be.closeTo(REWARDS_AMOUNT.div(2), ERROR_TOLERANCE); + zetaBalance = await ethers.provider.getBalance(sampleAccount2.address); + expect(zetaBalance.sub(zetaInitialBalanceAccount2)).to.be.eq(0); + + await rewardDistributorContract.connect(sampleAccount2).getReward(true); + zetaBalance = await ethers.provider.getBalance(sampleAccount1.address); + expect(zetaBalance.sub(zetaInitialBalanceAccount1)).to.be.closeTo(REWARDS_AMOUNT.div(2), ERROR_TOLERANCE); + zetaBalance = await ethers.provider.getBalance(sampleAccount2.address); + expect(zetaBalance.sub(zetaInitialBalanceAccount2)).to.be.closeTo(REWARDS_AMOUNT.div(2), ERROR_TOLERANCE); + }); + + it("Should fail if rewards token is not ZETA", async () => { + const rewardToken = ZRC20Contracts[1]; + const tx = await rewardDistributorFactory.createTokenIncentive( + deployer.address, + deployer.address, + rewardToken.address, + ZRC20Contract.address, + AddressZero + ); + const receipt = await tx.wait(); + const event = receipt.events?.find(e => e.event === "RewardDistributorCreated"); + expect(event).to.not.be.undefined; + + const { rewardDistributorContract: rewardDistributorContractAddress } = event?.args as any; + rewardDistributorContract = (await ethers.getContractAt( + "RewardDistributor", + rewardDistributorContractAddress + )) as RewardDistributor; + + await rewardToken.transfer(rewardDistributorContract.address, REWARDS_AMOUNT); + await rewardDistributorContract.setRewardsDuration(REWARD_DURATION); + await rewardDistributorContract.notifyRewardAmount(REWARDS_AMOUNT); + + const sampleAccount1 = accounts[1]; + const stakedAmount1 = parseEther("100"); + + await stakeToken(sampleAccount1, stakedAmount1); + + await network.provider.send("evm_increaseTime", [REWARD_DURATION.div(2).toNumber()]); + await network.provider.send("evm_mine"); + + const getReward = rewardDistributorContract.connect(sampleAccount1).getReward(true); + await expect(getReward).to.be.revertedWith("Reward is not a wrapped asset"); + }); }); diff --git a/packages/zevm-app-contracts/test/Synthetixio/StakingRewards.ts b/packages/zevm-app-contracts/test/Synthetixio/StakingRewards.ts index c76c67be..9b842fdc 100644 --- a/packages/zevm-app-contracts/test/Synthetixio/StakingRewards.ts +++ b/packages/zevm-app-contracts/test/Synthetixio/StakingRewards.ts @@ -276,7 +276,7 @@ describe("StakingRewards", () => { }); }); - describe("getReward()", () => { + describe("getReward(false)", () => { it("should increase rewards token balance", async () => { const totalToStake = toUnit("100"); const totalToDistribute = toUnit("5000"); @@ -292,7 +292,7 @@ describe("StakingRewards", () => { const initialRewardBal = await rewardsToken.balanceOf(stakingAccount1.address); const initialEarnedBal = await stakingRewards.earned(stakingAccount1.address); - await stakingRewards.connect(stakingAccount1).getReward(); + await stakingRewards.connect(stakingAccount1).getReward(false); const postRewardBal = await rewardsToken.balanceOf(stakingAccount1.address); const postEarnedBal = await stakingRewards.earned(stakingAccount1.address); @@ -365,7 +365,7 @@ describe("StakingRewards", () => { await stakingRewards.connect(rewardsDistribution).notifyRewardAmount(totalToDistribute); await fastForward(DAY * 4); - await stakingRewards.connect(stakingAccount1).getReward(); + await stakingRewards.connect(stakingAccount1).getReward(false); await fastForward(DAY * 4); // New Rewards period much lower @@ -383,7 +383,7 @@ describe("StakingRewards", () => { await stakingRewards.connect(rewardsDistribution).notifyRewardAmount(totalToDistribute); await fastForward(DAY * 71); - await stakingRewards.connect(stakingAccount1).getReward(); + await stakingRewards.connect(stakingAccount1).getReward(false); }); }); @@ -434,7 +434,7 @@ describe("StakingRewards", () => { }); }); - describe("exit()", () => { + describe("exit(false)", () => { it("should retrieve all earned and increase rewards bal", async () => { const totalToStake = toUnit("100"); const totalToDistribute = toUnit("5000"); @@ -450,7 +450,7 @@ describe("StakingRewards", () => { const initialRewardBal = await rewardsToken.balanceOf(stakingAccount1.address); const initialEarnedBal = await stakingRewards.earned(stakingAccount1.address); - await stakingRewards.connect(stakingAccount1).exit(); + await stakingRewards.connect(stakingAccount1).exit(false); const postRewardBal = await rewardsToken.balanceOf(stakingAccount1.address); const postEarnedBal = await stakingRewards.earned(stakingAccount1.address); @@ -545,12 +545,12 @@ describe("StakingRewards", () => { assert.bnClose(rewardRewardsEarned, rewardRewardsEarnedPostWithdraw, toUnit("0.1")); // Get rewards const initialRewardBal = await rewardsToken.balanceOf(stakingAccount1.address); - await stakingRewards.connect(stakingAccount1).getReward(); + await stakingRewards.connect(stakingAccount1).getReward(false); const postRewardRewardBal = await rewardsToken.balanceOf(stakingAccount1.address); assert.bnGt(postRewardRewardBal, initialRewardBal); // Exit const preExitLPBal = await stakingToken.balanceOf(stakingAccount1.address); - await stakingRewards.connect(stakingAccount1).exit(); + await stakingRewards.connect(stakingAccount1).exit(false); const postExitLPBal = await stakingToken.balanceOf(stakingAccount1.address); assert.bnGt(postExitLPBal, preExitLPBal); }); From d288f5754104bc904c95b71989ba75955bd573c5 Mon Sep 17 00:00:00 2001 From: Andres Martin Aiello <50411235+andresaiello@users.noreply.github.com> Date: Wed, 27 Sep 2023 11:46:09 -0300 Subject: [PATCH 091/115] Deploy disperse to athens (#120) * Improve uniswap scripts * deploy disperse to athens * remove uniswap scripts * restore script --- packages/addresses/src/addresses.athens.json | 5 ++++ packages/addresses/src/addresses.helpers.ts | 2 ++ .../contracts/disperse/Disperse.sol | 24 +++++++++++++++++++ .../scripts/disperse/deploy.ts | 23 ++++++++++++++++++ 4 files changed, 54 insertions(+) create mode 100644 packages/zevm-app-contracts/contracts/disperse/Disperse.sol create mode 100644 packages/zevm-app-contracts/scripts/disperse/deploy.ts diff --git a/packages/addresses/src/addresses.athens.json b/packages/addresses/src/addresses.athens.json index 413e3a2d..1a408b1d 100644 --- a/packages/addresses/src/addresses.athens.json +++ b/packages/addresses/src/addresses.athens.json @@ -4,6 +4,7 @@ "crossChainCounter": "", "crossChainNft": "", "dai": "", + "disperse": "", "immutableCreate2Factory": "0x095a03c6a68137fE9a566bBc3e552F299d8b886d", "multiChainSwap": "0x8BD7144Ddb59c9Fa3Dcf809998521E9cAD946fa1", "multiChainSwapZetaConnector": "", @@ -30,6 +31,7 @@ "crossChainCounter": "", "crossChainNft": "", "dai": "", + "disperse": "", "immutableCreate2Factory": "0x095a03c6a68137fE9a566bBc3e552F299d8b886d", "multiChainSwap": "0x323745f16C93e56a98012970c28788498d8B3a14", "multiChainSwapZetaConnector": "", @@ -82,6 +84,7 @@ "crossChainCounter": "", "crossChainNft": "", "dai": "", + "disperse": "", "immutableCreate2Factory": "", "multiChainSwap": "", "multiChainValue": "", @@ -107,6 +110,7 @@ "crossChainCounter": "", "crossChainNft": "", "dai": "", + "disperse": "0x1E0F767F48Fb10FcF820703f116E9B0F87319d63", "immutableCreate2Factory": "", "multiChainSwap": "", "multiChainSwapZetaConnector": "", @@ -133,6 +137,7 @@ "crossChainCounter": "", "crossChainNft": "", "dai": "", + "disperse": "", "immutableCreate2Factory": "", "multiChainSwap": "", "multiChainSwapZetaConnector": "", diff --git a/packages/addresses/src/addresses.helpers.ts b/packages/addresses/src/addresses.helpers.ts index e3a21f84..330bd00f 100644 --- a/packages/addresses/src/addresses.helpers.ts +++ b/packages/addresses/src/addresses.helpers.ts @@ -7,6 +7,7 @@ export type ZetaAddress = | "crossChainCounter" | "crossChainNft" | "dai" + | "disperse" | "immutableCreate2Factory" | "multiChainSwap" | "multiChainSwapZetaConnector" @@ -34,6 +35,7 @@ const zetaAddresses: Record = { crossChainCounter: true, crossChainNft: true, dai: true, + disperse: true, immutableCreate2Factory: true, multiChainSwap: true, multiChainSwapZetaConnector: true, diff --git a/packages/zevm-app-contracts/contracts/disperse/Disperse.sol b/packages/zevm-app-contracts/contracts/disperse/Disperse.sol new file mode 100644 index 00000000..9adc5cec --- /dev/null +++ b/packages/zevm-app-contracts/contracts/disperse/Disperse.sol @@ -0,0 +1,24 @@ +// SPDX-License-Identifier: MIT +pragma solidity 0.8.7; + +import "@openzeppelin/contracts/interfaces/IERC20.sol"; + +contract Disperse { + function disperseEther(address[] calldata recipients, uint256[] calldata values) external payable { + for (uint256 i = 0; i < recipients.length; i++) payable(recipients[i]).transfer(values[i]); + uint256 balance = address(this).balance; + if (balance > 0) payable(msg.sender).transfer(balance); + } + + function disperseToken(IERC20 token, address[] calldata recipients, uint256[] calldata values) external { + uint256 total = 0; + for (uint256 i = 0; i < recipients.length; i++) total += values[i]; + require(token.transferFrom(msg.sender, address(this), total)); + for (uint256 i = 0; i < recipients.length; i++) require(token.transfer(recipients[i], values[i])); + } + + function disperseTokenSimple(IERC20 token, address[] calldata recipients, uint256[] calldata values) external { + for (uint256 i = 0; i < recipients.length; i++) + require(token.transferFrom(msg.sender, recipients[i], values[i])); + } +} diff --git a/packages/zevm-app-contracts/scripts/disperse/deploy.ts b/packages/zevm-app-contracts/scripts/disperse/deploy.ts new file mode 100644 index 00000000..8b8a28b7 --- /dev/null +++ b/packages/zevm-app-contracts/scripts/disperse/deploy.ts @@ -0,0 +1,23 @@ +import { isNetworkName } from "@zetachain/addresses"; +import { saveAddress } from "@zetachain/addresses-tools"; +import { ethers, network } from "hardhat"; + +import { Disperse__factory } from "../../typechain-types"; + +const networkName = network.name; + +async function main() { + if (!isNetworkName(networkName)) throw new Error("Invalid network name"); + + const DisperseFactory = (await ethers.getContractFactory("Disperse")) as Disperse__factory; + + const disperseFactory = await DisperseFactory.deploy(); + await disperseFactory.deployed(); + console.log("Disperse deployed to:", disperseFactory.address); + saveAddress("disperse", disperseFactory.address); +} + +main().catch(error => { + console.error(error); + process.exit(1); +}); From 5b35a12f56419b16f3075ddd61d84e2b6169084e Mon Sep 17 00:00:00 2001 From: Andres Martin Aiello <50411235+andresaiello@users.noreply.github.com> Date: Fri, 29 Sep 2023 15:59:07 -0300 Subject: [PATCH 092/115] Add bsc-mainnet to addresses pkg (#121) * Add bsc-mainnet to addresses pkg * Move to v0.0.13 --- packages/addresses/package.json | 4 ++-- packages/addresses/src/addresses.helpers.ts | 5 +++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/packages/addresses/package.json b/packages/addresses/package.json index 91690818..0e081e1c 100644 --- a/packages/addresses/package.json +++ b/packages/addresses/package.json @@ -1,6 +1,6 @@ { "name": "@zetachain/addresses", - "version": "0.0.11", + "version": "0.0.13", "license": "MIT", "author": "zetachain", "publishConfig": { @@ -22,4 +22,4 @@ "vite": "^3.1.0", "vite-plugin-dts": "^1.4.1" } -} +} \ No newline at end of file diff --git a/packages/addresses/src/addresses.helpers.ts b/packages/addresses/src/addresses.helpers.ts index 330bd00f..e77c8c88 100644 --- a/packages/addresses/src/addresses.helpers.ts +++ b/packages/addresses/src/addresses.helpers.ts @@ -109,11 +109,11 @@ export const getTestnetList = (): Record; export const isMainnetNetworkName = (networkName: string): networkName is MainnetNetworkName => - networkName === "eth-mainnet" || networkName === "klaytn-cypress"; + networkName === "bsc-mainnet" || networkName === "eth-mainnet" || networkName === "klaytn-cypress"; export const isZetaMainnet = (networkName: string | undefined): networkName is ZetaMainnetNetworkName => networkName === "mainnet"; @@ -133,6 +133,7 @@ export const getChainId = (networkName: NetworkName) => { athens: 7001, "bitcoin-test": 18332, "bsc-localnet": 97, + "bsc-mainnet": 56, "bsc-testnet": 97, "eth-localnet": 5, "eth-mainnet": 1, From 3763b13351b170a986750274b06692393750a112 Mon Sep 17 00:00:00 2001 From: Andres Martin Aiello <50411235+andresaiello@users.noreply.github.com> Date: Mon, 2 Oct 2023 11:33:34 -0300 Subject: [PATCH 093/115] Update address tools repo to deploy bsc-mainnet (#122) * Update address tools repo to deploy bsc-mainnet * update chainId --- .../addresses-tools/src/addresses.helpers.ts | 3 +++ packages/addresses-tools/src/networks.ts | 6 +++++ packages/addresses/src/addresses.mainnet.json | 23 +++++++++++++++++++ .../lib/shared/network.constants.ts | 8 ++++++- 4 files changed, 39 insertions(+), 1 deletion(-) diff --git a/packages/addresses-tools/src/addresses.helpers.ts b/packages/addresses-tools/src/addresses.helpers.ts index 9dcfa820..dd7b33b3 100644 --- a/packages/addresses-tools/src/addresses.helpers.ts +++ b/packages/addresses-tools/src/addresses.helpers.ts @@ -44,6 +44,7 @@ export const getScanVariable = ({ customNetworkName }: { customNetworkName?: str athens: "", "bitcoin-test": "", "bsc-localnet": "", + "bsc-mainnet": process.env.BSCSCAN_API_KEY || "", "bsc-testnet": process.env.BSCSCAN_API_KEY || "", "eth-localnet": "", "eth-mainnet": process.env.ETHERSCAN_API_KEY || "", @@ -67,6 +68,7 @@ export const getExplorerUrl = ({ customNetworkName }: { customNetworkName?: stri athens: "", "bitcoin-test": "", "bsc-localnet": "", + "bsc-mainnet": "https://bscscan.com/", "bsc-testnet": "https://testnet.bscscan.com/", "eth-localnet": "", "eth-mainnet": "https://etherscan.io/", @@ -86,6 +88,7 @@ export const getGasSymbolByNetwork = (networkName: NetworkName): string => { athens: "ZETA", "bitcoin-test": "BTC", "bsc-localnet": "BNB", + "bsc-mainnet": "BNB", "bsc-testnet": "BNB", "eth-localnet": "ETH", "eth-mainnet": "ETH", diff --git a/packages/addresses-tools/src/networks.ts b/packages/addresses-tools/src/networks.ts index 9fb86a5c..850eaee4 100644 --- a/packages/addresses-tools/src/networks.ts +++ b/packages/addresses-tools/src/networks.ts @@ -14,6 +14,12 @@ export const getHardhatConfigNetworks = (PRIVATE_KEYS: string[]): NetworksUserCo gasPrice: 80000000000, url: "http://localhost:8120", }, + "bsc-mainnet": { + accounts: PRIVATE_KEYS, + gas: 5000000, + gasPrice: 80000000000, + url: `https://rpc.ankr.com/bsc`, + }, "bsc-testnet": { accounts: PRIVATE_KEYS, gas: 5000000, diff --git a/packages/addresses/src/addresses.mainnet.json b/packages/addresses/src/addresses.mainnet.json index 180c8363..6edddb31 100644 --- a/packages/addresses/src/addresses.mainnet.json +++ b/packages/addresses/src/addresses.mainnet.json @@ -1,4 +1,27 @@ { + "bsc-mainnet": { + "connector": "", + "crossChainCounter": "", + "crossChainNft": "", + "dai": "", + "multiChainValue": "", + "tss": "", + "tssUpdater": "", + "uniswapV2Router02": "", + "uniswapV3PoolFactory": "", + "uniswapV3Quoter": "", + "uniswapV3Router": "", + "usdc": "", + "weth9": "", + "zetaSwapBtcInbound": "", + "zetaToken": "", + "zetaTokenConsumerUniV2": "", + "immutableCreate2Factory": "", + "multiChainSwapZetaConnector": "", + "multiChainSwap": "", + "uniswapV2Factory": "", + "zetaSwap": "" + }, "eth-mainnet": { "connector": "", "crossChainCounter": "", diff --git a/packages/example-contracts/lib/shared/network.constants.ts b/packages/example-contracts/lib/shared/network.constants.ts index 47319b47..3fd74ad5 100644 --- a/packages/example-contracts/lib/shared/network.constants.ts +++ b/packages/example-contracts/lib/shared/network.constants.ts @@ -1,6 +1,6 @@ import { NetworkName } from "@zetachain/addresses"; -type ChainId = 0 | 5 | 97 | 1001 | 1337 | 80001; +type ChainId = 0 | 1 | 5 | 56 | 97 | 1001 | 1337 | 80001; export type NetworkVariables = { chainId: ChainId; @@ -28,6 +28,12 @@ export const networkVariables: Record = { crossChainId: 0, crossChainName: "" }, + "bsc-mainnet": { + chainId: 56, + connectorAddress: "", + crossChainId: 1, + crossChainName: "eth-mainnet" + }, "bsc-testnet": { chainId: 97, connectorAddress: "0xE626402550fB921E4a47c11568F89dF3496fbEF0", From ccd893eef81d024ad5b3f59bdff590831721f02f Mon Sep 17 00:00:00 2001 From: Andres Martin Aiello <50411235+andresaiello@users.noreply.github.com> Date: Mon, 9 Oct 2023 14:30:12 -0300 Subject: [PATCH 094/115] Improve uniswap scripts (#119) --- .../add-liquidity-zeta-uniswap.ts | 43 ++----- .../uniswap/remove-liquidity-zeta-uniswap.ts | 110 +++++++++++++++++ .../scripts/uniswap/sell-token.ts | 111 ++++++++++++++++++ .../scripts/uniswap/sell-zeta.ts | 93 +++++++++++++++ .../scripts/uniswap/uniswap.helpers.ts | 55 +++++++++ 5 files changed, 377 insertions(+), 35 deletions(-) rename packages/zevm-app-contracts/scripts/{zeta-swap => uniswap}/add-liquidity-zeta-uniswap.ts (82%) create mode 100644 packages/zevm-app-contracts/scripts/uniswap/remove-liquidity-zeta-uniswap.ts create mode 100644 packages/zevm-app-contracts/scripts/uniswap/sell-token.ts create mode 100644 packages/zevm-app-contracts/scripts/uniswap/sell-zeta.ts create mode 100644 packages/zevm-app-contracts/scripts/uniswap/uniswap.helpers.ts diff --git a/packages/zevm-app-contracts/scripts/zeta-swap/add-liquidity-zeta-uniswap.ts b/packages/zevm-app-contracts/scripts/uniswap/add-liquidity-zeta-uniswap.ts similarity index 82% rename from packages/zevm-app-contracts/scripts/zeta-swap/add-liquidity-zeta-uniswap.ts rename to packages/zevm-app-contracts/scripts/uniswap/add-liquidity-zeta-uniswap.ts index 787f8d69..32731630 100644 --- a/packages/zevm-app-contracts/scripts/zeta-swap/add-liquidity-zeta-uniswap.ts +++ b/packages/zevm-app-contracts/scripts/uniswap/add-liquidity-zeta-uniswap.ts @@ -17,33 +17,17 @@ import { SystemContract__factory, UniswapV2Router02__factory } from "../../typechain-types"; +import { getNow, printReserves, sortPair } from "./uniswap.helpers"; const SYSTEM_CONTRACT = getSystemContractAddress(); const BTC_TO_ADD = parseUnits("0", 8); -const ETH_TO_ADD = parseUnits("1500"); -const MATIC_TO_ADD = parseUnits("1500"); -const BNB_TO_ADD = parseUnits("100"); +const ETH_TO_ADD = parseUnits("0"); +const MATIC_TO_ADD = parseUnits("0"); +const BNB_TO_ADD = parseUnits("0"); const ZETA_TO_ADD = parseUnits("0"); -interface Pair { - TokenA: string; - TokenB: string; -} - -export const getNow = async () => { - const block = await ethers.provider.getBlock("latest"); - return block.timestamp; -}; - -export const sortPair = (token1: string, token2: string): Pair => { - if (token1 < token2) { - return { TokenA: token1, TokenB: token2 }; - } - return { TokenA: token2, TokenB: token1 }; -}; - const addTokenEthLiquidity = async ( tokenContract: ERC20, tokenAmountToAdd: BigNumber, @@ -54,6 +38,8 @@ const addTokenEthLiquidity = async ( const tx1 = await tokenContract.approve(uniswapRouter.address, MaxUint256); await tx1.wait(); + console.log("Uniswap approved to consume token..."); + const tx2 = await uniswapRouter.addLiquidityETH( tokenContract.address, tokenAmountToAdd, @@ -89,13 +75,6 @@ const estimateZetaForToken = async ( const ZETAValue = reservesZETA.mul(tokenAmountToAdd).div(reservesToken); - const tokenDecimals = await tokenContract.decimals(); - console.log( - `Zeta/${getGasSymbolByNetwork(network)} reserves ${formatUnits(reservesZETA)}/${formatUnits( - reservesToken, - tokenDecimals - )}` - ); return ZETAValue; }; @@ -116,7 +95,6 @@ async function addLiquidity( const tokenAddress = await systemContract.gasCoinZRC20ByChainId(getChainId(network)); const tokenContract = ERC20__factory.connect(tokenAddress, deployer); - const tokenDecimals = await tokenContract.decimals(); const zetaToAdd = initLiquidityPool ? ZETA_TO_ADD @@ -129,14 +107,9 @@ async function addLiquidity( deployer ); - console.log( - `Zeta/${getGasSymbolByNetwork(network)} to add ${formatUnits(zetaToAdd)}/${formatUnits( - tokenAmountToAdd, - tokenDecimals - )}` - ); - + await printReserves(tokenContract, WZETAAddress, uniswapFactoryAddress, deployer); // await addTokenEthLiquidity(tokenContract, tokenAmountToAdd, zetaToAdd, uniswapRouter, deployer); + await printReserves(tokenContract, WZETAAddress, uniswapFactoryAddress, deployer); } async function main() { const WZETA_ADDRESS = getAddress({ diff --git a/packages/zevm-app-contracts/scripts/uniswap/remove-liquidity-zeta-uniswap.ts b/packages/zevm-app-contracts/scripts/uniswap/remove-liquidity-zeta-uniswap.ts new file mode 100644 index 00000000..896f0293 --- /dev/null +++ b/packages/zevm-app-contracts/scripts/uniswap/remove-liquidity-zeta-uniswap.ts @@ -0,0 +1,110 @@ +import { MaxUint256 } from "@ethersproject/constants"; +import { formatUnits } from "@ethersproject/units"; +import { SignerWithAddress } from "@nomiclabs/hardhat-ethers/signers"; +import { getChainId } from "@zetachain/addresses"; +import { NetworkName } from "@zetachain/addresses"; +import { getAddress } from "@zetachain/addresses"; +import { getSystemContractAddress } from "@zetachain/addresses-tools"; +import { BigNumber } from "ethers"; +import { ethers } from "hardhat"; + +import { + ERC20, + ERC20__factory, + IUniswapV2Factory__factory, + IUniswapV2Pair, + IUniswapV2Pair__factory, + IUniswapV2Router02, + SystemContract__factory, + UniswapV2Router02__factory +} from "../../typechain-types"; +import { getNow, printReserves, sortPair } from "./uniswap.helpers"; + +const SYSTEM_CONTRACT = getSystemContractAddress(); + +const removeTokenEthLiquidity = async ( + tokenContract: ERC20, + LPContract: IUniswapV2Pair, + LPAmountToRemove: BigNumber, + uniswapRouter: IUniswapV2Router02, + deployer: SignerWithAddress +) => { + const tx1 = await LPContract.approve(uniswapRouter.address, MaxUint256); + await tx1.wait(); + + console.log("Uniswap approved to consume LP..."); + + const tx2 = await uniswapRouter.removeLiquidityETH( + tokenContract.address, + LPAmountToRemove, + 0, + 0, + deployer.address, + (await getNow()) + 360, + { gasLimit: 10_000_000 } + ); + await tx2.wait(); +}; + +async function removeLiquidity( + network: NetworkName, + WZETAAddress: string, + uniswapFactoryAddress: string, + uniswapRouterAddress: string +) { + console.log(`Removing liquidity for: ${network}`); + + const [deployer] = await ethers.getSigners(); + + const systemContract = await SystemContract__factory.connect(SYSTEM_CONTRACT, deployer); + const uniswapV2Factory = IUniswapV2Factory__factory.connect(uniswapFactoryAddress, deployer); + const uniswapRouter = await UniswapV2Router02__factory.connect(uniswapRouterAddress, deployer); + + const tokenAddress = await systemContract.gasCoinZRC20ByChainId(getChainId(network)); + const tokenContract = ERC20__factory.connect(tokenAddress, deployer); + + const pair = sortPair(tokenAddress, WZETAAddress); + + const poolAddress = await uniswapV2Factory.getPair(pair.TokenA, pair.TokenB); + + const pool = IUniswapV2Pair__factory.connect(poolAddress, deployer); + + const LPBalance = await pool.balanceOf(deployer.address); + + console.log(`LP Balance: ${formatUnits(LPBalance, 18)} for ${poolAddress}`); + + await printReserves(tokenContract, WZETAAddress, uniswapFactoryAddress, deployer); + // await removeTokenEthLiquidity(tokenContract, pool, LPBalance, uniswapRouter, deployer); + await printReserves(tokenContract, WZETAAddress, uniswapFactoryAddress, deployer); +} +async function main() { + const WZETA_ADDRESS = getAddress({ + address: "weth9", + networkName: "athens", + zetaNetwork: "athens" + }); + + const UNISWAP_FACTORY_ADDRESS = getAddress({ + address: "uniswapV2Factory", + networkName: "athens", + zetaNetwork: "athens" + }); + + const UNISWAP_ROUTER_ADDRESS = getAddress({ + address: "uniswapV2Router02", + networkName: "athens", + zetaNetwork: "athens" + }); + + await removeLiquidity("goerli", WZETA_ADDRESS, UNISWAP_FACTORY_ADDRESS, UNISWAP_ROUTER_ADDRESS); + await removeLiquidity("polygon-mumbai", WZETA_ADDRESS, UNISWAP_FACTORY_ADDRESS, UNISWAP_ROUTER_ADDRESS); + await removeLiquidity("bsc-testnet", WZETA_ADDRESS, UNISWAP_FACTORY_ADDRESS, UNISWAP_ROUTER_ADDRESS); + await removeLiquidity("bitcoin-test", WZETA_ADDRESS, UNISWAP_FACTORY_ADDRESS, UNISWAP_ROUTER_ADDRESS); +} + +main() + .then(() => process.exit(0)) + .catch(error => { + console.error(error); + process.exit(1); + }); diff --git a/packages/zevm-app-contracts/scripts/uniswap/sell-token.ts b/packages/zevm-app-contracts/scripts/uniswap/sell-token.ts new file mode 100644 index 00000000..6d8ed6ea --- /dev/null +++ b/packages/zevm-app-contracts/scripts/uniswap/sell-token.ts @@ -0,0 +1,111 @@ +import { MaxUint256 } from "@ethersproject/constants"; +import { formatUnits, parseUnits } from "@ethersproject/units"; +import { SignerWithAddress } from "@nomiclabs/hardhat-ethers/signers"; +import { getChainId } from "@zetachain/addresses"; +import { NetworkName } from "@zetachain/addresses"; +import { getAddress } from "@zetachain/addresses"; +import { getSystemContractAddress } from "@zetachain/addresses-tools"; +import { BigNumber } from "ethers"; +import { ethers } from "hardhat"; + +import { + ERC20, + ERC20__factory, + IUniswapV2Router02, + SystemContract__factory, + UniswapV2Router02__factory +} from "../../typechain-types"; +import { getNow, printReserves } from "./uniswap.helpers"; + +const SYSTEM_CONTRACT = getSystemContractAddress(); + +const BTC_TO_SELL = parseUnits("0", 8); +const ETH_TO_SELL = parseUnits("0"); +const MATIC_TO_SELL = parseUnits("0"); +const BNB_TO_SELL = parseUnits("0"); + +const swapZeta = async ( + tokenContract: ERC20, + WZETAAddress: string, + amountIn: BigNumber, + uniswapRouter: IUniswapV2Router02, + deployer: SignerWithAddress +) => { + const tx1 = await tokenContract.approve(uniswapRouter.address, MaxUint256); + await tx1.wait(); + + console.log("Uniswap approved to consume token..."); + + const tx2 = await uniswapRouter.swapExactTokensForETH( + amountIn, + 0, + [tokenContract.address, WZETAAddress], + deployer.address, + (await getNow()) + 360, + { gasLimit: 10_000_000 } + ); + await tx2.wait(); + + console.log(`Tx hash: ${tx2.hash}`); +}; + +async function sellToken( + network: NetworkName, + tokenAmountToSell: BigNumber, + WZETAAddress: string, + uniswapFactoryAddress: string, + uniswapRouterAddress: string +) { + console.log(`Selling token on: ${network}`); + + const [deployer] = await ethers.getSigners(); + + const systemContract = await SystemContract__factory.connect(SYSTEM_CONTRACT, deployer); + const uniswapRouter = await UniswapV2Router02__factory.connect(uniswapRouterAddress, deployer); + + const tokenAddress = await systemContract.gasCoinZRC20ByChainId(getChainId(network)); + const tokenContract = ERC20__factory.connect(tokenAddress, deployer); + + await printReserves(tokenContract, WZETAAddress, uniswapFactoryAddress, deployer); + // await swapZeta(tokenContract, WZETAAddress, tokenAmountToSell, uniswapRouter, deployer); + await printReserves(tokenContract, WZETAAddress, uniswapFactoryAddress, deployer); +} +async function main() { + const WZETA_ADDRESS = getAddress({ + address: "weth9", + networkName: "athens", + zetaNetwork: "athens" + }); + + const UNISWAP_FACTORY_ADDRESS = getAddress({ + address: "uniswapV2Factory", + networkName: "athens", + zetaNetwork: "athens" + }); + + const UNISWAP_ROUTER_ADDRESS = getAddress({ + address: "uniswapV2Router02", + networkName: "athens", + zetaNetwork: "athens" + }); + + if (!ETH_TO_SELL.isZero()) { + await sellToken("goerli", ETH_TO_SELL, WZETA_ADDRESS, UNISWAP_FACTORY_ADDRESS, UNISWAP_ROUTER_ADDRESS); + } + if (!MATIC_TO_SELL.isZero()) { + await sellToken("polygon-mumbai", MATIC_TO_SELL, WZETA_ADDRESS, UNISWAP_FACTORY_ADDRESS, UNISWAP_ROUTER_ADDRESS); + } + if (!BNB_TO_SELL.isZero()) { + await sellToken("bsc-testnet", BNB_TO_SELL, WZETA_ADDRESS, UNISWAP_FACTORY_ADDRESS, UNISWAP_ROUTER_ADDRESS); + } + if (!BTC_TO_SELL.isZero()) { + await sellToken("bitcoin-test", BTC_TO_SELL, WZETA_ADDRESS, UNISWAP_FACTORY_ADDRESS, UNISWAP_ROUTER_ADDRESS); + } +} + +main() + .then(() => process.exit(0)) + .catch(error => { + console.error(error); + process.exit(1); + }); diff --git a/packages/zevm-app-contracts/scripts/uniswap/sell-zeta.ts b/packages/zevm-app-contracts/scripts/uniswap/sell-zeta.ts new file mode 100644 index 00000000..f990c074 --- /dev/null +++ b/packages/zevm-app-contracts/scripts/uniswap/sell-zeta.ts @@ -0,0 +1,93 @@ +import { MaxUint256 } from "@ethersproject/constants"; +import { formatUnits, parseUnits } from "@ethersproject/units"; +import { SignerWithAddress } from "@nomiclabs/hardhat-ethers/signers"; +import { getChainId } from "@zetachain/addresses"; +import { NetworkName } from "@zetachain/addresses"; +import { getAddress } from "@zetachain/addresses"; +import { getSystemContractAddress } from "@zetachain/addresses-tools"; +import { BigNumber } from "ethers"; +import { ethers } from "hardhat"; + +import { + ERC20, + ERC20__factory, + IUniswapV2Router02, + SystemContract__factory, + UniswapV2Router02__factory +} from "../../typechain-types"; +import { getNow, printReserves } from "./uniswap.helpers"; + +const SYSTEM_CONTRACT = getSystemContractAddress(); + +const ZETA_TO_SELL = parseUnits("0.001"); + +const swapZeta = async ( + tokenContract: ERC20, + WZETAAddress: string, + ZETAAmountToSell: BigNumber, + uniswapRouter: IUniswapV2Router02, + deployer: SignerWithAddress +) => { + const tx = await uniswapRouter.swapExactETHForTokens( + 0, + [WZETAAddress, tokenContract.address], + deployer.address, + (await getNow()) + 360, + { gasLimit: 10_000_000, value: ZETAAmountToSell } + ); + await tx.wait(); + + console.log(`Sell tx hash: ${tx.hash}`); +}; + +async function sellZeta( + network: NetworkName, + WZETAAddress: string, + uniswapFactoryAddress: string, + uniswapRouterAddress: string +) { + console.log(`Sell ZETA on: ${network}`); + + const [deployer] = await ethers.getSigners(); + + const systemContract = await SystemContract__factory.connect(SYSTEM_CONTRACT, deployer); + const uniswapRouter = await UniswapV2Router02__factory.connect(uniswapRouterAddress, deployer); + + const tokenAddress = await systemContract.gasCoinZRC20ByChainId(getChainId(network)); + const tokenContract = ERC20__factory.connect(tokenAddress, deployer); + + await printReserves(tokenContract, WZETAAddress, uniswapFactoryAddress, deployer); + // await swapZeta(tokenContract, WZETAAddress, ZETA_TO_SELL, uniswapRouter, deployer); + await printReserves(tokenContract, WZETAAddress, uniswapFactoryAddress, deployer); +} +async function main() { + const WZETA_ADDRESS = getAddress({ + address: "weth9", + networkName: "athens", + zetaNetwork: "athens" + }); + + const UNISWAP_FACTORY_ADDRESS = getAddress({ + address: "uniswapV2Factory", + networkName: "athens", + zetaNetwork: "athens" + }); + + const UNISWAP_ROUTER_ADDRESS = getAddress({ + address: "uniswapV2Router02", + networkName: "athens", + zetaNetwork: "athens" + }); + + await sellZeta("goerli", WZETA_ADDRESS, UNISWAP_FACTORY_ADDRESS, UNISWAP_ROUTER_ADDRESS); + await sellZeta("polygon-mumbai", WZETA_ADDRESS, UNISWAP_FACTORY_ADDRESS, UNISWAP_ROUTER_ADDRESS); + await sellZeta("bsc-testnet", WZETA_ADDRESS, UNISWAP_FACTORY_ADDRESS, UNISWAP_ROUTER_ADDRESS); + await sellZeta("bitcoin-test", WZETA_ADDRESS, UNISWAP_FACTORY_ADDRESS, UNISWAP_ROUTER_ADDRESS); +} + +main() + .then(() => process.exit(0)) + .catch(error => { + console.error(error); + process.exit(1); + }); diff --git a/packages/zevm-app-contracts/scripts/uniswap/uniswap.helpers.ts b/packages/zevm-app-contracts/scripts/uniswap/uniswap.helpers.ts new file mode 100644 index 00000000..9fcfd3b2 --- /dev/null +++ b/packages/zevm-app-contracts/scripts/uniswap/uniswap.helpers.ts @@ -0,0 +1,55 @@ +import { SignerWithAddress } from "@nomiclabs/hardhat-ethers/signers"; +import { formatUnits, parseUnits } from "ethers/lib/utils"; +import { ethers } from "hardhat"; + +import { IUniswapV2Factory__factory } from "../../../zevm-example-contracts/typechain-types"; +import { ERC20, IUniswapV2Pair__factory } from "../../typechain-types"; + +export interface Pair { + TokenA: string; + TokenB: string; +} + +export const getNow = async () => { + const block = await ethers.provider.getBlock("latest"); + return block.timestamp; +}; + +export const sortPair = (token1: string, token2: string): Pair => { + if (token1 < token2) { + return { TokenA: token1, TokenB: token2 }; + } + return { TokenA: token2, TokenB: token1 }; +}; + +export const printReserves = async ( + tokenContract: ERC20, + WZETAAddress: string, + uniswapFactoryAddress: string, + deployer: SignerWithAddress +) => { + const uniswapV2Factory = IUniswapV2Factory__factory.connect(uniswapFactoryAddress, deployer); + + const pair = sortPair(tokenContract.address, WZETAAddress); + + const poolAddress = await uniswapV2Factory.getPair(pair.TokenA, pair.TokenB); + + const pool = IUniswapV2Pair__factory.connect(poolAddress, deployer); + + const reserves = await pool.getReserves(); + + const reservesZETA = WZETAAddress < tokenContract.address ? reserves.reserve0 : reserves.reserve1; + const reservesToken = WZETAAddress > tokenContract.address ? reserves.reserve0 : reserves.reserve1; + + const tokenDecimals = await tokenContract.decimals(); + const reservesToken18Decimals = + 18 === tokenDecimals ? reservesToken : reservesToken.mul(parseUnits("1", 18 - tokenDecimals)); + + const ratio = reservesToken18Decimals.mul(parseUnits("1")).div(reservesZETA); + + console.log( + `Reserves ZETA: ${formatUnits(reservesZETA)} / TOKEN: ${formatUnits(reservesToken18Decimals)} / Ratio ${formatUnits( + ratio + )}` + ); +}; From ce2ae527145904a6f30311c723a633064dd4ae2f Mon Sep 17 00:00:00 2001 From: Andres Martin Aiello <50411235+andresaiello@users.noreply.github.com> Date: Wed, 18 Oct 2023 11:50:06 -0300 Subject: [PATCH 095/115] Deploy Token Incentive contracts on zEVM (#118) --- packages/addresses/src/addresses.athens.json | 2 +- .../scripts/multi-chain-value/send-value.ts | 12 ++++++------ .../scripts/liquidity-incentives/add-reward.ts | 3 ++- .../liquidity-incentives/read-rewards-data.ts | 2 +- 4 files changed, 10 insertions(+), 9 deletions(-) diff --git a/packages/addresses/src/addresses.athens.json b/packages/addresses/src/addresses.athens.json index 1a408b1d..d7751271 100644 --- a/packages/addresses/src/addresses.athens.json +++ b/packages/addresses/src/addresses.athens.json @@ -115,7 +115,7 @@ "multiChainSwap": "", "multiChainSwapZetaConnector": "", "multiChainValue": "0x82aC45D07dEe4DBDe050e838beF345347DEd99a8", - "rewardDistributorFactory": "0x3a969d797A28d61e8127562944E639a5824F1219", + "rewardDistributorFactory": "0x667e4C493d40015256BDC89E3ba750B2F90359E1", "tridentPoolFactory": "", "tss": "", "tssUpdater": "", diff --git a/packages/zeta-app-contracts/scripts/multi-chain-value/send-value.ts b/packages/zeta-app-contracts/scripts/multi-chain-value/send-value.ts index 44bb08ac..efb1bb41 100644 --- a/packages/zeta-app-contracts/scripts/multi-chain-value/send-value.ts +++ b/packages/zeta-app-contracts/scripts/multi-chain-value/send-value.ts @@ -38,7 +38,7 @@ const main = async () => { const amount = parseEther("1"); - if (ZETA_NETWORK !== "athens") { + if (networkName !== "athens") { const zetaToken = await getErc20(getAddress("zetaToken")); const tx = await zetaToken.approve(multiChainValueContract.address, amount.mul(10)); await tx.wait(); @@ -47,11 +47,11 @@ const main = async () => { if (isZetaTestnet(ZETA_NETWORK)) { const destinationAddress = ethers.utils.solidityPack(["address"], [process.env.PUBLIC_KEY_1 ?? signer.address]); - await doTranfer(ZETA_NETWORK, multiChainValueContract, getChainId("goerli"), amount, destinationAddress); - // await doTranfer(ZETA_NETWORK, multiChainValueContract, getChainId("klaytn-baobab"), amount, destinationAddress); - await doTranfer(ZETA_NETWORK, multiChainValueContract, getChainId("polygon-mumbai"), amount, destinationAddress); - await doTranfer(ZETA_NETWORK, multiChainValueContract, getChainId("bsc-testnet"), amount, destinationAddress); - await doTranfer(ZETA_NETWORK, multiChainValueContract, getChainId("athens"), amount, destinationAddress); + await doTranfer(networkName, multiChainValueContract, getChainId("goerli"), amount, destinationAddress); + // await doTranfer(networkName, multiChainValueContract, getChainId("klaytn-baobab"), amount, destinationAddress); + await doTranfer(networkName, multiChainValueContract, getChainId("polygon-mumbai"), amount, destinationAddress); + await doTranfer(networkName, multiChainValueContract, getChainId("bsc-testnet"), amount, destinationAddress); + await doTranfer(networkName, multiChainValueContract, getChainId("athens"), amount, destinationAddress); } }; diff --git a/packages/zevm-app-contracts/scripts/liquidity-incentives/add-reward.ts b/packages/zevm-app-contracts/scripts/liquidity-incentives/add-reward.ts index 9a81e16e..f1c987c2 100644 --- a/packages/zevm-app-contracts/scripts/liquidity-incentives/add-reward.ts +++ b/packages/zevm-app-contracts/scripts/liquidity-incentives/add-reward.ts @@ -68,7 +68,8 @@ const addReward = async ( ); const ZETA = ERC20__factory.connect(zetaTokenAddress, deployer); - await ZETA.transfer(rewardDistributorContract.address, REWARDS_AMOUNT.mul(2)); + const tx = await ZETA.transfer(rewardDistributorContract.address, REWARDS_AMOUNT.mul(1)); + await tx.wait(); await rewardDistributorContract.setRewardsDuration(REWARD_DURATION); await rewardDistributorContract.notifyRewardAmount(REWARDS_AMOUNT); diff --git a/packages/zevm-app-contracts/scripts/liquidity-incentives/read-rewards-data.ts b/packages/zevm-app-contracts/scripts/liquidity-incentives/read-rewards-data.ts index bb31a2d9..3095f11c 100644 --- a/packages/zevm-app-contracts/scripts/liquidity-incentives/read-rewards-data.ts +++ b/packages/zevm-app-contracts/scripts/liquidity-incentives/read-rewards-data.ts @@ -20,7 +20,7 @@ const readRewardData = async (rewardContractAddress: string) => { const rewardsDuration = await rewardDistributorContract.rewardsDuration(); const lastUpdateTime = await rewardDistributorContract.lastUpdateTime(); const rewardPerTokenStored = await rewardDistributorContract.rewardPerTokenStored(); - + if (rewardRate.isZero()) return; console.table({ contract: rewardContractAddress, lastUpdateTime: `${lastUpdateTime.toString()}-${new Date(lastUpdateTime.toNumber() * 1000).toISOString()}`, From a0b98625d60ca277eede9b6c6304ac72cee6a4c4 Mon Sep 17 00:00:00 2001 From: Andres Martin Aiello <50411235+andresaiello@users.noreply.github.com> Date: Sun, 5 Nov 2023 20:33:42 -0300 Subject: [PATCH 096/115] Add deadline to uniswap v2 contract (#126) * Add deadline to uniswap v2 contract * refactor --- .../multi-chain-swap/MultiChainSwap.sol | 6 +- .../MultiChainSwapTrident.strategy.sol | 54 ++++++++- .../MultiChainSwapUniV2.strategy.sol | 109 ++++++++++-------- .../MultiChainSwapUniV3.strategy.sol | 54 ++++++++- .../test/MultiChainSwap.spec.ts | 12 ++ .../test/MultiChainSwapUniswapV3.spec.ts | 13 ++- .../example-contracts/test/test.helpers.ts | 7 +- 7 files changed, 197 insertions(+), 58 deletions(-) diff --git a/packages/example-contracts/contracts/multi-chain-swap/MultiChainSwap.sol b/packages/example-contracts/contracts/multi-chain-swap/MultiChainSwap.sol index f1f6e6b1..b0a97dfe 100644 --- a/packages/example-contracts/contracts/multi-chain-swap/MultiChainSwap.sol +++ b/packages/example-contracts/contracts/multi-chain-swap/MultiChainSwap.sol @@ -47,7 +47,8 @@ interface MultiChainSwap is ZetaReceiver { */ uint256 outTokenMinAmount, uint256 destinationChainId, - uint256 crossChaindestinationGasLimit + uint256 crossChaindestinationGasLimit, + uint deadline ) external payable; function swapTokensForTokensCrossChain( @@ -62,6 +63,7 @@ interface MultiChainSwap is ZetaReceiver { */ uint256 outTokenMinAmount, uint256 destinationChainId, - uint256 crossChaindestinationGasLimit + uint256 crossChaindestinationGasLimit, + uint deadline ) external; } diff --git a/packages/example-contracts/contracts/multi-chain-swap/MultiChainSwapTrident.strategy.sol b/packages/example-contracts/contracts/multi-chain-swap/MultiChainSwapTrident.strategy.sol index 49c64171..5e6b3eda 100644 --- a/packages/example-contracts/contracts/multi-chain-swap/MultiChainSwapTrident.strategy.sol +++ b/packages/example-contracts/contracts/multi-chain-swap/MultiChainSwapTrident.strategy.sol @@ -33,8 +33,31 @@ contract MultiChainSwapTrident is MultiChainSwap, ZetaInteractor, MultiChainSwap */ uint256 outTokenMinAmount, uint256 destinationChainId, - uint256 crossChaindestinationGasLimit + uint256 crossChaindestinationGasLimit, + uint /* deadline */ ) external payable override { + _swapETHForTokensCrossChain( + receiverAddress, + destinationOutToken, + isDestinationOutETH, + outTokenMinAmount, + destinationChainId, + crossChaindestinationGasLimit + ); + } + + function _swapETHForTokensCrossChain( + bytes calldata receiverAddress, + address destinationOutToken, + bool isDestinationOutETH, + /** + * @dev The minimum amount of tokens that receiverAddress should get, + * if it's not reached, the transaction will revert on the destination chain + */ + uint256 outTokenMinAmount, + uint256 destinationChainId, + uint256 crossChaindestinationGasLimit + ) internal { if (!_isValidChainId(destinationChainId)) revert InvalidDestinationChainId(); if (msg.value == 0) revert ValueShouldBeGreaterThanZero(); @@ -85,8 +108,35 @@ contract MultiChainSwapTrident is MultiChainSwap, ZetaInteractor, MultiChainSwap */ uint256 outTokenMinAmount, uint256 destinationChainId, - uint256 crossChaindestinationGasLimit + uint256 crossChaindestinationGasLimit, + uint /* deadline */ ) external override { + _swapTokensForTokensCrossChain( + sourceInputToken, + inputTokenAmount, + receiverAddress, + destinationOutToken, + isDestinationOutETH, + outTokenMinAmount, + destinationChainId, + crossChaindestinationGasLimit + ); + } + + function _swapTokensForTokensCrossChain( + address sourceInputToken, + uint256 inputTokenAmount, + bytes calldata receiverAddress, + address destinationOutToken, + bool isDestinationOutETH, + /** + * @dev The minimum amount of tokens that receiverAddress should get, + * if it's not reached, the transaction will revert on the destination chain + */ + uint256 outTokenMinAmount, + uint256 destinationChainId, + uint256 crossChaindestinationGasLimit + ) internal { if (!_isValidChainId(destinationChainId)) revert InvalidDestinationChainId(); if (sourceInputToken == address(0)) revert MissingSourceInputTokenAddress(); diff --git a/packages/example-contracts/contracts/multi-chain-swap/MultiChainSwapUniV2.strategy.sol b/packages/example-contracts/contracts/multi-chain-swap/MultiChainSwapUniV2.strategy.sol index 2e0a5d57..871a7181 100644 --- a/packages/example-contracts/contracts/multi-chain-swap/MultiChainSwapUniV2.strategy.sol +++ b/packages/example-contracts/contracts/multi-chain-swap/MultiChainSwapUniV2.strategy.sol @@ -10,7 +10,7 @@ import "./MultiChainSwap.sol"; contract MultiChainSwapUniV2 is MultiChainSwap, ZetaInteractor, MultiChainSwapErrors { using SafeERC20 for IERC20; - uint16 internal constant MAX_DEADLINE = 200; + uint internal constant MAX_DEADLINE = 200; bytes32 public constant CROSS_CHAIN_SWAP_MESSAGE = keccak256("CROSS_CHAIN_SWAP"); address public immutable uniswapV2RouterAddress; @@ -19,6 +19,23 @@ contract MultiChainSwapUniV2 is MultiChainSwap, ZetaInteractor, MultiChainSwapEr IUniswapV2Router02 internal uniswapV2Router; + struct CrossChainCallParams { + address sourceInputToken; + uint256 inputTokenAmount; + bytes receiverAddress; + address destinationOutToken; + bool isDestinationOutETH; + bool inputTokenIsETH; + /** + * @dev The minimum amount of tokens that receiverAddress should get, + * if it's not reached, the transaction will revert on the destination chain + */ + uint256 outTokenMinAmount; + uint256 destinationChainId; + uint256 crossChaindestinationGasLimit; + uint256 zetaValueAndGas; + } + constructor(address zetaConnector_, address zetaToken_, address uniswapV2Router_) ZetaInteractor(zetaConnector_) { if (zetaToken_ == address(0) || uniswapV2Router_ == address(0)) revert ZetaCommonErrors.InvalidAddress(); zetaToken = zetaToken_; @@ -37,56 +54,46 @@ contract MultiChainSwapUniV2 is MultiChainSwap, ZetaInteractor, MultiChainSwapEr */ uint256 outTokenMinAmount, uint256 destinationChainId, - uint256 crossChaindestinationGasLimit + uint256 crossChaindestinationGasLimit, + uint deadline ) external payable override { if (!_isValidChainId(destinationChainId)) revert InvalidDestinationChainId(); - if (msg.value == 0) revert ValueShouldBeGreaterThanZero(); if ( (destinationOutToken != address(0) && isDestinationOutETH) || (destinationOutToken == address(0) && !isDestinationOutETH) ) revert OutTokenInvariant(); - uint256 zetaValueAndGas; { address[] memory path = new address[](2); path[0] = wETH; path[1] = zetaToken; - uint256[] memory amounts = uniswapV2Router.swapExactETHForTokens{value: msg.value}( 0, /// @todo Add min amount path, address(this), - block.timestamp + MAX_DEADLINE + deadline ); - zetaValueAndGas = amounts[path.length - 1]; } if (zetaValueAndGas == 0) revert ErrorSwappingTokens(); - { bool success = IERC20(zetaToken).approve(address(connector), zetaValueAndGas); if (!success) revert ErrorApprovingTokens(zetaToken); } - connector.send( - ZetaInterfaces.SendInput({ + _crossChainCall( + CrossChainCallParams({ + sourceInputToken: wETH, + inputTokenAmount: msg.value, + receiverAddress: receiverAddress, + destinationOutToken: destinationOutToken, + isDestinationOutETH: isDestinationOutETH, + inputTokenIsETH: false, + outTokenMinAmount: outTokenMinAmount, destinationChainId: destinationChainId, - destinationAddress: interactorsByChainId[destinationChainId], - destinationGasLimit: crossChaindestinationGasLimit, - message: abi.encode( - CROSS_CHAIN_SWAP_MESSAGE, - msg.sender, - wETH, - msg.value, - receiverAddress, - destinationOutToken, - isDestinationOutETH, - outTokenMinAmount, - true // inputTokenIsETH - ), - zetaValueAndGas: zetaValueAndGas, - zetaParams: abi.encode("") + crossChaindestinationGasLimit: crossChaindestinationGasLimit, + zetaValueAndGas: zetaValueAndGas }) ); } @@ -103,23 +110,20 @@ contract MultiChainSwapUniV2 is MultiChainSwap, ZetaInteractor, MultiChainSwapEr */ uint256 outTokenMinAmount, uint256 destinationChainId, - uint256 crossChaindestinationGasLimit + uint256 crossChaindestinationGasLimit, + uint deadline ) external override { if (!_isValidChainId(destinationChainId)) revert InvalidDestinationChainId(); - if (sourceInputToken == address(0)) revert MissingSourceInputTokenAddress(); if ( (destinationOutToken != address(0) && isDestinationOutETH) || (destinationOutToken == address(0) && !isDestinationOutETH) ) revert OutTokenInvariant(); - uint256 zetaValueAndGas; - if (sourceInputToken == zetaToken) { bool success1 = IERC20(zetaToken).transferFrom(msg.sender, address(this), inputTokenAmount); bool success2 = IERC20(zetaToken).approve(address(connector), inputTokenAmount); if (!success1 || !success2) revert ErrorTransferringTokens(zetaToken); - zetaValueAndGas = inputTokenAmount; } else { /** @@ -129,7 +133,6 @@ contract MultiChainSwapUniV2 is MultiChainSwap, ZetaInteractor, MultiChainSwapEr IERC20(sourceInputToken).safeTransferFrom(msg.sender, address(this), inputTokenAmount); IERC20(sourceInputToken).safeApprove(uniswapV2RouterAddress, inputTokenAmount); } - address[] memory path; if (sourceInputToken == wETH) { path = new address[](2); @@ -141,41 +144,55 @@ contract MultiChainSwapUniV2 is MultiChainSwap, ZetaInteractor, MultiChainSwapEr path[1] = wETH; path[2] = zetaToken; } - uint256[] memory amounts = uniswapV2Router.swapExactTokensForTokens( inputTokenAmount, 0, /// @todo Add min amount path, address(this), - block.timestamp + MAX_DEADLINE + deadline ); - zetaValueAndGas = amounts[path.length - 1]; if (zetaValueAndGas == 0) revert ErrorSwappingTokens(); } - { bool success = IERC20(zetaToken).approve(address(connector), zetaValueAndGas); if (!success) revert ErrorApprovingTokens(zetaToken); } + _crossChainCall( + CrossChainCallParams({ + sourceInputToken: sourceInputToken, + inputTokenAmount: inputTokenAmount, + receiverAddress: receiverAddress, + destinationOutToken: destinationOutToken, + isDestinationOutETH: isDestinationOutETH, + inputTokenIsETH: false, + outTokenMinAmount: outTokenMinAmount, + destinationChainId: destinationChainId, + crossChaindestinationGasLimit: crossChaindestinationGasLimit, + zetaValueAndGas: zetaValueAndGas + }) + ); + } + + function _crossChainCall(CrossChainCallParams memory params) internal { connector.send( ZetaInterfaces.SendInput({ - destinationChainId: destinationChainId, - destinationAddress: interactorsByChainId[destinationChainId], - destinationGasLimit: crossChaindestinationGasLimit, + destinationChainId: params.destinationChainId, + destinationAddress: interactorsByChainId[params.destinationChainId], + destinationGasLimit: params.crossChaindestinationGasLimit, message: abi.encode( CROSS_CHAIN_SWAP_MESSAGE, msg.sender, - sourceInputToken, - inputTokenAmount, - receiverAddress, - destinationOutToken, - isDestinationOutETH, - outTokenMinAmount, - false // inputTokenIsETH + params.sourceInputToken, + params.inputTokenAmount, + params.receiverAddress, + params.destinationOutToken, + params.isDestinationOutETH, + params.outTokenMinAmount, + params.inputTokenIsETH ), - zetaValueAndGas: zetaValueAndGas, + zetaValueAndGas: params.zetaValueAndGas, zetaParams: abi.encode("") }) ); diff --git a/packages/example-contracts/contracts/multi-chain-swap/MultiChainSwapUniV3.strategy.sol b/packages/example-contracts/contracts/multi-chain-swap/MultiChainSwapUniV3.strategy.sol index 3dc44410..da1f0fc7 100644 --- a/packages/example-contracts/contracts/multi-chain-swap/MultiChainSwapUniV3.strategy.sol +++ b/packages/example-contracts/contracts/multi-chain-swap/MultiChainSwapUniV3.strategy.sol @@ -42,8 +42,31 @@ contract MultiChainSwapUniV3 is MultiChainSwap, ZetaInteractor, MultiChainSwapEr */ uint256 outTokenMinAmount, uint256 destinationChainId, - uint256 crossChaindestinationGasLimit + uint256 crossChaindestinationGasLimit, + uint /* deadline */ ) external payable override { + _swapETHForTokensCrossChain( + receiverAddress, + destinationOutToken, + isDestinationOutETH, + outTokenMinAmount, + destinationChainId, + crossChaindestinationGasLimit + ); + } + + function _swapETHForTokensCrossChain( + bytes calldata receiverAddress, + address destinationOutToken, + bool isDestinationOutETH, + /** + * @dev The minimum amount of tokens that receiverAddress should get, + * if it's not reached, the transaction will revert on the destination chain + */ + uint256 outTokenMinAmount, + uint256 destinationChainId, + uint256 crossChaindestinationGasLimit + ) internal { if (!_isValidChainId(destinationChainId)) revert InvalidDestinationChainId(); if (msg.value == 0) revert ValueShouldBeGreaterThanZero(); @@ -94,8 +117,35 @@ contract MultiChainSwapUniV3 is MultiChainSwap, ZetaInteractor, MultiChainSwapEr */ uint256 outTokenMinAmount, uint256 destinationChainId, - uint256 crossChaindestinationGasLimit + uint256 crossChaindestinationGasLimit, + uint /* deadline */ ) external override { + _swapTokensForTokensCrossChain( + sourceInputToken, + inputTokenAmount, + receiverAddress, + destinationOutToken, + isDestinationOutETH, + outTokenMinAmount, + destinationChainId, + crossChaindestinationGasLimit + ); + } + + function _swapTokensForTokensCrossChain( + address sourceInputToken, + uint256 inputTokenAmount, + bytes calldata receiverAddress, + address destinationOutToken, + bool isDestinationOutETH, + /** + * @dev The minimum amount of tokens that receiverAddress should get, + * if it's not reached, the transaction will revert on the destination chain + */ + uint256 outTokenMinAmount, + uint256 destinationChainId, + uint256 crossChaindestinationGasLimit + ) internal { if (!_isValidChainId(destinationChainId)) revert InvalidDestinationChainId(); if (sourceInputToken == address(0)) revert MissingSourceInputTokenAddress(); diff --git a/packages/example-contracts/test/MultiChainSwap.spec.ts b/packages/example-contracts/test/MultiChainSwap.spec.ts index f7856d0e..2c27c52f 100644 --- a/packages/example-contracts/test/MultiChainSwap.spec.ts +++ b/packages/example-contracts/test/MultiChainSwap.spec.ts @@ -135,6 +135,7 @@ describe("MultiChainSwap tests", () => { 0, 10, MaxUint256, + MaxUint256, { value: parseUnits("1") } @@ -152,6 +153,7 @@ describe("MultiChainSwap tests", () => { false, 0, chainBId, + MaxUint256, MaxUint256 ) ).to.be.revertedWith("MissingSourceInputTokenAddress"); @@ -167,6 +169,7 @@ describe("MultiChainSwap tests", () => { false, 0, chainBId, + MaxUint256, MaxUint256 ) ).to.be.revertedWith("OutTokenInvariant"); @@ -194,6 +197,7 @@ describe("MultiChainSwap tests", () => { false, 0, chainBId, + MaxUint256, MaxUint256 ); @@ -224,6 +228,7 @@ describe("MultiChainSwap tests", () => { false, 0, chainBId, + MaxUint256, MaxUint256 ); @@ -254,6 +259,7 @@ describe("MultiChainSwap tests", () => { false, 0, chainBId, + MaxUint256, MaxUint256 ); @@ -284,6 +290,7 @@ describe("MultiChainSwap tests", () => { false, 0, chainBId, + MaxUint256, MaxUint256 ); @@ -314,6 +321,7 @@ describe("MultiChainSwap tests", () => { false, 0, chainBId, + MaxUint256, MaxUint256 ); @@ -343,6 +351,7 @@ describe("MultiChainSwap tests", () => { false, 0, chainBId, + MaxUint256, MaxUint256 ); @@ -361,6 +370,7 @@ describe("MultiChainSwap tests", () => { false, 0, chainBId + 5, + MaxUint256, MaxUint256 ); @@ -376,6 +386,7 @@ describe("MultiChainSwap tests", () => { false, 0, chainBId, + MaxUint256, MaxUint256 ); @@ -391,6 +402,7 @@ describe("MultiChainSwap tests", () => { false, 0, chainBId, + MaxUint256, MaxUint256 ); diff --git a/packages/example-contracts/test/MultiChainSwapUniswapV3.spec.ts b/packages/example-contracts/test/MultiChainSwapUniswapV3.spec.ts index 744e1640..7e88e2f9 100644 --- a/packages/example-contracts/test/MultiChainSwapUniswapV3.spec.ts +++ b/packages/example-contracts/test/MultiChainSwapUniswapV3.spec.ts @@ -3,7 +3,6 @@ import { BigNumber } from "@ethersproject/bignumber"; import { AddressZero, MaxUint256 } from "@ethersproject/constants"; import { parseEther, parseUnits } from "@ethersproject/units"; import { SignerWithAddress } from "@nomiclabs/hardhat-ethers/signers"; -import { IERC20__factory } from "@zetachain/protocol-contracts/dist/typechain-types"; import chai, { expect } from "chai"; import { ethers } from "hardhat"; @@ -13,6 +12,7 @@ import { getNow } from "../lib/shared/deploy.helpers"; import { ERC20__factory, IERC20, + IERC20__factory, MultiChainSwapUniV3, MultiChainSwapZetaConnector, UniswapV2Router02__factory @@ -153,6 +153,7 @@ describe("MultiChainSwap tests", () => { 0, 10, MaxUint256, + MaxUint256, { value: parseUnits("1") } @@ -170,6 +171,7 @@ describe("MultiChainSwap tests", () => { false, 0, chainBId, + MaxUint256, MaxUint256 ) ).to.be.revertedWith("MissingSourceInputTokenAddress"); @@ -185,6 +187,7 @@ describe("MultiChainSwap tests", () => { false, 0, chainBId, + MaxUint256, MaxUint256 ) ).to.be.revertedWith("OutTokenInvariant"); @@ -208,6 +211,7 @@ describe("MultiChainSwap tests", () => { 0, chainBId, MaxUint256, + MaxUint256, { value: ZETA_TO_TRANSFER } ); const result = await tx3.wait(); @@ -243,6 +247,7 @@ describe("MultiChainSwap tests", () => { true, 0, chainBId, + MaxUint256, MaxUint256 ); const result = await tx3.wait(); @@ -276,6 +281,7 @@ describe("MultiChainSwap tests", () => { false, 0, chainBId, + MaxUint256, MaxUint256 ); await tx3.wait(); @@ -312,6 +318,7 @@ describe("MultiChainSwap tests", () => { false, 0, chainBId, + MaxUint256, MaxUint256 ); const result = await tx3.wait(); @@ -347,6 +354,7 @@ describe("MultiChainSwap tests", () => { false, 0, chainBId, + MaxUint256, MaxUint256 ); const result = await tx3.wait(); @@ -382,6 +390,7 @@ describe("MultiChainSwap tests", () => { false, 0, chainBId, + MaxUint256, MaxUint256 ); const result = await tx3.wait(); @@ -417,6 +426,7 @@ describe("MultiChainSwap tests", () => { false, 0, chainBId, + MaxUint256, MaxUint256 ); @@ -442,6 +452,7 @@ describe("MultiChainSwap tests", () => { false, 0, chainBId, + MaxUint256, MaxUint256 ); await tx3.wait(); diff --git a/packages/example-contracts/test/test.helpers.ts b/packages/example-contracts/test/test.helpers.ts index 84603c54..9603bcba 100644 --- a/packages/example-contracts/test/test.helpers.ts +++ b/packages/example-contracts/test/test.helpers.ts @@ -1,6 +1,5 @@ import { MaxUint256 } from "@ethersproject/constants"; import { SignerWithAddress } from "@nomiclabs/hardhat-ethers/signers"; -import { ZetaTokenConsumerUniV3__factory } from "@zetachain/protocol-contracts/dist/typechain-types"; import { BigNumber, ContractReceipt } from "ethers"; import { getAddress } from "../lib/shared/address.helpers"; @@ -9,7 +8,8 @@ import { ERC20__factory, IUniswapV2Pair__factory, MultiChainSwapUniV2__factory, - UniswapV2Router02__factory + UniswapV2Router02__factory, + ZetaTokenConsumerUniV3__factory } from "../typechain-types"; export const getMintTokenId = (mintTx: ContractReceipt) => mintTx.events?.[0].args?.tokenId; @@ -48,17 +48,14 @@ export const parseZetaLog = (logs: ContractReceipt["logs"]) => { export const parseInteractorLog = (logs: ContractReceipt["logs"]) => { const iface = ZetaTokenConsumerUniV3__factory.createInterface(); - const eventNames = logs.map(log => { try { const parsedLog = iface.parseLog(log); - return parsedLog.name; } catch (e) { return "NO_ZETA_LOG"; } }); - return eventNames; }; From b418a4da3c12ecdbf7e0998027b124f076e077f0 Mon Sep 17 00:00:00 2001 From: Andres Martin Aiello <50411235+andresaiello@users.noreply.github.com> Date: Mon, 13 Nov 2023 16:45:01 -0300 Subject: [PATCH 097/115] Smart contract to verify an address and for accept an invitation (#124) * SC to verify an address and accept an invitation * naming * add test * add validation * naming * add counters * add test * update contract to unpersonalized links * add registration logic to manager * add validation * fix test * rename event * rename messageSigner * add index to event and test * improve test --- packages/addresses/package.json | 2 +- .../zeta-points/InvitationManager.sol | 97 +++++++++++++ .../scripts/zeta-points/deploy.ts | 26 ++++ .../test/zeta-points/InvitationManager.ts | 137 ++++++++++++++++++ .../zeta-points/UserVerificationRegistry.ts | 41 ++++++ .../test/zeta-points/test.helpers.ts | 12 ++ 6 files changed, 314 insertions(+), 1 deletion(-) create mode 100644 packages/zevm-app-contracts/contracts/zeta-points/InvitationManager.sol create mode 100644 packages/zevm-app-contracts/scripts/zeta-points/deploy.ts create mode 100644 packages/zevm-app-contracts/test/zeta-points/InvitationManager.ts create mode 100644 packages/zevm-app-contracts/test/zeta-points/UserVerificationRegistry.ts create mode 100644 packages/zevm-app-contracts/test/zeta-points/test.helpers.ts diff --git a/packages/addresses/package.json b/packages/addresses/package.json index 0e081e1c..59ab7864 100644 --- a/packages/addresses/package.json +++ b/packages/addresses/package.json @@ -22,4 +22,4 @@ "vite": "^3.1.0", "vite-plugin-dts": "^1.4.1" } -} \ No newline at end of file +} diff --git a/packages/zevm-app-contracts/contracts/zeta-points/InvitationManager.sol b/packages/zevm-app-contracts/contracts/zeta-points/InvitationManager.sol new file mode 100644 index 00000000..50f43173 --- /dev/null +++ b/packages/zevm-app-contracts/contracts/zeta-points/InvitationManager.sol @@ -0,0 +1,97 @@ +// SPDX-License-Identifier: MIT +pragma solidity 0.8.7; + +contract InvitationManager { + /* An ECDSA signature. */ + struct Signature { + uint8 v; + bytes32 r; + bytes32 s; + } + // Records the timestamp when a particular user gets verified. + mapping(address => uint256) public userVerificationTimestamps; + + // Records the timestamp when a particular user accepted an invitation from an inviter. + mapping(address => mapping(address => uint256)) public acceptedInvitationsTimestamp; + + // Store invitees for each inviter + mapping(address => address[]) public inviteeLists; + + // Total invites accepted by day (using the start timestamp of each day as key) + mapping(uint256 => uint256) public totalInvitesByDay; + + // Total invites accepted by inviter by day (using the start timestamp of each day as key) + mapping(address => mapping(uint256 => uint256)) public totalInvitesByInviterByDay; + + error UserAlreadyVerified(); + error UnrecognizedInvitation(); + error IndexOutOfBounds(); + error CanNotInviteYourself(); + + event UserVerified(address indexed userAddress, uint256 verifiedAt); + event InvitationAccepted(address indexed inviter, address indexed invitee, uint256 index, uint256 acceptedAt); + + function _markAsVerified(address user) internal { + // Check if the user is already verified + if (userVerificationTimestamps[user] > 0) revert UserAlreadyVerified(); + + userVerificationTimestamps[user] = block.timestamp; + emit UserVerified(user, block.timestamp); + } + + function markAsVerified() external { + _markAsVerified(msg.sender); + } + + function hasBeenVerified(address userAddress) external view returns (bool) { + return userVerificationTimestamps[userAddress] > 0; + } + + function getVerifiedTimestamp(address userAddress) external view returns (uint256) { + return userVerificationTimestamps[userAddress]; + } + + function _verifySignature(address inviter, Signature calldata signature) private pure { + bytes32 payloadHash = keccak256(abi.encode(inviter)); + bytes32 messageHash = keccak256(abi.encodePacked("\x19Ethereum Signed Message:\n32", payloadHash)); + + address messageSigner = ecrecover(messageHash, signature.v, signature.r, signature.s); + if (inviter != messageSigner) revert UnrecognizedInvitation(); + } + + function confirmAndAcceptInvitation(address inviter, Signature calldata signature) external { + if (inviter == msg.sender) revert CanNotInviteYourself(); + if (userVerificationTimestamps[inviter] == 0) revert UnrecognizedInvitation(); + _verifySignature(inviter, signature); + + acceptedInvitationsTimestamp[inviter][msg.sender] = block.timestamp; + _markAsVerified(msg.sender); + + // Add the invitee to the inviter's list + inviteeLists[inviter].push(msg.sender); + + uint256 dayStartTimestamp = (block.timestamp / 86400) * 86400; // Normalize to the start of the day + + totalInvitesByDay[dayStartTimestamp]++; + totalInvitesByInviterByDay[inviter][dayStartTimestamp]++; + + emit InvitationAccepted(inviter, msg.sender, inviteeLists[inviter].length - 1, block.timestamp); + } + + function getInviteeCount(address inviter) external view returns (uint256) { + return inviteeLists[inviter].length; + } + + function getInviteeAtIndex(address inviter, uint256 index) external view returns (address) { + if (index >= inviteeLists[inviter].length) revert IndexOutOfBounds(); + return inviteeLists[inviter][index]; + } + + function getTotalInvitesOnDay(uint256 dayStartTimestamp) external view returns (uint256) { + return totalInvitesByDay[dayStartTimestamp]; + } + + function getInvitesByInviterOnDay(address inviter, uint256 dayStartTimestamp) external view returns (uint256) { + return totalInvitesByInviterByDay[inviter][dayStartTimestamp]; + } +} diff --git a/packages/zevm-app-contracts/scripts/zeta-points/deploy.ts b/packages/zevm-app-contracts/scripts/zeta-points/deploy.ts new file mode 100644 index 00000000..d7cefbbe --- /dev/null +++ b/packages/zevm-app-contracts/scripts/zeta-points/deploy.ts @@ -0,0 +1,26 @@ +import { isNetworkName } from "@zetachain/addresses"; +import { saveAddress } from "@zetachain/addresses-tools"; +import { ethers, network } from "hardhat"; + +import { InvitationManager__factory, UserVerificationRegistry__factory } from "../../typechain-types"; + +const networkName = network.name; + +const invitationManager = async () => { + const InvitationManagerFactory = (await ethers.getContractFactory("InvitationManager")) as InvitationManager__factory; + + const invitationManager = await InvitationManagerFactory.deploy(); + await invitationManager.deployed(); + console.log("InvitationManager deployed to:", invitationManager.address); + // saveAddress("invitationManager", invitationManager.address); +}; + +const main = async () => { + if (!isNetworkName(networkName)) throw new Error("Invalid network name"); + await invitationManager(); +}; + +main().catch(error => { + console.error(error); + process.exit(1); +}); diff --git a/packages/zevm-app-contracts/test/zeta-points/InvitationManager.ts b/packages/zevm-app-contracts/test/zeta-points/InvitationManager.ts new file mode 100644 index 00000000..b169e037 --- /dev/null +++ b/packages/zevm-app-contracts/test/zeta-points/InvitationManager.ts @@ -0,0 +1,137 @@ +import { expect, use } from "chai"; +import { solidity } from "ethereum-waffle"; +use(solidity); +import { SignerWithAddress } from "@nomiclabs/hardhat-ethers/signers"; +import { ethers } from "hardhat"; + +import { InvitationManager } from "../../typechain-types"; +import { getInvitationSig } from "./test.helpers"; + +describe("InvitationManager Contract test", () => { + let invitationManager: InvitationManager, + inviter: SignerWithAddress, + invitee: SignerWithAddress, + addrs: SignerWithAddress[]; + + beforeEach(async () => { + [inviter, invitee, ...addrs] = await ethers.getSigners(); + const InvitationManager = await ethers.getContractFactory("InvitationManager"); + //@ts-ignore + invitationManager = await InvitationManager.deploy(); + await invitationManager.markAsVerified(); + }); + + describe("True", () => { + it("Should be true", async () => { + expect(true).to.equal(true); + }); + }); + + describe("Invitations test", () => { + it("Should verify an invitation and store it", async () => { + const sig = await getInvitationSig(inviter); + + const hasBeenVerifiedBefore = await invitationManager.hasBeenVerified(invitee.address); + await expect(hasBeenVerifiedBefore).to.be.eq(false); + + const tx = await invitationManager.connect(invitee).confirmAndAcceptInvitation(inviter.address, sig); + const rec = await tx.wait(); + + const block = await ethers.provider.getBlock(rec.blockNumber); + + const invitation = await invitationManager.acceptedInvitationsTimestamp(inviter.address, invitee.address); + await expect(invitation).to.be.eq(block.timestamp); + + const invitationCount = await invitationManager.getInviteeCount(inviter.address); + await expect(invitationCount).to.be.eq(1); + + const hasBeenVerifiedAfter = await invitationManager.hasBeenVerified(invitee.address); + await expect(hasBeenVerifiedAfter).to.be.eq(true); + }); + + it("Should revert if invitation is invalid", async () => { + const sig = await getInvitationSig(inviter); + const tx = invitationManager.connect(invitee).confirmAndAcceptInvitation(addrs[0].address, sig); + await expect(tx).to.be.revertedWith("UnrecognizedInvitation"); + }); + + it("Should revert if inviter has not been verified", async () => { + const sig = await getInvitationSig(addrs[0]); + const tx = invitationManager.connect(invitee).confirmAndAcceptInvitation(addrs[0].address, sig); + await expect(tx).to.be.revertedWith("UnrecognizedInvitation"); + }); + + it("Should revert if invitation is already accepted", async () => { + const sig = await getInvitationSig(inviter); + await invitationManager.connect(invitee).confirmAndAcceptInvitation(inviter.address, sig); + const tx = invitationManager.connect(invitee).confirmAndAcceptInvitation(inviter.address, sig); + await expect(tx).to.be.revertedWith("UserAlreadyVerified"); + }); + + it("Should count only for today if I just accepted", async () => { + const sig = await getInvitationSig(inviter); + const tx = await invitationManager.connect(invitee).confirmAndAcceptInvitation(inviter.address, sig); + const rec = await tx.wait(); + + const block = await ethers.provider.getBlock(rec.blockNumber); + + const invitation = await invitationManager.acceptedInvitationsTimestamp(inviter.address, invitee.address); + await expect(invitation).to.be.eq(block.timestamp); + + const invitationCount = await invitationManager.getInviteeCount(inviter.address); + await expect(invitationCount).to.be.eq(1); + + const now = block.timestamp; + const todayTimestamp = Math.floor(now / 86400) * 86400; + const invitationCountToday = await invitationManager.getTotalInvitesOnDay(todayTimestamp); + await expect(invitationCountToday).to.be.eq(1); + + const invitationByInviterCountToday = await invitationManager.getInvitesByInviterOnDay( + inviter.address, + todayTimestamp + ); + await expect(invitationByInviterCountToday).to.be.eq(1); + + const yesterdayTimestamp = todayTimestamp - 24 * 60 * 60; + const invitationCountYesterday = await invitationManager.getTotalInvitesOnDay(yesterdayTimestamp); + await expect(invitationCountYesterday).to.be.eq(0); + + const invitationByInviterCountYesterday = await invitationManager.getInvitesByInviterOnDay( + inviter.address, + yesterdayTimestamp + ); + await expect(invitationByInviterCountYesterday).to.be.eq(0); + }); + + it("Should emit the right event when invitation is accepted", async () => { + const sig = await getInvitationSig(inviter); + + const hasBeenVerifiedBefore = await invitationManager.hasBeenVerified(invitee.address); + await expect(hasBeenVerifiedBefore).to.be.eq(false); + + const tx = await invitationManager.connect(invitee).confirmAndAcceptInvitation(inviter.address, sig); + const rec = await tx.wait(); + const event = rec.events?.find(e => e.event === "InvitationAccepted"); + const block = await ethers.provider.getBlock(rec.blockNumber); + + expect(event?.args?.inviter).to.be.eq(inviter.address); + expect(event?.args?.invitee).to.be.eq(invitee.address); + expect(event?.args?.index).to.be.eq(0); + expect(event?.args?.acceptedAt).to.be.eq(block.timestamp); + const inviteeByIndex = await invitationManager.getInviteeAtIndex(inviter.address, event?.args?.index); + expect(inviteeByIndex).to.be.eq(invitee.address); + + const tx2 = await invitationManager.connect(addrs[0]).confirmAndAcceptInvitation(inviter.address, sig); + const rec2 = await tx2.wait(); + const event2 = rec2.events?.find(e => e.event === "InvitationAccepted"); + const block2 = await ethers.provider.getBlock(rec2.blockNumber); + + await expect(event2?.args?.inviter).to.be.eq(inviter.address); + await expect(event2?.args?.invitee).to.be.eq(addrs[0].address); + await expect(event2?.args?.index).to.be.eq(1); + await expect(event2?.args?.acceptedAt).to.be.eq(block2.timestamp); + const inviteeByIndex2 = await invitationManager.getInviteeAtIndex(inviter.address, event2?.args?.index); + expect(inviteeByIndex2).to.be.eq(addrs[0].address); + }); + }); +}); diff --git a/packages/zevm-app-contracts/test/zeta-points/UserVerificationRegistry.ts b/packages/zevm-app-contracts/test/zeta-points/UserVerificationRegistry.ts new file mode 100644 index 00000000..edd75e32 --- /dev/null +++ b/packages/zevm-app-contracts/test/zeta-points/UserVerificationRegistry.ts @@ -0,0 +1,41 @@ +import { expect, use } from "chai"; +import { solidity } from "ethereum-waffle"; +use(solidity); +import { SignerWithAddress } from "@nomiclabs/hardhat-ethers/signers"; +import { ethers } from "hardhat"; + +import { InvitationManager } from "../../typechain-types"; + +describe("UserVerificationRegistry Contract test", () => { + let invitationManager: InvitationManager, user: SignerWithAddress, addrs: SignerWithAddress[]; + + beforeEach(async () => { + [user, ...addrs] = await ethers.getSigners(); + const InvitationManagerFactory = await ethers.getContractFactory("InvitationManager"); + //@ts-ignore + invitationManager = await InvitationManagerFactory.deploy(); + }); + + describe("True", () => { + it("Should be true", async () => { + expect(true).to.equal(true); + }); + }); + + describe("Vereification test", () => { + it("Should be able to verify a wallet", async () => { + const hasBeenVerified = await invitationManager.hasBeenVerified(user.address); + expect(hasBeenVerified).to.be.false; + + const tx = await invitationManager.markAsVerified(); + const receipt = await tx.wait(); + const block = await ethers.provider.getBlock(receipt.blockNumber); + + const hasBeenVerifiedAfter = await invitationManager.hasBeenVerified(user.address); + expect(hasBeenVerifiedAfter).to.be.true; + + const verification = await invitationManager.getVerifiedTimestamp(user.address); + expect(verification).to.be.eq(block.timestamp); + }); + }); +}); diff --git a/packages/zevm-app-contracts/test/zeta-points/test.helpers.ts b/packages/zevm-app-contracts/test/zeta-points/test.helpers.ts new file mode 100644 index 00000000..cb758210 --- /dev/null +++ b/packages/zevm-app-contracts/test/zeta-points/test.helpers.ts @@ -0,0 +1,12 @@ +import { SignerWithAddress } from "@nomiclabs/hardhat-ethers/signers"; +import { ethers } from "hardhat"; + +export const getInvitationSig = async (signer: SignerWithAddress) => { + let payload = ethers.utils.defaultAbiCoder.encode(["address"], [signer.address]); + + let payloadHash = ethers.utils.keccak256(payload); + + // This adds the message prefix + let signature = await signer.signMessage(ethers.utils.arrayify(payloadHash)); + return ethers.utils.splitSignature(signature); +}; From 3a19731ee637ff2423fca9ffa9dcbd82b5ad90b9 Mon Sep 17 00:00:00 2001 From: Andres Martin Aiello <50411235+andresaiello@users.noreply.github.com> Date: Tue, 14 Nov 2023 13:43:45 -0300 Subject: [PATCH 098/115] implement immunefi improvements (#131) * implement immunefi improvements * add codeowners --- .github/CODEOWNERS | 1 + .../contracts/disperse/Disperse.sol | 13 +++++++++++-- .../liquidity-incentives/RewardDistributor.sol | 1 + 3 files changed, 13 insertions(+), 2 deletions(-) create mode 100644 .github/CODEOWNERS diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS new file mode 100644 index 00000000..3ec79e40 --- /dev/null +++ b/.github/CODEOWNERS @@ -0,0 +1 @@ +* @andresaiello @fadeev @lucas-janon diff --git a/packages/zevm-app-contracts/contracts/disperse/Disperse.sol b/packages/zevm-app-contracts/contracts/disperse/Disperse.sol index 9adc5cec..c3afe2ae 100644 --- a/packages/zevm-app-contracts/contracts/disperse/Disperse.sol +++ b/packages/zevm-app-contracts/contracts/disperse/Disperse.sol @@ -5,9 +5,18 @@ import "@openzeppelin/contracts/interfaces/IERC20.sol"; contract Disperse { function disperseEther(address[] calldata recipients, uint256[] calldata values) external payable { - for (uint256 i = 0; i < recipients.length; i++) payable(recipients[i]).transfer(values[i]); + require(recipients.length == values.length, "Recipients and values length mismatch"); + + for (uint256 i = 0; i < recipients.length; i++) { + (bool sent, ) = payable(recipients[i]).call{value: values[i]}(""); + require(sent, "Failed to send Ether"); + } + uint256 balance = address(this).balance; - if (balance > 0) payable(msg.sender).transfer(balance); + if (balance > 0) { + (bool sent, ) = payable(msg.sender).call{value: balance}(""); + require(sent, "Failed to refund remaining Ether"); + } } function disperseToken(IERC20 token, address[] calldata recipients, uint256[] calldata values) external { diff --git a/packages/zevm-app-contracts/contracts/liquidity-incentives/RewardDistributor.sol b/packages/zevm-app-contracts/contracts/liquidity-incentives/RewardDistributor.sol index 5b2f6693..4c30b8a1 100644 --- a/packages/zevm-app-contracts/contracts/liquidity-incentives/RewardDistributor.sol +++ b/packages/zevm-app-contracts/contracts/liquidity-incentives/RewardDistributor.sol @@ -44,6 +44,7 @@ contract RewardDistributor is StakingRewards { function _addLiquidity(uint256 tokenAmountA, uint256 tokenAmountB) internal returns (uint256) { stakingTokenA.transferFrom(msg.sender, address(this), tokenAmountA); + stakingTokenA.approve(systemContract.uniswapv2Router02Address(), 0); stakingTokenA.approve(systemContract.uniswapv2Router02Address(), tokenAmountA); stakingTokenB.transferFrom(msg.sender, address(this), tokenAmountB); From 6820479e65e775246066e4e79fa83122a9263288 Mon Sep 17 00:00:00 2001 From: Andres Martin Aiello <50411235+andresaiello@users.noreply.github.com> Date: Mon, 27 Nov 2023 13:41:11 -0300 Subject: [PATCH 099/115] Cleanup zetachain repo to be zeta apps repo (#132) * Cleanup zetachain repo to be zeta-apps repo * update docker * update uniswap scripts * refactor * remove unused code * add type to getAppAddress --- Dockerfile | 8 +- README.md | 10 +- packages/addresses-tools/.npmignore | 19 - packages/addresses-tools/README.md | 3 - packages/addresses-tools/hardhat.config.ts | 5 - packages/addresses-tools/package.json | 24 - .../addresses-tools/src/add-new-address.ts | 10 - .../addresses-tools/src/add-new-network.ts | 14 - .../addresses-tools/src/addresses.helpers.ts | 299 ------- packages/addresses-tools/src/index.ts | 3 - packages/addresses-tools/src/log-addresses.ts | 38 - .../addresses-tools/src/misc.constants.ts | 1 - packages/addresses-tools/src/misc.helpers.ts | 2 - packages/addresses-tools/src/networks.ts | 84 -- .../src/system-addresses.helpers.ts | 49 -- packages/addresses-tools/tsconfig.json | 14 - packages/addresses/.npmignore | 30 - packages/addresses/README.md | 26 - packages/addresses/package.json | 25 - packages/addresses/src/addresses.athens.json | 162 ---- packages/addresses/src/addresses.helpers.ts | 185 ----- packages/addresses/src/addresses.mainnet.json | 71 -- packages/addresses/src/addresses.troy.json | 94 --- packages/addresses/src/index.ts | 1 - packages/addresses/tsconfig.json | 15 - packages/example-contracts/.env.example | 18 - packages/example-contracts/.eslintrc.js | 23 - packages/example-contracts/README.md | 16 - .../cross-chain-counter/CrossChainCounter.sol | 57 -- .../test/CounterZetaConnectorMock.sol | 63 -- .../cross-chain-message/CrossChainMessage.sol | 85 -- .../test/CrossChainMessageConnector.sol | 63 -- .../CrossChainWarriors.sol | 140 ---- .../test/CrossChainWarriorsMock.sol | 17 - .../CrossChainWarriorsZetaConnectorMock.sol | 63 -- .../multi-chain-swap/MultiChainSwap.sol | 69 -- .../multi-chain-swap/MultiChainSwapErrors.sol | 20 - .../MultiChainSwapTrident.strategy.sol | 295 ------- .../MultiChainSwapUniV2.strategy.sol | 357 -------- .../MultiChainSwapUniV3.strategy.sol | 304 ------- .../test/MultiChainSwapZetaConnector.sol | 76 -- .../shared/ImmutableCreate2Factory.sol | 8 - .../contracts/shared/TestContracts.sol | 10 - .../contracts/shared/ZetaEthMock.sol | 12 - .../contracts/shared/ZetaTestContracts.sol | 8 - .../docs/cross-chain-counter.md | 5 - .../docs/cross-chain-warriors.md | 20 - packages/example-contracts/hardhat.config.ts | 46 -- .../CrossChainCounter.helpers.ts | 62 -- .../CrossChainMessage.helpers.ts | 61 -- .../CrossChainWarriors.helpers.ts | 101 --- .../MultiChainSwap.helpers.ts | 35 - .../shared/ImmutableCreate2Factory.helpers.ts | 75 -- .../lib/shared/address.helpers.ts | 23 - .../lib/shared/deploy.helpers.ts | 96 --- .../lib/shared/network.constants.ts | 104 --- packages/example-contracts/package.json | 42 - .../scripts/add-liquidity-uniswap-v2.ts | 114 --- .../scripts/cross-chain-counter/deploy.ts | 11 - .../scripts/cross-chain-warriors/deploy.ts | 30 - .../deterministic-deploy.ts | 59 -- .../set-cross-chain-data.ts | 34 - .../cross-chain-warriors/verify-contract.ts | 18 - .../deploy-multi-chain-swap-trident.ts | 33 - .../deploy-multi-chain-swap-v3.ts | 39 - .../deploy-multi-chain-swap.ts | 24 - .../scripts/multi-chain-swap/deploy.ts | 14 - .../multi-chain-swap/deterministic-deploy.ts | 59 -- .../multi-chain-swap/do-cross-chain-swap.ts | 42 - .../multi-chain-swap/set-cross-chain-data.ts | 47 -- .../multi-chain-swap/verify-contract.ts | 17 - .../test/CrossChainCounter.spec.ts | 112 --- .../test/CrossChainMessage.spec.ts | 142 ---- .../test/CrossChainWarriors.spec.ts | 304 ------- .../test/MultiChainSwap.constants.ts | 1 - .../test/MultiChainSwap.spec.ts | 628 -------------- .../test/MultiChainSwapUniswapV3.spec.ts | 667 --------------- .../example-contracts/test/test.helpers.ts | 89 -- packages/example-contracts/tsconfig.json | 14 - .../zeta-app-contracts/data/addresses.json | 55 ++ packages/zeta-app-contracts/hardhat.config.ts | 13 +- .../MultiChainValue.helpers.ts | 18 +- .../shared/ImmutableCreate2Factory.helpers.ts | 10 +- .../lib/shared/address.helpers.ts | 23 - packages/zeta-app-contracts/package.json | 5 +- .../scripts/address.helpers.ts | 33 + .../scripts/multi-chain-value/deploy.ts | 46 +- .../multi-chain-value/deterministic-deploy.ts | 17 +- .../scripts/multi-chain-value/send-value.ts | 31 +- .../multi-chain-value/verify-contract.ts | 12 +- .../test/MultiChainValue.spec.ts | 2 +- .../multi-output/ZetaMultiOutput.sol | 0 .../zevm-app-contracts/data/addresses.json | 11 + packages/zevm-app-contracts/hardhat.config.ts | 13 +- packages/zevm-app-contracts/package.json | 5 +- .../scripts/address.helpers.ts | 39 + .../scripts/disperse/deploy.ts | 6 +- .../liquidity-incentives/add-reward.ts | 30 +- .../scripts/liquidity-incentives/deploy.ts | 6 +- .../liquidity-incentives/read-rewards-data.ts | 12 +- .../uniswap/add-liquidity-zeta-uniswap.ts | 51 +- .../uniswap/remove-liquidity-zeta-uniswap.ts | 39 +- .../scripts/uniswap/sell-token.ts | 41 +- .../scripts/uniswap/sell-zeta.ts | 42 +- .../scripts/uniswap/uniswap.helpers.ts | 2 +- .../scripts/zeta-points/deploy.ts | 11 +- .../scripts/zeta-swap/deploy.ts | 2 +- .../scripts/zeta-swap/get-system-data.ts | 16 +- .../scripts/zeta-swap/send.ts | 9 +- .../scripts/zeta-swap/stress-swap.ts | 37 +- .../scripts/zeta-swap/swap-on-zevm.ts | 25 +- .../scripts/zeta-swap/swap.ts | 25 +- .../test/LiquidityIncentives.spec.ts | 20 +- .../test/MultipleOutput.spec.ts | 20 +- packages/zevm-app-contracts/test/Swap.spec.ts | 26 +- packages/zevm-example-contracts/.env.example | 2 - packages/zevm-example-contracts/.eslintrc.js | 23 - packages/zevm-example-contracts/README.md | 16 - .../contracts/shared/BytesHelperLib.sol | 22 - .../contracts/shared/MockSystemContract.sol | 60 -- .../contracts/shared/MockZRC20.sol | 33 - .../contracts/shared/SwapHelperLib.sol | 93 --- .../contracts/shared/TestContracts.sol | 8 - .../contracts/shared/TestUniswapContracts.sol | 10 - .../zevm-example-contracts/hardhat.config.ts | 46 -- packages/zevm-example-contracts/package.json | 39 - .../scripts/multi-output/deploy.ts | 20 - .../test/test.helpers.ts | 71 -- packages/zevm-example-contracts/tsconfig.json | 14 - yarn.lock | 774 +----------------- 130 files changed, 423 insertions(+), 7625 deletions(-) delete mode 100644 packages/addresses-tools/.npmignore delete mode 100644 packages/addresses-tools/README.md delete mode 100644 packages/addresses-tools/hardhat.config.ts delete mode 100644 packages/addresses-tools/package.json delete mode 100644 packages/addresses-tools/src/add-new-address.ts delete mode 100644 packages/addresses-tools/src/add-new-network.ts delete mode 100644 packages/addresses-tools/src/addresses.helpers.ts delete mode 100644 packages/addresses-tools/src/index.ts delete mode 100644 packages/addresses-tools/src/log-addresses.ts delete mode 100644 packages/addresses-tools/src/misc.constants.ts delete mode 100644 packages/addresses-tools/src/misc.helpers.ts delete mode 100644 packages/addresses-tools/src/networks.ts delete mode 100644 packages/addresses-tools/src/system-addresses.helpers.ts delete mode 100644 packages/addresses-tools/tsconfig.json delete mode 100644 packages/addresses/.npmignore delete mode 100644 packages/addresses/README.md delete mode 100644 packages/addresses/package.json delete mode 100644 packages/addresses/src/addresses.athens.json delete mode 100644 packages/addresses/src/addresses.helpers.ts delete mode 100644 packages/addresses/src/addresses.mainnet.json delete mode 100644 packages/addresses/src/addresses.troy.json delete mode 100644 packages/addresses/src/index.ts delete mode 100644 packages/addresses/tsconfig.json delete mode 100644 packages/example-contracts/.env.example delete mode 100644 packages/example-contracts/.eslintrc.js delete mode 100644 packages/example-contracts/README.md delete mode 100644 packages/example-contracts/contracts/cross-chain-counter/CrossChainCounter.sol delete mode 100644 packages/example-contracts/contracts/cross-chain-counter/test/CounterZetaConnectorMock.sol delete mode 100644 packages/example-contracts/contracts/cross-chain-message/CrossChainMessage.sol delete mode 100644 packages/example-contracts/contracts/cross-chain-message/test/CrossChainMessageConnector.sol delete mode 100644 packages/example-contracts/contracts/cross-chain-warriors/CrossChainWarriors.sol delete mode 100644 packages/example-contracts/contracts/cross-chain-warriors/test/CrossChainWarriorsMock.sol delete mode 100644 packages/example-contracts/contracts/cross-chain-warriors/test/CrossChainWarriorsZetaConnectorMock.sol delete mode 100644 packages/example-contracts/contracts/multi-chain-swap/MultiChainSwap.sol delete mode 100644 packages/example-contracts/contracts/multi-chain-swap/MultiChainSwapErrors.sol delete mode 100644 packages/example-contracts/contracts/multi-chain-swap/MultiChainSwapTrident.strategy.sol delete mode 100644 packages/example-contracts/contracts/multi-chain-swap/MultiChainSwapUniV2.strategy.sol delete mode 100644 packages/example-contracts/contracts/multi-chain-swap/MultiChainSwapUniV3.strategy.sol delete mode 100644 packages/example-contracts/contracts/multi-chain-swap/test/MultiChainSwapZetaConnector.sol delete mode 100644 packages/example-contracts/contracts/shared/ImmutableCreate2Factory.sol delete mode 100644 packages/example-contracts/contracts/shared/TestContracts.sol delete mode 100644 packages/example-contracts/contracts/shared/ZetaEthMock.sol delete mode 100644 packages/example-contracts/contracts/shared/ZetaTestContracts.sol delete mode 100644 packages/example-contracts/docs/cross-chain-counter.md delete mode 100644 packages/example-contracts/docs/cross-chain-warriors.md delete mode 100644 packages/example-contracts/hardhat.config.ts delete mode 100644 packages/example-contracts/lib/cross-chain-counter/CrossChainCounter.helpers.ts delete mode 100644 packages/example-contracts/lib/cross-chain-message/CrossChainMessage.helpers.ts delete mode 100644 packages/example-contracts/lib/cross-chain-warriors/CrossChainWarriors.helpers.ts delete mode 100644 packages/example-contracts/lib/multi-chain-swap/MultiChainSwap.helpers.ts delete mode 100644 packages/example-contracts/lib/shared/ImmutableCreate2Factory.helpers.ts delete mode 100644 packages/example-contracts/lib/shared/address.helpers.ts delete mode 100644 packages/example-contracts/lib/shared/deploy.helpers.ts delete mode 100644 packages/example-contracts/lib/shared/network.constants.ts delete mode 100644 packages/example-contracts/package.json delete mode 100644 packages/example-contracts/scripts/add-liquidity-uniswap-v2.ts delete mode 100644 packages/example-contracts/scripts/cross-chain-counter/deploy.ts delete mode 100644 packages/example-contracts/scripts/cross-chain-warriors/deploy.ts delete mode 100644 packages/example-contracts/scripts/cross-chain-warriors/deterministic-deploy.ts delete mode 100644 packages/example-contracts/scripts/cross-chain-warriors/set-cross-chain-data.ts delete mode 100644 packages/example-contracts/scripts/cross-chain-warriors/verify-contract.ts delete mode 100644 packages/example-contracts/scripts/multi-chain-swap/deploy-multi-chain-swap-trident.ts delete mode 100644 packages/example-contracts/scripts/multi-chain-swap/deploy-multi-chain-swap-v3.ts delete mode 100644 packages/example-contracts/scripts/multi-chain-swap/deploy-multi-chain-swap.ts delete mode 100644 packages/example-contracts/scripts/multi-chain-swap/deploy.ts delete mode 100644 packages/example-contracts/scripts/multi-chain-swap/deterministic-deploy.ts delete mode 100644 packages/example-contracts/scripts/multi-chain-swap/do-cross-chain-swap.ts delete mode 100644 packages/example-contracts/scripts/multi-chain-swap/set-cross-chain-data.ts delete mode 100644 packages/example-contracts/scripts/multi-chain-swap/verify-contract.ts delete mode 100644 packages/example-contracts/test/CrossChainCounter.spec.ts delete mode 100644 packages/example-contracts/test/CrossChainMessage.spec.ts delete mode 100644 packages/example-contracts/test/CrossChainWarriors.spec.ts delete mode 100644 packages/example-contracts/test/MultiChainSwap.constants.ts delete mode 100644 packages/example-contracts/test/MultiChainSwap.spec.ts delete mode 100644 packages/example-contracts/test/MultiChainSwapUniswapV3.spec.ts delete mode 100644 packages/example-contracts/test/test.helpers.ts delete mode 100644 packages/example-contracts/tsconfig.json create mode 100644 packages/zeta-app-contracts/data/addresses.json delete mode 100644 packages/zeta-app-contracts/lib/shared/address.helpers.ts create mode 100644 packages/zeta-app-contracts/scripts/address.helpers.ts rename packages/{zevm-example-contracts => zevm-app-contracts}/contracts/multi-output/ZetaMultiOutput.sol (100%) create mode 100644 packages/zevm-app-contracts/data/addresses.json create mode 100644 packages/zevm-app-contracts/scripts/address.helpers.ts rename packages/{zevm-example-contracts => zevm-app-contracts}/test/MultipleOutput.spec.ts (89%) delete mode 100644 packages/zevm-example-contracts/.env.example delete mode 100644 packages/zevm-example-contracts/.eslintrc.js delete mode 100644 packages/zevm-example-contracts/README.md delete mode 100644 packages/zevm-example-contracts/contracts/shared/BytesHelperLib.sol delete mode 100644 packages/zevm-example-contracts/contracts/shared/MockSystemContract.sol delete mode 100644 packages/zevm-example-contracts/contracts/shared/MockZRC20.sol delete mode 100644 packages/zevm-example-contracts/contracts/shared/SwapHelperLib.sol delete mode 100644 packages/zevm-example-contracts/contracts/shared/TestContracts.sol delete mode 100644 packages/zevm-example-contracts/contracts/shared/TestUniswapContracts.sol delete mode 100644 packages/zevm-example-contracts/hardhat.config.ts delete mode 100644 packages/zevm-example-contracts/package.json delete mode 100644 packages/zevm-example-contracts/scripts/multi-output/deploy.ts delete mode 100644 packages/zevm-example-contracts/test/test.helpers.ts delete mode 100644 packages/zevm-example-contracts/tsconfig.json diff --git a/Dockerfile b/Dockerfile index 01784859..955672f6 100644 --- a/Dockerfile +++ b/Dockerfile @@ -9,11 +9,8 @@ RUN apk add --update python3 yarn git nodejs make g++ ## Install node modules before the code is copied to the container WORKDIR /home/zetachain/ COPY package*.json ./ -COPY packages/addresses-tools/package.json ./packages/addresses-tools/package.json -COPY packages/zevm-example-contracts/package.json ./packages/zevm-example-contracts/package.json -COPY packages/addresses/package.json packages/addresses/package.json -COPY packages/example-contracts/package.json ./packages/example-contracts/package.json COPY packages/zeta-app-contracts/package.json ./packages/zeta-app-contracts/package.json +COPY packages/zevm-app-contracts/package.json ./packages/zevm-app-contracts/package.json RUN yarn install ; exit 0 COPY . ./ @@ -21,9 +18,8 @@ RUN yarn install RUN yarn add solc@0.5.10 solc@0.6.6 solc@0.7.6 solc@0.8.7 -RUN cd packages/example-contracts && npx hardhat compile && cd - RUN cd packages/zeta-app-contracts && npx hardhat compile && cd - -RUN cd packages/zevm-example-contracts && npx hardhat compile && cd - +RUN cd packages/zevm-app-contracts && npx hardhat compile && cd - WORKDIR /home/zetachain/ diff --git a/README.md b/README.md index 3d9cbd34..eadfb67a 100644 --- a/README.md +++ b/README.md @@ -6,8 +6,6 @@ ZetaChain is a public, decentralized blockchain and smart contract platform buil * Utilities to interact with ZetaChain's contracts from your dApp, scripts, or tests. * Interfaces to easily develop omnichain contracts. -* Omnichain dApp example contracts. -* Protocol native contracts (Zeta Token, Zeta Connector). ## Learn more about ZetaChain @@ -34,13 +32,9 @@ ZetaChain is a public, decentralized blockchain and smart contract platform buil ### Packages -#### [Addresses](packages/addresses) +#### [Zeta App contracts](packages/zeta-app-contracts) -#### [Example contracts](packages/example-contracts) - -#### [Protocol contracts](packages/example-contracts) - -#### [ZEVM contracts](packages/zevm-contracts) +#### [ZEVM App contracts](packages/zevm-app-contracts) ### Cross-repo commands diff --git a/packages/addresses-tools/.npmignore b/packages/addresses-tools/.npmignore deleted file mode 100644 index c8886364..00000000 --- a/packages/addresses-tools/.npmignore +++ /dev/null @@ -1,19 +0,0 @@ -# Ignore source files and other development files -src/ -*.tsx -*.map -*.spec.* -*.test.* -*.log -*.lock -.editorconfig -.eslintrc* -.prettierrc* -.jest.config.js -tsconfig.json - -# Include the dist folder and other necessary files -!dist/ -!README.md -!LICENSE -!package.json diff --git a/packages/addresses-tools/README.md b/packages/addresses-tools/README.md deleted file mode 100644 index 5e0a61c6..00000000 --- a/packages/addresses-tools/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# ZetaChain addresses-tools - -This package includes utilities to work with multiple addresses and networks. diff --git a/packages/addresses-tools/hardhat.config.ts b/packages/addresses-tools/hardhat.config.ts deleted file mode 100644 index a3b8359f..00000000 --- a/packages/addresses-tools/hardhat.config.ts +++ /dev/null @@ -1,5 +0,0 @@ -import { HardhatUserConfig } from "hardhat/types"; - -const config: HardhatUserConfig = {}; - -export default config; diff --git a/packages/addresses-tools/package.json b/packages/addresses-tools/package.json deleted file mode 100644 index e77f2b69..00000000 --- a/packages/addresses-tools/package.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "name": "@zetachain/addresses-tools", - "version": "0.0.8", - "license": "MIT", - "author": "zetachain", - "publishConfig": { - "access": "public", - "registry": "https://registry.npmjs.org/" - }, - "main": "./dist/index.js", - "module": "./dist/index.js", - "types": "./dist/index.d.ts", - "files": [ - "dist" - ], - "scripts": { - "tsc:watch": "npx tsc --watch", - "prepublishOnly": "npx tsc" - }, - "devDependencies": { - "@zetachain/addresses": "workspace:^", - "@zetachain/protocol-contracts": "^2.1.0" - } -} diff --git a/packages/addresses-tools/src/add-new-address.ts b/packages/addresses-tools/src/add-new-address.ts deleted file mode 100644 index 1fb9e423..00000000 --- a/packages/addresses-tools/src/add-new-address.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { addNewAddress } from "./addresses.helpers"; - -const name = process.argv[2]; - -if (!name) { - console.log("Usage: 'ts-node src/add-new-address '."); - process.exit(1); -} - -addNewAddress(name); diff --git a/packages/addresses-tools/src/add-new-network.ts b/packages/addresses-tools/src/add-new-network.ts deleted file mode 100644 index 1cf8b198..00000000 --- a/packages/addresses-tools/src/add-new-network.ts +++ /dev/null @@ -1,14 +0,0 @@ -import { isZetaNetworkName } from "@zetachain/addresses"; - -import { addNewNetwork } from "./addresses.helpers"; - -const name = process.argv[2]; -const parsedAddTo = process.argv[3].split(","); - -if (!name || !parsedAddTo.every(isZetaNetworkName)) { - console.log("Usage: 'ts-node src/add-new-network '."); - console.log("Usage e.g.: 'ts-node src/add-new-network rinkeby athens'."); - process.exit(1); -} - -addNewNetwork(name, parsedAddTo); diff --git a/packages/addresses-tools/src/addresses.helpers.ts b/packages/addresses-tools/src/addresses.helpers.ts deleted file mode 100644 index dd7b33b3..00000000 --- a/packages/addresses-tools/src/addresses.helpers.ts +++ /dev/null @@ -1,299 +0,0 @@ -import { - isLocalNetworkName, - isMainnetNetworkName, - isNetworkName, - isTestnetNetworkName, - isZetaLocalnet, - isZetaMainnet, - isZetaNetworkName, - isZetaTestnet, - LocalnetAddressGroup, - LocalNetworkName, - MainnetAddressGroup, - MainnetNetworkName, - NetworkAddresses, - NetworkName, - TestnetAddressGroup, - TestnetNetworkName, - ZetaAddress, - ZetaLocalNetworkName, - ZetaMainnetNetworkName, - ZetaNetworkName, - ZetaTestnetNetworkName -} from "@zetachain/addresses"; -import { ZetaProtocolNetwork } from "@zetachain/protocol-contracts/dist/lib"; -import { ProtocolNetworkNetworkNameMap } from "@zetachain/protocol-contracts/dist/lib/address.helpers"; -import dotenv from "dotenv"; -import { readdirSync, readFileSync, writeFileSync } from "fs"; -import { network } from "hardhat"; -import { join } from "path"; - -import { deepCloneSerializable } from "./misc.helpers"; - -const LOCAL_PKG = "addresses-tools"; -const PUBLIC_PKG = "addresses"; - -const dirname = __dirname.replace(LOCAL_PKG, PUBLIC_PKG).replace("dist", "src"); - -export const getScanVariable = ({ customNetworkName }: { customNetworkName?: string } = {}): string => { - const networkName = customNetworkName || network.name; - if (!isNetworkName(networkName)) throw new Error(); - dotenv.config(); - - const v = { - athens: "", - "bitcoin-test": "", - "bsc-localnet": "", - "bsc-mainnet": process.env.BSCSCAN_API_KEY || "", - "bsc-testnet": process.env.BSCSCAN_API_KEY || "", - "eth-localnet": "", - "eth-mainnet": process.env.ETHERSCAN_API_KEY || "", - goerli: process.env.ETHERSCAN_API_KEY || "", - hardhat: "", - "klaytn-baobab": "", - "klaytn-cypress": "", - "polygon-localnet": "", - "polygon-mumbai": process.env.POLYGONSCAN_API_KEY || "" - }; - - return v[networkName]; -}; - -export const getExplorerUrl = ({ customNetworkName }: { customNetworkName?: string } = {}): string => { - const networkName = customNetworkName || network.name; - if (!isNetworkName(networkName)) throw new Error(); - dotenv.config(); - - const v = { - athens: "", - "bitcoin-test": "", - "bsc-localnet": "", - "bsc-mainnet": "https://bscscan.com/", - "bsc-testnet": "https://testnet.bscscan.com/", - "eth-localnet": "", - "eth-mainnet": "https://etherscan.io/", - goerli: "https://goerli.etherscan.io/", - hardhat: "", - "klaytn-baobab": "https://baobab.scope.klaytn.com/", - "klaytn-cypress": "https://scope.klaytn.com/", - "polygon-localnet": "", - "polygon-mumbai": "https://mumbai.polygonscan.com/" - }; - - return v[networkName]; -}; - -export const getGasSymbolByNetwork = (networkName: NetworkName): string => { - const v = { - athens: "ZETA", - "bitcoin-test": "BTC", - "bsc-localnet": "BNB", - "bsc-mainnet": "BNB", - "bsc-testnet": "BNB", - "eth-localnet": "ETH", - "eth-mainnet": "ETH", - goerli: "ETH", - hardhat: "ETH", - "klaytn-baobab": "KLAY", - "klaytn-cypress": "KLAY", - "polygon-localnet": "MATIC", - "polygon-mumbai": "MATIC" - }; - - return v[networkName]; -}; - -const MissingZetaNetworkError = new Error( - "ZETA_NETWORK is not defined, please set the environment variable (e.g.: ZETA_NETWORK=athens )" -); - -export const saveAddress = (addressName: ZetaAddress, newAddress: string) => { - const { ZETA_NETWORK } = process.env; - const { name: networkName } = network; - - if (!ZETA_NETWORK) throw MissingZetaNetworkError; - - console.log(`Updating ${addressName} address on ${ZETA_NETWORK}: ${networkName}.`); - - const filename = join(dirname, `./addresses.${ZETA_NETWORK}.json`); - - if (isZetaLocalnet(ZETA_NETWORK) && isLocalNetworkName(networkName)) { - const newAddresses: LocalnetAddressGroup = JSON.parse(readFileSync(filename, "utf8")); - if (typeof newAddresses[networkName][addressName] === "undefined") { - console.log( - `The address ${addressName} does not exist, it will get created but make sure to add it to the types.` - ); - } - - newAddresses[networkName][addressName] = newAddress; - - writeFileSync(filename, JSON.stringify(newAddresses, null, 2)); - - console.log(`Updated, new address: ${newAddress}.`); - - return; - } - - if (isZetaTestnet(ZETA_NETWORK) && isTestnetNetworkName(networkName)) { - const newAddresses: TestnetAddressGroup = JSON.parse(readFileSync(filename, "utf8")); - newAddresses[networkName][addressName] = newAddress; - - writeFileSync(filename, JSON.stringify(newAddresses, null, 2)); - - console.log(`Updated, new address: ${newAddress}.`); - - return; - } - - if (isZetaMainnet(ZETA_NETWORK) && isMainnetNetworkName(networkName)) { - const newAddresses: MainnetAddressGroup = JSON.parse(readFileSync(filename, "utf8")); - newAddresses[networkName][addressName] = newAddress; - - writeFileSync(filename, JSON.stringify(newAddresses, null, 2)); - - console.log(`Updated, new address: ${newAddress}.`); - - return; - } - - throw new Error(`Invalid ZETA_NETWORK + network combination ${ZETA_NETWORK} ${networkName}.`); -}; - -export const addNewAddress = (addressName: string, addressValue: string = "") => { - if (!addressName) throw new Error("Emtpy address name."); - - const addressesDirname = join(dirname, `./`); - const addressesFiles = readdirSync(addressesDirname).filter(fileName => fileName.includes(".json")); - - addressesFiles.forEach(addressesFilename => { - const addressPath = join(addressesDirname, addressesFilename); - - const addressesByNetwork = JSON.parse(readFileSync(addressPath, "utf8")); - - Object.keys(addressesByNetwork).forEach(network => { - if (!isNetworkName(network) && !isZetaNetworkName(network)) return; - - addressesByNetwork[network][addressName] = addressValue; - addressesByNetwork[network] = Object.keys(addressesByNetwork[network]) - .sort() - .reduce((obj, key) => { - obj[key as ZetaAddress] = addressesByNetwork[network][key]; - return obj; - }, {} as NetworkAddresses); - }); - - writeFileSync(addressPath, JSON.stringify(addressesByNetwork, null, 2)); - }); - - console.log(`To enable IntelliSense, add the address (${addressName}) to the constants (addresses.helpers.ts).`); -}; - -export const addNewNetwork = (newNetworkName: string, addTo: ZetaNetworkName[]) => { - if (!newNetworkName) throw new Error("Emtpy networkName name."); - const addressesDirname = join(dirname, `./`); - const addressesFiles = readdirSync(addressesDirname).filter(fileName => fileName.includes(".json")); - - addressesFiles.forEach(addressFilename => { - const addressesFilePath = join(addressesDirname, addressFilename); - /** - * Gets the Zeta network name using the filename, e.g.: addresses.athens.json -> athens - */ - const zetaNetworkName = addressFilename.substring( - addressFilename.indexOf(".") + 1, - addressFilename.lastIndexOf(".") - ); - - if (!isZetaNetworkName(zetaNetworkName)) throw new Error("Error getting Zeta network name."); - - if (!addTo.includes(zetaNetworkName)) return; - - const fileNetworks = JSON.parse(readFileSync(addressesFilePath, "utf8")); - - if (Boolean(fileNetworks[newNetworkName])) throw new Error("Network already exists."); - - /** - * Use an existing network object to populate the new one - */ - const randomNetworkName = Object.keys(fileNetworks)[0]; - fileNetworks[newNetworkName] = deepCloneSerializable(fileNetworks[randomNetworkName]); - - const emptyNewNetworkAddresses = () => { - Object.keys(fileNetworks[newNetworkName]).forEach(addressName => { - fileNetworks[newNetworkName][addressName] = ""; - }); - }; - emptyNewNetworkAddresses(); - - /** - * The types below aren't 100% correct - */ - const orderedFileNetworks = Object.keys(fileNetworks) - .sort() - .reduce((obj, key) => { - obj[key as LocalNetworkName | MainnetNetworkName | TestnetNetworkName] = fileNetworks[key]; - return obj; - }, {} as LocalnetAddressGroup & MainnetAddressGroup & TestnetAddressGroup); - - writeFileSync(addressesFilePath, JSON.stringify(orderedFileNetworks, null, 2)); - }); - - console.log(`To enable IntelliSense, add the network (${newNetworkName}) to the constants (addresses.helpers.ts).`); -}; - -export const getLocalnetListFromFile = async (): Promise> => { - const troy = await require("./addresses.troy.json"); - return { - troy: troy as LocalnetAddressGroup - }; -}; - -export const getTestnetListFromFile = async (): Promise> => { - const athens = await require("./addresses.athens.json"); - return { - athens: athens as TestnetAddressGroup - }; -}; - -export const getMainnetListFromFile = async (): Promise> => { - const mainnet = await require("./addresses.mainnet.json"); - return { - mainnet: mainnet as MainnetAddressGroup - }; -}; - -export const loadAddressFromFile = async ( - address: ZetaAddress, - { - customNetworkName, - customZetaNetwork - }: { customNetworkName?: NetworkName; customZetaNetwork?: ZetaNetworkName } = {} -): Promise => { - const { name: _networkName } = network; - const networkName = customNetworkName || _networkName; - - const { ZETA_NETWORK: _ZETA_NETWORK } = process.env; - const ZETA_NETWORK = customZetaNetwork || _ZETA_NETWORK; - - if (!ZETA_NETWORK) throw MissingZetaNetworkError; - - console.log(`Getting ${address} address from ${ZETA_NETWORK}: ${networkName}.`); - - if (isZetaLocalnet(ZETA_NETWORK) && isLocalNetworkName(networkName)) { - return (await getLocalnetListFromFile())[ZETA_NETWORK][networkName][address]; - } - - if (isZetaTestnet(ZETA_NETWORK) && isTestnetNetworkName(networkName)) { - return (await getTestnetListFromFile())[ZETA_NETWORK][networkName][address]; - } - - if (isZetaMainnet(ZETA_NETWORK) && isMainnetNetworkName(networkName)) { - return (await getMainnetListFromFile())[ZETA_NETWORK][networkName][address]; - } - - throw new Error(`Invalid ZETA_NETWORK + network combination ${ZETA_NETWORK} ${networkName}.`); -}; - -export const getProtocolNetwork = (value: NetworkName): ZetaProtocolNetwork | undefined => { - //@ts-expect-error - return Object.keys(ProtocolNetworkNetworkNameMap).find(key => ProtocolNetworkNetworkNameMap[key] === value); -}; diff --git a/packages/addresses-tools/src/index.ts b/packages/addresses-tools/src/index.ts deleted file mode 100644 index c79a885a..00000000 --- a/packages/addresses-tools/src/index.ts +++ /dev/null @@ -1,3 +0,0 @@ -export * from "./addresses.helpers"; -export * from "./networks"; -export * from "./system-addresses.helpers"; diff --git a/packages/addresses-tools/src/log-addresses.ts b/packages/addresses-tools/src/log-addresses.ts deleted file mode 100644 index b8bdf988..00000000 --- a/packages/addresses-tools/src/log-addresses.ts +++ /dev/null @@ -1,38 +0,0 @@ -import { getTestnetList, isZetaNetworkName, ZetaTestnetNetworkName } from "@zetachain/addresses"; - -import { getExplorerUrl } from "./addresses.helpers"; -const network = process.argv[2]; - -const toFilter = process.argv[3].split(",").map(w => w.toLowerCase()); - -if (!isZetaNetworkName(network)) { - console.error(`Invalid network (${network}).`); - process.exit(1); -} - -const capitalizeFirstLetter = (str: string) => str.charAt(0).toUpperCase() + str.slice(1); - -const logAddresses = (zetaNetwork: ZetaTestnetNetworkName) => { - const list = getTestnetList()[zetaNetwork]; - - console.log(`${capitalizeFirstLetter(zetaNetwork)} addresses:`); - - Object.entries(list).map(([networkName, addresses], i) => { - console.log(`--- ${capitalizeFirstLetter(networkName)} ---`); - - Object.entries(addresses).map(([name, address]) => { - if (toFilter.includes(name.toLowerCase())) return; - if (!address) return; - - console.log( - `${capitalizeFirstLetter(name)}: [${address}](${getExplorerUrl({ - customNetworkName: networkName - })}address/${address})` - ); - }); - - console.log("\n"); - }); -}; - -logAddresses("athens"); diff --git a/packages/addresses-tools/src/misc.constants.ts b/packages/addresses-tools/src/misc.constants.ts deleted file mode 100644 index 5f2cf2cf..00000000 --- a/packages/addresses-tools/src/misc.constants.ts +++ /dev/null @@ -1 +0,0 @@ -export type ValueOf = T[keyof T]; diff --git a/packages/addresses-tools/src/misc.helpers.ts b/packages/addresses-tools/src/misc.helpers.ts deleted file mode 100644 index 7848f0fd..00000000 --- a/packages/addresses-tools/src/misc.helpers.ts +++ /dev/null @@ -1,2 +0,0 @@ -export const deepCloneSerializable = (serializableObject: Obj): Obj => - JSON.parse(JSON.stringify(serializableObject)); diff --git a/packages/addresses-tools/src/networks.ts b/packages/addresses-tools/src/networks.ts deleted file mode 100644 index 850eaee4..00000000 --- a/packages/addresses-tools/src/networks.ts +++ /dev/null @@ -1,84 +0,0 @@ -import type { NetworksUserConfig } from "hardhat/types"; - -export const getHardhatConfigNetworks = (PRIVATE_KEYS: string[]): NetworksUserConfig => ({ - "athens": { - accounts: PRIVATE_KEYS, - // chainId: 7001, - gas: 5000000, - gasPrice: 80000000000, - // url: `https://api.athens2.zetachain.com/evm`, //A2 - url: `https://zetachain-athens-evm.blockpi.network/v1/rpc/public`, //A3 - }, - "bsc-localnet": { - gas: 5000000, - gasPrice: 80000000000, - url: "http://localhost:8120", - }, - "bsc-mainnet": { - accounts: PRIVATE_KEYS, - gas: 5000000, - gasPrice: 80000000000, - url: `https://rpc.ankr.com/bsc`, - }, - "bsc-testnet": { - accounts: PRIVATE_KEYS, - gas: 5000000, - gasPrice: 80000000000, - url: `https://rpc.ankr.com/bsc_testnet_chapel`, - }, - "eth-localnet": { - gas: 2100000, - gasPrice: 80000000000, - url: "http://localhost:8100", - }, - "eth-mainnet": { - accounts: PRIVATE_KEYS, - url: "https://rpc.ankr.com/eth", - }, - goerli: { - accounts: PRIVATE_KEYS, - gas: 2100000, - gasPrice: 38000000000, - url: `https://rpc.ankr.com/eth_goerli`, - }, - hardhat: { - chainId: 1337, - forking: { - blockNumber: 14672712, - url: `https://rpc.ankr.com/eth`, - }, - }, - "klaytn-baobab": { - accounts: PRIVATE_KEYS, - chainId: 1001, - gas: 6000000, - gasPrice: 54250000000, - url: "https://api.baobab.klaytn.net:8651" - }, - "klaytn-cypress": { - accounts: PRIVATE_KEYS, - chainId: 8217, - gas: 2100000, - gasPrice: 8000000000, - url: "https://scope.klaytn.com/" - }, - "polygon-localnet": { - gas: 5000000, - gasPrice: 80000000000, - url: "http://localhost:8140", - }, - "polygon-mumbai": { - accounts: PRIVATE_KEYS, - gas: 5000000, - gasPrice: 80000000000, - url: "https://rpc.ankr.com/polygon_mumbai", - }, -}); - -export const getHardhatConfigScanners = () => ({ - apiKey: { - bscTestnet: process.env.BSCSCAN_API_KEY, - goerli: process.env.ETHERSCAN_API_KEY, - polygonMumbai: process.env.POYLGONSCAN_API_KEY - }, -}); diff --git a/packages/addresses-tools/src/system-addresses.helpers.ts b/packages/addresses-tools/src/system-addresses.helpers.ts deleted file mode 100644 index 6bb2e6d9..00000000 --- a/packages/addresses-tools/src/system-addresses.helpers.ts +++ /dev/null @@ -1,49 +0,0 @@ -import { NetworkName } from "@zetachain/addresses"; -import { getAddress, getZRC20Address as getZRC20AddressFromProtocol } from "@zetachain/protocol-contracts/dist/lib"; - -export type AthensVersion = "Athens2" | "Athens3"; - -export type ZRC20 = "gETH" | "tBNB" | "tBTC" | "tMATIC"; - -//@dev: Legacy addresses to make it simple if is needed to run a script pointing to Athens2 -const ATHENS2_SYSTEM_CONTRACT = "0x239e96c8f17C85c30100AC26F635Ea15f23E9c67"; -const ATHENS2_ZRC20Addresses: Record = { - gETH: "0x91d18e54DAf4F677cB28167158d6dd21F6aB3921", - tBNB: "0x13A0c5930C028511Dc02665E7285134B6d11A5f4", - tBTC: "0x48f80608B672DC30DC7e3dbBd0343c5F02C738Eb", - tMATIC: "0xd97B1de3619ed2c6BEb3860147E30cA8A7dC9891" -}; - -export const getSystemContractAddress = (version: AthensVersion = "Athens3") => { - if (version === "Athens2") { - return ATHENS2_SYSTEM_CONTRACT; - } - return getAddress("systemContract", "zeta_testnet"); -}; - -export const getZRC20Address = (version: AthensVersion = "Athens3") => { - if (version === "Athens2") { - return ATHENS2_ZRC20Addresses; - } - const ZRC20Addresses: Record = { - gETH: getZRC20AddressFromProtocol("goerli_testnet"), - tBNB: getZRC20AddressFromProtocol("bsc_testnet"), - // tBTC: getZRC20AddressFromProtocol("bitcoin-test"), - tBTC: "0x0", - tMATIC: getZRC20AddressFromProtocol("mumbai_testnet") - }; - - return ZRC20Addresses; -}; - -export type SwappableNetwork = Extract; - -export const isSwappableNetwork = (network: string): network is SwappableNetwork => - network === "bitcoin-test" || network === "bsc-testnet" || network === "goerli" || network === "polygon-mumbai"; - -export const ChainToZRC20: Record = { - "bitcoin-test": "tBTC", - "bsc-testnet": "tBNB", - goerli: "gETH", - "polygon-mumbai": "tMATIC" -}; diff --git a/packages/addresses-tools/tsconfig.json b/packages/addresses-tools/tsconfig.json deleted file mode 100644 index 588ea357..00000000 --- a/packages/addresses-tools/tsconfig.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "extends": "../../tsconfig.json", - "include": ["./src", "./src/**/*.json"], - "compilerOptions": { - "baseUrl": "./src", - "outDir": "./dist", - "rootDir": "./src", - "paths": { - "~/*": [ - "./*" - ] - } - }, -} diff --git a/packages/addresses/.npmignore b/packages/addresses/.npmignore deleted file mode 100644 index 539a5de3..00000000 --- a/packages/addresses/.npmignore +++ /dev/null @@ -1,30 +0,0 @@ -# source code -src -index.html - -# compiler -tsconfig.json - -# files -*.log -cypress.json -*.code-workspace - -# tests -test - -# lint -.eslintrc.js -.prettierrc - -# IDE - VSCode -.vscode - -# git -.git - -# Include the dist folder and other necessary files -!dist/ -!README.md -!LICENSE -!package.json diff --git a/packages/addresses/README.md b/packages/addresses/README.md deleted file mode 100644 index 8a0e5cae..00000000 --- a/packages/addresses/README.md +++ /dev/null @@ -1,26 +0,0 @@ -# ZetaChain addresses - -This package includes the addresses and networks to use Zetachain. - -## Usage - -```js -import { getAddress } from "@zetachain/addresses"; - -const address = getAddress({ address: "zetaToken", networkName: "goerli", zetaNetwork:"athens" }); -``` - -## API - - -| Method | Description | -| :---- | ------ | -| isTestnetNetworkName = (networkName: string): networkName is TestnetNetworkName | Returns true if it's a valid Testnet name | -| isZetaTestnet = (networkName: string): networkName is ZetaTestnetNetworkName | Returns true if it's a valid ZetaTestnet name | -| isMainnetNetworkName = (networkName: string): networkName is MainnetNetworkName | Returns true if it's a valid Mainnet name | -| isNetworkName = (networkName: string): networkName is NetworkName | Returns true if it's a valid network name | -| isZetaNetworkName = (networkName: string): networkName is ZetaNetworkName | Returns true if it's a valid Zeta network name | -| type ZetaAddress | Valid values for ZetaAddress | -| getAddress = ({ address: ZetaAddress; networkName: string; zetaNetwork: string; }): string | Returns the address of a valid ZetaAddress | - -``` \ No newline at end of file diff --git a/packages/addresses/package.json b/packages/addresses/package.json deleted file mode 100644 index 59ab7864..00000000 --- a/packages/addresses/package.json +++ /dev/null @@ -1,25 +0,0 @@ -{ - "name": "@zetachain/addresses", - "version": "0.0.13", - "license": "MIT", - "author": "zetachain", - "publishConfig": { - "access": "public", - "registry": "https://registry.npmjs.org/" - }, - "files": [ - "dist" - ], - "main": "./dist/", - "exports": { - ".": "./dist/index.js" - }, - "scripts": { - "tsc:watch": "npx tsc --watch", - "prepublishOnly": "npx tsc" - }, - "devDependencies": { - "vite": "^3.1.0", - "vite-plugin-dts": "^1.4.1" - } -} diff --git a/packages/addresses/src/addresses.athens.json b/packages/addresses/src/addresses.athens.json deleted file mode 100644 index d7751271..00000000 --- a/packages/addresses/src/addresses.athens.json +++ /dev/null @@ -1,162 +0,0 @@ -{ - "bsc-testnet": { - "connector": "0x0000ecb8cdd25a18f12daa23f6422e07fbf8b9e1", - "crossChainCounter": "", - "crossChainNft": "", - "dai": "", - "disperse": "", - "immutableCreate2Factory": "0x095a03c6a68137fE9a566bBc3e552F299d8b886d", - "multiChainSwap": "0x8BD7144Ddb59c9Fa3Dcf809998521E9cAD946fa1", - "multiChainSwapZetaConnector": "", - "multiChainValue": "0x064516547ECd3b2D1709e1b2798Aae92b1C8a84C", - "rewardDistributorFactory": "", - "tridentPoolFactory": "", - "tss": "0x8531a5aB847ff5B22D855633C25ED1DA3255247e", - "tssUpdater": "0x55122f7590164Ac222504436943FAB17B62F5d7d", - "uniswapV2Factory": "", - "uniswapV2Router02": "0xD99D1c33F9fC3444f8101754aBC46c52416550D1", - "uniswapV3PoolFactory": "", - "uniswapV3Quoter": "0x10ed43c718714eb63d5aa57b78b54704e256024e", - "uniswapV3Router": "0x10ed43c718714eb63d5aa57b78b54704e256024e", - "usdc": "", - "weth9": "0xbb4cdb9cbd36b01bd1cbaebf2de08d9173bc095c", - "zetaSwap": "", - "zetaSwapBtcInbound": "", - "zetaToken": "0x0000c9ec4042283e8139c74f4c64bcd1e0b9b54f", - "zetaTokenConsumerUniV2": "", - "zetaTokenConsumerUniV3": "" - }, - "goerli": { - "connector": "0x00005e3125aba53c5652f9f0ce1a4cf91d8b15ea", - "crossChainCounter": "", - "crossChainNft": "", - "dai": "", - "disperse": "", - "immutableCreate2Factory": "0x095a03c6a68137fE9a566bBc3e552F299d8b886d", - "multiChainSwap": "0x323745f16C93e56a98012970c28788498d8B3a14", - "multiChainSwapZetaConnector": "", - "multiChainValue": "0x14BeC0E4A8e7bF7A02Af54Ad81a57a9fcA4D37Fd", - "rewardDistributorFactory": "", - "tridentPoolFactory": "", - "tss": "0x8531a5aB847ff5B22D855633C25ED1DA3255247e", - "tssUpdater": "0x55122f7590164Ac222504436943FAB17B62F5d7d", - "uniswapV2Factory": "", - "uniswapV2Router02": "0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D", - "uniswapV3PoolFactory": "", - "uniswapV3Quoter": "", - "uniswapV3Router": "", - "usdc": "", - "weth9": "", - "zetaSwap": "", - "zetaSwapBtcInbound": "", - "zetaToken": "0x0000c304d2934c00db1d51995b9f6996affd17c0", - "zetaTokenConsumerUniV2": "", - "zetaTokenConsumerUniV3": "" - }, - "polygon-mumbai": { - "connector": "0x0000ecb8cdd25a18f12daa23f6422e07fbf8b9e1", - "crossChainCounter": "", - "crossChainNft": "", - "dai": "", - "immutableCreate2Factory": "0x095a03c6a68137fE9a566bBc3e552F299d8b886d", - "multiChainSwap": "0xb1b812b664c28E1bA1d35De925Ae88b7Bc7cdCF5", - "rewardDistributorFactory": "", - "tridentPoolFactory": "", - "multiChainSwapZetaConnector": "", - "multiChainValue": "0x14BeC0E4A8e7bF7A02Af54Ad81a57a9fcA4D37Fd", - "tss": "0x8531a5aB847ff5B22D855633C25ED1DA3255247e", - "tssUpdater": "0x55122f7590164Ac222504436943FAB17B62F5d7d", - "uniswapV2Factory": "", - "uniswapV2Router02": "0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D", - "uniswapV3PoolFactory": "0x1F98431c8aD98523631AE4a59f267346ea31F984", - "uniswapV3Quoter": "0xb27308f9F90D607463bb33eA1BeBb41C27CE5AB6", - "uniswapV3Router": "0xE592427A0AEce92De3Edee1F18E0157C05861564", - "usdc": "", - "weth9": "0x9c3C9283D3e44854697Cd22D3Faa240Cfb032889", - "zetaSwap": "", - "zetaSwapBtcInbound": "", - "zetaToken": "0x0000c9ec4042283e8139c74f4c64bcd1e0b9b54f", - "zetaTokenConsumerUniV2": "", - "zetaTokenConsumerUniV3": "" - }, - "klaytn-baobab": { - "connector": "", - "crossChainCounter": "", - "crossChainNft": "", - "dai": "", - "disperse": "", - "immutableCreate2Factory": "", - "multiChainSwap": "", - "multiChainValue": "", - "rewardDistributorFactory": "", - "tridentPoolFactory": "", - "tss": "", - "tssUpdater": "", - "uniswapV2Factory": "", - "uniswapV2Router02": "", - "uniswapV3PoolFactory": "", - "uniswapV3Quoter": "", - "uniswapV3Router": "", - "usdc": "", - "weth9": "", - "zetaSwap": "", - "zetaSwapBtcInbound": "", - "zetaToken": "", - "zetaTokenConsumerUniV2": "", - "zetaTokenConsumerUniV3": "" - }, - "athens": { - "connector": "", - "crossChainCounter": "", - "crossChainNft": "", - "dai": "", - "disperse": "0x1E0F767F48Fb10FcF820703f116E9B0F87319d63", - "immutableCreate2Factory": "", - "multiChainSwap": "", - "multiChainSwapZetaConnector": "", - "multiChainValue": "0x82aC45D07dEe4DBDe050e838beF345347DEd99a8", - "rewardDistributorFactory": "0x667e4C493d40015256BDC89E3ba750B2F90359E1", - "tridentPoolFactory": "", - "tss": "", - "tssUpdater": "", - "uniswapV2Factory": "0x9fd96203f7b22bCF72d9DCb40ff98302376cE09c", - "uniswapV2Router02": "0x2ca7d64A7EFE2D62A725E2B35Cf7230D6677FfEe", - "uniswapV3PoolFactory": "", - "uniswapV3Quoter": "", - "uniswapV3Router": "", - "usdc": "", - "weth9": "0x5F0b1a82749cb4E2278EC87F8BF6B618dC71a8bf", - "zetaSwap": "0x44D1F1f9289DBA1Cf5824bd667184cEBE020aA1c", - "zetaSwapBtcInbound": "0x008b393933D5CA2457Df570CA5D628380FFf6da4", - "zetaToken": "0x5F0b1a82749cb4E2278EC87F8BF6B618dC71a8bf", - "zetaTokenConsumerUniV2": "", - "zetaTokenConsumerUniV3": "" - }, - "bitcoin-test": { - "connector": "", - "crossChainCounter": "", - "crossChainNft": "", - "dai": "", - "disperse": "", - "immutableCreate2Factory": "", - "multiChainSwap": "", - "multiChainSwapZetaConnector": "", - "multiChainValue": "", - "rewardDistributorFactory": "", - "tridentPoolFactory": "", - "tss": "", - "tssUpdater": "", - "uniswapV2Factory": "", - "uniswapV2Router02": "", - "uniswapV3PoolFactory": "", - "uniswapV3Quoter": "", - "uniswapV3Router": "", - "usdc": "", - "weth9": "", - "zetaSwap": "", - "zetaSwapBtcInbound": "", - "zetaToken": "", - "zetaTokenConsumerUniV2": "", - "zetaTokenConsumerUniV3": "" - } -} \ No newline at end of file diff --git a/packages/addresses/src/addresses.helpers.ts b/packages/addresses/src/addresses.helpers.ts deleted file mode 100644 index e77c8c88..00000000 --- a/packages/addresses/src/addresses.helpers.ts +++ /dev/null @@ -1,185 +0,0 @@ -import athens from "./addresses.athens.json"; -import mainnet from "./addresses.mainnet.json"; -import troy from "./addresses.troy.json"; - -export type ZetaAddress = - | "connector" - | "crossChainCounter" - | "crossChainNft" - | "dai" - | "disperse" - | "immutableCreate2Factory" - | "multiChainSwap" - | "multiChainSwapZetaConnector" - | "multiChainValue" - | "rewardDistributorFactory" - | "tridentPoolFactory" - | "tss" - | "tssUpdater" - | "uniswapV2Factory" - | "uniswapV2Router02" - | "uniswapV3PoolFactory" - | "uniswapV3Quoter" - | "uniswapV3Router" - | "usdc" - | "weth9" - | "zetaSwap" - | "zetaSwapBtcInbound" - | "zetaToken" - | "zetaTokenConsumerUniV2" - | "zetaTokenConsumerUniV3"; - -export type NetworkAddresses = Record; -const zetaAddresses: Record = { - connector: true, - crossChainCounter: true, - crossChainNft: true, - dai: true, - disperse: true, - immutableCreate2Factory: true, - multiChainSwap: true, - multiChainSwapZetaConnector: true, - multiChainValue: true, - rewardDistributorFactory: true, - tridentPoolFactory: true, - tss: true, - tssUpdater: true, - uniswapV2Factory: true, - uniswapV2Router02: true, - uniswapV3PoolFactory: true, - uniswapV3Quoter: true, - uniswapV3Router: true, - usdc: true, - weth9: true, - zetaSwap: true, - zetaSwapBtcInbound: true, - zetaToken: true, - zetaTokenConsumerUniV2: true, - zetaTokenConsumerUniV3: true -}; - -export const isZetaAddress = (a: string | undefined): a is ZetaAddress => Boolean(zetaAddresses[a as ZetaAddress]); - -/** - * @description Localnet - */ - -export type LocalNetworkName = "bsc-localnet" | "eth-localnet" | "hardhat" | "polygon-localnet"; -export type ZetaLocalNetworkName = "troy"; -export type LocalnetAddressGroup = Record; -export const isLocalNetworkName = (networkName: string): networkName is LocalNetworkName => - networkName === "hardhat" || - networkName === "eth-localnet" || - networkName === "bsc-localnet" || - networkName === "polygon-localnet"; -export const isZetaLocalnet = (networkName: string | undefined): networkName is ZetaLocalNetworkName => - networkName === "troy"; - -export const getLocalnetList = (): Record => ({ - troy: troy as LocalnetAddressGroup -}); - -/** - * @description Testnet - */ - -export type TestnetNetworkName = - | "athens" - | "bitcoin-test" - | "bsc-testnet" - | "goerli" - | "klaytn-baobab" - | "polygon-mumbai"; -export type ZetaTestnetNetworkName = "athens"; -export type TestnetAddressGroup = Record; -export const isTestnetNetworkName = (networkName: string): networkName is TestnetNetworkName => - networkName === "goerli" || - networkName === "bsc-testnet" || - networkName === "polygon-mumbai" || - networkName === "klaytn-baobab" || - networkName === "athens"; -export const isZetaTestnet = (networkName: string | undefined): networkName is ZetaTestnetNetworkName => - networkName === "athens"; - -export const getTestnetList = (): Record => ({ - athens: athens as TestnetAddressGroup -}); - -/** - * @description Mainnet - */ - -export type MainnetNetworkName = "bsc-mainnet" | "eth-mainnet" | "klaytn-cypress"; -export type ZetaMainnetNetworkName = "mainnet"; -export type MainnetAddressGroup = Record; -export const isMainnetNetworkName = (networkName: string): networkName is MainnetNetworkName => - networkName === "bsc-mainnet" || networkName === "eth-mainnet" || networkName === "klaytn-cypress"; -export const isZetaMainnet = (networkName: string | undefined): networkName is ZetaMainnetNetworkName => - networkName === "mainnet"; - -export const getMainnetList = (): Record => ({ - mainnet: mainnet as MainnetAddressGroup -}); - -/** - * @description Shared - */ - -export type NetworkName = LocalNetworkName | MainnetNetworkName | TestnetNetworkName; -export type ZetaNetworkName = ZetaLocalNetworkName | ZetaMainnetNetworkName | ZetaTestnetNetworkName; - -export const getChainId = (networkName: NetworkName) => { - const chainIds: Record = { - athens: 7001, - "bitcoin-test": 18332, - "bsc-localnet": 97, - "bsc-mainnet": 56, - "bsc-testnet": 97, - "eth-localnet": 5, - "eth-mainnet": 1, - goerli: 5, - hardhat: 1337, - "klaytn-baobab": 1001, - "klaytn-cypress": 8217, - "polygon-localnet": 80001, - "polygon-mumbai": 80001 - }; - - return chainIds[networkName]; -}; - -export const isNetworkName = (str: string): str is NetworkName => - isLocalNetworkName(str) || isTestnetNetworkName(str) || isMainnetNetworkName(str); - -export const isZetaNetworkName = (str: string): str is ZetaNetworkName => - isZetaLocalnet(str) || isZetaTestnet(str) || isZetaMainnet(str); - -const getInvalidNetworkError = (network: string, isZeta: boolean) => - new Error(`Network: ${network} is invalid${isZeta ? " ZetaNetwork" : ""}, please provide a valid value`); - -export const getAddress = ({ - address, - networkName, - zetaNetwork -}: { - address: ZetaAddress; - networkName: string; - zetaNetwork: string; -}): string => { - if (!isNetworkName(networkName)) throw getInvalidNetworkError(networkName, false); - if (!isZetaNetworkName(zetaNetwork)) throw getInvalidNetworkError(networkName, true); - - if (isZetaLocalnet(zetaNetwork) && isLocalNetworkName(networkName)) { - return getLocalnetList()[zetaNetwork][networkName][address]; - } - - if (isZetaTestnet(zetaNetwork) && isTestnetNetworkName(networkName)) { - return getTestnetList()[zetaNetwork][networkName][address]; - } - - if (isZetaMainnet(zetaNetwork) && isMainnetNetworkName(networkName)) { - return getMainnetList()[zetaNetwork][networkName][address]; - } - - throw new Error(`Invalid ZETA_NETWORK + network combination ${zetaNetwork} ${networkName}.`); -}; diff --git a/packages/addresses/src/addresses.mainnet.json b/packages/addresses/src/addresses.mainnet.json deleted file mode 100644 index 6edddb31..00000000 --- a/packages/addresses/src/addresses.mainnet.json +++ /dev/null @@ -1,71 +0,0 @@ -{ - "bsc-mainnet": { - "connector": "", - "crossChainCounter": "", - "crossChainNft": "", - "dai": "", - "multiChainValue": "", - "tss": "", - "tssUpdater": "", - "uniswapV2Router02": "", - "uniswapV3PoolFactory": "", - "uniswapV3Quoter": "", - "uniswapV3Router": "", - "usdc": "", - "weth9": "", - "zetaSwapBtcInbound": "", - "zetaToken": "", - "zetaTokenConsumerUniV2": "", - "immutableCreate2Factory": "", - "multiChainSwapZetaConnector": "", - "multiChainSwap": "", - "uniswapV2Factory": "", - "zetaSwap": "" - }, - "eth-mainnet": { - "connector": "", - "crossChainCounter": "", - "crossChainNft": "", - "dai": "0x6b175474e89094c44da98b954eedeac495271d0f", - "multiChainValue": "", - "tss": "", - "tssUpdater": "", - "uniswapV2Router02": "0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D", - "uniswapV3PoolFactory": "0xC36442b4a4522E871399CD717aBDD847Ab11FE88", - "uniswapV3Quoter": "0xb27308f9F90D607463bb33eA1BeBb41C27CE5AB6", - "uniswapV3Router": "0xE592427A0AEce92De3Edee1F18E0157C05861564", - "usdc": "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48", - "weth9": "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2", - "zetaSwapBtcInbound": "", - "zetaToken": "", - "zetaTokenConsumerUniV2": "", - "immutableCreate2Factory": "", - "multiChainSwapZetaConnector": "", - "multiChainSwap": "", - "uniswapV2Factory": "0x5C69bEe701ef814a2B6a3EDD4B1652CB9cc5aA6f", - "zetaSwap": "" - }, - "klaytn-cypress": { - "connector": "", - "crossChainCounter": "", - "crossChainNft": "", - "dai": "", - "multiChainValue": "", - "tss": "", - "tssUpdater": "", - "uniswapV2Router02": "", - "uniswapV3PoolFactory": "", - "uniswapV3Quoter": "", - "uniswapV3Router": "", - "usdc": "", - "weth9": "", - "zetaSwapBtcInbound": "", - "zetaToken": "", - "zetaTokenConsumerUniV2": "", - "immutableCreate2Factory": "", - "multiChainSwapZetaConnector": "", - "multiChainSwap": "", - "uniswapV2Factory": "", - "zetaSwap": "" - } -} \ No newline at end of file diff --git a/packages/addresses/src/addresses.troy.json b/packages/addresses/src/addresses.troy.json deleted file mode 100644 index c254b205..00000000 --- a/packages/addresses/src/addresses.troy.json +++ /dev/null @@ -1,94 +0,0 @@ -{ - "hardhat": { - "connector": "0xB06c856C8eaBd1d8321b687E188204C1018BC4E5", - "crossChainCounter": "", - "crossChainNft": "", - "dai": "", - "multiChainSwap": "0xddE78e6202518FF4936b5302cC2891ec180E8bFf", - "multiChainValue": "", - "tss": "0x70997970c51812dc3a010c7d01b50e0d17dc79c8", - "tssUpdater": "0x70997970c51812dc3a010c7d01b50e0d17dc79c8", - "uniswapV2Router02": "0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D", - "uniswapV3PoolFactory": "", - "uniswapV3Quoter": "", - "uniswapV3Router": "", - "usdc": "", - "weth9": "", - "zetaSwapBtcInbound": "", - "zetaToken": "0xddE78e6202518FF4936b5302cC2891ec180E8bFf", - "immutableCreate2Factory": "", - "multiChainSwapZetaConnector": "", - "uniswapV2Factory": "", - "zetaSwap": "", - "zetaTokenConsumerUniV2": "" - }, - "eth-localnet": { - "connector": "0xD7db1F9D0279876a9dcDb92e06057E0818b9B34b", - "crossChainCounter": "", - "crossChainNft": "", - "dai": "", - "multiChainSwap": "", - "multiChainValue": "", - "tss": "0x8C001e2204000D8ED10cAcf0F68106b68e036A26", - "tssUpdater": "0xfBec4048e09749515110c89D881EcDcA4460D377", - "uniswapV2Router02": "", - "uniswapV3PoolFactory": "", - "uniswapV3Quoter": "", - "uniswapV3Router": "", - "usdc": "", - "weth9": "", - "zetaSwapBtcInbound": "", - "zetaToken": "0xaEF27C0E302005dB3b442edF762EB070Dc2DB9b5", - "immutableCreate2Factory": "", - "multiChainSwapZetaConnector": "", - "uniswapV2Factory": "", - "zetaSwap": "", - "zetaTokenConsumerUniV2": "" - }, - "bsc-localnet": { - "connector": "0x960bd6A9d8424455953a68c17Be7f56e0cf83A9E", - "crossChainCounter": "", - "crossChainNft": "", - "dai": "", - "multiChainSwap": "", - "multiChainValue": "", - "tss": "0x8C001e2204000D8ED10cAcf0F68106b68e036A26", - "tssUpdater": "0x12Dc2227AA4b98b00Ff8148fDA9Ef750929B0F68", - "uniswapV2Router02": "", - "uniswapV3PoolFactory": "", - "uniswapV3Quoter": "", - "uniswapV3Router": "", - "usdc": "", - "weth9": "", - "zetaSwapBtcInbound": "", - "zetaToken": "0x0CF6e5aA211A4b7da5d04e93dC40Ee18202a5f84", - "immutableCreate2Factory": "", - "multiChainSwapZetaConnector": "", - "uniswapV2Factory": "", - "zetaSwap": "", - "zetaTokenConsumerUniV2": "" - }, - "polygon-localnet": { - "connector": "0xa16BD8468d10d28E6c16F03798EEb710fc84F616", - "crossChainCounter": "", - "crossChainNft": "", - "dai": "", - "multiChainSwap": "", - "multiChainValue": "", - "tss": "0x8C001e2204000D8ED10cAcf0F68106b68e036A26", - "tssUpdater": "0x78C18E214174A08Fc32e174fb203Aba05B016789", - "uniswapV2Router02": "", - "uniswapV3PoolFactory": "", - "uniswapV3Quoter": "", - "uniswapV3Router": "", - "usdc": "", - "weth9": "", - "zetaSwapBtcInbound": "", - "zetaToken": "0xD443E93f689a7E1d517Fef799b1d2Fd2FA536d3A", - "immutableCreate2Factory": "", - "multiChainSwapZetaConnector": "", - "uniswapV2Factory": "", - "zetaSwap": "", - "zetaTokenConsumerUniV2": "" - } -} \ No newline at end of file diff --git a/packages/addresses/src/index.ts b/packages/addresses/src/index.ts deleted file mode 100644 index 57e3950d..00000000 --- a/packages/addresses/src/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from "./addresses.helpers"; diff --git a/packages/addresses/tsconfig.json b/packages/addresses/tsconfig.json deleted file mode 100644 index f063f923..00000000 --- a/packages/addresses/tsconfig.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "compilerOptions": { - "typeRoots": ["@types", "./node_modules/@types"], - "target": "es6", - "noImplicitAny": true, - "moduleResolution": "node", - "sourceMap": false, - "outDir": "dist", - "esModuleInterop": true, - "baseUrl": "./", - "declaration": true, - "module": "commonjs", - "resolveJsonModule": true, - } -} diff --git a/packages/example-contracts/.env.example b/packages/example-contracts/.env.example deleted file mode 100644 index 09bb3086..00000000 --- a/packages/example-contracts/.env.example +++ /dev/null @@ -1,18 +0,0 @@ -ALCHEMY_API_KEY_MAINNET= -ALCHEMY_API_KEY_GOERLI= - -PUBLIC_KEY_1= - -PRIVATE_KEY= - -# ETHER -ETHERSCAN_API_KEY=<...> - -# POLYGON -POYLGONSCAN_API_KEY=<...> - -# BSC -BSCSCAN_API_KEY=<...> - -# Deployer address. This is needed to calculate salt in deterministic deployments -DEPLOYER_ADDRESS= diff --git a/packages/example-contracts/.eslintrc.js b/packages/example-contracts/.eslintrc.js deleted file mode 100644 index 77b8f69a..00000000 --- a/packages/example-contracts/.eslintrc.js +++ /dev/null @@ -1,23 +0,0 @@ -const path = require("path"); - -const OFF = 0; - -module.exports = { - env: { - browser: false, - es2021: true, - mocha: true, - node: true, - }, - extends: ["../../.eslintrc.js"], - rules: { - "no-console": OFF, - }, - settings: { - "import/resolver": { - typescript: { - project: path.join(__dirname, "tsconfig.json"), - }, - }, - }, -}; diff --git a/packages/example-contracts/README.md b/packages/example-contracts/README.md deleted file mode 100644 index f14c08bb..00000000 --- a/packages/example-contracts/README.md +++ /dev/null @@ -1,16 +0,0 @@ -# ZetaChain example contracts - -> ⚠️ The contracts **are not audited yet**, use at your own risk. - -## Environment variables - -Follow the template in `.env.example`. - -* The private key should **not** include `0x`. -* To verify your contracts, you'll need api keys both in BSCScan and Etherscan. - -## Running Tests - -```bash - yarn test -``` diff --git a/packages/example-contracts/contracts/cross-chain-counter/CrossChainCounter.sol b/packages/example-contracts/contracts/cross-chain-counter/CrossChainCounter.sol deleted file mode 100644 index c0505300..00000000 --- a/packages/example-contracts/contracts/cross-chain-counter/CrossChainCounter.sol +++ /dev/null @@ -1,57 +0,0 @@ -// SPDX-License-Identifier: MIT -pragma solidity 0.8.7; - -import "@openzeppelin/contracts/access/Ownable.sol"; -import "@zetachain/protocol-contracts/contracts/evm/tools/ZetaInteractor.sol"; -import "@zetachain/protocol-contracts/contracts/evm/interfaces/ZetaInterfaces.sol"; - -interface CrossChainCounterErrors { - error InvalidMessageType(); - - error DecrementOverflow(); -} - -contract CrossChainCounter is ZetaInteractor, ZetaReceiver, CrossChainCounterErrors { - bytes32 public constant CROSS_CHAIN_INCREMENT_MESSAGE = keccak256("CROSS_CHAIN_INCREMENT"); - - mapping(address => uint256) public counter; - - constructor(address connectorAddress_) ZetaInteractor(connectorAddress_) {} - - function crossChainCount(uint256 destinationChainId) external { - if (!_isValidChainId(destinationChainId)) revert InvalidDestinationChainId(); - - counter[msg.sender]++; - connector.send( - ZetaInterfaces.SendInput({ - destinationChainId: destinationChainId, - destinationAddress: interactorsByChainId[destinationChainId], - destinationGasLimit: 2500000, - message: abi.encode(CROSS_CHAIN_INCREMENT_MESSAGE, msg.sender), - zetaValueAndGas: 0, - zetaParams: abi.encode("") - }) - ); - } - - function onZetaMessage( - ZetaInterfaces.ZetaMessage calldata zetaMessage - ) external override isValidMessageCall(zetaMessage) { - (bytes32 messageType, address messageFrom) = abi.decode(zetaMessage.message, (bytes32, address)); - - if (messageType != CROSS_CHAIN_INCREMENT_MESSAGE) revert InvalidMessageType(); - - counter[messageFrom]++; - } - - function onZetaRevert( - ZetaInterfaces.ZetaRevert calldata zetaRevert - ) external override isValidRevertCall(zetaRevert) { - (bytes32 messageType, address messageFrom) = abi.decode(zetaRevert.message, (bytes32, address)); - - if (messageType != CROSS_CHAIN_INCREMENT_MESSAGE) revert InvalidMessageType(); - if (counter[messageFrom] <= 0) revert DecrementOverflow(); - - counter[messageFrom]--; - } -} diff --git a/packages/example-contracts/contracts/cross-chain-counter/test/CounterZetaConnectorMock.sol b/packages/example-contracts/contracts/cross-chain-counter/test/CounterZetaConnectorMock.sol deleted file mode 100644 index 6ceae166..00000000 --- a/packages/example-contracts/contracts/cross-chain-counter/test/CounterZetaConnectorMock.sol +++ /dev/null @@ -1,63 +0,0 @@ -// SPDX-License-Identifier: MIT -pragma solidity 0.8.7; - -import "@zetachain/protocol-contracts/contracts/evm/interfaces/ZetaInterfaces.sol"; - -import "../CrossChainCounter.sol"; - -contract CounterZetaConnectorMock is ZetaConnector { - function callOnZetaMessage( - bytes memory zetaTxSenderAddress, - uint256 sourceChainId, - address destinationAddress, - uint256 zetaValue, - bytes calldata message - ) public { - return - CrossChainCounter(destinationAddress).onZetaMessage( - ZetaInterfaces.ZetaMessage({ - zetaTxSenderAddress: zetaTxSenderAddress, - sourceChainId: sourceChainId, - destinationAddress: destinationAddress, - zetaValue: zetaValue, - message: message - }) - ); - } - - function callOnZetaRevert( - address zetaTxSenderAddress, - uint256 sourceChainId, - uint256 destinationChainId, - bytes calldata destinationAddress, - uint256 remainingZetaValue, - uint256, // destinationGasLimit - bytes calldata message - ) public { - return - CrossChainCounter(zetaTxSenderAddress).onZetaRevert( - ZetaInterfaces.ZetaRevert({ - zetaTxSenderAddress: zetaTxSenderAddress, - sourceChainId: sourceChainId, - destinationAddress: destinationAddress, - destinationChainId: destinationChainId, - remainingZetaValue: remainingZetaValue, - message: message - }) - ); - } - - function send(ZetaInterfaces.SendInput calldata sendInput) external override { - uint256 sourceChainId = sendInput.destinationChainId == 2 ? 1 : 2; - address dest = address(uint160(bytes20(sendInput.destinationAddress))); - - return - callOnZetaMessage( - abi.encodePacked(msg.sender), - sourceChainId, - dest, - sendInput.zetaValueAndGas, - sendInput.message - ); - } -} diff --git a/packages/example-contracts/contracts/cross-chain-message/CrossChainMessage.sol b/packages/example-contracts/contracts/cross-chain-message/CrossChainMessage.sol deleted file mode 100644 index 89c3bd4b..00000000 --- a/packages/example-contracts/contracts/cross-chain-message/CrossChainMessage.sol +++ /dev/null @@ -1,85 +0,0 @@ -// SPDX-License-Identifier: MIT -pragma solidity 0.8.7; - -import "@openzeppelin/contracts/interfaces/IERC20.sol"; -import "@openzeppelin/contracts/access/Ownable.sol"; -import "@zetachain/protocol-contracts/contracts/evm/tools/ZetaInteractor.sol"; -import "@zetachain/protocol-contracts/contracts/evm/interfaces/ZetaInterfaces.sol"; - -interface CrossChainMessageErrors { - error InvalidMessageType(); -} - -/** - * @dev A simple contract able to send and receive Hello World messages from other chains. - * Emits a HelloWorldEvent on successful messages - * Emits a RevertedHelloWorldEvent on failed messages - */ -contract CrossChainMessage is ZetaInteractor, ZetaReceiver, CrossChainMessageErrors { - bytes32 public constant HELLO_WORLD_MESSAGE_TYPE = keccak256("CROSS_CHAIN_HELLO_WORLD"); - - event HelloWorldEvent(string messageData); - event RevertedHelloWorldEvent(string messageData); - - ZetaTokenConsumer private immutable _zetaConsumer; - IERC20 internal immutable _zetaToken; - - constructor( - address connectorAddress, - address zetaTokenAddress, - address zetaConsumerAddress - ) ZetaInteractor(connectorAddress) { - _zetaToken = IERC20(zetaTokenAddress); - _zetaConsumer = ZetaTokenConsumer(zetaConsumerAddress); - } - - function sendHelloWorld(uint256 destinationChainId) external payable { - if (!_isValidChainId(destinationChainId)) revert InvalidDestinationChainId(); - - uint256 crossChainGas = 18 * (10 ** 18); - uint256 zetaValueAndGas = _zetaConsumer.getZetaFromEth{value: msg.value}(address(this), crossChainGas); - _zetaToken.approve(address(connector), zetaValueAndGas); - - connector.send( - ZetaInterfaces.SendInput({ - destinationChainId: destinationChainId, - destinationAddress: interactorsByChainId[destinationChainId], - destinationGasLimit: 2500000, - message: abi.encode(HELLO_WORLD_MESSAGE_TYPE, "Hello, Cross-Chain World!"), - zetaValueAndGas: zetaValueAndGas, - zetaParams: abi.encode("") - }) - ); - } - - function onZetaMessage( - ZetaInterfaces.ZetaMessage calldata zetaMessage - ) external override isValidMessageCall(zetaMessage) { - /** - * @dev Decode should follow the signature of the message provided to zeta.send. - */ - (bytes32 messageType, string memory helloWorldMessage) = abi.decode(zetaMessage.message, (bytes32, string)); - - /** - * @dev Setting a message type is a useful pattern to distinguish between different messages. - */ - if (messageType != HELLO_WORLD_MESSAGE_TYPE) revert InvalidMessageType(); - - emit HelloWorldEvent(helloWorldMessage); - } - - /** - * @dev Called by the Zeta Connector contract when the message fails to be sent. - * Useful to cleanup and leave the application on its initial state. - * Note that the require statements and the functionality are similar to onZetaMessage. - */ - function onZetaRevert( - ZetaInterfaces.ZetaRevert calldata zetaRevert - ) external override isValidRevertCall(zetaRevert) { - (bytes32 messageType, string memory helloWorldMessage) = abi.decode(zetaRevert.message, (bytes32, string)); - - if (messageType != HELLO_WORLD_MESSAGE_TYPE) revert InvalidMessageType(); - - emit RevertedHelloWorldEvent(helloWorldMessage); - } -} diff --git a/packages/example-contracts/contracts/cross-chain-message/test/CrossChainMessageConnector.sol b/packages/example-contracts/contracts/cross-chain-message/test/CrossChainMessageConnector.sol deleted file mode 100644 index 11f9f38a..00000000 --- a/packages/example-contracts/contracts/cross-chain-message/test/CrossChainMessageConnector.sol +++ /dev/null @@ -1,63 +0,0 @@ -// SPDX-License-Identifier: MIT -pragma solidity 0.8.7; - -import "@zetachain/protocol-contracts/contracts/evm/interfaces/ZetaInterfaces.sol"; - -import "../CrossChainMessage.sol"; - -contract CrossChainMessageConnector is ZetaConnector { - function callOnZetaMessage( - bytes memory zetaTxSenderAddress, - uint256 sourceChainId, - address destinationAddress, - uint256 zetaValue, - bytes calldata message - ) public { - return - CrossChainMessage(payable(destinationAddress)).onZetaMessage( - ZetaInterfaces.ZetaMessage({ - zetaTxSenderAddress: zetaTxSenderAddress, - sourceChainId: sourceChainId, - destinationAddress: destinationAddress, - zetaValue: zetaValue, - message: message - }) - ); - } - - function callOnZetaRevert( - address zetaTxSenderAddress, - uint256 sourceChainId, - uint256 destinationChainId, - bytes calldata destinationAddress, - uint256 remainingZetaValue, - uint256, // destinationGasLimit - bytes calldata message - ) public { - return - CrossChainMessage(payable(zetaTxSenderAddress)).onZetaRevert( - ZetaInterfaces.ZetaRevert({ - zetaTxSenderAddress: zetaTxSenderAddress, - sourceChainId: sourceChainId, - destinationAddress: destinationAddress, - destinationChainId: destinationChainId, - remainingZetaValue: remainingZetaValue, - message: message - }) - ); - } - - function send(ZetaInterfaces.SendInput calldata sendInput) external override { - uint256 sourceChainId = sendInput.destinationChainId == 2 ? 1 : 2; - address dest = address(uint160(bytes20(sendInput.destinationAddress))); - - return - callOnZetaMessage( - abi.encodePacked(msg.sender), - sourceChainId, - dest, - sendInput.zetaValueAndGas, - sendInput.message - ); - } -} diff --git a/packages/example-contracts/contracts/cross-chain-warriors/CrossChainWarriors.sol b/packages/example-contracts/contracts/cross-chain-warriors/CrossChainWarriors.sol deleted file mode 100644 index 3a627ae6..00000000 --- a/packages/example-contracts/contracts/cross-chain-warriors/CrossChainWarriors.sol +++ /dev/null @@ -1,140 +0,0 @@ -// SPDX-License-Identifier: MIT -pragma solidity 0.8.7; - -import "@openzeppelin/contracts/interfaces/IERC20.sol"; -import "@openzeppelin/contracts/token/ERC721/ERC721.sol"; -import "@openzeppelin/contracts/utils/Counters.sol"; -import "@openzeppelin/contracts/access/Ownable.sol"; -import "@zetachain/protocol-contracts/contracts/evm/interfaces/ZetaInterfaces.sol"; -import "@zetachain/protocol-contracts/contracts/evm/tools/ZetaInteractor.sol"; - -interface CrossChainWarriorsErrors { - error InvalidMessageType(); - - error InvalidTransferCaller(); - - error ErrorApprovingZeta(); -} - -contract CrossChainWarriors is - ERC721("CrossChainWarriors", "CCWAR"), - ZetaInteractor, - ZetaReceiver, - CrossChainWarriorsErrors -{ - using Counters for Counters.Counter; - using Strings for uint256; - - bytes32 public constant CROSS_CHAIN_TRANSFER_MESSAGE = keccak256("CROSS_CHAIN_TRANSFER"); - - IERC20 internal immutable _zetaToken; - - string public baseURI; - - Counters.Counter public tokenIds; - - ZetaTokenConsumer private immutable _zetaConsumer; - - constructor( - address connectorAddress, - address zetaTokenAddress, - address zetaConsumerAddress, - bool useEven - ) ZetaInteractor(connectorAddress) { - _zetaToken = IERC20(zetaTokenAddress); - _zetaConsumer = ZetaTokenConsumer(zetaConsumerAddress); - - /** - * @dev A simple way to prevent collisions between cross-chain token ids - * As you can see below, the mint function should increase the counter by two - */ - tokenIds.increment(); - if (useEven) tokenIds.increment(); - } - - function setBaseURI(string memory baseURIParam) public onlyOwner { - baseURI = baseURIParam; - } - - function mint(address to) public returns (uint256) { - uint256 newWarriorId = tokenIds.current(); - - /** - * @dev Always increment by two to keep ids even/odd (depending on the chain) - * Check the constructor for further reference - */ - tokenIds.increment(); - tokenIds.increment(); - - _safeMint(to, newWarriorId); - return newWarriorId; - } - - /** - * @dev Useful for cross-chain minting - */ - function _mintId(address to, uint256 tokenId) internal { - _safeMint(to, tokenId); - } - - function _burnWarrior(uint256 burnedWarriorId) internal { - _burn(burnedWarriorId); - } - - /** - * @dev Cross-chain functions - */ - - function crossChainTransfer(uint256 crossChainId, address to, uint256 tokenId) external payable { - if (!_isValidChainId(crossChainId)) revert InvalidDestinationChainId(); - if (!_isApprovedOrOwner(_msgSender(), tokenId)) revert InvalidTransferCaller(); - - uint256 crossChainGas = 18 * (10 ** 18); - uint256 zetaValueAndGas = _zetaConsumer.getZetaFromEth{value: msg.value}(address(this), crossChainGas); - _zetaToken.approve(address(connector), zetaValueAndGas); - - _burnWarrior(tokenId); - - connector.send( - ZetaInterfaces.SendInput({ - destinationChainId: crossChainId, - destinationAddress: interactorsByChainId[crossChainId], - destinationGasLimit: 500000, - message: abi.encode(CROSS_CHAIN_TRANSFER_MESSAGE, tokenId, msg.sender, to), - zetaValueAndGas: zetaValueAndGas, - zetaParams: abi.encode("") - }) - ); - } - - function onZetaMessage( - ZetaInterfaces.ZetaMessage calldata zetaMessage - ) external override isValidMessageCall(zetaMessage) { - ( - bytes32 messageType, - uint256 tokenId, - , - /** - * @dev this extra comma corresponds to address from - */ - address to - ) = abi.decode(zetaMessage.message, (bytes32, uint256, address, address)); - - if (messageType != CROSS_CHAIN_TRANSFER_MESSAGE) revert InvalidMessageType(); - - _mintId(to, tokenId); - } - - function onZetaRevert( - ZetaInterfaces.ZetaRevert calldata zetaRevert - ) external override isValidRevertCall(zetaRevert) { - (bytes32 messageType, uint256 tokenId, address from) = abi.decode( - zetaRevert.message, - (bytes32, uint256, address) - ); - - if (messageType != CROSS_CHAIN_TRANSFER_MESSAGE) revert InvalidMessageType(); - - _mintId(from, tokenId); - } -} diff --git a/packages/example-contracts/contracts/cross-chain-warriors/test/CrossChainWarriorsMock.sol b/packages/example-contracts/contracts/cross-chain-warriors/test/CrossChainWarriorsMock.sol deleted file mode 100644 index 69eff602..00000000 --- a/packages/example-contracts/contracts/cross-chain-warriors/test/CrossChainWarriorsMock.sol +++ /dev/null @@ -1,17 +0,0 @@ -// SPDX-License-Identifier: MIT -pragma solidity 0.8.7; - -import "../CrossChainWarriors.sol"; - -contract CrossChainWarriorsMock is CrossChainWarriors { - constructor( - address connectorAddress, - address zetaTokenAddress, - address zetaConsumerAddress, - bool useEven - ) CrossChainWarriors(connectorAddress, zetaTokenAddress, zetaConsumerAddress, useEven) {} - - function mintId(address to, uint256 tokenId) external { - return _mintId(to, tokenId); - } -} diff --git a/packages/example-contracts/contracts/cross-chain-warriors/test/CrossChainWarriorsZetaConnectorMock.sol b/packages/example-contracts/contracts/cross-chain-warriors/test/CrossChainWarriorsZetaConnectorMock.sol deleted file mode 100644 index b053d914..00000000 --- a/packages/example-contracts/contracts/cross-chain-warriors/test/CrossChainWarriorsZetaConnectorMock.sol +++ /dev/null @@ -1,63 +0,0 @@ -// SPDX-License-Identifier: MIT -pragma solidity 0.8.7; - -import "@zetachain/protocol-contracts/contracts/evm/interfaces/ZetaInterfaces.sol"; - -import "../CrossChainWarriors.sol"; - -contract CrossChainWarriorsZetaConnectorMock is ZetaConnector { - function callOnZetaMessage( - bytes memory zetaTxSenderAddress, - uint256 sourceChainId, - address destinationAddress, - uint256 zetaValue, - bytes calldata message - ) public { - return - CrossChainWarriors(destinationAddress).onZetaMessage( - ZetaInterfaces.ZetaMessage({ - zetaTxSenderAddress: zetaTxSenderAddress, - sourceChainId: sourceChainId, - destinationAddress: destinationAddress, - zetaValue: zetaValue, - message: message - }) - ); - } - - function callOnZetaRevert( - address zetaTxSenderAddress, - uint256 sourceChainId, - uint256 destinationChainId, - bytes calldata destinationAddress, - uint256 remainingZetaValue, - uint256, // destinationGasLimit - bytes calldata message - ) public { - return - CrossChainWarriors(zetaTxSenderAddress).onZetaRevert( - ZetaInterfaces.ZetaRevert({ - zetaTxSenderAddress: zetaTxSenderAddress, - sourceChainId: sourceChainId, - destinationAddress: destinationAddress, - destinationChainId: destinationChainId, - remainingZetaValue: remainingZetaValue, - message: message - }) - ); - } - - function send(ZetaInterfaces.SendInput calldata sendInput) external override { - uint256 sourceChainId = sendInput.destinationChainId == 2 ? 1 : 2; - address dest = address(uint160(bytes20(sendInput.destinationAddress))); - - return - callOnZetaMessage( - abi.encodePacked(msg.sender), - sourceChainId, - dest, - sendInput.zetaValueAndGas, - sendInput.message - ); - } -} diff --git a/packages/example-contracts/contracts/multi-chain-swap/MultiChainSwap.sol b/packages/example-contracts/contracts/multi-chain-swap/MultiChainSwap.sol deleted file mode 100644 index b0a97dfe..00000000 --- a/packages/example-contracts/contracts/multi-chain-swap/MultiChainSwap.sol +++ /dev/null @@ -1,69 +0,0 @@ -// SPDX-License-Identifier: MIT -pragma solidity 0.8.7; - -import "@zetachain/protocol-contracts/contracts/evm/tools/ZetaInteractor.sol"; - -interface MultiChainSwap is ZetaReceiver { - event SentTokenSwap( - address sourceTxOrigin, - address sourceInputToken, - uint256 inputTokenAmount, - address destinationOutToken, - uint256 outTokenMinAmount, - address receiverAddress - ); - - event SentEthSwap( - address sourceTxOrigin, - uint256 inputEthAmount, - address destinationOutToken, - uint256 outTokenMinAmount, - address receiverAddress - ); - - event Swapped( - address sourceTxOrigin, - address sourceInputToken, - uint256 inputTokenAmount, - address destinationOutToken, - uint256 outTokenFinalAmount, - address receiverAddress - ); - - event RevertedSwap( - address sourceTxOrigin, - address sourceInputToken, - uint256 inputTokenAmount, - uint256 inputTokenReturnedAmount - ); - - function swapETHForTokensCrossChain( - bytes calldata receiverAddress, - address destinationOutToken, - bool isDestinationOutETH, - /** - * @dev The minimum amount of tokens that receiverAddress should get, - * if it's not reached, the transaction will revert on the destination chain - */ - uint256 outTokenMinAmount, - uint256 destinationChainId, - uint256 crossChaindestinationGasLimit, - uint deadline - ) external payable; - - function swapTokensForTokensCrossChain( - address sourceInputToken, - uint256 inputTokenAmount, - bytes calldata receiverAddress, - address destinationOutToken, - bool isDestinationOutETH, - /** - * @dev The minimum amount of tokens that receiverAddress should get, - * if it's not reached, the transaction will revert on the destination chain - */ - uint256 outTokenMinAmount, - uint256 destinationChainId, - uint256 crossChaindestinationGasLimit, - uint deadline - ) external; -} diff --git a/packages/example-contracts/contracts/multi-chain-swap/MultiChainSwapErrors.sol b/packages/example-contracts/contracts/multi-chain-swap/MultiChainSwapErrors.sol deleted file mode 100644 index d980f9ea..00000000 --- a/packages/example-contracts/contracts/multi-chain-swap/MultiChainSwapErrors.sol +++ /dev/null @@ -1,20 +0,0 @@ -// SPDX-License-Identifier: MIT -pragma solidity 0.8.7; - -interface MultiChainSwapErrors { - error ErrorTransferringTokens(address token); - - error ErrorApprovingTokens(address token); - - error ErrorSwappingTokens(); - - error ValueShouldBeGreaterThanZero(); - - error OutTokenInvariant(); - - error InsufficientOutToken(); - - error MissingSourceInputTokenAddress(); - - error InvalidMessageType(); -} diff --git a/packages/example-contracts/contracts/multi-chain-swap/MultiChainSwapTrident.strategy.sol b/packages/example-contracts/contracts/multi-chain-swap/MultiChainSwapTrident.strategy.sol deleted file mode 100644 index 5e6b3eda..00000000 --- a/packages/example-contracts/contracts/multi-chain-swap/MultiChainSwapTrident.strategy.sol +++ /dev/null @@ -1,295 +0,0 @@ -// SPDX-License-Identifier: MIT -pragma solidity 0.8.7; - -import "@openzeppelin/contracts/interfaces/IERC20.sol"; -import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol"; -import "@zetachain/protocol-contracts/contracts/evm/tools/ZetaTokenConsumerTrident.strategy.sol"; - -import "./MultiChainSwapErrors.sol"; -import "./MultiChainSwap.sol"; - -contract MultiChainSwapTrident is MultiChainSwap, ZetaInteractor, MultiChainSwapErrors, ZetaTokenConsumerTrident { - using SafeERC20 for IERC20; - bytes32 public constant CROSS_CHAIN_SWAP_MESSAGE = keccak256("CROSS_CHAIN_SWAP"); - - constructor( - address zetaConnector_, - address zetaToken_, - address uniswapV3Router_, - address WETH9Address_, - address poolFactory_ - ) - ZetaTokenConsumerTrident(zetaToken_, uniswapV3Router_, WETH9Address_, poolFactory_) - ZetaInteractor(zetaConnector_) - {} - - function swapETHForTokensCrossChain( - bytes calldata receiverAddress, - address destinationOutToken, - bool isDestinationOutETH, - /** - * @dev The minimum amount of tokens that receiverAddress should get, - * if it's not reached, the transaction will revert on the destination chain - */ - uint256 outTokenMinAmount, - uint256 destinationChainId, - uint256 crossChaindestinationGasLimit, - uint /* deadline */ - ) external payable override { - _swapETHForTokensCrossChain( - receiverAddress, - destinationOutToken, - isDestinationOutETH, - outTokenMinAmount, - destinationChainId, - crossChaindestinationGasLimit - ); - } - - function _swapETHForTokensCrossChain( - bytes calldata receiverAddress, - address destinationOutToken, - bool isDestinationOutETH, - /** - * @dev The minimum amount of tokens that receiverAddress should get, - * if it's not reached, the transaction will revert on the destination chain - */ - uint256 outTokenMinAmount, - uint256 destinationChainId, - uint256 crossChaindestinationGasLimit - ) internal { - if (!_isValidChainId(destinationChainId)) revert InvalidDestinationChainId(); - - if (msg.value == 0) revert ValueShouldBeGreaterThanZero(); - if ( - (destinationOutToken != address(0) && isDestinationOutETH) || - (destinationOutToken == address(0) && !isDestinationOutETH) - ) revert OutTokenInvariant(); - - uint256 zetaValueAndGas = this.getZetaFromEth{value: msg.value}( - address(this), - 0 /// @todo Add min amount - ); - if (zetaValueAndGas == 0) revert ErrorSwappingTokens(); - - IERC20(zetaToken).safeApprove(address(connector), zetaValueAndGas); - - connector.send( - ZetaInterfaces.SendInput({ - destinationChainId: destinationChainId, - destinationAddress: interactorsByChainId[destinationChainId], - destinationGasLimit: crossChaindestinationGasLimit, - message: abi.encode( - CROSS_CHAIN_SWAP_MESSAGE, - msg.sender, - WETH9Address, - msg.value, - receiverAddress, - destinationOutToken, - isDestinationOutETH, - outTokenMinAmount, - true // inputTokenIsETH - ), - zetaValueAndGas: zetaValueAndGas, - zetaParams: abi.encode("") - }) - ); - } - - function swapTokensForTokensCrossChain( - address sourceInputToken, - uint256 inputTokenAmount, - bytes calldata receiverAddress, - address destinationOutToken, - bool isDestinationOutETH, - /** - * @dev The minimum amount of tokens that receiverAddress should get, - * if it's not reached, the transaction will revert on the destination chain - */ - uint256 outTokenMinAmount, - uint256 destinationChainId, - uint256 crossChaindestinationGasLimit, - uint /* deadline */ - ) external override { - _swapTokensForTokensCrossChain( - sourceInputToken, - inputTokenAmount, - receiverAddress, - destinationOutToken, - isDestinationOutETH, - outTokenMinAmount, - destinationChainId, - crossChaindestinationGasLimit - ); - } - - function _swapTokensForTokensCrossChain( - address sourceInputToken, - uint256 inputTokenAmount, - bytes calldata receiverAddress, - address destinationOutToken, - bool isDestinationOutETH, - /** - * @dev The minimum amount of tokens that receiverAddress should get, - * if it's not reached, the transaction will revert on the destination chain - */ - uint256 outTokenMinAmount, - uint256 destinationChainId, - uint256 crossChaindestinationGasLimit - ) internal { - if (!_isValidChainId(destinationChainId)) revert InvalidDestinationChainId(); - - if (sourceInputToken == address(0)) revert MissingSourceInputTokenAddress(); - if ( - (destinationOutToken != address(0) && isDestinationOutETH) || - (destinationOutToken == address(0) && !isDestinationOutETH) - ) revert OutTokenInvariant(); - - uint256 zetaValueAndGas; - - IERC20(sourceInputToken).safeTransferFrom(msg.sender, address(this), inputTokenAmount); - - if (sourceInputToken == zetaToken) { - zetaValueAndGas = inputTokenAmount; - } else { - IERC20(sourceInputToken).safeApprove(address(this), inputTokenAmount); - zetaValueAndGas = this.getZetaFromToken( - address(this), - 0, /// @todo Add min amount - sourceInputToken, - inputTokenAmount - ); - - if (zetaValueAndGas == 0) revert ErrorSwappingTokens(); - } - - IERC20(zetaToken).safeApprove(address(connector), zetaValueAndGas); - - connector.send( - ZetaInterfaces.SendInput({ - destinationChainId: destinationChainId, - destinationAddress: interactorsByChainId[destinationChainId], - destinationGasLimit: crossChaindestinationGasLimit, - message: abi.encode( - CROSS_CHAIN_SWAP_MESSAGE, - msg.sender, - sourceInputToken, - inputTokenAmount, - receiverAddress, - destinationOutToken, - isDestinationOutETH, - outTokenMinAmount, - false // inputTokenIsETH - ), - zetaValueAndGas: zetaValueAndGas, - zetaParams: abi.encode("") - }) - ); - } - - function onZetaMessage( - ZetaInterfaces.ZetaMessage calldata zetaMessage - ) external override isValidMessageCall(zetaMessage) { - ( - bytes32 messageType, - address sourceTxOrigin, - address sourceInputToken, - uint256 inputTokenAmount, - bytes memory receiverAddressEncoded, - address destinationOutToken, - bool isDestinationOutETH, - uint256 outTokenMinAmount, - - ) = abi.decode(zetaMessage.message, (bytes32, address, address, uint256, bytes, address, bool, uint256, bool)); - if (messageType != CROSS_CHAIN_SWAP_MESSAGE) revert InvalidMessageType(); - - uint256 outTokenFinalAmount; - if (destinationOutToken == zetaToken) { - if (zetaMessage.zetaValue < outTokenMinAmount) revert InsufficientOutToken(); - - IERC20(zetaToken).safeTransfer(address(uint160(bytes20(receiverAddressEncoded))), zetaMessage.zetaValue); - - outTokenFinalAmount = zetaMessage.zetaValue; - } else { - /** - * @dev If the out token is not Zeta, get it using Uniswap - */ - IERC20(zetaToken).safeApprove(address(this), zetaMessage.zetaValue); - - if (isDestinationOutETH) { - outTokenFinalAmount = this.getEthFromZeta( - address(uint160(bytes20(receiverAddressEncoded))), - outTokenMinAmount, - zetaMessage.zetaValue - ); - } else { - outTokenFinalAmount = this.getTokenFromZeta( - address(uint160(bytes20(receiverAddressEncoded))), - outTokenMinAmount, - destinationOutToken, - zetaMessage.zetaValue - ); - } - - if (outTokenFinalAmount == 0) revert ErrorSwappingTokens(); - if (outTokenFinalAmount < outTokenMinAmount) revert InsufficientOutToken(); - } - - emit Swapped( - sourceTxOrigin, - sourceInputToken, - inputTokenAmount, - destinationOutToken, - outTokenFinalAmount, - address(uint160(bytes20(receiverAddressEncoded))) - ); - } - - function onZetaRevert( - ZetaInterfaces.ZetaRevert calldata zetaRevert - ) external override isValidRevertCall(zetaRevert) { - /** - * @dev If something goes wrong we must swap to the source input token - */ - ( - , - address sourceTxOrigin, - address sourceInputToken, - uint256 inputTokenAmount, - , - , - , - , - bool inputTokenIsETH - ) = abi.decode(zetaRevert.message, (bytes32, address, address, uint256, bytes, address, bool, uint256, bool)); - - uint256 inputTokenReturnedAmount; - if (sourceInputToken == zetaToken) { - IERC20(zetaToken).safeApprove(address(this), zetaRevert.remainingZetaValue); - IERC20(zetaToken).safeTransferFrom(address(this), sourceTxOrigin, zetaRevert.remainingZetaValue); - inputTokenReturnedAmount = zetaRevert.remainingZetaValue; - } else { - /** - * @dev If the source input token is not Zeta, trade it using Uniswap - */ - IERC20(zetaToken).safeApprove(address(this), zetaRevert.remainingZetaValue); - - if (inputTokenIsETH) { - inputTokenReturnedAmount = this.getEthFromZeta( - sourceTxOrigin, - 0, /// @todo Add min amount - zetaRevert.remainingZetaValue - ); - } else { - inputTokenReturnedAmount = this.getTokenFromZeta( - sourceTxOrigin, - 0, /// @todo Add min amount - sourceInputToken, - zetaRevert.remainingZetaValue - ); - } - } - - emit RevertedSwap(sourceTxOrigin, sourceInputToken, inputTokenAmount, inputTokenReturnedAmount); - } -} diff --git a/packages/example-contracts/contracts/multi-chain-swap/MultiChainSwapUniV2.strategy.sol b/packages/example-contracts/contracts/multi-chain-swap/MultiChainSwapUniV2.strategy.sol deleted file mode 100644 index 871a7181..00000000 --- a/packages/example-contracts/contracts/multi-chain-swap/MultiChainSwapUniV2.strategy.sol +++ /dev/null @@ -1,357 +0,0 @@ -// SPDX-License-Identifier: MIT -pragma solidity 0.8.7; - -import "@openzeppelin/contracts/interfaces/IERC20.sol"; -import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol"; -import "@uniswap/v2-periphery/contracts/interfaces/IUniswapV2Router02.sol"; - -import "./MultiChainSwapErrors.sol"; -import "./MultiChainSwap.sol"; - -contract MultiChainSwapUniV2 is MultiChainSwap, ZetaInteractor, MultiChainSwapErrors { - using SafeERC20 for IERC20; - uint internal constant MAX_DEADLINE = 200; - bytes32 public constant CROSS_CHAIN_SWAP_MESSAGE = keccak256("CROSS_CHAIN_SWAP"); - - address public immutable uniswapV2RouterAddress; - address internal immutable wETH; - address public immutable zetaToken; - - IUniswapV2Router02 internal uniswapV2Router; - - struct CrossChainCallParams { - address sourceInputToken; - uint256 inputTokenAmount; - bytes receiverAddress; - address destinationOutToken; - bool isDestinationOutETH; - bool inputTokenIsETH; - /** - * @dev The minimum amount of tokens that receiverAddress should get, - * if it's not reached, the transaction will revert on the destination chain - */ - uint256 outTokenMinAmount; - uint256 destinationChainId; - uint256 crossChaindestinationGasLimit; - uint256 zetaValueAndGas; - } - - constructor(address zetaConnector_, address zetaToken_, address uniswapV2Router_) ZetaInteractor(zetaConnector_) { - if (zetaToken_ == address(0) || uniswapV2Router_ == address(0)) revert ZetaCommonErrors.InvalidAddress(); - zetaToken = zetaToken_; - uniswapV2RouterAddress = uniswapV2Router_; - uniswapV2Router = IUniswapV2Router02(uniswapV2Router_); - wETH = uniswapV2Router.WETH(); - } - - function swapETHForTokensCrossChain( - bytes calldata receiverAddress, - address destinationOutToken, - bool isDestinationOutETH, - /** - * @dev The minimum amount of tokens that receiverAddress should get, - * if it's not reached, the transaction will revert on the destination chain - */ - uint256 outTokenMinAmount, - uint256 destinationChainId, - uint256 crossChaindestinationGasLimit, - uint deadline - ) external payable override { - if (!_isValidChainId(destinationChainId)) revert InvalidDestinationChainId(); - if (msg.value == 0) revert ValueShouldBeGreaterThanZero(); - if ( - (destinationOutToken != address(0) && isDestinationOutETH) || - (destinationOutToken == address(0) && !isDestinationOutETH) - ) revert OutTokenInvariant(); - uint256 zetaValueAndGas; - { - address[] memory path = new address[](2); - path[0] = wETH; - path[1] = zetaToken; - uint256[] memory amounts = uniswapV2Router.swapExactETHForTokens{value: msg.value}( - 0, /// @todo Add min amount - path, - address(this), - deadline - ); - zetaValueAndGas = amounts[path.length - 1]; - } - if (zetaValueAndGas == 0) revert ErrorSwappingTokens(); - { - bool success = IERC20(zetaToken).approve(address(connector), zetaValueAndGas); - if (!success) revert ErrorApprovingTokens(zetaToken); - } - - _crossChainCall( - CrossChainCallParams({ - sourceInputToken: wETH, - inputTokenAmount: msg.value, - receiverAddress: receiverAddress, - destinationOutToken: destinationOutToken, - isDestinationOutETH: isDestinationOutETH, - inputTokenIsETH: false, - outTokenMinAmount: outTokenMinAmount, - destinationChainId: destinationChainId, - crossChaindestinationGasLimit: crossChaindestinationGasLimit, - zetaValueAndGas: zetaValueAndGas - }) - ); - } - - function swapTokensForTokensCrossChain( - address sourceInputToken, - uint256 inputTokenAmount, - bytes calldata receiverAddress, - address destinationOutToken, - bool isDestinationOutETH, - /** - * @dev The minimum amount of tokens that receiverAddress should get, - * if it's not reached, the transaction will revert on the destination chain - */ - uint256 outTokenMinAmount, - uint256 destinationChainId, - uint256 crossChaindestinationGasLimit, - uint deadline - ) external override { - if (!_isValidChainId(destinationChainId)) revert InvalidDestinationChainId(); - if (sourceInputToken == address(0)) revert MissingSourceInputTokenAddress(); - if ( - (destinationOutToken != address(0) && isDestinationOutETH) || - (destinationOutToken == address(0) && !isDestinationOutETH) - ) revert OutTokenInvariant(); - uint256 zetaValueAndGas; - if (sourceInputToken == zetaToken) { - bool success1 = IERC20(zetaToken).transferFrom(msg.sender, address(this), inputTokenAmount); - bool success2 = IERC20(zetaToken).approve(address(connector), inputTokenAmount); - if (!success1 || !success2) revert ErrorTransferringTokens(zetaToken); - zetaValueAndGas = inputTokenAmount; - } else { - /** - * @dev If the input token is not Zeta, trade it using Uniswap - */ - { - IERC20(sourceInputToken).safeTransferFrom(msg.sender, address(this), inputTokenAmount); - IERC20(sourceInputToken).safeApprove(uniswapV2RouterAddress, inputTokenAmount); - } - address[] memory path; - if (sourceInputToken == wETH) { - path = new address[](2); - path[0] = wETH; - path[1] = zetaToken; - } else { - path = new address[](3); - path[0] = sourceInputToken; - path[1] = wETH; - path[2] = zetaToken; - } - uint256[] memory amounts = uniswapV2Router.swapExactTokensForTokens( - inputTokenAmount, - 0, /// @todo Add min amount - path, - address(this), - deadline - ); - zetaValueAndGas = amounts[path.length - 1]; - if (zetaValueAndGas == 0) revert ErrorSwappingTokens(); - } - { - bool success = IERC20(zetaToken).approve(address(connector), zetaValueAndGas); - if (!success) revert ErrorApprovingTokens(zetaToken); - } - - _crossChainCall( - CrossChainCallParams({ - sourceInputToken: sourceInputToken, - inputTokenAmount: inputTokenAmount, - receiverAddress: receiverAddress, - destinationOutToken: destinationOutToken, - isDestinationOutETH: isDestinationOutETH, - inputTokenIsETH: false, - outTokenMinAmount: outTokenMinAmount, - destinationChainId: destinationChainId, - crossChaindestinationGasLimit: crossChaindestinationGasLimit, - zetaValueAndGas: zetaValueAndGas - }) - ); - } - - function _crossChainCall(CrossChainCallParams memory params) internal { - connector.send( - ZetaInterfaces.SendInput({ - destinationChainId: params.destinationChainId, - destinationAddress: interactorsByChainId[params.destinationChainId], - destinationGasLimit: params.crossChaindestinationGasLimit, - message: abi.encode( - CROSS_CHAIN_SWAP_MESSAGE, - msg.sender, - params.sourceInputToken, - params.inputTokenAmount, - params.receiverAddress, - params.destinationOutToken, - params.isDestinationOutETH, - params.outTokenMinAmount, - params.inputTokenIsETH - ), - zetaValueAndGas: params.zetaValueAndGas, - zetaParams: abi.encode("") - }) - ); - } - - function onZetaMessage( - ZetaInterfaces.ZetaMessage calldata zetaMessage - ) external override isValidMessageCall(zetaMessage) { - ( - bytes32 messageType, - address sourceTxOrigin, - address sourceInputToken, - uint256 inputTokenAmount, - bytes memory receiverAddressEncoded, - address destinationOutToken, - bool isDestinationOutETH, - uint256 outTokenMinAmount, - - ) = abi.decode(zetaMessage.message, (bytes32, address, address, uint256, bytes, address, bool, uint256, bool)); - - address receiverAddress = address(uint160(bytes20(receiverAddressEncoded))); - - if (messageType != CROSS_CHAIN_SWAP_MESSAGE) revert InvalidMessageType(); - - uint256 outTokenFinalAmount; - if (destinationOutToken == zetaToken) { - if (zetaMessage.zetaValue < outTokenMinAmount) revert InsufficientOutToken(); - - bool success = IERC20(zetaToken).transfer(receiverAddress, zetaMessage.zetaValue); - if (!success) revert ErrorTransferringTokens(zetaToken); - - outTokenFinalAmount = zetaMessage.zetaValue; - } else { - /** - * @dev If the out token is not Zeta, get it using Uniswap - */ - { - bool success = IERC20(zetaToken).approve(uniswapV2RouterAddress, zetaMessage.zetaValue); - if (!success) revert ErrorApprovingTokens(zetaToken); - } - - address[] memory path; - if (destinationOutToken == wETH || isDestinationOutETH) { - path = new address[](2); - path[0] = zetaToken; - path[1] = wETH; - } else { - path = new address[](3); - path[0] = zetaToken; - path[1] = wETH; - path[2] = destinationOutToken; - } - - uint256[] memory amounts; - if (isDestinationOutETH) { - amounts = uniswapV2Router.swapExactTokensForETH( - zetaMessage.zetaValue, - outTokenMinAmount, - path, - receiverAddress, - block.timestamp + MAX_DEADLINE - ); - } else { - amounts = uniswapV2Router.swapExactTokensForTokens( - zetaMessage.zetaValue, - outTokenMinAmount, - path, - receiverAddress, - block.timestamp + MAX_DEADLINE - ); - } - - outTokenFinalAmount = amounts[amounts.length - 1]; - if (outTokenFinalAmount == 0) revert ErrorSwappingTokens(); - if (outTokenFinalAmount < outTokenMinAmount) revert InsufficientOutToken(); - } - - emit Swapped( - sourceTxOrigin, - sourceInputToken, - inputTokenAmount, - destinationOutToken, - outTokenFinalAmount, - receiverAddress - ); - } - - function onZetaRevert( - ZetaInterfaces.ZetaRevert calldata zetaRevert - ) external override isValidRevertCall(zetaRevert) { - /** - * @dev If something goes wrong we must swap to the source input token - */ - ( - , - address sourceTxOrigin, - address sourceInputToken, - uint256 inputTokenAmount, - , - , - , - , - bool inputTokenIsETH - ) = abi.decode(zetaRevert.message, (bytes32, address, address, uint256, bytes, address, bool, uint256, bool)); - - uint256 inputTokenReturnedAmount; - if (sourceInputToken == zetaToken) { - bool success1 = IERC20(zetaToken).approve(address(this), zetaRevert.remainingZetaValue); - bool success2 = IERC20(zetaToken).transferFrom( - address(this), - sourceTxOrigin, - zetaRevert.remainingZetaValue - ); - if (!success1 || !success2) revert ErrorTransferringTokens(zetaToken); - inputTokenReturnedAmount = zetaRevert.remainingZetaValue; - } else { - /** - * @dev If the source input token is not Zeta, trade it using Uniswap - */ - { - bool success = IERC20(zetaToken).approve(uniswapV2RouterAddress, zetaRevert.remainingZetaValue); - if (!success) revert ErrorTransferringTokens(zetaToken); - } - - address[] memory path; - if (sourceInputToken == wETH) { - path = new address[](2); - path[0] = zetaToken; - path[1] = wETH; - } else { - path = new address[](3); - path[0] = zetaToken; - path[1] = wETH; - path[2] = sourceInputToken; - } - { - uint256[] memory amounts; - - if (inputTokenIsETH) { - amounts = uniswapV2Router.swapExactTokensForETH( - zetaRevert.remainingZetaValue, - 0, /// @todo Add min amount - path, - sourceTxOrigin, - block.timestamp + MAX_DEADLINE - ); - } else { - amounts = uniswapV2Router.swapExactTokensForTokens( - zetaRevert.remainingZetaValue, - 0, /// @todo Add min amount - path, - sourceTxOrigin, - block.timestamp + MAX_DEADLINE - ); - } - inputTokenReturnedAmount = amounts[amounts.length - 1]; - } - } - - emit RevertedSwap(sourceTxOrigin, sourceInputToken, inputTokenAmount, inputTokenReturnedAmount); - } -} diff --git a/packages/example-contracts/contracts/multi-chain-swap/MultiChainSwapUniV3.strategy.sol b/packages/example-contracts/contracts/multi-chain-swap/MultiChainSwapUniV3.strategy.sol deleted file mode 100644 index da1f0fc7..00000000 --- a/packages/example-contracts/contracts/multi-chain-swap/MultiChainSwapUniV3.strategy.sol +++ /dev/null @@ -1,304 +0,0 @@ -// SPDX-License-Identifier: MIT -pragma solidity 0.8.7; - -import "@openzeppelin/contracts/interfaces/IERC20.sol"; -import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol"; -import "@zetachain/protocol-contracts/contracts/evm/tools/ZetaTokenConsumerUniV3.strategy.sol"; - -import "./MultiChainSwapErrors.sol"; -import "./MultiChainSwap.sol"; - -contract MultiChainSwapUniV3 is MultiChainSwap, ZetaInteractor, MultiChainSwapErrors, ZetaTokenConsumerUniV3 { - using SafeERC20 for IERC20; - bytes32 public constant CROSS_CHAIN_SWAP_MESSAGE = keccak256("CROSS_CHAIN_SWAP"); - - constructor( - address zetaConnector_, - address zetaToken_, - address uniswapV3Router_, - address uniswapV3Factory_, - address WETH9Address_, - uint24 zetaPoolFee_, - uint24 tokenPoolFee_ - ) - ZetaTokenConsumerUniV3( - zetaToken_, - uniswapV3Router_, - uniswapV3Factory_, - WETH9Address_, - zetaPoolFee_, - tokenPoolFee_ - ) - ZetaInteractor(zetaConnector_) - {} - - function swapETHForTokensCrossChain( - bytes calldata receiverAddress, - address destinationOutToken, - bool isDestinationOutETH, - /** - * @dev The minimum amount of tokens that receiverAddress should get, - * if it's not reached, the transaction will revert on the destination chain - */ - uint256 outTokenMinAmount, - uint256 destinationChainId, - uint256 crossChaindestinationGasLimit, - uint /* deadline */ - ) external payable override { - _swapETHForTokensCrossChain( - receiverAddress, - destinationOutToken, - isDestinationOutETH, - outTokenMinAmount, - destinationChainId, - crossChaindestinationGasLimit - ); - } - - function _swapETHForTokensCrossChain( - bytes calldata receiverAddress, - address destinationOutToken, - bool isDestinationOutETH, - /** - * @dev The minimum amount of tokens that receiverAddress should get, - * if it's not reached, the transaction will revert on the destination chain - */ - uint256 outTokenMinAmount, - uint256 destinationChainId, - uint256 crossChaindestinationGasLimit - ) internal { - if (!_isValidChainId(destinationChainId)) revert InvalidDestinationChainId(); - - if (msg.value == 0) revert ValueShouldBeGreaterThanZero(); - if ( - (destinationOutToken != address(0) && isDestinationOutETH) || - (destinationOutToken == address(0) && !isDestinationOutETH) - ) revert OutTokenInvariant(); - - uint256 zetaValueAndGas = this.getZetaFromEth{value: msg.value}( - address(this), - 0 /// @todo Add min amount - ); - if (zetaValueAndGas == 0) revert ErrorSwappingTokens(); - - IERC20(zetaToken).safeApprove(address(connector), zetaValueAndGas); - - connector.send( - ZetaInterfaces.SendInput({ - destinationChainId: destinationChainId, - destinationAddress: interactorsByChainId[destinationChainId], - destinationGasLimit: crossChaindestinationGasLimit, - message: abi.encode( - CROSS_CHAIN_SWAP_MESSAGE, - msg.sender, - WETH9Address, - msg.value, - receiverAddress, - destinationOutToken, - isDestinationOutETH, - outTokenMinAmount, - true // inputTokenIsETH - ), - zetaValueAndGas: zetaValueAndGas, - zetaParams: abi.encode("") - }) - ); - } - - function swapTokensForTokensCrossChain( - address sourceInputToken, - uint256 inputTokenAmount, - bytes calldata receiverAddress, - address destinationOutToken, - bool isDestinationOutETH, - /** - * @dev The minimum amount of tokens that receiverAddress should get, - * if it's not reached, the transaction will revert on the destination chain - */ - uint256 outTokenMinAmount, - uint256 destinationChainId, - uint256 crossChaindestinationGasLimit, - uint /* deadline */ - ) external override { - _swapTokensForTokensCrossChain( - sourceInputToken, - inputTokenAmount, - receiverAddress, - destinationOutToken, - isDestinationOutETH, - outTokenMinAmount, - destinationChainId, - crossChaindestinationGasLimit - ); - } - - function _swapTokensForTokensCrossChain( - address sourceInputToken, - uint256 inputTokenAmount, - bytes calldata receiverAddress, - address destinationOutToken, - bool isDestinationOutETH, - /** - * @dev The minimum amount of tokens that receiverAddress should get, - * if it's not reached, the transaction will revert on the destination chain - */ - uint256 outTokenMinAmount, - uint256 destinationChainId, - uint256 crossChaindestinationGasLimit - ) internal { - if (!_isValidChainId(destinationChainId)) revert InvalidDestinationChainId(); - - if (sourceInputToken == address(0)) revert MissingSourceInputTokenAddress(); - if ( - (destinationOutToken != address(0) && isDestinationOutETH) || - (destinationOutToken == address(0) && !isDestinationOutETH) - ) revert OutTokenInvariant(); - - uint256 zetaValueAndGas; - - IERC20(sourceInputToken).safeTransferFrom(msg.sender, address(this), inputTokenAmount); - - if (sourceInputToken == zetaToken) { - zetaValueAndGas = inputTokenAmount; - } else { - IERC20(sourceInputToken).safeApprove(address(this), inputTokenAmount); - zetaValueAndGas = this.getZetaFromToken( - address(this), - 0, /// @todo Add min amount - sourceInputToken, - inputTokenAmount - ); - - if (zetaValueAndGas == 0) revert ErrorSwappingTokens(); - } - - IERC20(zetaToken).safeApprove(address(connector), zetaValueAndGas); - - connector.send( - ZetaInterfaces.SendInput({ - destinationChainId: destinationChainId, - destinationAddress: interactorsByChainId[destinationChainId], - destinationGasLimit: crossChaindestinationGasLimit, - message: abi.encode( - CROSS_CHAIN_SWAP_MESSAGE, - msg.sender, - sourceInputToken, - inputTokenAmount, - receiverAddress, - destinationOutToken, - isDestinationOutETH, - outTokenMinAmount, - false // inputTokenIsETH - ), - zetaValueAndGas: zetaValueAndGas, - zetaParams: abi.encode("") - }) - ); - } - - function onZetaMessage( - ZetaInterfaces.ZetaMessage calldata zetaMessage - ) external override isValidMessageCall(zetaMessage) { - ( - bytes32 messageType, - address sourceTxOrigin, - address sourceInputToken, - uint256 inputTokenAmount, - bytes memory receiverAddressEncoded, - address destinationOutToken, - bool isDestinationOutETH, - uint256 outTokenMinAmount, - - ) = abi.decode(zetaMessage.message, (bytes32, address, address, uint256, bytes, address, bool, uint256, bool)); - if (messageType != CROSS_CHAIN_SWAP_MESSAGE) revert InvalidMessageType(); - - uint256 outTokenFinalAmount; - if (destinationOutToken == zetaToken) { - if (zetaMessage.zetaValue < outTokenMinAmount) revert InsufficientOutToken(); - - IERC20(zetaToken).safeTransfer(address(uint160(bytes20(receiverAddressEncoded))), zetaMessage.zetaValue); - - outTokenFinalAmount = zetaMessage.zetaValue; - } else { - /** - * @dev If the out token is not Zeta, get it using Uniswap - */ - IERC20(zetaToken).safeApprove(address(this), zetaMessage.zetaValue); - - if (isDestinationOutETH) { - outTokenFinalAmount = this.getEthFromZeta( - address(uint160(bytes20(receiverAddressEncoded))), - outTokenMinAmount, - zetaMessage.zetaValue - ); - } else { - outTokenFinalAmount = this.getTokenFromZeta( - address(uint160(bytes20(receiverAddressEncoded))), - outTokenMinAmount, - destinationOutToken, - zetaMessage.zetaValue - ); - } - - if (outTokenFinalAmount == 0) revert ErrorSwappingTokens(); - if (outTokenFinalAmount < outTokenMinAmount) revert InsufficientOutToken(); - } - - emit Swapped( - sourceTxOrigin, - sourceInputToken, - inputTokenAmount, - destinationOutToken, - outTokenFinalAmount, - address(uint160(bytes20(receiverAddressEncoded))) - ); - } - - function onZetaRevert( - ZetaInterfaces.ZetaRevert calldata zetaRevert - ) external override isValidRevertCall(zetaRevert) { - /** - * @dev If something goes wrong we must swap to the source input token - */ - ( - , - address sourceTxOrigin, - address sourceInputToken, - uint256 inputTokenAmount, - , - , - , - , - bool inputTokenIsETH - ) = abi.decode(zetaRevert.message, (bytes32, address, address, uint256, bytes, address, bool, uint256, bool)); - - uint256 inputTokenReturnedAmount; - if (sourceInputToken == zetaToken) { - IERC20(zetaToken).safeApprove(address(this), zetaRevert.remainingZetaValue); - IERC20(zetaToken).safeTransferFrom(address(this), sourceTxOrigin, zetaRevert.remainingZetaValue); - inputTokenReturnedAmount = zetaRevert.remainingZetaValue; - } else { - /** - * @dev If the source input token is not Zeta, trade it using Uniswap - */ - IERC20(zetaToken).safeApprove(address(this), zetaRevert.remainingZetaValue); - - if (inputTokenIsETH) { - inputTokenReturnedAmount = this.getEthFromZeta( - sourceTxOrigin, - 0, /// @todo Add min amount - zetaRevert.remainingZetaValue - ); - } else { - inputTokenReturnedAmount = this.getTokenFromZeta( - sourceTxOrigin, - 0, /// @todo Add min amount - sourceInputToken, - zetaRevert.remainingZetaValue - ); - } - } - - emit RevertedSwap(sourceTxOrigin, sourceInputToken, inputTokenAmount, inputTokenReturnedAmount); - } -} diff --git a/packages/example-contracts/contracts/multi-chain-swap/test/MultiChainSwapZetaConnector.sol b/packages/example-contracts/contracts/multi-chain-swap/test/MultiChainSwapZetaConnector.sol deleted file mode 100644 index 795154f6..00000000 --- a/packages/example-contracts/contracts/multi-chain-swap/test/MultiChainSwapZetaConnector.sol +++ /dev/null @@ -1,76 +0,0 @@ -// SPDX-License-Identifier: MIT -pragma solidity 0.8.7; - -import "@openzeppelin/contracts/interfaces/IERC20.sol"; -import "@zetachain/protocol-contracts/contracts/evm/interfaces/ZetaInterfaces.sol"; - -import "../MultiChainSwap.sol"; - -contract MultiChainSwapZetaConnector is ZetaConnector { - address public immutable zetaToken; - - constructor(address zetaToken_) { - if (zetaToken_ == address(0)) revert ZetaCommonErrors.InvalidAddress(); - zetaToken = zetaToken_; - } - - function callOnZetaMessage( - bytes memory zetaTxSenderAddress, - uint256 sourceChainId, - address destinationAddress, - uint256 zetaValue, - bytes calldata message - ) public { - return - MultiChainSwap(payable(destinationAddress)).onZetaMessage( - ZetaInterfaces.ZetaMessage({ - zetaTxSenderAddress: zetaTxSenderAddress, - sourceChainId: sourceChainId, - destinationAddress: destinationAddress, - zetaValue: zetaValue, - message: message - }) - ); - } - - function callOnZetaRevert( - address zetaTxSenderAddress, - uint256 sourceChainId, - uint256 destinationChainId, - bytes calldata destinationAddress, - uint256 remainingZetaValue, - uint256, // destinationGasLimit - bytes calldata message - ) public { - return - MultiChainSwap(payable(zetaTxSenderAddress)).onZetaRevert( - ZetaInterfaces.ZetaRevert({ - zetaTxSenderAddress: zetaTxSenderAddress, - sourceChainId: sourceChainId, - destinationAddress: destinationAddress, - destinationChainId: destinationChainId, - remainingZetaValue: remainingZetaValue, - message: message - }) - ); - } - - function send(ZetaInterfaces.SendInput calldata sendInput) external override { - uint256 sourceChainId = sendInput.destinationChainId == 2 ? 1 : 2; - address dest = address(uint160(bytes20(sendInput.destinationAddress))); - - if (sendInput.zetaValueAndGas > 0) { - bool success = IERC20(zetaToken).transferFrom(msg.sender, dest, sendInput.zetaValueAndGas); - require(success == true, "MultiChainSwap: error transferring token"); - } - - return - callOnZetaMessage( - abi.encodePacked(msg.sender), - sourceChainId, - dest, - sendInput.zetaValueAndGas, - sendInput.message - ); - } -} diff --git a/packages/example-contracts/contracts/shared/ImmutableCreate2Factory.sol b/packages/example-contracts/contracts/shared/ImmutableCreate2Factory.sol deleted file mode 100644 index b97a3210..00000000 --- a/packages/example-contracts/contracts/shared/ImmutableCreate2Factory.sol +++ /dev/null @@ -1,8 +0,0 @@ -// SPDX-License-Identifier: MIT -pragma solidity 0.5.10; - -/** - * @dev Contracts that need to be compiled for testing purposes - */ - -import "@zetachain/protocol-contracts/contracts/evm/tools/ImmutableCreate2Factory.sol"; diff --git a/packages/example-contracts/contracts/shared/TestContracts.sol b/packages/example-contracts/contracts/shared/TestContracts.sol deleted file mode 100644 index 53520a08..00000000 --- a/packages/example-contracts/contracts/shared/TestContracts.sol +++ /dev/null @@ -1,10 +0,0 @@ -// SPDX-License-Identifier: MIT -pragma solidity 0.6.6; - -/** - * @dev Contracts that need to be compiled for testing purposes - */ - -import "@uniswap/v2-core/contracts/interfaces/IUniswapV2Factory.sol"; -import "@uniswap/v2-core/contracts/interfaces/IUniswapV2Pair.sol"; -import "@uniswap/v2-periphery/contracts/UniswapV2Router02.sol"; diff --git a/packages/example-contracts/contracts/shared/ZetaEthMock.sol b/packages/example-contracts/contracts/shared/ZetaEthMock.sol deleted file mode 100644 index 17d9e2eb..00000000 --- a/packages/example-contracts/contracts/shared/ZetaEthMock.sol +++ /dev/null @@ -1,12 +0,0 @@ -// SPDX-License-Identifier: MIT -pragma solidity 0.8.7; - -import "@openzeppelin/contracts/token/ERC20/ERC20.sol"; -import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; -import "@openzeppelin/contracts/utils/Context.sol"; - -contract ZetaEthMock is ERC20("Zeta", "ZETA") { - constructor(uint256 initialSupply) { - _mint(msg.sender, initialSupply * (10**uint256(decimals()))); - } -} diff --git a/packages/example-contracts/contracts/shared/ZetaTestContracts.sol b/packages/example-contracts/contracts/shared/ZetaTestContracts.sol deleted file mode 100644 index c2d645d4..00000000 --- a/packages/example-contracts/contracts/shared/ZetaTestContracts.sol +++ /dev/null @@ -1,8 +0,0 @@ -// SPDX-License-Identifier: MIT -pragma solidity 0.8.7; - -/** - * @dev Contracts that need to be compiled for testing purposes - */ - -import "@zetachain/protocol-contracts/contracts/evm/tools/ZetaTokenConsumerUniV2.strategy.sol"; diff --git a/packages/example-contracts/docs/cross-chain-counter.md b/packages/example-contracts/docs/cross-chain-counter.md deleted file mode 100644 index 13002629..00000000 --- a/packages/example-contracts/docs/cross-chain-counter.md +++ /dev/null @@ -1,5 +0,0 @@ -# Cross Chain Counter - -[![Docs](https://img.shields.io/badge/Zeta%20docs-🔗-43ad51)](https://docs.zetachain.com/develop/examples/cross-chain-counter) - -A simple cross-chain counter using [Zeta Connector](https://docs.zetachain.com/reference/connector). diff --git a/packages/example-contracts/docs/cross-chain-warriors.md b/packages/example-contracts/docs/cross-chain-warriors.md deleted file mode 100644 index 10b35202..00000000 --- a/packages/example-contracts/docs/cross-chain-warriors.md +++ /dev/null @@ -1,20 +0,0 @@ -# Cross Chain Warriors - -[![Docs](https://img.shields.io/badge/Zeta%20docs-🔗-43ad51)](https://docs.zetachain.com/develop/examples/cross-chain-nft) - -A cross-chain NFT collection using [Zeta Connector](https://docs.zetachain.com/reference/connector). - -## Try it in testnet - -The collection is currently deployed to [BSC Testnet](https://testnet.bscscan.com/address/0xa9016FB99846314E0f96f657E5271cFD7919a244) and [Goerli](https://goerli.etherscan.io/address/0xe08f1d23a68231543a595391D82c39BbaFc22470), the contracts are verified so you can use BSCScan and Etherscan to play with them. - -### Doing a cross-chain NFT transfer - -1. Go to the [BSC Testnet contract's write methods](https://testnet.bscscan.com/address/0xa9016FB99846314E0f96f657E5271cFD7919a244#writeContract). -1. Connect with your wallet. -1. Mint an NFT to your address. -1. View the transaction and copy the TokenId. -1. Call the crossChainTransfer method with the receiver address on the other chain and the TokenId you just minted. -1. After the transaction was mined, go to the contract's read methods and call ownerOf TokenId, you should get an `execution reverted` message since the NFT was burnt by the crossChainTransfer. -1. Go to the [Goerli contract's read methods](https://goerli.etherscan.io/address/0xe08f1d23a68231543a595391D82c39BbaFc22470#readContract). -1. Call the ownerOf method with your TokenId, the owner should be the receiver address you used before. *If it's not, note that the cross-chain transfer may take around 1 minute.* diff --git a/packages/example-contracts/hardhat.config.ts b/packages/example-contracts/hardhat.config.ts deleted file mode 100644 index 53562131..00000000 --- a/packages/example-contracts/hardhat.config.ts +++ /dev/null @@ -1,46 +0,0 @@ -import "@nomiclabs/hardhat-etherscan"; -import "@nomiclabs/hardhat-waffle"; -import "@typechain/hardhat"; -import "hardhat-gas-reporter"; -import "solidity-coverage"; -import "tsconfig-paths/register"; - -import { getHardhatConfigNetworks, getHardhatConfigScanners } from "@zetachain/addresses-tools/src/networks"; -import * as dotenv from "dotenv"; -import type { HardhatUserConfig } from "hardhat/types"; - -dotenv.config(); - -const PRIVATE_KEYS = process.env.PRIVATE_KEY !== undefined ? [`0x${process.env.PRIVATE_KEY}`] : []; - -const config: HardhatUserConfig = { - etherscan: { - ...getHardhatConfigScanners(), - }, - gasReporter: { - currency: "USD", - enabled: process.env.REPORT_GAS !== undefined, - }, - networks: { - ...getHardhatConfigNetworks(PRIVATE_KEYS), - }, - solidity: { - compilers: [ - { version: "0.5.10" /** For create2 factory */ }, - { version: "0.6.6" /** For uniswap v2 */ }, - { version: "0.8.7" }, - ], - settings: { - /** - * @see {@link https://smock.readthedocs.io/en/latest/getting-started.html} - */ - outputSelection: { - "*": { - "*": ["storageLayout"], - }, - }, - }, - }, -}; - -export default config; diff --git a/packages/example-contracts/lib/cross-chain-counter/CrossChainCounter.helpers.ts b/packages/example-contracts/lib/cross-chain-counter/CrossChainCounter.helpers.ts deleted file mode 100644 index 804867ed..00000000 --- a/packages/example-contracts/lib/cross-chain-counter/CrossChainCounter.helpers.ts +++ /dev/null @@ -1,62 +0,0 @@ -import assert from "assert"; -import { ethers, network } from "hardhat"; - -import { - CounterZetaConnectorMock, - CounterZetaConnectorMock__factory as CounterZetaConnectorMockFactory, - CrossChainCounter, - CrossChainCounter__factory as CrossChainCounterFactory, -} from "../../typechain-types"; -import { isNetworkName, networkVariables } from "../shared/network.constants"; - -/** - * @description only for testing or local environment - */ -export const deployTestCrossChainCounter = async ({ - zetaConnectorMockAddress, -}: { - zetaConnectorMockAddress: string; -}) => { - const isLocalEnvironment = network.name === "hardhat"; - - assert(isLocalEnvironment, "This function is only intended to be used in the local environment"); - - const Factory = (await ethers.getContractFactory("CrossChainCounter")) as CrossChainCounterFactory; - - const crossChainCounterContract = (await Factory.deploy(zetaConnectorMockAddress)) as CrossChainCounter; - - await crossChainCounterContract.deployed(); - - return crossChainCounterContract; -}; - -export const getCrossChainCounter = async (existingContractAddress?: string) => { - if (!isNetworkName(network.name)) throw new Error("Invalid network name"); - const isGetExistingContract = typeof existingContractAddress !== "undefined"; - - const _networkVariables = networkVariables[network.name]; - - const Factory = (await ethers.getContractFactory("CrossChainCounter")) as CrossChainCounterFactory; - - if (isGetExistingContract) { - console.log("Getting existing CrossChainCounter"); - return Factory.attach(existingContractAddress) as CrossChainCounter; - } - - console.log("Deploying CrossChainCounter"); - const crossChainCounterContract = (await Factory.deploy(_networkVariables.connectorAddress)) as CrossChainCounter; - - await crossChainCounterContract.deployed(); - - return crossChainCounterContract; -}; - -export const deployZetaConnectorMock = async () => { - const Factory = (await ethers.getContractFactory("CounterZetaConnectorMock")) as CounterZetaConnectorMockFactory; - - const zetaConnectorMockContract = (await Factory.deploy()) as CounterZetaConnectorMock; - - await zetaConnectorMockContract.deployed(); - - return zetaConnectorMockContract; -}; diff --git a/packages/example-contracts/lib/cross-chain-message/CrossChainMessage.helpers.ts b/packages/example-contracts/lib/cross-chain-message/CrossChainMessage.helpers.ts deleted file mode 100644 index 47adfbee..00000000 --- a/packages/example-contracts/lib/cross-chain-message/CrossChainMessage.helpers.ts +++ /dev/null @@ -1,61 +0,0 @@ -import assert from "assert"; -import { ContractFactory, ContractReceipt } from "ethers"; -import { ethers, network } from "hardhat"; - -import { - CrossChainMessage, - CrossChainMessage__factory, - CrossChainMessageConnector, - CrossChainMessageConnector__factory, -} from "../../typechain-types"; - -export type GetContractParams = - | { - deployParams: Parameters; - existingContractAddress?: null; - } - | { - deployParams?: null; - existingContractAddress: string; - }; - -/** - * @description only for testing or local environment - */ -export const deployCrossChainMessageMock = async ({ - zetaConnectorMockAddress, - zetaTokenConsumerAddress, - zetaTokenMockAddress, -}: { - zetaConnectorMockAddress: string; - zetaTokenConsumerAddress: string; - zetaTokenMockAddress: string; -}) => { - const isLocalEnvironment = network.name === "hardhat"; - - assert(isLocalEnvironment, "deployCrossChainMessageMock is only intended to be used in the local environment"); - - const Factory = (await ethers.getContractFactory("CrossChainMessage")) as CrossChainMessage__factory; - - const crossChainMessageContract = (await Factory.deploy( - zetaConnectorMockAddress, - zetaTokenMockAddress, - zetaTokenConsumerAddress - )) as CrossChainMessage; - - await crossChainMessageContract.deployed(); - - return crossChainMessageContract; -}; - -export const deployZetaConnectorMock = async () => { - const Factory = (await ethers.getContractFactory( - "CrossChainMessageConnector" - )) as CrossChainMessageConnector__factory; - - const zetaConnectorMockContract = (await Factory.deploy()) as CrossChainMessageConnector; - - await zetaConnectorMockContract.deployed(); - - return zetaConnectorMockContract; -}; diff --git a/packages/example-contracts/lib/cross-chain-warriors/CrossChainWarriors.helpers.ts b/packages/example-contracts/lib/cross-chain-warriors/CrossChainWarriors.helpers.ts deleted file mode 100644 index fecdd595..00000000 --- a/packages/example-contracts/lib/cross-chain-warriors/CrossChainWarriors.helpers.ts +++ /dev/null @@ -1,101 +0,0 @@ -import assert from "assert"; -import { ContractFactory } from "ethers"; -import { ethers, network } from "hardhat"; - -import { - CrossChainWarriors, - CrossChainWarriors__factory as CrossChainWarriorsFactory, - CrossChainWarriorsMock, - CrossChainWarriorsMock__factory as CrossChainWarriorsMockFactory, - CrossChainWarriorsZetaConnectorMock, - CrossChainWarriorsZetaConnectorMock__factory as CrossChainWarriorsZetaConnectorMockFactory -} from "../../typechain-types"; -import { getAddress } from "../shared/address.helpers"; -import { isNetworkName } from "../shared/network.constants"; - -export type GetContractParams = - | { - deployParams: Parameters; - existingContractAddress?: null; - } - | { - deployParams?: null; - existingContractAddress: string; - }; - -/** - * @description only for testing or local environment - */ -export const deployCrossChainWarriorsMock = async ({ - customUseEven, - zetaConnectorMockAddress, - zetaTokenMockAddress, - zetaTokenConsumerAddress -}: { - customUseEven: boolean; - zetaConnectorMockAddress: string; - zetaTokenConsumerAddress: string; - zetaTokenMockAddress: string; -}) => { - const isLocalEnvironment = network.name === "hardhat"; - - assert(isLocalEnvironment, "localDeployCrossChainWarriors is only intended to be used in the local environment"); - - const Factory = (await ethers.getContractFactory("CrossChainWarriorsMock")) as CrossChainWarriorsMockFactory; - - const useEven = customUseEven; - - const crossChainWarriorsContract = (await Factory.deploy( - zetaConnectorMockAddress, - zetaTokenMockAddress, - zetaTokenConsumerAddress, - useEven - )) as CrossChainWarriorsMock; - - await crossChainWarriorsContract.deployed(); - - return crossChainWarriorsContract; -}; - -export const getCrossChainWarriorsArgs = (): [string, string, string, boolean] => [ - getAddress("connector"), - getAddress("zetaToken"), - getAddress("zetaTokenConsumerUniV2"), - network.name === "goerli" -]; - -export const getCrossChainWarriors = async (existingContractAddress?: string) => { - if (!isNetworkName(network.name)) throw new Error("Invalid network name"); - const isGetExistingContract = typeof existingContractAddress !== "undefined"; - - const Factory = (await ethers.getContractFactory("CrossChainWarriors")) as CrossChainWarriorsFactory; - - if (isGetExistingContract) { - console.log("Getting existing Cross Chain Warriors"); - return Factory.attach(existingContractAddress) as CrossChainWarriors; - } - - console.log("Deploying Cross Chain Warriors"); - const crossChainWarriorsContract = (await Factory.deploy( - getCrossChainWarriorsArgs()[0], - getCrossChainWarriorsArgs()[1], - getCrossChainWarriorsArgs()[2], - getCrossChainWarriorsArgs()[3] - )) as CrossChainWarriors; - - await crossChainWarriorsContract.deployed(); - - return crossChainWarriorsContract; -}; - -export const deployZetaConnectorMock = async () => { - const Factory = (await ethers.getContractFactory( - "CrossChainWarriorsZetaConnectorMock" - )) as CrossChainWarriorsZetaConnectorMockFactory; - - const zetaConnectorMockContract = (await Factory.deploy()) as CrossChainWarriorsZetaConnectorMock; - - await zetaConnectorMockContract.deployed(); - - return zetaConnectorMockContract; -}; diff --git a/packages/example-contracts/lib/multi-chain-swap/MultiChainSwap.helpers.ts b/packages/example-contracts/lib/multi-chain-swap/MultiChainSwap.helpers.ts deleted file mode 100644 index 26ce50b0..00000000 --- a/packages/example-contracts/lib/multi-chain-swap/MultiChainSwap.helpers.ts +++ /dev/null @@ -1,35 +0,0 @@ -import { - MultiChainSwapUniV2, - MultiChainSwapUniV2__factory as MultiChainSwapUniV2Factory, - MultiChainSwapUniV3, - MultiChainSwapUniV3__factory as MultiChainSwapUniV3Factory, - MultiChainSwapZetaConnector, - MultiChainSwapZetaConnector__factory -} from "../../typechain-types"; -import { MultiChainSwapTrident } from "../../typechain-types/contracts/multi-chain-swap/MultiChainSwapTrident.strategy.sol"; -import { MultiChainSwapTrident__factory } from "../../typechain-types/factories/contracts/multi-chain-swap/MultiChainSwapTrident.strategy.sol"; -import { getContract, GetContractParams } from "../shared/deploy.helpers"; - -export const getMultiChainSwapUniV2 = async (params: GetContractParams) => - getContract({ - contractName: "MultiChainSwapUniV2", - ...params - }); - -export const getMultiChainSwapUniV3 = async (params: GetContractParams) => - getContract({ - contractName: "MultiChainSwapUniV3", - ...params - }); - -export const getMultiChainSwapTrident = async (params: GetContractParams) => - getContract({ - contractName: "MultiChainSwapTrident", - ...params - }); - -export const getMultiChainSwapZetaConnector = async (zetaToken: string) => - getContract({ - contractName: "MultiChainSwapZetaConnector", - deployParams: [zetaToken] - }); diff --git a/packages/example-contracts/lib/shared/ImmutableCreate2Factory.helpers.ts b/packages/example-contracts/lib/shared/ImmutableCreate2Factory.helpers.ts deleted file mode 100644 index e180e84f..00000000 --- a/packages/example-contracts/lib/shared/ImmutableCreate2Factory.helpers.ts +++ /dev/null @@ -1,75 +0,0 @@ -import { Provider, TransactionReceipt } from "@ethersproject/providers"; -import { ImmutableCreate2Factory__factory } from "@zetachain/interfaces/typechain-types"; -import { ethers, Signer } from "ethers"; - -export const buildBytecode = (constructorTypes: any[], constructorArgs: any[], contractBytecode: string) => - `${contractBytecode}${encodeParams(constructorTypes, constructorArgs).slice(2)}`; - -export const buildCreate2Address = (saltHex: string, byteCode: string, factoryAddress: string) => { - const payload = ethers.utils.keccak256( - `0x${["ff", factoryAddress, saltHex, ethers.utils.keccak256(byteCode)].map((x) => x.replace(/0x/, "")).join("")}` - ); - - return `0x${payload.slice(-40)}`.toLowerCase(); -}; - -export const numberToUint256 = (value: number) => { - const hex = value.toString(16); - return `0x${"0".repeat(64 - hex.length)}${hex}`; -}; - -export const saltToHex = (salt: string, signerAddress: string) => { - let salthex = ethers.utils.formatBytes32String(salt); - return `${signerAddress}${salthex.slice(2)}`.substring(0, salthex.length); -}; - -export const encodeParam = (dataType: any, data: any) => { - const abiCoder = ethers.utils.defaultAbiCoder; - return abiCoder.encode([dataType], [data]); -}; - -export const encodeParams = (dataTypes: any[], data: any[]) => { - const abiCoder = ethers.utils.defaultAbiCoder; - return abiCoder.encode(dataTypes, data); -}; - -export async function deployContractToAddress({ - factoryAddress, - salt, - contractBytecode, - constructorTypes = [] as string[], - constructorArgs = [] as any[], - signer, -}: { - constructorArgs?: any[]; - constructorTypes?: string[]; - contractBytecode: string; - factoryAddress: string; - salt: string; - signer: Signer; -}) { - const factory = ImmutableCreate2Factory__factory.connect(factoryAddress, signer); - - const bytecode = buildBytecode(constructorTypes, constructorArgs, contractBytecode); - - const computedAddr = await factory.findCreate2Address(salt, bytecode); - - const tx = await factory.safeCreate2(salt, bytecode, { - gasLimit: 6000000, - }); - const result = await tx.wait(); - - return { - address: computedAddr as string, - receipt: result as TransactionReceipt, - txHash: result.transactionHash as string, - }; -} - -/** - * Determines if there's a contract deployed on the provided address. - */ -export async function isDeployed(address: string, provider: Provider) { - const code = await provider.getCode(address); - return code.slice(2).length > 0; -} diff --git a/packages/example-contracts/lib/shared/address.helpers.ts b/packages/example-contracts/lib/shared/address.helpers.ts deleted file mode 100644 index d6c498f2..00000000 --- a/packages/example-contracts/lib/shared/address.helpers.ts +++ /dev/null @@ -1,23 +0,0 @@ -import { getAddress as getAddressLib, NetworkName, ZetaAddress, ZetaNetworkName } from "@zetachain/addresses"; -import { network } from "hardhat"; - -const MissingZetaNetworkError = new Error( - "ZETA_NETWORK is not defined, please set the environment variable (e.g.: ZETA_NETWORK=athens )" -); - -export const getAddress = ( - address: ZetaAddress, - { - customNetworkName, - customZetaNetwork - }: { customNetworkName?: NetworkName; customZetaNetwork?: ZetaNetworkName } = {} -): string => { - const { name: _networkName } = network; - const networkName = customNetworkName || _networkName; - - const { ZETA_NETWORK: _ZETA_NETWORK } = process.env; - const zetaNetwork = customZetaNetwork || _ZETA_NETWORK; - - if (!zetaNetwork) throw MissingZetaNetworkError; - return getAddressLib({ address, networkName, zetaNetwork }); -}; diff --git a/packages/example-contracts/lib/shared/deploy.helpers.ts b/packages/example-contracts/lib/shared/deploy.helpers.ts deleted file mode 100644 index 7e78ddf2..00000000 --- a/packages/example-contracts/lib/shared/deploy.helpers.ts +++ /dev/null @@ -1,96 +0,0 @@ -import { NetworkName, ZetaAddress, ZetaNetworkName } from "@zetachain/addresses"; -import { getScanVariable } from "@zetachain/addresses-tools"; -import { execSync } from "child_process"; -import { BaseContract, ContractFactory } from "ethers"; -import { ethers } from "hardhat"; - -import { - ERC20, - ERC20__factory as ERC20Factory, - UniswapV2Router02, - UniswapV2Router02__factory as UniswapV2Router02Factory, - ZetaEthMock, - ZetaEthMock__factory as ZetaEthMockFactory, - ZetaTokenConsumerUniV2, - ZetaTokenConsumerUniV2__factory -} from "../../typechain-types"; -import { getAddress } from "../shared/address.helpers"; - -export type GetContractParams = - | { - deployParams: Parameters; - existingContractAddress?: null; - } - | { - deployParams?: null; - existingContractAddress: string; - }; - -export const getContract = async ({ - contractName, - deployParams, - existingContractAddress -}: GetContractParams & { contractName: string }): Promise => { - const ContractFactory = (await ethers.getContractFactory(contractName)) as Factory; - - const isGetExistingContract = Boolean(existingContractAddress); - if (isGetExistingContract) { - console.log("Getting existing contract from address:", existingContractAddress); - return ContractFactory.attach(existingContractAddress!) as Contract; - } - - const contract = (await ContractFactory.deploy(...deployParams!)) as Contract; - await contract.deployed(); - - return contract; -}; - -export const getErc20 = async (existingContractAddress?: string) => - getContract({ - contractName: "ERC20", - ...(existingContractAddress ? { existingContractAddress } : { deployParams: ["ERC20Mock", "ERC20Mock"] }) - }); - -export const getZetaMock = async () => - getContract({ - contractName: "ZetaEthMock", - deployParams: ["10000000"] - }); - -export const getNow = async () => { - const block = await ethers.provider.getBlock("latest"); - return block.timestamp; -}; - -export const getUniswapV2Router02 = async () => - getContract({ - contractName: "UniswapV2Router02", - existingContractAddress: getAddress("uniswapV2Router02", { - customNetworkName: "eth-mainnet", - customZetaNetwork: "mainnet" - }) - }); - -export const verifyContract = ( - addressName: ZetaAddress, - { - customNetworkName, - customZetaNetwork - }: { customNetworkName?: NetworkName; customZetaNetwork?: ZetaNetworkName } = {} -) => { - const ZETA_NETWORK = process.env.ZETA_NETWORK || customZetaNetwork; - - console.log(`Verifying ${addressName} address on ${ZETA_NETWORK}: ${customNetworkName}.`); - - const command = `ZETA_NETWORK=${ZETA_NETWORK} SCAN_API_KEY=${getScanVariable()} npx hardhat verify --network ${customNetworkName} --constructor-args lib/args/${addressName}.js ${getAddress( - addressName - )}`; - - execSync(command); -}; - -export const deployZetaTokenConsumerUniV2 = async (zetaToken_: string, uniswapV2Router_: string) => - getContract({ - contractName: "ZetaTokenConsumerUniV2", - ...{ deployParams: [zetaToken_, uniswapV2Router_] } - }); diff --git a/packages/example-contracts/lib/shared/network.constants.ts b/packages/example-contracts/lib/shared/network.constants.ts deleted file mode 100644 index 3fd74ad5..00000000 --- a/packages/example-contracts/lib/shared/network.constants.ts +++ /dev/null @@ -1,104 +0,0 @@ -import { NetworkName } from "@zetachain/addresses"; - -type ChainId = 0 | 1 | 5 | 56 | 97 | 1001 | 1337 | 80001; - -export type NetworkVariables = { - chainId: ChainId; - connectorAddress: string; - crossChainId: ChainId; - crossChainName: NetworkName | ""; -}; - -export const networkVariables: Record = { - athens: { - chainId: 0, - connectorAddress: "", - crossChainId: 0, - crossChainName: "" - }, - "bitcoin-test": { - chainId: 0, - connectorAddress: "", - crossChainId: 0, - crossChainName: "" - }, - "bsc-localnet": { - chainId: 0, - connectorAddress: "", - crossChainId: 0, - crossChainName: "" - }, - "bsc-mainnet": { - chainId: 56, - connectorAddress: "", - crossChainId: 1, - crossChainName: "eth-mainnet" - }, - "bsc-testnet": { - chainId: 97, - connectorAddress: "0xE626402550fB921E4a47c11568F89dF3496fbEF0", - crossChainId: 5, - crossChainName: "goerli" - }, - "eth-localnet": { - chainId: 0, - connectorAddress: "", - crossChainId: 0, - crossChainName: "" - }, - "eth-mainnet": { - chainId: 0, - connectorAddress: "", - crossChainId: 0, - crossChainName: "" - }, - goerli: { - chainId: 5, - connectorAddress: "0x68Bc806414e743D88436AEB771Be387A55B4df70", - crossChainId: 97, - crossChainName: "bsc-testnet" - }, - hardhat: { - chainId: 0, - connectorAddress: "", - crossChainId: 0, - crossChainName: "" - }, - "klaytn-baobab": { - chainId: 1001, - connectorAddress: "", - crossChainId: 5, - crossChainName: "goerli" - }, - "klaytn-cypress": { - chainId: 0, - connectorAddress: "", - crossChainId: 0, - crossChainName: "" - }, - "polygon-localnet": { - chainId: 0, - connectorAddress: "", - crossChainId: 0, - crossChainName: "" - }, - "polygon-mumbai": { - chainId: 0, - connectorAddress: "", - crossChainId: 0, - crossChainName: "" - } -}; - -export const isNetworkName = (str: string): str is NetworkName => str in networkVariables; -export const isEthNetworkName = (networkName: string) => - networkName === "eth-localnet" || networkName === "goerli" || networkName === "eth-mainnet"; - -export type AddressConstants = Partial< - Record< - NetworkName, - { - crossChainWarriorsAddress: string; - } - > ->; diff --git a/packages/example-contracts/package.json b/packages/example-contracts/package.json deleted file mode 100644 index 5a207dbd..00000000 --- a/packages/example-contracts/package.json +++ /dev/null @@ -1,42 +0,0 @@ -{ - "name": "@zetachain/example-contracts", - "version": "0.0.1", - "license": "MIT", - "private": true, - "author": "zetachain", - "publishConfig": { - "access": "public", - "registry": "https://registry.npmjs.org/" - }, - "scripts": { - "clean": "npx hardhat clean", - "compile": "npx hardhat compile", - "prepublishOnly": "echo 'This package has no prepublishOnly tasks.'", - "multi-chain-swap:deploy-local": "ZETA_NETWORK=troy EXECUTE_PROGRAMMATICALLY=true npx hardhat run scripts/multi-chain-swap/deploy.ts --network hardhat", - "multi-chain-swap:deploy": "ZETA_NETWORK=athens EXECUTE_PROGRAMMATICALLY=true npx hardhat run scripts/multi-chain-swap/deploy.ts", - "lint:fix": "npm run lint:js:fix && npm run lint:sol:fix", - "lint:js:fix": "eslint --ext .js,.ts . --fix", - "lint:js": "eslint --ext .js,.ts .", - "lint:sol:fix": "prettier --write \"contracts/**/*.sol\"", - "lint:sol": "solhint 'contracts/**/*.sol' && prettier -c 'contracts/**/*.sol'", - "lint": "npm run lint:js && npm run lint:sol", - "test:watch": "echo You need to install `entr` to run this command && find contracts/**/** lib/**/** test/**/** -iname '*.sol' -o -iname '*.ts' | entr -cnr npx hardhat test", - "test": "npx hardhat test", - "tsc:watch": "npx tsc --watch" - }, - "devDependencies": { - "@defi-wonderland/smock": "^2.3.4", - "hardhat-gas-reporter": "^1.0.8", - "solidity-coverage": "^0.7.20", - "tsconfig-paths": "^3.14.1" - }, - "dependencies": { - "@openzeppelin/contracts": "^4.8.3", - "@uniswap/v2-periphery": "1.1.0-beta.0", - "@uniswap/v3-periphery": "1.1.0", - "@zetachain/addresses": "workspace:^", - "@zetachain/addresses-tools": "workspace:^", - "@zetachain/protocol-contracts": "^2.1.0", - "ethers": "5.6.8" - } -} diff --git a/packages/example-contracts/scripts/add-liquidity-uniswap-v2.ts b/packages/example-contracts/scripts/add-liquidity-uniswap-v2.ts deleted file mode 100644 index 668b423e..00000000 --- a/packages/example-contracts/scripts/add-liquidity-uniswap-v2.ts +++ /dev/null @@ -1,114 +0,0 @@ -import { MaxUint256 } from "@ethersproject/constants"; -import { parseUnits } from "@ethersproject/units"; -import { SignerWithAddress } from "@nomiclabs/hardhat-ethers/signers"; -import { BigNumber } from "ethers"; -import { ethers } from "hardhat"; - -import { getAddress } from "../lib/shared/address.helpers"; -import { getContract } from "../lib/shared/deploy.helpers"; -import { - ERC20__factory, - IUniswapV2Factory__factory, - IUniswapV2Pair__factory, - IUniswapV2Router02, - UniswapV2Router02, - UniswapV2Router02__factory -} from "../typechain-types"; - -const UNISWAP_FACTORY_ADDRESS = "0xb7926c0430afb07aa7defde6da862ae0bde767bc"; - -const ZETA_TO_ADD = parseUnits("19000"); -const ETH_TO_ADD = parseUnits("10"); - -interface Pair { - TokenA: string; - TokenB: string; -} - -export const getNow = async () => { - const block = await ethers.provider.getBlock("latest"); - return block.timestamp; -}; - -export const sortPair = (token1: string, token2: string): Pair => { - if (token1 < token2) { - return { TokenA: token1, TokenB: token2 }; - } - return { TokenA: token2, TokenB: token1 }; -}; - -const addZetaEthLiquidity = async ( - zetaTokenAddress: string, - zetaToAdd: BigNumber, - ETHToAdd: BigNumber, - uniswapRouter: IUniswapV2Router02, - deployer: SignerWithAddress -) => { - const ZetaTokenContract = ERC20__factory.connect(zetaTokenAddress, deployer); - - const tx1 = await ZetaTokenContract.approve(uniswapRouter.address, MaxUint256); - await tx1.wait(); - - const tx2 = await uniswapRouter.addLiquidityETH( - ZetaTokenContract.address, - zetaToAdd, - 0, - 0, - deployer.address, - (await getNow()) + 360, - { gasLimit: 10_000_000, value: ETHToAdd } - ); - await tx2.wait(); -}; - -const estimateEthForZeta = async ( - zetaTokenAddress: string, - zetaToAdd: BigNumber, - uniswapRouter: IUniswapV2Router02, - deployer: SignerWithAddress -) => { - const WETH = await uniswapRouter.WETH(); - - const uniswapV2Factory = IUniswapV2Factory__factory.connect(UNISWAP_FACTORY_ADDRESS, deployer); - - const pair = sortPair(zetaTokenAddress, WETH); - - const poolAddress = await uniswapV2Factory.getPair(pair.TokenA, pair.TokenB); - - const pool = IUniswapV2Pair__factory.connect(poolAddress, deployer); - - const reserves = await pool.getReserves(); - const reservesZeta = WETH < zetaTokenAddress ? reserves.reserve0 : reserves.reserve1; - const reservesETH = WETH > zetaTokenAddress ? reserves.reserve0 : reserves.reserve1; - const ETHValue = await uniswapRouter.quote(zetaToAdd, reservesZeta, reservesETH); - - return ETHValue; -}; - -export const getUniswapV2Router02 = async () => - getContract({ - contractName: "UniswapV2Router02", - existingContractAddress: getAddress("uniswapV2Router02") - }); - -async function main() { - const [deployer] = await ethers.getSigners(); - - const zetaTokenAddress = getAddress("zetaToken"); - - const uniswapRouter = await getUniswapV2Router02(); - - let ethToAdd = ETH_TO_ADD; - if (ETH_TO_ADD.isZero()) { - ethToAdd = await estimateEthForZeta(zetaTokenAddress, ZETA_TO_ADD, uniswapRouter, deployer); - } - - await addZetaEthLiquidity(zetaTokenAddress, ZETA_TO_ADD, ethToAdd, uniswapRouter, deployer); -} - -main() - .then(() => process.exit(0)) - .catch(error => { - console.error(error); - process.exit(1); - }); diff --git a/packages/example-contracts/scripts/cross-chain-counter/deploy.ts b/packages/example-contracts/scripts/cross-chain-counter/deploy.ts deleted file mode 100644 index cb097d3d..00000000 --- a/packages/example-contracts/scripts/cross-chain-counter/deploy.ts +++ /dev/null @@ -1,11 +0,0 @@ -// eslint-disable-next-line no-unused-vars -import hardhat from "hardhat"; - -async function main() { - console.log(`Deploying CrossChainCounter...`); -} - -main().catch((error) => { - console.error(error); - process.exit(1); -}); diff --git a/packages/example-contracts/scripts/cross-chain-warriors/deploy.ts b/packages/example-contracts/scripts/cross-chain-warriors/deploy.ts deleted file mode 100644 index ac857da4..00000000 --- a/packages/example-contracts/scripts/cross-chain-warriors/deploy.ts +++ /dev/null @@ -1,30 +0,0 @@ -import { isNetworkName } from "@zetachain/addresses"; -import { saveAddress } from "@zetachain/addresses-tools"; -import { ethers, network } from "hardhat"; - -import { getCrossChainWarriors } from "../../lib/cross-chain-warriors/CrossChainWarriors.helpers"; - -async function main() { - if (!isNetworkName(network.name)) throw new Error("Invalid network name"); - - const crossChainWarriorsContract = await getCrossChainWarriors(); - - console.log("Setting base URI"); - ( - await crossChainWarriorsContract.setBaseURI( - "https://gateway.pinata.cloud/ipfs/QmNRP9kZ2SJXnFnxwvhQbxQHQuXVWVive3JkCNgG6315iH/" - ) - ).wait(); - - const [deployer] = await ethers.getSigners(); - - console.log("Minting"); - await crossChainWarriorsContract.mint(deployer.address); - - saveAddress("crossChainNft", crossChainWarriorsContract.address); -} - -main().catch((error) => { - console.error(error); - process.exit(1); -}); diff --git a/packages/example-contracts/scripts/cross-chain-warriors/deterministic-deploy.ts b/packages/example-contracts/scripts/cross-chain-warriors/deterministic-deploy.ts deleted file mode 100644 index ccb4a045..00000000 --- a/packages/example-contracts/scripts/cross-chain-warriors/deterministic-deploy.ts +++ /dev/null @@ -1,59 +0,0 @@ -import { isNetworkName } from "@zetachain/addresses"; -import { saveAddress } from "@zetachain/addresses-tools"; -import { BigNumber } from "ethers"; -import { ethers, network } from "hardhat"; - -import { getAddress } from "../../lib/shared/address.helpers"; -import { deployContractToAddress, saltToHex } from "../../lib/shared/ImmutableCreate2Factory.helpers"; -import { isEthNetworkName } from "../../lib/shared/network.constants"; -import { CrossChainWarriors__factory } from "../../typechain-types"; - -const DEPLOYER_ADDRESS = process.env.DEPLOYER_ADDRESS ?? ""; -const SALT_NUMBER = "0"; - -export async function deterministicDeployCrossChainNft() { - if (!isNetworkName(network.name)) { - throw new Error(`network.name: ${network.name} isn't supported.`); - } - - const accounts = await ethers.getSigners(); - const [signer] = accounts; - - const saltNumber = SALT_NUMBER; - const saltStr = BigNumber.from(saltNumber).toHexString(); - - const connector = getAddress("connector"); - const zetaToken = getAddress("zetaToken"); - const zetaTokenConsumerUniV2 = getAddress("zetaTokenConsumerUniV2"); - - const immutableCreate2Factory = getAddress("immutableCreate2Factory"); - - const salthex = saltToHex(saltStr, DEPLOYER_ADDRESS); - - const useEven = isEthNetworkName(network.name); - const constructorTypes = ["address", "address", "address", "bool"]; - const constructorArgs = [connector, zetaToken, zetaTokenConsumerUniV2, useEven]; - - const contractBytecode = CrossChainWarriors__factory.bytecode; - - const { address } = await deployContractToAddress({ - constructorArgs, - constructorTypes, - contractBytecode, - factoryAddress: immutableCreate2Factory, - salt: salthex, - signer - }); - - saveAddress("crossChainNft", address); - console.log("Deployed crossChainNft. Address:", address); -} - -if (!process.env.EXECUTE_PROGRAMMATICALLY) { - deterministicDeployCrossChainNft() - .then(() => process.exit(0)) - .catch(error => { - console.error(error); - process.exit(1); - }); -} diff --git a/packages/example-contracts/scripts/cross-chain-warriors/set-cross-chain-data.ts b/packages/example-contracts/scripts/cross-chain-warriors/set-cross-chain-data.ts deleted file mode 100644 index fa10c9de..00000000 --- a/packages/example-contracts/scripts/cross-chain-warriors/set-cross-chain-data.ts +++ /dev/null @@ -1,34 +0,0 @@ -import { ethers, network } from "hardhat"; - -import { getCrossChainWarriors } from "../../lib/cross-chain-warriors/CrossChainWarriors.helpers"; -import { getAddress } from "../../lib/shared/address.helpers"; -import { isNetworkName, networkVariables } from "../../lib/shared/network.constants"; - -async function main() { - if (!isNetworkName(network.name)) throw new Error("Invalid network name"); - - const _networkVariables = networkVariables[network.name]; - - const crossChainWarriorsAddress = getAddress("crossChainNft"); - - const crossChainWarriorsContract = await getCrossChainWarriors(crossChainWarriorsAddress); - - if (_networkVariables.crossChainName === "") throw new Error("Invalid crossChainName"); - - const crossChainAddress = getAddress("crossChainNft", { - customNetworkName: _networkVariables.crossChainName - }); - - const encodedCrossChainAddress = ethers.utils.solidityPack(["address"], [crossChainAddress]); - - console.log("Setting cross-chain data:", _networkVariables.crossChainId, encodedCrossChainAddress); - - await ( - await crossChainWarriorsContract.setInteractorByChainId(_networkVariables.crossChainId, encodedCrossChainAddress) - ).wait(); -} - -main().catch(error => { - console.error(error); - process.exit(1); -}); diff --git a/packages/example-contracts/scripts/cross-chain-warriors/verify-contract.ts b/packages/example-contracts/scripts/cross-chain-warriors/verify-contract.ts deleted file mode 100644 index 2c33ee86..00000000 --- a/packages/example-contracts/scripts/cross-chain-warriors/verify-contract.ts +++ /dev/null @@ -1,18 +0,0 @@ -import hardhat from "hardhat"; - -import { getCrossChainWarriorsArgs } from "../../lib/cross-chain-warriors/CrossChainWarriors.helpers"; -import { getAddress } from "../../lib/shared/address.helpers"; - -async function main() { - await hardhat.run("verify:verify", { - address: getAddress("crossChainNft"), - constructorArguments: getCrossChainWarriorsArgs() - }); -} - -main() - .then(() => process.exit(0)) - .catch(error => { - console.error(error); - process.exit(1); - }); diff --git a/packages/example-contracts/scripts/multi-chain-swap/deploy-multi-chain-swap-trident.ts b/packages/example-contracts/scripts/multi-chain-swap/deploy-multi-chain-swap-trident.ts deleted file mode 100644 index c7a53537..00000000 --- a/packages/example-contracts/scripts/multi-chain-swap/deploy-multi-chain-swap-trident.ts +++ /dev/null @@ -1,33 +0,0 @@ -import { isNetworkName } from "@zetachain/addresses"; -import { saveAddress } from "@zetachain/addresses-tools"; -import { network } from "hardhat"; - -import { getMultiChainSwapTrident } from "../../lib/multi-chain-swap/MultiChainSwap.helpers"; -import { getAddress } from "../../lib/shared/address.helpers"; - -export async function deployMultiChainSwap() { - if (!isNetworkName(network.name) || !network.name) throw new Error("Invalid network name"); - - const CONNECTOR = getAddress("connector"); - - const ZETA_TOKEN = getAddress("zetaToken"); - - const UNI_ROUTER_V3 = getAddress("uniswapV3Router"); - - const WETH = getAddress("weth9"); - - const TRIDENT_POOL_FACTORY = getAddress("tridentPoolFactory"); - - const multiChainSwapContract = await getMultiChainSwapTrident({ - deployParams: [CONNECTOR, ZETA_TOKEN, UNI_ROUTER_V3, WETH, TRIDENT_POOL_FACTORY] - }); - - saveAddress("multiChainSwap", multiChainSwapContract.address); -} - -if (!process.env.EXECUTE_PROGRAMMATICALLY) { - deployMultiChainSwap().catch(error => { - console.error(error); - process.exit(1); - }); -} diff --git a/packages/example-contracts/scripts/multi-chain-swap/deploy-multi-chain-swap-v3.ts b/packages/example-contracts/scripts/multi-chain-swap/deploy-multi-chain-swap-v3.ts deleted file mode 100644 index 6c82f687..00000000 --- a/packages/example-contracts/scripts/multi-chain-swap/deploy-multi-chain-swap-v3.ts +++ /dev/null @@ -1,39 +0,0 @@ -import { isNetworkName } from "@zetachain/addresses"; -import { saveAddress } from "@zetachain/addresses-tools"; -import { network } from "hardhat"; - -import { getMultiChainSwapUniV3 } from "../../lib/multi-chain-swap/MultiChainSwap.helpers"; -import { getAddress } from "../../lib/shared/address.helpers"; -import { GetContractParams } from "../../lib/shared/deploy.helpers"; -import { MultiChainSwapUniV3__factory } from "../../typechain-types"; - -export async function deployMultiChainSwap() { - if (!isNetworkName(network.name) || !network.name) throw new Error("Invalid network name"); - - const CONNECTOR = getAddress("connector"); - - const ZETA_TOKEN = getAddress("zetaToken"); - - const UNI_FACTORY_V3 = getAddress("uniswapV3PoolFactory"); - - const UNI_ROUTER_V3 = getAddress("uniswapV3Router"); - - const WETH = getAddress("weth9"); - - const deployParams: GetContractParams = { - deployParams: [CONNECTOR, ZETA_TOKEN, UNI_ROUTER_V3, UNI_FACTORY_V3, WETH, 500, 3000] - }; - - console.log(deployParams); - - const multiChainSwapContract = await getMultiChainSwapUniV3(deployParams); - - saveAddress("multiChainSwap", multiChainSwapContract.address); -} - -if (!process.env.EXECUTE_PROGRAMMATICALLY) { - deployMultiChainSwap().catch(error => { - console.error(error); - process.exit(1); - }); -} diff --git a/packages/example-contracts/scripts/multi-chain-swap/deploy-multi-chain-swap.ts b/packages/example-contracts/scripts/multi-chain-swap/deploy-multi-chain-swap.ts deleted file mode 100644 index 15adea60..00000000 --- a/packages/example-contracts/scripts/multi-chain-swap/deploy-multi-chain-swap.ts +++ /dev/null @@ -1,24 +0,0 @@ -import { isNetworkName } from "@zetachain/addresses"; -import { saveAddress } from "@zetachain/addresses-tools"; -import { network } from "hardhat"; - -import { getMultiChainSwapUniV2 } from "../../lib/multi-chain-swap/MultiChainSwap.helpers"; -import { getAddress } from "../../lib/shared/address.helpers"; - -export async function deployMultiChainSwap() { - if (!isNetworkName(network.name) || !network.name) throw new Error("Invalid network name"); - console.log([getAddress("connector"), getAddress("zetaToken"), getAddress("uniswapV2Router02")]); - - const multiChainSwapContract = await getMultiChainSwapUniV2({ - deployParams: [getAddress("connector"), getAddress("zetaToken"), getAddress("uniswapV2Router02")] - }); - - saveAddress("multiChainSwap", multiChainSwapContract.address); -} - -if (!process.env.EXECUTE_PROGRAMMATICALLY) { - deployMultiChainSwap().catch(error => { - console.error(error); - process.exit(1); - }); -} diff --git a/packages/example-contracts/scripts/multi-chain-swap/deploy.ts b/packages/example-contracts/scripts/multi-chain-swap/deploy.ts deleted file mode 100644 index c0152840..00000000 --- a/packages/example-contracts/scripts/multi-chain-swap/deploy.ts +++ /dev/null @@ -1,14 +0,0 @@ -import { deployMultiChainSwap } from "./deploy-multi-chain-swap"; -import { setMultiChainSwapCrossChainData } from "./set-cross-chain-data"; - -async function main() { - await deployMultiChainSwap(); - await setMultiChainSwapCrossChainData(); -} - -main() - .then(() => process.exit(0)) - .catch((error) => { - console.error(error); - process.exit(1); - }); diff --git a/packages/example-contracts/scripts/multi-chain-swap/deterministic-deploy.ts b/packages/example-contracts/scripts/multi-chain-swap/deterministic-deploy.ts deleted file mode 100644 index c6728ec4..00000000 --- a/packages/example-contracts/scripts/multi-chain-swap/deterministic-deploy.ts +++ /dev/null @@ -1,59 +0,0 @@ -import { isNetworkName } from "@zetachain/addresses"; -import { saveAddress } from "@zetachain/addresses-tools"; -import { BigNumber } from "ethers"; -import { ethers, network } from "hardhat"; - -import { getAddress } from "../../lib/shared/address.helpers"; -import { deployContractToAddress, saltToHex } from "../../lib/shared/ImmutableCreate2Factory.helpers"; -import { isEthNetworkName } from "../../lib/shared/network.constants"; -import { MultiChainSwapUniV2__factory } from "../../typechain-types"; -import { setMultiChainSwapCrossChainData } from "./set-cross-chain-data"; - -const DEPLOYER_ADDRESS = process.env.DEPLOYER_ADDRESS ?? ""; -const SALT_NUMBER = "0"; - -export async function deterministicDeployMultiChainSwap() { - if (!isNetworkName(network.name)) { - throw new Error(`network.name: ${network.name} isn't supported.`); - } - - const accounts = await ethers.getSigners(); - const [signer] = accounts; - - const saltNumber = SALT_NUMBER; - const saltStr = BigNumber.from(saltNumber).toHexString(); - - const connector = getAddress("connector"); - const zetaToken = getAddress("zetaToken"); - const uniswapV2Router02 = getAddress("uniswapV2Router02"); - - const immutableCreate2Factory = getAddress("immutableCreate2Factory"); - - const salthex = saltToHex(saltStr, DEPLOYER_ADDRESS); - - const constructorTypes = ["address", "address", "address"]; - const constructorArgs = [connector, zetaToken, uniswapV2Router02]; - - const contractBytecode = MultiChainSwapUniV2__factory.bytecode; - - const { address } = await deployContractToAddress({ - constructorArgs, - constructorTypes, - contractBytecode, - factoryAddress: immutableCreate2Factory, - salt: salthex, - signer - }); - - saveAddress("multiChainSwap", address); - console.log("Deployed MultiChainSwap. Address:", address); -} - -if (!process.env.EXECUTE_PROGRAMMATICALLY) { - deterministicDeployMultiChainSwap() - .then(() => process.exit(0)) - .catch(error => { - console.error(error); - process.exit(1); - }); -} diff --git a/packages/example-contracts/scripts/multi-chain-swap/do-cross-chain-swap.ts b/packages/example-contracts/scripts/multi-chain-swap/do-cross-chain-swap.ts deleted file mode 100644 index 9084edc5..00000000 --- a/packages/example-contracts/scripts/multi-chain-swap/do-cross-chain-swap.ts +++ /dev/null @@ -1,42 +0,0 @@ -import { isNetworkName } from "@zetachain/addresses"; -import { parseUnits } from "ethers/lib/utils"; -import { ethers, network } from "hardhat"; - -import { getMultiChainSwapUniV2 } from "../../lib/multi-chain-swap/MultiChainSwap.helpers"; -import { getAddress } from "../../lib/shared/address.helpers"; -import { networkVariables } from "../../lib/shared/network.constants"; - -export async function doCrossChainSwap() { - if (!isNetworkName(network.name)) throw new Error("Invalid network name"); - - const _networkVariables = networkVariables[network.name]; - - if (!_networkVariables.crossChainName) throw new Error("Invalid crossChainName"); - - const multiChainSwapContract = await getMultiChainSwapUniV2({ - existingContractAddress: getAddress("multiChainSwap") - }); - - const [account1] = await ethers.getSigners(); - - await ( - await multiChainSwapContract.swapETHForTokensCrossChain( - ethers.utils.solidityPack(["address"], [account1.address]), - getAddress("zetaToken", { customNetworkName: _networkVariables.crossChainName }), - false, - 0, - _networkVariables.crossChainId, - 1_000_000, - { - value: parseUnits("1") - } - ) - ).wait(); -} - -if (!process.env.EXECUTE_PROGRAMMATICALLY) { - doCrossChainSwap().catch(error => { - console.error(error); - process.exit(1); - }); -} diff --git a/packages/example-contracts/scripts/multi-chain-swap/set-cross-chain-data.ts b/packages/example-contracts/scripts/multi-chain-swap/set-cross-chain-data.ts deleted file mode 100644 index cfffc696..00000000 --- a/packages/example-contracts/scripts/multi-chain-swap/set-cross-chain-data.ts +++ /dev/null @@ -1,47 +0,0 @@ -import { isNetworkName } from "@zetachain/addresses"; -import { ethers, network } from "hardhat"; - -import { getMultiChainSwapUniV2 } from "../../lib/multi-chain-swap/MultiChainSwap.helpers"; -import { getAddress } from "../../lib/shared/address.helpers"; -import { networkVariables } from "../../lib/shared/network.constants"; - -export async function setMultiChainSwapCrossChainData() { - if (!isNetworkName(network.name)) throw new Error("Invalid network name"); - - const _networkVariables = networkVariables[network.name]; - - if (!_networkVariables.crossChainName) throw new Error("Invalid crossChainName"); - - const crossChainMultiChainSwapAddress = getAddress("multiChainSwap"); - - const crossChainMultiChainSwapContract = await getMultiChainSwapUniV2({ - existingContractAddress: crossChainMultiChainSwapAddress - }); - - const crossChainAddress = getAddress("multiChainSwap", { - customNetworkName: _networkVariables.crossChainName - }); - - const encodedCrossChainAddress = ethers.utils.solidityPack(["address"], [crossChainAddress]); - - console.log( - "Setting cross-chain address:", - encodedCrossChainAddress, - "cross-chain id:", - _networkVariables.crossChainId - ); - - await ( - await crossChainMultiChainSwapContract.setInteractorByChainId( - _networkVariables.crossChainId, - encodedCrossChainAddress - ) - ).wait(); -} - -if (!process.env.EXECUTE_PROGRAMMATICALLY) { - setMultiChainSwapCrossChainData().catch(error => { - console.error(error); - process.exit(1); - }); -} diff --git a/packages/example-contracts/scripts/multi-chain-swap/verify-contract.ts b/packages/example-contracts/scripts/multi-chain-swap/verify-contract.ts deleted file mode 100644 index 0db23288..00000000 --- a/packages/example-contracts/scripts/multi-chain-swap/verify-contract.ts +++ /dev/null @@ -1,17 +0,0 @@ -import hardhat from "hardhat"; - -import { getAddress } from "../../lib/shared/address.helpers"; - -async function main() { - await hardhat.run("verify:verify", { - address: getAddress("multiChainSwap"), - constructorArguments: [getAddress("connector"), getAddress("zetaToken"), getAddress("uniswapV2Router02")] - }); -} - -main() - .then(() => process.exit(0)) - .catch(error => { - console.error(error); - process.exit(1); - }); diff --git a/packages/example-contracts/test/CrossChainCounter.spec.ts b/packages/example-contracts/test/CrossChainCounter.spec.ts deleted file mode 100644 index 77480c51..00000000 --- a/packages/example-contracts/test/CrossChainCounter.spec.ts +++ /dev/null @@ -1,112 +0,0 @@ -import { SignerWithAddress } from "@nomiclabs/hardhat-ethers/signers"; -import { expect } from "chai"; -import { ethers } from "hardhat"; - -import { - deployTestCrossChainCounter, - deployZetaConnectorMock -} from "../lib/cross-chain-counter/CrossChainCounter.helpers"; -import { CounterZetaConnectorMock, CrossChainCounter } from "../typechain-types"; - -describe("CrossChainCounter tests", () => { - let crossChainCounterContractA: CrossChainCounter; - const chainAId = 1; - - let crossChainCounterContractB: CrossChainCounter; - const chainBId = 2; - - let zetaConnectorMockContract: CounterZetaConnectorMock; - - let accounts: SignerWithAddress[]; - let deployer: SignerWithAddress; - let deployerAddress: string; - - const encoder = new ethers.utils.AbiCoder(); - - beforeEach(async () => { - zetaConnectorMockContract = await deployZetaConnectorMock(); - crossChainCounterContractA = await deployTestCrossChainCounter({ - zetaConnectorMockAddress: zetaConnectorMockContract.address - }); - crossChainCounterContractB = await deployTestCrossChainCounter({ - zetaConnectorMockAddress: zetaConnectorMockContract.address - }); - - await crossChainCounterContractA.setInteractorByChainId( - chainBId, - ethers.utils.solidityPack(["address"], [crossChainCounterContractB.address]) - ); - await crossChainCounterContractB.setInteractorByChainId( - chainAId, - ethers.utils.solidityPack(["address"], [crossChainCounterContractA.address]) - ); - - accounts = await ethers.getSigners(); - [deployer] = accounts; - deployerAddress = deployer.address; - }); - - describe("crossChainCount", () => { - it("Should revert if the cross chain address wasn't set", async () => { - const unsetContract = await deployTestCrossChainCounter({ - zetaConnectorMockAddress: zetaConnectorMockContract.address - }); - - await expect(unsetContract.crossChainCount(chainAId)).to.be.revertedWith("InvalidDestinationChainId"); - }); - }); - - describe("onZetaMessage", () => { - it("Should revert if the caller is not the Connector contract", async () => { - await expect( - crossChainCounterContractA.onZetaMessage({ - destinationAddress: crossChainCounterContractB.address, - message: encoder.encode(["address"], [deployerAddress]), - sourceChainId: 1, - zetaTxSenderAddress: ethers.utils.solidityPack(["address"], [crossChainCounterContractA.address]), - zetaValue: 0 - }) - ) - .to.be.revertedWith("InvalidCaller") - .withArgs(deployer.address); - }); - - it("Should revert if the cross-chain address doesn't match with the stored one", async () => { - await expect( - zetaConnectorMockContract.callOnZetaMessage( - ethers.utils.solidityPack(["address"], [deployerAddress]), - 1, - crossChainCounterContractB.address, - 0, - encoder.encode(["address"], [zetaConnectorMockContract.address]) - ) - ).to.be.revertedWith("InvalidZetaMessageCall"); - }); - - describe("Given a valid message", () => { - it("Should increment the counter", async () => { - const messageType = await crossChainCounterContractA.CROSS_CHAIN_INCREMENT_MESSAGE(); - - const originalValue = await crossChainCounterContractB.counter(deployerAddress); - expect(originalValue.toNumber()).to.equal(0); - - await ( - await zetaConnectorMockContract.callOnZetaMessage( - ethers.utils.solidityPack(["address"], [crossChainCounterContractA.address]), - 1, - crossChainCounterContractB.address, - 0, - encoder.encode(["bytes32", "address"], [messageType, deployer.address]) - ) - ).wait(); - - const newValue = await crossChainCounterContractB.counter(deployerAddress); - expect(newValue.toNumber()).to.equal(1); - }); - }); - }); - - describe("onZetaRevert", () => { - it("Should work", async () => {}); - }); -}); diff --git a/packages/example-contracts/test/CrossChainMessage.spec.ts b/packages/example-contracts/test/CrossChainMessage.spec.ts deleted file mode 100644 index 9365138e..00000000 --- a/packages/example-contracts/test/CrossChainMessage.spec.ts +++ /dev/null @@ -1,142 +0,0 @@ -import { SignerWithAddress } from "@nomiclabs/hardhat-ethers/signers"; -import { ZetaTokenConsumerUniV2 } from "@zetachain/protocol-contracts/dist/typechain-types"; -import { expect } from "chai"; -import { parseEther } from "ethers/lib/utils"; -import { ethers } from "hardhat"; - -import { - deployCrossChainMessageMock, - deployZetaConnectorMock -} from "../lib/cross-chain-message/CrossChainMessage.helpers"; -import { getAddress } from "../lib/shared/address.helpers"; -import { deployZetaTokenConsumerUniV2, getZetaMock } from "../lib/shared/deploy.helpers"; -import { CrossChainMessage, CrossChainMessageConnector, ZetaEthMock } from "../typechain-types"; -import { addZetaEthLiquidityTest } from "./test.helpers"; - -describe("CrossChainMessage tests", () => { - let zetaConnectorMockContract: CrossChainMessageConnector; - let zetaEthTokenMockContract: ZetaEthMock; - let zetaTokenConsumerUniV2: ZetaTokenConsumerUniV2; - - let crossChainMessageContractChainA: CrossChainMessage; - const chainAId = 1; - - let crossChainMessageContractChainB: CrossChainMessage; - const chainBId = 2; - - let accounts: SignerWithAddress[]; - let deployer: SignerWithAddress; - let deployerAddress: string; - - const SAMPLE_TEXT = "Hello, Cross-Chain World!"; - const encoder = new ethers.utils.AbiCoder(); - - beforeEach(async () => { - accounts = await ethers.getSigners(); - [deployer] = accounts; - deployerAddress = deployer.address; - - zetaEthTokenMockContract = await getZetaMock(); - zetaConnectorMockContract = await deployZetaConnectorMock(); - - const uniswapRouterAddr = getAddress("uniswapV2Router02", { - customNetworkName: "eth-mainnet", - customZetaNetwork: "mainnet" - }); - - await addZetaEthLiquidityTest(zetaEthTokenMockContract.address, parseEther("200000"), parseEther("100"), deployer); - // @dev: guarantee that the account has no zeta balance but still can use the protocol :D - const zetaBalance = await zetaEthTokenMockContract.balanceOf(deployer.address); - await zetaEthTokenMockContract.transfer(accounts[5].address, zetaBalance); - - zetaTokenConsumerUniV2 = await deployZetaTokenConsumerUniV2(zetaEthTokenMockContract.address, uniswapRouterAddr); - - crossChainMessageContractChainA = await deployCrossChainMessageMock({ - zetaConnectorMockAddress: zetaConnectorMockContract.address, - zetaTokenConsumerAddress: zetaTokenConsumerUniV2.address, - zetaTokenMockAddress: zetaEthTokenMockContract.address - }); - - crossChainMessageContractChainB = await deployCrossChainMessageMock({ - zetaConnectorMockAddress: zetaConnectorMockContract.address, - zetaTokenConsumerAddress: zetaTokenConsumerUniV2.address, - zetaTokenMockAddress: zetaEthTokenMockContract.address - }); - - await crossChainMessageContractChainB.setInteractorByChainId( - chainAId, - ethers.utils.solidityPack(["address"], [crossChainMessageContractChainA.address]) - ); - - await crossChainMessageContractChainA.setInteractorByChainId( - chainBId, - ethers.utils.solidityPack(["address"], [crossChainMessageContractChainB.address]) - ); - }); - - describe("sendHelloWorld", () => { - it("Should revert if the cross chain address wasn't set", async () => { - const unsetContract = await deployCrossChainMessageMock({ - zetaConnectorMockAddress: zetaConnectorMockContract.address, - zetaTokenConsumerAddress: zetaTokenConsumerUniV2.address, - zetaTokenMockAddress: zetaEthTokenMockContract.address - }); - - await expect(unsetContract.sendHelloWorld(chainAId)).to.be.revertedWith("InvalidDestinationChainId"); - }); - - it("Should send hello world", async () => { - await expect(crossChainMessageContractChainA.sendHelloWorld(chainBId, { value: parseEther("1") })).to.be.not - .reverted; - }); - }); - - describe("onZetaMessage", () => { - it("Should revert if the caller is not the Connector contract", async () => { - await expect( - crossChainMessageContractChainA.onZetaMessage({ - destinationAddress: crossChainMessageContractChainB.address, - message: encoder.encode(["address", "string"], [deployerAddress, SAMPLE_TEXT]), - sourceChainId: 1, - zetaTxSenderAddress: ethers.utils.solidityPack(["address"], [crossChainMessageContractChainA.address]), - zetaValue: 0 - }) - ) - .to.be.revertedWith("InvalidCaller") - .withArgs(deployer.address); - }); - - it("Should revert if the cross-chain address doesn't match with the stored one", async () => { - await expect( - zetaConnectorMockContract.callOnZetaMessage( - ethers.utils.solidityPack(["address"], [deployerAddress]), - 1, - crossChainMessageContractChainB.address, - 0, - encoder.encode(["address", "string"], [zetaConnectorMockContract.address, SAMPLE_TEXT]) - ) - ).to.be.revertedWith("InvalidZetaMessageCall"); - }); - - describe("Given a valid message", () => { - it("Should emit `HelloWorldEvent`", async () => { - const messageType = await crossChainMessageContractChainA.HELLO_WORLD_MESSAGE_TYPE(); - - const tx = await zetaConnectorMockContract.callOnZetaMessage( - ethers.utils.solidityPack(["address"], [crossChainMessageContractChainA.address]), - 1, - crossChainMessageContractChainB.address, - 0, - encoder.encode(["bytes32", "string"], [messageType, SAMPLE_TEXT]) - ); - - await tx.wait(); - - const helloWorldEventFilter = crossChainMessageContractChainB.filters.HelloWorldEvent(); - const e1 = await crossChainMessageContractChainB.queryFilter(helloWorldEventFilter, tx.blockHash); - expect(e1.length).to.equal(1); - expect(e1[0].transactionHash).to.equal(tx.hash); - }); - }); - }); -}); diff --git a/packages/example-contracts/test/CrossChainWarriors.spec.ts b/packages/example-contracts/test/CrossChainWarriors.spec.ts deleted file mode 100644 index 86343711..00000000 --- a/packages/example-contracts/test/CrossChainWarriors.spec.ts +++ /dev/null @@ -1,304 +0,0 @@ -import { SignerWithAddress } from "@nomiclabs/hardhat-ethers/signers"; -import { expect } from "chai"; -import { parseEther } from "ethers/lib/utils"; -import { ethers } from "hardhat"; - -import { - deployCrossChainWarriorsMock, - deployZetaConnectorMock -} from "../lib/cross-chain-warriors/CrossChainWarriors.helpers"; -import { getAddress } from "../lib/shared/address.helpers"; -import { deployZetaTokenConsumerUniV2, getZetaMock } from "../lib/shared/deploy.helpers"; -import { CrossChainWarriorsMock, CrossChainWarriorsZetaConnectorMock, ZetaEthMock } from "../typechain-types"; -import { ZetaTokenConsumerUniV2 } from "../typechain-types/@zetachain/protocol-contracts/contracts/ZetaTokenConsumerUniV2.strategy.sol"; -import { addZetaEthLiquidityTest, getMintTokenId } from "./test.helpers"; - -describe("CrossChainWarriors tests", () => { - let zetaConnectorMockContract: CrossChainWarriorsZetaConnectorMock; - let zetaEthTokenMockContract: ZetaEthMock; - let zetaTokenConsumerUniV2: ZetaTokenConsumerUniV2; - - let crossChainWarriorsContractChainA: CrossChainWarriorsMock; - const chainAId = 1; - - let crossChainWarriorsContractChainB: CrossChainWarriorsMock; - const chainBId = 2; - - let accounts: SignerWithAddress[]; - let deployer: SignerWithAddress; - let account1: SignerWithAddress; - let deployerAddress: string; - let account1Address: string; - const encoder = new ethers.utils.AbiCoder(); - - beforeEach(async () => { - accounts = await ethers.getSigners(); - [deployer, account1] = accounts; - deployerAddress = deployer.address; - account1Address = account1.address; - - zetaEthTokenMockContract = await getZetaMock(); - zetaConnectorMockContract = await deployZetaConnectorMock(); - - const uniswapRouterAddr = getAddress("uniswapV2Router02", { - customNetworkName: "eth-mainnet", - customZetaNetwork: "mainnet" - }); - - await addZetaEthLiquidityTest(zetaEthTokenMockContract.address, parseEther("200000"), parseEther("100"), deployer); - // @dev: guarantee that the account has no zeta balance but still can use the protocol :D - const zetaBalance = await zetaEthTokenMockContract.balanceOf(deployer.address); - await zetaEthTokenMockContract.transfer(accounts[5].address, zetaBalance); - - zetaTokenConsumerUniV2 = await deployZetaTokenConsumerUniV2(zetaEthTokenMockContract.address, uniswapRouterAddr); - - crossChainWarriorsContractChainA = await deployCrossChainWarriorsMock({ - customUseEven: false, - zetaConnectorMockAddress: zetaConnectorMockContract.address, - zetaTokenConsumerAddress: zetaTokenConsumerUniV2.address, - zetaTokenMockAddress: zetaEthTokenMockContract.address - }); - - crossChainWarriorsContractChainB = await deployCrossChainWarriorsMock({ - customUseEven: true, - zetaConnectorMockAddress: zetaConnectorMockContract.address, - zetaTokenConsumerAddress: zetaTokenConsumerUniV2.address, - zetaTokenMockAddress: zetaEthTokenMockContract.address - }); - - await crossChainWarriorsContractChainB.setInteractorByChainId( - chainAId, - ethers.utils.solidityPack(["address"], [crossChainWarriorsContractChainA.address]) - ); - - await crossChainWarriorsContractChainA.setInteractorByChainId( - chainBId, - ethers.utils.solidityPack(["address"], [crossChainWarriorsContractChainB.address]) - ); - }); - - describe("constructor", () => { - it("Should set the tokenIds counter to 1 when useEven is false", async () => { - expect(await crossChainWarriorsContractChainA.tokenIds()).to.equal(1); - }); - - it("Should set the tokenIds counter to 2 when useEven is true", async () => { - expect(await crossChainWarriorsContractChainB.tokenIds()).to.equal(2); - }); - }); - - describe("mint", () => { - it("Should increment tokenIds by two", async () => { - expect(await crossChainWarriorsContractChainA.tokenIds()).to.equal(1); - - await (await crossChainWarriorsContractChainA.mint(account1Address)).wait(); - - expect(await crossChainWarriorsContractChainA.tokenIds()).to.equal(3); - }); - - it("Should create a new NFT owned by the input address", async () => { - const result = await (await crossChainWarriorsContractChainA.mint(account1Address)).wait(); - - const tokenId = getMintTokenId(result); - - expect(await crossChainWarriorsContractChainA.ownerOf(tokenId)).to.equal(account1Address); - }); - }); - - describe("mintId", () => { - it("Should mint an NFT with the given input id owned by the input address", async () => { - const id = 10; - - await (await crossChainWarriorsContractChainA.mintId(account1Address, id)).wait(); - - expect(await crossChainWarriorsContractChainA.ownerOf(id)).to.equal(account1Address); - }); - }); - - describe("crossChainTransfer", () => { - it("Should revert if the caller is not the NFT owner nor approved", async () => { - const id = 10; - - await (await crossChainWarriorsContractChainA.mintId(account1Address, id)).wait(); - - /** - * The caller is the contract deployer and the NFT owner is account1 - */ - expect( - crossChainWarriorsContractChainA.crossChainTransfer(chainBId, account1Address, id, { value: parseEther("1") }) - ).to.be.revertedWith("Transfer caller is not owner nor approved"); - }); - - it("Should burn the tokenId", async () => { - const id = 10; - - await (await crossChainWarriorsContractChainA.mintId(deployerAddress, id)).wait(); - - expect(await crossChainWarriorsContractChainA.ownerOf(id)).to.equal(deployerAddress); - - await ( - await crossChainWarriorsContractChainA.crossChainTransfer(chainBId, account1Address, id, { - value: parseEther("1") - }) - ).wait(); - - expect(crossChainWarriorsContractChainA.ownerOf(id)).to.be.revertedWith( - "ERC721: owner query for nonexistent token" - ); - }); - - it("Should mint tokenId in the destination chain", async () => { - const id = 10; - - await (await crossChainWarriorsContractChainA.mintId(deployerAddress, id)).wait(); - - await ( - await crossChainWarriorsContractChainA.crossChainTransfer(chainBId, account1Address, id, { - value: parseEther("1") - }) - ).wait(); - - expect(await crossChainWarriorsContractChainB.ownerOf(id)).to.equal(account1Address); - }); - }); - - describe("onZetaMessage", () => { - it("Should revert if the caller is not the Connector contract", async () => { - await expect( - crossChainWarriorsContractChainA.onZetaMessage({ - destinationAddress: crossChainWarriorsContractChainB.address, - message: encoder.encode(["address"], [deployerAddress]), - sourceChainId: 1, - zetaTxSenderAddress: ethers.utils.solidityPack(["address"], [crossChainWarriorsContractChainA.address]), - zetaValue: 0 - }) - ) - .to.be.revertedWith("InvalidCaller") - .withArgs(deployer.address); - }); - - it("Should revert if the cross-chain address doesn't match with the stored one", async () => { - await expect( - zetaConnectorMockContract.callOnZetaMessage( - ethers.utils.solidityPack(["address"], [deployerAddress]), - 1, - crossChainWarriorsContractChainB.address, - 0, - encoder.encode(["address"], [zetaConnectorMockContract.address]) - ) - ).to.be.revertedWith("InvalidZetaMessageCall"); - }); - - it("Should revert if the message type doesn't match with CROSS_CHAIN_TRANSFER_MESSAGE", async () => { - const messageType = await crossChainWarriorsContractChainA.CROSS_CHAIN_TRANSFER_MESSAGE(); - - const invalidMessageType = messageType.replace("9", "8"); - - await expect( - zetaConnectorMockContract.callOnZetaMessage( - ethers.utils.solidityPack(["address"], [crossChainWarriorsContractChainA.address]), - 1, - crossChainWarriorsContractChainB.address, - 0, - encoder.encode( - ["bytes32", "uint256 ", "address", "address"], - [invalidMessageType, 1, deployerAddress, deployerAddress] - ) - ) - ).to.be.revertedWith("InvalidMessageType"); - }); - - it("Should revert if the token already exists", async () => { - const messageType = await crossChainWarriorsContractChainA.CROSS_CHAIN_TRANSFER_MESSAGE(); - - await crossChainWarriorsContractChainB.mintId(deployerAddress, 1); - - await expect( - zetaConnectorMockContract.callOnZetaMessage( - ethers.utils.solidityPack(["address"], [crossChainWarriorsContractChainA.address]), - 1, - crossChainWarriorsContractChainB.address, - 0, - encoder.encode( - ["bytes32", "uint256 ", "address", "address"], - [messageType, 1, deployerAddress, deployerAddress] - ) - ) - ).to.be.revertedWith("ERC721: token already minted"); - }); - - describe("Given a valid input", () => { - it("Should mint a new token in the destination chain", async () => { - const messageType = await crossChainWarriorsContractChainA.CROSS_CHAIN_TRANSFER_MESSAGE(); - - await zetaConnectorMockContract.callOnZetaMessage( - ethers.utils.solidityPack(["address"], [crossChainWarriorsContractChainA.address]), - 1, - crossChainWarriorsContractChainB.address, - 0, - encoder.encode( - ["bytes32", "uint256 ", "address", "address"], - [messageType, 1, deployerAddress, deployerAddress] - ) - ); - - expect(await crossChainWarriorsContractChainB.ownerOf(1)).to.equal(deployerAddress); - }); - - it("Should mint a new token in the destination chain, owned by the provided 'to' address", async () => { - const messageType = await crossChainWarriorsContractChainA.CROSS_CHAIN_TRANSFER_MESSAGE(); - - await zetaConnectorMockContract.callOnZetaMessage( - ethers.utils.solidityPack(["address"], [crossChainWarriorsContractChainA.address]), - 1, - crossChainWarriorsContractChainB.address, - 0, - encoder.encode( - ["bytes32", "uint256 ", "address", "address"], - [messageType, 1, deployerAddress, account1Address] - ) - ); - - expect(await crossChainWarriorsContractChainB.ownerOf(1)).to.equal(account1Address); - }); - }); - }); - - describe("onZetaRevert", () => { - /** - * @description note that given how this test was implemented, the NFT will exist in the two chains - * that's not the real-world behavior but it's ok for this unit test - */ - it("Should give the NFT back to the sourceTxOriginAddress", async () => { - const nftId = 1; - - await (await crossChainWarriorsContractChainA.mintId(deployerAddress, nftId)).wait(); - - await ( - await crossChainWarriorsContractChainA.crossChainTransfer(chainBId, deployerAddress, nftId, { - value: parseEther("1") - }) - ).wait(); - - // Make sure that the NFT was removed from the source chain - await expect(crossChainWarriorsContractChainA.ownerOf(nftId)).to.be.revertedWith("ERC721: invalid token ID"); - - const messageType = await crossChainWarriorsContractChainA.CROSS_CHAIN_TRANSFER_MESSAGE(); - - await zetaConnectorMockContract.callOnZetaRevert( - crossChainWarriorsContractChainA.address, - 1337, - chainBId, - ethers.utils.solidityPack(["address"], [crossChainWarriorsContractChainB.address]), - 0, - 2500000, - encoder.encode( - ["bytes32", "uint256 ", "address", "address"], - [messageType, nftId, deployerAddress, account1Address] - ) - ); - - expect(await crossChainWarriorsContractChainB.ownerOf(nftId)).to.equal(deployerAddress); - }); - }); -}); diff --git a/packages/example-contracts/test/MultiChainSwap.constants.ts b/packages/example-contracts/test/MultiChainSwap.constants.ts deleted file mode 100644 index 34b201ac..00000000 --- a/packages/example-contracts/test/MultiChainSwap.constants.ts +++ /dev/null @@ -1 +0,0 @@ -export const USDC_ADDR = "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48"; diff --git a/packages/example-contracts/test/MultiChainSwap.spec.ts b/packages/example-contracts/test/MultiChainSwap.spec.ts deleted file mode 100644 index 2c27c52f..00000000 --- a/packages/example-contracts/test/MultiChainSwap.spec.ts +++ /dev/null @@ -1,628 +0,0 @@ -import { FakeContract, smock } from "@defi-wonderland/smock"; -import { BigNumber } from "@ethersproject/bignumber"; -import { AddressZero, MaxUint256 } from "@ethersproject/constants"; -import { parseEther, parseUnits } from "@ethersproject/units"; -import { SignerWithAddress } from "@nomiclabs/hardhat-ethers/signers"; -import chai, { expect } from "chai"; -import { ethers } from "hardhat"; - -import { getMultiChainSwapUniV2, getMultiChainSwapZetaConnector } from "../lib/multi-chain-swap/MultiChainSwap.helpers"; -import { getAddress } from "../lib/shared/address.helpers"; -import { getNow, getZetaMock } from "../lib/shared/deploy.helpers"; -import { - ERC20__factory, - IERC20, - IUniswapV2Router02, - MultiChainSwapUniV2, - MultiChainSwapZetaConnector, - UniswapV2Router02__factory -} from "../typechain-types"; -import { USDC_ADDR } from "./MultiChainSwap.constants"; -import { parseUniswapLog, parseZetaLog } from "./test.helpers"; - -chai.should(); -chai.use(smock.matchers); - -const HARDHAT_CHAIN_ID = 1337; - -describe("MultiChainSwap tests", () => { - let uniswapRouterFork: IUniswapV2Router02; - let WETH: string; - let zetaTokenMock: IERC20; - let USDCTokenContract: IERC20; - let zetaConnectorMock: MultiChainSwapZetaConnector; - - let multiChainSwapContractA: MultiChainSwapUniV2; - const chainAId = 1; - - let multiChainSwapContractB: MultiChainSwapUniV2; - const chainBId = 2; - - let zetaConnectorSmock: FakeContract; - let multiChainSwapContractWithSmock: MultiChainSwapUniV2; - - let accounts: SignerWithAddress[]; - let deployer: SignerWithAddress; - let account1: SignerWithAddress; - - const encoder = new ethers.utils.AbiCoder(); - - const ZETA_USDC_PRICE = BigNumber.from("1455462180"); - - const addZetaEthLiquidity = async () => { - const tx1 = await zetaTokenMock.approve(uniswapRouterFork.address, MaxUint256); - await tx1.wait(); - - // 2 ZETA = 1 ETH - const tx2 = await uniswapRouterFork.addLiquidityETH( - zetaTokenMock.address, - parseUnits("1000"), - 0, - 0, - deployer.address, - (await getNow()) + 360, - { value: parseUnits("500") } - ); - await tx2.wait(); - }; - - const clearUSDCBalance = async (account: SignerWithAddress) => { - const balance = await USDCTokenContract.balanceOf(account.address); - const w = ethers.Wallet.createRandom(); - const tx = await USDCTokenContract.connect(account).transfer(w.address, balance); - await tx.wait(); - }; - - const swapZetaToUSDC = async (signer: SignerWithAddress, zetaValueAndGas: BigNumber) => { - const path = [zetaTokenMock.address, WETH, USDC_ADDR]; - const tx = await uniswapRouterFork - .connect(signer) - .swapExactTokensForTokens(zetaValueAndGas, 0, path, signer.address, (await getNow()) + 360); - - await tx.wait(); - }; - - beforeEach(async () => { - const uniswapRouterAddr = getAddress("uniswapV2Router02", { - customNetworkName: "eth-mainnet", - customZetaNetwork: "mainnet" - }); - accounts = await ethers.getSigners(); - [deployer, account1] = accounts; - - const uniswapRouterFactory = new UniswapV2Router02__factory(deployer); - uniswapRouterFork = uniswapRouterFactory.attach(uniswapRouterAddr); - - WETH = await uniswapRouterFork.WETH(); - - zetaTokenMock = await getZetaMock(); - zetaConnectorMock = await getMultiChainSwapZetaConnector(zetaTokenMock.address); - - const ERC20Factory = new ERC20__factory(deployer); - USDCTokenContract = ERC20Factory.attach(USDC_ADDR); - - multiChainSwapContractA = await getMultiChainSwapUniV2({ - deployParams: [zetaConnectorMock.address, zetaTokenMock.address, uniswapRouterAddr] - }); - - multiChainSwapContractB = await getMultiChainSwapUniV2({ - deployParams: [zetaConnectorMock.address, zetaTokenMock.address, uniswapRouterAddr] - }); - - zetaConnectorSmock = await smock.fake("MultiChainSwapZetaConnector"); - multiChainSwapContractWithSmock = await getMultiChainSwapUniV2({ - deployParams: [zetaConnectorSmock.address, zetaTokenMock.address, uniswapRouterAddr] - }); - - const encodedCrossChainAddressB = ethers.utils.solidityPack(["address"], [multiChainSwapContractB.address]); - multiChainSwapContractA.setInteractorByChainId(chainBId, encodedCrossChainAddressB); - multiChainSwapContractWithSmock.setInteractorByChainId(chainBId, encodedCrossChainAddressB); - - const encodedCrossChainAddressA = ethers.utils.solidityPack(["address"], [multiChainSwapContractA.address]); - multiChainSwapContractB.setInteractorByChainId(chainAId, encodedCrossChainAddressA); - - await clearUSDCBalance(deployer); - await clearUSDCBalance(account1); - }); - - describe("swapTokensForTokensCrossChain", () => { - it("Should revert if the destinationChainId is not in the storage", async () => { - await expect( - multiChainSwapContractA.swapETHForTokensCrossChain( - ethers.utils.solidityPack(["address"], [account1.address]), - zetaTokenMock.address, - false, - 0, - 10, - MaxUint256, - MaxUint256, - { - value: parseUnits("1") - } - ) - ).to.be.revertedWith("InvalidDestinationChainId"); - }); - - it("Should revert if the sourceInputToken isn't provided", async () => { - await expect( - multiChainSwapContractA.swapTokensForTokensCrossChain( - AddressZero, - BigNumber.from(10), - ethers.utils.solidityPack(["address"], [account1.address]), - zetaTokenMock.address, - false, - 0, - chainBId, - MaxUint256, - MaxUint256 - ) - ).to.be.revertedWith("MissingSourceInputTokenAddress"); - }); - - it("Should revert if the destinationOutToken isn't provided", async () => { - await expect( - multiChainSwapContractA.swapTokensForTokensCrossChain( - zetaTokenMock.address, - BigNumber.from(10), - ethers.utils.solidityPack(["address"], [account1.address]), - AddressZero, - false, - 0, - chainBId, - MaxUint256, - MaxUint256 - ) - ).to.be.revertedWith("OutTokenInvariant"); - }); - - it("Should not perform any trade if the input token is Zeta", async () => { - await addZetaEthLiquidity(); - await swapZetaToUSDC(deployer, parseUnits("10")); - - expect(await zetaTokenMock.balanceOf(account1.address)).to.be.eq(0); - - const ZETA_TO_TRANSFER = parseUnits("1"); - - const tx1 = await zetaTokenMock.approve(multiChainSwapContractA.address, ZETA_TO_TRANSFER); - await tx1.wait(); - - const tx3 = await USDCTokenContract.approve(multiChainSwapContractA.address, ZETA_USDC_PRICE); - await tx3.wait(); - - const tx2 = await multiChainSwapContractA.swapTokensForTokensCrossChain( - zetaTokenMock.address, - ZETA_USDC_PRICE, - ethers.utils.solidityPack(["address"], [account1.address]), - zetaTokenMock.address, - false, - 0, - chainBId, - MaxUint256, - MaxUint256 - ); - - const result = await tx2.wait(); - const eventNames = parseUniswapLog(result.logs); - expect(eventNames.filter(e => e === "Swap")).to.have.lengthOf(0); - }); - - it("Should trade the input token for Zeta", async () => { - await addZetaEthLiquidity(); - await swapZetaToUSDC(deployer, parseUnits("10")); - - expect(await zetaTokenMock.balanceOf(account1.address)).to.be.eq(0); - - const ZETA_TO_TRANSFER = parseUnits("1"); - - const tx1 = await zetaTokenMock.approve(multiChainSwapContractA.address, ZETA_TO_TRANSFER); - await tx1.wait(); - - const tx3 = await USDCTokenContract.approve(multiChainSwapContractA.address, ZETA_USDC_PRICE); - await tx3.wait(); - - const tx2 = await multiChainSwapContractA.swapTokensForTokensCrossChain( - USDC_ADDR, - ZETA_USDC_PRICE, - ethers.utils.solidityPack(["address"], [account1.address]), - zetaTokenMock.address, - false, - 0, - chainBId, - MaxUint256, - MaxUint256 - ); - - const result = await tx2.wait(); - const eventNames = parseUniswapLog(result.logs); - expect(eventNames.filter(e => e === "Swap")).to.have.lengthOf(2); - }); - - it("Should trade zeta for the output token", async () => { - await addZetaEthLiquidity(); - await swapZetaToUSDC(deployer, parseUnits("10")); - - expect(await zetaTokenMock.balanceOf(account1.address)).to.be.eq(0); - - const ZETA_TO_TRANSFER = parseUnits("1"); - - const tx1 = await zetaTokenMock.approve(multiChainSwapContractA.address, ZETA_TO_TRANSFER); - await tx1.wait(); - - const tx3 = await USDCTokenContract.approve(multiChainSwapContractA.address, ZETA_USDC_PRICE); - await tx3.wait(); - - const tx2 = await multiChainSwapContractA.swapTokensForTokensCrossChain( - zetaTokenMock.address, - ZETA_USDC_PRICE, - ethers.utils.solidityPack(["address"], [account1.address]), - USDC_ADDR, - false, - 0, - chainBId, - MaxUint256, - MaxUint256 - ); - - const result = await tx2.wait(); - const eventNames = parseUniswapLog(result.logs); - expect(eventNames.filter(e => e === "Swap")).to.have.lengthOf(2); - }); - - it("Should trade input token for zeta and zeta for the output token", async () => { - await addZetaEthLiquidity(); - await swapZetaToUSDC(deployer, parseUnits("10")); - - expect(await zetaTokenMock.balanceOf(account1.address)).to.be.eq(0); - - const ZETA_TO_TRANSFER = parseUnits("1"); - - const tx1 = await zetaTokenMock.approve(multiChainSwapContractA.address, ZETA_TO_TRANSFER); - await tx1.wait(); - - const tx3 = await USDCTokenContract.approve(multiChainSwapContractA.address, ZETA_USDC_PRICE); - await tx3.wait(); - - const tx2 = await multiChainSwapContractA.swapTokensForTokensCrossChain( - USDC_ADDR, - ZETA_USDC_PRICE, - ethers.utils.solidityPack(["address"], [account1.address]), - USDC_ADDR, - false, - 0, - chainBId, - MaxUint256, - MaxUint256 - ); - - const result = await tx2.wait(); - const eventNames = parseUniswapLog(result.logs); - expect(eventNames.filter(e => e === "Swap")).to.have.lengthOf(4); - }); - - it("Should call connector.send", async () => { - await addZetaEthLiquidity(); - await swapZetaToUSDC(deployer, parseUnits("10")); - - expect(await zetaTokenMock.balanceOf(account1.address)).to.be.eq(0); - - const ZETA_TO_TRANSFER = parseUnits("1"); - - const tx1 = await zetaTokenMock.approve(multiChainSwapContractWithSmock.address, ZETA_TO_TRANSFER); - await tx1.wait(); - - const tx3 = await USDCTokenContract.approve(multiChainSwapContractWithSmock.address, ZETA_USDC_PRICE); - await tx3.wait(); - - const tx2 = await multiChainSwapContractWithSmock.swapTokensForTokensCrossChain( - USDC_ADDR, - ZETA_USDC_PRICE, - ethers.utils.solidityPack(["address"], [account1.address]), - USDC_ADDR, - false, - 0, - chainBId, - MaxUint256, - MaxUint256 - ); - - zetaConnectorSmock.send.atCall(0).should.be.called; - }); - - it("Should emit a SentTokenSwap event", async () => { - await addZetaEthLiquidity(); - await swapZetaToUSDC(deployer, parseUnits("10")); - - const originAddressInitialZetaBalance = await zetaTokenMock.balanceOf(deployer.address); - expect(await zetaTokenMock.balanceOf(account1.address)).to.be.eq(0); - - const ZETA_TO_TRANSFER = parseUnits("1"); - - const tx1 = await zetaTokenMock.approve(multiChainSwapContractA.address, ZETA_TO_TRANSFER); - await tx1.wait(); - - const tx3 = await USDCTokenContract.approve(multiChainSwapContractA.address, ZETA_USDC_PRICE); - await tx3.wait(); - - const tx2 = await multiChainSwapContractA.swapTokensForTokensCrossChain( - USDC_ADDR, - ZETA_USDC_PRICE, - ethers.utils.solidityPack(["address"], [account1.address]), - USDC_ADDR, - false, - 0, - chainBId, - MaxUint256, - MaxUint256 - ); - - const result = await tx2.wait(); - const eventNames = parseZetaLog(result.logs); - - expect(eventNames.filter(e => e === "Swapped")).to.have.lengthOf(1); - }); - - it("Should revert if the destinationChainId is not in the storage", async () => { - const call = multiChainSwapContractA.swapTokensForTokensCrossChain( - USDC_ADDR, - ZETA_USDC_PRICE, - ethers.utils.solidityPack(["address"], [account1.address]), - USDC_ADDR, - false, - 0, - chainBId + 5, - MaxUint256, - MaxUint256 - ); - - await expect(call).to.be.revertedWith("InvalidDestinationChainId"); - }); - - it("Should revert if the sourceInputToken isn't provided", async () => { - const call = multiChainSwapContractA.swapTokensForTokensCrossChain( - AddressZero, - ZETA_USDC_PRICE, - ethers.utils.solidityPack(["address"], [account1.address]), - USDC_ADDR, - false, - 0, - chainBId, - MaxUint256, - MaxUint256 - ); - - await expect(call).to.be.revertedWith("MissingSourceInputTokenAddress"); - }); - - it("Should revert if the destinationOutToken isn't provided", async () => { - const call = multiChainSwapContractA.swapTokensForTokensCrossChain( - USDC_ADDR, - ZETA_USDC_PRICE, - ethers.utils.solidityPack(["address"], [account1.address]), - AddressZero, - false, - 0, - chainBId, - MaxUint256, - MaxUint256 - ); - - await expect(call).to.be.revertedWith("OutTokenInvariant"); - }); - }); - - describe("onZetaMessage", () => { - it("Should revert if the caller is not ZetaConnector", async () => { - await expect( - multiChainSwapContractA.onZetaMessage({ - destinationAddress: multiChainSwapContractB.address, - message: encoder.encode(["address"], [multiChainSwapContractA.address]), - sourceChainId: chainBId, - zetaTxSenderAddress: ethers.utils.solidityPack(["address"], [multiChainSwapContractA.address]), - zetaValue: 0 - }) - ) - .to.be.revertedWith("InvalidCaller") - .withArgs(deployer.address); - }); - - it("Should revert if the zetaTxSenderAddress it not in interactorsByChainId", async () => { - await expect( - zetaConnectorMock.callOnZetaMessage( - ethers.utils.solidityPack(["address"], [multiChainSwapContractB.address]), - chainAId, - multiChainSwapContractB.address, - 0, - encoder.encode(["address"], [multiChainSwapContractB.address]) - ) - ).to.be.revertedWith("InvalidZetaMessageCall"); - }); - }); - - describe("onZetaRevert", () => { - it("Should revert if the caller is not ZetaConnector", async () => { - await expect( - multiChainSwapContractA.onZetaRevert({ - destinationAddress: ethers.utils.solidityPack(["address"], [multiChainSwapContractB.address]), - destinationChainId: chainBId, - message: encoder.encode(["address"], [multiChainSwapContractA.address]), - remainingZetaValue: 0, - sourceChainId: chainAId, - zetaTxSenderAddress: deployer.address - }) - ) - .to.be.revertedWith("InvalidCaller") - .withArgs(deployer.address); - }); - - it("Should trade the returned Zeta back for the input zeta token", async () => { - await addZetaEthLiquidity(); - await swapZetaToUSDC(deployer, parseUnits("10")); - - const tx1 = await zetaTokenMock.transfer(multiChainSwapContractA.address, parseUnits("100")); - await tx1.wait(); - - const originAddressInitialZetaBalance = await zetaTokenMock.balanceOf(deployer.address); - - const message = encoder.encode( - ["bytes32", "address", "address", "uint256", "bytes", "address", "bool", "uint256", "bool"], - [ - "0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff", - deployer.address, - zetaTokenMock.address, - 0, - "0xffffffff", - multiChainSwapContractA.address, - true, - 0, - false - ] - ); - - const tx2 = await zetaConnectorMock.callOnZetaRevert( - multiChainSwapContractA.address, - HARDHAT_CHAIN_ID, - chainBId, - encoder.encode(["address"], [multiChainSwapContractB.address]), - 10, - 0, - message - ); - - await tx2.wait(); - - const originAddressFinalZetaBalance = await zetaTokenMock.balanceOf(deployer.address); - expect(originAddressFinalZetaBalance).to.be.eq(originAddressInitialZetaBalance.add(10)); - }); - - it("Should trade the returned Zeta back for the input token", async () => { - await addZetaEthLiquidity(); - await swapZetaToUSDC(deployer, parseUnits("10")); - - const tx1 = await zetaTokenMock.transfer(multiChainSwapContractA.address, parseUnits("100")); - await tx1.wait(); - - const originAddressInitialUSDCBalance = await USDCTokenContract.balanceOf(deployer.address); - - const message = encoder.encode( - ["bytes32", "address", "address", "uint256", "bytes", "address", "bool", "uint256", "bool"], - [ - "0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff", - deployer.address, - USDCTokenContract.address, - 0, - "0xffffffff", - multiChainSwapContractA.address, - true, - 0, - false - ] - ); - - const tx2 = await zetaConnectorMock.callOnZetaRevert( - multiChainSwapContractA.address, - HARDHAT_CHAIN_ID, - chainBId, - encoder.encode(["address"], [multiChainSwapContractB.address]), - parseUnits("1"), - 0, - message - ); - - await tx2.wait(); - - const originAddressFinalUSDCBalance = await USDCTokenContract.balanceOf(deployer.address); - expect(originAddressFinalUSDCBalance).to.be.lt(originAddressInitialUSDCBalance.add(ZETA_USDC_PRICE)); - expect(originAddressFinalUSDCBalance).to.be.gt( - originAddressInitialUSDCBalance - .add(ZETA_USDC_PRICE) - .mul(995) - .div(1000) - ); - }); - - it("Should trade the returned ETH back to the caller", async () => { - await addZetaEthLiquidity(); - await swapZetaToUSDC(deployer, parseUnits("10")); - - const tx1 = await zetaTokenMock.transfer(multiChainSwapContractA.address, parseUnits("100")); - await tx1.wait(); - - const originAddressInitialETHBalance = await ethers.provider.getBalance(deployer.address); - - const message = encoder.encode( - ["bytes32", "address", "address", "uint256", "bytes", "address", "bool", "uint256", "bool"], - [ - "0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff", - deployer.address, - WETH, - 0, - "0xffffffff", - multiChainSwapContractA.address, - true, - 0, - true - ] - ); - - const tx2 = await zetaConnectorMock.callOnZetaRevert( - multiChainSwapContractA.address, - HARDHAT_CHAIN_ID, - chainBId, - encoder.encode(["address"], [multiChainSwapContractB.address]), - parseUnits("2"), - 0, - message - ); - - await tx2.wait(); - - const originAddressFinalETHBalance = await ethers.provider.getBalance(deployer.address); - expect(originAddressFinalETHBalance).to.be.gt(originAddressInitialETHBalance.add("1")); - expect(originAddressFinalETHBalance).to.be.lt( - originAddressInitialETHBalance - .add("1") - .mul(1005) - .div(1000) - ); - }); - - it("Should emit a RevertedSwap event", async () => { - await addZetaEthLiquidity(); - await swapZetaToUSDC(deployer, parseUnits("10")); - - const tx1 = await zetaTokenMock.transfer(multiChainSwapContractA.address, parseUnits("100")); - await tx1.wait(); - - const originAddressInitialETHBalance = await ethers.provider.getBalance(deployer.address); - - const message = encoder.encode( - ["bytes32", "address", "address", "uint256", "bytes", "address", "bool", "uint256", "bool"], - [ - "0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff", - deployer.address, - WETH, - 0, - "0xffffffff", - multiChainSwapContractA.address, - true, - 0, - true - ] - ); - - const tx2 = await zetaConnectorMock.callOnZetaRevert( - multiChainSwapContractA.address, - HARDHAT_CHAIN_ID, - chainBId, - encoder.encode(["address"], [multiChainSwapContractB.address]), - parseUnits("2"), - 0, - message - ); - - const result = await tx2.wait(); - const eventNames = parseZetaLog(result.logs); - expect(eventNames.filter(e => e === "RevertedSwap")).to.have.lengthOf(1); - }); - }); -}); diff --git a/packages/example-contracts/test/MultiChainSwapUniswapV3.spec.ts b/packages/example-contracts/test/MultiChainSwapUniswapV3.spec.ts deleted file mode 100644 index 7e88e2f9..00000000 --- a/packages/example-contracts/test/MultiChainSwapUniswapV3.spec.ts +++ /dev/null @@ -1,667 +0,0 @@ -import { FakeContract, smock } from "@defi-wonderland/smock"; -import { BigNumber } from "@ethersproject/bignumber"; -import { AddressZero, MaxUint256 } from "@ethersproject/constants"; -import { parseEther, parseUnits } from "@ethersproject/units"; -import { SignerWithAddress } from "@nomiclabs/hardhat-ethers/signers"; -import chai, { expect } from "chai"; -import { ethers } from "hardhat"; - -import { getMultiChainSwapUniV3, getMultiChainSwapZetaConnector } from "../lib/multi-chain-swap/MultiChainSwap.helpers"; -import { getAddress } from "../lib/shared/address.helpers"; -import { getNow } from "../lib/shared/deploy.helpers"; -import { - ERC20__factory, - IERC20, - IERC20__factory, - MultiChainSwapUniV3, - MultiChainSwapZetaConnector, - UniswapV2Router02__factory -} from "../typechain-types"; -import { parseInteractorLog } from "./test.helpers"; - -chai.should(); -chai.use(smock.matchers); - -const swapToken = async (signer: SignerWithAddress, tokenAddress: string, expectedAmount: BigNumber) => { - const uniswapV2RouterAddr = getAddress("uniswapV2Router02", { - customNetworkName: "eth-mainnet", - customZetaNetwork: "mainnet" - }); - - const uniswapRouter = UniswapV2Router02__factory.connect(uniswapV2RouterAddr, signer); - - const WETH = await uniswapRouter.WETH(); - const path = [WETH, tokenAddress]; - const tx = await uniswapRouter - .connect(signer) - .swapETHForExactTokens(expectedAmount, path, signer.address, (await getNow()) + 360, { value: parseEther("10") }); - - await tx.wait(); -}; - -const encoder = new ethers.utils.AbiCoder(); -const HARDHAT_CHAIN_ID = 1337; - -const ZETA_TO_TRANSFER = parseUnits("1"); -const USDC_TO_TRANSFER = parseUnits("1", 6); - -describe("MultiChainSwap tests", () => { - let WETH: string; - let zetaTokenMock: IERC20; - let zetaTokenNonEthAddress: string; - let USDCTokenContract: IERC20; - let zetaConnectorMock: MultiChainSwapZetaConnector; - - let multiChainSwapContractA: MultiChainSwapUniV3; - const chainAId = 1; - - let multiChainSwapContractB: MultiChainSwapUniV3; - const chainBId = 2; - - let zetaConnectorSmock: FakeContract; - let multiChainSwapContractWithSmock: MultiChainSwapUniV3; - - let accounts: SignerWithAddress[]; - let deployer: SignerWithAddress; - let account1: SignerWithAddress; - - const clearUSDCBalance = async (account: SignerWithAddress) => { - const balance = await USDCTokenContract.balanceOf(account.address); - const w = ethers.Wallet.createRandom(); - const tx = await USDCTokenContract.connect(account).transfer(w.address, balance); - await tx.wait(); - }; - - const clearZetaBalance = async (account: SignerWithAddress) => { - const balance = await zetaTokenMock.balanceOf(account.address); - const w = ethers.Wallet.createRandom(); - const tx = await zetaTokenMock.connect(account).transfer(w.address, balance); - await tx.wait(); - }; - - beforeEach(async () => { - accounts = await ethers.getSigners(); - [deployer, account1] = accounts; - - const DAI = getAddress("dai", { - customNetworkName: "eth-mainnet", - customZetaNetwork: "mainnet" - }); - - const UNI_QUOTER_V3 = getAddress("uniswapV3Quoter", { - customNetworkName: "eth-mainnet", - customZetaNetwork: "mainnet" - }); - - const UNI_ROUTER_V3 = getAddress("uniswapV3Router", { - customNetworkName: "eth-mainnet", - customZetaNetwork: "mainnet" - }); - - WETH = getAddress("weth9", { - customNetworkName: "eth-mainnet", - customZetaNetwork: "mainnet" - }); - - const USDC_ADDR = getAddress("usdc", { - customNetworkName: "eth-mainnet", - customZetaNetwork: "mainnet" - }); - - const ERC20Factory = new ERC20__factory(deployer); - USDCTokenContract = ERC20Factory.attach(USDC_ADDR); - - // For testing purposes we use an existing uni v3 pool - await swapToken(deployer, DAI, parseEther("10000")); - - zetaTokenNonEthAddress = DAI; - zetaTokenMock = IERC20__factory.connect(zetaTokenNonEthAddress, deployer); - zetaConnectorMock = await getMultiChainSwapZetaConnector(zetaTokenMock.address); - multiChainSwapContractA = await getMultiChainSwapUniV3({ - deployParams: [zetaConnectorMock.address, zetaTokenNonEthAddress, UNI_ROUTER_V3, UNI_QUOTER_V3, WETH, 3000, 3000] - }); - - multiChainSwapContractB = await getMultiChainSwapUniV3({ - deployParams: [zetaConnectorMock.address, zetaTokenNonEthAddress, UNI_ROUTER_V3, UNI_QUOTER_V3, WETH, 3000, 3000] - }); - - zetaConnectorSmock = await smock.fake("MultiChainSwapZetaConnector"); - multiChainSwapContractWithSmock = await getMultiChainSwapUniV3({ - deployParams: [zetaConnectorSmock.address, zetaTokenNonEthAddress, UNI_ROUTER_V3, UNI_QUOTER_V3, WETH, 3000, 3000] - }); - - const encodedCrossChainAddressB = ethers.utils.solidityPack(["address"], [multiChainSwapContractB.address]); - multiChainSwapContractA.setInteractorByChainId(chainBId, encodedCrossChainAddressB); - - const encodedCrossChainAddressA = ethers.utils.solidityPack(["address"], [multiChainSwapContractA.address]); - multiChainSwapContractB.setInteractorByChainId(chainAId, encodedCrossChainAddressA); - - multiChainSwapContractWithSmock.setInteractorByChainId(chainBId, encodedCrossChainAddressB); - - await clearUSDCBalance(deployer); - await clearUSDCBalance(account1); - await clearZetaBalance(account1); - }); - - describe("swapTokensForTokensCrossChainUniswapV3", () => { - it("Should revert if the destinationChainId is not in the storage", async () => { - await expect( - multiChainSwapContractA.swapETHForTokensCrossChain( - ethers.utils.solidityPack(["address"], [account1.address]), - zetaTokenMock.address, - false, - 0, - 10, - MaxUint256, - MaxUint256, - { - value: parseUnits("1") - } - ) - ).to.be.revertedWith("InvalidDestinationChainId"); - }); - - it("Should revert if the sourceInputToken isn't provided", async () => { - await expect( - multiChainSwapContractA.swapTokensForTokensCrossChain( - AddressZero, - BigNumber.from(10), - ethers.utils.solidityPack(["address"], [account1.address]), - zetaTokenMock.address, - false, - 0, - chainBId, - MaxUint256, - MaxUint256 - ) - ).to.be.revertedWith("MissingSourceInputTokenAddress"); - }); - - it("Should revert if the destinationOutToken isn't provided", async () => { - await expect( - multiChainSwapContractA.swapTokensForTokensCrossChain( - zetaTokenMock.address, - BigNumber.from(10), - ethers.utils.solidityPack(["address"], [account1.address]), - AddressZero, - false, - 0, - chainBId, - MaxUint256, - MaxUint256 - ) - ).to.be.revertedWith("OutTokenInvariant"); - }); - - it("Should trade ETH for Zeta", async () => { - await swapToken(deployer, USDCTokenContract.address, USDC_TO_TRANSFER); - - expect(await zetaTokenMock.balanceOf(account1.address)).to.be.eq(0); - - const tx1 = await zetaTokenMock.approve(multiChainSwapContractA.address, ZETA_TO_TRANSFER); - await tx1.wait(); - - const tx2 = await USDCTokenContract.approve(multiChainSwapContractA.address, USDC_TO_TRANSFER); - await tx2.wait(); - - const tx3 = await multiChainSwapContractA.swapETHForTokensCrossChain( - ethers.utils.solidityPack(["address"], [account1.address]), - zetaTokenMock.address, - false, - 0, - chainBId, - MaxUint256, - MaxUint256, - { value: ZETA_TO_TRANSFER } - ); - const result = await tx3.wait(); - expect(await zetaTokenMock.balanceOf(account1.address)).to.be.gt(0); - - const eventNames = parseInteractorLog(result.logs); - expect(eventNames.filter(e => e === "EthExchangedForZeta")).to.have.lengthOf(1); - expect(eventNames.filter(e => e === "TokenExchangedForZeta")).to.have.lengthOf(0); - expect(eventNames.filter(e => e === "ZetaExchangedForEth")).to.have.lengthOf(0); - expect(eventNames.filter(e => e === "ZetaExchangedForToken")).to.have.lengthOf(0); - - const swappedFilter = multiChainSwapContractB.filters.Swapped(); - const e1 = await multiChainSwapContractB.queryFilter(swappedFilter, tx3.blockHash); - expect(e1.length).to.equal(1); - }); - - it("Should trade Zeta for ETH", async () => { - await swapToken(deployer, USDCTokenContract.address, USDC_TO_TRANSFER); - - const initialETHbalance = await ethers.provider.getBalance(account1.address); - - const tx1 = await zetaTokenMock.approve(multiChainSwapContractA.address, ZETA_TO_TRANSFER); - await tx1.wait(); - - const tx2 = await USDCTokenContract.approve(multiChainSwapContractA.address, USDC_TO_TRANSFER); - await tx2.wait(); - - const tx3 = await multiChainSwapContractA.swapTokensForTokensCrossChain( - zetaTokenMock.address, - ZETA_TO_TRANSFER, - ethers.utils.solidityPack(["address"], [account1.address]), - AddressZero, - true, - 0, - chainBId, - MaxUint256, - MaxUint256 - ); - const result = await tx3.wait(); - expect(await ethers.provider.getBalance(account1.address)).to.be.gt(initialETHbalance); - - const eventNames = parseInteractorLog(result.logs); - expect(eventNames.filter(e => e === "EthExchangedForZeta")).to.have.lengthOf(0); - expect(eventNames.filter(e => e === "TokenExchangedForZeta")).to.have.lengthOf(0); - expect(eventNames.filter(e => e === "ZetaExchangedForEth")).to.have.lengthOf(1); - expect(eventNames.filter(e => e === "ZetaExchangedForToken")).to.have.lengthOf(0); - - const swappedFilter = multiChainSwapContractB.filters.Swapped(); - const e1 = await multiChainSwapContractB.queryFilter(swappedFilter, tx3.blockHash); - expect(e1.length).to.equal(1); - }); - - it("Should not perform any trade if the input token is Zeta", async () => { - expect(await zetaTokenMock.balanceOf(account1.address)).to.be.eq(0); - - const tx1 = await zetaTokenMock.approve(multiChainSwapContractA.address, ZETA_TO_TRANSFER); - await tx1.wait(); - - const tx2 = await USDCTokenContract.approve(multiChainSwapContractA.address, USDC_TO_TRANSFER); - await tx2.wait(); - - const tx3 = await multiChainSwapContractA.swapTokensForTokensCrossChain( - zetaTokenMock.address, - ZETA_TO_TRANSFER, - ethers.utils.solidityPack(["address"], [account1.address]), - zetaTokenMock.address, - false, - 0, - chainBId, - MaxUint256, - MaxUint256 - ); - await tx3.wait(); - expect(await zetaTokenMock.balanceOf(account1.address)).to.be.gt(0); - - const result = await tx3.wait(); - const eventNames = parseInteractorLog(result.logs); - expect(eventNames.filter(e => e === "EthExchangedForZeta")).to.have.lengthOf(0); - expect(eventNames.filter(e => e === "TokenExchangedForZeta")).to.have.lengthOf(0); - expect(eventNames.filter(e => e === "ZetaExchangedForEth")).to.have.lengthOf(0); - expect(eventNames.filter(e => e === "ZetaExchangedForToken")).to.have.lengthOf(0); - - const swappedFilter = multiChainSwapContractB.filters.Swapped(); - const e1 = await multiChainSwapContractB.queryFilter(swappedFilter, tx3.blockHash); - expect(e1.length).to.equal(1); - }); - - it("Should trade the input token for Zeta", async () => { - await swapToken(deployer, USDCTokenContract.address, USDC_TO_TRANSFER); - - expect(await zetaTokenMock.balanceOf(account1.address)).to.be.eq(0); - - const tx1 = await zetaTokenMock.approve(multiChainSwapContractA.address, ZETA_TO_TRANSFER); - await tx1.wait(); - - const tx2 = await USDCTokenContract.approve(multiChainSwapContractA.address, USDC_TO_TRANSFER); - await tx2.wait(); - - const tx3 = await multiChainSwapContractA.swapTokensForTokensCrossChain( - USDCTokenContract.address, - USDC_TO_TRANSFER, - ethers.utils.solidityPack(["address"], [account1.address]), - zetaTokenMock.address, - false, - 0, - chainBId, - MaxUint256, - MaxUint256 - ); - const result = await tx3.wait(); - expect(await zetaTokenMock.balanceOf(account1.address)).to.be.gt(0); - - const eventNames = parseInteractorLog(result.logs); - expect(eventNames.filter(e => e === "EthExchangedForZeta")).to.have.lengthOf(0); - expect(eventNames.filter(e => e === "TokenExchangedForZeta")).to.have.lengthOf(1); - expect(eventNames.filter(e => e === "ZetaExchangedForEth")).to.have.lengthOf(0); - expect(eventNames.filter(e => e === "ZetaExchangedForToken")).to.have.lengthOf(0); - - const swappedFilter = multiChainSwapContractB.filters.Swapped(); - const e1 = await multiChainSwapContractB.queryFilter(swappedFilter, tx3.blockHash); - expect(e1.length).to.equal(1); - }); - - it("Should trade zeta for the output token", async () => { - await swapToken(deployer, USDCTokenContract.address, USDC_TO_TRANSFER); - - expect(await USDCTokenContract.balanceOf(account1.address)).to.be.eq(0); - - const tx1 = await zetaTokenMock.approve(multiChainSwapContractA.address, ZETA_TO_TRANSFER); - await tx1.wait(); - - const tx2 = await USDCTokenContract.approve(multiChainSwapContractA.address, USDC_TO_TRANSFER); - await tx2.wait(); - - const tx3 = await multiChainSwapContractA.swapTokensForTokensCrossChain( - zetaTokenMock.address, - ZETA_TO_TRANSFER, - ethers.utils.solidityPack(["address"], [account1.address]), - USDCTokenContract.address, - false, - 0, - chainBId, - MaxUint256, - MaxUint256 - ); - const result = await tx3.wait(); - expect(await USDCTokenContract.balanceOf(account1.address)).to.be.gt(0); - - const eventNames = parseInteractorLog(result.logs); - expect(eventNames.filter(e => e === "EthExchangedForZeta")).to.have.lengthOf(0); - expect(eventNames.filter(e => e === "TokenExchangedForZeta")).to.have.lengthOf(0); - expect(eventNames.filter(e => e === "ZetaExchangedForEth")).to.have.lengthOf(0); - expect(eventNames.filter(e => e === "ZetaExchangedForToken")).to.have.lengthOf(1); - - const swappedFilter = multiChainSwapContractB.filters.Swapped(); - const e1 = await multiChainSwapContractB.queryFilter(swappedFilter, tx3.blockHash); - expect(e1.length).to.equal(1); - }); - - it("Should trade input token for zeta and zeta for the output token", async () => { - await swapToken(deployer, USDCTokenContract.address, USDC_TO_TRANSFER); - - expect(await USDCTokenContract.balanceOf(account1.address)).to.be.eq(0); - - const tx1 = await zetaTokenMock.approve(multiChainSwapContractA.address, ZETA_TO_TRANSFER); - await tx1.wait(); - - const tx2 = await USDCTokenContract.approve(multiChainSwapContractA.address, USDC_TO_TRANSFER); - await tx2.wait(); - - const tx3 = await multiChainSwapContractA.swapTokensForTokensCrossChain( - USDCTokenContract.address, - USDC_TO_TRANSFER, - ethers.utils.solidityPack(["address"], [account1.address]), - USDCTokenContract.address, - false, - 0, - chainBId, - MaxUint256, - MaxUint256 - ); - const result = await tx3.wait(); - expect(await USDCTokenContract.balanceOf(account1.address)).to.be.gt(0); - - const eventNames = parseInteractorLog(result.logs); - expect(eventNames.filter(e => e === "EthExchangedForZeta")).to.have.lengthOf(0); - expect(eventNames.filter(e => e === "TokenExchangedForZeta")).to.have.lengthOf(1); - expect(eventNames.filter(e => e === "ZetaExchangedForEth")).to.have.lengthOf(0); - expect(eventNames.filter(e => e === "ZetaExchangedForToken")).to.have.lengthOf(1); - - const swappedFilter = multiChainSwapContractB.filters.Swapped(); - const e1 = await multiChainSwapContractB.queryFilter(swappedFilter, tx3.blockHash); - expect(e1.length).to.equal(1); - }); - - it("Should call connector.send", async () => { - await swapToken(deployer, USDCTokenContract.address, USDC_TO_TRANSFER); - - expect(await USDCTokenContract.balanceOf(account1.address)).to.be.eq(0); - - const tx1 = await zetaTokenMock.approve(multiChainSwapContractWithSmock.address, ZETA_TO_TRANSFER); - await tx1.wait(); - - const tx2 = await USDCTokenContract.approve(multiChainSwapContractWithSmock.address, USDC_TO_TRANSFER); - await tx2.wait(); - - const tx3 = await multiChainSwapContractWithSmock.swapTokensForTokensCrossChain( - USDCTokenContract.address, - USDC_TO_TRANSFER, - ethers.utils.solidityPack(["address"], [account1.address]), - USDCTokenContract.address, - false, - 0, - chainBId, - MaxUint256, - MaxUint256 - ); - - zetaConnectorSmock.send.atCall(0).should.be.called; - }); - - it("Should emit a SentTokenSwap event", async () => { - await swapToken(deployer, USDCTokenContract.address, USDC_TO_TRANSFER); - - expect(await USDCTokenContract.balanceOf(account1.address)).to.be.eq(0); - - const tx1 = await zetaTokenMock.approve(multiChainSwapContractA.address, ZETA_TO_TRANSFER); - await tx1.wait(); - - const tx2 = await USDCTokenContract.approve(multiChainSwapContractA.address, USDC_TO_TRANSFER); - await tx2.wait(); - - const tx3 = await multiChainSwapContractA.swapTokensForTokensCrossChain( - USDCTokenContract.address, - USDC_TO_TRANSFER, - ethers.utils.solidityPack(["address"], [account1.address]), - USDCTokenContract.address, - false, - 0, - chainBId, - MaxUint256, - MaxUint256 - ); - await tx3.wait(); - - const swappedFilter = multiChainSwapContractB.filters.Swapped(); - const e1 = await multiChainSwapContractB.queryFilter(swappedFilter, tx3.blockHash); - expect(e1.length).to.equal(1); - }); - - describe("onZetaMessage", () => { - it("Should revert if the caller is not ZetaConnector", async () => { - await expect( - multiChainSwapContractA.onZetaMessage({ - destinationAddress: multiChainSwapContractB.address, - message: encoder.encode(["address"], [multiChainSwapContractA.address]), - sourceChainId: chainBId, - zetaTxSenderAddress: ethers.utils.solidityPack(["address"], [multiChainSwapContractA.address]), - zetaValue: 0 - }) - ) - .to.be.revertedWith("InvalidCaller") - .withArgs(deployer.address); - }); - - it("Should revert if the zetaTxSenderAddress it not in interactorsByChainId", async () => { - await expect( - zetaConnectorMock.callOnZetaMessage( - ethers.utils.solidityPack(["address"], [multiChainSwapContractB.address]), - chainAId, - multiChainSwapContractB.address, - 0, - encoder.encode(["address"], [multiChainSwapContractB.address]) - ) - ).to.be.revertedWith("InvalidZetaMessageCall"); - }); - }); - - describe("onZetaRevert", () => { - it("Should revert if the caller is not ZetaConnector", async () => { - await expect( - multiChainSwapContractA.onZetaRevert({ - destinationAddress: ethers.utils.solidityPack(["address"], [multiChainSwapContractB.address]), - destinationChainId: chainBId, - message: encoder.encode(["address"], [multiChainSwapContractA.address]), - remainingZetaValue: 0, - sourceChainId: chainAId, - zetaTxSenderAddress: deployer.address - }) - ) - .to.be.revertedWith("InvalidCaller") - .withArgs(deployer.address); - }); - - it("Should trade the returned Zeta back for the input zeta token", async () => { - const tx1 = await zetaTokenMock.transfer(multiChainSwapContractA.address, parseUnits("10")); - await tx1.wait(); - - const originAddressInitialZetaBalance = await zetaTokenMock.balanceOf(deployer.address); - - const message = encoder.encode( - ["bytes32", "address", "address", "uint256", "bytes", "address", "bool", "uint256", "bool"], - [ - "0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff", - deployer.address, - zetaTokenMock.address, - 0, - "0xffffffff", - multiChainSwapContractA.address, - true, - 0, - false - ] - ); - - const tx2 = await zetaConnectorMock.callOnZetaRevert( - multiChainSwapContractA.address, - HARDHAT_CHAIN_ID, - chainBId, - encoder.encode(["address"], [multiChainSwapContractB.address]), - 10, - 0, - message - ); - - await tx2.wait(); - - const originAddressFinalZetaBalance = await zetaTokenMock.balanceOf(deployer.address); - expect(originAddressFinalZetaBalance).to.be.eq(originAddressInitialZetaBalance.add(10)); - }); - - it("Should trade the returned Zeta back for the input token", async () => { - const tx1 = await zetaTokenMock.transfer(multiChainSwapContractA.address, parseUnits("100")); - await tx1.wait(); - - const originAddressInitialUSDCBalance = await USDCTokenContract.balanceOf(deployer.address); - - const message = encoder.encode( - ["bytes32", "address", "address", "uint256", "bytes", "address", "bool", "uint256", "bool"], - [ - "0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff", - deployer.address, - USDCTokenContract.address, - 0, - "0xffffffff", - multiChainSwapContractA.address, - true, - 0, - false - ] - ); - - const tx2 = await zetaConnectorMock.callOnZetaRevert( - multiChainSwapContractA.address, - HARDHAT_CHAIN_ID, - chainBId, - encoder.encode(["address"], [multiChainSwapContractB.address]), - ZETA_TO_TRANSFER, - 0, - message - ); - - await tx2.wait(); - - const originAddressFinalUSDCBalance = await USDCTokenContract.balanceOf(deployer.address); - expect(originAddressFinalUSDCBalance).to.be.lt(originAddressInitialUSDCBalance.add(USDC_TO_TRANSFER)); - expect(originAddressFinalUSDCBalance).to.be.gt( - originAddressInitialUSDCBalance - .add(USDC_TO_TRANSFER) - .mul(990) - .div(1000) - ); - }); - - it("Should trade the returned ETH back to the caller", async () => { - const tx1 = await zetaTokenMock.transfer(multiChainSwapContractA.address, parseUnits("100")); - await tx1.wait(); - - const originAddressInitialETHBalance = await ethers.provider.getBalance(deployer.address); - - const message = encoder.encode( - ["bytes32", "address", "address", "uint256", "bytes", "address", "bool", "uint256", "bool"], - [ - "0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff", - deployer.address, - WETH, - 0, - "0xffffffff", - multiChainSwapContractA.address, - true, - 0, - true - ] - ); - - const tx2 = await zetaConnectorMock.callOnZetaRevert( - multiChainSwapContractA.address, - HARDHAT_CHAIN_ID, - chainBId, - encoder.encode(["address"], [multiChainSwapContractB.address]), - parseUnits("2"), - 0, - message - ); - - await tx2.wait(); - - const originAddressFinalETHBalance = await ethers.provider.getBalance(deployer.address); - expect(originAddressFinalETHBalance).to.be.gt(originAddressInitialETHBalance.add("1")); - expect(originAddressFinalETHBalance).to.be.lt( - originAddressInitialETHBalance - .add("1") - .mul(1005) - .div(1000) - ); - }); - - it("Should emit a RevertedSwap event", async () => { - const tx1 = await zetaTokenMock.transfer(multiChainSwapContractA.address, parseUnits("10")); - await tx1.wait(); - - const message = encoder.encode( - ["bytes32", "address", "address", "uint256", "bytes", "address", "bool", "uint256", "bool"], - [ - "0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff", - deployer.address, - WETH, - 0, - "0xffffffff", - multiChainSwapContractA.address, - true, - 0, - true - ] - ); - - const tx2 = await zetaConnectorMock.callOnZetaRevert( - multiChainSwapContractA.address, - HARDHAT_CHAIN_ID, - chainBId, - encoder.encode(["address"], [multiChainSwapContractB.address]), - parseUnits("2"), - 0, - message - ); - - const swappedFilter = multiChainSwapContractA.filters.RevertedSwap(); - const e1 = await multiChainSwapContractA.queryFilter(swappedFilter, tx2.blockHash); - expect(e1.length).to.equal(1); - }); - }); - }); -}); diff --git a/packages/example-contracts/test/test.helpers.ts b/packages/example-contracts/test/test.helpers.ts deleted file mode 100644 index 9603bcba..00000000 --- a/packages/example-contracts/test/test.helpers.ts +++ /dev/null @@ -1,89 +0,0 @@ -import { MaxUint256 } from "@ethersproject/constants"; -import { SignerWithAddress } from "@nomiclabs/hardhat-ethers/signers"; -import { BigNumber, ContractReceipt } from "ethers"; - -import { getAddress } from "../lib/shared/address.helpers"; -import { getNow } from "../lib/shared/deploy.helpers"; -import { - ERC20__factory, - IUniswapV2Pair__factory, - MultiChainSwapUniV2__factory, - UniswapV2Router02__factory, - ZetaTokenConsumerUniV3__factory -} from "../typechain-types"; - -export const getMintTokenId = (mintTx: ContractReceipt) => mintTx.events?.[0].args?.tokenId; - -export const parseUniswapLog = (logs: ContractReceipt["logs"]) => { - const iface = IUniswapV2Pair__factory.createInterface(); - - const eventNames = logs.map(log => { - try { - const parsedLog = iface.parseLog(log); - - return parsedLog.name; - } catch (e) { - return "NO_UNI_LOG"; - } - }); - - return eventNames; -}; - -export const parseZetaLog = (logs: ContractReceipt["logs"]) => { - const iface = MultiChainSwapUniV2__factory.createInterface(); - - const eventNames = logs.map(log => { - try { - const parsedLog = iface.parseLog(log); - - return parsedLog.name; - } catch (e) { - return "NO_ZETA_LOG"; - } - }); - - return eventNames; -}; - -export const parseInteractorLog = (logs: ContractReceipt["logs"]) => { - const iface = ZetaTokenConsumerUniV3__factory.createInterface(); - const eventNames = logs.map(log => { - try { - const parsedLog = iface.parseLog(log); - return parsedLog.name; - } catch (e) { - return "NO_ZETA_LOG"; - } - }); - return eventNames; -}; - -export const addZetaEthLiquidityTest = async ( - zetaTokenAddress: string, - zetaToAdd: BigNumber, - ETHToAdd: BigNumber, - deployer: SignerWithAddress -) => { - const uniswapRouterAddr = getAddress("uniswapV2Router02", { - customNetworkName: "eth-mainnet", - customZetaNetwork: "mainnet" - }); - const uniswapRouter = UniswapV2Router02__factory.connect(uniswapRouterAddr, deployer); - - const ZetaTokenContract = ERC20__factory.connect(zetaTokenAddress, deployer); - - const tx1 = await ZetaTokenContract.approve(uniswapRouter.address, MaxUint256); - await tx1.wait(); - - const tx2 = await uniswapRouter.addLiquidityETH( - ZetaTokenContract.address, - zetaToAdd, - 0, - 0, - deployer.address, - (await getNow()) + 360, - { gasLimit: 10_000_000, value: ETHToAdd } - ); - await tx2.wait(); -}; diff --git a/packages/example-contracts/tsconfig.json b/packages/example-contracts/tsconfig.json deleted file mode 100644 index 355cfda5..00000000 --- a/packages/example-contracts/tsconfig.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "extends": "../../tsconfig.json", - "include": ["./scripts", "./lib", "./test", "./tests", "./typechain", "./**/*.json", "typechain-types"], - "exclude": ["artifacts", "cache"], - "files": ["./hardhat.config.ts"], - "compilerOptions": { - "baseUrl": ".", - "paths": { - "@zetachain/addresses": ["../addresses/src/index"], - "@zetachain/addresses/*": ["../addresses/src/*"], - "@zetachain/interfaces": ["../interfaces/src/index"] - } - } -} diff --git a/packages/zeta-app-contracts/data/addresses.json b/packages/zeta-app-contracts/data/addresses.json new file mode 100644 index 00000000..27c51e4a --- /dev/null +++ b/packages/zeta-app-contracts/data/addresses.json @@ -0,0 +1,55 @@ +{ + "ccm": { + "baobab_testnet": { + "multiChainSwap": "", + "multiChainValue": "", + "zetaTokenConsumerUniV2": "", + "zetaTokenConsumerUniV3": "" + }, + "bsc_mainnet": { + "multiChainSwap": "", + "multiChainValue": "", + "zetaTokenConsumerUniV2": "", + "zetaTokenConsumerUniV3": "" + }, + "bsc_testnet": { + "multiChainSwap": "0x8BD7144Ddb59c9Fa3Dcf809998521E9cAD946fa1", + "multiChainValue": "0x064516547ECd3b2D1709e1b2798Aae92b1C8a84C", + "zetaTokenConsumerUniV2": "", + "zetaTokenConsumerUniV3": "" + }, + "btc_testnet": { + "multiChainSwap": "", + "multiChainValue": "", + "zetaTokenConsumerUniV2": "", + "zetaTokenConsumerUniV3": "" + }, + "eth_mainnet": { + "multiChainSwap": "", + "multiChainValue": "", + "zetaTokenConsumerUniV2": "", + "zetaTokenConsumerUniV3": "" + }, + "goerli_testnet": { + "multiChainSwap": "0x323745f16C93e56a98012970c28788498d8B3a14", + "multiChainValue": "0x14BeC0E4A8e7bF7A02Af54Ad81a57a9fcA4D37Fd", + "zetaTokenConsumerUniV2": "", + "zetaTokenConsumerUniV3": "" + }, + "mumbai_testnet": { + "multiChainSwap": "0xb1b812b664c28E1bA1d35De925Ae88b7Bc7cdCF5", + "multiChainValue": "0x14BeC0E4A8e7bF7A02Af54Ad81a57a9fcA4D37Fd", + "zetaTokenConsumerUniV2": "", + "zetaTokenConsumerUniV3": "" + }, + "zeta_testnet": { + "multiChainSwap": "", + "multiChainValue": "0x82aC45D07dEe4DBDe050e838beF345347DEd99a8", + "zetaTokenConsumerUniV2": "", + "zetaTokenConsumerUniV3": "" + } + }, + "zevm": { + "zeta_testnet": {} + } +} \ No newline at end of file diff --git a/packages/zeta-app-contracts/hardhat.config.ts b/packages/zeta-app-contracts/hardhat.config.ts index 62cb5c23..f40cd212 100644 --- a/packages/zeta-app-contracts/hardhat.config.ts +++ b/packages/zeta-app-contracts/hardhat.config.ts @@ -5,7 +5,7 @@ import "hardhat-gas-reporter"; import "solidity-coverage"; import "tsconfig-paths/register"; -import { getHardhatConfigNetworks, getHardhatConfigScanners } from "@zetachain/addresses-tools/src/networks"; +import { getHardhatConfigNetworks } from "@zetachain/networks"; import * as dotenv from "dotenv"; import type { HardhatUserConfig } from "hardhat/types"; @@ -14,15 +14,22 @@ dotenv.config(); const PRIVATE_KEYS = process.env.PRIVATE_KEY !== undefined ? [`0x${process.env.PRIVATE_KEY}`] : []; const config: HardhatUserConfig = { + //@ts-ignore etherscan: { - ...getHardhatConfigScanners(), + apiKey: { + // BSC + bscTestnet: process.env.BSCSCAN_API_KEY || "", + // ETH + goerli: process.env.ETHERSCAN_API_KEY || "", + mainnet: process.env.ETHERSCAN_API_KEY || "", + }, }, gasReporter: { currency: "USD", enabled: process.env.REPORT_GAS !== undefined, }, networks: { - ...getHardhatConfigNetworks(PRIVATE_KEYS), + ...getHardhatConfigNetworks(), }, solidity: { compilers: [ diff --git a/packages/zeta-app-contracts/lib/multi-chain-value/MultiChainValue.helpers.ts b/packages/zeta-app-contracts/lib/multi-chain-value/MultiChainValue.helpers.ts index 43daf6f9..e24b1833 100644 --- a/packages/zeta-app-contracts/lib/multi-chain-value/MultiChainValue.helpers.ts +++ b/packages/zeta-app-contracts/lib/multi-chain-value/MultiChainValue.helpers.ts @@ -1,4 +1,5 @@ -import { ZetaEth, ZetaEth__factory as ZetaEthFactory } from "@zetachain/interfaces/typechain-types"; +import { getAddress, isProtocolNetworkName } from "@zetachain/protocol-contracts"; +import { ZetaEth, ZetaEth__factory as ZetaEthFactory } from "@zetachain/protocol-contracts/dist/typechain-types"; import assert from "assert"; import { ethers, network } from "hardhat"; @@ -11,8 +12,8 @@ import { ZetaConnectorMockValue, ZetaConnectorMockValue__factory as ZetaConnectorMockValueFactory } from "../../typechain-types"; -import { getAddress } from "../shared/address.helpers"; +const networkName = network.name; /** * @description only for testing or local environment */ @@ -39,13 +40,16 @@ export const deployMultiChainValueMock = async ({ return multiChainValueContract; }; -export const getMultiChainValue = (existingContractAddress?: string) => - getContract({ +export const getMultiChainValue = (existingContractAddress?: string) => { + if (!isProtocolNetworkName(networkName)) throw new Error("Invalid network name"); + + return getContract({ contractName: "MultiChainValue", ...(existingContractAddress ? { existingContractAddress } - : { deployParams: [getAddress("connector"), getAddress("zetaToken")] }) + : { deployParams: [getAddress("connector", networkName), getAddress("zetaToken", networkName)] }) }); +}; export const deployZetaConnectorMock = async () => { const Factory = (await ethers.getContractFactory("ZetaConnectorMockValue")) as ZetaConnectorMockValueFactory; @@ -58,9 +62,11 @@ export const deployZetaConnectorMock = async () => { }; export const deployZetaEthMock = async () => { + const [signer] = await ethers.getSigners(); + const Factory = (await ethers.getContractFactory("ZetaEthMock")) as ZetaEthFactory; - const zetaConnectorMockContract = (await Factory.deploy(100_000)) as ZetaEth; + const zetaConnectorMockContract = (await Factory.deploy(signer.address, 100_000)) as ZetaEth; await zetaConnectorMockContract.deployed(); diff --git a/packages/zeta-app-contracts/lib/shared/ImmutableCreate2Factory.helpers.ts b/packages/zeta-app-contracts/lib/shared/ImmutableCreate2Factory.helpers.ts index e180e84f..cff737a7 100644 --- a/packages/zeta-app-contracts/lib/shared/ImmutableCreate2Factory.helpers.ts +++ b/packages/zeta-app-contracts/lib/shared/ImmutableCreate2Factory.helpers.ts @@ -1,5 +1,5 @@ import { Provider, TransactionReceipt } from "@ethersproject/providers"; -import { ImmutableCreate2Factory__factory } from "@zetachain/interfaces/typechain-types"; +import { ImmutableCreate2Factory__factory } from "@zetachain/protocol-contracts/dist/typechain-types"; import { ethers, Signer } from "ethers"; export const buildBytecode = (constructorTypes: any[], constructorArgs: any[], contractBytecode: string) => @@ -7,7 +7,7 @@ export const buildBytecode = (constructorTypes: any[], constructorArgs: any[], c export const buildCreate2Address = (saltHex: string, byteCode: string, factoryAddress: string) => { const payload = ethers.utils.keccak256( - `0x${["ff", factoryAddress, saltHex, ethers.utils.keccak256(byteCode)].map((x) => x.replace(/0x/, "")).join("")}` + `0x${["ff", factoryAddress, saltHex, ethers.utils.keccak256(byteCode)].map(x => x.replace(/0x/, "")).join("")}` ); return `0x${payload.slice(-40)}`.toLowerCase(); @@ -39,7 +39,7 @@ export async function deployContractToAddress({ contractBytecode, constructorTypes = [] as string[], constructorArgs = [] as any[], - signer, + signer }: { constructorArgs?: any[]; constructorTypes?: string[]; @@ -55,14 +55,14 @@ export async function deployContractToAddress({ const computedAddr = await factory.findCreate2Address(salt, bytecode); const tx = await factory.safeCreate2(salt, bytecode, { - gasLimit: 6000000, + gasLimit: 6000000 }); const result = await tx.wait(); return { address: computedAddr as string, receipt: result as TransactionReceipt, - txHash: result.transactionHash as string, + txHash: result.transactionHash as string }; } diff --git a/packages/zeta-app-contracts/lib/shared/address.helpers.ts b/packages/zeta-app-contracts/lib/shared/address.helpers.ts deleted file mode 100644 index d6c498f2..00000000 --- a/packages/zeta-app-contracts/lib/shared/address.helpers.ts +++ /dev/null @@ -1,23 +0,0 @@ -import { getAddress as getAddressLib, NetworkName, ZetaAddress, ZetaNetworkName } from "@zetachain/addresses"; -import { network } from "hardhat"; - -const MissingZetaNetworkError = new Error( - "ZETA_NETWORK is not defined, please set the environment variable (e.g.: ZETA_NETWORK=athens )" -); - -export const getAddress = ( - address: ZetaAddress, - { - customNetworkName, - customZetaNetwork - }: { customNetworkName?: NetworkName; customZetaNetwork?: ZetaNetworkName } = {} -): string => { - const { name: _networkName } = network; - const networkName = customNetworkName || _networkName; - - const { ZETA_NETWORK: _ZETA_NETWORK } = process.env; - const zetaNetwork = customZetaNetwork || _ZETA_NETWORK; - - if (!zetaNetwork) throw MissingZetaNetworkError; - return getAddressLib({ address, networkName, zetaNetwork }); -}; diff --git a/packages/zeta-app-contracts/package.json b/packages/zeta-app-contracts/package.json index 792cfb8e..5e7f9fe4 100644 --- a/packages/zeta-app-contracts/package.json +++ b/packages/zeta-app-contracts/package.json @@ -30,9 +30,8 @@ }, "dependencies": { "@openzeppelin/contracts": "^4.8.3", - "@zetachain/addresses": "workspace:^", - "@zetachain/addresses-tools": "workspace:^", - "@zetachain/protocol-contracts": "^2.1.0", + "@zetachain/networks": "^2.4.3", + "@zetachain/protocol-contracts": "^3.0.1", "ethers": "5.6.8" } } diff --git a/packages/zeta-app-contracts/scripts/address.helpers.ts b/packages/zeta-app-contracts/scripts/address.helpers.ts new file mode 100644 index 00000000..8aa86ff9 --- /dev/null +++ b/packages/zeta-app-contracts/scripts/address.helpers.ts @@ -0,0 +1,33 @@ +import { networks } from "@zetachain/networks"; +import { isProtocolNetworkName, ZetaProtocolNetwork } from "@zetachain/protocol-contracts"; +import { readFileSync, writeFileSync } from "fs"; +import { network } from "hardhat"; +import { join } from "path"; + +import addresses from "../data/addresses.json"; + +export type AppAddress = "multiChainSwap" | "multiChainValue" | "zetaTokenConsumerUniV2" | "zetaTokenConsumerUniV3"; + +export const getAppAddress = (address: AppAddress, network: ZetaProtocolNetwork): string => { + return (addresses["ccm"] as any)[network][address]; +}; + +export const getChainId = (network: ZetaProtocolNetwork): number => { + //@ts-ignore + return networks[network].chain_id; +}; + +export const saveAddress = (name: string, address: string) => { + const networkName = network.name; + if (!isProtocolNetworkName(networkName)) throw new Error("Invalid network name"); + + console.log(`Updating ${name} address on ${networkName}.`); + + const filename = join(__dirname, `../data/addresses.json`); + + const newAddresses = JSON.parse(readFileSync(filename, "utf8")); + + newAddresses["ccm"][networkName][name] = address; + + writeFileSync(filename, JSON.stringify(newAddresses, null, 2)); +}; diff --git a/packages/zeta-app-contracts/scripts/multi-chain-value/deploy.ts b/packages/zeta-app-contracts/scripts/multi-chain-value/deploy.ts index cdc2158a..8edb153c 100644 --- a/packages/zeta-app-contracts/scripts/multi-chain-value/deploy.ts +++ b/packages/zeta-app-contracts/scripts/multi-chain-value/deploy.ts @@ -1,47 +1,43 @@ -import { getChainId, isNetworkName, isZetaTestnet, NetworkName } from "@zetachain/addresses"; -import { getProtocolNetwork, saveAddress } from "@zetachain/addresses-tools"; -import { getAddress } from "@zetachain/protocol-contracts/dist/lib"; +import { getAddress, isProtocolNetworkName } from "@zetachain/protocol-contracts/dist/lib"; import { ethers, network } from "hardhat"; import { MultiChainValue, MultiChainValue__factory } from "../../typechain-types"; +import { getChainId, saveAddress } from "../address.helpers"; const networkName = network.name; -const { ZETA_NETWORK } = process.env; async function main() { - if (!isNetworkName(networkName)) throw new Error("Invalid network name"); + if (!isProtocolNetworkName(networkName)) throw new Error("Invalid network name"); - const protocolNetwork = getProtocolNetwork(networkName); - if (!protocolNetwork) throw new Error("Invalid network name"); - - const connectorAddress = getAddress("connector", protocolNetwork); - const zetaTokenAddress = getAddress("zetaToken", protocolNetwork); + const connectorAddress = getAddress("connector", networkName); + const zetaTokenAddress = getAddress("zetaToken", networkName); const Factory = (await ethers.getContractFactory("MultiChainValue")) as MultiChainValue__factory; const contract = (await Factory.deploy(connectorAddress, zetaTokenAddress)) as MultiChainValue; await contract.deployed(); console.log("MultiChainValue deployed to:", contract.address); + saveAddress("multiChainValue", contract.address); - if (isZetaTestnet(ZETA_NETWORK)) { - networkName !== "goerli" && - (await (await contract.addAvailableChainId(getChainId("goerli"))).wait().catch((e: any) => console.error(e))); + console.log("MultiChainValue post rutine..."); - networkName !== "polygon-mumbai" && - (await (await contract.addAvailableChainId(getChainId("polygon-mumbai"))) - .wait() - .catch((e: any) => console.error(e))); + networkName !== "goerli_testnet" && + (await (await contract.addAvailableChainId(getChainId("goerli_testnet"))) + .wait() + .catch((e: any) => console.error(e))); - networkName !== "bsc-testnet" && - (await (await contract.addAvailableChainId(getChainId("bsc-testnet"))) - .wait() - .catch((e: any) => console.error(e))); + networkName !== "mumbai_testnet" && + (await (await contract.addAvailableChainId(getChainId("mumbai_testnet"))) + .wait() + .catch((e: any) => console.error(e))); - networkName !== "athens" && - (await (await contract.addAvailableChainId(getChainId("athens"))).wait().catch((e: any) => console.error(e))); - } + networkName !== "bsc_testnet" && + (await (await contract.addAvailableChainId(getChainId("bsc_testnet"))).wait().catch((e: any) => console.error(e))); - saveAddress("multiChainValue", contract.address); + networkName !== "zeta_testnet" && + (await (await contract.addAvailableChainId(getChainId("zeta_testnet"))).wait().catch((e: any) => console.error(e))); + + console.log("MultiChainValue post rutine finish"); } main().catch(error => { diff --git a/packages/zeta-app-contracts/scripts/multi-chain-value/deterministic-deploy.ts b/packages/zeta-app-contracts/scripts/multi-chain-value/deterministic-deploy.ts index 42fbbc46..22761b99 100644 --- a/packages/zeta-app-contracts/scripts/multi-chain-value/deterministic-deploy.ts +++ b/packages/zeta-app-contracts/scripts/multi-chain-value/deterministic-deploy.ts @@ -1,19 +1,18 @@ -import { isNetworkName } from "@zetachain/addresses"; -import { saveAddress } from "@zetachain/addresses-tools"; +import { getAddress, isProtocolNetworkName } from "@zetachain/protocol-contracts"; import { BigNumber } from "ethers"; import { ethers, network } from "hardhat"; -import { getAddress } from "../../lib/shared/address.helpers"; import { deployContractToAddress, saltToHex } from "../../lib/shared/ImmutableCreate2Factory.helpers"; import { MultiChainValue__factory } from "../../typechain-types"; +import { saveAddress } from "../address.helpers"; const DEPLOYER_ADDRESS = process.env.DEPLOYER_ADDRESS ?? ""; const SALT_NUMBER = "0"; +const networkName = network.name; + export async function deterministicDeployMultiChainValue() { - if (!isNetworkName(network.name)) { - throw new Error(`network.name: ${network.name} isn't supported.`); - } + if (!isProtocolNetworkName(networkName)) throw new Error("Invalid network name"); const accounts = await ethers.getSigners(); const [signer] = accounts; @@ -21,10 +20,10 @@ export async function deterministicDeployMultiChainValue() { const saltNumber = SALT_NUMBER; const saltStr = BigNumber.from(saltNumber).toHexString(); - const connector = getAddress("connector"); - const zetaToken = getAddress("zetaToken"); + const connector = getAddress("connector", networkName); + const zetaToken = getAddress("zetaToken", networkName); - const immutableCreate2Factory = getAddress("immutableCreate2Factory"); + const immutableCreate2Factory = getAddress("immutableCreate2Factory", networkName); const salthex = saltToHex(saltStr, DEPLOYER_ADDRESS); diff --git a/packages/zeta-app-contracts/scripts/multi-chain-value/send-value.ts b/packages/zeta-app-contracts/scripts/multi-chain-value/send-value.ts index efb1bb41..d5924523 100644 --- a/packages/zeta-app-contracts/scripts/multi-chain-value/send-value.ts +++ b/packages/zeta-app-contracts/scripts/multi-chain-value/send-value.ts @@ -1,26 +1,26 @@ -import { getChainId, isNetworkName, isZetaTestnet, NetworkName } from "@zetachain/addresses"; +import { getAddress, isProtocolNetworkName, ZetaProtocolNetwork } from "@zetachain/protocol-contracts"; import { BigNumber } from "ethers"; import { parseEther } from "ethers/lib/utils"; import { ethers, network } from "hardhat"; import { getMultiChainValue } from "../../lib/multi-chain-value/MultiChainValue.helpers"; -import { getAddress } from "../../lib/shared/address.helpers"; import { getErc20 } from "../../lib/shared/deploy.helpers"; import { MultiChainValue } from "../../typechain-types"; +import { getAppAddress, getChainId } from "../address.helpers"; const networkName = network.name; -const { ZETA_NETWORK } = process.env; const doTranfer = async ( - sourceChain: NetworkName, + sourceChain: ZetaProtocolNetwork, multiChainValueContract: MultiChainValue, chainId: number, amount: BigNumber, destinationAddress: string ) => { + //@ts-ignore if (getChainId(sourceChain) == chainId) return; - if (sourceChain === "athens") { + if (sourceChain === "zeta_testnet") { const tx = await multiChainValueContract.sendZeta(chainId, destinationAddress, { value: amount }); await tx.wait(); return; @@ -31,28 +31,25 @@ const doTranfer = async ( }; const main = async () => { - if (!isNetworkName(networkName)) throw new Error("Invalid network name"); - const multiChainValueContract = await getMultiChainValue(getAddress("multiChainValue")); + if (!isProtocolNetworkName(networkName)) throw new Error("Invalid network name"); + const multiChainValueContract = await getMultiChainValue(getAppAddress("multiChainValue", networkName)); const [signer] = await ethers.getSigners(); const amount = parseEther("1"); - if (networkName !== "athens") { - const zetaToken = await getErc20(getAddress("zetaToken")); + if (networkName !== "zeta_testnet") { + const zetaToken = await getErc20(getAddress("zetaToken", networkName)); const tx = await zetaToken.approve(multiChainValueContract.address, amount.mul(10)); await tx.wait(); } - if (isZetaTestnet(ZETA_NETWORK)) { - const destinationAddress = ethers.utils.solidityPack(["address"], [process.env.PUBLIC_KEY_1 ?? signer.address]); + const destinationAddress = ethers.utils.solidityPack(["address"], [process.env.PUBLIC_KEY_1 ?? signer.address]); - await doTranfer(networkName, multiChainValueContract, getChainId("goerli"), amount, destinationAddress); - // await doTranfer(networkName, multiChainValueContract, getChainId("klaytn-baobab"), amount, destinationAddress); - await doTranfer(networkName, multiChainValueContract, getChainId("polygon-mumbai"), amount, destinationAddress); - await doTranfer(networkName, multiChainValueContract, getChainId("bsc-testnet"), amount, destinationAddress); - await doTranfer(networkName, multiChainValueContract, getChainId("athens"), amount, destinationAddress); - } + await doTranfer(networkName, multiChainValueContract, getChainId("goerli_testnet"), amount, destinationAddress); + await doTranfer(networkName, multiChainValueContract, getChainId("mumbai_testnet"), amount, destinationAddress); + await doTranfer(networkName, multiChainValueContract, getChainId("bsc_testnet"), amount, destinationAddress); + await doTranfer(networkName, multiChainValueContract, getChainId("zeta_testnet"), amount, destinationAddress); }; main().catch(error => { diff --git a/packages/zeta-app-contracts/scripts/multi-chain-value/verify-contract.ts b/packages/zeta-app-contracts/scripts/multi-chain-value/verify-contract.ts index 6b16b1c5..3a0760df 100644 --- a/packages/zeta-app-contracts/scripts/multi-chain-value/verify-contract.ts +++ b/packages/zeta-app-contracts/scripts/multi-chain-value/verify-contract.ts @@ -1,11 +1,17 @@ +import { getAddress, isProtocolNetworkName } from "@zetachain/protocol-contracts"; import hardhat from "hardhat"; +import { network } from "hardhat"; -import { getAddress } from "../../lib/shared/address.helpers"; +import { getAppAddress } from "../address.helpers"; + +const networkName = network.name; async function main() { + if (!isProtocolNetworkName(networkName)) throw new Error("Invalid network name"); + await hardhat.run("verify:verify", { - address: getAddress("multiChainValue"), - constructorArguments: [getAddress("connector"), getAddress("zetaToken")], + address: getAppAddress("multiChainValue", networkName), + constructorArguments: [getAddress("connector", networkName), getAddress("zetaToken", networkName)], contract: "contracts/multi-chain-value/MultiChainValue.sol:MultiChainValue" }); } diff --git a/packages/zeta-app-contracts/test/MultiChainValue.spec.ts b/packages/zeta-app-contracts/test/MultiChainValue.spec.ts index c37f9ced..de760887 100644 --- a/packages/zeta-app-contracts/test/MultiChainValue.spec.ts +++ b/packages/zeta-app-contracts/test/MultiChainValue.spec.ts @@ -1,5 +1,5 @@ import { SignerWithAddress } from "@nomiclabs/hardhat-ethers/signers"; -import { ZetaEth } from "@zetachain/interfaces/typechain-types"; +import { ZetaEth } from "@zetachain/protocol-contracts/dist/typechain-types"; import { expect } from "chai"; import { parseEther } from "ethers/lib/utils"; import { ethers } from "hardhat"; diff --git a/packages/zevm-example-contracts/contracts/multi-output/ZetaMultiOutput.sol b/packages/zevm-app-contracts/contracts/multi-output/ZetaMultiOutput.sol similarity index 100% rename from packages/zevm-example-contracts/contracts/multi-output/ZetaMultiOutput.sol rename to packages/zevm-app-contracts/contracts/multi-output/ZetaMultiOutput.sol diff --git a/packages/zevm-app-contracts/data/addresses.json b/packages/zevm-app-contracts/data/addresses.json new file mode 100644 index 00000000..08869c18 --- /dev/null +++ b/packages/zevm-app-contracts/data/addresses.json @@ -0,0 +1,11 @@ +{ + "zevm": { + "zeta_testnet": { + "disperse": "0x1E0F767F48Fb10FcF820703f116E9B0F87319d63", + "rewardDistributorFactory": "0x667e4C493d40015256BDC89E3ba750B2F90359E1", + "zetaSwap": "0x44D1F1f9289DBA1Cf5824bd667184cEBE020aA1c", + "zetaSwapBtcInbound": "0x008b393933D5CA2457Df570CA5D628380FFf6da4", + "invitationManager": "0xF4cF881A3d23936e3710ef2Cbbe93f71C4389918" + } + } +} \ No newline at end of file diff --git a/packages/zevm-app-contracts/hardhat.config.ts b/packages/zevm-app-contracts/hardhat.config.ts index 53562131..d495af66 100644 --- a/packages/zevm-app-contracts/hardhat.config.ts +++ b/packages/zevm-app-contracts/hardhat.config.ts @@ -5,7 +5,7 @@ import "hardhat-gas-reporter"; import "solidity-coverage"; import "tsconfig-paths/register"; -import { getHardhatConfigNetworks, getHardhatConfigScanners } from "@zetachain/addresses-tools/src/networks"; +import { getHardhatConfigNetworks } from "@zetachain/networks"; import * as dotenv from "dotenv"; import type { HardhatUserConfig } from "hardhat/types"; @@ -14,15 +14,22 @@ dotenv.config(); const PRIVATE_KEYS = process.env.PRIVATE_KEY !== undefined ? [`0x${process.env.PRIVATE_KEY}`] : []; const config: HardhatUserConfig = { + //@ts-ignore etherscan: { - ...getHardhatConfigScanners(), + apiKey: { + // BSC + bscTestnet: process.env.BSCSCAN_API_KEY || "", + // ETH + goerli: process.env.ETHERSCAN_API_KEY || "", + mainnet: process.env.ETHERSCAN_API_KEY || "", + }, }, gasReporter: { currency: "USD", enabled: process.env.REPORT_GAS !== undefined, }, networks: { - ...getHardhatConfigNetworks(PRIVATE_KEYS), + ...getHardhatConfigNetworks(), }, solidity: { compilers: [ diff --git a/packages/zevm-app-contracts/package.json b/packages/zevm-app-contracts/package.json index 129277e9..5eb0760b 100644 --- a/packages/zevm-app-contracts/package.json +++ b/packages/zevm-app-contracts/package.json @@ -31,9 +31,8 @@ "dependencies": { "@openzeppelin/contracts": "4.8.3", "@uniswap/v2-periphery": "1.1.0-beta.0", - "@zetachain/addresses": "workspace:^", - "@zetachain/addresses-tools": "workspace:^", - "@zetachain/protocol-contracts": "^2.1.0", + "@zetachain/networks": "^2.4.3", + "@zetachain/protocol-contracts": "^3.0.1", "ethers": "5.6.8" } } diff --git a/packages/zevm-app-contracts/scripts/address.helpers.ts b/packages/zevm-app-contracts/scripts/address.helpers.ts new file mode 100644 index 00000000..6b19fac2 --- /dev/null +++ b/packages/zevm-app-contracts/scripts/address.helpers.ts @@ -0,0 +1,39 @@ +import { networks } from "@zetachain/networks"; +import { ZetaProtocolNetwork } from "@zetachain/protocol-contracts"; +import protocolAddresses from "@zetachain/protocol-contracts/dist/data/addresses.json"; +import { readFileSync, writeFileSync } from "fs"; +import { join } from "path"; + +import addresses from "../data/addresses.json"; + +export const getZEVMAppAddress = (address: string): string => { + return (addresses["zevm"] as any)["zeta_testnet"][address]; +}; + +export const getChainId = (network: ZetaProtocolNetwork): number => { + //@ts-ignore + return networks[network].chain_id; +}; + +export const getGasSymbolByNetwork = (network: ZetaProtocolNetwork): number => { + //@ts-ignore + return networks[network].gas_symbol; +}; + +export const getSystemContractAddress = () => { + return protocolAddresses["zevm"]["zeta_testnet"].systemContract; +}; + +export const saveAddress = (name: string, address: string) => { + const networkName = "zeta_testnet"; + + console.log(`Updating ${name} address on ${networkName}.`); + + const filename = join(__dirname, `../data/addresses.json`); + + const newAddresses = JSON.parse(readFileSync(filename, "utf8")); + + newAddresses["zevm"]["zeta_testnet"][name] = address; + + writeFileSync(filename, JSON.stringify(newAddresses, null, 2)); +}; diff --git a/packages/zevm-app-contracts/scripts/disperse/deploy.ts b/packages/zevm-app-contracts/scripts/disperse/deploy.ts index 8b8a28b7..007390c2 100644 --- a/packages/zevm-app-contracts/scripts/disperse/deploy.ts +++ b/packages/zevm-app-contracts/scripts/disperse/deploy.ts @@ -1,13 +1,13 @@ -import { isNetworkName } from "@zetachain/addresses"; -import { saveAddress } from "@zetachain/addresses-tools"; +import { isProtocolNetworkName } from "@zetachain/protocol-contracts"; import { ethers, network } from "hardhat"; import { Disperse__factory } from "../../typechain-types"; +import { saveAddress } from "../address.helpers"; const networkName = network.name; async function main() { - if (!isNetworkName(networkName)) throw new Error("Invalid network name"); + if (!isProtocolNetworkName(networkName)) throw new Error("Invalid network name"); const DisperseFactory = (await ethers.getContractFactory("Disperse")) as Disperse__factory; diff --git a/packages/zevm-app-contracts/scripts/liquidity-incentives/add-reward.ts b/packages/zevm-app-contracts/scripts/liquidity-incentives/add-reward.ts index f1c987c2..3ebd8dad 100644 --- a/packages/zevm-app-contracts/scripts/liquidity-incentives/add-reward.ts +++ b/packages/zevm-app-contracts/scripts/liquidity-incentives/add-reward.ts @@ -1,8 +1,6 @@ import { BigNumber } from "@ethersproject/bignumber"; import { SignerWithAddress } from "@nomiclabs/hardhat-ethers/signers"; -import { getChainId, isNetworkName, NetworkName } from "@zetachain/addresses"; -import { getAddress } from "@zetachain/addresses"; -import { getSystemContractAddress } from "@zetachain/addresses-tools"; +import { isProtocolNetworkName, ZetaProtocolNetwork } from "@zetachain/protocol-contracts"; import { parseEther } from "ethers/lib/utils"; import { ethers, network } from "hardhat"; @@ -14,6 +12,7 @@ import { SystemContract, SystemContract__factory } from "../../typechain-types"; +import { getChainId, getSystemContractAddress, getZEVMAppAddress } from "../address.helpers"; const SYSTEM_CONTRACT = getSystemContractAddress(); @@ -21,7 +20,7 @@ const networkName = network.name; const REWARD_DURATION = BigNumber.from("604800").mul(8); // 1 week * 8 const REWARDS_AMOUNT = parseEther("500"); -const getZRC20Address = async (systemContract: SystemContract, network: NetworkName) => { +const getZRC20Address = async (systemContract: SystemContract, network: ZetaProtocolNetwork) => { const tokenAddress = await systemContract.gasCoinZRC20ByChainId(getChainId(network)); return tokenAddress; }; @@ -29,7 +28,7 @@ const getZRC20Address = async (systemContract: SystemContract, network: NetworkN const deployRewardByNetwork = async ( deployer: SignerWithAddress, systemContract: SystemContract, - networkName: NetworkName, + networkName: ZetaProtocolNetwork, rewardDistributorFactory: RewardDistributorFactory ) => { const tokenAddress = await getZRC20Address(systemContract, networkName); @@ -78,40 +77,41 @@ const addReward = async ( async function main() { const [deployer] = await ethers.getSigners(); - if (!isNetworkName(networkName)) throw new Error("Invalid network name"); + if (!isProtocolNetworkName(networkName)) throw new Error("Invalid network name"); const systemContract = await SystemContract__factory.connect(SYSTEM_CONTRACT, deployer); - const factoryContractAddress = getAddress({ - address: "rewardDistributorFactory", - networkName: network.name, - zetaNetwork: "athens" - }); + const factoryContractAddress = getZEVMAppAddress("rewardDistributorFactory"); const rewardDistributorFactory = RewardDistributorFactory__factory.connect(factoryContractAddress, deployer); let rewardContractAddress = ""; // @dev: you can write your own address here to add reward to an existing contract // rewardContractAddress = "0x0dee8b6e2d2035a798b67c68d47f941718a62263"; - rewardContractAddress = await deployRewardByNetwork(deployer, systemContract, "goerli", rewardDistributorFactory); + rewardContractAddress = await deployRewardByNetwork( + deployer, + systemContract, + "goerli_testnet", + rewardDistributorFactory + ); await addReward(deployer, systemContract, rewardContractAddress); rewardContractAddress = await deployRewardByNetwork( deployer, systemContract, - "bsc-testnet", + "bsc_testnet", rewardDistributorFactory ); await addReward(deployer, systemContract, rewardContractAddress); rewardContractAddress = await deployRewardByNetwork( deployer, systemContract, - "bitcoin-test", + "btc_testnet", rewardDistributorFactory ); await addReward(deployer, systemContract, rewardContractAddress); rewardContractAddress = await deployRewardByNetwork( deployer, systemContract, - "polygon-mumbai", + "mumbai_testnet", rewardDistributorFactory ); await addReward(deployer, systemContract, rewardContractAddress); diff --git a/packages/zevm-app-contracts/scripts/liquidity-incentives/deploy.ts b/packages/zevm-app-contracts/scripts/liquidity-incentives/deploy.ts index 1dea2854..92f3d0b9 100644 --- a/packages/zevm-app-contracts/scripts/liquidity-incentives/deploy.ts +++ b/packages/zevm-app-contracts/scripts/liquidity-incentives/deploy.ts @@ -1,8 +1,8 @@ -import { isNetworkName } from "@zetachain/addresses"; -import { getSystemContractAddress, saveAddress } from "@zetachain/addresses-tools"; +import { isProtocolNetworkName } from "@zetachain/protocol-contracts"; import { ethers, network } from "hardhat"; import { RewardDistributorFactory__factory, SystemContract__factory } from "../../typechain-types"; +import { getSystemContractAddress, saveAddress } from "../address.helpers"; const networkName = network.name; @@ -10,7 +10,7 @@ const SYSTEM_CONTRACT = getSystemContractAddress(); async function main() { const [deployer] = await ethers.getSigners(); - if (!isNetworkName(networkName)) throw new Error("Invalid network name"); + if (!isProtocolNetworkName(networkName)) throw new Error("Invalid network name"); const systemContract = await SystemContract__factory.connect(SYSTEM_CONTRACT, deployer); const zetaTokenAddress = await systemContract.wZetaContractAddress(); diff --git a/packages/zevm-app-contracts/scripts/liquidity-incentives/read-rewards-data.ts b/packages/zevm-app-contracts/scripts/liquidity-incentives/read-rewards-data.ts index 3095f11c..ee0b4141 100644 --- a/packages/zevm-app-contracts/scripts/liquidity-incentives/read-rewards-data.ts +++ b/packages/zevm-app-contracts/scripts/liquidity-incentives/read-rewards-data.ts @@ -1,8 +1,8 @@ -import { isNetworkName } from "@zetachain/addresses"; -import { getAddress } from "@zetachain/addresses"; +import { isProtocolNetworkName } from "@zetachain/protocol-contracts"; import { ethers, network } from "hardhat"; import { RewardDistributor__factory, RewardDistributorFactory__factory } from "../../typechain-types"; +import { getZEVMAppAddress } from "../address.helpers"; const networkName = network.name; @@ -37,13 +37,9 @@ const readRewardData = async (rewardContractAddress: string) => { async function main() { const [deployer] = await ethers.getSigners(); - if (!isNetworkName(networkName)) throw new Error("Invalid network name"); + if (!isProtocolNetworkName(networkName)) throw new Error("Invalid network name"); - const factoryContractAddress = getAddress({ - address: "rewardDistributorFactory", - networkName: network.name, - zetaNetwork: "athens" - }); + const factoryContractAddress = getZEVMAppAddress("rewardDistributorFactory"); const rewardDistributorFactory = RewardDistributorFactory__factory.connect(factoryContractAddress, deployer); const incentivesContractsLen = await rewardDistributorFactory.incentivesContractsLen(); diff --git a/packages/zevm-app-contracts/scripts/uniswap/add-liquidity-zeta-uniswap.ts b/packages/zevm-app-contracts/scripts/uniswap/add-liquidity-zeta-uniswap.ts index 32731630..599ba402 100644 --- a/packages/zevm-app-contracts/scripts/uniswap/add-liquidity-zeta-uniswap.ts +++ b/packages/zevm-app-contracts/scripts/uniswap/add-liquidity-zeta-uniswap.ts @@ -1,12 +1,9 @@ import { MaxUint256 } from "@ethersproject/constants"; -import { formatUnits, parseUnits } from "@ethersproject/units"; +import { parseUnits } from "@ethersproject/units"; import { SignerWithAddress } from "@nomiclabs/hardhat-ethers/signers"; -import { getChainId } from "@zetachain/addresses"; -import { NetworkName } from "@zetachain/addresses"; -import { getAddress } from "@zetachain/addresses"; -import { getGasSymbolByNetwork, getSystemContractAddress } from "@zetachain/addresses-tools"; +import { getNonZetaAddress, isProtocolNetworkName, ZetaProtocolNetwork } from "@zetachain/protocol-contracts"; import { BigNumber } from "ethers"; -import { ethers } from "hardhat"; +import { ethers, network } from "hardhat"; import { ERC20, @@ -17,8 +14,11 @@ import { SystemContract__factory, UniswapV2Router02__factory } from "../../typechain-types"; +import { getChainId, getSystemContractAddress } from "../address.helpers"; import { getNow, printReserves, sortPair } from "./uniswap.helpers"; +const networkName = network.name; + const SYSTEM_CONTRACT = getSystemContractAddress(); const BTC_TO_ADD = parseUnits("0", 8); @@ -53,7 +53,6 @@ const addTokenEthLiquidity = async ( }; const estimateZetaForToken = async ( - network: NetworkName, WZETAAddress: string, uniswapFactoryAddress: string, tokenContract: ERC20, @@ -79,7 +78,7 @@ const estimateZetaForToken = async ( }; async function addLiquidity( - network: NetworkName, + network: ZetaProtocolNetwork, tokenAmountToAdd: BigNumber, WZETAAddress: string, uniswapFactoryAddress: string, @@ -98,49 +97,31 @@ async function addLiquidity( const zetaToAdd = initLiquidityPool ? ZETA_TO_ADD - : await estimateZetaForToken( - network, - WZETAAddress, - uniswapFactoryAddress, - tokenContract, - tokenAmountToAdd, - deployer - ); + : await estimateZetaForToken(WZETAAddress, uniswapFactoryAddress, tokenContract, tokenAmountToAdd, deployer); await printReserves(tokenContract, WZETAAddress, uniswapFactoryAddress, deployer); // await addTokenEthLiquidity(tokenContract, tokenAmountToAdd, zetaToAdd, uniswapRouter, deployer); await printReserves(tokenContract, WZETAAddress, uniswapFactoryAddress, deployer); } async function main() { - const WZETA_ADDRESS = getAddress({ - address: "weth9", - networkName: "athens", - zetaNetwork: "athens" - }); + if (!isProtocolNetworkName(networkName)) throw new Error("Invalid network name"); + const WZETA_ADDRESS = getNonZetaAddress("weth9", networkName); - const UNISWAP_FACTORY_ADDRESS = getAddress({ - address: "uniswapV2Factory", - networkName: "athens", - zetaNetwork: "athens" - }); + const UNISWAP_FACTORY_ADDRESS = getNonZetaAddress("uniswapV2Factory", networkName); - const UNISWAP_ROUTER_ADDRESS = getAddress({ - address: "uniswapV2Router02", - networkName: "athens", - zetaNetwork: "athens" - }); + const UNISWAP_ROUTER_ADDRESS = getNonZetaAddress("uniswapV2Router02", networkName); if (!ETH_TO_ADD.isZero()) { - await addLiquidity("goerli", ETH_TO_ADD, WZETA_ADDRESS, UNISWAP_FACTORY_ADDRESS, UNISWAP_ROUTER_ADDRESS); + await addLiquidity("goerli_testnet", ETH_TO_ADD, WZETA_ADDRESS, UNISWAP_FACTORY_ADDRESS, UNISWAP_ROUTER_ADDRESS); } if (!MATIC_TO_ADD.isZero()) { - await addLiquidity("polygon-mumbai", MATIC_TO_ADD, WZETA_ADDRESS, UNISWAP_FACTORY_ADDRESS, UNISWAP_ROUTER_ADDRESS); + await addLiquidity("mumbai_testnet", MATIC_TO_ADD, WZETA_ADDRESS, UNISWAP_FACTORY_ADDRESS, UNISWAP_ROUTER_ADDRESS); } if (!BNB_TO_ADD.isZero()) { - await addLiquidity("bsc-testnet", BNB_TO_ADD, WZETA_ADDRESS, UNISWAP_FACTORY_ADDRESS, UNISWAP_ROUTER_ADDRESS); + await addLiquidity("bsc_testnet", BNB_TO_ADD, WZETA_ADDRESS, UNISWAP_FACTORY_ADDRESS, UNISWAP_ROUTER_ADDRESS); } if (!BTC_TO_ADD.isZero()) { - await addLiquidity("bitcoin-test", BTC_TO_ADD, WZETA_ADDRESS, UNISWAP_FACTORY_ADDRESS, UNISWAP_ROUTER_ADDRESS); + await addLiquidity("btc_testnet", BTC_TO_ADD, WZETA_ADDRESS, UNISWAP_FACTORY_ADDRESS, UNISWAP_ROUTER_ADDRESS); } } diff --git a/packages/zevm-app-contracts/scripts/uniswap/remove-liquidity-zeta-uniswap.ts b/packages/zevm-app-contracts/scripts/uniswap/remove-liquidity-zeta-uniswap.ts index 896f0293..5c3b873a 100644 --- a/packages/zevm-app-contracts/scripts/uniswap/remove-liquidity-zeta-uniswap.ts +++ b/packages/zevm-app-contracts/scripts/uniswap/remove-liquidity-zeta-uniswap.ts @@ -1,12 +1,9 @@ import { MaxUint256 } from "@ethersproject/constants"; import { formatUnits } from "@ethersproject/units"; import { SignerWithAddress } from "@nomiclabs/hardhat-ethers/signers"; -import { getChainId } from "@zetachain/addresses"; -import { NetworkName } from "@zetachain/addresses"; -import { getAddress } from "@zetachain/addresses"; -import { getSystemContractAddress } from "@zetachain/addresses-tools"; +import { getNonZetaAddress, isProtocolNetworkName, ZetaProtocolNetwork } from "@zetachain/protocol-contracts"; import { BigNumber } from "ethers"; -import { ethers } from "hardhat"; +import { ethers, network } from "hardhat"; import { ERC20, @@ -18,8 +15,10 @@ import { SystemContract__factory, UniswapV2Router02__factory } from "../../typechain-types"; +import { getChainId, getSystemContractAddress } from "../address.helpers"; import { getNow, printReserves, sortPair } from "./uniswap.helpers"; +const networkName = network.name; const SYSTEM_CONTRACT = getSystemContractAddress(); const removeTokenEthLiquidity = async ( @@ -47,7 +46,7 @@ const removeTokenEthLiquidity = async ( }; async function removeLiquidity( - network: NetworkName, + network: ZetaProtocolNetwork, WZETAAddress: string, uniswapFactoryAddress: string, uniswapRouterAddress: string @@ -78,28 +77,18 @@ async function removeLiquidity( await printReserves(tokenContract, WZETAAddress, uniswapFactoryAddress, deployer); } async function main() { - const WZETA_ADDRESS = getAddress({ - address: "weth9", - networkName: "athens", - zetaNetwork: "athens" - }); + if (!isProtocolNetworkName(networkName)) throw new Error("Invalid network name"); - const UNISWAP_FACTORY_ADDRESS = getAddress({ - address: "uniswapV2Factory", - networkName: "athens", - zetaNetwork: "athens" - }); + const WZETA_ADDRESS = getNonZetaAddress("weth9", networkName); - const UNISWAP_ROUTER_ADDRESS = getAddress({ - address: "uniswapV2Router02", - networkName: "athens", - zetaNetwork: "athens" - }); + const UNISWAP_FACTORY_ADDRESS = getNonZetaAddress("uniswapV2Factory", networkName); + + const UNISWAP_ROUTER_ADDRESS = getNonZetaAddress("uniswapV2Router02", networkName); - await removeLiquidity("goerli", WZETA_ADDRESS, UNISWAP_FACTORY_ADDRESS, UNISWAP_ROUTER_ADDRESS); - await removeLiquidity("polygon-mumbai", WZETA_ADDRESS, UNISWAP_FACTORY_ADDRESS, UNISWAP_ROUTER_ADDRESS); - await removeLiquidity("bsc-testnet", WZETA_ADDRESS, UNISWAP_FACTORY_ADDRESS, UNISWAP_ROUTER_ADDRESS); - await removeLiquidity("bitcoin-test", WZETA_ADDRESS, UNISWAP_FACTORY_ADDRESS, UNISWAP_ROUTER_ADDRESS); + await removeLiquidity("goerli_testnet", WZETA_ADDRESS, UNISWAP_FACTORY_ADDRESS, UNISWAP_ROUTER_ADDRESS); + await removeLiquidity("mumbai_testnet", WZETA_ADDRESS, UNISWAP_FACTORY_ADDRESS, UNISWAP_ROUTER_ADDRESS); + await removeLiquidity("bsc_testnet", WZETA_ADDRESS, UNISWAP_FACTORY_ADDRESS, UNISWAP_ROUTER_ADDRESS); + await removeLiquidity("btc_testnet", WZETA_ADDRESS, UNISWAP_FACTORY_ADDRESS, UNISWAP_ROUTER_ADDRESS); } main() diff --git a/packages/zevm-app-contracts/scripts/uniswap/sell-token.ts b/packages/zevm-app-contracts/scripts/uniswap/sell-token.ts index 6d8ed6ea..94a9d877 100644 --- a/packages/zevm-app-contracts/scripts/uniswap/sell-token.ts +++ b/packages/zevm-app-contracts/scripts/uniswap/sell-token.ts @@ -1,12 +1,9 @@ import { MaxUint256 } from "@ethersproject/constants"; -import { formatUnits, parseUnits } from "@ethersproject/units"; +import { parseUnits } from "@ethersproject/units"; import { SignerWithAddress } from "@nomiclabs/hardhat-ethers/signers"; -import { getChainId } from "@zetachain/addresses"; -import { NetworkName } from "@zetachain/addresses"; -import { getAddress } from "@zetachain/addresses"; -import { getSystemContractAddress } from "@zetachain/addresses-tools"; +import { getNonZetaAddress, isProtocolNetworkName, ZetaProtocolNetwork } from "@zetachain/protocol-contracts"; import { BigNumber } from "ethers"; -import { ethers } from "hardhat"; +import { ethers, network } from "hardhat"; import { ERC20, @@ -15,8 +12,10 @@ import { SystemContract__factory, UniswapV2Router02__factory } from "../../typechain-types"; +import { getChainId, getSystemContractAddress } from "../address.helpers"; import { getNow, printReserves } from "./uniswap.helpers"; +const networkName = network.name; const SYSTEM_CONTRACT = getSystemContractAddress(); const BTC_TO_SELL = parseUnits("0", 8); @@ -50,7 +49,7 @@ const swapZeta = async ( }; async function sellToken( - network: NetworkName, + network: ZetaProtocolNetwork, tokenAmountToSell: BigNumber, WZETAAddress: string, uniswapFactoryAddress: string, @@ -71,35 +70,25 @@ async function sellToken( await printReserves(tokenContract, WZETAAddress, uniswapFactoryAddress, deployer); } async function main() { - const WZETA_ADDRESS = getAddress({ - address: "weth9", - networkName: "athens", - zetaNetwork: "athens" - }); + if (!isProtocolNetworkName(networkName)) throw new Error("Invalid network name"); - const UNISWAP_FACTORY_ADDRESS = getAddress({ - address: "uniswapV2Factory", - networkName: "athens", - zetaNetwork: "athens" - }); + const WZETA_ADDRESS = getNonZetaAddress("weth9", networkName); - const UNISWAP_ROUTER_ADDRESS = getAddress({ - address: "uniswapV2Router02", - networkName: "athens", - zetaNetwork: "athens" - }); + const UNISWAP_FACTORY_ADDRESS = getNonZetaAddress("uniswapV2Factory", networkName); + + const UNISWAP_ROUTER_ADDRESS = getNonZetaAddress("uniswapV2Router02", networkName); if (!ETH_TO_SELL.isZero()) { - await sellToken("goerli", ETH_TO_SELL, WZETA_ADDRESS, UNISWAP_FACTORY_ADDRESS, UNISWAP_ROUTER_ADDRESS); + await sellToken("goerli_testnet", ETH_TO_SELL, WZETA_ADDRESS, UNISWAP_FACTORY_ADDRESS, UNISWAP_ROUTER_ADDRESS); } if (!MATIC_TO_SELL.isZero()) { - await sellToken("polygon-mumbai", MATIC_TO_SELL, WZETA_ADDRESS, UNISWAP_FACTORY_ADDRESS, UNISWAP_ROUTER_ADDRESS); + await sellToken("mumbai_testnet", MATIC_TO_SELL, WZETA_ADDRESS, UNISWAP_FACTORY_ADDRESS, UNISWAP_ROUTER_ADDRESS); } if (!BNB_TO_SELL.isZero()) { - await sellToken("bsc-testnet", BNB_TO_SELL, WZETA_ADDRESS, UNISWAP_FACTORY_ADDRESS, UNISWAP_ROUTER_ADDRESS); + await sellToken("bsc_testnet", BNB_TO_SELL, WZETA_ADDRESS, UNISWAP_FACTORY_ADDRESS, UNISWAP_ROUTER_ADDRESS); } if (!BTC_TO_SELL.isZero()) { - await sellToken("bitcoin-test", BTC_TO_SELL, WZETA_ADDRESS, UNISWAP_FACTORY_ADDRESS, UNISWAP_ROUTER_ADDRESS); + await sellToken("btc_testnet", BTC_TO_SELL, WZETA_ADDRESS, UNISWAP_FACTORY_ADDRESS, UNISWAP_ROUTER_ADDRESS); } } diff --git a/packages/zevm-app-contracts/scripts/uniswap/sell-zeta.ts b/packages/zevm-app-contracts/scripts/uniswap/sell-zeta.ts index f990c074..49cdefce 100644 --- a/packages/zevm-app-contracts/scripts/uniswap/sell-zeta.ts +++ b/packages/zevm-app-contracts/scripts/uniswap/sell-zeta.ts @@ -1,12 +1,8 @@ -import { MaxUint256 } from "@ethersproject/constants"; -import { formatUnits, parseUnits } from "@ethersproject/units"; +import { parseUnits } from "@ethersproject/units"; import { SignerWithAddress } from "@nomiclabs/hardhat-ethers/signers"; -import { getChainId } from "@zetachain/addresses"; -import { NetworkName } from "@zetachain/addresses"; -import { getAddress } from "@zetachain/addresses"; -import { getSystemContractAddress } from "@zetachain/addresses-tools"; +import { getNonZetaAddress, isProtocolNetworkName, ZetaProtocolNetwork } from "@zetachain/protocol-contracts"; import { BigNumber } from "ethers"; -import { ethers } from "hardhat"; +import { ethers, network } from "hardhat"; import { ERC20, @@ -15,8 +11,10 @@ import { SystemContract__factory, UniswapV2Router02__factory } from "../../typechain-types"; +import { getChainId, getSystemContractAddress } from "../address.helpers"; import { getNow, printReserves } from "./uniswap.helpers"; +const networkName = network.name; const SYSTEM_CONTRACT = getSystemContractAddress(); const ZETA_TO_SELL = parseUnits("0.001"); @@ -41,7 +39,7 @@ const swapZeta = async ( }; async function sellZeta( - network: NetworkName, + network: ZetaProtocolNetwork, WZETAAddress: string, uniswapFactoryAddress: string, uniswapRouterAddress: string @@ -61,28 +59,18 @@ async function sellZeta( await printReserves(tokenContract, WZETAAddress, uniswapFactoryAddress, deployer); } async function main() { - const WZETA_ADDRESS = getAddress({ - address: "weth9", - networkName: "athens", - zetaNetwork: "athens" - }); + if (!isProtocolNetworkName(networkName)) throw new Error("Invalid network name"); - const UNISWAP_FACTORY_ADDRESS = getAddress({ - address: "uniswapV2Factory", - networkName: "athens", - zetaNetwork: "athens" - }); + const WZETA_ADDRESS = getNonZetaAddress("weth9", networkName); - const UNISWAP_ROUTER_ADDRESS = getAddress({ - address: "uniswapV2Router02", - networkName: "athens", - zetaNetwork: "athens" - }); + const UNISWAP_FACTORY_ADDRESS = getNonZetaAddress("uniswapV2Factory", networkName); + + const UNISWAP_ROUTER_ADDRESS = getNonZetaAddress("uniswapV2Router02", networkName); - await sellZeta("goerli", WZETA_ADDRESS, UNISWAP_FACTORY_ADDRESS, UNISWAP_ROUTER_ADDRESS); - await sellZeta("polygon-mumbai", WZETA_ADDRESS, UNISWAP_FACTORY_ADDRESS, UNISWAP_ROUTER_ADDRESS); - await sellZeta("bsc-testnet", WZETA_ADDRESS, UNISWAP_FACTORY_ADDRESS, UNISWAP_ROUTER_ADDRESS); - await sellZeta("bitcoin-test", WZETA_ADDRESS, UNISWAP_FACTORY_ADDRESS, UNISWAP_ROUTER_ADDRESS); + await sellZeta("goerli_testnet", WZETA_ADDRESS, UNISWAP_FACTORY_ADDRESS, UNISWAP_ROUTER_ADDRESS); + await sellZeta("mumbai_testnet", WZETA_ADDRESS, UNISWAP_FACTORY_ADDRESS, UNISWAP_ROUTER_ADDRESS); + await sellZeta("bsc_testnet", WZETA_ADDRESS, UNISWAP_FACTORY_ADDRESS, UNISWAP_ROUTER_ADDRESS); + await sellZeta("btc_testnet", WZETA_ADDRESS, UNISWAP_FACTORY_ADDRESS, UNISWAP_ROUTER_ADDRESS); } main() diff --git a/packages/zevm-app-contracts/scripts/uniswap/uniswap.helpers.ts b/packages/zevm-app-contracts/scripts/uniswap/uniswap.helpers.ts index 9fcfd3b2..85724b7a 100644 --- a/packages/zevm-app-contracts/scripts/uniswap/uniswap.helpers.ts +++ b/packages/zevm-app-contracts/scripts/uniswap/uniswap.helpers.ts @@ -2,7 +2,7 @@ import { SignerWithAddress } from "@nomiclabs/hardhat-ethers/signers"; import { formatUnits, parseUnits } from "ethers/lib/utils"; import { ethers } from "hardhat"; -import { IUniswapV2Factory__factory } from "../../../zevm-example-contracts/typechain-types"; +import { IUniswapV2Factory__factory } from "../../typechain-types"; import { ERC20, IUniswapV2Pair__factory } from "../../typechain-types"; export interface Pair { diff --git a/packages/zevm-app-contracts/scripts/zeta-points/deploy.ts b/packages/zevm-app-contracts/scripts/zeta-points/deploy.ts index d7cefbbe..bae20752 100644 --- a/packages/zevm-app-contracts/scripts/zeta-points/deploy.ts +++ b/packages/zevm-app-contracts/scripts/zeta-points/deploy.ts @@ -1,22 +1,21 @@ -import { isNetworkName } from "@zetachain/addresses"; -import { saveAddress } from "@zetachain/addresses-tools"; +import { isProtocolNetworkName } from "@zetachain/protocol-contracts"; import { ethers, network } from "hardhat"; -import { InvitationManager__factory, UserVerificationRegistry__factory } from "../../typechain-types"; +import { InvitationManager__factory } from "../../typechain-types"; +import { saveAddress } from "../address.helpers"; const networkName = network.name; const invitationManager = async () => { const InvitationManagerFactory = (await ethers.getContractFactory("InvitationManager")) as InvitationManager__factory; - const invitationManager = await InvitationManagerFactory.deploy(); await invitationManager.deployed(); console.log("InvitationManager deployed to:", invitationManager.address); - // saveAddress("invitationManager", invitationManager.address); + saveAddress("invitationManager", invitationManager.address); }; const main = async () => { - if (!isNetworkName(networkName)) throw new Error("Invalid network name"); + if (!isProtocolNetworkName(networkName)) throw new Error("Invalid network name"); await invitationManager(); }; diff --git a/packages/zevm-app-contracts/scripts/zeta-swap/deploy.ts b/packages/zevm-app-contracts/scripts/zeta-swap/deploy.ts index 292ed069..b1ee2c23 100644 --- a/packages/zevm-app-contracts/scripts/zeta-swap/deploy.ts +++ b/packages/zevm-app-contracts/scripts/zeta-swap/deploy.ts @@ -1,7 +1,7 @@ -import { getSystemContractAddress, saveAddress } from "@zetachain/addresses-tools"; import { ethers } from "hardhat"; import { ZetaSwap, ZetaSwap__factory, ZetaSwapBtcInbound, ZetaSwapBtcInbound__factory } from "../../typechain-types"; +import { getSystemContractAddress, saveAddress } from "../address.helpers"; const main = async () => { console.log(`Deploying ZetaSwap...`); diff --git a/packages/zevm-app-contracts/scripts/zeta-swap/get-system-data.ts b/packages/zevm-app-contracts/scripts/zeta-swap/get-system-data.ts index 2e7db88c..945c0d0b 100644 --- a/packages/zevm-app-contracts/scripts/zeta-swap/get-system-data.ts +++ b/packages/zevm-app-contracts/scripts/zeta-swap/get-system-data.ts @@ -1,11 +1,10 @@ -import { getChainId } from "@zetachain/addresses"; -import { NetworkName } from "@zetachain/addresses"; -import { getGasSymbolByNetwork, getSystemContractAddress } from "@zetachain/addresses-tools"; +import { ZetaProtocolNetwork } from "@zetachain/protocol-contracts"; import { ethers } from "hardhat"; import { SystemContract, SystemContract__factory } from "../../typechain-types"; +import { getChainId, getGasSymbolByNetwork, getSystemContractAddress } from "../address.helpers"; -const getZRC20Address = async (systemContract: SystemContract, network: NetworkName) => { +const getZRC20Address = async (systemContract: SystemContract, network: ZetaProtocolNetwork) => { const tokenAddress = await systemContract.gasCoinZRC20ByChainId(getChainId(network)); console.log(`${getGasSymbolByNetwork(network)}`, tokenAddress); const tokenAddressLP = await systemContract.gasZetaPoolByChainId(getChainId(network)); @@ -25,11 +24,10 @@ async function main() { const WZETAAddress = await systemContract.wZetaContractAddress(); console.log(`WZETA:`, WZETAAddress); - await getZRC20Address(systemContract, "bitcoin-test"); - await getZRC20Address(systemContract, "goerli"); - await getZRC20Address(systemContract, "klaytn-baobab"); - await getZRC20Address(systemContract, "bsc-testnet"); - await getZRC20Address(systemContract, "polygon-mumbai"); + await getZRC20Address(systemContract, "btc_testnet"); + await getZRC20Address(systemContract, "goerli_testnet"); + await getZRC20Address(systemContract, "bsc_testnet"); + await getZRC20Address(systemContract, "mumbai_testnet"); } main() diff --git a/packages/zevm-app-contracts/scripts/zeta-swap/send.ts b/packages/zevm-app-contracts/scripts/zeta-swap/send.ts index 56e46fe9..bf95f9f2 100644 --- a/packages/zevm-app-contracts/scripts/zeta-swap/send.ts +++ b/packages/zevm-app-contracts/scripts/zeta-swap/send.ts @@ -1,18 +1,15 @@ import { parseEther } from "@ethersproject/units"; -import { getAddress } from "@zetachain/addresses"; +import { getAddress, isProtocolNetworkName } from "@zetachain/protocol-contracts"; import { ethers } from "hardhat"; import { network } from "hardhat"; const main = async () => { + if (!isProtocolNetworkName(network.name)) throw new Error("Invalid network name"); console.log(`Sending native token...`); const [signer] = await ethers.getSigners(); - const tssAddress = getAddress({ - address: "tss", - networkName: network.name, - zetaNetwork: "athens" - }); + const tssAddress = getAddress("tss", network.name); const tx = await signer.sendTransaction({ to: tssAddress, diff --git a/packages/zevm-app-contracts/scripts/zeta-swap/stress-swap.ts b/packages/zevm-app-contracts/scripts/zeta-swap/stress-swap.ts index 3c55596b..e4ad914b 100644 --- a/packages/zevm-app-contracts/scripts/zeta-swap/stress-swap.ts +++ b/packages/zevm-app-contracts/scripts/zeta-swap/stress-swap.ts @@ -10,16 +10,22 @@ import { BigNumber } from "@ethersproject/bignumber"; import { formatEther, parseEther } from "@ethersproject/units"; import { SignerWithAddress } from "@nomiclabs/hardhat-ethers/signers"; -import { getAddress } from "@zetachain/addresses"; -import { ChainToZRC20, getZRC20Address, isSwappableNetwork, SwappableNetwork } from "@zetachain/addresses-tools"; +import { + getAddress, + getZRC20Address, + isProtocolNetworkName, + ZetaProtocolNetwork, + zetaProtocolNetworks +} from "@zetachain/protocol-contracts"; import { ethers, network } from "hardhat"; +import { getZEVMAppAddress } from "../address.helpers"; import { getSwapData } from "./helpers"; -const ZRC20Addresses = getZRC20Address(); +const networkName = network.name; interface SwapToChainParams { - destinationNetwork: SwappableNetwork; + destinationNetwork: ZetaProtocolNetwork; nonce: number; signer: SignerWithAddress; tssAddress: string; @@ -35,8 +41,7 @@ const swapToChain = async ({ value, nonce }: SwapToChainParams) => { - const zrc20 = ChainToZRC20[destinationNetwork]; - const data = getSwapData(zetaSwapAddress, signer.address, ZRC20Addresses[zrc20], BigNumber.from("0")); + const data = getSwapData(zetaSwapAddress, signer.address, getZRC20Address(destinationNetwork), BigNumber.from("0")); const tx = await signer.sendTransaction({ data, nonce, @@ -47,12 +52,12 @@ const swapToChain = async ({ }; const main = async () => { - if (!isSwappableNetwork(network.name) || !network.name) throw new Error("Invalid network name"); - const swappableNetwork: SwappableNetwork = network.name; + if (!isProtocolNetworkName(networkName)) throw new Error("Invalid network name"); + const swappableNetwork: ZetaProtocolNetwork = networkName; // @dev: bitcoin is invalid as destination - const invalidDestinations: SwappableNetwork[] = [swappableNetwork, "bitcoin-test"]; - const networks = Object.keys(ChainToZRC20).map(c => c as SwappableNetwork); + const invalidDestinations: ZetaProtocolNetwork[] = [swappableNetwork, "btc_testnet"]; + const networks = zetaProtocolNetworks.map(c => c as ZetaProtocolNetwork); const destinationNetworks = networks.filter(e => !invalidDestinations.includes(e)); @@ -60,17 +65,9 @@ const main = async () => { const [signer] = await ethers.getSigners(); - const zetaSwapAddress = getAddress({ - address: "zetaSwap", - networkName: "athens", - zetaNetwork: "athens" - }); + const zetaSwapAddress = getZEVMAppAddress("zetaSwap"); - const tssAddress = getAddress({ - address: "tss", - networkName: network.name, - zetaNetwork: "athens" - }); + const tssAddress = getAddress("tss", swappableNetwork); const nonce = await signer.getTransactionCount(); diff --git a/packages/zevm-app-contracts/scripts/zeta-swap/swap-on-zevm.ts b/packages/zevm-app-contracts/scripts/zeta-swap/swap-on-zevm.ts index 14d660c9..5a677893 100644 --- a/packages/zevm-app-contracts/scripts/zeta-swap/swap-on-zevm.ts +++ b/packages/zevm-app-contracts/scripts/zeta-swap/swap-on-zevm.ts @@ -1,29 +1,25 @@ import { BigNumber } from "@ethersproject/bignumber"; import { parseUnits } from "@ethersproject/units"; -import { getAddress, isZetaNetworkName } from "@zetachain/addresses"; -import { getZRC20Address } from "@zetachain/addresses-tools"; +import { getZRC20Address, isProtocolNetworkName } from "@zetachain/protocol-contracts"; import { ethers } from "hardhat"; import { network } from "hardhat"; import { ERC20__factory, ZetaSwap__factory, ZetaSwapBtcInbound__factory } from "../../typechain-types"; +import { getZEVMAppAddress } from "../address.helpers"; import { getSwapParams } from "./helpers"; +const networkName = network.name; const USE_BTC_SWAP = true; const SAMPLE_MEMO = "0x25A92a5853702F199bb2d805Bba05d67025214A800000005"; // 0xADDRESS + FFFF chain id (05 for goerli) const main = async () => { - if (!isZetaNetworkName(network.name) || !network.name) throw new Error("Invalid network name"); + if (!isProtocolNetworkName(networkName)) throw new Error("Invalid network name"); const [signer] = await ethers.getSigners(); - const ZRC20Addresses = getZRC20Address(); - const zetaSwap = getAddress({ - address: USE_BTC_SWAP ? "zetaSwapBtcInbound" : "zetaSwap", - networkName: "athens", - zetaNetwork: "athens" - }); + const zetaSwap = getZEVMAppAddress(USE_BTC_SWAP ? "zetaSwapBtcInbound" : "zetaSwap"); const amount = parseUnits("0.00001", 8); - const sourceToken = ZRC20Addresses["tBTC"]; + const sourceToken = getZRC20Address("btc_testnet"); const zrc20Contract = ERC20__factory.connect(sourceToken, signer); const tx0 = await zrc20Contract.transfer(zetaSwap, amount); @@ -38,10 +34,15 @@ const main = async () => { params = ethers.utils.arrayify(SAMPLE_MEMO); zetaSwapContract = ZetaSwapBtcInbound__factory.connect(zetaSwap, signer); } else { - params = getSwapParams(signer.address, ZRC20Addresses["gETH"], BigNumber.from("0")); + params = getSwapParams(signer.address, getZRC20Address("goerli_testnet"), BigNumber.from("0")); zetaSwapContract = ZetaSwap__factory.connect(zetaSwap, signer); } - const tx1 = await zetaSwapContract.onCrossChainCall(sourceToken, amount, params); + const zContextStruct = { + chainID: ethers.BigNumber.from("0"), + origin: ethers.constants.HashZero, + sender: ethers.constants.AddressZero + }; + const tx1 = await zetaSwapContract.onCrossChainCall(zContextStruct, sourceToken, amount, params); await tx1.wait(); console.log("tx:", tx1.hash); diff --git a/packages/zevm-app-contracts/scripts/zeta-swap/swap.ts b/packages/zevm-app-contracts/scripts/zeta-swap/swap.ts index 970af04c..cc315cf0 100644 --- a/packages/zevm-app-contracts/scripts/zeta-swap/swap.ts +++ b/packages/zevm-app-contracts/scripts/zeta-swap/swap.ts @@ -1,33 +1,24 @@ import { BigNumber } from "@ethersproject/bignumber"; import { parseEther } from "@ethersproject/units"; -import { getAddress, isNetworkName } from "@zetachain/addresses"; -import { getZRC20Address } from "@zetachain/addresses-tools"; -import { ethers } from "hardhat"; -import { network } from "hardhat"; +import { getAddress, getZRC20Address, isProtocolNetworkName } from "@zetachain/protocol-contracts"; +import { ethers, network } from "hardhat"; +import { getZEVMAppAddress } from "../address.helpers"; import { getSwapData } from "./helpers"; const main = async () => { - if (!isNetworkName(network.name) || !network.name) throw new Error("Invalid network name"); - const ZRC20Addresses = getZRC20Address(); + if (!isProtocolNetworkName(network.name)) throw new Error("Invalid network name"); - const destinationToken = network.name == "goerli" ? ZRC20Addresses["tMATIC"] : ZRC20Addresses["gETH"]; + const destinationToken = + network.name == "goerli_testnet" ? getZRC20Address("mumbai_testnet") : getZRC20Address("goerli_testnet"); console.log(`Swapping native token...`); const [signer] = await ethers.getSigners(); - const zetaSwapAddress = getAddress({ - address: "zetaSwap", - networkName: "athens", - zetaNetwork: "athens" - }); + const zetaSwapAddress = getZEVMAppAddress("zetaSwap"); - const tssAddress = getAddress({ - address: "tss", - networkName: network.name, - zetaNetwork: "athens" - }); + const tssAddress = getAddress("tss", network.name); const data = getSwapData(zetaSwapAddress, signer.address, destinationToken, BigNumber.from("0")); diff --git a/packages/zevm-app-contracts/test/LiquidityIncentives.spec.ts b/packages/zevm-app-contracts/test/LiquidityIncentives.spec.ts index 743460f8..55c92d3c 100644 --- a/packages/zevm-app-contracts/test/LiquidityIncentives.spec.ts +++ b/packages/zevm-app-contracts/test/LiquidityIncentives.spec.ts @@ -2,7 +2,7 @@ import { BigNumber } from "@ethersproject/bignumber"; import { AddressZero } from "@ethersproject/constants"; import { parseUnits } from "@ethersproject/units"; import { SignerWithAddress } from "@nomiclabs/hardhat-ethers/signers"; -import { getAddress as getAddressLib } from "@zetachain/addresses"; +import { getNonZetaAddress } from "@zetachain/protocol-contracts"; import { expect } from "chai"; import { parseEther } from "ethers/lib/utils"; import { ethers, network } from "hardhat"; @@ -52,23 +52,11 @@ describe("LiquidityIncentives tests", () => { await network.provider.send("hardhat_setBalance", [deployer.address, parseUnits("1000000").toHexString()]); - const uniswapRouterAddr = getAddressLib({ - address: "uniswapV2Router02", - networkName: "eth-mainnet", - zetaNetwork: "mainnet" - }); + const uniswapRouterAddr = getNonZetaAddress("uniswapV2Router02", "eth_mainnet"); - const uniswapFactoryAddr = getAddressLib({ - address: "uniswapV2Factory", - networkName: "eth-mainnet", - zetaNetwork: "mainnet" - }); + const uniswapFactoryAddr = getNonZetaAddress("uniswapV2Factory", "eth_mainnet"); - const wGasToken = getAddressLib({ - address: "weth9", - networkName: "eth-mainnet", - zetaNetwork: "mainnet" - }); + const wGasToken = getNonZetaAddress("weth9", "eth_mainnet"); ZETA = (await ethers.getContractAt("IWETH", wGasToken)) as IWETH; ZETA_ERC20 = (await ethers.getContractAt("ERC20", wGasToken)) as ERC20; diff --git a/packages/zevm-example-contracts/test/MultipleOutput.spec.ts b/packages/zevm-app-contracts/test/MultipleOutput.spec.ts similarity index 89% rename from packages/zevm-example-contracts/test/MultipleOutput.spec.ts rename to packages/zevm-app-contracts/test/MultipleOutput.spec.ts index 0d5be5bb..fa48e54c 100644 --- a/packages/zevm-example-contracts/test/MultipleOutput.spec.ts +++ b/packages/zevm-app-contracts/test/MultipleOutput.spec.ts @@ -1,6 +1,6 @@ import { parseUnits } from "@ethersproject/units"; import { SignerWithAddress } from "@nomiclabs/hardhat-ethers/signers"; -import { getAddress as getAddressLib } from "@zetachain/addresses"; +import { getNonZetaAddress } from "@zetachain/protocol-contracts"; import { expect } from "chai"; import { ethers, network } from "hardhat"; @@ -22,23 +22,11 @@ describe("ZetaSwap tests", () => { await network.provider.send("hardhat_setBalance", [deployer.address, parseUnits("1000000").toHexString()]); - const uniswapRouterAddr = getAddressLib({ - address: "uniswapV2Router02", - networkName: "eth-mainnet", - zetaNetwork: "mainnet" - }); + const uniswapRouterAddr = getNonZetaAddress("uniswapV2Router02", "eth_mainnet"); - const uniswapFactoryAddr = getAddressLib({ - address: "uniswapV2Factory", - networkName: "eth-mainnet", - zetaNetwork: "mainnet" - }); + const uniswapFactoryAddr = getNonZetaAddress("uniswapV2Factory", "eth_mainnet"); - const wGasToken = getAddressLib({ - address: "weth9", - networkName: "eth-mainnet", - zetaNetwork: "mainnet" - }); + const wGasToken = getNonZetaAddress("weth9", "eth_mainnet"); const evmSetupResult = await evmSetup(wGasToken, uniswapFactoryAddr, uniswapRouterAddr); ZRC20Contracts = evmSetupResult.ZRC20Contracts; diff --git a/packages/zevm-app-contracts/test/Swap.spec.ts b/packages/zevm-app-contracts/test/Swap.spec.ts index 355b2f85..a784c744 100644 --- a/packages/zevm-app-contracts/test/Swap.spec.ts +++ b/packages/zevm-app-contracts/test/Swap.spec.ts @@ -1,11 +1,11 @@ import { BigNumber } from "@ethersproject/bignumber"; import { parseUnits } from "@ethersproject/units"; import { SignerWithAddress } from "@nomiclabs/hardhat-ethers/signers"; -import { getAddress as getAddressLib } from "@zetachain/addresses"; +import { getNonZetaAddress } from "@zetachain/protocol-contracts"; import { expect } from "chai"; import { ethers, network } from "hardhat"; -import { evmSetup } from "../../zevm-example-contracts/test/test.helpers"; +import { getBitcoinTxMemoForTest, getSwapParams } from "../scripts/zeta-swap/helpers"; import { MockSystemContract, MockZRC20, @@ -13,8 +13,8 @@ import { ZetaSwap__factory, ZetaSwapBtcInbound, ZetaSwapBtcInbound__factory -} from "../../zevm-example-contracts/typechain-types"; -import { getBitcoinTxMemoForTest, getSwapParams } from "../scripts/zeta-swap/helpers"; +} from "../typechain-types"; +import { evmSetup } from "./test.helpers"; describe("ZetaSwap tests", () => { let zetaSwapContract: ZetaSwap; @@ -31,23 +31,11 @@ describe("ZetaSwap tests", () => { await network.provider.send("hardhat_setBalance", [deployer.address, parseUnits("1000000").toHexString()]); - const uniswapRouterAddr = getAddressLib({ - address: "uniswapV2Router02", - networkName: "eth-mainnet", - zetaNetwork: "mainnet" - }); + const uniswapRouterAddr = getNonZetaAddress("uniswapV2Router02", "eth_mainnet"); - const uniswapFactoryAddr = getAddressLib({ - address: "uniswapV2Factory", - networkName: "eth-mainnet", - zetaNetwork: "mainnet" - }); + const uniswapFactoryAddr = getNonZetaAddress("uniswapV2Factory", "eth_mainnet"); - const wGasToken = getAddressLib({ - address: "weth9", - networkName: "eth-mainnet", - zetaNetwork: "mainnet" - }); + const wGasToken = getNonZetaAddress("weth9", "eth_mainnet"); const evmSetupResult = await evmSetup(wGasToken, uniswapFactoryAddr, uniswapRouterAddr); ZRC20Contracts = evmSetupResult.ZRC20Contracts; diff --git a/packages/zevm-example-contracts/.env.example b/packages/zevm-example-contracts/.env.example deleted file mode 100644 index d53e3d1a..00000000 --- a/packages/zevm-example-contracts/.env.example +++ /dev/null @@ -1,2 +0,0 @@ -ALCHEMY_API_KEY_MAINNET= -ALCHEMY_API_KEY_GOERLI= \ No newline at end of file diff --git a/packages/zevm-example-contracts/.eslintrc.js b/packages/zevm-example-contracts/.eslintrc.js deleted file mode 100644 index 77b8f69a..00000000 --- a/packages/zevm-example-contracts/.eslintrc.js +++ /dev/null @@ -1,23 +0,0 @@ -const path = require("path"); - -const OFF = 0; - -module.exports = { - env: { - browser: false, - es2021: true, - mocha: true, - node: true, - }, - extends: ["../../.eslintrc.js"], - rules: { - "no-console": OFF, - }, - settings: { - "import/resolver": { - typescript: { - project: path.join(__dirname, "tsconfig.json"), - }, - }, - }, -}; diff --git a/packages/zevm-example-contracts/README.md b/packages/zevm-example-contracts/README.md deleted file mode 100644 index 84728dbb..00000000 --- a/packages/zevm-example-contracts/README.md +++ /dev/null @@ -1,16 +0,0 @@ -# ZetaEVM Example contracts - -> ⚠️ The contracts **are not audited yet**, use at your own risk. - -## Environment variables - -Follow the template in `.env.example`. - -* The private key should **not** include `0x`. -* To verify your contracts, you'll need api keys both in BSCScan and Etherscan. - -## Running Tests - -```bash - yarn test -``` diff --git a/packages/zevm-example-contracts/contracts/shared/BytesHelperLib.sol b/packages/zevm-example-contracts/contracts/shared/BytesHelperLib.sol deleted file mode 100644 index 122de889..00000000 --- a/packages/zevm-example-contracts/contracts/shared/BytesHelperLib.sol +++ /dev/null @@ -1,22 +0,0 @@ -// SPDX-License-Identifier: UNLICENSED -pragma solidity =0.8.7; - -library BytesHelperLib { - function bytesToAddress(bytes calldata data, uint256 offset) internal pure returns (address output) { - bytes memory b = data[offset:offset + 20]; - assembly { - output := mload(add(b, 20)) - } - } - - function bytesToUint32(bytes calldata data, uint256 offset) internal pure returns (uint32 output) { - bytes memory b = data[offset:offset + 4]; - assembly { - output := mload(add(b, 4)) - } - } - - function addressToBytes(address someAddress) internal pure returns (bytes32) { - return bytes32(uint256(uint160(someAddress))); - } -} diff --git a/packages/zevm-example-contracts/contracts/shared/MockSystemContract.sol b/packages/zevm-example-contracts/contracts/shared/MockSystemContract.sol deleted file mode 100644 index 0687e73a..00000000 --- a/packages/zevm-example-contracts/contracts/shared/MockSystemContract.sol +++ /dev/null @@ -1,60 +0,0 @@ -// SPDX-License-Identifier: MIT -pragma solidity 0.8.7; - -import "@zetachain/protocol-contracts/contracts/zevm/interfaces/zContract.sol"; -import "@zetachain/protocol-contracts/contracts/zevm/interfaces/IZRC20.sol"; - -interface SystemContractErrors { - error CallerIsNotFungibleModule(); - - error InvalidTarget(); - - error CantBeIdenticalAddresses(); - - error CantBeZeroAddress(); -} - -contract MockSystemContract is SystemContractErrors { - mapping(uint256 => uint256) public gasPriceByChainId; - mapping(uint256 => address) public gasCoinZRC20ByChainId; - mapping(uint256 => address) public gasZetaPoolByChainId; - - address public wZetaContractAddress; - address public uniswapv2FactoryAddress; - address public uniswapv2Router02Address; - - event SystemContractDeployed(); - event SetGasPrice(uint256, uint256); - event SetGasCoin(uint256, address); - event SetGasZetaPool(uint256, address); - event SetWZeta(address); - - constructor(address wzeta_, address uniswapv2Factory_, address uniswapv2Router02_) { - wZetaContractAddress = wzeta_; - uniswapv2FactoryAddress = uniswapv2Factory_; - uniswapv2Router02Address = uniswapv2Router02_; - emit SystemContractDeployed(); - } - - // fungible module updates the gas price oracle periodically - function setGasPrice(uint256 chainID, uint256 price) external { - gasPriceByChainId[chainID] = price; - emit SetGasPrice(chainID, price); - } - - function setGasCoinZRC20(uint256 chainID, address zrc20) external { - gasCoinZRC20ByChainId[chainID] = zrc20; - emit SetGasCoin(chainID, zrc20); - } - - function setWZETAContractAddress(address addr) external { - wZetaContractAddress = addr; - emit SetWZeta(wZetaContractAddress); - } - - function onCrossChainCall(address target, address zrc20, uint256 amount, bytes calldata message) external { - zContext memory context = zContext({sender: msg.sender, origin: "", chainID: block.chainid}); - IZRC20(zrc20).transfer(target, amount); - zContract(target).onCrossChainCall(context, zrc20, amount, message); - } -} diff --git a/packages/zevm-example-contracts/contracts/shared/MockZRC20.sol b/packages/zevm-example-contracts/contracts/shared/MockZRC20.sol deleted file mode 100644 index 49f5f334..00000000 --- a/packages/zevm-example-contracts/contracts/shared/MockZRC20.sol +++ /dev/null @@ -1,33 +0,0 @@ -// SPDX-License-Identifier: MIT -pragma solidity =0.8.7; - -import "@openzeppelin/contracts/token/ERC20/ERC20.sol"; -import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; - -import "./BytesHelperLib.sol"; - -contract MockZRC20 is ERC20 { - constructor(uint256 initialSupply, string memory name, string memory symbol) ERC20(name, symbol) { - _mint(msg.sender, initialSupply * (10 ** uint256(decimals()))); - } - - function deposit(address to, uint256 amount) external returns (bool) { - return true; - } - - function bytesToAddress(bytes calldata data, uint256 offset, uint256 size) public pure returns (address output) { - bytes memory b = data[offset:offset + size]; - assembly { - output := mload(add(b, size)) - } - } - - function withdraw(bytes calldata to, uint256 amount) external returns (bool) { - address toAddress = BytesHelperLib.bytesToAddress(to, 12); - return transfer(toAddress, amount); - } - - function withdrawGasFee() external view returns (address, uint256) { - return (address(this), 0); - } -} diff --git a/packages/zevm-example-contracts/contracts/shared/SwapHelperLib.sol b/packages/zevm-example-contracts/contracts/shared/SwapHelperLib.sol deleted file mode 100644 index 59f18880..00000000 --- a/packages/zevm-example-contracts/contracts/shared/SwapHelperLib.sol +++ /dev/null @@ -1,93 +0,0 @@ -// SPDX-License-Identifier: UNLICENSED -pragma solidity =0.8.7; - -import "@uniswap/v2-periphery/contracts/interfaces/IUniswapV2Router02.sol"; -import "@uniswap/v2-periphery/contracts/interfaces/IUniswapV2Router01.sol"; -import "@zetachain/protocol-contracts/contracts/zevm/interfaces/IZRC20.sol"; - -library SwapHelperLib { - uint16 internal constant MAX_DEADLINE = 200; - - error WrongGasContract(); - - error NotEnoughToPayGasFee(); - - error CantBeIdenticalAddresses(); - - error CantBeZeroAddress(); - - // returns sorted token addresses, used to handle return values from pairs sorted in this order - function sortTokens(address tokenA, address tokenB) internal pure returns (address token0, address token1) { - if (tokenA == tokenB) revert CantBeIdenticalAddresses(); - (token0, token1) = tokenA < tokenB ? (tokenA, tokenB) : (tokenB, tokenA); - if (token0 == address(0)) revert CantBeZeroAddress(); - } - - // calculates the CREATE2 address for a pair without making any external calls - function uniswapv2PairFor(address factory, address tokenA, address tokenB) public pure returns (address pair) { - (address token0, address token1) = sortTokens(tokenA, tokenB); - pair = address( - uint160( - uint256( - keccak256( - abi.encodePacked( - hex"ff", - factory, - keccak256(abi.encodePacked(token0, token1)), - hex"96e8ac4277198ff8b6f785478aa9a39f403cb768dd02cbee326c3e7da348845f" // init code hash - ) - ) - ) - ) - ); - } - - function _doWithdrawal(address targetZRC20, uint256 amount, bytes32 receipient) internal { - (address gasZRC20, uint256 gasFee) = IZRC20(targetZRC20).withdrawGasFee(); - - if (gasZRC20 != targetZRC20) revert WrongGasContract(); - if (gasFee >= amount) revert NotEnoughToPayGasFee(); - - IZRC20(targetZRC20).approve(targetZRC20, gasFee); - IZRC20(targetZRC20).withdraw(abi.encodePacked(receipient), amount - gasFee); - } - - function _existsPairPool(address uniswapV2Factory, address zrc20A, address zrc20B) internal view returns (bool) { - address uniswapPool = uniswapv2PairFor(uniswapV2Factory, zrc20A, zrc20B); - return IZRC20(zrc20A).balanceOf(uniswapPool) > 0 && IZRC20(zrc20B).balanceOf(uniswapPool) > 0; - } - - function _doSwap( - address zetaToken, - address uniswapV2Factory, - address uniswapV2Router, - address zrc20, - uint256 amount, - address targetZRC20, - uint256 minAmountOut - ) internal returns (uint256) { - bool existsPairPool = _existsPairPool(uniswapV2Factory, zrc20, targetZRC20); - - address[] memory path; - if (existsPairPool) { - path = new address[](2); - path[0] = zrc20; - path[1] = targetZRC20; - } else { - path = new address[](3); - path[0] = zrc20; - path[1] = zetaToken; - path[2] = targetZRC20; - } - - IZRC20(zrc20).approve(address(uniswapV2Router), amount); - uint256[] memory amounts = IUniswapV2Router01(uniswapV2Router).swapExactTokensForTokens( - amount, - minAmountOut, - path, - address(this), - block.timestamp + MAX_DEADLINE - ); - return amounts[path.length - 1]; - } -} diff --git a/packages/zevm-example-contracts/contracts/shared/TestContracts.sol b/packages/zevm-example-contracts/contracts/shared/TestContracts.sol deleted file mode 100644 index 2c222aa8..00000000 --- a/packages/zevm-example-contracts/contracts/shared/TestContracts.sol +++ /dev/null @@ -1,8 +0,0 @@ -// SPDX-License-Identifier: MIT -pragma solidity 0.8.7; - -/** - * @dev Contracts that need to be compiled for testing purposes - */ - -import "@openzeppelin/contracts/token/ERC20/ERC20.sol"; diff --git a/packages/zevm-example-contracts/contracts/shared/TestUniswapContracts.sol b/packages/zevm-example-contracts/contracts/shared/TestUniswapContracts.sol deleted file mode 100644 index 53520a08..00000000 --- a/packages/zevm-example-contracts/contracts/shared/TestUniswapContracts.sol +++ /dev/null @@ -1,10 +0,0 @@ -// SPDX-License-Identifier: MIT -pragma solidity 0.6.6; - -/** - * @dev Contracts that need to be compiled for testing purposes - */ - -import "@uniswap/v2-core/contracts/interfaces/IUniswapV2Factory.sol"; -import "@uniswap/v2-core/contracts/interfaces/IUniswapV2Pair.sol"; -import "@uniswap/v2-periphery/contracts/UniswapV2Router02.sol"; diff --git a/packages/zevm-example-contracts/hardhat.config.ts b/packages/zevm-example-contracts/hardhat.config.ts deleted file mode 100644 index 53562131..00000000 --- a/packages/zevm-example-contracts/hardhat.config.ts +++ /dev/null @@ -1,46 +0,0 @@ -import "@nomiclabs/hardhat-etherscan"; -import "@nomiclabs/hardhat-waffle"; -import "@typechain/hardhat"; -import "hardhat-gas-reporter"; -import "solidity-coverage"; -import "tsconfig-paths/register"; - -import { getHardhatConfigNetworks, getHardhatConfigScanners } from "@zetachain/addresses-tools/src/networks"; -import * as dotenv from "dotenv"; -import type { HardhatUserConfig } from "hardhat/types"; - -dotenv.config(); - -const PRIVATE_KEYS = process.env.PRIVATE_KEY !== undefined ? [`0x${process.env.PRIVATE_KEY}`] : []; - -const config: HardhatUserConfig = { - etherscan: { - ...getHardhatConfigScanners(), - }, - gasReporter: { - currency: "USD", - enabled: process.env.REPORT_GAS !== undefined, - }, - networks: { - ...getHardhatConfigNetworks(PRIVATE_KEYS), - }, - solidity: { - compilers: [ - { version: "0.5.10" /** For create2 factory */ }, - { version: "0.6.6" /** For uniswap v2 */ }, - { version: "0.8.7" }, - ], - settings: { - /** - * @see {@link https://smock.readthedocs.io/en/latest/getting-started.html} - */ - outputSelection: { - "*": { - "*": ["storageLayout"], - }, - }, - }, - }, -}; - -export default config; diff --git a/packages/zevm-example-contracts/package.json b/packages/zevm-example-contracts/package.json deleted file mode 100644 index 1a91e45d..00000000 --- a/packages/zevm-example-contracts/package.json +++ /dev/null @@ -1,39 +0,0 @@ -{ - "name": "@zetachain/zevm-example-contracts", - "version": "0.0.1", - "license": "MIT", - "author": "zetachain", - "publishConfig": { - "access": "public", - "registry": "https://registry.npmjs.org/" - }, - "scripts": { - "clean": "npx hardhat clean", - "compile": "npx hardhat compile", - "prepublishOnly": "echo 'This package has no prepublishOnly tasks.'", - "multi-chain-swap:deploy-local": "ZETA_NETWORK=troy EXECUTE_PROGRAMMATICALLY=true npx hardhat run scripts/multi-chain-swap/deploy.ts --network hardhat", - "multi-chain-swap:deploy": "ZETA_NETWORK=athens EXECUTE_PROGRAMMATICALLY=true npx hardhat run scripts/multi-chain-swap/deploy.ts", - "lint:fix": "npm run lint:js:fix && npm run lint:sol:fix", - "lint:js:fix": "eslint --ext .js,.ts . --fix", - "lint:js": "eslint --ext .js,.ts .", - "lint:sol:fix": "prettier --write \"contracts/**/*.sol\"", - "lint:sol": "solhint 'contracts/**/*.sol' && prettier -c 'contracts/**/*.sol'", - "lint": "npm run lint:js && npm run lint:sol", - "test:watch": "echo You need to install `entr` to run this command && find contracts/**/** lib/**/** test/**/** -iname '*.sol' -o -iname '*.ts' | entr -cnr npx hardhat test", - "test": "npx hardhat test", - "tsc:watch": "npx tsc --watch" - }, - "devDependencies": { - "hardhat-gas-reporter": "^1.0.8", - "solidity-coverage": "^0.7.20", - "tsconfig-paths": "^3.14.1" - }, - "dependencies": { - "@openzeppelin/contracts": "^4.8.3", - "@uniswap/v2-periphery": "1.1.0-beta.0", - "@zetachain/addresses": "workspace:^", - "@zetachain/addresses-tools": "workspace:^", - "@zetachain/protocol-contracts": "^2.1.0", - "ethers": "5.6.8" - } -} diff --git a/packages/zevm-example-contracts/scripts/multi-output/deploy.ts b/packages/zevm-example-contracts/scripts/multi-output/deploy.ts deleted file mode 100644 index 63847095..00000000 --- a/packages/zevm-example-contracts/scripts/multi-output/deploy.ts +++ /dev/null @@ -1,20 +0,0 @@ -import { getSystemContractAddress } from "@zetachain/addresses-tools"; -import { ethers } from "hardhat"; - -import { ZetaMultiOutput, ZetaMultiOutput__factory } from "../../typechain-types"; - -const main = async () => { - console.log(`Deploying MultiOutput...`); - const SYSTEM_CONTRACT = getSystemContractAddress(); - - const Factory = (await ethers.getContractFactory("ZetaMultiOutput")) as ZetaMultiOutput__factory; - const contract = (await Factory.deploy(SYSTEM_CONTRACT)) as ZetaMultiOutput; - await contract.deployed(); - - console.log("Deployed MultiOutput. Address:", contract.address); -}; - -main().catch(error => { - console.error(error); - process.exit(1); -}); diff --git a/packages/zevm-example-contracts/test/test.helpers.ts b/packages/zevm-example-contracts/test/test.helpers.ts deleted file mode 100644 index 2cb1ae33..00000000 --- a/packages/zevm-example-contracts/test/test.helpers.ts +++ /dev/null @@ -1,71 +0,0 @@ -import { MaxUint256 } from "@ethersproject/constants"; -import { parseUnits } from "@ethersproject/units"; -import { SignerWithAddress } from "@nomiclabs/hardhat-ethers/signers"; -import { ethers } from "hardhat"; - -import { - MockSystemContract, - MockSystemContract__factory, - MockZRC20, - MockZRC20__factory, - UniswapV2Router02__factory -} from "../typechain-types"; - -const addZetaEthLiquidity = async (signer: SignerWithAddress, token: MockZRC20, uniswapRouterAddr: string) => { - const block = await ethers.provider.getBlock("latest"); - - const tx1 = await token.approve(uniswapRouterAddr, MaxUint256); - await tx1.wait(); - - const uniswapRouterFork = UniswapV2Router02__factory.connect(uniswapRouterAddr, signer); - - const tx2 = await uniswapRouterFork.addLiquidityETH( - token.address, - parseUnits("1000"), - 0, - 0, - signer.address, - block.timestamp + 360, - { value: parseUnits("1000") } - ); - await tx2.wait(); -}; - -interface EvmSetupResult { - ZRC20Contracts: MockZRC20[]; - systemContract: MockSystemContract; -} - -export const evmSetup = async ( - wGasToken: string, - uniswapFactoryAddr: string, - uniswapRouterAddr: string -): Promise => { - const [signer] = await ethers.getSigners(); - - const ZRC20Factory = (await ethers.getContractFactory("MockZRC20")) as MockZRC20__factory; - - const token1Contract = (await ZRC20Factory.deploy(parseUnits("1000000"), "tBNB", "tBNB")) as MockZRC20; - const token2Contract = (await ZRC20Factory.deploy(parseUnits("1000000"), "gETH", "gETH")) as MockZRC20; - const token3Contract = (await ZRC20Factory.deploy(parseUnits("1000000"), "tMATIC", "tMATIC")) as MockZRC20; - - const ZRC20Contracts = [token1Contract, token2Contract, token3Contract]; - - const SystemContractFactory = (await ethers.getContractFactory("MockSystemContract")) as MockSystemContract__factory; - - const systemContract = (await SystemContractFactory.deploy( - wGasToken, - uniswapFactoryAddr, - uniswapRouterAddr - )) as MockSystemContract; - - await systemContract.setGasCoinZRC20(97, ZRC20Contracts[0].address); - await systemContract.setGasCoinZRC20(5, ZRC20Contracts[1].address); - await systemContract.setGasCoinZRC20(80001, ZRC20Contracts[2].address); - - await addZetaEthLiquidity(signer, ZRC20Contracts[0], uniswapRouterAddr); - await addZetaEthLiquidity(signer, ZRC20Contracts[1], uniswapRouterAddr); - await addZetaEthLiquidity(signer, ZRC20Contracts[2], uniswapRouterAddr); - - return { ZRC20Contracts, systemContract }; -}; diff --git a/packages/zevm-example-contracts/tsconfig.json b/packages/zevm-example-contracts/tsconfig.json deleted file mode 100644 index 355cfda5..00000000 --- a/packages/zevm-example-contracts/tsconfig.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "extends": "../../tsconfig.json", - "include": ["./scripts", "./lib", "./test", "./tests", "./typechain", "./**/*.json", "typechain-types"], - "exclude": ["artifacts", "cache"], - "files": ["./hardhat.config.ts"], - "compilerOptions": { - "baseUrl": ".", - "paths": { - "@zetachain/addresses": ["../addresses/src/index"], - "@zetachain/addresses/*": ["../addresses/src/*"], - "@zetachain/interfaces": ["../interfaces/src/index"] - } - } -} diff --git a/yarn.lock b/yarn.lock index b95cdf61..be28d256 100644 --- a/yarn.lock +++ b/yarn.lock @@ -308,13 +308,6 @@ __metadata: languageName: node linkType: hard -"@esbuild/linux-loong64@npm:0.15.7": - version: 0.15.7 - resolution: "@esbuild/linux-loong64@npm:0.15.7" - conditions: os=linux & cpu=loong64 - languageName: node - linkType: hard - "@eslint/eslintrc@npm:^1.2.1": version: 1.2.1 resolution: "@eslint/eslintrc@npm:1.2.1" @@ -1310,58 +1303,6 @@ __metadata: languageName: node linkType: hard -"@microsoft/api-extractor-model@npm:7.24.0": - version: 7.24.0 - resolution: "@microsoft/api-extractor-model@npm:7.24.0" - dependencies: - "@microsoft/tsdoc": 0.14.1 - "@microsoft/tsdoc-config": ~0.16.1 - "@rushstack/node-core-library": 3.51.1 - checksum: d683ca227ed79f0bd8725caba190bb281b1f2088602268cbecd5d8dd690c601034c447a35e22f63866f79544f9648bc46631e0d724c3e54bc7438591e1f4312f - languageName: node - linkType: hard - -"@microsoft/api-extractor@npm:^7.20.0": - version: 7.30.0 - resolution: "@microsoft/api-extractor@npm:7.30.0" - dependencies: - "@microsoft/api-extractor-model": 7.24.0 - "@microsoft/tsdoc": 0.14.1 - "@microsoft/tsdoc-config": ~0.16.1 - "@rushstack/node-core-library": 3.51.1 - "@rushstack/rig-package": 0.3.14 - "@rushstack/ts-command-line": 4.12.2 - colors: ~1.2.1 - lodash: ~4.17.15 - resolve: ~1.17.0 - semver: ~7.3.0 - source-map: ~0.6.1 - typescript: ~4.7.4 - bin: - api-extractor: bin/api-extractor - checksum: e53ec885d0c645a7202d2e5849bb4a62dbdbb894c66cc21b118e74a043bb0a121fa7f846d08ab4924cb7a5c8eb5cef244d9ba55758718f6670f27604a1894a16 - languageName: node - linkType: hard - -"@microsoft/tsdoc-config@npm:~0.16.1": - version: 0.16.1 - resolution: "@microsoft/tsdoc-config@npm:0.16.1" - dependencies: - "@microsoft/tsdoc": 0.14.1 - ajv: ~6.12.6 - jju: ~1.4.0 - resolve: ~1.19.0 - checksum: 2b2121803caf6584fe0264ad16f8fa10de68438c0b82bd25f918606052af5312050f38b6abd4bcf3d40f120713aab144762a7a280fa22dd12e5571cd08e348e1 - languageName: node - linkType: hard - -"@microsoft/tsdoc@npm:0.14.1": - version: 0.14.1 - resolution: "@microsoft/tsdoc@npm:0.14.1" - checksum: e4ad038ccff2cd96e0d53ee42e2136f0f5a925b16cfda14261f1c2eb55ba0088a0e3b08ff819b476ddc69b2242a391925fab7f6ae2afabb19b96f87e19c114fc - languageName: node - linkType: hard - "@noble/hashes@npm:1.0.0, @noble/hashes@npm:~1.0.0": version: 1.0.0 resolution: "@noble/hashes@npm:1.0.0" @@ -1730,13 +1671,6 @@ __metadata: languageName: node linkType: hard -"@openzeppelin/contracts@npm:3.4.1-solc-0.7-2": - version: 3.4.1-solc-0.7-2 - resolution: "@openzeppelin/contracts@npm:3.4.1-solc-0.7-2" - checksum: 3608a4065f65946117caa543ef72477ce637bd5cc4f4853303b5f5b6c26516f8b50898ea3a8486e2877689cae81453ce22c72c8624c77c363c63f019b4086ffa - languageName: node - linkType: hard - "@openzeppelin/contracts@npm:4.8.3, @openzeppelin/contracts@npm:^4.8.3": version: 4.8.3 resolution: "@openzeppelin/contracts@npm:4.8.3" @@ -1789,44 +1723,6 @@ __metadata: languageName: node linkType: hard -"@rushstack/node-core-library@npm:3.51.1, @rushstack/node-core-library@npm:^3.45.1": - version: 3.51.1 - resolution: "@rushstack/node-core-library@npm:3.51.1" - dependencies: - "@types/node": 12.20.24 - colors: ~1.2.1 - fs-extra: ~7.0.1 - import-lazy: ~4.0.0 - jju: ~1.4.0 - resolve: ~1.17.0 - semver: ~7.3.0 - z-schema: ~5.0.2 - checksum: 92f7e39f03f4931a7007b4a79427d82bfe078146133a138219205abf873607898f7667fa368e3cb28c93bb1a2b9dc70ddaf2d316bc47a9a17b591d69d1025068 - languageName: node - linkType: hard - -"@rushstack/rig-package@npm:0.3.14": - version: 0.3.14 - resolution: "@rushstack/rig-package@npm:0.3.14" - dependencies: - resolve: ~1.17.0 - strip-json-comments: ~3.1.1 - checksum: 3e9c6bdfc79b4a408fbb3248593fe34e23164c4997c68b6cb905ad4a38f53ac628f90fc715c9225348cba1cf0af410bfa55ed5a58c833aa53fdde6cf4a2e0a33 - languageName: node - linkType: hard - -"@rushstack/ts-command-line@npm:4.12.2": - version: 4.12.2 - resolution: "@rushstack/ts-command-line@npm:4.12.2" - dependencies: - "@types/argparse": 1.0.38 - argparse: ~1.0.9 - colors: ~1.2.1 - string-argv: ~0.3.1 - checksum: 6ee016c7dcdc9c55cfaea5b71d8b34d942404764de72a51f2f4d50d4db51f1cc5e0df496de6b96eb9f086ab500f366f63afc33699adecf601f02bfe9a4d157f6 - languageName: node - linkType: hard - "@scure/base@npm:~1.0.0": version: 1.0.0 resolution: "@scure/base@npm:1.0.0" @@ -2018,18 +1914,6 @@ __metadata: languageName: node linkType: hard -"@ts-morph/common@npm:~0.13.0": - version: 0.13.0 - resolution: "@ts-morph/common@npm:0.13.0" - dependencies: - fast-glob: ^3.2.11 - minimatch: ^5.0.1 - mkdirp: ^1.0.4 - path-browserify: ^1.0.1 - checksum: 88b3d4b82dc6aca12741e55c6bf037f2243d14f4b9c42bbe28ed4a773ae9cd8d3ca6a6f9f827b5830c188037b0781d881a002ddb73e094fa5d5ff2a3352dc842 - languageName: node - linkType: hard - "@tsconfig/node10@npm:^1.0.7": version: 1.0.9 resolution: "@tsconfig/node10@npm:1.0.9" @@ -2099,13 +1983,6 @@ __metadata: languageName: node linkType: hard -"@types/argparse@npm:1.0.38": - version: 1.0.38 - resolution: "@types/argparse@npm:1.0.38" - checksum: 26ed7e3f1e3595efdb883a852f5205f971b798e4c28b7e30a32c5298eee596e8b45834ce831f014d250b9730819ab05acff5b31229666d3af4ba465b4697d0eb - languageName: node - linkType: hard - "@types/async-eventemitter@npm:^0.2.1": version: 0.2.1 resolution: "@types/async-eventemitter@npm:0.2.1" @@ -2294,13 +2171,6 @@ __metadata: languageName: node linkType: hard -"@types/node@npm:12.20.24": - version: 12.20.24 - resolution: "@types/node@npm:12.20.24" - checksum: e7a13460e2f5b0b5a32c0f3af7daf1a05201552a66d542d3cc3b1ea8b52d4730250f9eb1961d755e31cfe5d03c78340911a6242657a0a9a17d6f7e341fc9f366 - languageName: node - linkType: hard - "@types/node@npm:^10.0.3": version: 10.17.60 resolution: "@types/node@npm:10.17.60" @@ -2646,13 +2516,6 @@ __metadata: languageName: node linkType: hard -"@uniswap/lib@npm:^4.0.1-alpha": - version: 4.0.1-alpha - resolution: "@uniswap/lib@npm:4.0.1-alpha" - checksum: d7bbacccef40966af16c7e215ab085f575686d316b2802c9e1cfd03f7ad351970e547535670a28b2279c3cfcc4fb02888614c46f94efe2987af2309f3ec86127 - languageName: node - linkType: hard - "@uniswap/v2-core@npm:1.0.0": version: 1.0.0 resolution: "@uniswap/v2-core@npm:1.0.0" @@ -2660,13 +2523,6 @@ __metadata: languageName: node linkType: hard -"@uniswap/v2-core@npm:1.0.1": - version: 1.0.1 - resolution: "@uniswap/v2-core@npm:1.0.1" - checksum: eaa118fe45eac2e80b7468547ce2cde12bd3c8157555d2e40e0462a788c9506c6295247b511382da85e44a89ad92aff7bb3433b23bfbd2eeea23942ecd46e979 - languageName: node - linkType: hard - "@uniswap/v2-periphery@npm:1.1.0-beta.0": version: 1.1.0-beta.0 resolution: "@uniswap/v2-periphery@npm:1.1.0-beta.0" @@ -2677,67 +2533,19 @@ __metadata: languageName: node linkType: hard -"@uniswap/v3-core@npm:1.0.0": - version: 1.0.0 - resolution: "@uniswap/v3-core@npm:1.0.0" - checksum: 0e7654cfbf9885f1ca94446c3b220aeddb039af7892bc4ae94669512570ceefdf1ce6c2b0703396927d5a203d7c6c5ccaf8bd61426e52372aafb6ada64141055 - languageName: node - linkType: hard - -"@uniswap/v3-periphery@npm:1.1.0": - version: 1.1.0 - resolution: "@uniswap/v3-periphery@npm:1.1.0" +"@zetachain/networks@npm:^2.4.3": + version: 2.5.0 + resolution: "@zetachain/networks@npm:2.5.0" dependencies: - "@openzeppelin/contracts": 3.4.1-solc-0.7-2 - "@uniswap/lib": ^4.0.1-alpha - "@uniswap/v2-core": 1.0.1 - "@uniswap/v3-core": 1.0.0 - base64-sol: 1.0.1 - hardhat-watcher: ^2.1.1 - checksum: 8716e168ea04f56400a9affe579b06422778eb6c096e8d4117f6ff43aec232d224be9799f3ad3adb421894f330b17548956cf25fb5a8f95ae291e5b311ec427f + dotenv: ^16.1.4 + checksum: f208dbaa2b38e71069f8eb6ddd2b0a6d11f6f987579fcf4242b4398befa61eea381162984f14f339cee61f3a34e9463df20bfd53f3e670bb721b76c09d9840ac languageName: node linkType: hard -"@zetachain/addresses-tools@workspace:^, @zetachain/addresses-tools@workspace:packages/addresses-tools": - version: 0.0.0-use.local - resolution: "@zetachain/addresses-tools@workspace:packages/addresses-tools" - dependencies: - "@zetachain/addresses": "workspace:^" - "@zetachain/protocol-contracts": ^2.1.0 - languageName: unknown - linkType: soft - -"@zetachain/addresses@workspace:^, @zetachain/addresses@workspace:packages/addresses": - version: 0.0.0-use.local - resolution: "@zetachain/addresses@workspace:packages/addresses" - dependencies: - vite: ^3.1.0 - vite-plugin-dts: ^1.4.1 - languageName: unknown - linkType: soft - -"@zetachain/example-contracts@workspace:packages/example-contracts": - version: 0.0.0-use.local - resolution: "@zetachain/example-contracts@workspace:packages/example-contracts" - dependencies: - "@defi-wonderland/smock": ^2.3.4 - "@openzeppelin/contracts": ^4.8.3 - "@uniswap/v2-periphery": 1.1.0-beta.0 - "@uniswap/v3-periphery": 1.1.0 - "@zetachain/addresses": "workspace:^" - "@zetachain/addresses-tools": "workspace:^" - "@zetachain/protocol-contracts": ^2.1.0 - ethers: 5.6.8 - hardhat-gas-reporter: ^1.0.8 - solidity-coverage: ^0.7.20 - tsconfig-paths: ^3.14.1 - languageName: unknown - linkType: soft - -"@zetachain/protocol-contracts@npm:^2.1.0": - version: 2.1.0 - resolution: "@zetachain/protocol-contracts@npm:2.1.0" - checksum: 0b9a7c869c351eca415b6e6097f79243a3d150b57da8161ab7f7ccb969d0315e2c48d417fcdb8d71375227e58560481e3a4572e6c689224e89bd404ab519e37b +"@zetachain/protocol-contracts@npm:^3.0.1": + version: 3.0.1 + resolution: "@zetachain/protocol-contracts@npm:3.0.1" + checksum: 5a833dc9f59b69b83654754f4587aad57f4c9859908bc3fd9b5f3f6329cf803bf68e66aff4f355a99fb7e23726526196610e43987d15ec60208cc5564bc94259 languageName: node linkType: hard @@ -2747,9 +2555,8 @@ __metadata: dependencies: "@defi-wonderland/smock": ^2.3.4 "@openzeppelin/contracts": ^4.8.3 - "@zetachain/addresses": "workspace:^" - "@zetachain/addresses-tools": "workspace:^" - "@zetachain/protocol-contracts": ^2.1.0 + "@zetachain/networks": ^2.4.3 + "@zetachain/protocol-contracts": ^3.0.1 ethers: 5.6.8 hardhat-gas-reporter: ^1.0.8 solidity-coverage: ^0.7.20 @@ -2763,25 +2570,8 @@ __metadata: dependencies: "@openzeppelin/contracts": 4.8.3 "@uniswap/v2-periphery": 1.1.0-beta.0 - "@zetachain/addresses": "workspace:^" - "@zetachain/addresses-tools": "workspace:^" - "@zetachain/protocol-contracts": ^2.1.0 - ethers: 5.6.8 - hardhat-gas-reporter: ^1.0.8 - solidity-coverage: ^0.7.20 - tsconfig-paths: ^3.14.1 - languageName: unknown - linkType: soft - -"@zetachain/zevm-example-contracts@workspace:packages/zevm-example-contracts": - version: 0.0.0-use.local - resolution: "@zetachain/zevm-example-contracts@workspace:packages/zevm-example-contracts" - dependencies: - "@openzeppelin/contracts": ^4.8.3 - "@uniswap/v2-periphery": 1.1.0-beta.0 - "@zetachain/addresses": "workspace:^" - "@zetachain/addresses-tools": "workspace:^" - "@zetachain/protocol-contracts": ^2.1.0 + "@zetachain/networks": ^2.4.3 + "@zetachain/protocol-contracts": ^3.0.1 ethers: 5.6.8 hardhat-gas-reporter: ^1.0.8 solidity-coverage: ^0.7.20 @@ -2971,7 +2761,7 @@ __metadata: languageName: node linkType: hard -"ajv@npm:^6.10.0, ajv@npm:^6.12.3, ajv@npm:^6.12.4, ajv@npm:~6.12.6": +"ajv@npm:^6.10.0, ajv@npm:^6.12.3, ajv@npm:^6.12.4": version: 6.12.6 resolution: "ajv@npm:6.12.6" dependencies: @@ -3100,7 +2890,7 @@ __metadata: languageName: node linkType: hard -"argparse@npm:^1.0.7, argparse@npm:~1.0.9": +"argparse@npm:^1.0.7": version: 1.0.10 resolution: "argparse@npm:1.0.10" dependencies: @@ -3326,13 +3116,6 @@ __metadata: languageName: node linkType: hard -"base64-sol@npm:1.0.1": - version: 1.0.1 - resolution: "base64-sol@npm:1.0.1" - checksum: be0f9e8cf3c744256913223fbae8187773f530cc096e98a77f49ef0bd6cedeb294d15a784e439419f7cb99f07bf85b08999169feafafa1a9e29c3affc0bc6d0a - languageName: node - linkType: hard - "bcrypt-pbkdf@npm:^1.0.0": version: 1.0.2 resolution: "bcrypt-pbkdf@npm:1.0.2" @@ -3925,7 +3708,7 @@ __metadata: languageName: node linkType: hard -"chokidar@npm:3.5.3, chokidar@npm:^3.4.0, chokidar@npm:^3.5.3": +"chokidar@npm:3.5.3, chokidar@npm:^3.4.0": version: 3.5.3 resolution: "chokidar@npm:3.5.3" dependencies: @@ -4109,13 +3892,6 @@ __metadata: languageName: node linkType: hard -"code-block-writer@npm:^11.0.0": - version: 11.0.3 - resolution: "code-block-writer@npm:11.0.3" - checksum: f0a2605f19963d7087267c9b0fd0b05a6638a50e7b29b70f97aa01a514f59475b0626f8aa092188df853ee6d96745426dfa132d6a677795df462c6ce32c21639 - languageName: node - linkType: hard - "color-convert@npm:^1.9.0": version: 1.9.3 resolution: "color-convert@npm:1.9.3" @@ -4164,13 +3940,6 @@ __metadata: languageName: node linkType: hard -"colors@npm:~1.2.1": - version: 1.2.5 - resolution: "colors@npm:1.2.5" - checksum: b6e23de735f68b72d5cdf6fd854ca43d1b66d82dcf54bda0b788083b910164a040f2c4edf23c670d36a7a2d8f1b7d6e62e3292703e4642691e6ccaa1c62d8f74 - languageName: node - linkType: hard - "combined-stream@npm:^1.0.6, combined-stream@npm:^1.0.8, combined-stream@npm:~1.0.6": version: 1.0.8 resolution: "combined-stream@npm:1.0.8" @@ -4218,13 +3987,6 @@ __metadata: languageName: node linkType: hard -"commander@npm:^2.20.3": - version: 2.20.3 - resolution: "commander@npm:2.20.3" - checksum: ab8c07884e42c3a8dbc5dd9592c606176c7eb5c1ca5ff274bcf907039b2c41de3626f684ea75ccf4d361ba004bbaff1f577d5384c155f3871e456bdf27becf9e - languageName: node - linkType: hard - "commander@npm:^8.1.0": version: 8.3.0 resolution: "commander@npm:8.3.0" @@ -4789,6 +4551,13 @@ __metadata: languageName: node linkType: hard +"dotenv@npm:^16.1.4": + version: 16.3.1 + resolution: "dotenv@npm:16.3.1" + checksum: 15d75e7279018f4bafd0ee9706593dd14455ddb71b3bcba9c52574460b7ccaf67d5cf8b2c08a5af1a9da6db36c956a04a1192b101ee102a3e0cf8817bbcf3dfd + languageName: node + linkType: hard + "drbg.js@npm:^1.0.1": version: 1.0.1 resolution: "drbg.js@npm:1.0.1" @@ -5051,220 +4820,6 @@ __metadata: languageName: node linkType: hard -"esbuild-android-64@npm:0.15.7": - version: 0.15.7 - resolution: "esbuild-android-64@npm:0.15.7" - conditions: os=android & cpu=x64 - languageName: node - linkType: hard - -"esbuild-android-arm64@npm:0.15.7": - version: 0.15.7 - resolution: "esbuild-android-arm64@npm:0.15.7" - conditions: os=android & cpu=arm64 - languageName: node - linkType: hard - -"esbuild-darwin-64@npm:0.15.7": - version: 0.15.7 - resolution: "esbuild-darwin-64@npm:0.15.7" - conditions: os=darwin & cpu=x64 - languageName: node - linkType: hard - -"esbuild-darwin-arm64@npm:0.15.7": - version: 0.15.7 - resolution: "esbuild-darwin-arm64@npm:0.15.7" - conditions: os=darwin & cpu=arm64 - languageName: node - linkType: hard - -"esbuild-freebsd-64@npm:0.15.7": - version: 0.15.7 - resolution: "esbuild-freebsd-64@npm:0.15.7" - conditions: os=freebsd & cpu=x64 - languageName: node - linkType: hard - -"esbuild-freebsd-arm64@npm:0.15.7": - version: 0.15.7 - resolution: "esbuild-freebsd-arm64@npm:0.15.7" - conditions: os=freebsd & cpu=arm64 - languageName: node - linkType: hard - -"esbuild-linux-32@npm:0.15.7": - version: 0.15.7 - resolution: "esbuild-linux-32@npm:0.15.7" - conditions: os=linux & cpu=ia32 - languageName: node - linkType: hard - -"esbuild-linux-64@npm:0.15.7": - version: 0.15.7 - resolution: "esbuild-linux-64@npm:0.15.7" - conditions: os=linux & cpu=x64 - languageName: node - linkType: hard - -"esbuild-linux-arm64@npm:0.15.7": - version: 0.15.7 - resolution: "esbuild-linux-arm64@npm:0.15.7" - conditions: os=linux & cpu=arm64 - languageName: node - linkType: hard - -"esbuild-linux-arm@npm:0.15.7": - version: 0.15.7 - resolution: "esbuild-linux-arm@npm:0.15.7" - conditions: os=linux & cpu=arm - languageName: node - linkType: hard - -"esbuild-linux-mips64le@npm:0.15.7": - version: 0.15.7 - resolution: "esbuild-linux-mips64le@npm:0.15.7" - conditions: os=linux & cpu=mips64el - languageName: node - linkType: hard - -"esbuild-linux-ppc64le@npm:0.15.7": - version: 0.15.7 - resolution: "esbuild-linux-ppc64le@npm:0.15.7" - conditions: os=linux & cpu=ppc64 - languageName: node - linkType: hard - -"esbuild-linux-riscv64@npm:0.15.7": - version: 0.15.7 - resolution: "esbuild-linux-riscv64@npm:0.15.7" - conditions: os=linux & cpu=riscv64 - languageName: node - linkType: hard - -"esbuild-linux-s390x@npm:0.15.7": - version: 0.15.7 - resolution: "esbuild-linux-s390x@npm:0.15.7" - conditions: os=linux & cpu=s390x - languageName: node - linkType: hard - -"esbuild-netbsd-64@npm:0.15.7": - version: 0.15.7 - resolution: "esbuild-netbsd-64@npm:0.15.7" - conditions: os=netbsd & cpu=x64 - languageName: node - linkType: hard - -"esbuild-openbsd-64@npm:0.15.7": - version: 0.15.7 - resolution: "esbuild-openbsd-64@npm:0.15.7" - conditions: os=openbsd & cpu=x64 - languageName: node - linkType: hard - -"esbuild-sunos-64@npm:0.15.7": - version: 0.15.7 - resolution: "esbuild-sunos-64@npm:0.15.7" - conditions: os=sunos & cpu=x64 - languageName: node - linkType: hard - -"esbuild-windows-32@npm:0.15.7": - version: 0.15.7 - resolution: "esbuild-windows-32@npm:0.15.7" - conditions: os=win32 & cpu=ia32 - languageName: node - linkType: hard - -"esbuild-windows-64@npm:0.15.7": - version: 0.15.7 - resolution: "esbuild-windows-64@npm:0.15.7" - conditions: os=win32 & cpu=x64 - languageName: node - linkType: hard - -"esbuild-windows-arm64@npm:0.15.7": - version: 0.15.7 - resolution: "esbuild-windows-arm64@npm:0.15.7" - conditions: os=win32 & cpu=arm64 - languageName: node - linkType: hard - -"esbuild@npm:^0.15.6": - version: 0.15.7 - resolution: "esbuild@npm:0.15.7" - dependencies: - "@esbuild/linux-loong64": 0.15.7 - esbuild-android-64: 0.15.7 - esbuild-android-arm64: 0.15.7 - esbuild-darwin-64: 0.15.7 - esbuild-darwin-arm64: 0.15.7 - esbuild-freebsd-64: 0.15.7 - esbuild-freebsd-arm64: 0.15.7 - esbuild-linux-32: 0.15.7 - esbuild-linux-64: 0.15.7 - esbuild-linux-arm: 0.15.7 - esbuild-linux-arm64: 0.15.7 - esbuild-linux-mips64le: 0.15.7 - esbuild-linux-ppc64le: 0.15.7 - esbuild-linux-riscv64: 0.15.7 - esbuild-linux-s390x: 0.15.7 - esbuild-netbsd-64: 0.15.7 - esbuild-openbsd-64: 0.15.7 - esbuild-sunos-64: 0.15.7 - esbuild-windows-32: 0.15.7 - esbuild-windows-64: 0.15.7 - esbuild-windows-arm64: 0.15.7 - dependenciesMeta: - "@esbuild/linux-loong64": - optional: true - esbuild-android-64: - optional: true - esbuild-android-arm64: - optional: true - esbuild-darwin-64: - optional: true - esbuild-darwin-arm64: - optional: true - esbuild-freebsd-64: - optional: true - esbuild-freebsd-arm64: - optional: true - esbuild-linux-32: - optional: true - esbuild-linux-64: - optional: true - esbuild-linux-arm: - optional: true - esbuild-linux-arm64: - optional: true - esbuild-linux-mips64le: - optional: true - esbuild-linux-ppc64le: - optional: true - esbuild-linux-riscv64: - optional: true - esbuild-linux-s390x: - optional: true - esbuild-netbsd-64: - optional: true - esbuild-openbsd-64: - optional: true - esbuild-sunos-64: - optional: true - esbuild-windows-32: - optional: true - esbuild-windows-64: - optional: true - esbuild-windows-arm64: - optional: true - bin: - esbuild: bin/esbuild - checksum: 54ddaa6cf96798d817861b4f68cb8d176075dc09b6e0ed511c57e5db6fd86d2c673ac2ec631ad9b11678d58ad4a77cd6b7a3853b9c6eac29b7f5c6d38e42f92e - languageName: node - linkType: hard - "escalade@npm:^3.1.1": version: 3.1.1 resolution: "escalade@npm:3.1.1" @@ -6087,7 +5642,7 @@ __metadata: languageName: node linkType: hard -"fast-glob@npm:^3.0.3, fast-glob@npm:^3.2.11, fast-glob@npm:^3.2.9": +"fast-glob@npm:^3.0.3, fast-glob@npm:^3.2.9": version: 3.2.11 resolution: "fast-glob@npm:3.2.11" dependencies: @@ -6364,17 +5919,6 @@ __metadata: languageName: node linkType: hard -"fs-extra@npm:^10.0.1": - version: 10.1.0 - resolution: "fs-extra@npm:10.1.0" - dependencies: - graceful-fs: ^4.2.0 - jsonfile: ^6.0.1 - universalify: ^2.0.0 - checksum: dc94ab37096f813cc3ca12f0f1b5ad6744dfed9ed21e953d72530d103cea193c2f81584a39e9dee1bea36de5ee66805678c0dddc048e8af1427ac19c00fffc50 - languageName: node - linkType: hard - "fs-extra@npm:^4.0.2": version: 4.0.3 resolution: "fs-extra@npm:4.0.3" @@ -6386,7 +5930,7 @@ __metadata: languageName: node linkType: hard -"fs-extra@npm:^7.0.0, fs-extra@npm:^7.0.1, fs-extra@npm:~7.0.1": +"fs-extra@npm:^7.0.0, fs-extra@npm:^7.0.1": version: 7.0.1 resolution: "fs-extra@npm:7.0.1" dependencies: @@ -6912,17 +6456,6 @@ __metadata: languageName: node linkType: hard -"hardhat-watcher@npm:^2.1.1": - version: 2.3.0 - resolution: "hardhat-watcher@npm:2.3.0" - dependencies: - chokidar: ^3.5.3 - peerDependencies: - hardhat: ^2.0.0 - checksum: 9c99c8f3f476990b4b8f452d5257d2060bc0bbe21e24cd4472c0f2eb63fd71c28ca054353ccdf27947198303be768b12185ffd902d470d7a8e750945a4249eb1 - languageName: node - linkType: hard - "hardhat@npm:2.12.6": version: 2.12.6 resolution: "hardhat@npm:2.12.6" @@ -7322,13 +6855,6 @@ __metadata: languageName: node linkType: hard -"import-lazy@npm:~4.0.0": - version: 4.0.0 - resolution: "import-lazy@npm:4.0.0" - checksum: 22f5e51702134aef78890156738454f620e5fe7044b204ebc057c614888a1dd6fdf2ede0fdcca44d5c173fd64f65c985f19a51775b06967ef58cc3d26898df07 - languageName: node - linkType: hard - "imurmurhash@npm:^0.1.4": version: 0.1.4 resolution: "imurmurhash@npm:0.1.4" @@ -7508,15 +7034,6 @@ __metadata: languageName: node linkType: hard -"is-core-module@npm:^2.1.0, is-core-module@npm:^2.9.0": - version: 2.10.0 - resolution: "is-core-module@npm:2.10.0" - dependencies: - has: ^1.0.3 - checksum: 0f3f77811f430af3256fa7bbc806f9639534b140f8ee69476f632c3e1eb4e28a38be0b9d1b8ecf596179c841b53576129279df95e7051d694dac4ceb6f967593 - languageName: node - linkType: hard - "is-core-module@npm:^2.8.1": version: 2.8.1 resolution: "is-core-module@npm:2.8.1" @@ -7787,13 +7304,6 @@ __metadata: languageName: node linkType: hard -"jju@npm:~1.4.0": - version: 1.4.0 - resolution: "jju@npm:1.4.0" - checksum: 3790481bd2b7827dd6336e6e3dc2dcc6d425679ba7ebde7b679f61dceb4457ea0cda330972494de608571f4973c6dfb5f70fab6f3c5037dbab19ac449a60424f - languageName: node - linkType: hard - "js-sha3@npm:0.5.7, js-sha3@npm:^0.5.7": version: 0.5.7 resolution: "js-sha3@npm:0.5.7" @@ -8286,13 +7796,6 @@ __metadata: languageName: node linkType: hard -"lodash.get@npm:^4.4.2": - version: 4.4.2 - resolution: "lodash.get@npm:4.4.2" - checksum: e403047ddb03181c9d0e92df9556570e2b67e0f0a930fcbbbd779370972368f5568e914f913e93f3b08f6d492abc71e14d4e9b7a18916c31fa04bd2306efe545 - languageName: node - linkType: hard - "lodash.isequal@npm:^4.5.0": version: 4.5.0 resolution: "lodash.isequal@npm:4.5.0" @@ -8321,7 +7824,7 @@ __metadata: languageName: node linkType: hard -"lodash@npm:^4.17.11, lodash@npm:^4.17.14, lodash@npm:^4.17.15, lodash@npm:^4.17.19, lodash@npm:^4.17.21, lodash@npm:~4.17.15": +"lodash@npm:^4.17.11, lodash@npm:^4.17.14, lodash@npm:^4.17.15, lodash@npm:^4.17.19, lodash@npm:^4.17.21": version: 4.17.21 resolution: "lodash@npm:4.17.21" checksum: eb835a2e51d381e561e508ce932ea50a8e5a68f4ebdd771ea240d3048244a8d13658acbd502cd4829768c56f2e16bdd4340b9ea141297d472517b83868e677f7 @@ -8700,15 +8203,6 @@ __metadata: languageName: node linkType: hard -"minimatch@npm:^5.0.1": - version: 5.1.0 - resolution: "minimatch@npm:5.1.0" - dependencies: - brace-expansion: ^2.0.1 - checksum: 15ce53d31a06361e8b7a629501b5c75491bc2b59712d53e802b1987121d91b433d73fcc5be92974fde66b2b51d8fb28d75a9ae900d249feb792bb1ba2a4f0a90 - languageName: node - linkType: hard - "minimist-options@npm:^4.0.2": version: 4.1.0 resolution: "minimist-options@npm:4.1.0" @@ -9063,15 +8557,6 @@ __metadata: languageName: node linkType: hard -"nanoid@npm:^3.3.4": - version: 3.3.4 - resolution: "nanoid@npm:3.3.4" - bin: - nanoid: bin/nanoid.cjs - checksum: 2fddd6dee994b7676f008d3ffa4ab16035a754f4bb586c61df5a22cf8c8c94017aadd360368f47d653829e0569a92b129979152ff97af23a558331e47e37cd9c - languageName: node - linkType: hard - "napi-macros@npm:~2.0.0": version: 2.0.0 resolution: "napi-macros@npm:2.0.0" @@ -9647,7 +9132,7 @@ __metadata: languageName: node linkType: hard -"path-browserify@npm:^1.0.0, path-browserify@npm:^1.0.1": +"path-browserify@npm:^1.0.0": version: 1.0.1 resolution: "path-browserify@npm:1.0.1" checksum: c6d7fa376423fe35b95b2d67990060c3ee304fc815ff0a2dc1c6c3cfaff2bd0d572ee67e18f19d0ea3bbe32e8add2a05021132ac40509416459fffee35200699 @@ -9730,13 +9215,6 @@ __metadata: languageName: node linkType: hard -"picocolors@npm:^1.0.0": - version: 1.0.0 - resolution: "picocolors@npm:1.0.0" - checksum: a2e8092dd86c8396bdba9f2b5481032848525b3dc295ce9b57896f931e63fc16f79805144321f72976383fc249584672a75cc18d6777c6b757603f372f745981 - languageName: node - linkType: hard - "picomatch@npm:^2.0.4, picomatch@npm:^2.2.1, picomatch@npm:^2.3.1": version: 2.3.1 resolution: "picomatch@npm:2.3.1" @@ -9760,17 +9238,6 @@ __metadata: languageName: node linkType: hard -"postcss@npm:^8.4.16": - version: 8.4.16 - resolution: "postcss@npm:8.4.16" - dependencies: - nanoid: ^3.3.4 - picocolors: ^1.0.0 - source-map-js: ^1.0.2 - checksum: 10eee25efd77868036403858577da0cefaf2e0905feeaba5770d5438ccdddba3d01cba8063e96b8aac4c6daa0ed413dd5ae0554a433a3c4db38df1d134cffc1f - languageName: node - linkType: hard - "preferred-pm@npm:^3.0.0": version: 3.0.3 resolution: "preferred-pm@npm:3.0.3" @@ -10324,7 +9791,7 @@ __metadata: languageName: node linkType: hard -"resolve@npm:1.17.0, resolve@npm:~1.17.0": +"resolve@npm:1.17.0": version: 1.17.0 resolution: "resolve@npm:1.17.0" dependencies: @@ -10346,29 +9813,6 @@ __metadata: languageName: node linkType: hard -"resolve@npm:^1.22.1": - version: 1.22.1 - resolution: "resolve@npm:1.22.1" - dependencies: - is-core-module: ^2.9.0 - path-parse: ^1.0.7 - supports-preserve-symlinks-flag: ^1.0.0 - bin: - resolve: bin/resolve - checksum: 07af5fc1e81aa1d866cbc9e9460fbb67318a10fa3c4deadc35c3ad8a898ee9a71a86a65e4755ac3195e0ea0cfbe201eb323ebe655ce90526fd61917313a34e4e - languageName: node - linkType: hard - -"resolve@npm:~1.19.0": - version: 1.19.0 - resolution: "resolve@npm:1.19.0" - dependencies: - is-core-module: ^2.1.0 - path-parse: ^1.0.6 - checksum: a05b356e47b85ad3613d9e2a39a824f3c27f4fcad9c9ff6c7cc71a2e314c5904a90ab37481ad0069d03cab9eaaac6eb68aca1bc3355fdb05f1045cd50e2aacea - languageName: node - linkType: hard - "resolve@patch:resolve@1.1.x#~builtin": version: 1.1.7 resolution: "resolve@patch:resolve@npm%3A1.1.7#~builtin::version=1.1.7&hash=07638b" @@ -10376,7 +9820,7 @@ __metadata: languageName: node linkType: hard -"resolve@patch:resolve@1.17.0#~builtin, resolve@patch:resolve@~1.17.0#~builtin": +"resolve@patch:resolve@1.17.0#~builtin": version: 1.17.0 resolution: "resolve@patch:resolve@npm%3A1.17.0#~builtin::version=1.17.0&hash=07638b" dependencies: @@ -10398,29 +9842,6 @@ __metadata: languageName: node linkType: hard -"resolve@patch:resolve@^1.22.1#~builtin": - version: 1.22.1 - resolution: "resolve@patch:resolve@npm%3A1.22.1#~builtin::version=1.22.1&hash=07638b" - dependencies: - is-core-module: ^2.9.0 - path-parse: ^1.0.7 - supports-preserve-symlinks-flag: ^1.0.0 - bin: - resolve: bin/resolve - checksum: 5656f4d0bedcf8eb52685c1abdf8fbe73a1603bb1160a24d716e27a57f6cecbe2432ff9c89c2bd57542c3a7b9d14b1882b73bfe2e9d7849c9a4c0b8b39f02b8b - languageName: node - linkType: hard - -"resolve@patch:resolve@~1.19.0#~builtin": - version: 1.19.0 - resolution: "resolve@patch:resolve@npm%3A1.19.0#~builtin::version=1.19.0&hash=07638b" - dependencies: - is-core-module: ^2.1.0 - path-parse: ^1.0.6 - checksum: 2443b94d347e6946c87c85faf13071f605e609e0b54784829b0ed2b917d050bfc1cbaf4ecc6453f224cfa7d0c5dcd97cbb273454cd210bee68e4af15c1a5abc9 - languageName: node - linkType: hard - "responselike@npm:^1.0.2": version: 1.0.2 resolution: "responselike@npm:1.0.2" @@ -10508,20 +9929,6 @@ __metadata: languageName: node linkType: hard -"rollup@npm:~2.78.0": - version: 2.78.1 - resolution: "rollup@npm:2.78.1" - dependencies: - fsevents: ~2.3.2 - dependenciesMeta: - fsevents: - optional: true - bin: - rollup: dist/bin/rollup - checksum: 9034814383ca5bdb4bea6d499270aeb31cdb0bb884f81b0c6a1d19c63cc973f040e6ee09b7af8a7169dd231c090f4b44ef8b99c4bfdf884aceeb3dcefb8cfa14 - languageName: node - linkType: hard - "run-async@npm:^2.4.0": version: 2.4.1 resolution: "run-async@npm:2.4.1" @@ -10694,7 +10101,7 @@ __metadata: languageName: node linkType: hard -"semver@npm:^7.3.7, semver@npm:~7.3.0": +"semver@npm:^7.3.7": version: 7.3.7 resolution: "semver@npm:7.3.7" dependencies: @@ -11025,13 +10432,6 @@ __metadata: languageName: node linkType: hard -"source-map-js@npm:^1.0.2": - version: 1.0.2 - resolution: "source-map-js@npm:1.0.2" - checksum: c049a7fc4deb9a7e9b481ae3d424cc793cb4845daa690bc5a05d428bf41bf231ced49b4cf0c9e77f9d42fdb3d20d6187619fc586605f5eabe995a316da8d377c - languageName: node - linkType: hard - "source-map-support@npm:^0.5.13, source-map-support@npm:^0.5.6": version: 0.5.21 resolution: "source-map-support@npm:0.5.21" @@ -11042,7 +10442,7 @@ __metadata: languageName: node linkType: hard -"source-map@npm:^0.6.0, source-map@npm:^0.6.1, source-map@npm:~0.6.1": +"source-map@npm:^0.6.0, source-map@npm:^0.6.1": version: 0.6.1 resolution: "source-map@npm:0.6.1" checksum: 59ce8640cf3f3124f64ac289012c2b8bd377c238e316fb323ea22fbfe83da07d81e000071d7242cad7a23cd91c7de98e4df8830ec3f133cb6133a5f6e9f67bc2 @@ -11192,13 +10592,6 @@ __metadata: languageName: node linkType: hard -"string-argv@npm:~0.3.1": - version: 0.3.1 - resolution: "string-argv@npm:0.3.1" - checksum: efbd0289b599bee808ce80820dfe49c9635610715429c6b7cc50750f0437e3c2f697c81e5c390208c13b5d5d12d904a1546172a88579f6ee5cbaaaa4dc9ec5cf - languageName: node - linkType: hard - "string-format@npm:^2.0.0": version: 2.0.0 resolution: "string-format@npm:2.0.0" @@ -11357,7 +10750,7 @@ __metadata: languageName: node linkType: hard -"strip-json-comments@npm:3.1.1, strip-json-comments@npm:^3.1.0, strip-json-comments@npm:^3.1.1, strip-json-comments@npm:~3.1.1": +"strip-json-comments@npm:3.1.1, strip-json-comments@npm:^3.1.0, strip-json-comments@npm:^3.1.1": version: 3.1.1 resolution: "strip-json-comments@npm:3.1.1" checksum: 492f73e27268f9b1c122733f28ecb0e7e8d8a531a6662efbd08e22cccb3f9475e90a1b82cab06a392f6afae6d2de636f977e231296400d0ec5304ba70f166443 @@ -11639,16 +11032,6 @@ __metadata: languageName: node linkType: hard -"ts-morph@npm:^14.0.0": - version: 14.0.0 - resolution: "ts-morph@npm:14.0.0" - dependencies: - "@ts-morph/common": ~0.13.0 - code-block-writer: ^11.0.0 - checksum: e975fb245ae558c638e94014dcbbad828b904dee5a7309bfb4ef2b2922d0d7ad902ec00874a959be58991043ce655f78ae78df0d0e0d6fb3800b991b95be08ce - languageName: node - linkType: hard - "ts-node@npm:10.8.1": version: 10.8.1 resolution: "ts-node@npm:10.8.1" @@ -11935,16 +11318,6 @@ __metadata: languageName: node linkType: hard -"typescript@npm:~4.7.4": - version: 4.7.4 - resolution: "typescript@npm:4.7.4" - bin: - tsc: bin/tsc - tsserver: bin/tsserver - checksum: 5750181b1cd7e6482c4195825547e70f944114fb47e58e4aa7553e62f11b3f3173766aef9c281783edfd881f7b8299cf35e3ca8caebe73d8464528c907a164df - languageName: node - linkType: hard - "typescript@patch:typescript@^4.6.3#~builtin": version: 4.6.3 resolution: "typescript@patch:typescript@npm%3A4.6.3#~builtin::version=4.6.3&hash=bda367" @@ -11955,16 +11328,6 @@ __metadata: languageName: node linkType: hard -"typescript@patch:typescript@~4.7.4#~builtin": - version: 4.7.4 - resolution: "typescript@patch:typescript@npm%3A4.7.4#~builtin::version=4.7.4&hash=bda367" - bin: - tsc: bin/tsc - tsserver: bin/tsserver - checksum: 96d3030cb01143570567cb4f3a616b10df65f658f0e74e853e77a089a6a954e35c800be7db8b9bfe9a1ae05d9c2897e281359f65e4caa1caf266368e1c4febd3 - languageName: node - linkType: hard - "typical@npm:^4.0.0": version: 4.0.0 resolution: "typical@npm:4.0.0" @@ -12238,13 +11601,6 @@ __metadata: languageName: node linkType: hard -"validator@npm:^13.7.0": - version: 13.7.0 - resolution: "validator@npm:13.7.0" - checksum: 2b83283de1222ca549a7ef57f46e8d49c6669213348db78b7045bce36a3b5843ff1e9f709ebf74574e06223461ee1f264f8cc9a26a0060a79a27de079d8286ef - languageName: node - linkType: hard - "varint@npm:^5.0.0": version: 5.0.2 resolution: "varint@npm:5.0.2" @@ -12270,55 +11626,6 @@ __metadata: languageName: node linkType: hard -"vite-plugin-dts@npm:^1.4.1": - version: 1.4.1 - resolution: "vite-plugin-dts@npm:1.4.1" - dependencies: - "@microsoft/api-extractor": ^7.20.0 - "@rushstack/node-core-library": ^3.45.1 - chalk: ^4.1.2 - debug: ^4.3.4 - fast-glob: ^3.2.11 - fs-extra: ^10.0.1 - ts-morph: ^14.0.0 - peerDependencies: - vite: ">=2.4.4" - checksum: 39a5d25f1e5de984f85e09c85f0b6b16de82c209bfc55f59a2d6b30996f14c683462895814ec388406116a7fad4a1d374efacbf51d76a7bdaad9c9708307f982 - languageName: node - linkType: hard - -"vite@npm:^3.1.0": - version: 3.1.0 - resolution: "vite@npm:3.1.0" - dependencies: - esbuild: ^0.15.6 - fsevents: ~2.3.2 - postcss: ^8.4.16 - resolve: ^1.22.1 - rollup: ~2.78.0 - peerDependencies: - less: "*" - sass: "*" - stylus: "*" - terser: ^5.4.0 - dependenciesMeta: - fsevents: - optional: true - peerDependenciesMeta: - less: - optional: true - sass: - optional: true - stylus: - optional: true - terser: - optional: true - bin: - vite: bin/vite.js - checksum: 1a343e3d46450181f79f34ff49cca5ff59bb7472de51ea2c4a042aa076f597d27d25c49f48405e82f607af7d8c1c13a9e789402ccb1b23570132382132ec3903 - languageName: node - linkType: hard - "wcwidth@npm:^1.0.1": version: 1.0.1 resolution: "wcwidth@npm:1.0.1" @@ -13094,23 +12401,6 @@ __metadata: languageName: node linkType: hard -"z-schema@npm:~5.0.2": - version: 5.0.4 - resolution: "z-schema@npm:5.0.4" - dependencies: - commander: ^2.20.3 - lodash.get: ^4.4.2 - lodash.isequal: ^4.5.0 - validator: ^13.7.0 - dependenciesMeta: - commander: - optional: true - bin: - z-schema: bin/z-schema - checksum: afa4e0039a104a53eeb6977bf754ef44e32042aecbf3b5eb18b82649763abd5c2608e47d6d6902291359b41e76130594d7f2b6132316d819c3529f17d4d3464d - languageName: node - linkType: hard - "zetachain@workspace:.": version: 0.0.0-use.local resolution: "zetachain@workspace:." From 2b6e85b4d37400144381d52cf035329df81f0c35 Mon Sep 17 00:00:00 2001 From: Andres Martin Aiello <50411235+andresaiello@users.noreply.github.com> Date: Wed, 29 Nov 2023 18:33:58 -0300 Subject: [PATCH 100/115] Update zetachain repo to support protocol 3.0.1 (#133) --- packages/zeta-app-contracts/contracts/shared/ZetaEthMock.sol | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/zeta-app-contracts/contracts/shared/ZetaEthMock.sol b/packages/zeta-app-contracts/contracts/shared/ZetaEthMock.sol index 17d9e2eb..7840a5ea 100644 --- a/packages/zeta-app-contracts/contracts/shared/ZetaEthMock.sol +++ b/packages/zeta-app-contracts/contracts/shared/ZetaEthMock.sol @@ -6,7 +6,7 @@ import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import "@openzeppelin/contracts/utils/Context.sol"; contract ZetaEthMock is ERC20("Zeta", "ZETA") { - constructor(uint256 initialSupply) { - _mint(msg.sender, initialSupply * (10**uint256(decimals()))); + constructor(address creator, uint256 initialSupply) { + _mint(creator, initialSupply * (10 ** uint256(decimals()))); } } From 76a78154d82babd9a46fec997c643c0635e226ac Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 4 Dec 2023 14:40:15 -0300 Subject: [PATCH 101/115] Bump word-wrap from 1.2.3 to 1.2.4 (#109) Bumps [word-wrap](https://github.com/jonschlinkert/word-wrap) from 1.2.3 to 1.2.4. - [Release notes](https://github.com/jonschlinkert/word-wrap/releases) - [Commits](https://github.com/jonschlinkert/word-wrap/compare/1.2.3...1.2.4) --- updated-dependencies: - dependency-name: word-wrap dependency-type: indirect ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- yarn.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/yarn.lock b/yarn.lock index be28d256..d6d617bf 100644 --- a/yarn.lock +++ b/yarn.lock @@ -12037,9 +12037,9 @@ __metadata: linkType: hard "word-wrap@npm:^1.2.3, word-wrap@npm:~1.2.3": - version: 1.2.3 - resolution: "word-wrap@npm:1.2.3" - checksum: 30b48f91fcf12106ed3186ae4fa86a6a1842416df425be7b60485de14bec665a54a68e4b5156647dec3a70f25e84d270ca8bc8cd23182ed095f5c7206a938c1f + version: 1.2.4 + resolution: "word-wrap@npm:1.2.4" + checksum: 8f1f2e0a397c0e074ca225ba9f67baa23f99293bc064e31355d426ae91b8b3f6b5f6c1fc9ae5e9141178bb362d563f55e62fd8d5c31f2a77e3ade56cb3e35bd1 languageName: node linkType: hard From 57c49b9c7a0d67209d9dc11b0853e2994abf23d7 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 4 Dec 2023 14:46:35 -0300 Subject: [PATCH 102/115] Bump @openzeppelin/contracts from 4.8.3 to 4.9.3 (#112) * Bump @openzeppelin/contracts from 4.8.3 to 4.9.3 Bumps [@openzeppelin/contracts](https://github.com/OpenZeppelin/openzeppelin-contracts) from 4.8.3 to 4.9.3. - [Release notes](https://github.com/OpenZeppelin/openzeppelin-contracts/releases) - [Changelog](https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v4.9.3/CHANGELOG.md) - [Commits](https://github.com/OpenZeppelin/openzeppelin-contracts/compare/v4.8.3...v4.9.3) --- updated-dependencies: - dependency-name: "@openzeppelin/contracts" dependency-type: direct:production ... Signed-off-by: dependabot[bot] * format --------- Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Andres Aiello --- packages/zeta-app-contracts/package.json | 2 +- packages/zevm-app-contracts/package.json | 2 +- yarn.lock | 12 ++++++------ 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/packages/zeta-app-contracts/package.json b/packages/zeta-app-contracts/package.json index 5e7f9fe4..f91d752f 100644 --- a/packages/zeta-app-contracts/package.json +++ b/packages/zeta-app-contracts/package.json @@ -29,7 +29,7 @@ "tsconfig-paths": "^3.14.1" }, "dependencies": { - "@openzeppelin/contracts": "^4.8.3", + "@openzeppelin/contracts": "^4.9.3", "@zetachain/networks": "^2.4.3", "@zetachain/protocol-contracts": "^3.0.1", "ethers": "5.6.8" diff --git a/packages/zevm-app-contracts/package.json b/packages/zevm-app-contracts/package.json index 5eb0760b..7503aaf4 100644 --- a/packages/zevm-app-contracts/package.json +++ b/packages/zevm-app-contracts/package.json @@ -29,7 +29,7 @@ "tsconfig-paths": "^3.14.1" }, "dependencies": { - "@openzeppelin/contracts": "4.8.3", + "@openzeppelin/contracts": "4.9.3", "@uniswap/v2-periphery": "1.1.0-beta.0", "@zetachain/networks": "^2.4.3", "@zetachain/protocol-contracts": "^3.0.1", diff --git a/yarn.lock b/yarn.lock index d6d617bf..8d78f0a9 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1671,10 +1671,10 @@ __metadata: languageName: node linkType: hard -"@openzeppelin/contracts@npm:4.8.3, @openzeppelin/contracts@npm:^4.8.3": - version: 4.8.3 - resolution: "@openzeppelin/contracts@npm:4.8.3" - checksum: aea130d38d46840c5cbe3adbaa9a7ac645e4bd66ad3f3baf2fa78588c408d1a686170b3408c9e2e5e05530fba22ecdc00d7efb6b27852a8b29f91accbc0af255 +"@openzeppelin/contracts@npm:4.9.3, @openzeppelin/contracts@npm:^4.9.3": + version: 4.9.3 + resolution: "@openzeppelin/contracts@npm:4.9.3" + checksum: 4932063e733b35fa7669b9fe2053f69b062366c5c208b0c6cfa1ac451712100c78acff98120c3a4b88d94154c802be05d160d71f37e7d74cadbe150964458838 languageName: node linkType: hard @@ -2554,7 +2554,7 @@ __metadata: resolution: "@zetachain/zeta-app-contracts@workspace:packages/zeta-app-contracts" dependencies: "@defi-wonderland/smock": ^2.3.4 - "@openzeppelin/contracts": ^4.8.3 + "@openzeppelin/contracts": ^4.9.3 "@zetachain/networks": ^2.4.3 "@zetachain/protocol-contracts": ^3.0.1 ethers: 5.6.8 @@ -2568,7 +2568,7 @@ __metadata: version: 0.0.0-use.local resolution: "@zetachain/zevm-app-contracts@workspace:packages/zevm-app-contracts" dependencies: - "@openzeppelin/contracts": 4.8.3 + "@openzeppelin/contracts": 4.9.3 "@uniswap/v2-periphery": 1.1.0-beta.0 "@zetachain/networks": ^2.4.3 "@zetachain/protocol-contracts": ^3.0.1 From 181bace02e7f0607dcee97a89d0e1e444dcdc9bd Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 4 Dec 2023 14:49:34 -0300 Subject: [PATCH 103/115] Bump browserify-sign from 4.2.1 to 4.2.2 (#134) Bumps [browserify-sign](https://github.com/crypto-browserify/browserify-sign) from 4.2.1 to 4.2.2. - [Changelog](https://github.com/browserify/browserify-sign/blob/main/CHANGELOG.md) - [Commits](https://github.com/crypto-browserify/browserify-sign/compare/v4.2.1...v4.2.2) --- updated-dependencies: - dependency-name: browserify-sign dependency-type: indirect ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- yarn.lock | 35 +++++++++++++++++++++++------------ 1 file changed, 23 insertions(+), 12 deletions(-) diff --git a/yarn.lock b/yarn.lock index 8d78f0a9..6627a352 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3240,7 +3240,7 @@ __metadata: languageName: node linkType: hard -"bn.js@npm:^5.0.0, bn.js@npm:^5.1.1, bn.js@npm:^5.1.2, bn.js@npm:^5.1.3, bn.js@npm:^5.2.0": +"bn.js@npm:^5.0.0, bn.js@npm:^5.1.2, bn.js@npm:^5.1.3, bn.js@npm:^5.2.0": version: 5.2.0 resolution: "bn.js@npm:5.2.0" checksum: 6117170393200f68b35a061ecbf55d01dd989302e7b3c798a3012354fa638d124f0b2f79e63f77be5556be80322a09c40339eda6413ba7468524c0b6d4b4cb7a @@ -3392,7 +3392,7 @@ __metadata: languageName: node linkType: hard -"browserify-rsa@npm:^4.0.0, browserify-rsa@npm:^4.0.1": +"browserify-rsa@npm:^4.0.0, browserify-rsa@npm:^4.1.0": version: 4.1.0 resolution: "browserify-rsa@npm:4.1.0" dependencies: @@ -3403,19 +3403,19 @@ __metadata: linkType: hard "browserify-sign@npm:^4.0.0": - version: 4.2.1 - resolution: "browserify-sign@npm:4.2.1" + version: 4.2.2 + resolution: "browserify-sign@npm:4.2.2" dependencies: - bn.js: ^5.1.1 - browserify-rsa: ^4.0.1 + bn.js: ^5.2.1 + browserify-rsa: ^4.1.0 create-hash: ^1.2.0 create-hmac: ^1.1.7 - elliptic: ^6.5.3 + elliptic: ^6.5.4 inherits: ^2.0.4 - parse-asn1: ^5.1.5 - readable-stream: ^3.6.0 - safe-buffer: ^5.2.0 - checksum: 0221f190e3f5b2d40183fa51621be7e838d9caa329fe1ba773406b7637855f37b30f5d83e52ff8f244ed12ffe6278dd9983638609ed88c841ce547e603855707 + parse-asn1: ^5.1.6 + readable-stream: ^3.6.2 + safe-buffer: ^5.2.1 + checksum: b622730c0fc183328c3a1c9fdaaaa5118821ed6822b266fa6b0375db7e20061ebec87301d61931d79b9da9a96ada1cab317fce3c68f233e5e93ed02dbb35544c languageName: node linkType: hard @@ -9086,7 +9086,7 @@ __metadata: languageName: node linkType: hard -"parse-asn1@npm:^5.0.0, parse-asn1@npm:^5.1.5": +"parse-asn1@npm:^5.0.0, parse-asn1@npm:^5.1.6": version: 5.1.6 resolution: "parse-asn1@npm:5.1.6" dependencies: @@ -9587,6 +9587,17 @@ __metadata: languageName: node linkType: hard +"readable-stream@npm:^3.6.2": + version: 3.6.2 + resolution: "readable-stream@npm:3.6.2" + dependencies: + inherits: ^2.0.3 + string_decoder: ^1.1.1 + util-deprecate: ^1.0.1 + checksum: bdcbe6c22e846b6af075e32cf8f4751c2576238c5043169a1c221c92ee2878458a816a4ea33f4c67623c0b6827c8a400409bfb3cf0bf3381392d0b1dfb52ac8d + languageName: node + linkType: hard + "readdirp@npm:~3.2.0": version: 3.2.0 resolution: "readdirp@npm:3.2.0" From daa335a67b165bcff618ef135d9cd6b6633af21c Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 4 Dec 2023 14:50:35 -0300 Subject: [PATCH 104/115] Bump get-func-name from 2.0.0 to 2.0.2 (#135) Bumps [get-func-name](https://github.com/chaijs/get-func-name) from 2.0.0 to 2.0.2. - [Release notes](https://github.com/chaijs/get-func-name/releases) - [Commits](https://github.com/chaijs/get-func-name/commits/v2.0.2) --- updated-dependencies: - dependency-name: get-func-name dependency-type: indirect ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- yarn.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/yarn.lock b/yarn.lock index 6627a352..382bfd30 100644 --- a/yarn.lock +++ b/yarn.lock @@ -6117,9 +6117,9 @@ __metadata: linkType: hard "get-func-name@npm:^2.0.0": - version: 2.0.0 - resolution: "get-func-name@npm:2.0.0" - checksum: 8d82e69f3e7fab9e27c547945dfe5cc0c57fc0adf08ce135dddb01081d75684a03e7a0487466f478872b341d52ac763ae49e660d01ab83741f74932085f693c3 + version: 2.0.2 + resolution: "get-func-name@npm:2.0.2" + checksum: 3f62f4c23647de9d46e6f76d2b3eafe58933a9b3830c60669e4180d6c601ce1b4aa310ba8366143f55e52b139f992087a9f0647274e8745621fa2af7e0acf13b languageName: node linkType: hard From 2f39eff70c88684e5809ea7a423c1461cef8591e Mon Sep 17 00:00:00 2001 From: iwantanode <87604944+tudorpintea999@users.noreply.github.com> Date: Tue, 5 Dec 2023 19:00:06 +0200 Subject: [PATCH 105/115] fix(setup-tutorial.ts) json error (#130) JSON formatting error in setup-tutorial.ts --- scripts/setup-tutorial.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/setup-tutorial.ts b/scripts/setup-tutorial.ts index 51071c9f..0885dc8e 100644 --- a/scripts/setup-tutorial.ts +++ b/scripts/setup-tutorial.ts @@ -27,7 +27,8 @@ EXECUTE_PROGRAMMATICALLY=true`; }); } function saveWalletFile(address: string, privateKey: string, jsonPath: string): void { - const data = `{"address": "${address}", "privateKey": "${privateKey}}`; + const data = `{"address": "${address}", "privateKey": "${privateKey}"}`; + fs.access(jsonPath, err => { if (err) { From 86eb10ed1cf96ea6774cdd8656f0caabeb7e4743 Mon Sep 17 00:00:00 2001 From: Andres Martin Aiello <50411235+andresaiello@users.noreply.github.com> Date: Tue, 12 Dec 2023 12:02:45 -0300 Subject: [PATCH 106/115] feat: ci to zetachain repo (#137) * feat: ci to zetachain repo * remove unsed code * update test * remove old code * update yaml * remove unused code --- .changeset/config.json | 11 - .eslintrc.js | 3 + .../actions/build-docker-images/action.yml | 47 - .github/actions/set-branch-name/action.yml | 45 - .github/workflows/build.yml | 53 - .github/workflows/lint.yaml | 26 + .github/workflows/release.yml | 42 - .github/workflows/semantic-pr.yaml | 16 + .github/workflows/test.yaml | 32 + packages/zeta-app-contracts/hardhat.config.ts | 3 - .../MultiChainValue.helpers.ts | 6 +- .../shared/ImmutableCreate2Factory.helpers.ts | 8 +- .../lib/shared/deploy.helpers.ts | 4 +- .../scripts/multi-chain-value/deploy.ts | 2 +- .../multi-chain-value/deterministic-deploy.ts | 4 +- .../scripts/multi-chain-value/send-value.ts | 2 +- .../multi-chain-value/verify-contract.ts | 4 +- .../test/MultiChainValue.spec.ts | 4 +- packages/zeta-app-contracts/tsconfig.json | 26 +- .../scripts/disperse/deploy.ts | 2 +- .../liquidity-incentives/add-reward.ts | 6 +- .../scripts/liquidity-incentives/deploy.ts | 2 +- .../liquidity-incentives/read-rewards-data.ts | 6 +- .../uniswap/add-liquidity-zeta-uniswap.ts | 4 +- .../uniswap/remove-liquidity-zeta-uniswap.ts | 4 +- .../scripts/uniswap/sell-token.ts | 4 +- .../scripts/uniswap/sell-zeta.ts | 4 +- .../scripts/zeta-points/deploy.ts | 2 +- .../scripts/zeta-swap/deploy.ts | 2 +- .../scripts/zeta-swap/get-system-data.ts | 2 +- .../scripts/zeta-swap/helpers.ts | 10 +- .../scripts/zeta-swap/send.ts | 4 +- .../scripts/zeta-swap/stress-swap.ts | 16 +- .../scripts/zeta-swap/swap-on-zevm.ts | 4 +- .../scripts/zeta-swap/swap.ts | 4 +- .../test/LiquidityIncentives.spec.ts | 17 +- packages/zevm-app-contracts/test/Swap.spec.ts | 2 +- .../test/Synthetixio/StakingRewards.ts | 6 +- .../test/Synthetixio/common.js | 6 +- .../test/Synthetixio/utils.js | 48 +- .../zevm-app-contracts/test/test.helpers.ts | 2 +- .../test/zeta-points/InvitationManager.ts | 4 +- packages/zevm-app-contracts/tsconfig.json | 24 +- scripts/setup-tutorial.ts | 19 +- scripts/slither.ts | 2 +- tsconfig.json | 32 +- yarn.lock | 5891 +++++++++-------- 47 files changed, 3412 insertions(+), 3055 deletions(-) delete mode 100644 .changeset/config.json delete mode 100644 .github/actions/build-docker-images/action.yml delete mode 100644 .github/actions/set-branch-name/action.yml delete mode 100644 .github/workflows/build.yml create mode 100644 .github/workflows/lint.yaml delete mode 100644 .github/workflows/release.yml create mode 100644 .github/workflows/semantic-pr.yaml create mode 100644 .github/workflows/test.yaml diff --git a/.changeset/config.json b/.changeset/config.json deleted file mode 100644 index e2e93b35..00000000 --- a/.changeset/config.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "$schema": "https://unpkg.com/@changesets/config@2.0.1/schema.json", - "changelog": "@changesets/cli/changelog", - "commit": false, - "fixed": [], - "linked": [], - "access": "restricted", - "baseBranch": "main", - "updateInternalDependencies": "patch", - "ignore": [] -} \ No newline at end of file diff --git a/.eslintrc.js b/.eslintrc.js index 611893d8..a13a8dc2 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -1,5 +1,7 @@ const path = require("path"); +const OFF = 0; + /** * @type {import("eslint").Linter.Config} */ @@ -19,6 +21,7 @@ module.exports = { rules: { "@typescript-eslint/sort-type-union-intersection-members": "error", camelcase: "off", + "no-console": OFF, "simple-import-sort/exports": "error", "simple-import-sort/imports": "error", "sort-keys-fix/sort-keys-fix": "error", diff --git a/.github/actions/build-docker-images/action.yml b/.github/actions/build-docker-images/action.yml deleted file mode 100644 index b4c95635..00000000 --- a/.github/actions/build-docker-images/action.yml +++ /dev/null @@ -1,47 +0,0 @@ -name: 'Build Docker Images' -description: 'Builds Docker images and pushes them to ECR and GHCR' -inputs: - DOCKER_FILENAME: - description: 'Name of the docker file to use for the build' - required: true - REPOSITORY_NAME: - description: 'Name of the Repository' - required: true - IMAGE_TAG: - description: 'Image Tag' - required: true - GHCR_USERNAME: - description: 'Username for GitHub Container Registry' - required: true - GHCR_TOKEN: - description: 'Token for GitHub Container Registry' - required: true - -runs: - using: "composite" - - steps: - - name: Set Environment Variables" - run: | - echo "DOCKER_FILENAME=${{ inputs.DOCKER_FILENAME }}" >> $GITHUB_ENV - echo "REPOSITORY_NAME=${{ inputs.REPOSITORY_NAME }}" >> $GITHUB_ENV - echo "IMAGE_TAG=${{ inputs.IMAGE_TAG }}" >> $GITHUB_ENV - echo "GHCR_USERNAME=${{ inputs.GHCR_USERNAME }}" >> $GITHUB_ENV - echo "GHCR_TOKEN=${{ inputs.GHCR_TOKEN }}" >> $GITHUB_ENV - shell: bash - - - name: Log in to the GitHub Container Registry - id: login-ghcr - uses: docker/login-action@v2 - with: - registry: ghcr.io - username: ${{ env.GHCR_USERNAME }} - password: ${{ env.GHCR_TOKEN }} - - - name: Build, tag, and push images - shell: bash - env: - GHCR_REGISTRY: ghcr.io/zeta-chain - run: | - docker build -f $DOCKER_FILENAME -t $GHCR_REGISTRY/$REPOSITORY_NAME:$IMAGE_TAG . - docker push $GHCR_REGISTRY/$REPOSITORY_NAME:$IMAGE_TAG diff --git a/.github/actions/set-branch-name/action.yml b/.github/actions/set-branch-name/action.yml deleted file mode 100644 index 28c8d788..00000000 --- a/.github/actions/set-branch-name/action.yml +++ /dev/null @@ -1,45 +0,0 @@ -name: 'SET:BRANCH:TAG:REFERENCES' -description: 'Logic to set branch-name from the event and type.' -inputs: - github_ref: - description: "github ref to use" - required: true - github_event: - description: "github event to use" - required: true - github_head_ref: - description: "github head ref to use" - required: true - github_commit_sha: - description: "github sha to use" - required: true - current_branch_name: - description: "current_branch" - required: true -runs: - using: "composite" - steps: - - uses: actions/checkout@v3 - - - name: Set branch name - id: set-branch-name - shell: bash - run: | - tag_check=`echo '${{ inputs.github_ref }}' | grep 'tags'` || echo "proceed" - if [ "${{ inputs.github_event }}" == "pull_request" ]; then - echo "Setting the current branch name to same as the source branch of the PR" - RELEASE_NAME=$(sed 's#/#-#g' <<< ${{ inputs.github_head_ref }}) - echo "RELEASE_NAME=$RELEASE_NAME" >> $GITHUB_ENV - TAG_NAME="$RELEASE_NAME-${{ inputs.github_commit_sha }}" - echo "TAG_NAME=$TAG_NAME" >> $GITHUB_ENV - elif [ "${{ inputs.github_ref }}" == "refs/heads/main" ]; then - TAG_NAME="latest" - echo "TAG_NAME=$TAG_NAME" >> $GITHUB_ENV - else - RELEASE_NAME=$(sed 's#/#-#g' <<< ${{ inputs.current_branch_name }}) - echo "RELEASE_NAME=$RELEASE_NAME" >> $GITHUB_ENV - TAG_NAME="$RELEASE_NAME-${{ inputs.github_commit_sha }}" - echo "TAG_NAME=$TAG_NAME" >> $GITHUB_ENV - fi - - diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml deleted file mode 100644 index bb49212d..00000000 --- a/.github/workflows/build.yml +++ /dev/null @@ -1,53 +0,0 @@ -name: Build - -on: - push: - branches: - - main - pull_request: - branches: - - main - - - -env: - GITHUB_REF_NAME: "$(echo ${{ github.ref_name }} | tr '//' '-')" - -jobs: - build-docker: - runs-on: ubuntu-latest - timeout-minutes: 20 - steps: - - uses: actions/checkout@v3 - - - name: setup-git-credentials - uses: de-vri-es/setup-git-credentials@v2.0.8 - with: - credentials: ${{ secrets.PAT_GITHUB_SERVICE_ACCT }} - - - name: Get branch name - id: branch-name - uses: tj-actions/branch-names@v6 - - - name: Git Hash - run: | - echo "GIT_HASH=$(git rev-parse --short HEAD)" >> ${GITHUB_ENV} - echo "WORKSPACE_DIR=$(pwd)" >> ${GITHUB_ENV} - - - name: set-branch-name - uses: ./.github/actions/set-branch-name - with: - github_ref: "${{github.ref}}" - github_event: "${{ github.event_name }}" - github_head_ref: "${{ github.event.pull_request.head.ref }}" - github_commit_sha: "${{ env.GIT_HASH }}" - current_branch_name: "${{ steps.branch-name.outputs.current_branch }}" - - - name: Build, tag, and push docker images - uses: ./.github/actions/build-docker-images - with: - DOCKER_FILENAME: Dockerfile - REPOSITORY_NAME: zetachain - IMAGE_TAG: ${{ env.TAG_NAME }} - GHCR_USERNAME: ${{ secrets.PAT_GITHUB_SERVICE_ACCT_USERNAME }} - GHCR_TOKEN: ${{ secrets.PAT_GITHUB_SERVICE_ACCT }} diff --git a/.github/workflows/lint.yaml b/.github/workflows/lint.yaml new file mode 100644 index 00000000..c951c95e --- /dev/null +++ b/.github/workflows/lint.yaml @@ -0,0 +1,26 @@ +name: Lint TS/JS + +on: + pull_request: + branches: + - "*" + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - name: Checkout Repository + uses: actions/checkout@v3 + + - name: Setup Node.js + uses: actions/setup-node@v3 + with: + node-version: "16" + registry-url: "https://registry.npmjs.org" + + - name: Install Dependencies + run: yarn install + + - name: Lint + run: yarn lint diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml deleted file mode 100644 index b6b3f128..00000000 --- a/.github/workflows/release.yml +++ /dev/null @@ -1,42 +0,0 @@ -name: Release - -on: - push: - branches: - - main - -concurrency: ${{ github.workflow }}-${{ github.ref }} - -jobs: - release: - name: Release - runs-on: ubuntu-latest - steps: - - name: Checkout Repo - uses: actions/checkout@v2 - - - name: Setup Node.js 16.x - uses: actions/setup-node@v2 - with: - node-version: 16.x - - - name: Install Dependencies - run: yarn - - # This expect to have a script called g:prepublishOnly on every package - - name: Generate dist - run: yarn g:prepublishOnly - - - name: Create Release Pull Request or Publish to npm - id: changesets - uses: changesets/action@v1 - with: - # This expects you to have a script called g:release which does a build for your packages and calls changeset publish - publish: yarn g:release - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - NPM_TOKEN: ${{ secrets.NPM_TOKEN }} - - #- name: Send a Slack notification if a publish happens - # if: steps.changesets.outputs.published == 'true' - # run: my-slack-bot send-notification --message "A new version of ${GITHUB_REPOSITORY} was published!" diff --git a/.github/workflows/semantic-pr.yaml b/.github/workflows/semantic-pr.yaml new file mode 100644 index 00000000..498b95be --- /dev/null +++ b/.github/workflows/semantic-pr.yaml @@ -0,0 +1,16 @@ +name: "Semantic PR" +on: + pull_request_target: + types: + - opened + - edited + - synchronize + +jobs: + main: + name: Validate PR title + runs-on: ubuntu-latest + steps: + - uses: amannn/action-semantic-pull-request@v5 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml new file mode 100644 index 00000000..bee83c99 --- /dev/null +++ b/.github/workflows/test.yaml @@ -0,0 +1,32 @@ +name: Test + +on: + pull_request: + branches: + - "*" + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - name: Checkout Repository + uses: actions/checkout@v3 + + - name: Setup Node.js + uses: actions/setup-node@v3 + with: + node-version: "16" + registry-url: "https://registry.npmjs.org" + + - name: Install Dependencies + run: yarn install + + - name: Test + run: yarn test + working-directory: packages/zeta-app-contracts + + - name: Test + run: yarn test + working-directory: packages/zevm-app-contracts + \ No newline at end of file diff --git a/packages/zeta-app-contracts/hardhat.config.ts b/packages/zeta-app-contracts/hardhat.config.ts index f40cd212..8d3851c6 100644 --- a/packages/zeta-app-contracts/hardhat.config.ts +++ b/packages/zeta-app-contracts/hardhat.config.ts @@ -11,8 +11,6 @@ import type { HardhatUserConfig } from "hardhat/types"; dotenv.config(); -const PRIVATE_KEYS = process.env.PRIVATE_KEY !== undefined ? [`0x${process.env.PRIVATE_KEY}`] : []; - const config: HardhatUserConfig = { //@ts-ignore etherscan: { @@ -37,7 +35,6 @@ const config: HardhatUserConfig = { { version: "0.6.6" /** For uniswap v2 */ }, { version: "0.8.7" }, { version: "0.4.18" /** For WETH / WZETA */ }, - ], settings: { /** diff --git a/packages/zeta-app-contracts/lib/multi-chain-value/MultiChainValue.helpers.ts b/packages/zeta-app-contracts/lib/multi-chain-value/MultiChainValue.helpers.ts index e24b1833..86802afb 100644 --- a/packages/zeta-app-contracts/lib/multi-chain-value/MultiChainValue.helpers.ts +++ b/packages/zeta-app-contracts/lib/multi-chain-value/MultiChainValue.helpers.ts @@ -10,7 +10,7 @@ import { MultiChainValueMock, MultiChainValueMock__factory as MultiChainValueMockFactory, ZetaConnectorMockValue, - ZetaConnectorMockValue__factory as ZetaConnectorMockValueFactory + ZetaConnectorMockValue__factory as ZetaConnectorMockValueFactory, } from "../../typechain-types"; const networkName = network.name; @@ -19,7 +19,7 @@ const networkName = network.name; */ export const deployMultiChainValueMock = async ({ zetaConnectorMockAddress, - zetaTokenMockAddress + zetaTokenMockAddress, }: { zetaConnectorMockAddress: string; zetaTokenMockAddress: string; @@ -47,7 +47,7 @@ export const getMultiChainValue = (existingContractAddress?: string) => { contractName: "MultiChainValue", ...(existingContractAddress ? { existingContractAddress } - : { deployParams: [getAddress("connector", networkName), getAddress("zetaToken", networkName)] }) + : { deployParams: [getAddress("connector", networkName), getAddress("zetaToken", networkName)] }), }); }; diff --git a/packages/zeta-app-contracts/lib/shared/ImmutableCreate2Factory.helpers.ts b/packages/zeta-app-contracts/lib/shared/ImmutableCreate2Factory.helpers.ts index cff737a7..66cfc04e 100644 --- a/packages/zeta-app-contracts/lib/shared/ImmutableCreate2Factory.helpers.ts +++ b/packages/zeta-app-contracts/lib/shared/ImmutableCreate2Factory.helpers.ts @@ -7,7 +7,7 @@ export const buildBytecode = (constructorTypes: any[], constructorArgs: any[], c export const buildCreate2Address = (saltHex: string, byteCode: string, factoryAddress: string) => { const payload = ethers.utils.keccak256( - `0x${["ff", factoryAddress, saltHex, ethers.utils.keccak256(byteCode)].map(x => x.replace(/0x/, "")).join("")}` + `0x${["ff", factoryAddress, saltHex, ethers.utils.keccak256(byteCode)].map((x) => x.replace(/0x/, "")).join("")}` ); return `0x${payload.slice(-40)}`.toLowerCase(); @@ -39,7 +39,7 @@ export async function deployContractToAddress({ contractBytecode, constructorTypes = [] as string[], constructorArgs = [] as any[], - signer + signer, }: { constructorArgs?: any[]; constructorTypes?: string[]; @@ -55,14 +55,14 @@ export async function deployContractToAddress({ const computedAddr = await factory.findCreate2Address(salt, bytecode); const tx = await factory.safeCreate2(salt, bytecode, { - gasLimit: 6000000 + gasLimit: 6000000, }); const result = await tx.wait(); return { address: computedAddr as string, receipt: result as TransactionReceipt, - txHash: result.transactionHash as string + txHash: result.transactionHash as string, }; } diff --git a/packages/zeta-app-contracts/lib/shared/deploy.helpers.ts b/packages/zeta-app-contracts/lib/shared/deploy.helpers.ts index 353362d9..98823cc5 100644 --- a/packages/zeta-app-contracts/lib/shared/deploy.helpers.ts +++ b/packages/zeta-app-contracts/lib/shared/deploy.helpers.ts @@ -16,7 +16,7 @@ export type GetContractParams = export const getContract = async ({ contractName, deployParams, - existingContractAddress + existingContractAddress, }: GetContractParams & { contractName: string }): Promise => { const ContractFactory = (await ethers.getContractFactory(contractName)) as Factory; @@ -35,5 +35,5 @@ export const getContract = async getContract({ contractName: "ERC20", - ...(existingContractAddress ? { existingContractAddress } : { deployParams: ["ERC20Mock", "ERC20Mock"] }) + ...(existingContractAddress ? { existingContractAddress } : { deployParams: ["ERC20Mock", "ERC20Mock"] }), }); diff --git a/packages/zeta-app-contracts/scripts/multi-chain-value/deploy.ts b/packages/zeta-app-contracts/scripts/multi-chain-value/deploy.ts index 8edb153c..ae9e3736 100644 --- a/packages/zeta-app-contracts/scripts/multi-chain-value/deploy.ts +++ b/packages/zeta-app-contracts/scripts/multi-chain-value/deploy.ts @@ -40,7 +40,7 @@ async function main() { console.log("MultiChainValue post rutine finish"); } -main().catch(error => { +main().catch((error) => { console.error(error); process.exit(1); }); diff --git a/packages/zeta-app-contracts/scripts/multi-chain-value/deterministic-deploy.ts b/packages/zeta-app-contracts/scripts/multi-chain-value/deterministic-deploy.ts index 22761b99..1676be3c 100644 --- a/packages/zeta-app-contracts/scripts/multi-chain-value/deterministic-deploy.ts +++ b/packages/zeta-app-contracts/scripts/multi-chain-value/deterministic-deploy.ts @@ -38,7 +38,7 @@ export async function deterministicDeployMultiChainValue() { contractBytecode, factoryAddress: immutableCreate2Factory, salt: salthex, - signer + signer, }); saveAddress("multiChainValue", address); @@ -48,7 +48,7 @@ export async function deterministicDeployMultiChainValue() { if (!process.env.EXECUTE_PROGRAMMATICALLY) { deterministicDeployMultiChainValue() .then(() => process.exit(0)) - .catch(error => { + .catch((error) => { console.error(error); process.exit(1); }); diff --git a/packages/zeta-app-contracts/scripts/multi-chain-value/send-value.ts b/packages/zeta-app-contracts/scripts/multi-chain-value/send-value.ts index d5924523..f8ecfcd5 100644 --- a/packages/zeta-app-contracts/scripts/multi-chain-value/send-value.ts +++ b/packages/zeta-app-contracts/scripts/multi-chain-value/send-value.ts @@ -52,7 +52,7 @@ const main = async () => { await doTranfer(networkName, multiChainValueContract, getChainId("zeta_testnet"), amount, destinationAddress); }; -main().catch(error => { +main().catch((error) => { console.error(error); process.exit(1); }); diff --git a/packages/zeta-app-contracts/scripts/multi-chain-value/verify-contract.ts b/packages/zeta-app-contracts/scripts/multi-chain-value/verify-contract.ts index 3a0760df..4589e329 100644 --- a/packages/zeta-app-contracts/scripts/multi-chain-value/verify-contract.ts +++ b/packages/zeta-app-contracts/scripts/multi-chain-value/verify-contract.ts @@ -12,13 +12,13 @@ async function main() { await hardhat.run("verify:verify", { address: getAppAddress("multiChainValue", networkName), constructorArguments: [getAddress("connector", networkName), getAddress("zetaToken", networkName)], - contract: "contracts/multi-chain-value/MultiChainValue.sol:MultiChainValue" + contract: "contracts/multi-chain-value/MultiChainValue.sol:MultiChainValue", }); } main() .then(() => process.exit(0)) - .catch(error => { + .catch((error) => { console.error(error); process.exit(1); }); diff --git a/packages/zeta-app-contracts/test/MultiChainValue.spec.ts b/packages/zeta-app-contracts/test/MultiChainValue.spec.ts index de760887..2e4c3c5c 100644 --- a/packages/zeta-app-contracts/test/MultiChainValue.spec.ts +++ b/packages/zeta-app-contracts/test/MultiChainValue.spec.ts @@ -7,7 +7,7 @@ import { ethers } from "hardhat"; import { deployMultiChainValueMock, deployZetaConnectorMock, - deployZetaEthMock + deployZetaEthMock, } from "../lib/multi-chain-value/MultiChainValue.helpers"; import { MultiChainValueMock, ZetaConnectorMockValue } from "../typechain-types"; @@ -32,7 +32,7 @@ describe("MultiChainValue tests", () => { zetaEthMockContract = await deployZetaEthMock(); multiChainValueContractA = await deployMultiChainValueMock({ zetaConnectorMockAddress: zetaConnectorMockContract.address, - zetaTokenMockAddress: zetaEthMockContract.address + zetaTokenMockAddress: zetaEthMockContract.address, }); await multiChainValueContractA.addAvailableChainId(chainBId); diff --git a/packages/zeta-app-contracts/tsconfig.json b/packages/zeta-app-contracts/tsconfig.json index 355cfda5..ab9bc043 100644 --- a/packages/zeta-app-contracts/tsconfig.json +++ b/packages/zeta-app-contracts/tsconfig.json @@ -1,14 +1,20 @@ { "extends": "../../tsconfig.json", - "include": ["./scripts", "./lib", "./test", "./tests", "./typechain", "./**/*.json", "typechain-types"], - "exclude": ["artifacts", "cache"], - "files": ["./hardhat.config.ts"], + "include": [ + "./scripts", + "./lib", + "./test", + "./tests", + "./typechain", + "./**/*.json", + "typechain-types" + ], + "exclude": [ + "artifacts", + "cache", + "hardhat.config.ts", + ], "compilerOptions": { - "baseUrl": ".", - "paths": { - "@zetachain/addresses": ["../addresses/src/index"], - "@zetachain/addresses/*": ["../addresses/src/*"], - "@zetachain/interfaces": ["../interfaces/src/index"] - } + "baseUrl": "." } -} +} \ No newline at end of file diff --git a/packages/zevm-app-contracts/scripts/disperse/deploy.ts b/packages/zevm-app-contracts/scripts/disperse/deploy.ts index 007390c2..28622643 100644 --- a/packages/zevm-app-contracts/scripts/disperse/deploy.ts +++ b/packages/zevm-app-contracts/scripts/disperse/deploy.ts @@ -17,7 +17,7 @@ async function main() { saveAddress("disperse", disperseFactory.address); } -main().catch(error => { +main().catch((error) => { console.error(error); process.exit(1); }); diff --git a/packages/zevm-app-contracts/scripts/liquidity-incentives/add-reward.ts b/packages/zevm-app-contracts/scripts/liquidity-incentives/add-reward.ts index 3ebd8dad..f00c455a 100644 --- a/packages/zevm-app-contracts/scripts/liquidity-incentives/add-reward.ts +++ b/packages/zevm-app-contracts/scripts/liquidity-incentives/add-reward.ts @@ -10,7 +10,7 @@ import { RewardDistributorFactory, RewardDistributorFactory__factory, SystemContract, - SystemContract__factory + SystemContract__factory, } from "../../typechain-types"; import { getChainId, getSystemContractAddress, getZEVMAppAddress } from "../address.helpers"; @@ -45,7 +45,7 @@ const deployRewardByNetwork = async ( const receipt = await tx.wait(); - const event = receipt.events?.find(e => e.event === "RewardDistributorCreated"); + const event = receipt.events?.find((e) => e.event === "RewardDistributorCreated"); const { rewardDistributorContract: rewardDistributorContractAddress } = event?.args as any; @@ -117,7 +117,7 @@ async function main() { await addReward(deployer, systemContract, rewardContractAddress); } -main().catch(error => { +main().catch((error) => { console.error(error); process.exit(1); }); diff --git a/packages/zevm-app-contracts/scripts/liquidity-incentives/deploy.ts b/packages/zevm-app-contracts/scripts/liquidity-incentives/deploy.ts index 92f3d0b9..c9d33ee4 100644 --- a/packages/zevm-app-contracts/scripts/liquidity-incentives/deploy.ts +++ b/packages/zevm-app-contracts/scripts/liquidity-incentives/deploy.ts @@ -24,7 +24,7 @@ async function main() { saveAddress("rewardDistributorFactory", rewardDistributorFactory.address); } -main().catch(error => { +main().catch((error) => { console.error(error); process.exit(1); }); diff --git a/packages/zevm-app-contracts/scripts/liquidity-incentives/read-rewards-data.ts b/packages/zevm-app-contracts/scripts/liquidity-incentives/read-rewards-data.ts index ee0b4141..78fccf1f 100644 --- a/packages/zevm-app-contracts/scripts/liquidity-incentives/read-rewards-data.ts +++ b/packages/zevm-app-contracts/scripts/liquidity-incentives/read-rewards-data.ts @@ -31,7 +31,7 @@ const readRewardData = async (rewardContractAddress: string) => { rewardsToken: rewardsToken, stakingToken: stakingToken, stakingTokenA, - stakingTokenB + stakingTokenB, }); }; @@ -51,12 +51,12 @@ async function main() { } console.log("incentiveContracts", incentiveContracts); - incentiveContracts.forEach(async incentiveContract => { + incentiveContracts.forEach(async (incentiveContract) => { await readRewardData(incentiveContract); }); } -main().catch(error => { +main().catch((error) => { console.error(error); process.exit(1); }); diff --git a/packages/zevm-app-contracts/scripts/uniswap/add-liquidity-zeta-uniswap.ts b/packages/zevm-app-contracts/scripts/uniswap/add-liquidity-zeta-uniswap.ts index 599ba402..ecc9cfee 100644 --- a/packages/zevm-app-contracts/scripts/uniswap/add-liquidity-zeta-uniswap.ts +++ b/packages/zevm-app-contracts/scripts/uniswap/add-liquidity-zeta-uniswap.ts @@ -12,7 +12,7 @@ import { IUniswapV2Pair__factory, IUniswapV2Router02, SystemContract__factory, - UniswapV2Router02__factory + UniswapV2Router02__factory, } from "../../typechain-types"; import { getChainId, getSystemContractAddress } from "../address.helpers"; import { getNow, printReserves, sortPair } from "./uniswap.helpers"; @@ -127,7 +127,7 @@ async function main() { main() .then(() => process.exit(0)) - .catch(error => { + .catch((error) => { console.error(error); process.exit(1); }); diff --git a/packages/zevm-app-contracts/scripts/uniswap/remove-liquidity-zeta-uniswap.ts b/packages/zevm-app-contracts/scripts/uniswap/remove-liquidity-zeta-uniswap.ts index 5c3b873a..3aa378c6 100644 --- a/packages/zevm-app-contracts/scripts/uniswap/remove-liquidity-zeta-uniswap.ts +++ b/packages/zevm-app-contracts/scripts/uniswap/remove-liquidity-zeta-uniswap.ts @@ -13,7 +13,7 @@ import { IUniswapV2Pair__factory, IUniswapV2Router02, SystemContract__factory, - UniswapV2Router02__factory + UniswapV2Router02__factory, } from "../../typechain-types"; import { getChainId, getSystemContractAddress } from "../address.helpers"; import { getNow, printReserves, sortPair } from "./uniswap.helpers"; @@ -93,7 +93,7 @@ async function main() { main() .then(() => process.exit(0)) - .catch(error => { + .catch((error) => { console.error(error); process.exit(1); }); diff --git a/packages/zevm-app-contracts/scripts/uniswap/sell-token.ts b/packages/zevm-app-contracts/scripts/uniswap/sell-token.ts index 94a9d877..17097847 100644 --- a/packages/zevm-app-contracts/scripts/uniswap/sell-token.ts +++ b/packages/zevm-app-contracts/scripts/uniswap/sell-token.ts @@ -10,7 +10,7 @@ import { ERC20__factory, IUniswapV2Router02, SystemContract__factory, - UniswapV2Router02__factory + UniswapV2Router02__factory, } from "../../typechain-types"; import { getChainId, getSystemContractAddress } from "../address.helpers"; import { getNow, printReserves } from "./uniswap.helpers"; @@ -94,7 +94,7 @@ async function main() { main() .then(() => process.exit(0)) - .catch(error => { + .catch((error) => { console.error(error); process.exit(1); }); diff --git a/packages/zevm-app-contracts/scripts/uniswap/sell-zeta.ts b/packages/zevm-app-contracts/scripts/uniswap/sell-zeta.ts index 49cdefce..0a3b4a52 100644 --- a/packages/zevm-app-contracts/scripts/uniswap/sell-zeta.ts +++ b/packages/zevm-app-contracts/scripts/uniswap/sell-zeta.ts @@ -9,7 +9,7 @@ import { ERC20__factory, IUniswapV2Router02, SystemContract__factory, - UniswapV2Router02__factory + UniswapV2Router02__factory, } from "../../typechain-types"; import { getChainId, getSystemContractAddress } from "../address.helpers"; import { getNow, printReserves } from "./uniswap.helpers"; @@ -75,7 +75,7 @@ async function main() { main() .then(() => process.exit(0)) - .catch(error => { + .catch((error) => { console.error(error); process.exit(1); }); diff --git a/packages/zevm-app-contracts/scripts/zeta-points/deploy.ts b/packages/zevm-app-contracts/scripts/zeta-points/deploy.ts index bae20752..091c5ec2 100644 --- a/packages/zevm-app-contracts/scripts/zeta-points/deploy.ts +++ b/packages/zevm-app-contracts/scripts/zeta-points/deploy.ts @@ -19,7 +19,7 @@ const main = async () => { await invitationManager(); }; -main().catch(error => { +main().catch((error) => { console.error(error); process.exit(1); }); diff --git a/packages/zevm-app-contracts/scripts/zeta-swap/deploy.ts b/packages/zevm-app-contracts/scripts/zeta-swap/deploy.ts index b1ee2c23..b0ea8ad9 100644 --- a/packages/zevm-app-contracts/scripts/zeta-swap/deploy.ts +++ b/packages/zevm-app-contracts/scripts/zeta-swap/deploy.ts @@ -22,7 +22,7 @@ const main = async () => { saveAddress("zetaSwapBtcInbound", contractBTC.address); }; -main().catch(error => { +main().catch((error) => { console.error(error); process.exit(1); }); diff --git a/packages/zevm-app-contracts/scripts/zeta-swap/get-system-data.ts b/packages/zevm-app-contracts/scripts/zeta-swap/get-system-data.ts index 945c0d0b..ccc303cc 100644 --- a/packages/zevm-app-contracts/scripts/zeta-swap/get-system-data.ts +++ b/packages/zevm-app-contracts/scripts/zeta-swap/get-system-data.ts @@ -32,7 +32,7 @@ async function main() { main() .then(() => process.exit(0)) - .catch(error => { + .catch((error) => { console.error(error); process.exit(1); }); diff --git a/packages/zevm-app-contracts/scripts/zeta-swap/helpers.ts b/packages/zevm-app-contracts/scripts/zeta-swap/helpers.ts index e2312576..1699b08f 100644 --- a/packages/zevm-app-contracts/scripts/zeta-swap/helpers.ts +++ b/packages/zevm-app-contracts/scripts/zeta-swap/helpers.ts @@ -21,19 +21,13 @@ export const getSwapData = (zetaSwap: string, destination: string, destinationTo }; export const getBitcoinTxMemo = (zetaSwapAddress: string, destinationAddress: string, chainId: string) => { - const paddedHexChainId = ethers.utils - .hexlify(Number(chainId)) - .slice(2) - .padStart(8, "0"); + const paddedHexChainId = ethers.utils.hexlify(Number(chainId)).slice(2).padStart(8, "0"); const rawMemo = `${zetaSwapAddress}${destinationAddress.slice(2)}${paddedHexChainId}`; return ethers.utils.base64.encode(rawMemo); }; export const getBitcoinTxMemoForTest = (destinationAddress: string, chainId: string) => { - const paddedHexChainId = ethers.utils - .hexlify(Number(chainId)) - .slice(2) - .padStart(8, "0"); + const paddedHexChainId = ethers.utils.hexlify(Number(chainId)).slice(2).padStart(8, "0"); const rawMemo = `${destinationAddress.slice(2)}${paddedHexChainId}`; const paddedMemo = rawMemo.padEnd(HashZero.length - 2, "0"); diff --git a/packages/zevm-app-contracts/scripts/zeta-swap/send.ts b/packages/zevm-app-contracts/scripts/zeta-swap/send.ts index bf95f9f2..55e3d45c 100644 --- a/packages/zevm-app-contracts/scripts/zeta-swap/send.ts +++ b/packages/zevm-app-contracts/scripts/zeta-swap/send.ts @@ -13,13 +13,13 @@ const main = async () => { const tx = await signer.sendTransaction({ to: tssAddress, - value: parseEther("30") + value: parseEther("30"), }); console.log("Token sent. tx:", tx.hash); }; -main().catch(error => { +main().catch((error) => { console.error(error); process.exit(1); }); diff --git a/packages/zevm-app-contracts/scripts/zeta-swap/stress-swap.ts b/packages/zevm-app-contracts/scripts/zeta-swap/stress-swap.ts index e4ad914b..6ea9127b 100644 --- a/packages/zevm-app-contracts/scripts/zeta-swap/stress-swap.ts +++ b/packages/zevm-app-contracts/scripts/zeta-swap/stress-swap.ts @@ -15,7 +15,7 @@ import { getZRC20Address, isProtocolNetworkName, ZetaProtocolNetwork, - zetaProtocolNetworks + zetaProtocolNetworks, } from "@zetachain/protocol-contracts"; import { ethers, network } from "hardhat"; @@ -39,14 +39,14 @@ const swapToChain = async ({ signer, destinationNetwork, value, - nonce + nonce, }: SwapToChainParams) => { const data = getSwapData(zetaSwapAddress, signer.address, getZRC20Address(destinationNetwork), BigNumber.from("0")); const tx = await signer.sendTransaction({ data, nonce, to: tssAddress, - value + value, }); console.log(`tx: ${tx.hash}, nonce: ${nonce}, destinationToken: ${destinationNetwork}, value: ${formatEther(value)}`); }; @@ -57,9 +57,9 @@ const main = async () => { // @dev: bitcoin is invalid as destination const invalidDestinations: ZetaProtocolNetwork[] = [swappableNetwork, "btc_testnet"]; - const networks = zetaProtocolNetworks.map(c => c as ZetaProtocolNetwork); + const networks = zetaProtocolNetworks.map((c) => c as ZetaProtocolNetwork); - const destinationNetworks = networks.filter(e => !invalidDestinations.includes(e)); + const destinationNetworks = networks.filter((e) => !invalidDestinations.includes(e)); console.log(`Swapping native token...`); @@ -79,14 +79,14 @@ const main = async () => { signer, tssAddress, value: parseEther("0.002"), - zetaSwapAddress + zetaSwapAddress, }; return [ swapToChain(param), swapToChain({ ...param, nonce: baseNonce + 1, value: parseEther("0.002") }), swapToChain({ ...param, nonce: baseNonce + 2, value: parseEther("0.003") }), swapToChain({ ...param, nonce: baseNonce + 3, value: parseEther("0.004") }), - swapToChain({ ...param, nonce: baseNonce + 4, value: parseEther("0.005") }) + swapToChain({ ...param, nonce: baseNonce + 4, value: parseEther("0.005") }), ]; }); @@ -95,7 +95,7 @@ const main = async () => { await Promise.all(swaps); }; -main().catch(error => { +main().catch((error) => { console.error(error); process.exit(1); }); diff --git a/packages/zevm-app-contracts/scripts/zeta-swap/swap-on-zevm.ts b/packages/zevm-app-contracts/scripts/zeta-swap/swap-on-zevm.ts index 5a677893..82e9ed29 100644 --- a/packages/zevm-app-contracts/scripts/zeta-swap/swap-on-zevm.ts +++ b/packages/zevm-app-contracts/scripts/zeta-swap/swap-on-zevm.ts @@ -40,7 +40,7 @@ const main = async () => { const zContextStruct = { chainID: ethers.BigNumber.from("0"), origin: ethers.constants.HashZero, - sender: ethers.constants.AddressZero + sender: ethers.constants.AddressZero, }; const tx1 = await zetaSwapContract.onCrossChainCall(zContextStruct, sourceToken, amount, params); await tx1.wait(); @@ -48,7 +48,7 @@ const main = async () => { console.log("tx:", tx1.hash); }; -main().catch(error => { +main().catch((error) => { console.error(error); process.exit(1); }); diff --git a/packages/zevm-app-contracts/scripts/zeta-swap/swap.ts b/packages/zevm-app-contracts/scripts/zeta-swap/swap.ts index cc315cf0..2a5ced1b 100644 --- a/packages/zevm-app-contracts/scripts/zeta-swap/swap.ts +++ b/packages/zevm-app-contracts/scripts/zeta-swap/swap.ts @@ -25,13 +25,13 @@ const main = async () => { const tx = await signer.sendTransaction({ data, to: tssAddress, - value: parseEther("0.005") + value: parseEther("0.005"), }); console.log("tx:", tx.hash); }; -main().catch(error => { +main().catch((error) => { console.error(error); process.exit(1); }); diff --git a/packages/zevm-app-contracts/test/LiquidityIncentives.spec.ts b/packages/zevm-app-contracts/test/LiquidityIncentives.spec.ts index 55c92d3c..580ad199 100644 --- a/packages/zevm-app-contracts/test/LiquidityIncentives.spec.ts +++ b/packages/zevm-app-contracts/test/LiquidityIncentives.spec.ts @@ -14,7 +14,7 @@ import { MockZRC20, RewardDistributor, RewardDistributorFactory, - RewardDistributorFactory__factory + RewardDistributorFactory__factory, } from "../typechain-types"; import { evmSetup } from "./test.helpers"; @@ -84,7 +84,7 @@ describe("LiquidityIncentives tests", () => { AddressZero ); const receipt = await tx.wait(); - const event = receipt.events?.find(e => e.event === "RewardDistributorCreated"); + const event = receipt.events?.find((e) => e.event === "RewardDistributorCreated"); expect(event).to.not.be.undefined; const { rewardDistributorContract: rewardDistributorContractAddress } = event?.args as any; @@ -106,7 +106,7 @@ describe("LiquidityIncentives tests", () => { ); const receipt = await tx.wait(); - const event = receipt.events?.find(e => e.event === "RewardDistributorCreated"); + const event = receipt.events?.find((e) => e.event === "RewardDistributorCreated"); expect(event).to.not.be.undefined; const { stakingTokenA, stakingTokenB, LPStakingToken, rewardsToken, owner } = event?.args as any; @@ -142,7 +142,7 @@ describe("LiquidityIncentives tests", () => { ); const receipt = await tx.wait(); - const event = receipt.events?.find(e => e.event === "RewardDistributorCreated"); + const event = receipt.events?.find((e) => e.event === "RewardDistributorCreated"); expect(event).to.not.be.undefined; const { rewardDistributorContract } = event?.args as any; @@ -245,12 +245,7 @@ describe("LiquidityIncentives tests", () => { await network.provider.send("evm_mine"); let earned1 = await rewardDistributorContract.earned(sampleAccount1.address); - expect(earned1).to.be.closeTo( - REWARDS_AMOUNT.div(2) - .div(4) - .mul(3), - ERROR_TOLERANCE - ); + expect(earned1).to.be.closeTo(REWARDS_AMOUNT.div(2).div(4).mul(3), ERROR_TOLERANCE); let earned2 = await rewardDistributorContract.earned(sampleAccount2.address); expect(earned2).to.be.closeTo(REWARDS_AMOUNT.div(2).div(4), ERROR_TOLERANCE); @@ -493,7 +488,7 @@ describe("LiquidityIncentives tests", () => { AddressZero ); const receipt = await tx.wait(); - const event = receipt.events?.find(e => e.event === "RewardDistributorCreated"); + const event = receipt.events?.find((e) => e.event === "RewardDistributorCreated"); expect(event).to.not.be.undefined; const { rewardDistributorContract: rewardDistributorContractAddress } = event?.args as any; diff --git a/packages/zevm-app-contracts/test/Swap.spec.ts b/packages/zevm-app-contracts/test/Swap.spec.ts index a784c744..fd10d064 100644 --- a/packages/zevm-app-contracts/test/Swap.spec.ts +++ b/packages/zevm-app-contracts/test/Swap.spec.ts @@ -12,7 +12,7 @@ import { ZetaSwap, ZetaSwap__factory, ZetaSwapBtcInbound, - ZetaSwapBtcInbound__factory + ZetaSwapBtcInbound__factory, } from "../typechain-types"; import { evmSetup } from "./test.helpers"; diff --git a/packages/zevm-app-contracts/test/Synthetixio/StakingRewards.ts b/packages/zevm-app-contracts/test/Synthetixio/StakingRewards.ts index 9b842fdc..c47fedf4 100644 --- a/packages/zevm-app-contracts/test/Synthetixio/StakingRewards.ts +++ b/packages/zevm-app-contracts/test/Synthetixio/StakingRewards.ts @@ -142,7 +142,7 @@ describe("StakingRewards", () => { const event = receipt.events?.find((e: any) => e.event === "Recovered"); assert.eventEqual(event, "Recovered", { amount: amount, - token: externalRewardsToken.address + token: externalRewardsToken.address, }); }); }); @@ -346,7 +346,7 @@ describe("StakingRewards", () => { const receipt = await transaction.wait(); const event = receipt.events?.find((e: any) => e.event === "RewardsDurationUpdated"); assert.eventEqual(event, "RewardsDurationUpdated", { - newDuration: seventyDays + newDuration: seventyDays, }); const newDuration = await stakingRewards.rewardsDuration(); assert.bnEqual(newDuration, seventyDays); @@ -374,7 +374,7 @@ describe("StakingRewards", () => { const receipt = await transaction.wait(); const event = receipt.events?.find((e: any) => e.event === "RewardsDurationUpdated"); assert.eventEqual(event, "RewardsDurationUpdated", { - newDuration: seventyDays + newDuration: seventyDays, }); const newDuration = await stakingRewards.rewardsDuration(); diff --git a/packages/zevm-app-contracts/test/Synthetixio/common.js b/packages/zevm-app-contracts/test/Synthetixio/common.js index 2eca73dd..11ceb278 100644 --- a/packages/zevm-app-contracts/test/Synthetixio/common.js +++ b/packages/zevm-app-contracts/test/Synthetixio/common.js @@ -19,7 +19,7 @@ const { assertRevert, fromUnit, takeSnapshot, - restoreSnapshot + restoreSnapshot, } = require("./utils")(); let lastSnapshotId; @@ -67,6 +67,6 @@ module.exports = { invalidOpcode: assertInvalidOpcode, revert: assertRevert, unitEqual: assertUnitEqual, - unitNotEqual: assertUnitNotEqual - }) + unitNotEqual: assertUnitNotEqual, + }), }; diff --git a/packages/zevm-app-contracts/test/Synthetixio/utils.js b/packages/zevm-app-contracts/test/Synthetixio/utils.js index dcf769e2..f2662f82 100644 --- a/packages/zevm-app-contracts/test/Synthetixio/utils.js +++ b/packages/zevm-app-contracts/test/Synthetixio/utils.js @@ -13,7 +13,7 @@ module.exports = () => { /** * Sets default properties on the jsonrpc object and promisifies it so we don't have to copy/paste everywhere. */ - const send = async payload => { + const send = async (payload) => { if (!payload.jsonrpc) payload.jsonrpc = "2.0"; if (!payload.id) payload.id = new Date().getTime(); result = await hardhat.network.provider.send(payload.method, payload.params); @@ -37,7 +37,7 @@ module.exports = () => { * Increases the time in the EVM. * @param seconds Number of seconds to increase the time by */ - const fastForward = async seconds => { + const fastForward = async (seconds) => { // It's handy to be able to be able to pass big numbers in as we can just // query them from the contract, then send them back. If not changed to // a number, this causes much larger fast forwards than expected without error. @@ -48,13 +48,13 @@ module.exports = () => { let params = { method: "evm_increaseTime", - params: [seconds] + params: [seconds], }; if (hardhat.ovm) { params = { method: "evm_setNextBlockTimestamp", - params: [(await currentTime()) + seconds] + params: [(await currentTime()) + seconds], }; } @@ -69,7 +69,7 @@ module.exports = () => { * sometimes the result can vary by a second or two depending on how fast or slow the local EVM is responding. * @param time Date object representing the desired time at the end of the operation */ - const fastForwardTo = async time => { + const fastForwardTo = async (time) => { if (typeof time === "string") time = parseInt(time); const timestamp = await currentTime(); @@ -98,10 +98,10 @@ module.exports = () => { * Restores a snapshot that was previously taken with takeSnapshot * @param id The ID that was returned when takeSnapshot was called. */ - const restoreSnapshot = async id => { + const restoreSnapshot = async (id) => { await send({ method: "evm_revert", - params: [id] + params: [id], }); await mineBlock(); }; @@ -112,8 +112,8 @@ module.exports = () => { * we should be able to update the conversion factor here. * @param amount The amount you want to re-base to UNIT */ - const toUnit = amount => toBN(toWei(amount.toString(), "ether")); - const fromUnit = amount => fromWei(amount, "ether"); + const toUnit = (amount) => toBN(toWei(amount.toString(), "ether")); + const fromUnit = (amount) => fromWei(amount, "ether"); /** * Translates an amount to our canonical precise unit. We happen to use 10^27, which means we can @@ -124,7 +124,7 @@ module.exports = () => { const PRECISE_UNIT_STRING = "1000000000000000000000000000"; const PRECISE_UNIT = toBN(PRECISE_UNIT_STRING); - const toPreciseUnit = amount => { + const toPreciseUnit = (amount) => { // Code is largely lifted from the guts of web3 toWei here: // https://github.com/ethjs/ethjs-unit/blob/master/src/index.js const amountString = amount.toString(); @@ -171,7 +171,7 @@ module.exports = () => { return result; }; - const fromPreciseUnit = amount => { + const fromPreciseUnit = (amount) => { // Code is largely lifted from the guts of web3 fromWei here: // https://github.com/ethjs/ethjs-unit/blob/master/src/index.js const negative = amount.lt(new BN("0")); @@ -284,7 +284,7 @@ module.exports = () => { /** * Converts a hex string of bytes into a UTF8 string with \0 characters (from padding) removed */ - const bytesToString = bytes => { + const bytesToString = (bytes) => { const result = hexToAscii(bytes); return result.replace(/\0/g, ""); }; @@ -401,7 +401,7 @@ module.exports = () => { // We take the keys that are integers as the array part, and get the `length` of that. // This is because this method is used to check event args or view result structs // that are shaped like {0: bla, 1: foo, blaName: bla, fooName: foo}. FML-JS - const intLike = Object.keys(actual).filter(k => k.match(/^\d+$/g) !== null); + const intLike = Object.keys(actual).filter((k) => k.match(/^\d+$/g) !== null); len = intLike.length; } assert.strictEqual(len, expected.length, `array length`); @@ -458,7 +458,7 @@ module.exports = () => { assert.strictEqual(errorCaught, true, "Operation did not revert as expected"); }; - const assertInvalidOpcode = async blockOrPromise => { + const assertInvalidOpcode = async (blockOrPromise) => { let errorCaught = false; try { const result = typeof blockOrPromise === "function" ? blockOrPromise() : blockOrPromise; @@ -475,12 +475,12 @@ module.exports = () => { * Gets the ETH balance for the account address * @param account Ethereum wallet address */ - const getEthBalance = account => web3.eth.getBalance(account); + const getEthBalance = (account) => web3.eth.getBalance(account); const loadLocalUsers = () => { return normalizeHardhatNetworkAccountsConfig(accounts).map(({ privateKey }) => ({ private: privateKey, - public: web3.eth.accounts.privateKeyToAccount(privateKey).address + public: web3.eth.accounts.privateKeyToAccount(privateKey).address, })); }; @@ -495,19 +495,19 @@ module.exports = () => { }; // create a factory to deploy mock price aggregators - const createMockAggregatorFactory = async account => { + const createMockAggregatorFactory = async (account) => { const { abi, bytecode } = getCompiledArtifacts("MockAggregatorV2V3"); return new ethers.ContractFactory(abi, bytecode, account); }; // load artifacts needed for contract instances - const getCompiledArtifacts = contract => { + const getCompiledArtifacts = (contract) => { const { compiled } = loadCompiledFiles({ buildPath }); const { abi, evm: { - bytecode: { object: bytecode } - } + bytecode: { object: bytecode }, + }, } = compiled[contract]; return { abi, bytecode }; }; @@ -525,7 +525,7 @@ module.exports = () => { return { provider, - wallet: wallet || undefined + wallet: wallet || undefined, }; }; @@ -536,7 +536,7 @@ module.exports = () => { useOvm = false, deploymentPath = undefined, wallet, - provider + provider, }) => { const target = getTarget({ contract, deploymentPath, fs, network, path, useOvm }); const sourceData = getSource({ @@ -545,7 +545,7 @@ module.exports = () => { fs, network, path, - useOvm + useOvm, }); return new ethers.Contract(target.address, sourceData.abi, wallet || provider); @@ -595,6 +595,6 @@ module.exports = () => { toBN, toPreciseUnit, - toUnit + toUnit, }; }; diff --git a/packages/zevm-app-contracts/test/test.helpers.ts b/packages/zevm-app-contracts/test/test.helpers.ts index cad35d1c..2039977f 100644 --- a/packages/zevm-app-contracts/test/test.helpers.ts +++ b/packages/zevm-app-contracts/test/test.helpers.ts @@ -8,7 +8,7 @@ import { MockSystemContract__factory, MockZRC20, MockZRC20__factory, - UniswapV2Router02__factory + UniswapV2Router02__factory, } from "../typechain-types"; const addZetaEthLiquidity = async (signer: SignerWithAddress, token: MockZRC20, uniswapRouterAddr: string) => { diff --git a/packages/zevm-app-contracts/test/zeta-points/InvitationManager.ts b/packages/zevm-app-contracts/test/zeta-points/InvitationManager.ts index b169e037..2c9d5279 100644 --- a/packages/zevm-app-contracts/test/zeta-points/InvitationManager.ts +++ b/packages/zevm-app-contracts/test/zeta-points/InvitationManager.ts @@ -111,7 +111,7 @@ describe("InvitationManager Contract test", () => { const tx = await invitationManager.connect(invitee).confirmAndAcceptInvitation(inviter.address, sig); const rec = await tx.wait(); - const event = rec.events?.find(e => e.event === "InvitationAccepted"); + const event = rec.events?.find((e) => e.event === "InvitationAccepted"); const block = await ethers.provider.getBlock(rec.blockNumber); expect(event?.args?.inviter).to.be.eq(inviter.address); @@ -123,7 +123,7 @@ describe("InvitationManager Contract test", () => { const tx2 = await invitationManager.connect(addrs[0]).confirmAndAcceptInvitation(inviter.address, sig); const rec2 = await tx2.wait(); - const event2 = rec2.events?.find(e => e.event === "InvitationAccepted"); + const event2 = rec2.events?.find((e) => e.event === "InvitationAccepted"); const block2 = await ethers.provider.getBlock(rec2.blockNumber); await expect(event2?.args?.inviter).to.be.eq(inviter.address); diff --git a/packages/zevm-app-contracts/tsconfig.json b/packages/zevm-app-contracts/tsconfig.json index 355cfda5..066bfdb0 100644 --- a/packages/zevm-app-contracts/tsconfig.json +++ b/packages/zevm-app-contracts/tsconfig.json @@ -1,14 +1,20 @@ { "extends": "../../tsconfig.json", - "include": ["./scripts", "./lib", "./test", "./tests", "./typechain", "./**/*.json", "typechain-types"], - "exclude": ["artifacts", "cache"], - "files": ["./hardhat.config.ts"], + "include": [ + "./scripts", + "./lib", + "./test", + "./tests", + "./typechain", + "./**/*.json", + "typechain-types" + ], + "exclude": [ + "artifacts", + "cache", + "hardhat.config.ts", + ], "compilerOptions": { "baseUrl": ".", - "paths": { - "@zetachain/addresses": ["../addresses/src/index"], - "@zetachain/addresses/*": ["../addresses/src/*"], - "@zetachain/interfaces": ["../interfaces/src/index"] - } } -} +} \ No newline at end of file diff --git a/scripts/setup-tutorial.ts b/scripts/setup-tutorial.ts index 0885dc8e..5e56cdde 100644 --- a/scripts/setup-tutorial.ts +++ b/scripts/setup-tutorial.ts @@ -29,11 +29,10 @@ EXECUTE_PROGRAMMATICALLY=true`; function saveWalletFile(address: string, privateKey: string, jsonPath: string): void { const data = `{"address": "${address}", "privateKey": "${privateKey}"}`; - - fs.access(jsonPath, err => { + fs.access(jsonPath, (err) => { if (err) { // The file does not exist, so we can write to it - fs.writeFile(jsonPath, data, err => { + fs.writeFile(jsonPath, data, (err) => { if (err) throw err; console.log("The new wallet file has been saved!"); }); @@ -50,18 +49,18 @@ function callFaucet(address: string): void { hostname: "faucet.zetachain.link", method: "GET", path: `/eth/${address}`, - port: 443 + port: 443, }; - const req = https.request(options, res => { + const req = https.request(options, (res) => { console.log(`statusCode: ${res.statusCode}`); - res.on("data", d => { + res.on("data", (d) => { process.stdout.write(d); }); }); - req.on("error", error => { + req.on("error", (error) => { console.error(error); }); @@ -69,7 +68,7 @@ function callFaucet(address: string): void { } function createWallet(filePath: string, callback: () => void): void { - fs.access(filePath, err => { + fs.access(filePath, (err) => { if (!err) { callback(); } @@ -88,7 +87,7 @@ async function getOrCreateWallet(filePath: string): Promise { const newWallet = Wallet.createRandom(); const walletConfig: WalletConfig = { address: newWallet.address, - privateKey: newWallet.privateKey + privateKey: newWallet.privateKey, }; await fs.promises.writeFile(filePath, JSON.stringify(walletConfig)); wallet = newWallet; @@ -97,7 +96,7 @@ async function getOrCreateWallet(filePath: string): Promise { return wallet; } -const wallet = getOrCreateWallet(jsonPath).then(async wallet => { +const wallet = getOrCreateWallet(jsonPath).then(async (wallet) => { console.log(`Your Wallet Address: ${wallet.address}`); console.log(`Your Private Key: ${wallet.privateKey.substring(2)}`); saveEnvFiles(wallet.address, wallet.privateKey.substring(2)); diff --git a/scripts/slither.ts b/scripts/slither.ts index 6f925593..92c0c7a2 100644 --- a/scripts/slither.ts +++ b/scripts/slither.ts @@ -58,7 +58,7 @@ const run = async (command: string) => { }); console.log("Results output to the console and saved to slither-output/ in Markdown, JSON, and SARIF formats."); - } catch (error: any) { + } catch (error) { console.error("Error: Docker Failed To Run"); console.error(`${error}`); } diff --git a/tsconfig.json b/tsconfig.json index ce461d49..bdf8b01d 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,12 +1,30 @@ { "compilerOptions": { - "target": "ES2018", - "module": "commonjs", - "strict": true, + "baseUrl": ".", + "declaration": true, "esModuleInterop": true, + "forceConsistentCasingInFileNames": true, + "module": "commonjs", + "moduleResolution": "node", + "noImplicitAny": true, "outDir": "dist", - "declaration": true, - "resolveJsonModule": true + "paths": { + "@typechain-types": [ + "typechain-types" + ] + }, + "resolveJsonModule": true, + "skipLibCheck": true, + "sourceMap": false, + "strict": true, + "target": "es2020", + "typeRoots": [ + "@types", + "./node_modules/@types" + ] }, - "exclude": [".yarn", "node_modules"] -} + "exclude": [ + ".yarn", + "node_modules" + ] +} \ No newline at end of file diff --git a/yarn.lock b/yarn.lock index 382bfd30..d0be129f 100644 --- a/yarn.lock +++ b/yarn.lock @@ -5,247 +5,255 @@ __metadata: version: 6 cacheKey: 8 +"@aashutoshrathi/word-wrap@npm:^1.2.3": + version: 1.2.6 + resolution: "@aashutoshrathi/word-wrap@npm:1.2.6" + checksum: ada901b9e7c680d190f1d012c84217ce0063d8f5c5a7725bb91ec3c5ed99bb7572680eb2d2938a531ccbaec39a95422fcd8a6b4a13110c7d98dd75402f66a0cd + languageName: node + linkType: hard + "@babel/code-frame@npm:^7.0.0": - version: 7.18.6 - resolution: "@babel/code-frame@npm:7.18.6" + version: 7.23.5 + resolution: "@babel/code-frame@npm:7.23.5" dependencies: - "@babel/highlight": ^7.18.6 - checksum: 195e2be3172d7684bf95cff69ae3b7a15a9841ea9d27d3c843662d50cdd7d6470fd9c8e64be84d031117e4a4083486effba39f9aef6bbb2c89f7f21bcfba33ba + "@babel/highlight": ^7.23.4 + chalk: ^2.4.2 + checksum: d90981fdf56a2824a9b14d19a4c0e8db93633fd488c772624b4e83e0ceac6039a27cd298a247c3214faa952bf803ba23696172ae7e7235f3b97f43ba278c569a languageName: node linkType: hard -"@babel/helper-validator-identifier@npm:^7.18.6": - version: 7.18.6 - resolution: "@babel/helper-validator-identifier@npm:7.18.6" - checksum: e295254d616bbe26e48c196a198476ab4d42a73b90478c9842536cf910ead887f5af6b5c4df544d3052a25ccb3614866fa808dc1e3a5a4291acd444e243c0648 +"@babel/helper-validator-identifier@npm:^7.22.20": + version: 7.22.20 + resolution: "@babel/helper-validator-identifier@npm:7.22.20" + checksum: 136412784d9428266bcdd4d91c32bcf9ff0e8d25534a9d94b044f77fe76bc50f941a90319b05aafd1ec04f7d127cd57a179a3716009ff7f3412ef835ada95bdc languageName: node linkType: hard -"@babel/highlight@npm:^7.18.6": - version: 7.18.6 - resolution: "@babel/highlight@npm:7.18.6" +"@babel/highlight@npm:^7.23.4": + version: 7.23.4 + resolution: "@babel/highlight@npm:7.23.4" dependencies: - "@babel/helper-validator-identifier": ^7.18.6 - chalk: ^2.0.0 + "@babel/helper-validator-identifier": ^7.22.20 + chalk: ^2.4.2 js-tokens: ^4.0.0 - checksum: 92d8ee61549de5ff5120e945e774728e5ccd57fd3b2ed6eace020ec744823d4a98e242be1453d21764a30a14769ecd62170fba28539b211799bbaf232bbb2789 + checksum: 643acecdc235f87d925979a979b539a5d7d1f31ae7db8d89047269082694122d11aa85351304c9c978ceeb6d250591ccadb06c366f358ccee08bb9c122476b89 languageName: node linkType: hard -"@babel/runtime@npm:^7.10.4, @babel/runtime@npm:^7.5.5": - version: 7.18.9 - resolution: "@babel/runtime@npm:7.18.9" +"@babel/runtime@npm:^7.20.1, @babel/runtime@npm:^7.5.5": + version: 7.23.5 + resolution: "@babel/runtime@npm:7.23.5" dependencies: - regenerator-runtime: ^0.13.4 - checksum: 36dd736baba7164e82b3cc9d43e081f0cb2d05ff867ad39cac515d99546cee75b7f782018b02a3dcf5f2ef3d27f319faa68965fdfec49d4912c60c6002353a2e + regenerator-runtime: ^0.14.0 + checksum: 164d9802424f06908e62d29b8fd3a87db55accf82f46f964ac481dcead11ff7df8391e3696e5fa91a8ca10ea8845bf650acd730fa88cf13f8026cd8d5eec6936 languageName: node linkType: hard -"@changesets/apply-release-plan@npm:^6.0.3": - version: 6.0.3 - resolution: "@changesets/apply-release-plan@npm:6.0.3" +"@changesets/apply-release-plan@npm:^7.0.0": + version: 7.0.0 + resolution: "@changesets/apply-release-plan@npm:7.0.0" dependencies: - "@babel/runtime": ^7.10.4 - "@changesets/config": ^2.1.0 - "@changesets/get-version-range-type": ^0.3.2 - "@changesets/git": ^1.4.1 - "@changesets/types": ^5.1.0 + "@babel/runtime": ^7.20.1 + "@changesets/config": ^3.0.0 + "@changesets/get-version-range-type": ^0.4.0 + "@changesets/git": ^3.0.0 + "@changesets/types": ^6.0.0 "@manypkg/get-packages": ^1.1.3 detect-indent: ^6.0.0 fs-extra: ^7.0.1 lodash.startcase: ^4.4.0 outdent: ^0.5.0 - prettier: ^1.19.1 + prettier: ^2.7.1 resolve-from: ^5.0.0 - semver: ^5.4.1 - checksum: e40cac11719faf00f6573a647202941737408739f30ab534c0a2d69e6b2247940882dac521f254b936f7321e6ffac5dd104b9efaa2f2ccf429002f7f4cf2fc4c + semver: ^7.5.3 + checksum: ad83f89a3d46cd5249fa960cb0324114532bd5f25e74466d181afd6661273824859d038a12ba587a5e044f9169810e4a6febbb61e23c3819b3b28c00176a8bdf languageName: node linkType: hard -"@changesets/assemble-release-plan@npm:^5.2.0": - version: 5.2.0 - resolution: "@changesets/assemble-release-plan@npm:5.2.0" +"@changesets/assemble-release-plan@npm:^6.0.0": + version: 6.0.0 + resolution: "@changesets/assemble-release-plan@npm:6.0.0" dependencies: - "@babel/runtime": ^7.10.4 - "@changesets/errors": ^0.1.4 - "@changesets/get-dependents-graph": ^1.3.3 - "@changesets/types": ^5.1.0 + "@babel/runtime": ^7.20.1 + "@changesets/errors": ^0.2.0 + "@changesets/get-dependents-graph": ^2.0.0 + "@changesets/types": ^6.0.0 "@manypkg/get-packages": ^1.1.3 - semver: ^5.4.1 - checksum: 1f26617c00656203e6324fcda135103e7b023427cdb92bbc8b7defb01820d74d62efe19dec6173cfefb68b6bc0898b91abdc8e96dd312eff3ddf9e58268f70a7 + semver: ^7.5.3 + checksum: 0e6d25f25e0e3cc0e92aa8c43f5f496bae9464e2523be4ff81e31b6c9971b63bb1264821a2483c48d451d89d60af1acebe727e7f8c392ed48188a3ff26d0950e languageName: node linkType: hard -"@changesets/changelog-git@npm:^0.1.12": - version: 0.1.12 - resolution: "@changesets/changelog-git@npm:0.1.12" +"@changesets/changelog-git@npm:^0.2.0": + version: 0.2.0 + resolution: "@changesets/changelog-git@npm:0.2.0" dependencies: - "@changesets/types": ^5.1.0 - checksum: 68ae2ccb7e18f4559c954bcc104cd2e311c6daf5a39e9339290c0e1db8db926a1432e54485c593d977083253736147d855e923053d50daaef1041aa486172538 + "@changesets/types": ^6.0.0 + checksum: 132660f7fdabbdda00ac803cc822d6427a1a38a17a5f414e87ad32f6dc4cbef5280a147ecdc087a28dc06c8bd0762f8d6e7132d01b8a4142b59fbe1bc2177034 languageName: node linkType: hard "@changesets/cli@npm:^2.23.1": - version: 2.24.1 - resolution: "@changesets/cli@npm:2.24.1" - dependencies: - "@babel/runtime": ^7.10.4 - "@changesets/apply-release-plan": ^6.0.3 - "@changesets/assemble-release-plan": ^5.2.0 - "@changesets/changelog-git": ^0.1.12 - "@changesets/config": ^2.1.0 - "@changesets/errors": ^0.1.4 - "@changesets/get-dependents-graph": ^1.3.3 - "@changesets/get-release-plan": ^3.0.12 - "@changesets/git": ^1.4.1 - "@changesets/logger": ^0.0.5 - "@changesets/pre": ^1.0.12 - "@changesets/read": ^0.5.7 - "@changesets/types": ^5.1.0 - "@changesets/write": ^0.1.9 + version: 2.27.1 + resolution: "@changesets/cli@npm:2.27.1" + dependencies: + "@babel/runtime": ^7.20.1 + "@changesets/apply-release-plan": ^7.0.0 + "@changesets/assemble-release-plan": ^6.0.0 + "@changesets/changelog-git": ^0.2.0 + "@changesets/config": ^3.0.0 + "@changesets/errors": ^0.2.0 + "@changesets/get-dependents-graph": ^2.0.0 + "@changesets/get-release-plan": ^4.0.0 + "@changesets/git": ^3.0.0 + "@changesets/logger": ^0.1.0 + "@changesets/pre": ^2.0.0 + "@changesets/read": ^0.6.0 + "@changesets/types": ^6.0.0 + "@changesets/write": ^0.3.0 "@manypkg/get-packages": ^1.1.3 - "@types/is-ci": ^3.0.0 - "@types/semver": ^6.0.0 + "@types/semver": ^7.5.0 ansi-colors: ^4.1.3 chalk: ^2.1.0 + ci-info: ^3.7.0 enquirer: ^2.3.0 external-editor: ^3.1.0 fs-extra: ^7.0.1 human-id: ^1.0.2 - is-ci: ^3.0.1 meow: ^6.0.0 outdent: ^0.5.0 p-limit: ^2.2.0 preferred-pm: ^3.0.0 resolve-from: ^5.0.0 - semver: ^5.4.1 + semver: ^7.5.3 spawndamnit: ^2.0.0 term-size: ^2.1.0 tty-table: ^4.1.5 bin: changeset: bin.js - checksum: 1860969140fbdfd834e4fcb983dccf8e01cf2d5e7fe48eb793318c0411934e6abd1811711a61b1b379fc23b69a5c625354c85d3162045ef4ec726315a7e0ff2b + checksum: 0d030dec7e0ef28626082a257d57f46cdf65edb65a95f5a3511a9d298ca052388d8ab7f9a714943864eddc59148c4afb0b802a9c75b5bea45aade4c0dc7a5fa6 languageName: node linkType: hard -"@changesets/config@npm:^2.1.0": - version: 2.1.0 - resolution: "@changesets/config@npm:2.1.0" +"@changesets/config@npm:^3.0.0": + version: 3.0.0 + resolution: "@changesets/config@npm:3.0.0" dependencies: - "@changesets/errors": ^0.1.4 - "@changesets/get-dependents-graph": ^1.3.3 - "@changesets/logger": ^0.0.5 - "@changesets/types": ^5.1.0 + "@changesets/errors": ^0.2.0 + "@changesets/get-dependents-graph": ^2.0.0 + "@changesets/logger": ^0.1.0 + "@changesets/types": ^6.0.0 "@manypkg/get-packages": ^1.1.3 fs-extra: ^7.0.1 micromatch: ^4.0.2 - checksum: 0b7ba7ea965739ede9b935efd8d582ed0c939e3df1b147db93c6572e799b3feb1634036e0222926bf223a5e680b9ff433edddf9d670400a3e7a4986f17c27ed1 + checksum: 31a8c37e38768cf3676d24b7d371009dd1d691f221ecf086b79f0d96dc8e95aa408cda3659eb867a14615ea38a1c2be448bf0655c7570539af57c930ca784051 languageName: node linkType: hard -"@changesets/errors@npm:^0.1.4": - version: 0.1.4 - resolution: "@changesets/errors@npm:0.1.4" +"@changesets/errors@npm:^0.2.0": + version: 0.2.0 + resolution: "@changesets/errors@npm:0.2.0" dependencies: extendable-error: ^0.1.5 - checksum: 10734f1379715bf5a70b566dd42b50a75964d76f382bb67332776614454deda6d04a43dd7e727cd7cba56d7f2f7c95a07c7c0a19dd5d64fb1980b28322840733 + checksum: 4b79373f92287af4f723e8dbbccaf0299aa8735fc043243d0ad587f04a7614615ea50180be575d4438b9f00aa82d1cf85e902b77a55bdd3e0a8dd97e77b18c60 languageName: node linkType: hard -"@changesets/get-dependents-graph@npm:^1.3.3": - version: 1.3.3 - resolution: "@changesets/get-dependents-graph@npm:1.3.3" +"@changesets/get-dependents-graph@npm:^2.0.0": + version: 2.0.0 + resolution: "@changesets/get-dependents-graph@npm:2.0.0" dependencies: - "@changesets/types": ^5.1.0 + "@changesets/types": ^6.0.0 "@manypkg/get-packages": ^1.1.3 chalk: ^2.1.0 fs-extra: ^7.0.1 - semver: ^5.4.1 - checksum: 0ccde4d7e233fef875447e08219da45eb3cd9b073124b6ce051b35ed3fac89ce2cb185fce41eae1ed2a41aa741cd9f999f5384c5c76086c72c5b5e7609716fd9 + semver: ^7.5.3 + checksum: 6690d3ed36e8a636bc2a985d209bd72ee1100601ccf00850ca1fbe8500af839a3f4e5bd2167858cf11383aa76360f853e481533157060ad882fb56319db3090a languageName: node linkType: hard -"@changesets/get-release-plan@npm:^3.0.12": - version: 3.0.12 - resolution: "@changesets/get-release-plan@npm:3.0.12" - dependencies: - "@babel/runtime": ^7.10.4 - "@changesets/assemble-release-plan": ^5.2.0 - "@changesets/config": ^2.1.0 - "@changesets/pre": ^1.0.12 - "@changesets/read": ^0.5.7 - "@changesets/types": ^5.1.0 +"@changesets/get-release-plan@npm:^4.0.0": + version: 4.0.0 + resolution: "@changesets/get-release-plan@npm:4.0.0" + dependencies: + "@babel/runtime": ^7.20.1 + "@changesets/assemble-release-plan": ^6.0.0 + "@changesets/config": ^3.0.0 + "@changesets/pre": ^2.0.0 + "@changesets/read": ^0.6.0 + "@changesets/types": ^6.0.0 "@manypkg/get-packages": ^1.1.3 - checksum: 383b325c770344b89dfb417996a311390ea718af638f20833124bf2a493cb614ba3603eb01ff7294d48aa211d99d6fda85bf069e426daf5ebc9ded4c857f0055 + checksum: 57672c1e94f95de8ac65aac969275e0cb225f02aa86b2cef69329fff6e36ba5fde04eadeb6af36f4d8ac41a8fd329028b4df4c23c15c10fd13e026c77463d576 languageName: node linkType: hard -"@changesets/get-version-range-type@npm:^0.3.2": - version: 0.3.2 - resolution: "@changesets/get-version-range-type@npm:0.3.2" - checksum: b7ee7127c472a3886906ca6db336ac11233a5e75abc882084bfb4794e79a8936e3faceec3c04bf61c26453cd7f74278d9bf22aea4cdca8c1cd992591925b3c9b +"@changesets/get-version-range-type@npm:^0.4.0": + version: 0.4.0 + resolution: "@changesets/get-version-range-type@npm:0.4.0" + checksum: 2e8c511e658e193f48de7f09522649c4cf072932f0cbe0f252a7f2703d7775b0b90b632254526338795d0658e340be9dff3879cfc8eba4534b8cd6071efff8c9 languageName: node linkType: hard -"@changesets/git@npm:^1.4.1": - version: 1.4.1 - resolution: "@changesets/git@npm:1.4.1" +"@changesets/git@npm:^3.0.0": + version: 3.0.0 + resolution: "@changesets/git@npm:3.0.0" dependencies: - "@babel/runtime": ^7.10.4 - "@changesets/errors": ^0.1.4 - "@changesets/types": ^5.1.0 + "@babel/runtime": ^7.20.1 + "@changesets/errors": ^0.2.0 + "@changesets/types": ^6.0.0 "@manypkg/get-packages": ^1.1.3 is-subdir: ^1.1.1 + micromatch: ^4.0.2 spawndamnit: ^2.0.0 - checksum: 9b710d532a1816a2540fe4bc4212e13acb102f39f3b49d23396cad9b3fcae8bfe3f838902a9279a5b0b3e4533ca0965ffb169f0bebeb8b4933a48965679ed991 + checksum: a8fa66d77302b50d5e604aca898ee813247537d23a05004637ecee4aa1579d6a2859283c099bdcf3e2b232258c93ff81dd57aa867858788e457df40118c64c2b languageName: node linkType: hard -"@changesets/logger@npm:^0.0.5": - version: 0.0.5 - resolution: "@changesets/logger@npm:0.0.5" +"@changesets/logger@npm:^0.1.0": + version: 0.1.0 + resolution: "@changesets/logger@npm:0.1.0" dependencies: chalk: ^2.1.0 - checksum: bfec3cd9122b00c0ec25e96730f771ffd662ef3906d571bad1e4e9993f9d54d357d3eaf074b3dfaa4e23af759ce68efa2a97d8b845b0d8c951df5d21c6dfdff5 + checksum: d8ef1b7caf3d2c15a9e7743b7a9462e0c2e61c76d9a5bbed5eff805afa8226117505309c6e9095001136b4f6d9ae0aba61377e53af8aa0809f1febd1b5f787f1 languageName: node linkType: hard -"@changesets/parse@npm:^0.3.14": - version: 0.3.14 - resolution: "@changesets/parse@npm:0.3.14" +"@changesets/parse@npm:^0.4.0": + version: 0.4.0 + resolution: "@changesets/parse@npm:0.4.0" dependencies: - "@changesets/types": ^5.1.0 + "@changesets/types": ^6.0.0 js-yaml: ^3.13.1 - checksum: 4234e93ba3081fc30ec6ed3425cb2f4ac9e69fec0fc90d6d0438d850840c247f7bc9365b78a5295a6084c4cdba1c657c1bc4acd2f666dc0097741f0933111cf7 + checksum: 3dd970b244479746233ebd357cfff3816cf9f344ebf2cf0c7c55ce8579adfd3f506978e86ad61222dc3acf1548a2105ffdd8b3e940b3f82b225741315cee2bf0 languageName: node linkType: hard -"@changesets/pre@npm:^1.0.12": - version: 1.0.12 - resolution: "@changesets/pre@npm:1.0.12" +"@changesets/pre@npm:^2.0.0": + version: 2.0.0 + resolution: "@changesets/pre@npm:2.0.0" dependencies: - "@babel/runtime": ^7.10.4 - "@changesets/errors": ^0.1.4 - "@changesets/types": ^5.1.0 + "@babel/runtime": ^7.20.1 + "@changesets/errors": ^0.2.0 + "@changesets/types": ^6.0.0 "@manypkg/get-packages": ^1.1.3 fs-extra: ^7.0.1 - checksum: 6a81027feaca4727b2809410ec246481a324b4230e0f06b6add52ac2f28f8d7cb9b72cea56b2cfb64a15eb016fb6923bad49c3f2e767ecd2b30b13357a75a0da + checksum: 6a01086405f4e4ce63abb8f222de39b69a5762c9c8c8f19c0d3c72f7798248d7a152937028f1be24be1f8a4a5e47e4cb23c54bc36f979539b24a728c893caf4e languageName: node linkType: hard -"@changesets/read@npm:^0.5.7": - version: 0.5.7 - resolution: "@changesets/read@npm:0.5.7" +"@changesets/read@npm:^0.6.0": + version: 0.6.0 + resolution: "@changesets/read@npm:0.6.0" dependencies: - "@babel/runtime": ^7.10.4 - "@changesets/git": ^1.4.1 - "@changesets/logger": ^0.0.5 - "@changesets/parse": ^0.3.14 - "@changesets/types": ^5.1.0 + "@babel/runtime": ^7.20.1 + "@changesets/git": ^3.0.0 + "@changesets/logger": ^0.1.0 + "@changesets/parse": ^0.4.0 + "@changesets/types": ^6.0.0 chalk: ^2.1.0 fs-extra: ^7.0.1 p-filter: ^2.1.0 - checksum: 5c9ea7f4ad1391e971ba7eea4e64fd2c1ad2b00db2884a35ec262fa356fc9c72f813ea1c077c7ce904cd4ce2e97b3599d21116df1c0452f7d240c0af71a34f84 + checksum: 3da6428124b4983f6ccbdae324c73044cd6a84269bfdbaff545331042e3d6845c647613b5d8f4ffdd48bad5b791623eca2be1b507652ea47b77e136cd2e26c70 languageName: node linkType: hard @@ -256,23 +264,23 @@ __metadata: languageName: node linkType: hard -"@changesets/types@npm:^5.1.0": - version: 5.1.0 - resolution: "@changesets/types@npm:5.1.0" - checksum: fa903b53d5cc0ce1bd6054fd6c0053af54f604ade2c6436e735a7a66e4f31f7757ec324ceed3355ccd7f0653174fe8b51e1b3850a0b0d80315d13d92a45185b2 +"@changesets/types@npm:^6.0.0": + version: 6.0.0 + resolution: "@changesets/types@npm:6.0.0" + checksum: d528b5d712f62c26ea422c7d34ccf6eac57a353c0733d96716db3c796ecd9bba5d496d48b37d5d46b784dc45b69c06ce3345fa3515df981bb68456cad68e6465 languageName: node linkType: hard -"@changesets/write@npm:^0.1.9": - version: 0.1.9 - resolution: "@changesets/write@npm:0.1.9" +"@changesets/write@npm:^0.3.0": + version: 0.3.0 + resolution: "@changesets/write@npm:0.3.0" dependencies: - "@babel/runtime": ^7.10.4 - "@changesets/types": ^5.1.0 + "@babel/runtime": ^7.20.1 + "@changesets/types": ^6.0.0 fs-extra: ^7.0.1 human-id: ^1.0.2 - prettier: ^1.19.1 - checksum: 71f3139ef24aff68631299f845cae584e5235f66721ba2a78a6f4788ea3fef784b8911e14668cf4b6fde61606b38a193cac7c17596d8ef94abfce49c4d08755d + prettier: ^2.7.1 + checksum: 37588eb3ef2af15b3ea09d46864c994780619d20b791ea5b654801a035a3a12540c7f953e6e4f36731678615edc6d1c32f8fe174d599d3e6ce2d68263865788b languageName: node linkType: hard @@ -286,8 +294,8 @@ __metadata: linkType: hard "@defi-wonderland/smock@npm:^2.3.4": - version: 2.3.4 - resolution: "@defi-wonderland/smock@npm:2.3.4" + version: 2.3.5 + resolution: "@defi-wonderland/smock@npm:2.3.5" dependencies: "@nomicfoundation/ethereumjs-evm": ^1.0.0-rc.3 "@nomicfoundation/ethereumjs-util": ^8.0.0-rc.3 @@ -304,37 +312,62 @@ __metadata: "@nomiclabs/hardhat-ethers": ^2 ethers: ^5 hardhat: ^2 - checksum: 316026d672364a02c5d83c15110b2d5df4358768a6f645e9fd0786fbb230c0c7983a39b928521ee7d0b917a478e07c454b7d7bdf22ff10ed140f520340c28267 + checksum: b3c408fb43cd7b02bf6f3b3a392758944ee4d4ad9d92a5bcb595b2bdf7ebe702d052b8631afba0b408e80185b1db22d655dc63feba82365f5f1f6786eb98d859 languageName: node linkType: hard -"@eslint/eslintrc@npm:^1.2.1": - version: 1.2.1 - resolution: "@eslint/eslintrc@npm:1.2.1" +"@eslint-community/eslint-utils@npm:^4.2.0": + version: 4.4.0 + resolution: "@eslint-community/eslint-utils@npm:4.4.0" + dependencies: + eslint-visitor-keys: ^3.3.0 + peerDependencies: + eslint: ^6.0.0 || ^7.0.0 || >=8.0.0 + checksum: cdfe3ae42b4f572cbfb46d20edafe6f36fc5fb52bf2d90875c58aefe226892b9677fef60820e2832caf864a326fe4fc225714c46e8389ccca04d5f9288aabd22 + languageName: node + linkType: hard + +"@eslint-community/regexpp@npm:^4.4.0, @eslint-community/regexpp@npm:^4.6.1": + version: 4.10.0 + resolution: "@eslint-community/regexpp@npm:4.10.0" + checksum: 2a6e345429ea8382aaaf3a61f865cae16ed44d31ca917910033c02dc00d505d939f10b81e079fa14d43b51499c640138e153b7e40743c4c094d9df97d4e56f7b + languageName: node + linkType: hard + +"@eslint/eslintrc@npm:^2.1.4": + version: 2.1.4 + resolution: "@eslint/eslintrc@npm:2.1.4" dependencies: ajv: ^6.12.4 debug: ^4.3.2 - espree: ^9.3.1 - globals: ^13.9.0 + espree: ^9.6.0 + globals: ^13.19.0 ignore: ^5.2.0 import-fresh: ^3.2.1 js-yaml: ^4.1.0 - minimatch: ^3.0.4 + minimatch: ^3.1.2 strip-json-comments: ^3.1.1 - checksum: 1f797b9f94d71b965992cf6c44e3bcb574643014fd1e3d4862d25056bd5568f59c488461a7e9a1c1758ca7f0def5d3cb69c3d8b38581bcf4a53af74371243797 + checksum: 10957c7592b20ca0089262d8c2a8accbad14b4f6507e35416c32ee6b4dbf9cad67dfb77096bbd405405e9ada2b107f3797fe94362e1c55e0b09d6e90dd149127 + languageName: node + linkType: hard + +"@eslint/js@npm:8.55.0": + version: 8.55.0 + resolution: "@eslint/js@npm:8.55.0" + checksum: fa33ef619f0646ed15649b0c2e313e4d9ccee8425884bdbfc78020d6b6b64c0c42fa9d83061d0e6158e1d4274f03f0f9008786540e2efab8fcdc48082259908c languageName: node linkType: hard -"@ethereum-waffle/chai@npm:4.0.9": - version: 4.0.9 - resolution: "@ethereum-waffle/chai@npm:4.0.9" +"@ethereum-waffle/chai@npm:4.0.10": + version: 4.0.10 + resolution: "@ethereum-waffle/chai@npm:4.0.10" dependencies: "@ethereum-waffle/provider": 4.0.5 debug: ^4.3.4 json-bigint: ^1.0.0 peerDependencies: ethers: "*" - checksum: 93c90c268e96ee10f74f8c90fc685bcb35a94f3138b51c648ae1fcf4194785732e71b5cf9158791808a7486d5f7b3ebf5683360fd59ab058d7176e47efe5f7af + checksum: 11a2fa51224e98ee4cbf346a731be68b17b3c172e68391b25fc0027545d7477dbeca916bbd10be0fa9de612eaed6115a0578f9d3e312e9fe95af2b7791fd0981 languageName: node linkType: hard @@ -368,12 +401,12 @@ __metadata: languageName: node linkType: hard -"@ethereum-waffle/mock-contract@npm:4.0.3": - version: 4.0.3 - resolution: "@ethereum-waffle/mock-contract@npm:4.0.3" +"@ethereum-waffle/mock-contract@npm:4.0.4": + version: 4.0.4 + resolution: "@ethereum-waffle/mock-contract@npm:4.0.4" peerDependencies: ethers: "*" - checksum: 7a9350fc859b674d91c7476bc3f1c825948f423f4fb9fa018c87a0d5e3870a9ffec7ff875bb4121042194469e0e33087f884d1e7faf98da1f0722bb7b2b62242 + checksum: 45bea2ba4615a0bb81692c3d647ad39c2c37fcf250b577aeb6c5aad03fd4d0912d8d9ef5de638ab276ece1eb9ca1d09d23ed297d96da683fe34e0b01ba631da9 languageName: node linkType: hard @@ -391,19 +424,7 @@ __metadata: languageName: node linkType: hard -"@ethereumjs/block@npm:^3.5.0, @ethereumjs/block@npm:^3.6.2": - version: 3.6.2 - resolution: "@ethereumjs/block@npm:3.6.2" - dependencies: - "@ethereumjs/common": ^2.6.3 - "@ethereumjs/tx": ^3.5.1 - ethereumjs-util: ^7.1.4 - merkle-patricia-tree: ^4.2.4 - checksum: 19af5fe3202ecadf8d7a4c49f1ec29e47227ee8257aebfd74defc9c252c2474c62475234e73d68d5a716956668c397d783a5a6acaa660a324d6bdbfd69dfdd74 - languageName: node - linkType: hard - -"@ethereumjs/block@npm:^3.6.0": +"@ethereumjs/block@npm:^3.5.0, @ethereumjs/block@npm:^3.6.0, @ethereumjs/block@npm:^3.6.2": version: 3.6.3 resolution: "@ethereumjs/block@npm:3.6.3" dependencies: @@ -431,27 +452,27 @@ __metadata: languageName: node linkType: hard -"@ethereumjs/common@npm:2.6.0": - version: 2.6.0 - resolution: "@ethereumjs/common@npm:2.6.0" +"@ethereumjs/common@npm:2.5.0": + version: 2.5.0 + resolution: "@ethereumjs/common@npm:2.5.0" dependencies: crc-32: ^1.2.0 - ethereumjs-util: ^7.1.3 - checksum: f1e775f0d3963011f84cd6f6de985b342064331c8fd41bc81a6497abe959078704bf4febd8c59a3fc51c3527b1261441436d55d032f85f0453ff1af4a8dbccb3 + ethereumjs-util: ^7.1.1 + checksum: f08830c5b86f215e5bd9b80c7202beeeacfcd6094e493efb1cad75dd9d4605bae6c3d4a991447fc14e494c6c4ce99ea41f77e2032f3a9e1976f44308d3757ea7 languageName: node linkType: hard -"@ethereumjs/common@npm:^2.3.0, @ethereumjs/common@npm:^2.4.0, @ethereumjs/common@npm:^2.6.3": - version: 2.6.3 - resolution: "@ethereumjs/common@npm:2.6.3" +"@ethereumjs/common@npm:2.6.0": + version: 2.6.0 + resolution: "@ethereumjs/common@npm:2.6.0" dependencies: crc-32: ^1.2.0 - ethereumjs-util: ^7.1.4 - checksum: 660deabc93c3a6fc7c03af864406dcb8d9a4a502e321ce455cc62c0ff4117e11ce5d42ad49c5ca16ddc5364c189a302f6a64bc055049606757f4324ce857ca60 + ethereumjs-util: ^7.1.3 + checksum: f1e775f0d3963011f84cd6f6de985b342064331c8fd41bc81a6497abe959078704bf4febd8c59a3fc51c3527b1261441436d55d032f85f0453ff1af4a8dbccb3 languageName: node linkType: hard -"@ethereumjs/common@npm:^2.6.0, @ethereumjs/common@npm:^2.6.5": +"@ethereumjs/common@npm:^2.5.0, @ethereumjs/common@npm:^2.6.0, @ethereumjs/common@npm:^2.6.4, @ethereumjs/common@npm:^2.6.5": version: 2.6.5 resolution: "@ethereumjs/common@npm:2.6.5" dependencies: @@ -461,16 +482,6 @@ __metadata: languageName: node linkType: hard -"@ethereumjs/common@npm:^2.6.4": - version: 2.6.4 - resolution: "@ethereumjs/common@npm:2.6.4" - dependencies: - crc-32: ^1.2.0 - ethereumjs-util: ^7.1.4 - checksum: 2d3ef9e76c2dfb9fd1fc390834107ffd49e7074b893f3985f3d5996e217064cfe3617b16aff42fb7e8631a21ae32286ddf8ec21251589c4ac43d5b3c03217f9f - languageName: node - linkType: hard - "@ethereumjs/ethash@npm:^1.1.0": version: 1.1.0 resolution: "@ethereumjs/ethash@npm:1.1.0" @@ -484,6 +495,25 @@ __metadata: languageName: node linkType: hard +"@ethereumjs/rlp@npm:^4.0.1": + version: 4.0.1 + resolution: "@ethereumjs/rlp@npm:4.0.1" + bin: + rlp: bin/rlp + checksum: 30db19c78faa2b6ff27275ab767646929207bb207f903f09eb3e4c273ce2738b45f3c82169ddacd67468b4f063d8d96035f2bf36f02b6b7e4d928eefe2e3ecbc + languageName: node + linkType: hard + +"@ethereumjs/tx@npm:3.3.2": + version: 3.3.2 + resolution: "@ethereumjs/tx@npm:3.3.2" + dependencies: + "@ethereumjs/common": ^2.5.0 + ethereumjs-util: ^7.1.2 + checksum: e18c871fa223fcb23af1c3dde0ff9c82c91e962556fd531e1c75df63afb3941dd71e3def733d8c442a80224c6dcefb256f169cc286176e6ffb33c19349189c53 + languageName: node + linkType: hard + "@ethereumjs/tx@npm:3.4.0": version: 3.4.0 resolution: "@ethereumjs/tx@npm:3.4.0" @@ -494,17 +524,7 @@ __metadata: languageName: node linkType: hard -"@ethereumjs/tx@npm:^3.2.1, @ethereumjs/tx@npm:^3.5.1": - version: 3.5.1 - resolution: "@ethereumjs/tx@npm:3.5.1" - dependencies: - "@ethereumjs/common": ^2.6.3 - ethereumjs-util: ^7.1.4 - checksum: ed17780314592eca96f7aed392707b55af713964a9ac8e5a1ba5b1a0d7cd90ced80d3793bc24e2ce7a5b4852cefae31af8731c5cf54cece48ada16c5dcb2713b - languageName: node - linkType: hard - -"@ethereumjs/tx@npm:^3.4.0, @ethereumjs/tx@npm:^3.5.2": +"@ethereumjs/tx@npm:^3.3.2, @ethereumjs/tx@npm:^3.4.0, @ethereumjs/tx@npm:^3.5.2": version: 3.5.2 resolution: "@ethereumjs/tx@npm:3.5.2" dependencies: @@ -514,6 +534,17 @@ __metadata: languageName: node linkType: hard +"@ethereumjs/util@npm:^8.1.0": + version: 8.1.0 + resolution: "@ethereumjs/util@npm:8.1.0" + dependencies: + "@ethereumjs/rlp": ^4.0.1 + ethereum-cryptography: ^2.0.0 + micro-ftch: ^0.3.1 + checksum: 9ae5dee8f12b0faf81cd83f06a41560e79b0ba96a48262771d897a510ecae605eb6d84f687da001ab8ccffd50f612ae50f988ef76e6312c752897f462f3ac08d + languageName: node + linkType: hard + "@ethereumjs/vm@npm:5.6.0": version: 5.6.0 resolution: "@ethereumjs/vm@npm:5.6.0" @@ -534,24 +565,7 @@ __metadata: languageName: node linkType: hard -"@ethersproject/abi@npm:5.0.7": - version: 5.0.7 - resolution: "@ethersproject/abi@npm:5.0.7" - dependencies: - "@ethersproject/address": ^5.0.4 - "@ethersproject/bignumber": ^5.0.7 - "@ethersproject/bytes": ^5.0.4 - "@ethersproject/constants": ^5.0.4 - "@ethersproject/hash": ^5.0.4 - "@ethersproject/keccak256": ^5.0.3 - "@ethersproject/logger": ^5.0.5 - "@ethersproject/properties": ^5.0.3 - "@ethersproject/strings": ^5.0.4 - checksum: 47bce732782187ef0343662aa0ffdabb98be752d3ede57234205b118df511f35d8cddabd468f139e367d908ce7fbb0555f5af943f4b47cf3165c8fd61811183d - languageName: node - linkType: hard - -"@ethersproject/abi@npm:5.6.3, @ethersproject/abi@npm:^5.6.3": +"@ethersproject/abi@npm:5.6.3": version: 5.6.3 resolution: "@ethersproject/abi@npm:5.6.3" dependencies: @@ -568,24 +582,24 @@ __metadata: languageName: node linkType: hard -"@ethersproject/abi@npm:^5.0.0-beta.146, @ethersproject/abi@npm:^5.1.2": - version: 5.6.0 - resolution: "@ethersproject/abi@npm:5.6.0" - dependencies: - "@ethersproject/address": ^5.6.0 - "@ethersproject/bignumber": ^5.6.0 - "@ethersproject/bytes": ^5.6.0 - "@ethersproject/constants": ^5.6.0 - "@ethersproject/hash": ^5.6.0 - "@ethersproject/keccak256": ^5.6.0 - "@ethersproject/logger": ^5.6.0 - "@ethersproject/properties": ^5.6.0 - "@ethersproject/strings": ^5.6.0 - checksum: d0cf0450d21ff5beff5593ac4b1749eb64d67fdd7d0e2d489ab1996218ec7242b9dadcd7a9896687e84784c83bf3e39cba6e77b3e813165d6b400e584a96f2fc +"@ethersproject/abi@npm:5.7.0, @ethersproject/abi@npm:^5.1.2, @ethersproject/abi@npm:^5.6.3, @ethersproject/abi@npm:^5.7.0": + version: 5.7.0 + resolution: "@ethersproject/abi@npm:5.7.0" + dependencies: + "@ethersproject/address": ^5.7.0 + "@ethersproject/bignumber": ^5.7.0 + "@ethersproject/bytes": ^5.7.0 + "@ethersproject/constants": ^5.7.0 + "@ethersproject/hash": ^5.7.0 + "@ethersproject/keccak256": ^5.7.0 + "@ethersproject/logger": ^5.7.0 + "@ethersproject/properties": ^5.7.0 + "@ethersproject/strings": ^5.7.0 + checksum: bc6962bb6cb854e4d2a4d65b2c49c716477675b131b1363312234bdbb7e19badb7d9ce66f4ca2a70ae2ea84f7123dbc4e300a1bfe5d58864a7eafabc1466627e languageName: node linkType: hard -"@ethersproject/abstract-provider@npm:5.6.1, @ethersproject/abstract-provider@npm:^5.6.1": +"@ethersproject/abstract-provider@npm:5.6.1": version: 5.6.1 resolution: "@ethersproject/abstract-provider@npm:5.6.1" dependencies: @@ -600,22 +614,22 @@ __metadata: languageName: node linkType: hard -"@ethersproject/abstract-provider@npm:^5.6.0": - version: 5.6.0 - resolution: "@ethersproject/abstract-provider@npm:5.6.0" +"@ethersproject/abstract-provider@npm:5.7.0, @ethersproject/abstract-provider@npm:^5.6.1, @ethersproject/abstract-provider@npm:^5.7.0": + version: 5.7.0 + resolution: "@ethersproject/abstract-provider@npm:5.7.0" dependencies: - "@ethersproject/bignumber": ^5.6.0 - "@ethersproject/bytes": ^5.6.0 - "@ethersproject/logger": ^5.6.0 - "@ethersproject/networks": ^5.6.0 - "@ethersproject/properties": ^5.6.0 - "@ethersproject/transactions": ^5.6.0 - "@ethersproject/web": ^5.6.0 - checksum: 42ec4148217f7643f667f46235266100a1b31b8e87b6d540b6e8667703f56f633d25ec2e5d9b0f95556de0d0620189488e9d77dafc058c61e45872fef620ac5a + "@ethersproject/bignumber": ^5.7.0 + "@ethersproject/bytes": ^5.7.0 + "@ethersproject/logger": ^5.7.0 + "@ethersproject/networks": ^5.7.0 + "@ethersproject/properties": ^5.7.0 + "@ethersproject/transactions": ^5.7.0 + "@ethersproject/web": ^5.7.0 + checksum: 74cf4696245cf03bb7cc5b6cbf7b4b89dd9a79a1c4688126d214153a938126d4972d42c93182198653ce1de35f2a2cad68be40337d4774b3698a39b28f0228a8 languageName: node linkType: hard -"@ethersproject/abstract-signer@npm:5.6.2, @ethersproject/abstract-signer@npm:^5.6.2": +"@ethersproject/abstract-signer@npm:5.6.2": version: 5.6.2 resolution: "@ethersproject/abstract-signer@npm:5.6.2" dependencies: @@ -628,20 +642,20 @@ __metadata: languageName: node linkType: hard -"@ethersproject/abstract-signer@npm:^5.6.0": - version: 5.6.0 - resolution: "@ethersproject/abstract-signer@npm:5.6.0" +"@ethersproject/abstract-signer@npm:5.7.0, @ethersproject/abstract-signer@npm:^5.6.2, @ethersproject/abstract-signer@npm:^5.7.0": + version: 5.7.0 + resolution: "@ethersproject/abstract-signer@npm:5.7.0" dependencies: - "@ethersproject/abstract-provider": ^5.6.0 - "@ethersproject/bignumber": ^5.6.0 - "@ethersproject/bytes": ^5.6.0 - "@ethersproject/logger": ^5.6.0 - "@ethersproject/properties": ^5.6.0 - checksum: 91722f3ad449da1a26898132b53e0130deac19ab8dbef55c5fd3c6d2b9ddb0428f539021c9b7085f3fc5e8615bdf1fddcbe4f6c5365f6b6cfd5d3952816d27b7 + "@ethersproject/abstract-provider": ^5.7.0 + "@ethersproject/bignumber": ^5.7.0 + "@ethersproject/bytes": ^5.7.0 + "@ethersproject/logger": ^5.7.0 + "@ethersproject/properties": ^5.7.0 + checksum: a823dac9cfb761e009851050ebebd5b229d1b1cc4a75b125c2da130ff37e8218208f7f9d1386f77407705b889b23d4a230ad67185f8872f083143e0073cbfbe3 languageName: node linkType: hard -"@ethersproject/address@npm:5.6.1, @ethersproject/address@npm:^5.6.1": +"@ethersproject/address@npm:5.6.1": version: 5.6.1 resolution: "@ethersproject/address@npm:5.6.1" dependencies: @@ -654,20 +668,20 @@ __metadata: languageName: node linkType: hard -"@ethersproject/address@npm:^5.0.2, @ethersproject/address@npm:^5.0.4, @ethersproject/address@npm:^5.6.0": - version: 5.6.0 - resolution: "@ethersproject/address@npm:5.6.0" +"@ethersproject/address@npm:5.7.0, @ethersproject/address@npm:^5.0.2, @ethersproject/address@npm:^5.6.1, @ethersproject/address@npm:^5.7.0": + version: 5.7.0 + resolution: "@ethersproject/address@npm:5.7.0" dependencies: - "@ethersproject/bignumber": ^5.6.0 - "@ethersproject/bytes": ^5.6.0 - "@ethersproject/keccak256": ^5.6.0 - "@ethersproject/logger": ^5.6.0 - "@ethersproject/rlp": ^5.6.0 - checksum: 504cddd422ec9890eda61da0421991ace7c5cd9f365cbc9761305013621915dc5ff5247f4b04699b7060fc272a7a8c9dc88f993bc6fa6e0f6e9e4fa30d6f3c0f + "@ethersproject/bignumber": ^5.7.0 + "@ethersproject/bytes": ^5.7.0 + "@ethersproject/keccak256": ^5.7.0 + "@ethersproject/logger": ^5.7.0 + "@ethersproject/rlp": ^5.7.0 + checksum: 64ea5ebea9cc0e845c413e6cb1e54e157dd9fc0dffb98e239d3a3efc8177f2ff798cd4e3206cf3660ee8faeb7bef1a47dc0ebef0d7b132c32e61e550c7d4c843 languageName: node linkType: hard -"@ethersproject/base64@npm:5.6.1, @ethersproject/base64@npm:^5.6.1": +"@ethersproject/base64@npm:5.6.1": version: 5.6.1 resolution: "@ethersproject/base64@npm:5.6.1" dependencies: @@ -676,16 +690,16 @@ __metadata: languageName: node linkType: hard -"@ethersproject/base64@npm:^5.6.0": - version: 5.6.0 - resolution: "@ethersproject/base64@npm:5.6.0" +"@ethersproject/base64@npm:5.7.0, @ethersproject/base64@npm:^5.6.1, @ethersproject/base64@npm:^5.7.0": + version: 5.7.0 + resolution: "@ethersproject/base64@npm:5.7.0" dependencies: - "@ethersproject/bytes": ^5.6.0 - checksum: 5f316367acf18fdba82d50868171251f75218740a1c9bad8b11c6c3372c86ae323f91bc6727e78e527866357974d19fcced12f666fb067ffba2be638d54d36f7 + "@ethersproject/bytes": ^5.7.0 + checksum: 7dd5d734d623582f08f665434f53685041a3d3b334a0e96c0c8afa8bbcaab934d50e5b6b980e826a8fde8d353e0b18f11e61faf17468177274b8e7c69cd9742b languageName: node linkType: hard -"@ethersproject/basex@npm:5.6.1, @ethersproject/basex@npm:^5.6.1": +"@ethersproject/basex@npm:5.6.1": version: 5.6.1 resolution: "@ethersproject/basex@npm:5.6.1" dependencies: @@ -695,7 +709,17 @@ __metadata: languageName: node linkType: hard -"@ethersproject/bignumber@npm:5.6.2, @ethersproject/bignumber@npm:^5.6.2": +"@ethersproject/basex@npm:5.7.0, @ethersproject/basex@npm:^5.6.1, @ethersproject/basex@npm:^5.7.0": + version: 5.7.0 + resolution: "@ethersproject/basex@npm:5.7.0" + dependencies: + "@ethersproject/bytes": ^5.7.0 + "@ethersproject/properties": ^5.7.0 + checksum: 326087b7e1f3787b5fe6cd1cf2b4b5abfafbc355a45e88e22e5e9d6c845b613ffc5301d629b28d5c4d5e2bfe9ec424e6782c804956dff79be05f0098cb5817de + languageName: node + linkType: hard + +"@ethersproject/bignumber@npm:5.6.2": version: 5.6.2 resolution: "@ethersproject/bignumber@npm:5.6.2" dependencies: @@ -706,18 +730,18 @@ __metadata: languageName: node linkType: hard -"@ethersproject/bignumber@npm:^5.0.7, @ethersproject/bignumber@npm:^5.6.0": - version: 5.6.0 - resolution: "@ethersproject/bignumber@npm:5.6.0" +"@ethersproject/bignumber@npm:5.7.0, @ethersproject/bignumber@npm:^5.6.2, @ethersproject/bignumber@npm:^5.7.0": + version: 5.7.0 + resolution: "@ethersproject/bignumber@npm:5.7.0" dependencies: - "@ethersproject/bytes": ^5.6.0 - "@ethersproject/logger": ^5.6.0 - bn.js: ^4.11.9 - checksum: cb1e0d712a1d991d7c74c66d34522413a2fd832e10bc15158b24e07f61e80a221689947936790334137c11c582f3f4d184d3ccf3036e09e4df1b2026923962b4 + "@ethersproject/bytes": ^5.7.0 + "@ethersproject/logger": ^5.7.0 + bn.js: ^5.2.1 + checksum: 8c9a134b76f3feb4ec26a5a27379efb4e156b8fb2de0678a67788a91c7f4e30abe9d948638458e4b20f2e42380da0adacc7c9389d05fce070692edc6ae9b4904 languageName: node linkType: hard -"@ethersproject/bytes@npm:5.6.1, @ethersproject/bytes@npm:^5.0.4, @ethersproject/bytes@npm:^5.6.0, @ethersproject/bytes@npm:^5.6.1": +"@ethersproject/bytes@npm:5.6.1": version: 5.6.1 resolution: "@ethersproject/bytes@npm:5.6.1" dependencies: @@ -726,7 +750,16 @@ __metadata: languageName: node linkType: hard -"@ethersproject/constants@npm:5.6.1, @ethersproject/constants@npm:^5.6.1": +"@ethersproject/bytes@npm:5.7.0, @ethersproject/bytes@npm:^5.6.1, @ethersproject/bytes@npm:^5.7.0": + version: 5.7.0 + resolution: "@ethersproject/bytes@npm:5.7.0" + dependencies: + "@ethersproject/logger": ^5.7.0 + checksum: 66ad365ceaab5da1b23b72225c71dce472cf37737af5118181fa8ab7447d696bea15ca22e3a0e8836fdd8cfac161afe321a7c67d0dde96f9f645ddd759676621 + languageName: node + linkType: hard + +"@ethersproject/constants@npm:5.6.1": version: 5.6.1 resolution: "@ethersproject/constants@npm:5.6.1" dependencies: @@ -735,12 +768,12 @@ __metadata: languageName: node linkType: hard -"@ethersproject/constants@npm:^5.0.4, @ethersproject/constants@npm:^5.6.0": - version: 5.6.0 - resolution: "@ethersproject/constants@npm:5.6.0" +"@ethersproject/constants@npm:5.7.0, @ethersproject/constants@npm:^5.6.1, @ethersproject/constants@npm:^5.7.0": + version: 5.7.0 + resolution: "@ethersproject/constants@npm:5.7.0" dependencies: - "@ethersproject/bignumber": ^5.6.0 - checksum: da54458a0133b64c02052b86fefa6118ed88c449b02a61ba57745bf08029658214291935b0500461bde3f734ea98e6d8edc586eed9ce9fa7e6a16d9397716ff7 + "@ethersproject/bignumber": ^5.7.0 + checksum: 6d4b1355747cce837b3e76ec3bde70e4732736f23b04f196f706ebfa5d4d9c2be50904a390d4d40ce77803b98d03d16a9b6898418e04ba63491933ce08c4ba8a languageName: node linkType: hard @@ -762,7 +795,25 @@ __metadata: languageName: node linkType: hard -"@ethersproject/hash@npm:5.6.1, @ethersproject/hash@npm:^5.6.1": +"@ethersproject/contracts@npm:5.7.0": + version: 5.7.0 + resolution: "@ethersproject/contracts@npm:5.7.0" + dependencies: + "@ethersproject/abi": ^5.7.0 + "@ethersproject/abstract-provider": ^5.7.0 + "@ethersproject/abstract-signer": ^5.7.0 + "@ethersproject/address": ^5.7.0 + "@ethersproject/bignumber": ^5.7.0 + "@ethersproject/bytes": ^5.7.0 + "@ethersproject/constants": ^5.7.0 + "@ethersproject/logger": ^5.7.0 + "@ethersproject/properties": ^5.7.0 + "@ethersproject/transactions": ^5.7.0 + checksum: 6ccf1121cba01b31e02f8c507cb971ab6bfed85706484a9ec09878ef1594a62215f43c4fdef8f4a4875b99c4a800bc95e3be69b1803f8ce479e07634b5a740c0 + languageName: node + linkType: hard + +"@ethersproject/hash@npm:5.6.1": version: 5.6.1 resolution: "@ethersproject/hash@npm:5.6.1" dependencies: @@ -778,23 +829,24 @@ __metadata: languageName: node linkType: hard -"@ethersproject/hash@npm:^5.0.4, @ethersproject/hash@npm:^5.6.0": - version: 5.6.0 - resolution: "@ethersproject/hash@npm:5.6.0" +"@ethersproject/hash@npm:5.7.0, @ethersproject/hash@npm:^5.6.1, @ethersproject/hash@npm:^5.7.0": + version: 5.7.0 + resolution: "@ethersproject/hash@npm:5.7.0" dependencies: - "@ethersproject/abstract-signer": ^5.6.0 - "@ethersproject/address": ^5.6.0 - "@ethersproject/bignumber": ^5.6.0 - "@ethersproject/bytes": ^5.6.0 - "@ethersproject/keccak256": ^5.6.0 - "@ethersproject/logger": ^5.6.0 - "@ethersproject/properties": ^5.6.0 - "@ethersproject/strings": ^5.6.0 - checksum: 7a3b9180963765fff1a307adeb2138219d1585fc979ee2d14888739102ae2b223759cf456a88da554b4043475ec459d3a8dd67a844e39a896f0584c5a9556a06 + "@ethersproject/abstract-signer": ^5.7.0 + "@ethersproject/address": ^5.7.0 + "@ethersproject/base64": ^5.7.0 + "@ethersproject/bignumber": ^5.7.0 + "@ethersproject/bytes": ^5.7.0 + "@ethersproject/keccak256": ^5.7.0 + "@ethersproject/logger": ^5.7.0 + "@ethersproject/properties": ^5.7.0 + "@ethersproject/strings": ^5.7.0 + checksum: 6e9fa8d14eb08171cd32f17f98cc108ec2aeca74a427655f0d689c550fee0b22a83b3b400fad7fb3f41cf14d4111f87f170aa7905bcbcd1173a55f21b06262ef languageName: node linkType: hard -"@ethersproject/hdnode@npm:5.6.2, @ethersproject/hdnode@npm:^5.6.2": +"@ethersproject/hdnode@npm:5.6.2": version: 5.6.2 resolution: "@ethersproject/hdnode@npm:5.6.2" dependencies: @@ -814,7 +866,27 @@ __metadata: languageName: node linkType: hard -"@ethersproject/json-wallets@npm:5.6.1, @ethersproject/json-wallets@npm:^5.6.1": +"@ethersproject/hdnode@npm:5.7.0, @ethersproject/hdnode@npm:^5.6.2, @ethersproject/hdnode@npm:^5.7.0": + version: 5.7.0 + resolution: "@ethersproject/hdnode@npm:5.7.0" + dependencies: + "@ethersproject/abstract-signer": ^5.7.0 + "@ethersproject/basex": ^5.7.0 + "@ethersproject/bignumber": ^5.7.0 + "@ethersproject/bytes": ^5.7.0 + "@ethersproject/logger": ^5.7.0 + "@ethersproject/pbkdf2": ^5.7.0 + "@ethersproject/properties": ^5.7.0 + "@ethersproject/sha2": ^5.7.0 + "@ethersproject/signing-key": ^5.7.0 + "@ethersproject/strings": ^5.7.0 + "@ethersproject/transactions": ^5.7.0 + "@ethersproject/wordlists": ^5.7.0 + checksum: bfe5ca2d89a42de73655f853170ef4766b933c5f481cddad709b3aca18823275b096e572f92d1602a052f80b426edde44ad6b9d028799775a7dad4a5bbed2133 + languageName: node + linkType: hard + +"@ethersproject/json-wallets@npm:5.6.1": version: 5.6.1 resolution: "@ethersproject/json-wallets@npm:5.6.1" dependencies: @@ -835,7 +907,28 @@ __metadata: languageName: node linkType: hard -"@ethersproject/keccak256@npm:5.6.1, @ethersproject/keccak256@npm:^5.6.1": +"@ethersproject/json-wallets@npm:5.7.0, @ethersproject/json-wallets@npm:^5.6.1, @ethersproject/json-wallets@npm:^5.7.0": + version: 5.7.0 + resolution: "@ethersproject/json-wallets@npm:5.7.0" + dependencies: + "@ethersproject/abstract-signer": ^5.7.0 + "@ethersproject/address": ^5.7.0 + "@ethersproject/bytes": ^5.7.0 + "@ethersproject/hdnode": ^5.7.0 + "@ethersproject/keccak256": ^5.7.0 + "@ethersproject/logger": ^5.7.0 + "@ethersproject/pbkdf2": ^5.7.0 + "@ethersproject/properties": ^5.7.0 + "@ethersproject/random": ^5.7.0 + "@ethersproject/strings": ^5.7.0 + "@ethersproject/transactions": ^5.7.0 + aes-js: 3.0.0 + scrypt-js: 3.0.1 + checksum: f583458d22db62efaaf94d38dd243482776a45bf90f9f3882fbad5aa0b8fd288b41eb7c1ff8ec0b99c9b751088e43d6173530db64dd33c59f9d8daa8d7ad5aa2 + languageName: node + linkType: hard + +"@ethersproject/keccak256@npm:5.6.1": version: 5.6.1 resolution: "@ethersproject/keccak256@npm:5.6.1" dependencies: @@ -845,24 +938,31 @@ __metadata: languageName: node linkType: hard -"@ethersproject/keccak256@npm:^5.0.3, @ethersproject/keccak256@npm:^5.6.0": - version: 5.6.0 - resolution: "@ethersproject/keccak256@npm:5.6.0" +"@ethersproject/keccak256@npm:5.7.0, @ethersproject/keccak256@npm:^5.6.1, @ethersproject/keccak256@npm:^5.7.0": + version: 5.7.0 + resolution: "@ethersproject/keccak256@npm:5.7.0" dependencies: - "@ethersproject/bytes": ^5.6.0 + "@ethersproject/bytes": ^5.7.0 js-sha3: 0.8.0 - checksum: 8683ee5c665ae23c9e1a46be4efb9f208f256abc1885844ec653452ad6dd58d08e5df0d78fc01eef33dc10bca38e27a94390b71a86fae666ef7eddf49860e047 + checksum: ff70950d82203aab29ccda2553422cbac2e7a0c15c986bd20a69b13606ed8bb6e4fdd7b67b8d3b27d4f841e8222cbaccd33ed34be29f866fec7308f96ed244c6 languageName: node linkType: hard -"@ethersproject/logger@npm:5.6.0, @ethersproject/logger@npm:^5.0.5, @ethersproject/logger@npm:^5.6.0": +"@ethersproject/logger@npm:5.6.0": version: 5.6.0 resolution: "@ethersproject/logger@npm:5.6.0" checksum: 6eee38a973c7a458552278971c109a3e5df3c257e433cb959da9a287ea04628d1f510d41b83bd5f9da5ddc05d97d307ed2162a9ba1b4fcc50664e4f60061636c languageName: node linkType: hard -"@ethersproject/networks@npm:5.6.3, @ethersproject/networks@npm:^5.6.3": +"@ethersproject/logger@npm:5.7.0, @ethersproject/logger@npm:^5.6.0, @ethersproject/logger@npm:^5.7.0": + version: 5.7.0 + resolution: "@ethersproject/logger@npm:5.7.0" + checksum: 075ab2f605f1fd0813f2e39c3308f77b44a67732b36e712d9bc085f22a84aac4da4f71b39bee50fe78da3e1c812673fadc41180c9970fe5e486e91ea17befe0d + languageName: node + linkType: hard + +"@ethersproject/networks@npm:5.6.3": version: 5.6.3 resolution: "@ethersproject/networks@npm:5.6.3" dependencies: @@ -871,16 +971,16 @@ __metadata: languageName: node linkType: hard -"@ethersproject/networks@npm:^5.6.0": - version: 5.6.1 - resolution: "@ethersproject/networks@npm:5.6.1" +"@ethersproject/networks@npm:5.7.1, @ethersproject/networks@npm:^5.6.3, @ethersproject/networks@npm:^5.7.0": + version: 5.7.1 + resolution: "@ethersproject/networks@npm:5.7.1" dependencies: - "@ethersproject/logger": ^5.6.0 - checksum: e894369e58b45563653155df6f6db9a919448fc077a74a8fcc3fa10423335250372243868bcc2cc08857f081af6320a3a62d322340d2e5364fb25c258c978b9e + "@ethersproject/logger": ^5.7.0 + checksum: 0339f312304c17d9a0adce550edb825d4d2c8c9468c1634c44172c67a9ed256f594da62c4cda5c3837a0f28b7fabc03aca9b492f68ff1fdad337ee861b27bd5d languageName: node linkType: hard -"@ethersproject/pbkdf2@npm:5.6.1, @ethersproject/pbkdf2@npm:^5.6.1": +"@ethersproject/pbkdf2@npm:5.6.1": version: 5.6.1 resolution: "@ethersproject/pbkdf2@npm:5.6.1" dependencies: @@ -890,7 +990,17 @@ __metadata: languageName: node linkType: hard -"@ethersproject/properties@npm:5.6.0, @ethersproject/properties@npm:^5.0.3, @ethersproject/properties@npm:^5.6.0": +"@ethersproject/pbkdf2@npm:5.7.0, @ethersproject/pbkdf2@npm:^5.6.1, @ethersproject/pbkdf2@npm:^5.7.0": + version: 5.7.0 + resolution: "@ethersproject/pbkdf2@npm:5.7.0" + dependencies: + "@ethersproject/bytes": ^5.7.0 + "@ethersproject/sha2": ^5.7.0 + checksum: b895adb9e35a8a127e794f7aadc31a2424ef355a70e51cde10d457e3e888bb8102373199a540cf61f2d6b9a32e47358f9c65b47d559f42bf8e596b5fd67901e9 + languageName: node + linkType: hard + +"@ethersproject/properties@npm:5.6.0": version: 5.6.0 resolution: "@ethersproject/properties@npm:5.6.0" dependencies: @@ -899,6 +1009,15 @@ __metadata: languageName: node linkType: hard +"@ethersproject/properties@npm:5.7.0, @ethersproject/properties@npm:^5.6.0, @ethersproject/properties@npm:^5.7.0": + version: 5.7.0 + resolution: "@ethersproject/properties@npm:5.7.0" + dependencies: + "@ethersproject/logger": ^5.7.0 + checksum: 6ab0ccf0c3aadc9221e0cdc5306ce6cd0df7f89f77d77bccdd1277182c9ead0202cd7521329ba3acde130820bf8af299e17cf567d0d497c736ee918207bbf59f + languageName: node + linkType: hard + "@ethersproject/providers@npm:5.6.8": version: 5.6.8 resolution: "@ethersproject/providers@npm:5.6.8" @@ -927,7 +1046,35 @@ __metadata: languageName: node linkType: hard -"@ethersproject/random@npm:5.6.1, @ethersproject/random@npm:^5.6.1": +"@ethersproject/providers@npm:5.7.2": + version: 5.7.2 + resolution: "@ethersproject/providers@npm:5.7.2" + dependencies: + "@ethersproject/abstract-provider": ^5.7.0 + "@ethersproject/abstract-signer": ^5.7.0 + "@ethersproject/address": ^5.7.0 + "@ethersproject/base64": ^5.7.0 + "@ethersproject/basex": ^5.7.0 + "@ethersproject/bignumber": ^5.7.0 + "@ethersproject/bytes": ^5.7.0 + "@ethersproject/constants": ^5.7.0 + "@ethersproject/hash": ^5.7.0 + "@ethersproject/logger": ^5.7.0 + "@ethersproject/networks": ^5.7.0 + "@ethersproject/properties": ^5.7.0 + "@ethersproject/random": ^5.7.0 + "@ethersproject/rlp": ^5.7.0 + "@ethersproject/sha2": ^5.7.0 + "@ethersproject/strings": ^5.7.0 + "@ethersproject/transactions": ^5.7.0 + "@ethersproject/web": ^5.7.0 + bech32: 1.1.4 + ws: 7.4.6 + checksum: 1754c731a5ca6782ae9677f4a9cd8b6246c4ef21a966c9a01b133750f3c578431ec43ec254e699969c4a0f87e84463ded50f96b415600aabd37d2056aee58c19 + languageName: node + linkType: hard + +"@ethersproject/random@npm:5.6.1": version: 5.6.1 resolution: "@ethersproject/random@npm:5.6.1" dependencies: @@ -937,7 +1084,17 @@ __metadata: languageName: node linkType: hard -"@ethersproject/rlp@npm:5.6.1, @ethersproject/rlp@npm:^5.6.1": +"@ethersproject/random@npm:5.7.0, @ethersproject/random@npm:^5.6.1, @ethersproject/random@npm:^5.7.0": + version: 5.7.0 + resolution: "@ethersproject/random@npm:5.7.0" + dependencies: + "@ethersproject/bytes": ^5.7.0 + "@ethersproject/logger": ^5.7.0 + checksum: 017829c91cff6c76470852855108115b0b52c611b6be817ed1948d56ba42d6677803ec2012aa5ae298a7660024156a64c11fcf544e235e239ab3f89f0fff7345 + languageName: node + linkType: hard + +"@ethersproject/rlp@npm:5.6.1": version: 5.6.1 resolution: "@ethersproject/rlp@npm:5.6.1" dependencies: @@ -947,17 +1104,17 @@ __metadata: languageName: node linkType: hard -"@ethersproject/rlp@npm:^5.6.0": - version: 5.6.0 - resolution: "@ethersproject/rlp@npm:5.6.0" +"@ethersproject/rlp@npm:5.7.0, @ethersproject/rlp@npm:^5.6.1, @ethersproject/rlp@npm:^5.7.0": + version: 5.7.0 + resolution: "@ethersproject/rlp@npm:5.7.0" dependencies: - "@ethersproject/bytes": ^5.6.0 - "@ethersproject/logger": ^5.6.0 - checksum: 3697871cec540e3bf3fd7a6a65ef3e5ca223f684ac928ecf028619eee251c6c5427b02493c152f057f5e9b07ea216d24f807ec84e5df80414511f8aff5505359 + "@ethersproject/bytes": ^5.7.0 + "@ethersproject/logger": ^5.7.0 + checksum: bce165b0f7e68e4d091c9d3cf47b247cac33252df77a095ca4281d32d5eeaaa3695d9bc06b2b057c5015353a68df89f13a4a54a72e888e4beeabbe56b15dda6e languageName: node linkType: hard -"@ethersproject/sha2@npm:5.6.1, @ethersproject/sha2@npm:^5.6.1": +"@ethersproject/sha2@npm:5.6.1": version: 5.6.1 resolution: "@ethersproject/sha2@npm:5.6.1" dependencies: @@ -968,7 +1125,18 @@ __metadata: languageName: node linkType: hard -"@ethersproject/signing-key@npm:5.6.2, @ethersproject/signing-key@npm:^5.6.2": +"@ethersproject/sha2@npm:5.7.0, @ethersproject/sha2@npm:^5.6.1, @ethersproject/sha2@npm:^5.7.0": + version: 5.7.0 + resolution: "@ethersproject/sha2@npm:5.7.0" + dependencies: + "@ethersproject/bytes": ^5.7.0 + "@ethersproject/logger": ^5.7.0 + hash.js: 1.1.7 + checksum: 09321057c022effbff4cc2d9b9558228690b5dd916329d75c4b1ffe32ba3d24b480a367a7cc92d0f0c0b1c896814d03351ae4630e2f1f7160be2bcfbde435dbc + languageName: node + linkType: hard + +"@ethersproject/signing-key@npm:5.6.2": version: 5.6.2 resolution: "@ethersproject/signing-key@npm:5.6.2" dependencies: @@ -982,17 +1150,17 @@ __metadata: languageName: node linkType: hard -"@ethersproject/signing-key@npm:^5.6.0": - version: 5.6.0 - resolution: "@ethersproject/signing-key@npm:5.6.0" +"@ethersproject/signing-key@npm:5.7.0, @ethersproject/signing-key@npm:^5.6.2, @ethersproject/signing-key@npm:^5.7.0": + version: 5.7.0 + resolution: "@ethersproject/signing-key@npm:5.7.0" dependencies: - "@ethersproject/bytes": ^5.6.0 - "@ethersproject/logger": ^5.6.0 - "@ethersproject/properties": ^5.6.0 - bn.js: ^4.11.9 + "@ethersproject/bytes": ^5.7.0 + "@ethersproject/logger": ^5.7.0 + "@ethersproject/properties": ^5.7.0 + bn.js: ^5.2.1 elliptic: 6.5.4 hash.js: 1.1.7 - checksum: c61118ff1ff89560da59cf77ca6553762e94b9d2757542be15dcf7eb4962327faede941d8461272afb8550cc2e28d38e7e89d199650ebae07a596df3c2059e08 + checksum: 8f8de09b0aac709683bbb49339bc0a4cd2f95598f3546436c65d6f3c3a847ffa98e06d35e9ed2b17d8030bd2f02db9b7bd2e11c5cf8a71aad4537487ab4cf03a languageName: node linkType: hard @@ -1010,7 +1178,21 @@ __metadata: languageName: node linkType: hard -"@ethersproject/strings@npm:5.6.1, @ethersproject/strings@npm:^5.6.1": +"@ethersproject/solidity@npm:5.7.0": + version: 5.7.0 + resolution: "@ethersproject/solidity@npm:5.7.0" + dependencies: + "@ethersproject/bignumber": ^5.7.0 + "@ethersproject/bytes": ^5.7.0 + "@ethersproject/keccak256": ^5.7.0 + "@ethersproject/logger": ^5.7.0 + "@ethersproject/sha2": ^5.7.0 + "@ethersproject/strings": ^5.7.0 + checksum: 9a02f37f801c96068c3e7721f83719d060175bc4e80439fe060e92bd7acfcb6ac1330c7e71c49f4c2535ca1308f2acdcb01e00133129aac00581724c2d6293f3 + languageName: node + linkType: hard + +"@ethersproject/strings@npm:5.6.1": version: 5.6.1 resolution: "@ethersproject/strings@npm:5.6.1" dependencies: @@ -1021,18 +1203,18 @@ __metadata: languageName: node linkType: hard -"@ethersproject/strings@npm:^5.0.4, @ethersproject/strings@npm:^5.6.0": - version: 5.6.0 - resolution: "@ethersproject/strings@npm:5.6.0" +"@ethersproject/strings@npm:5.7.0, @ethersproject/strings@npm:^5.6.1, @ethersproject/strings@npm:^5.7.0": + version: 5.7.0 + resolution: "@ethersproject/strings@npm:5.7.0" dependencies: - "@ethersproject/bytes": ^5.6.0 - "@ethersproject/constants": ^5.6.0 - "@ethersproject/logger": ^5.6.0 - checksum: 0b69bdd2c2767049599e1b6bbf34782166a1b901fd00a09b2dab0f4a92a6a1e85bb28d498f40f138a68baf62714831b6398e170358c861b4b1e54bfac375b655 + "@ethersproject/bytes": ^5.7.0 + "@ethersproject/constants": ^5.7.0 + "@ethersproject/logger": ^5.7.0 + checksum: 5ff78693ae3fdf3cf23e1f6dc047a61e44c8197d2408c42719fef8cb7b7b3613a4eec88ac0ed1f9f5558c74fe0de7ae3195a29ca91a239c74b9f444d8e8b50df languageName: node linkType: hard -"@ethersproject/transactions@npm:5.6.2, @ethersproject/transactions@npm:^5.6.2": +"@ethersproject/transactions@npm:5.6.2": version: 5.6.2 resolution: "@ethersproject/transactions@npm:5.6.2" dependencies: @@ -1049,20 +1231,20 @@ __metadata: languageName: node linkType: hard -"@ethersproject/transactions@npm:^5.0.0-beta.135, @ethersproject/transactions@npm:^5.6.0": - version: 5.6.0 - resolution: "@ethersproject/transactions@npm:5.6.0" +"@ethersproject/transactions@npm:5.7.0, @ethersproject/transactions@npm:^5.6.2, @ethersproject/transactions@npm:^5.7.0": + version: 5.7.0 + resolution: "@ethersproject/transactions@npm:5.7.0" dependencies: - "@ethersproject/address": ^5.6.0 - "@ethersproject/bignumber": ^5.6.0 - "@ethersproject/bytes": ^5.6.0 - "@ethersproject/constants": ^5.6.0 - "@ethersproject/keccak256": ^5.6.0 - "@ethersproject/logger": ^5.6.0 - "@ethersproject/properties": ^5.6.0 - "@ethersproject/rlp": ^5.6.0 - "@ethersproject/signing-key": ^5.6.0 - checksum: b01a3a9ce1e2d945825adbecfc71b992293e0274b77caf2c0b3c45bb76919ce64aa888a5705e6745a84448c50fc4eb58ff5e0ad11c37b1aae33c7a7d3b8af883 + "@ethersproject/address": ^5.7.0 + "@ethersproject/bignumber": ^5.7.0 + "@ethersproject/bytes": ^5.7.0 + "@ethersproject/constants": ^5.7.0 + "@ethersproject/keccak256": ^5.7.0 + "@ethersproject/logger": ^5.7.0 + "@ethersproject/properties": ^5.7.0 + "@ethersproject/rlp": ^5.7.0 + "@ethersproject/signing-key": ^5.7.0 + checksum: a31b71996d2b283f68486241bff0d3ea3f1ba0e8f1322a8fffc239ccc4f4a7eb2ea9994b8fd2f093283fd75f87bae68171e01b6265261f821369aca319884a79 languageName: node linkType: hard @@ -1077,6 +1259,17 @@ __metadata: languageName: node linkType: hard +"@ethersproject/units@npm:5.7.0": + version: 5.7.0 + resolution: "@ethersproject/units@npm:5.7.0" + dependencies: + "@ethersproject/bignumber": ^5.7.0 + "@ethersproject/constants": ^5.7.0 + "@ethersproject/logger": ^5.7.0 + checksum: 304714f848cd32e57df31bf545f7ad35c2a72adae957198b28cbc62166daa929322a07bff6e9c9ac4577ab6aa0de0546b065ed1b2d20b19e25748b7d475cb0fc + languageName: node + linkType: hard + "@ethersproject/wallet@npm:5.6.2": version: 5.6.2 resolution: "@ethersproject/wallet@npm:5.6.2" @@ -1100,7 +1293,30 @@ __metadata: languageName: node linkType: hard -"@ethersproject/web@npm:5.6.1, @ethersproject/web@npm:^5.6.1": +"@ethersproject/wallet@npm:5.7.0": + version: 5.7.0 + resolution: "@ethersproject/wallet@npm:5.7.0" + dependencies: + "@ethersproject/abstract-provider": ^5.7.0 + "@ethersproject/abstract-signer": ^5.7.0 + "@ethersproject/address": ^5.7.0 + "@ethersproject/bignumber": ^5.7.0 + "@ethersproject/bytes": ^5.7.0 + "@ethersproject/hash": ^5.7.0 + "@ethersproject/hdnode": ^5.7.0 + "@ethersproject/json-wallets": ^5.7.0 + "@ethersproject/keccak256": ^5.7.0 + "@ethersproject/logger": ^5.7.0 + "@ethersproject/properties": ^5.7.0 + "@ethersproject/random": ^5.7.0 + "@ethersproject/signing-key": ^5.7.0 + "@ethersproject/transactions": ^5.7.0 + "@ethersproject/wordlists": ^5.7.0 + checksum: a4009bf7331eddab38e3015b5e9101ef92de7f705b00a6196b997db0e5635b6d83561674d46c90c6f77b87c0500fe4a6b0183ba13749efc22db59c99deb82fbd + languageName: node + linkType: hard + +"@ethersproject/web@npm:5.6.1": version: 5.6.1 resolution: "@ethersproject/web@npm:5.6.1" dependencies: @@ -1113,20 +1329,20 @@ __metadata: languageName: node linkType: hard -"@ethersproject/web@npm:^5.6.0": - version: 5.6.0 - resolution: "@ethersproject/web@npm:5.6.0" +"@ethersproject/web@npm:5.7.1, @ethersproject/web@npm:^5.6.1, @ethersproject/web@npm:^5.7.0": + version: 5.7.1 + resolution: "@ethersproject/web@npm:5.7.1" dependencies: - "@ethersproject/base64": ^5.6.0 - "@ethersproject/bytes": ^5.6.0 - "@ethersproject/logger": ^5.6.0 - "@ethersproject/properties": ^5.6.0 - "@ethersproject/strings": ^5.6.0 - checksum: 42b6e71658393e5abf8341c6bea0deb22cc744b4d22b3a979ed876bc772723b800c18e5180e223f77c47fb045828ef16ba5a01e8dd346474cf430533d1f053bc + "@ethersproject/base64": ^5.7.0 + "@ethersproject/bytes": ^5.7.0 + "@ethersproject/logger": ^5.7.0 + "@ethersproject/properties": ^5.7.0 + "@ethersproject/strings": ^5.7.0 + checksum: 7028c47103f82fd2e2c197ce0eecfacaa9180ffeec7de7845b1f4f9b19d84081b7a48227aaddde05a4aaa526af574a9a0ce01cc0fc75e3e371f84b38b5b16b2b languageName: node linkType: hard -"@ethersproject/wordlists@npm:5.6.1, @ethersproject/wordlists@npm:^5.6.1": +"@ethersproject/wordlists@npm:5.6.1": version: 5.6.1 resolution: "@ethersproject/wordlists@npm:5.6.1" dependencies: @@ -1139,6 +1355,26 @@ __metadata: languageName: node linkType: hard +"@ethersproject/wordlists@npm:5.7.0, @ethersproject/wordlists@npm:^5.6.1, @ethersproject/wordlists@npm:^5.7.0": + version: 5.7.0 + resolution: "@ethersproject/wordlists@npm:5.7.0" + dependencies: + "@ethersproject/bytes": ^5.7.0 + "@ethersproject/hash": ^5.7.0 + "@ethersproject/logger": ^5.7.0 + "@ethersproject/properties": ^5.7.0 + "@ethersproject/strings": ^5.7.0 + checksum: 30eb6eb0731f9ef5faa44bf9c0c6e950bcaaef61e4d2d9ce0ae6d341f4e2d6d1f4ab4f8880bfce03b7aac4b862fb740e1421170cfbf8e2aafc359277d49e6e97 + languageName: node + linkType: hard + +"@fastify/busboy@npm:^2.0.0": + version: 2.1.0 + resolution: "@fastify/busboy@npm:2.1.0" + checksum: 3233abd10f73e50668cb4bb278a79b7b3fadd30215ac6458299b0e5a09a29c3586ec07597aae6bd93f5cbedfcef43a8aeea51829cd28fc13850cdbcd324c28d5 + languageName: node + linkType: hard + "@ganache/ethereum-address@npm:0.1.4": version: 0.1.4 resolution: "@ganache/ethereum-address@npm:0.1.4" @@ -1215,42 +1451,56 @@ __metadata: languageName: node linkType: hard -"@gar/promisify@npm:^1.1.3": - version: 1.1.3 - resolution: "@gar/promisify@npm:1.1.3" - checksum: 4059f790e2d07bf3c3ff3e0fec0daa8144fe35c1f6e0111c9921bd32106adaa97a4ab096ad7dab1e28ee6a9060083c4d1a4ada42a7f5f3f7a96b8812e2b757c1 +"@humanwhocodes/config-array@npm:^0.11.13": + version: 0.11.13 + resolution: "@humanwhocodes/config-array@npm:0.11.13" + dependencies: + "@humanwhocodes/object-schema": ^2.0.1 + debug: ^4.1.1 + minimatch: ^3.0.5 + checksum: f8ea57b0d7ed7f2d64cd3944654976829d9da91c04d9c860e18804729a33f7681f78166ef4c761850b8c324d362f7d53f14c5c44907a6b38b32c703ff85e4805 languageName: node linkType: hard -"@humanwhocodes/config-array@npm:^0.9.2": - version: 0.9.5 - resolution: "@humanwhocodes/config-array@npm:0.9.5" - dependencies: - "@humanwhocodes/object-schema": ^1.2.1 - debug: ^4.1.1 - minimatch: ^3.0.4 - checksum: 8ba6281bc0590f6c6eadeefc14244b5a3e3f5903445aadd1a32099ed80e753037674026ce1b3c945ab93561bea5eb29e3c5bff67060e230c295595ba517a3492 +"@humanwhocodes/module-importer@npm:^1.0.1": + version: 1.0.1 + resolution: "@humanwhocodes/module-importer@npm:1.0.1" + checksum: 0fd22007db8034a2cdf2c764b140d37d9020bbfce8a49d3ec5c05290e77d4b0263b1b972b752df8c89e5eaa94073408f2b7d977aed131faf6cf396ebb5d7fb61 languageName: node linkType: hard -"@humanwhocodes/object-schema@npm:^1.2.1": - version: 1.2.1 - resolution: "@humanwhocodes/object-schema@npm:1.2.1" - checksum: a824a1ec31591231e4bad5787641f59e9633827d0a2eaae131a288d33c9ef0290bd16fda8da6f7c0fcb014147865d12118df10db57f27f41e20da92369fcb3f1 +"@humanwhocodes/object-schema@npm:^2.0.1": + version: 2.0.1 + resolution: "@humanwhocodes/object-schema@npm:2.0.1" + checksum: 24929487b1ed48795d2f08346a0116cc5ee4634848bce64161fb947109352c562310fd159fc64dda0e8b853307f5794605191a9547f7341158559ca3c8262a45 + languageName: node + linkType: hard + +"@isaacs/cliui@npm:^8.0.2": + version: 8.0.2 + resolution: "@isaacs/cliui@npm:8.0.2" + dependencies: + string-width: ^5.1.2 + string-width-cjs: "npm:string-width@^4.2.0" + strip-ansi: ^7.0.1 + strip-ansi-cjs: "npm:strip-ansi@^6.0.1" + wrap-ansi: ^8.1.0 + wrap-ansi-cjs: "npm:wrap-ansi@^7.0.0" + checksum: 4a473b9b32a7d4d3cfb7a614226e555091ff0c5a29a1734c28c72a182c2f6699b26fc6b5c2131dfd841e86b185aea714c72201d7c98c2fba5f17709333a67aeb languageName: node linkType: hard "@jridgewell/resolve-uri@npm:^3.0.3": - version: 3.0.7 - resolution: "@jridgewell/resolve-uri@npm:3.0.7" - checksum: 94f454f4cef8f0acaad85745fd3ca6cd0d62ef731cf9f952ecb89b8b2ce5e20998cd52be31311cedc5fa5b28b1708a15f3ad9df0fe1447ee4f42959b036c4b5b + version: 3.1.1 + resolution: "@jridgewell/resolve-uri@npm:3.1.1" + checksum: f5b441fe7900eab4f9155b3b93f9800a916257f4e8563afbcd3b5a5337b55e52bd8ae6735453b1b745457d9f6cdb16d74cd6220bbdd98cf153239e13f6cbb653 languageName: node linkType: hard "@jridgewell/sourcemap-codec@npm:^1.4.10": - version: 1.4.13 - resolution: "@jridgewell/sourcemap-codec@npm:1.4.13" - checksum: f14449096f60a5f921262322fef65ce0bbbfb778080b3b20212080bcefdeba621c43a58c27065bd536ecb4cc767b18eb9c45f15b6b98a4970139572b60603a1c + version: 1.4.15 + resolution: "@jridgewell/sourcemap-codec@npm:1.4.15" + checksum: b881c7e503db3fc7f3c1f35a1dd2655a188cc51a3612d76efc8a6eb74728bef5606e6758ee77423e564092b4a518aba569bbb21c9bac5ab7a35b0c6ae7e344c8 languageName: node linkType: hard @@ -1291,29 +1541,52 @@ __metadata: linkType: hard "@metamask/eth-sig-util@npm:^4.0.0": - version: 4.0.0 - resolution: "@metamask/eth-sig-util@npm:4.0.0" + version: 4.0.1 + resolution: "@metamask/eth-sig-util@npm:4.0.1" dependencies: ethereumjs-abi: ^0.6.8 ethereumjs-util: ^6.2.1 ethjs-util: ^0.1.6 tweetnacl: ^1.0.3 tweetnacl-util: ^0.15.1 - checksum: 983fc1d4ba2d23d8d87024013edc38660456be978641087fa4c9ca4a1c8ea0cb33e5b6845153e3f8d76adf297d38479fcfd16ed871916fee8814cca05b85b458 + checksum: 740df4c92a1282e6be4c00c86c1a8ccfb93e767596e43f6da895aa5bab4a28fc3c2209f0327db34924a4a1e9db72bc4d3dddfcfc45cca0b218c9ccbf7d1b1445 languageName: node linkType: hard -"@noble/hashes@npm:1.0.0, @noble/hashes@npm:~1.0.0": - version: 1.0.0 - resolution: "@noble/hashes@npm:1.0.0" - checksum: bdf1c28a4b587e72ec6b0c504903239c6f96680b2c15a6d90d367512f468eeca12f2ee7bd25967a9529be2bedbf3f8d0a50c33368937f8dfef2a973d0661c7b5 +"@noble/curves@npm:1.1.0, @noble/curves@npm:~1.1.0": + version: 1.1.0 + resolution: "@noble/curves@npm:1.1.0" + dependencies: + "@noble/hashes": 1.3.1 + checksum: 2658cdd3f84f71079b4e3516c47559d22cf4b55c23ac8ee9d2b1f8e5b72916d9689e59820e0f9d9cb4a46a8423af5b56dc6bb7782405c88be06a015180508db5 + languageName: node + linkType: hard + +"@noble/hashes@npm:1.2.0, @noble/hashes@npm:~1.2.0": + version: 1.2.0 + resolution: "@noble/hashes@npm:1.2.0" + checksum: 8ca080ce557b8f40fb2f78d3aedffd95825a415ac8e13d7ffe3643f8626a8c2d99a3e5975b555027ac24316d8b3c02a35b8358567c0c23af681e6573602aa434 + languageName: node + linkType: hard + +"@noble/hashes@npm:1.3.1": + version: 1.3.1 + resolution: "@noble/hashes@npm:1.3.1" + checksum: 7fdefc0f7a0c1ec27acc6ff88841793e3f93ec4ce6b8a6a12bfc0dd70ae6b7c4c82fe305fdfeda1735d5ad4a9eebe761e6693b3d355689c559e91242f4bc95b1 + languageName: node + linkType: hard + +"@noble/hashes@npm:~1.3.0, @noble/hashes@npm:~1.3.1": + version: 1.3.2 + resolution: "@noble/hashes@npm:1.3.2" + checksum: fe23536b436539d13f90e4b9be843cc63b1b17666a07634a2b1259dded6f490be3d050249e6af98076ea8f2ea0d56f578773c2197f2aa0eeaa5fba5bc18ba474 languageName: node linkType: hard -"@noble/secp256k1@npm:1.5.5, @noble/secp256k1@npm:~1.5.2": - version: 1.5.5 - resolution: "@noble/secp256k1@npm:1.5.5" - checksum: 8a144e8469b29e94107ca4bcf442fc5d9410974239f8e42013f8604d602ab73cfc0c113c24170d41c25e2c40d6d1c46319c439c3bc26a7581c79060fabc3ea8c +"@noble/secp256k1@npm:1.7.1, @noble/secp256k1@npm:~1.7.0": + version: 1.7.1 + resolution: "@noble/secp256k1@npm:1.7.1" + checksum: d2301f1f7690368d8409a3152450458f27e54df47e3f917292de3de82c298770890c2de7c967d237eff9c95b70af485389a9695f73eb05a43e2bd562d18b18cb languageName: node linkType: hard @@ -1334,7 +1607,7 @@ __metadata: languageName: node linkType: hard -"@nodelib/fs.walk@npm:^1.2.3": +"@nodelib/fs.walk@npm:^1.2.3, @nodelib/fs.walk@npm:^1.2.8": version: 1.2.8 resolution: "@nodelib/fs.walk@npm:1.2.8" dependencies: @@ -1344,151 +1617,151 @@ __metadata: languageName: node linkType: hard -"@nomicfoundation/ethereumjs-block@npm:^4.0.0": - version: 4.0.0 - resolution: "@nomicfoundation/ethereumjs-block@npm:4.0.0" +"@nomicfoundation/ethereumjs-block@npm:4.2.2, @nomicfoundation/ethereumjs-block@npm:^4.0.0": + version: 4.2.2 + resolution: "@nomicfoundation/ethereumjs-block@npm:4.2.2" dependencies: - "@nomicfoundation/ethereumjs-common": ^3.0.0 - "@nomicfoundation/ethereumjs-rlp": ^4.0.0 - "@nomicfoundation/ethereumjs-trie": ^5.0.0 - "@nomicfoundation/ethereumjs-tx": ^4.0.0 - "@nomicfoundation/ethereumjs-util": ^8.0.0 + "@nomicfoundation/ethereumjs-common": 3.1.2 + "@nomicfoundation/ethereumjs-rlp": 4.0.3 + "@nomicfoundation/ethereumjs-trie": 5.0.5 + "@nomicfoundation/ethereumjs-tx": 4.1.2 + "@nomicfoundation/ethereumjs-util": 8.0.6 ethereum-cryptography: 0.1.3 - checksum: a57a33dda7724f0a46ef2e0ca0dbb1b427268f4135e8c23eee9ab5730a79369d52122faba7a010d71bca3046f7ce644ed95e4a34d5f2221ecaa5d94886d84b11 + checksum: 174a251d9c4e0bb9c1a7a6e77c52f1b2b4708d8135dba55c1025776248258ce905e4383a79da0ce7ac4e67e03b6c56351ca634a771b5eae976ed97498fc163f9 languageName: node linkType: hard -"@nomicfoundation/ethereumjs-blockchain@npm:^6.0.0": - version: 6.0.0 - resolution: "@nomicfoundation/ethereumjs-blockchain@npm:6.0.0" - dependencies: - "@nomicfoundation/ethereumjs-block": ^4.0.0 - "@nomicfoundation/ethereumjs-common": ^3.0.0 - "@nomicfoundation/ethereumjs-ethash": ^2.0.0 - "@nomicfoundation/ethereumjs-rlp": ^4.0.0 - "@nomicfoundation/ethereumjs-trie": ^5.0.0 - "@nomicfoundation/ethereumjs-util": ^8.0.0 +"@nomicfoundation/ethereumjs-blockchain@npm:6.2.2, @nomicfoundation/ethereumjs-blockchain@npm:^6.0.0": + version: 6.2.2 + resolution: "@nomicfoundation/ethereumjs-blockchain@npm:6.2.2" + dependencies: + "@nomicfoundation/ethereumjs-block": 4.2.2 + "@nomicfoundation/ethereumjs-common": 3.1.2 + "@nomicfoundation/ethereumjs-ethash": 2.0.5 + "@nomicfoundation/ethereumjs-rlp": 4.0.3 + "@nomicfoundation/ethereumjs-trie": 5.0.5 + "@nomicfoundation/ethereumjs-util": 8.0.6 abstract-level: ^1.0.3 debug: ^4.3.3 ethereum-cryptography: 0.1.3 level: ^8.0.0 lru-cache: ^5.1.1 memory-level: ^1.0.0 - checksum: 5605c1d249924321de98c1728b5b832ee6488b690a42c829db21afa96f5c152c73afdec6aa4758cb9b24ec7ac19ec9f3146b63cf837e1b91d364e4c37b497881 + checksum: 5933600bf005ec3e33f6fdd0b3582b80ed7eac8fa776fc86f21de8a6ac3614e3262c48ad3737015c19558165aecd7b13a8056e96afd61511d0605411e0264871 languageName: node linkType: hard -"@nomicfoundation/ethereumjs-common@npm:^3.0.0": - version: 3.0.0 - resolution: "@nomicfoundation/ethereumjs-common@npm:3.0.0" +"@nomicfoundation/ethereumjs-common@npm:3.1.2, @nomicfoundation/ethereumjs-common@npm:^3.0.0": + version: 3.1.2 + resolution: "@nomicfoundation/ethereumjs-common@npm:3.1.2" dependencies: - "@nomicfoundation/ethereumjs-util": ^8.0.0 + "@nomicfoundation/ethereumjs-util": 8.0.6 crc-32: ^1.2.0 - checksum: 6a62908e5ccd8a4f56b841bd6ba9eef21dffafdd505f18b6b886d86ba4287cd12a2c632d521c5fddf2c6fca5a840f580d7601d89820098f6c1f8311db41e496b + checksum: b886e47bb4da26b42bf9e905c5f073db62d2ad1b740d50898012580b501868839fcf08430debe3fca927b4d73e01628c1b0b2e84401feb551245dacfac045404 languageName: node linkType: hard -"@nomicfoundation/ethereumjs-ethash@npm:^2.0.0": - version: 2.0.0 - resolution: "@nomicfoundation/ethereumjs-ethash@npm:2.0.0" +"@nomicfoundation/ethereumjs-ethash@npm:2.0.5": + version: 2.0.5 + resolution: "@nomicfoundation/ethereumjs-ethash@npm:2.0.5" dependencies: - "@nomicfoundation/ethereumjs-block": ^4.0.0 - "@nomicfoundation/ethereumjs-rlp": ^4.0.0 - "@nomicfoundation/ethereumjs-util": ^8.0.0 + "@nomicfoundation/ethereumjs-block": 4.2.2 + "@nomicfoundation/ethereumjs-rlp": 4.0.3 + "@nomicfoundation/ethereumjs-util": 8.0.6 abstract-level: ^1.0.3 bigint-crypto-utils: ^3.0.23 ethereum-cryptography: 0.1.3 - checksum: 60133df2d450179f2ab26e8784b1bd79b37411bb047a7dace655499749893750f0f8d6d573f182ebcf4dba35f2da6301b0ad1b80dbe7637bb0d5155ccb189fda + checksum: 0b03c8771602cfa64c9d35e5686326d0bfecb7dc0874cd9ff737cae0ec401396187d8499c103b8858fed5b9bd930e132b8fd09d19b3f0649df36d7d0fdf4d27c languageName: node linkType: hard -"@nomicfoundation/ethereumjs-evm@npm:^1.0.0, @nomicfoundation/ethereumjs-evm@npm:^1.0.0-rc.3": - version: 1.0.0 - resolution: "@nomicfoundation/ethereumjs-evm@npm:1.0.0" +"@nomicfoundation/ethereumjs-evm@npm:1.3.2, @nomicfoundation/ethereumjs-evm@npm:^1.0.0, @nomicfoundation/ethereumjs-evm@npm:^1.0.0-rc.3": + version: 1.3.2 + resolution: "@nomicfoundation/ethereumjs-evm@npm:1.3.2" dependencies: - "@nomicfoundation/ethereumjs-common": ^3.0.0 - "@nomicfoundation/ethereumjs-util": ^8.0.0 + "@nomicfoundation/ethereumjs-common": 3.1.2 + "@nomicfoundation/ethereumjs-util": 8.0.6 "@types/async-eventemitter": ^0.2.1 async-eventemitter: ^0.2.4 debug: ^4.3.3 ethereum-cryptography: 0.1.3 mcl-wasm: ^0.7.1 rustbn.js: ~0.2.0 - checksum: d1ffaa1a02c1f78099a5cfe802f2738c498063e383a51ede4b7194c809d7bdb8d322edfea4d83090c8c1b83b42fa9febbd571c35f5cf27f18d47fb664f3ab61e + checksum: 4a051f36968574ffbee5d3c401ebf1c81899b69a0692c372fced67691fe18f26741f26d1781e79dfa52136af888e561d80de4fd7dd59000d640c51bd8b130023 languageName: node linkType: hard -"@nomicfoundation/ethereumjs-rlp@npm:^4.0.0, @nomicfoundation/ethereumjs-rlp@npm:^4.0.0-beta.2": - version: 4.0.0 - resolution: "@nomicfoundation/ethereumjs-rlp@npm:4.0.0" +"@nomicfoundation/ethereumjs-rlp@npm:4.0.3, @nomicfoundation/ethereumjs-rlp@npm:^4.0.0": + version: 4.0.3 + resolution: "@nomicfoundation/ethereumjs-rlp@npm:4.0.3" bin: rlp: bin/rlp - checksum: b358d239e5a24884f0446d52159c8115b0eb1d6907179dc968df5054dccea7eff72f2d12522c911b6e08bb4b5d3f5f8e1d86a45cb1a24a4831cbb109743d4407 + checksum: 14fc83701dd52323fae705786549ab07482ace315de69a586bb948b6f21ec529794cef8248af0b5c7e8f8b05fbadfbe222754b305841fa2189bfbc8f1eb064a2 languageName: node linkType: hard -"@nomicfoundation/ethereumjs-statemanager@npm:^1.0.0": - version: 1.0.0 - resolution: "@nomicfoundation/ethereumjs-statemanager@npm:1.0.0" +"@nomicfoundation/ethereumjs-statemanager@npm:1.0.5, @nomicfoundation/ethereumjs-statemanager@npm:^1.0.0": + version: 1.0.5 + resolution: "@nomicfoundation/ethereumjs-statemanager@npm:1.0.5" dependencies: - "@nomicfoundation/ethereumjs-common": ^3.0.0 - "@nomicfoundation/ethereumjs-rlp": ^4.0.0 - "@nomicfoundation/ethereumjs-trie": ^5.0.0 - "@nomicfoundation/ethereumjs-util": ^8.0.0 + "@nomicfoundation/ethereumjs-common": 3.1.2 + "@nomicfoundation/ethereumjs-rlp": 4.0.3 + "@nomicfoundation/ethereumjs-trie": 5.0.5 + "@nomicfoundation/ethereumjs-util": 8.0.6 debug: ^4.3.3 ethereum-cryptography: 0.1.3 functional-red-black-tree: ^1.0.1 - checksum: fad02ea922fbe25328186ea2eb43bdba63def57822f373ce213be26125ee8d3c90cf3b6f626e6876637cdb842e3c2b788fb8891fcf1aca3fd655e1c0d9a7e936 + checksum: 0f88743900b2211deb5d2393bf111ef63411ce533387a6d06c48cc9ac1f4fc38f968cdecc4712ebdafdebc3c4c2ce6bd1abd82989f4f4f515d3f571981d38f9f languageName: node linkType: hard -"@nomicfoundation/ethereumjs-trie@npm:^5.0.0": - version: 5.0.0 - resolution: "@nomicfoundation/ethereumjs-trie@npm:5.0.0" +"@nomicfoundation/ethereumjs-trie@npm:5.0.5, @nomicfoundation/ethereumjs-trie@npm:^5.0.0": + version: 5.0.5 + resolution: "@nomicfoundation/ethereumjs-trie@npm:5.0.5" dependencies: - "@nomicfoundation/ethereumjs-rlp": ^4.0.0 - "@nomicfoundation/ethereumjs-util": ^8.0.0 + "@nomicfoundation/ethereumjs-rlp": 4.0.3 + "@nomicfoundation/ethereumjs-util": 8.0.6 ethereum-cryptography: 0.1.3 readable-stream: ^3.6.0 - checksum: 468de7ffe05473f0f05940e74bba01652dd9a4ff155a13e0a5395551e53557afde47d98f496f6323824bccfaeee8de4e22fef9b7f88d3bbd4e97cadc54e2e4f9 + checksum: bed56b55093275166c40d0aa097b32d348b3795cbfdc3797d48d136a578161431e70f30bcf453b74b52f77b897d79b61a3fb9d1abd10187c0cb7f25e40dea9c5 languageName: node linkType: hard -"@nomicfoundation/ethereumjs-tx@npm:^4.0.0": - version: 4.0.0 - resolution: "@nomicfoundation/ethereumjs-tx@npm:4.0.0" +"@nomicfoundation/ethereumjs-tx@npm:4.1.2, @nomicfoundation/ethereumjs-tx@npm:^4.0.0": + version: 4.1.2 + resolution: "@nomicfoundation/ethereumjs-tx@npm:4.1.2" dependencies: - "@nomicfoundation/ethereumjs-common": ^3.0.0 - "@nomicfoundation/ethereumjs-rlp": ^4.0.0 - "@nomicfoundation/ethereumjs-util": ^8.0.0 + "@nomicfoundation/ethereumjs-common": 3.1.2 + "@nomicfoundation/ethereumjs-rlp": 4.0.3 + "@nomicfoundation/ethereumjs-util": 8.0.6 ethereum-cryptography: 0.1.3 - checksum: d2c0e3384aaa9f3b58232c531a4efd524be257e7257f23c3beed6ec9cf5fba6345cb632b3a464ae0a2aa99fd9e4a2d3e2d5c501593c5466e6ab629f05255791e + checksum: 209622bdc56e5f1267e5d2de69ed18388b141edc568f739f0ed865aecfe96e07c381aab779ed0adacefeae4da5be64fa1110a02e481e9a7c343bf0d53f4fd1b9 languageName: node linkType: hard -"@nomicfoundation/ethereumjs-util@npm:^8.0.0, @nomicfoundation/ethereumjs-util@npm:^8.0.0-rc.3": - version: 8.0.0 - resolution: "@nomicfoundation/ethereumjs-util@npm:8.0.0" +"@nomicfoundation/ethereumjs-util@npm:8.0.6, @nomicfoundation/ethereumjs-util@npm:^8.0.0, @nomicfoundation/ethereumjs-util@npm:^8.0.0-rc.3": + version: 8.0.6 + resolution: "@nomicfoundation/ethereumjs-util@npm:8.0.6" dependencies: - "@nomicfoundation/ethereumjs-rlp": ^4.0.0-beta.2 + "@nomicfoundation/ethereumjs-rlp": 4.0.3 ethereum-cryptography: 0.1.3 - checksum: a39be4c8d3dea4fae1e969b47138d718cac31bf248bb517766a42c97ca5850ca3ddf16c66d8e404fa0a0363fd6898ae2e716d75da2ed4113e610d26026e4cefb + checksum: 7a51c2069702750d94bf6bc5afd4a26c50321fe42504339d5275b60974941451eb41232f8a08c307797bcd498f20a3b27074351a76abdfc36a5e74473a7eda01 languageName: node linkType: hard "@nomicfoundation/ethereumjs-vm@npm:^6.0.0, @nomicfoundation/ethereumjs-vm@npm:^6.0.0-rc.3": - version: 6.0.0 - resolution: "@nomicfoundation/ethereumjs-vm@npm:6.0.0" - dependencies: - "@nomicfoundation/ethereumjs-block": ^4.0.0 - "@nomicfoundation/ethereumjs-blockchain": ^6.0.0 - "@nomicfoundation/ethereumjs-common": ^3.0.0 - "@nomicfoundation/ethereumjs-evm": ^1.0.0 - "@nomicfoundation/ethereumjs-rlp": ^4.0.0 - "@nomicfoundation/ethereumjs-statemanager": ^1.0.0 - "@nomicfoundation/ethereumjs-trie": ^5.0.0 - "@nomicfoundation/ethereumjs-tx": ^4.0.0 - "@nomicfoundation/ethereumjs-util": ^8.0.0 + version: 6.4.2 + resolution: "@nomicfoundation/ethereumjs-vm@npm:6.4.2" + dependencies: + "@nomicfoundation/ethereumjs-block": 4.2.2 + "@nomicfoundation/ethereumjs-blockchain": 6.2.2 + "@nomicfoundation/ethereumjs-common": 3.1.2 + "@nomicfoundation/ethereumjs-evm": 1.3.2 + "@nomicfoundation/ethereumjs-rlp": 4.0.3 + "@nomicfoundation/ethereumjs-statemanager": 1.0.5 + "@nomicfoundation/ethereumjs-trie": 5.0.5 + "@nomicfoundation/ethereumjs-tx": 4.1.2 + "@nomicfoundation/ethereumjs-util": 8.0.6 "@types/async-eventemitter": ^0.2.1 async-eventemitter: ^0.2.4 debug: ^4.3.3 @@ -1496,94 +1769,94 @@ __metadata: functional-red-black-tree: ^1.0.1 mcl-wasm: ^0.7.1 rustbn.js: ~0.2.0 - checksum: 3c0e10b377579d74bfdcfd056d5545b605f767982e41038d036c8219a50fe3564c7f146fdd04385d64f48f94b9d95c378d7a37955c5100c46c568a29f54ea737 + checksum: 9138b8cce872a51fe2e378942c52fc6c54d8126ff094ba6bb78cbb630cafa20d7fbaa2b08bdcf7cad6de78e19ce68493ddbcc2e02acb7c803b866dc121274ea7 languageName: node linkType: hard -"@nomicfoundation/solidity-analyzer-darwin-arm64@npm:0.1.0": - version: 0.1.0 - resolution: "@nomicfoundation/solidity-analyzer-darwin-arm64@npm:0.1.0" +"@nomicfoundation/solidity-analyzer-darwin-arm64@npm:0.1.1": + version: 0.1.1 + resolution: "@nomicfoundation/solidity-analyzer-darwin-arm64@npm:0.1.1" conditions: os=darwin & cpu=arm64 languageName: node linkType: hard -"@nomicfoundation/solidity-analyzer-darwin-x64@npm:0.1.0": - version: 0.1.0 - resolution: "@nomicfoundation/solidity-analyzer-darwin-x64@npm:0.1.0" +"@nomicfoundation/solidity-analyzer-darwin-x64@npm:0.1.1": + version: 0.1.1 + resolution: "@nomicfoundation/solidity-analyzer-darwin-x64@npm:0.1.1" conditions: os=darwin & cpu=x64 languageName: node linkType: hard -"@nomicfoundation/solidity-analyzer-freebsd-x64@npm:0.1.0": - version: 0.1.0 - resolution: "@nomicfoundation/solidity-analyzer-freebsd-x64@npm:0.1.0" +"@nomicfoundation/solidity-analyzer-freebsd-x64@npm:0.1.1": + version: 0.1.1 + resolution: "@nomicfoundation/solidity-analyzer-freebsd-x64@npm:0.1.1" conditions: os=freebsd & cpu=x64 languageName: node linkType: hard -"@nomicfoundation/solidity-analyzer-linux-arm64-gnu@npm:0.1.0": - version: 0.1.0 - resolution: "@nomicfoundation/solidity-analyzer-linux-arm64-gnu@npm:0.1.0" +"@nomicfoundation/solidity-analyzer-linux-arm64-gnu@npm:0.1.1": + version: 0.1.1 + resolution: "@nomicfoundation/solidity-analyzer-linux-arm64-gnu@npm:0.1.1" conditions: os=linux & cpu=arm64 & libc=glibc languageName: node linkType: hard -"@nomicfoundation/solidity-analyzer-linux-arm64-musl@npm:0.1.0": - version: 0.1.0 - resolution: "@nomicfoundation/solidity-analyzer-linux-arm64-musl@npm:0.1.0" +"@nomicfoundation/solidity-analyzer-linux-arm64-musl@npm:0.1.1": + version: 0.1.1 + resolution: "@nomicfoundation/solidity-analyzer-linux-arm64-musl@npm:0.1.1" conditions: os=linux & cpu=arm64 & libc=musl languageName: node linkType: hard -"@nomicfoundation/solidity-analyzer-linux-x64-gnu@npm:0.1.0": - version: 0.1.0 - resolution: "@nomicfoundation/solidity-analyzer-linux-x64-gnu@npm:0.1.0" +"@nomicfoundation/solidity-analyzer-linux-x64-gnu@npm:0.1.1": + version: 0.1.1 + resolution: "@nomicfoundation/solidity-analyzer-linux-x64-gnu@npm:0.1.1" conditions: os=linux & cpu=x64 & libc=glibc languageName: node linkType: hard -"@nomicfoundation/solidity-analyzer-linux-x64-musl@npm:0.1.0": - version: 0.1.0 - resolution: "@nomicfoundation/solidity-analyzer-linux-x64-musl@npm:0.1.0" +"@nomicfoundation/solidity-analyzer-linux-x64-musl@npm:0.1.1": + version: 0.1.1 + resolution: "@nomicfoundation/solidity-analyzer-linux-x64-musl@npm:0.1.1" conditions: os=linux & cpu=x64 & libc=musl languageName: node linkType: hard -"@nomicfoundation/solidity-analyzer-win32-arm64-msvc@npm:0.1.0": - version: 0.1.0 - resolution: "@nomicfoundation/solidity-analyzer-win32-arm64-msvc@npm:0.1.0" +"@nomicfoundation/solidity-analyzer-win32-arm64-msvc@npm:0.1.1": + version: 0.1.1 + resolution: "@nomicfoundation/solidity-analyzer-win32-arm64-msvc@npm:0.1.1" conditions: os=win32 & cpu=arm64 languageName: node linkType: hard -"@nomicfoundation/solidity-analyzer-win32-ia32-msvc@npm:0.1.0": - version: 0.1.0 - resolution: "@nomicfoundation/solidity-analyzer-win32-ia32-msvc@npm:0.1.0" +"@nomicfoundation/solidity-analyzer-win32-ia32-msvc@npm:0.1.1": + version: 0.1.1 + resolution: "@nomicfoundation/solidity-analyzer-win32-ia32-msvc@npm:0.1.1" conditions: os=win32 & cpu=ia32 languageName: node linkType: hard -"@nomicfoundation/solidity-analyzer-win32-x64-msvc@npm:0.1.0": - version: 0.1.0 - resolution: "@nomicfoundation/solidity-analyzer-win32-x64-msvc@npm:0.1.0" +"@nomicfoundation/solidity-analyzer-win32-x64-msvc@npm:0.1.1": + version: 0.1.1 + resolution: "@nomicfoundation/solidity-analyzer-win32-x64-msvc@npm:0.1.1" conditions: os=win32 & cpu=x64 languageName: node linkType: hard "@nomicfoundation/solidity-analyzer@npm:^0.1.0": - version: 0.1.0 - resolution: "@nomicfoundation/solidity-analyzer@npm:0.1.0" - dependencies: - "@nomicfoundation/solidity-analyzer-darwin-arm64": 0.1.0 - "@nomicfoundation/solidity-analyzer-darwin-x64": 0.1.0 - "@nomicfoundation/solidity-analyzer-freebsd-x64": 0.1.0 - "@nomicfoundation/solidity-analyzer-linux-arm64-gnu": 0.1.0 - "@nomicfoundation/solidity-analyzer-linux-arm64-musl": 0.1.0 - "@nomicfoundation/solidity-analyzer-linux-x64-gnu": 0.1.0 - "@nomicfoundation/solidity-analyzer-linux-x64-musl": 0.1.0 - "@nomicfoundation/solidity-analyzer-win32-arm64-msvc": 0.1.0 - "@nomicfoundation/solidity-analyzer-win32-ia32-msvc": 0.1.0 - "@nomicfoundation/solidity-analyzer-win32-x64-msvc": 0.1.0 + version: 0.1.1 + resolution: "@nomicfoundation/solidity-analyzer@npm:0.1.1" + dependencies: + "@nomicfoundation/solidity-analyzer-darwin-arm64": 0.1.1 + "@nomicfoundation/solidity-analyzer-darwin-x64": 0.1.1 + "@nomicfoundation/solidity-analyzer-freebsd-x64": 0.1.1 + "@nomicfoundation/solidity-analyzer-linux-arm64-gnu": 0.1.1 + "@nomicfoundation/solidity-analyzer-linux-arm64-musl": 0.1.1 + "@nomicfoundation/solidity-analyzer-linux-x64-gnu": 0.1.1 + "@nomicfoundation/solidity-analyzer-linux-x64-musl": 0.1.1 + "@nomicfoundation/solidity-analyzer-win32-arm64-msvc": 0.1.1 + "@nomicfoundation/solidity-analyzer-win32-ia32-msvc": 0.1.1 + "@nomicfoundation/solidity-analyzer-win32-x64-msvc": 0.1.1 dependenciesMeta: "@nomicfoundation/solidity-analyzer-darwin-arm64": optional: true @@ -1605,17 +1878,17 @@ __metadata: optional: true "@nomicfoundation/solidity-analyzer-win32-x64-msvc": optional: true - checksum: 42dc5ba40e76bf14945fb6a423554bbbc6c99596675065d7d6f3c9a49ec39e37f3f77ecfedcf906fdb1bb33b033a5d92a90c645c886d6ff23334c8af8b14ff67 + checksum: 038cffafd5769e25256b5b8bef88d95cc1c021274a65c020cf84aceb3237752a3b51645fdb0687f5516a2bdfebf166fcf50b08ab64857925100213e0654b266b languageName: node linkType: hard "@nomiclabs/hardhat-ethers@npm:^2.0.5": - version: 2.0.5 - resolution: "@nomiclabs/hardhat-ethers@npm:2.0.5" + version: 2.2.3 + resolution: "@nomiclabs/hardhat-ethers@npm:2.2.3" peerDependencies: ethers: ^5.0.0 hardhat: ^2.0.0 - checksum: 07a5916f9fbb1efd24effc0d3949c70d1f45240d0bc4705653f1d378573c419c72d9a00f8db48b19c4aa27bd6c9dc0033aa40717cc9d77025a2cceeb59668463 + checksum: 72321317e55eb510306e04c42353c5f7ceb42d086fc76cc740120da6e1635b7ad5bbf23a8d6b02bd590754adcf646618933111624085ab249b1ff3482e773226 languageName: node linkType: hard @@ -1637,37 +1910,37 @@ __metadata: linkType: hard "@nomiclabs/hardhat-waffle@npm:^2.0.3": - version: 2.0.3 - resolution: "@nomiclabs/hardhat-waffle@npm:2.0.3" - dependencies: - "@types/sinon-chai": ^3.2.3 - "@types/web3": 1.0.19 + version: 2.0.6 + resolution: "@nomiclabs/hardhat-waffle@npm:2.0.6" peerDependencies: "@nomiclabs/hardhat-ethers": ^2.0.0 - ethereum-waffle: ^3.2.0 + "@types/sinon-chai": ^3.2.3 + ethereum-waffle: "*" ethers: ^5.0.0 hardhat: ^2.0.0 - checksum: e68c9e13905caa54a10fa68d9ad7dc905c86469c879f91e999a1c4d039dd2f9fa43a8ed90ab975afb14a79cd6badeb60a7cf50dc6564660edd192614c55875ca + checksum: e43592b135739c7f077a9d0a38a479a5512000e58f91d684e6a0d4f0894f8f826821d0b637e2cd7b646669ba12300fcb5e180bcc2473f5cc67d55f44ab809770 languageName: node linkType: hard -"@npmcli/fs@npm:^2.1.0": - version: 2.1.0 - resolution: "@npmcli/fs@npm:2.1.0" +"@npmcli/agent@npm:^2.0.0": + version: 2.2.0 + resolution: "@npmcli/agent@npm:2.2.0" dependencies: - "@gar/promisify": ^1.1.3 - semver: ^7.3.5 - checksum: 6ec6d678af6da49f9dac50cd882d7f661934dd278972ffbaacde40d9eaa2871292d634000a0cca9510f6fc29855fbd4af433e1adbff90a524ec3eaf140f1219b + agent-base: ^7.1.0 + http-proxy-agent: ^7.0.0 + https-proxy-agent: ^7.0.1 + lru-cache: ^10.0.1 + socks-proxy-agent: ^8.0.1 + checksum: 3b25312edbdfaa4089af28e2d423b6f19838b945e47765b0c8174c1395c79d43c3ad6d23cb364b43f59fd3acb02c93e3b493f72ddbe3dfea04c86843a7311fc4 languageName: node linkType: hard -"@npmcli/move-file@npm:^2.0.0": - version: 2.0.0 - resolution: "@npmcli/move-file@npm:2.0.0" +"@npmcli/fs@npm:^3.1.0": + version: 3.1.0 + resolution: "@npmcli/fs@npm:3.1.0" dependencies: - mkdirp: ^1.0.4 - rimraf: ^3.0.2 - checksum: 1388777b507b0c592d53f41b9d182e1a8de7763bc625fc07999b8edbc22325f074e5b3ec90af79c89d6987fdb2325bc66d59f483258543c14a43661621f841b0 + semver: ^7.3.5 + checksum: a50a6818de5fc557d0b0e6f50ec780a7a02ab8ad07e5ac8b16bf519e0ad60a144ac64f97d05c443c3367235d337182e1d012bbac0eb8dbae8dc7b40b193efd0e languageName: node linkType: hard @@ -1678,6 +1951,13 @@ __metadata: languageName: node linkType: hard +"@pkgjs/parseargs@npm:^0.11.0": + version: 0.11.0 + resolution: "@pkgjs/parseargs@npm:0.11.0" + checksum: 6ad6a00fc4f2f2cfc6bff76fb1d88b8ee20bc0601e18ebb01b6d4be583733a860239a521a7fbca73b612e66705078809483549d2b18f370eb346c5155c8e4a0f + languageName: node + linkType: hard + "@resolver-engine/core@npm:^0.3.3": version: 0.3.3 resolution: "@resolver-engine/core@npm:0.3.3" @@ -1723,31 +2003,52 @@ __metadata: languageName: node linkType: hard -"@scure/base@npm:~1.0.0": - version: 1.0.0 - resolution: "@scure/base@npm:1.0.0" - checksum: 4bff6fd46fa4afeff58410a157edbb93e6d1aaeca8be18ecd9ec439d5e86e297e52d9288ab269d0ec5f861d55cf1664f26bd14812dd631784f6a9cc11276ff91 +"@scure/base@npm:~1.1.0": + version: 1.1.3 + resolution: "@scure/base@npm:1.1.3" + checksum: 1606ab8a4db898cb3a1ada16c15437c3bce4e25854fadc8eb03ae93cbbbac1ed90655af4b0be3da37e12056fef11c0374499f69b9e658c9e5b7b3e06353c630c languageName: node linkType: hard -"@scure/bip32@npm:1.0.1": - version: 1.0.1 - resolution: "@scure/bip32@npm:1.0.1" +"@scure/bip32@npm:1.1.5": + version: 1.1.5 + resolution: "@scure/bip32@npm:1.1.5" dependencies: - "@noble/hashes": ~1.0.0 - "@noble/secp256k1": ~1.5.2 - "@scure/base": ~1.0.0 - checksum: 7b9f653b0db87264ccfd3b744b848997b3a5fd1b9b33565b4bb9e73dbebeaa2ad0c4278fc5d7ec509546a38507b82de961a6cf1af05caaf1b2e48ce65a77b00e + "@noble/hashes": ~1.2.0 + "@noble/secp256k1": ~1.7.0 + "@scure/base": ~1.1.0 + checksum: b08494ab0d2b1efee7226d1b5100db5157ebea22a78bb87126982a76a186cb3048413e8be0ba2622d00d048a20acbba527af730de86c132a77de616eb9907a3b languageName: node linkType: hard -"@scure/bip39@npm:1.0.0": - version: 1.0.0 - resolution: "@scure/bip39@npm:1.0.0" +"@scure/bip32@npm:1.3.1": + version: 1.3.1 + resolution: "@scure/bip32@npm:1.3.1" + dependencies: + "@noble/curves": ~1.1.0 + "@noble/hashes": ~1.3.1 + "@scure/base": ~1.1.0 + checksum: 394d65f77a40651eba21a5096da0f4233c3b50d422864751d373fcf142eeedb94a1149f9ab1dbb078086dab2d0bc27e2b1afec8321bf22d4403c7df2fea5bfe2 + languageName: node + linkType: hard + +"@scure/bip39@npm:1.1.1": + version: 1.1.1 + resolution: "@scure/bip39@npm:1.1.1" dependencies: - "@noble/hashes": ~1.0.0 - "@scure/base": ~1.0.0 - checksum: e8711e4f22e5cb14a6e60874dba37a1c012ed26cf99f945454d8d0363441b0fe030b7861cc9e045539b1ba227ae262704fd58c2f46db1dd78af15d595d10316a + "@noble/hashes": ~1.2.0 + "@scure/base": ~1.1.0 + checksum: fbb594c50696fa9c14e891d872f382e50a3f919b6c96c55ef2fb10c7102c546dafb8f099a62bd114c12a00525b595dcf7381846f383f0ddcedeaa6e210747d2f + languageName: node + linkType: hard + +"@scure/bip39@npm:1.2.1": + version: 1.2.1 + resolution: "@scure/bip39@npm:1.2.1" + dependencies: + "@noble/hashes": ~1.3.0 + "@scure/base": ~1.1.0 + checksum: c5bd6f1328fdbeae2dcdd891825b1610225310e5e62a4942714db51066866e4f7bef242c7b06a1b9dcc8043a4a13412cf5c5df76d3b10aa9e36b82e9b6e3eeaa languageName: node linkType: hard @@ -1840,12 +2141,19 @@ __metadata: languageName: node linkType: hard +"@sindresorhus/is@npm:^4.0.0, @sindresorhus/is@npm:^4.6.0": + version: 4.6.0 + resolution: "@sindresorhus/is@npm:4.6.0" + checksum: 83839f13da2c29d55c97abc3bc2c55b250d33a0447554997a85c539e058e57b8da092da396e252b11ec24a0279a0bed1f537fa26302209327060643e327f81d2 + languageName: node + linkType: hard + "@solidity-parser/parser@npm:^0.14.0": - version: 0.14.1 - resolution: "@solidity-parser/parser@npm:0.14.1" + version: 0.14.5 + resolution: "@solidity-parser/parser@npm:0.14.5" dependencies: antlr4ts: ^0.5.0-alpha.4 - checksum: 616df6c31007710f2a99f8022fa5917968bbe83293cdc0154ba378aad405c0fc0b7af45cf2c99d159ff0b24b67c7a9bc01f80178d086c705682f2f8c7f771137 + checksum: 9e85a0d4f8a05a11db6022444b70b2f353e2358467b1cce44cdda703ae1e3c7337e1b8cbc2eec8e14a8f34f9c60b42f325e5fe9b3c934cc980e35091e292d7ee languageName: node linkType: hard @@ -1858,39 +2166,51 @@ __metadata: languageName: node linkType: hard -"@tootallnate/once@npm:2": - version: 2.0.0 - resolution: "@tootallnate/once@npm:2.0.0" - checksum: ad87447820dd3f24825d2d947ebc03072b20a42bfc96cbafec16bff8bbda6c1a81fcb0be56d5b21968560c5359a0af4038a68ba150c3e1694fe4c109a063bed8 +"@szmarczak/http-timer@npm:^4.0.5": + version: 4.0.6 + resolution: "@szmarczak/http-timer@npm:4.0.6" + dependencies: + defer-to-connect: ^2.0.0 + checksum: c29df3bcec6fc3bdec2b17981d89d9c9fc9bd7d0c9bcfe92821dc533f4440bc890ccde79971838b4ceed1921d456973c4180d7175ee1d0023ad0562240a58d95 languageName: node linkType: hard -"@truffle/error@npm:^0.1.0": - version: 0.1.0 - resolution: "@truffle/error@npm:0.1.0" - checksum: bb4765ec18b0e3cc0d1a4d879bbd1ed84e2354cc976a721909b52d7659eb8d0eadc40c5e1011b167896e3967cfaa6af8d9f74e28c8c17d66e4aef02ca821ec24 +"@szmarczak/http-timer@npm:^5.0.1": + version: 5.0.1 + resolution: "@szmarczak/http-timer@npm:5.0.1" + dependencies: + defer-to-connect: ^2.0.1 + checksum: fc9cb993e808806692e4a3337c90ece0ec00c89f4b67e3652a356b89730da98bc824273a6d67ca84d5f33cd85f317dcd5ce39d8cc0a2f060145a608a7cb8ce92 + languageName: node + linkType: hard + +"@truffle/error@npm:^0.1.1": + version: 0.1.1 + resolution: "@truffle/error@npm:0.1.1" + checksum: 32c6faca2d221560456e54709b344533bacdbd575506c9feaeffe27ffb8720839a36fd2c0318da2be5bb824c7aa253d2697e4f5ff5d5b0674e937fdd6f024e07 languageName: node linkType: hard -"@truffle/interface-adapter@npm:^0.5.13": - version: 0.5.13 - resolution: "@truffle/interface-adapter@npm:0.5.13" +"@truffle/interface-adapter@npm:^0.5.25": + version: 0.5.37 + resolution: "@truffle/interface-adapter@npm:0.5.37" dependencies: bn.js: ^5.1.3 ethers: ^4.0.32 - web3: 1.5.3 - checksum: e8a4e2a3891a53f39372bc8de3dea801e8368cb37c678b98029cad8b408bab2f60124ccf0bc56642b886aed18da7fa1a5fd2cc312264250a294d398e54cb9e47 + web3: 1.10.0 + checksum: 96e8cd17fdf5561df04d2aad2943e7b0f599afb07c0ba750c26e5db0c069cbd2e4a545f2185f5362ccd9b0a46f936dd5b96b879a9fc51b73a5b6d0919c99e5cf languageName: node linkType: hard "@truffle/provider@npm:^0.2.24": - version: 0.2.51 - resolution: "@truffle/provider@npm:0.2.51" + version: 0.2.64 + resolution: "@truffle/provider@npm:0.2.64" dependencies: - "@truffle/error": ^0.1.0 - "@truffle/interface-adapter": ^0.5.13 - web3: 1.5.3 - checksum: 507c036fe30e225a33fbfe36d8e7841c5e54b71c48706c919f2db776d2604e7a3f7ecb1bccdb87e094857dd9936a3aeb47ef2015ff3e840027a819fd83f3da10 + "@truffle/error": ^0.1.1 + "@truffle/interface-adapter": ^0.5.25 + debug: ^4.3.1 + web3: 1.7.4 + checksum: 049ed3d152dbca4c37e0f84e5b17ec866ace0cf642ffdf9d8328b05f37f87dee27dcbae1a6871e757628bd24480e4d29b97a120b0d86614c4b0068547b2381a6 languageName: node linkType: hard @@ -1936,89 +2256,94 @@ __metadata: linkType: hard "@tsconfig/node16@npm:^1.0.2": - version: 1.0.3 - resolution: "@tsconfig/node16@npm:1.0.3" - checksum: 3a8b657dd047495b7ad23437d6afd20297ce90380ff0bdee93fc7d39a900dbd8d9e26e53ff6b465e7967ce2adf0b218782590ce9013285121e6a5928fbd6819f + version: 1.0.4 + resolution: "@tsconfig/node16@npm:1.0.4" + checksum: 202319785901f942a6e1e476b872d421baec20cf09f4b266a1854060efbf78cde16a4d256e8bc949d31e6cd9a90f1e8ef8fb06af96a65e98338a2b6b0de0a0ff languageName: node linkType: hard "@typechain/ethers-v5@npm:^10.0.0": - version: 10.0.0 - resolution: "@typechain/ethers-v5@npm:10.0.0" + version: 10.2.1 + resolution: "@typechain/ethers-v5@npm:10.2.1" dependencies: lodash: ^4.17.15 ts-essentials: ^7.0.1 peerDependencies: "@ethersproject/abi": ^5.0.0 - "@ethersproject/bytes": ^5.0.0 "@ethersproject/providers": ^5.0.0 ethers: ^5.1.3 - typechain: ^8.0.0 + typechain: ^8.1.1 typescript: ">=4.3.0" - checksum: f89a442829398d00e6c10c4cdebb16af3195cfbf6b0c062f24503ee1befc01c121a6d46edfd7b54aaf00c81b2e845730d2b556ecbaa6e15f360456f42fedb44d + checksum: 852da4b1ff368ef87251111a5d50077de3d0fc12c519529269a74223740f8bda89297e67a5eb6c1f5b04ee23119566d6cbccf58264d32a83132be0f328a58d22 languageName: node linkType: hard "@typechain/hardhat@npm:^6.0.0": - version: 6.0.0 - resolution: "@typechain/hardhat@npm:6.0.0" + version: 6.1.6 + resolution: "@typechain/hardhat@npm:6.1.6" dependencies: fs-extra: ^9.1.0 - lodash: ^4.17.15 peerDependencies: "@ethersproject/abi": ^5.4.7 "@ethersproject/providers": ^5.4.7 - "@typechain/ethers-v5": ^10.0.0 + "@typechain/ethers-v5": ^10.2.1 ethers: ^5.4.7 - hardhat: ^2.0.10 - typechain: ^8.0.0 - checksum: 9011ad633cf96ccbf29c3ce458f2f7cd058f0635493d179dfe1fa47512cceaad7597f051525379edcd5db48910a79b910fbe58bd75e5ae43979833bbf34d5a15 + hardhat: ^2.9.9 + typechain: ^8.1.1 + checksum: f214bebf7860956230478cb92696ba757829cfd9dc65ac99c3bc7e539378310318d92b009054186f446595c8ffc1a81e9c6d028da0eb04253253049ea1b6e8d3 languageName: node linkType: hard "@types/abstract-leveldown@npm:*": - version: 7.2.0 - resolution: "@types/abstract-leveldown@npm:7.2.0" - checksum: f719ce076f65e47386ad412dbc6c89a6833a812ee2b2361b89a97480c69180cf9686effdabd0c76819ee5eaefeb18b19ae7dc54c06855261db0070a849124d90 + version: 7.2.5 + resolution: "@types/abstract-leveldown@npm:7.2.5" + checksum: 3a99b13c81a53a62b42bea9cff326880de3146b4eeff528b039be69a268515b3120a6c12142e96646fcb0a03c463f298998581e86d9ddb29fbea3612f40edb2b languageName: node linkType: hard "@types/async-eventemitter@npm:^0.2.1": - version: 0.2.1 - resolution: "@types/async-eventemitter@npm:0.2.1" - checksum: 36ba0a6f52082f76b19b9123a2fa0497f94fe15218fa54040cc45f0edff483ec3be93a38c177cd4dab79f5e32333fbdf3682d4dc94197438e86694b1fddd6896 + version: 0.2.4 + resolution: "@types/async-eventemitter@npm:0.2.4" + dependencies: + "@types/events": "*" + checksum: cee62e258cf02a45688a3f6f517b623270a9c2779dfd2f53b52e0efbcb0282d7078c3ce1fafb2af257aefdb892acc09ba51d93647930885414ec719437430bf7 languageName: node linkType: hard -"@types/bn.js@npm:*, @types/bn.js@npm:^5.1.0": - version: 5.1.0 - resolution: "@types/bn.js@npm:5.1.0" +"@types/bn.js@npm:^4.11.3": + version: 4.11.6 + resolution: "@types/bn.js@npm:4.11.6" dependencies: "@types/node": "*" - checksum: 1dc1cbbd7a1e8bf3614752e9602f558762a901031f499f3055828b5e3e2bba16e5b88c27b3c4152ad795248fbe4086c731a5c4b0f29bb243f1875beeeabee59c + checksum: 7f66f2c7b7b9303b3205a57184261974b114495736b77853af5b18d857c0b33e82ce7146911e86e87a87837de8acae28986716fd381ac7c301fd6e8d8b6c811f languageName: node linkType: hard -"@types/bn.js@npm:^4.11.3, @types/bn.js@npm:^4.11.5": - version: 4.11.6 - resolution: "@types/bn.js@npm:4.11.6" +"@types/bn.js@npm:^5.1.0, @types/bn.js@npm:^5.1.1": + version: 5.1.5 + resolution: "@types/bn.js@npm:5.1.5" dependencies: "@types/node": "*" - checksum: 7f66f2c7b7b9303b3205a57184261974b114495736b77853af5b18d857c0b33e82ce7146911e86e87a87837de8acae28986716fd381ac7c301fd6e8d8b6c811f + checksum: c87b28c4af74545624f8a3dae5294b16aa190c222626e8d4b2e327b33b1a3f1eeb43e7a24d914a9774bca43d8cd6e1cb0325c1f4b3a244af6693a024e1d918e6 languageName: node linkType: hard -"@types/chai@npm:*": - version: 4.3.0 - resolution: "@types/chai@npm:4.3.0" - checksum: 3e393e094263db65df28a0123dc13f342937c1bab6cd173eae913d593c5b9a16b555713a08c34863a1fbf079aa7222b96197c70380a5c130549d6b2f6845a989 +"@types/cacheable-request@npm:^6.0.1, @types/cacheable-request@npm:^6.0.2": + version: 6.0.3 + resolution: "@types/cacheable-request@npm:6.0.3" + dependencies: + "@types/http-cache-semantics": "*" + "@types/keyv": ^3.1.4 + "@types/node": "*" + "@types/responselike": ^1.0.0 + checksum: d9b26403fe65ce6b0cb3720b7030104c352bcb37e4fac2a7089a25a97de59c355fa08940658751f2f347a8512aa9d18fdb66ab3ade835975b2f454f2d5befbd9 languageName: node linkType: hard "@types/chai@npm:^4.3.1": - version: 4.3.1 - resolution: "@types/chai@npm:4.3.1" - checksum: 2ee246b76c469cd620a7a1876a73bc597074361b67d547b4bd96a0c1adb43597ede2d8589ab626192e14349d83cbb646cc11e2c179eeeb43ff11596de94d82c4 + version: 4.3.11 + resolution: "@types/chai@npm:4.3.11" + checksum: d0c05fe5d02b2e6bbca2bd4866a2ab20a59cf729bc04af0060e7a3277eaf2fb65651b90d4c74b0ebf1d152b4b1d49fa8e44143acef276a2bbaa7785fbe5642d3 languageName: node linkType: hard @@ -2031,6 +2356,13 @@ __metadata: languageName: node linkType: hard +"@types/events@npm:*": + version: 3.0.3 + resolution: "@types/events@npm:3.0.3" + checksum: 50af9312fab001fd6bd4bb3ff65830f940877e6778de140a92481a0d9bf5f4853d44ec758a8800ef60e0598ac43ed1b5688116a3c65906ae54e989278d6c7c82 + languageName: node + linkType: hard + "@types/form-data@npm:0.0.33": version: 0.0.33 resolution: "@types/form-data@npm:0.0.33" @@ -2050,29 +2382,27 @@ __metadata: languageName: node linkType: hard -"@types/inquirer@npm:^8.2.1": - version: 8.2.1 - resolution: "@types/inquirer@npm:8.2.1" - dependencies: - "@types/through": "*" - rxjs: ^7.2.0 - checksum: 5362d0b1cbec3887c9d5a671a0b19c58cf54066456c8967dd7ee799dfcc242cc8cd8959440c0f2fe7768becaf721b45fd30c222e6b9bcca378f45c68af43bab5 +"@types/http-cache-semantics@npm:*": + version: 4.0.4 + resolution: "@types/http-cache-semantics@npm:4.0.4" + checksum: 7f4dd832e618bc1e271be49717d7b4066d77c2d4eed5b81198eb987e532bb3e1c7e02f45d77918185bad936f884b700c10cebe06305f50400f382ab75055f9e8 languageName: node linkType: hard -"@types/is-ci@npm:^3.0.0": - version: 3.0.0 - resolution: "@types/is-ci@npm:3.0.0" +"@types/inquirer@npm:^8.2.1": + version: 8.2.10 + resolution: "@types/inquirer@npm:8.2.10" dependencies: - ci-info: ^3.1.0 - checksum: 7c1f1f16c1fa2134de7400d82766c83fa76057261ba890628af77a09382ebb92d945bb077b98cfcf3d40ab1469c9ffbd2278112867edbe57aa655f53547eb139 + "@types/through": "*" + rxjs: ^7.2.0 + checksum: e576823345146e939e93e06fc5a81baa5231f0113b669191155cd5f5925b3e897d3a3c42c0be8b3e7b0b188b7e05d1cf42011cc2da4d123f7e58940caf9cd17f languageName: node linkType: hard "@types/json-schema@npm:^7.0.9": - version: 7.0.11 - resolution: "@types/json-schema@npm:7.0.11" - checksum: 527bddfe62db9012fccd7627794bd4c71beb77601861055d87e3ee464f2217c85fca7a4b56ae677478367bbd248dbde13553312b7d4dbc702a2f2bbf60c4018d + version: 7.0.15 + resolution: "@types/json-schema@npm:7.0.15" + checksum: 97ed0cb44d4070aecea772b7b2e2ed971e10c81ec87dd4ecc160322ffa55ff330dace1793489540e3e318d90942064bb697cc0f8989391797792d919737b3b98 languageName: node linkType: hard @@ -2083,7 +2413,7 @@ __metadata: languageName: node linkType: hard -"@types/keyv@npm:^3.1.1": +"@types/keyv@npm:^3.1.1, @types/keyv@npm:^3.1.4": version: 3.1.4 resolution: "@types/keyv@npm:3.1.4" dependencies: @@ -2093,9 +2423,9 @@ __metadata: linkType: hard "@types/level-errors@npm:*": - version: 3.0.0 - resolution: "@types/level-errors@npm:3.0.0" - checksum: ad9392663439306677ac9cb704f8fa0b64c300dfea4f3494369eb78a2e09c194156cbab2b52c71a361a09b735d54a2de65195dcadba0ec7db1d14a320198133e + version: 3.0.2 + resolution: "@types/level-errors@npm:3.0.2" + checksum: 3d9b801f6499f795b60ac723c1b3f93ca105f20ed26966eeb606c804b10c65984c3233fb99914644d75a3223f80f220eca74fda316640a85a5b3d7572cd86925 languageName: node linkType: hard @@ -2118,16 +2448,16 @@ __metadata: linkType: hard "@types/minimatch@npm:*": - version: 3.0.5 - resolution: "@types/minimatch@npm:3.0.5" - checksum: c41d136f67231c3131cf1d4ca0b06687f4a322918a3a5adddc87ce90ed9dbd175a3610adee36b106ae68c0b92c637c35e02b58c8a56c424f71d30993ea220b92 + version: 5.1.2 + resolution: "@types/minimatch@npm:5.1.2" + checksum: 0391a282860c7cb6fe262c12b99564732401bdaa5e395bee9ca323c312c1a0f45efbf34dce974682036e857db59a5c9b1da522f3d6055aeead7097264c8705a8 languageName: node linkType: hard "@types/minimist@npm:^1.2.0": - version: 1.2.2 - resolution: "@types/minimist@npm:1.2.2" - checksum: b8da83c66eb4aac0440e64674b19564d9d86c80ae273144db9681e5eeff66f238ade9515f5006ffbfa955ceff8b89ad2bd8ec577d7caee74ba101431fb07045d + version: 1.2.5 + resolution: "@types/minimist@npm:1.2.5" + checksum: 477047b606005058ab0263c4f58097136268007f320003c348794f74adedc3166ffc47c80ec3e94687787f2ab7f4e72c468223946e79892cf0fd9e25e9970a90 languageName: node linkType: hard @@ -2141,26 +2471,28 @@ __metadata: linkType: hard "@types/mocha@npm:^10.0.1": - version: 10.0.1 - resolution: "@types/mocha@npm:10.0.1" - checksum: 224ea9fce7b1734ccdb9aa99a622d902a538ce1847bca7fd22c5fb38adcf3ed536f50f48f587085db988a4bb3c2eb68f4b98e1cd6a38bc5547bd3bbbedc54495 + version: 10.0.6 + resolution: "@types/mocha@npm:10.0.6" + checksum: f7c836cf6cf27dc0f5970d262591b56f2a3caeaec8cfdc612c12e1cfbb207f601f710ece207e935164d4e3343b93be5054d0db5544f31f453b3923775d82099f languageName: node linkType: hard "@types/node-fetch@npm:^2.6.1": - version: 2.6.2 - resolution: "@types/node-fetch@npm:2.6.2" + version: 2.6.9 + resolution: "@types/node-fetch@npm:2.6.9" dependencies: "@types/node": "*" - form-data: ^3.0.0 - checksum: 6f73b1470000d303d25a6fb92875ea837a216656cb7474f66cdd67bb014aa81a5a11e7ac9c21fe19bee9ecb2ef87c1962bceeaec31386119d1ac86e4c30ad7a6 + form-data: ^4.0.0 + checksum: 212269aff4b251477c13c33cee6cea23e4fd630be6c0bfa3714968cce7efd7055b52f2f82aab3394596d8c758335cc802e7c5fa3f775e7f2a472fa914c90dc15 languageName: node linkType: hard "@types/node@npm:*": - version: 17.0.23 - resolution: "@types/node@npm:17.0.23" - checksum: a3517554737cbb042e76c30d0e5482192ac4d9bea0eeb086e2622d9cabf460a0eb52a696b99fcd18e7fcc93c96db6cc7ae507f6608f256ef0b5c1d8c87a5a470 + version: 20.10.4 + resolution: "@types/node@npm:20.10.4" + dependencies: + undici-types: ~5.26.4 + checksum: 054b296417e771ab524bea63cf3289559c6bdf290d45428f7cc68e9b00030ff7a0ece47b8c99a26b4f47a443919813bcf42beadff2f0bea7d8125fa541d92eb0 languageName: node linkType: hard @@ -2178,14 +2510,7 @@ __metadata: languageName: node linkType: hard -"@types/node@npm:^12.12.6": - version: 12.20.47 - resolution: "@types/node@npm:12.20.47" - checksum: 97487af02fada4342e1bd47f9c9ebf601c12b85cbf17056ba73a315339ae996490403f2d4d1d799d8078cfe43a59e33370b4a5ae2d4fb79dd02359f4691934b4 - languageName: node - linkType: hard - -"@types/node@npm:^12.7.1": +"@types/node@npm:^12.12.6, @types/node@npm:^12.7.1": version: 12.20.55 resolution: "@types/node@npm:12.20.55" checksum: e4f86785f4092706e0d3b0edff8dca5a13b45627e4b36700acd8dfe6ad53db71928c8dee914d4276c7fd3b6ccd829aa919811c9eb708a2c8e4c6eb3701178c37 @@ -2193,9 +2518,9 @@ __metadata: linkType: hard "@types/node@npm:^17.0.25": - version: 17.0.25 - resolution: "@types/node@npm:17.0.25" - checksum: 6a820bd624e69ea772f52a6cdb326484eff5829443dc981939373929ade109f58c21698b9f0a831bd6ceea799e722a75dc49c5fa7a6bc32a81e1cbdfc6507b64 + version: 17.0.45 + resolution: "@types/node@npm:17.0.45" + checksum: aa04366b9103b7d6cfd6b2ef64182e0eaa7d4462c3f817618486ea0422984c51fc69fd0d436eae6c9e696ddfdbec9ccaa27a917f7c2e8c75c5d57827fe3d95e8 languageName: node linkType: hard @@ -2207,50 +2532,50 @@ __metadata: linkType: hard "@types/normalize-package-data@npm:^2.4.0": - version: 2.4.1 - resolution: "@types/normalize-package-data@npm:2.4.1" - checksum: e87bccbf11f95035c89a132b52b79ce69a1e3652fe55962363063c9c0dae0fe2477ebc585e03a9652adc6f381d24ba5589cc5e51849df4ced3d3e004a7d40ed5 + version: 2.4.4 + resolution: "@types/normalize-package-data@npm:2.4.4" + checksum: 65dff72b543997b7be8b0265eca7ace0e34b75c3e5fee31de11179d08fa7124a7a5587265d53d0409532ecb7f7fba662c2012807963e1f9b059653ec2c83ee05 languageName: node linkType: hard "@types/pbkdf2@npm:^3.0.0": - version: 3.1.0 - resolution: "@types/pbkdf2@npm:3.1.0" + version: 3.1.2 + resolution: "@types/pbkdf2@npm:3.1.2" dependencies: "@types/node": "*" - checksum: d15024b1957c21cf3b8887329d9bd8dfde754cf13a09d76ae25f1391cfc62bb8b8d7b760773c5dbaa748172fba8b3e0c3dbe962af6ccbd69b76df12a48dfba40 + checksum: bebe1e596cbbe5f7d2726a58859e61986c5a42459048e29cb7f2d4d764be6bbb0844572fd5d70ca8955a8a17e8b4ed80984fc4903e165d9efb8807a3fbb051aa languageName: node linkType: hard "@types/prettier@npm:^2.1.1": - version: 2.6.0 - resolution: "@types/prettier@npm:2.6.0" - checksum: 946f1f82ce6f31664e023a5d65931c31b7d677b454f528f67dce851d72e7fcfe713076f4251b16c3646eecf1545f5f5b909b4962966341ed9ddf5b80113b3674 + version: 2.7.3 + resolution: "@types/prettier@npm:2.7.3" + checksum: 705384209cea6d1433ff6c187c80dcc0b95d99d5c5ce21a46a9a58060c527973506822e428789d842761e0280d25e3359300f017fbe77b9755bc772ab3dc2f83 languageName: node linkType: hard "@types/qs@npm:^6.2.31": - version: 6.9.7 - resolution: "@types/qs@npm:6.9.7" - checksum: 7fd6f9c25053e9b5bb6bc9f9f76c1d89e6c04f7707a7ba0e44cc01f17ef5284adb82f230f542c2d5557d69407c9a40f0f3515e8319afd14e1e16b5543ac6cdba + version: 6.9.10 + resolution: "@types/qs@npm:6.9.10" + checksum: 3e479ee056bd2b60894baa119d12ecd33f20a25231b836af04654e784c886f28a356477630430152a86fba253da65d7ecd18acffbc2a8877a336e75aa0272c67 languageName: node linkType: hard "@types/responselike@npm:^1.0.0": - version: 1.0.0 - resolution: "@types/responselike@npm:1.0.0" + version: 1.0.3 + resolution: "@types/responselike@npm:1.0.3" dependencies: "@types/node": "*" - checksum: e99fc7cc6265407987b30deda54c1c24bb1478803faf6037557a774b2f034c5b097ffd65847daa87e82a61a250d919f35c3588654b0fdaa816906650f596d1b0 + checksum: 6ac4b35723429b11b117e813c7acc42c3af8b5554caaf1fc750404c1ae59f9b7376bc69b9e9e194a5a97357a597c2228b7173d317320f0360d617b6425212f58 languageName: node linkType: hard "@types/secp256k1@npm:^4.0.1": - version: 4.0.3 - resolution: "@types/secp256k1@npm:4.0.3" + version: 4.0.6 + resolution: "@types/secp256k1@npm:4.0.6" dependencies: "@types/node": "*" - checksum: 1bd10b9afa724084b655dc81b7b315def3d2d0e272014ef16009fa76e17537411c07c0695fdea412bc7b36d2a02687f5fea33522d55b8ef29eda42992f812913 + checksum: 984494caf49a4ce99fda2b9ea1840eb47af946b8c2737314108949bcc0c06b4880e871296bd49ed6ea4c8423e3a302ad79fec43abfc987330e7eb98f0c4e8ba4 languageName: node linkType: hard @@ -2261,77 +2586,35 @@ __metadata: languageName: node linkType: hard -"@types/semver@npm:^6.0.0": - version: 6.2.3 - resolution: "@types/semver@npm:6.2.3" - checksum: 83c86d7005b229df9c4c0d6d13825b839a01932895504596140aea19e2b88f63ac27ab1575347451b50eedb63f72309e845ce1a0ca78360c4f719bbb38371594 - languageName: node - linkType: hard - -"@types/sinon-chai@npm:^3.2.3": - version: 3.2.8 - resolution: "@types/sinon-chai@npm:3.2.8" - dependencies: - "@types/chai": "*" - "@types/sinon": "*" - checksum: a0f7a8cef24904db25a695f3c3adcc03ae72bab89a954c9b6e23fe7e541228e67fe4119cec069e8b36c80e9af33102b626129ff538efade9391cc0f65f1d4933 - languageName: node - linkType: hard - -"@types/sinon@npm:*": - version: 10.0.11 - resolution: "@types/sinon@npm:10.0.11" - dependencies: - "@types/sinonjs__fake-timers": "*" - checksum: 196f3e26985dca5dfb593592e4b64463e536c047a9f43aa2b328b16024a3b0e3fb27b7a3f3972c6ef75749f55012737eb6c63a1c2e9782b7fe5cbbd25f75fd62 - languageName: node - linkType: hard - -"@types/sinonjs__fake-timers@npm:*": - version: 8.1.2 - resolution: "@types/sinonjs__fake-timers@npm:8.1.2" - checksum: bbc73a5ab6c0ec974929392f3d6e1e8db4ebad97ec506d785301e1c3d8a4f98a35b1aa95b97035daef02886fd8efd7788a2fa3ced2ec7105988bfd8dce61eedd +"@types/semver@npm:^7.3.12, @types/semver@npm:^7.5.0": + version: 7.5.6 + resolution: "@types/semver@npm:7.5.6" + checksum: 563a0120ec0efcc326567db2ed920d5d98346f3638b6324ea6b50222b96f02a8add3c51a916b6897b51523aad8ac227d21d3dcf8913559f1bfc6c15b14d23037 languageName: node linkType: hard "@types/through@npm:*": - version: 0.0.30 - resolution: "@types/through@npm:0.0.30" + version: 0.0.33 + resolution: "@types/through@npm:0.0.33" dependencies: "@types/node": "*" - checksum: 9578470db0b527c26e246a1220ae9bffc6bf47f20f89c54aac467c083ab1f7e16c00d9a7b4bb6cb4e2dfae465027270827e5908a6236063f6214625e50585d78 - languageName: node - linkType: hard - -"@types/underscore@npm:*": - version: 1.11.4 - resolution: "@types/underscore@npm:1.11.4" - checksum: db9f8486bc851b732259e51f42d62aad1ae2158be5724612dc125ece5f5d61c51447f9dea28284c2a0f79cb95e788d01cb5ce97709880019213e69fab0dd1696 - languageName: node - linkType: hard - -"@types/web3@npm:1.0.19": - version: 1.0.19 - resolution: "@types/web3@npm:1.0.19" - dependencies: - "@types/bn.js": "*" - "@types/underscore": "*" - checksum: 25a78e80052cca8abe5edf15c0ae92854d00d1bec15283486a2535ab673345b0be090e39cc9a86822be17ddd812fa76cbfd869be21bb944d2faaf2922e2a836a + checksum: fd0b73f873a64ed5366d1d757c42e5dbbb2201002667c8958eda7ca02fff09d73de91360572db465ee00240c32d50c6039ea736d8eca374300f9664f93e8da39 languageName: node linkType: hard "@typescript-eslint/eslint-plugin@npm:^5.20.0": - version: 5.20.0 - resolution: "@typescript-eslint/eslint-plugin@npm:5.20.0" + version: 5.62.0 + resolution: "@typescript-eslint/eslint-plugin@npm:5.62.0" dependencies: - "@typescript-eslint/scope-manager": 5.20.0 - "@typescript-eslint/type-utils": 5.20.0 - "@typescript-eslint/utils": 5.20.0 - debug: ^4.3.2 - functional-red-black-tree: ^1.0.1 - ignore: ^5.1.8 - regexpp: ^3.2.0 - semver: ^7.3.5 + "@eslint-community/regexpp": ^4.4.0 + "@typescript-eslint/scope-manager": 5.62.0 + "@typescript-eslint/type-utils": 5.62.0 + "@typescript-eslint/utils": 5.62.0 + debug: ^4.3.4 + graphemer: ^1.4.0 + ignore: ^5.2.0 + natural-compare-lite: ^1.4.0 + semver: ^7.3.7 tsutils: ^3.21.0 peerDependencies: "@typescript-eslint/parser": ^5.0.0 @@ -2339,112 +2622,78 @@ __metadata: peerDependenciesMeta: typescript: optional: true - checksum: 276251535b38dc5e9165c86d7f9b0a6d601cef82f02dc2a94b4133ad08d8825cb3e27bfd3b686b21b0627e05fa25c5e456c89cc3a66583b109637d1cf2d6c06a + checksum: fc104b389c768f9fa7d45a48c86d5c1ad522c1d0512943e782a56b1e3096b2cbcc1eea3fcc590647bf0658eef61aac35120a9c6daf979bf629ad2956deb516a1 languageName: node linkType: hard "@typescript-eslint/experimental-utils@npm:^5.0.0": - version: 5.30.0 - resolution: "@typescript-eslint/experimental-utils@npm:5.30.0" + version: 5.62.0 + resolution: "@typescript-eslint/experimental-utils@npm:5.62.0" dependencies: - "@typescript-eslint/utils": 5.30.0 + "@typescript-eslint/utils": 5.62.0 peerDependencies: eslint: ^6.0.0 || ^7.0.0 || ^8.0.0 - checksum: 66a140b04b57e50a4abd6912616b6af0a9a71f989bd2a77574f4117bf7ba923ae7541780f7d2627cf9bc815eea253181cd09ea9f599b2b8e0895c97258c1e1af + checksum: ce55d9f74eac5cb94d66d5db9ead9a5d734f4301519fb5956a57f4b405a5318a115b0316195a3c039e0111489138680411709cb769085d71e1e1db1376ea0949 languageName: node linkType: hard "@typescript-eslint/parser@npm:^5.20.0": - version: 5.20.0 - resolution: "@typescript-eslint/parser@npm:5.20.0" + version: 5.62.0 + resolution: "@typescript-eslint/parser@npm:5.62.0" dependencies: - "@typescript-eslint/scope-manager": 5.20.0 - "@typescript-eslint/types": 5.20.0 - "@typescript-eslint/typescript-estree": 5.20.0 - debug: ^4.3.2 + "@typescript-eslint/scope-manager": 5.62.0 + "@typescript-eslint/types": 5.62.0 + "@typescript-eslint/typescript-estree": 5.62.0 + debug: ^4.3.4 peerDependencies: eslint: ^6.0.0 || ^7.0.0 || ^8.0.0 peerDependenciesMeta: typescript: optional: true - checksum: 0a72c5c0fbea3ef30332a20a7fc673461a4106225d7d4b78e1d4eb3cd0343d26132deb0cdaa17fd31b90711c63978996216faf1fb9a7abdee367e3b42f812e21 + checksum: d168f4c7f21a7a63f47002e2d319bcbb6173597af5c60c1cf2de046b46c76b4930a093619e69faf2d30214c29ab27b54dcf1efc7046a6a6bd6f37f59a990e752 languageName: node linkType: hard -"@typescript-eslint/scope-manager@npm:5.20.0": - version: 5.20.0 - resolution: "@typescript-eslint/scope-manager@npm:5.20.0" +"@typescript-eslint/scope-manager@npm:5.62.0": + version: 5.62.0 + resolution: "@typescript-eslint/scope-manager@npm:5.62.0" dependencies: - "@typescript-eslint/types": 5.20.0 - "@typescript-eslint/visitor-keys": 5.20.0 - checksum: 904fd43f559dc2579958496ffad837eca124940b4a172666f0ea54ed606074d9ec7d2bec0f2141c3f9a8b894dd2644817cb86809e79a7a73ecba2b7babcdb5c9 + "@typescript-eslint/types": 5.62.0 + "@typescript-eslint/visitor-keys": 5.62.0 + checksum: 6062d6b797fe1ce4d275bb0d17204c827494af59b5eaf09d8a78cdd39dadddb31074dded4297aaf5d0f839016d601032857698b0e4516c86a41207de606e9573 languageName: node linkType: hard -"@typescript-eslint/scope-manager@npm:5.30.0": - version: 5.30.0 - resolution: "@typescript-eslint/scope-manager@npm:5.30.0" +"@typescript-eslint/type-utils@npm:5.62.0": + version: 5.62.0 + resolution: "@typescript-eslint/type-utils@npm:5.62.0" dependencies: - "@typescript-eslint/types": 5.30.0 - "@typescript-eslint/visitor-keys": 5.30.0 - checksum: 51246d0f6c497ad98fcfb02a9da92e855cd5916cf6ea117b1f8a511e4f62d1eae28f2c7278dfe29cc823c36f3b1fe87ff56681654b68faac5dfd1b897c3c58da - languageName: node - linkType: hard - -"@typescript-eslint/type-utils@npm:5.20.0": - version: 5.20.0 - resolution: "@typescript-eslint/type-utils@npm:5.20.0" - dependencies: - "@typescript-eslint/utils": 5.20.0 - debug: ^4.3.2 + "@typescript-eslint/typescript-estree": 5.62.0 + "@typescript-eslint/utils": 5.62.0 + debug: ^4.3.4 tsutils: ^3.21.0 peerDependencies: eslint: "*" peerDependenciesMeta: typescript: optional: true - checksum: c9c436122b715d144edae9d36ebd34e9b02b282ada829382770e15170c58f4f27cfde2d5847ea3c4a1b70ca42e2460a204e920eea50b3d05e9d342e8836d4d12 - languageName: node - linkType: hard - -"@typescript-eslint/types@npm:5.20.0": - version: 5.20.0 - resolution: "@typescript-eslint/types@npm:5.20.0" - checksum: d7f6e51e23f59feee8857340828c47a98a0dd5eaa1b045e936dc11199b55754cf78ae5cd8d56c1fafb1b5a40a6f472c1ac921072951217caffe3f06a717fa61c + checksum: fc41eece5f315dfda14320be0da78d3a971d650ea41300be7196934b9715f3fe1120a80207551eb71d39568275dbbcf359bde540d1ca1439d8be15e9885d2739 languageName: node linkType: hard -"@typescript-eslint/types@npm:5.30.0": - version: 5.30.0 - resolution: "@typescript-eslint/types@npm:5.30.0" - checksum: f83a506880d78419283a86e8aeb6c744b1d1a7fc3a366625125805daf0f9a7640a778537113b8865a4cdd985dcde53066820ea044a750126bc8b478eb93d4d12 +"@typescript-eslint/types@npm:5.62.0": + version: 5.62.0 + resolution: "@typescript-eslint/types@npm:5.62.0" + checksum: 48c87117383d1864766486f24de34086155532b070f6264e09d0e6139449270f8a9559cfef3c56d16e3bcfb52d83d42105d61b36743626399c7c2b5e0ac3b670 languageName: node linkType: hard -"@typescript-eslint/typescript-estree@npm:5.20.0": - version: 5.20.0 - resolution: "@typescript-eslint/typescript-estree@npm:5.20.0" - dependencies: - "@typescript-eslint/types": 5.20.0 - "@typescript-eslint/visitor-keys": 5.20.0 - debug: ^4.3.2 - globby: ^11.0.4 - is-glob: ^4.0.3 - semver: ^7.3.5 - tsutils: ^3.21.0 - peerDependenciesMeta: - typescript: - optional: true - checksum: 2b709292b7df3675d1f8eaf2f4e1ecf491f70fc525012c6a0fb5164aa893c165317b0a419022b8b00aaed502864d5b5b84092b58a9950d2633248e8d7627abd8 - languageName: node - linkType: hard - -"@typescript-eslint/typescript-estree@npm:5.30.0": - version: 5.30.0 - resolution: "@typescript-eslint/typescript-estree@npm:5.30.0" +"@typescript-eslint/typescript-estree@npm:5.62.0": + version: 5.62.0 + resolution: "@typescript-eslint/typescript-estree@npm:5.62.0" dependencies: - "@typescript-eslint/types": 5.30.0 - "@typescript-eslint/visitor-keys": 5.30.0 + "@typescript-eslint/types": 5.62.0 + "@typescript-eslint/visitor-keys": 5.62.0 debug: ^4.3.4 globby: ^11.1.0 is-glob: ^4.0.3 @@ -2453,59 +2702,42 @@ __metadata: peerDependenciesMeta: typescript: optional: true - checksum: cf8caea435c4346fae9c81635864efa17ea106e3dea5cd226c096145958ff6e7918e40cdb2af06526ca43d44717eb088869f1c1db51a52aa9f72b6bf65e11db2 + checksum: 3624520abb5807ed8f57b1197e61c7b1ed770c56dfcaca66372d584ff50175225798bccb701f7ef129d62c5989070e1ee3a0aa2d84e56d9524dcf011a2bb1a52 languageName: node linkType: hard -"@typescript-eslint/utils@npm:5.20.0": - version: 5.20.0 - resolution: "@typescript-eslint/utils@npm:5.20.0" +"@typescript-eslint/utils@npm:5.62.0": + version: 5.62.0 + resolution: "@typescript-eslint/utils@npm:5.62.0" dependencies: + "@eslint-community/eslint-utils": ^4.2.0 "@types/json-schema": ^7.0.9 - "@typescript-eslint/scope-manager": 5.20.0 - "@typescript-eslint/types": 5.20.0 - "@typescript-eslint/typescript-estree": 5.20.0 + "@types/semver": ^7.3.12 + "@typescript-eslint/scope-manager": 5.62.0 + "@typescript-eslint/types": 5.62.0 + "@typescript-eslint/typescript-estree": 5.62.0 eslint-scope: ^5.1.1 - eslint-utils: ^3.0.0 - peerDependencies: - eslint: ^6.0.0 || ^7.0.0 || ^8.0.0 - checksum: e387cf96124e34d079804220c5cb9134148fb3efc68d852a344453e285e3016e0b7e37b11308ef58c0e7afc638f145002cebc27c5da0fd03e0c074ff97d8210e - languageName: node - linkType: hard - -"@typescript-eslint/utils@npm:5.30.0": - version: 5.30.0 - resolution: "@typescript-eslint/utils@npm:5.30.0" - dependencies: - "@types/json-schema": ^7.0.9 - "@typescript-eslint/scope-manager": 5.30.0 - "@typescript-eslint/types": 5.30.0 - "@typescript-eslint/typescript-estree": 5.30.0 - eslint-scope: ^5.1.1 - eslint-utils: ^3.0.0 + semver: ^7.3.7 peerDependencies: eslint: ^6.0.0 || ^7.0.0 || ^8.0.0 - checksum: 176eda46292398c0fe069d96f51d0083a9b978d4c6e2ca92f10e9ebad83910d67754bcb2c1667cf4c40e06c112558ff1ad973d6f82719cfe4de7c72f89a3df29 + checksum: ee9398c8c5db6d1da09463ca7bf36ed134361e20131ea354b2da16a5fdb6df9ba70c62a388d19f6eebb421af1786dbbd79ba95ddd6ab287324fc171c3e28d931 languageName: node linkType: hard -"@typescript-eslint/visitor-keys@npm:5.20.0": - version: 5.20.0 - resolution: "@typescript-eslint/visitor-keys@npm:5.20.0" +"@typescript-eslint/visitor-keys@npm:5.62.0": + version: 5.62.0 + resolution: "@typescript-eslint/visitor-keys@npm:5.62.0" dependencies: - "@typescript-eslint/types": 5.20.0 - eslint-visitor-keys: ^3.0.0 - checksum: 1e1aa5f14fd60f1846ee26947d571953898dc82eb635a7eab3984c6b7db9bb8897743416713a129cc95c8cd63325cc0c64b3935d264f73100911fc5da76fc65f + "@typescript-eslint/types": 5.62.0 + eslint-visitor-keys: ^3.3.0 + checksum: 976b05d103fe8335bef5c93ad3f76d781e3ce50329c0243ee0f00c0fcfb186c81df50e64bfdd34970148113f8ade90887f53e3c4938183afba830b4ba8e30a35 languageName: node linkType: hard -"@typescript-eslint/visitor-keys@npm:5.30.0": - version: 5.30.0 - resolution: "@typescript-eslint/visitor-keys@npm:5.30.0" - dependencies: - "@typescript-eslint/types": 5.30.0 - eslint-visitor-keys: ^3.3.0 - checksum: bf2219cbb910d284e2f224aaa701932287b25fe99312f9abf6406a8f52a3a0b852c96276cd740ae3071b2561b253a6cfa30b0b8ab1d199e08f9550402f8fbf1f +"@ungap/structured-clone@npm:^1.2.0": + version: 1.2.0 + resolution: "@ungap/structured-clone@npm:1.2.0" + checksum: 4f656b7b4672f2ce6e272f2427d8b0824ed11546a601d8d5412b9d7704e83db38a8d9f402ecdf2b9063fc164af842ad0ec4a55819f621ed7e7ea4d1efcc74524 languageName: node linkType: hard @@ -2593,6 +2825,13 @@ __metadata: languageName: node linkType: hard +"abbrev@npm:^2.0.0": + version: 2.0.0 + resolution: "abbrev@npm:2.0.0" + checksum: 0e994ad2aa6575f94670d8a2149afe94465de9cedaaaac364e7fb43a40c3691c980ff74899f682f4ca58fa96b4cbd7421a015d3a6defe43a442117d7821a2f36 + languageName: node + linkType: hard + "abort-controller@npm:^3.0.0": version: 3.0.0 resolution: "abort-controller@npm:3.0.0" @@ -2602,6 +2841,13 @@ __metadata: languageName: node linkType: hard +"abortcontroller-polyfill@npm:^1.7.3": + version: 1.7.5 + resolution: "abortcontroller-polyfill@npm:1.7.5" + checksum: daf4169f4228ae0e4f4dbcfa782e501b923667f2666b7c55bd3b7664e5d6b100e333a93371173985fdf21f65d7dfba15bdb2e6031bdc9e57e4ce0297147da3aa + languageName: node + linkType: hard + "abstract-level@npm:^1.0.0, abstract-level@npm:^1.0.2, abstract-level@npm:^1.0.3": version: 1.0.3 resolution: "abstract-level@npm:1.0.3" @@ -2667,7 +2913,7 @@ __metadata: languageName: node linkType: hard -"acorn-jsx@npm:^5.2.0, acorn-jsx@npm:^5.3.1": +"acorn-jsx@npm:^5.2.0, acorn-jsx@npm:^5.3.2": version: 5.3.2 resolution: "acorn-jsx@npm:5.3.2" peerDependencies: @@ -2677,9 +2923,9 @@ __metadata: linkType: hard "acorn-walk@npm:^8.1.1": - version: 8.2.0 - resolution: "acorn-walk@npm:8.2.0" - checksum: 1715e76c01dd7b2d4ca472f9c58968516a4899378a63ad5b6c2d668bba8da21a71976c14ec5f5b75f887b6317c4ae0b897ab141c831d741dc76024d8745f1ad1 + version: 8.3.1 + resolution: "acorn-walk@npm:8.3.1" + checksum: 5c8926ddb5400bc825b6baca782931f9df4ace603ba1a517f5243290fd9cdb089d52877840687b5d5c939591ebc314e2e63721514feaa37c6829c828f2b940ce languageName: node linkType: hard @@ -2692,28 +2938,19 @@ __metadata: languageName: node linkType: hard -"acorn@npm:^8.4.1": - version: 8.7.1 - resolution: "acorn@npm:8.7.1" - bin: - acorn: bin/acorn - checksum: aca0aabf98826717920ac2583fdcad0a6fbe4e583fdb6e843af2594e907455aeafe30b1e14f1757cd83ce1776773cf8296ffc3a4acf13f0bd3dfebcf1db6ae80 - languageName: node - linkType: hard - -"acorn@npm:^8.7.0": - version: 8.7.0 - resolution: "acorn@npm:8.7.0" +"acorn@npm:^8.4.1, acorn@npm:^8.9.0": + version: 8.11.2 + resolution: "acorn@npm:8.11.2" bin: acorn: bin/acorn - checksum: e0f79409d68923fbf1aa6d4166f3eedc47955320d25c89a20cc822e6ba7c48c5963d5bc657bc242d68f7a4ac9faf96eef033e8f73656da6c640d4219935fdfd0 + checksum: 818450408684da89423e3daae24e4dc9b68692db8ab49ea4569c7c5abb7a3f23669438bf129cc81dfdada95e1c9b944ee1bfca2c57a05a4dc73834a612fbf6a7 languageName: node linkType: hard "address@npm:^1.0.1": - version: 1.1.2 - resolution: "address@npm:1.1.2" - checksum: d966deee6ab9a0f96ed1d25dc73e91a248f64479c91f9daeb15237b8e3c39a02faac4e6afe8987ef9e5aea60a1593cef5882b7456ab2e6196fc0229a93ec39c2 + version: 1.2.2 + resolution: "address@npm:1.2.2" + checksum: ace439960c1e3564d8f523aff23a841904bf33a2a7c2e064f7f60a064194075758b9690e65bd9785692a4ef698a998c57eb74d145881a1cecab8ba658ddb1607 languageName: node linkType: hard @@ -2731,7 +2968,7 @@ __metadata: languageName: node linkType: hard -"agent-base@npm:6, agent-base@npm:^6.0.2": +"agent-base@npm:6": version: 6.0.2 resolution: "agent-base@npm:6.0.2" dependencies: @@ -2740,14 +2977,12 @@ __metadata: languageName: node linkType: hard -"agentkeepalive@npm:^4.2.1": - version: 4.2.1 - resolution: "agentkeepalive@npm:4.2.1" +"agent-base@npm:^7.0.2, agent-base@npm:^7.1.0": + version: 7.1.0 + resolution: "agent-base@npm:7.1.0" dependencies: - debug: ^4.1.0 - depd: ^1.1.2 - humanize-ms: ^1.2.1 - checksum: 39cb49ed8cf217fd6da058a92828a0a84e0b74c35550f82ee0a10e1ee403c4b78ade7948be2279b188b7a7303f5d396ea2738b134731e464bf28de00a4f72a18 + debug: ^4.3.4 + checksum: f7828f991470a0cc22cb579c86a18cbae83d8a3cbed39992ab34fc7217c4d126017f1c74d0ab66be87f71455318a8ea3e757d6a37881b8d0f2a2c6aa55e5418f languageName: node linkType: hard @@ -2761,7 +2996,7 @@ __metadata: languageName: node linkType: hard -"ajv@npm:^6.10.0, ajv@npm:^6.12.3, ajv@npm:^6.12.4": +"ajv@npm:^6.12.3, ajv@npm:^6.12.4": version: 6.12.6 resolution: "ajv@npm:6.12.6" dependencies: @@ -2780,21 +3015,14 @@ __metadata: languageName: node linkType: hard -"ansi-colors@npm:3.2.3": - version: 3.2.3 - resolution: "ansi-colors@npm:3.2.3" - checksum: 018a92fbf8b143feb9e00559655072598902ff2cdfa07dbe24b933c70ae04845e3dda2c091ab128920fc50b3db06c3f09947f49fcb287d53beb6c5869b8bb32b - languageName: node - linkType: hard - -"ansi-colors@npm:4.1.1, ansi-colors@npm:^4.1.1": +"ansi-colors@npm:4.1.1": version: 4.1.1 resolution: "ansi-colors@npm:4.1.1" checksum: 138d04a51076cb085da0a7e2d000c5c0bb09f6e772ed5c65c53cb118d37f6c5f1637506d7155fb5f330f0abcf6f12fa2e489ac3f8cdab9da393bf1bb4f9a32b0 languageName: node linkType: hard -"ansi-colors@npm:^4.1.3": +"ansi-colors@npm:^4.1.1, ansi-colors@npm:^4.1.3": version: 4.1.3 resolution: "ansi-colors@npm:4.1.3" checksum: a9c2ec842038a1fabc7db9ece7d3177e2fe1c5dc6f0c51ecfbf5f39911427b89c00b5dc6b8bd95f82a26e9b16aaae2e83d45f060e98070ce4d1333038edceb0e @@ -2817,13 +3045,6 @@ __metadata: languageName: node linkType: hard -"ansi-regex@npm:^4.1.0": - version: 4.1.1 - resolution: "ansi-regex@npm:4.1.1" - checksum: b1a6ee44cb6ecdabaa770b2ed500542714d4395d71c7e5c25baa631f680fb2ad322eb9ba697548d498a6fd366949fc8b5bfcf48d49a32803611f648005b01888 - languageName: node - linkType: hard - "ansi-regex@npm:^5.0.1": version: 5.0.1 resolution: "ansi-regex@npm:5.0.1" @@ -2831,7 +3052,14 @@ __metadata: languageName: node linkType: hard -"ansi-styles@npm:^3.2.0, ansi-styles@npm:^3.2.1": +"ansi-regex@npm:^6.0.1": + version: 6.0.1 + resolution: "ansi-regex@npm:6.0.1" + checksum: 1ff8b7667cded1de4fa2c9ae283e979fc87036864317da86a2e546725f96406746411d0d85e87a2d12fa5abd715d90006de7fa4fa0477c92321ad3b4c7d4e169 + languageName: node + linkType: hard + +"ansi-styles@npm:^3.2.1": version: 3.2.1 resolution: "ansi-styles@npm:3.2.1" dependencies: @@ -2849,37 +3077,29 @@ __metadata: languageName: node linkType: hard -"antlr4ts@npm:^0.5.0-alpha.4": - version: 0.5.0-alpha.4 - resolution: "antlr4ts@npm:0.5.0-alpha.4" - checksum: 37948499d59477f5b5a8ea71dfb8b5330e71d5a7cee60f57351dd744219b8619fa6aac1a5b6ec1a9991846e8ddc9ca47680eb166c59b44333369b3115e7aa358 +"ansi-styles@npm:^6.1.0": + version: 6.2.1 + resolution: "ansi-styles@npm:6.2.1" + checksum: ef940f2f0ced1a6347398da88a91da7930c33ecac3c77b72c5905f8b8fe402c52e6fde304ff5347f616e27a742da3f1dc76de98f6866c69251ad0b07a66776d9 languageName: node linkType: hard -"anymatch@npm:~3.1.1, anymatch@npm:~3.1.2": - version: 3.1.2 - resolution: "anymatch@npm:3.1.2" +"antlr4ts@npm:^0.5.0-alpha.4": + version: 0.5.0-dev + resolution: "antlr4ts@npm:0.5.0-dev" dependencies: - normalize-path: ^3.0.0 - picomatch: ^2.0.4 - checksum: 985163db2292fac9e5a1e072bf99f1b5baccf196e4de25a0b0b81865ebddeb3b3eb4480734ef0a2ac8c002845396b91aa89121f5b84f93981a4658164a9ec6e9 - languageName: node - linkType: hard - -"aproba@npm:^1.0.3 || ^2.0.0": - version: 2.0.0 - resolution: "aproba@npm:2.0.0" - checksum: 5615cadcfb45289eea63f8afd064ab656006361020e1735112e346593856f87435e02d8dcc7ff0d11928bc7d425f27bc7c2a84f6c0b35ab0ff659c814c138a24 + source-map-support: ^0.5.16 + checksum: 640dae2229124372b0329315e9614ae983bb80b1af237d8c0b3e90a2d85fb534e851c51d65d1897c92b36d27851d041ad8d95aab44af19cf7355b3ad11a3ddbf languageName: node linkType: hard -"are-we-there-yet@npm:^3.0.0": - version: 3.0.0 - resolution: "are-we-there-yet@npm:3.0.0" +"anymatch@npm:~3.1.2": + version: 3.1.3 + resolution: "anymatch@npm:3.1.3" dependencies: - delegates: ^1.0.0 - readable-stream: ^3.6.0 - checksum: 348edfdd931b0b50868b55402c01c3f64df1d4c229ab6f063539a5025fd6c5f5bb8a0cab409bbed8d75d34762d22aa91b7c20b4204eb8177063158d9ba792981 + normalize-path: ^3.0.0 + picomatch: ^2.0.4 + checksum: 3e044fd6d1d26545f235a9fe4d7a534e2029d8e59fa7fd9f2a6eb21230f6b5380ea1eaf55136e60cbf8e613544b3b766e7a6fa2102e2a3a117505466e3025dc2 languageName: node linkType: hard @@ -2913,13 +3133,23 @@ __metadata: languageName: node linkType: hard -"array-back@npm:^4.0.1": +"array-back@npm:^4.0.1, array-back@npm:^4.0.2": version: 4.0.2 resolution: "array-back@npm:4.0.2" checksum: f30603270771eeb54e5aad5f54604c62b3577a18b6db212a7272b2b6c32049121b49431f656654790ed1469411e45f387e7627c0de8fd0515995cc40df9b9294 languageName: node linkType: hard +"array-buffer-byte-length@npm:^1.0.0": + version: 1.0.0 + resolution: "array-buffer-byte-length@npm:1.0.0" + dependencies: + call-bind: ^1.0.2 + is-array-buffer: ^3.0.1 + checksum: 044e101ce150f4804ad19c51d6c4d4cfa505c5b2577bd179256e4aa3f3f6a0a5e9874c78cd428ee566ac574c8a04d7ce21af9fe52e844abfdccb82b33035a7c3 + languageName: node + linkType: hard + "array-flatten@npm:1.1.1": version: 1.1.1 resolution: "array-flatten@npm:1.1.1" @@ -2927,16 +3157,16 @@ __metadata: languageName: node linkType: hard -"array-includes@npm:^3.1.4": - version: 3.1.4 - resolution: "array-includes@npm:3.1.4" +"array-includes@npm:^3.1.7": + version: 3.1.7 + resolution: "array-includes@npm:3.1.7" dependencies: call-bind: ^1.0.2 - define-properties: ^1.1.3 - es-abstract: ^1.19.1 - get-intrinsic: ^1.1.1 + define-properties: ^1.2.0 + es-abstract: ^1.22.1 + get-intrinsic: ^1.2.1 is-string: ^1.0.7 - checksum: 69967c38c52698f84b50a7aed5554aadc89c6ac6399b6d92ad061a5952f8423b4bba054c51d40963f791dfa294d7247cdd7988b6b1f2c5861477031c6386e1c0 + checksum: 06f9e4598fac12a919f7c59a3f04f010ea07f0b7f0585465ed12ef528a60e45f374e79d1bddbb34cdd4338357d00023ddbd0ac18b0be36964f5e726e8965d7fc languageName: node linkType: hard @@ -2954,26 +3184,55 @@ __metadata: languageName: node linkType: hard -"array.prototype.flat@npm:^1.2.3": - version: 1.3.0 - resolution: "array.prototype.flat@npm:1.3.0" +"array.prototype.findlastindex@npm:^1.2.3": + version: 1.2.3 + resolution: "array.prototype.findlastindex@npm:1.2.3" dependencies: call-bind: ^1.0.2 - define-properties: ^1.1.3 - es-abstract: ^1.19.2 + define-properties: ^1.2.0 + es-abstract: ^1.22.1 es-shim-unscopables: ^1.0.0 - checksum: 2a652b3e8dc0bebb6117e42a5ab5738af0203a14c27341d7bb2431467bdb4b348e2c5dc555dfcda8af0a5e4075c400b85311ded73861c87290a71a17c3e0a257 + get-intrinsic: ^1.2.1 + checksum: 31f35d7b370c84db56484618132041a9af401b338f51899c2e78ef7690fbba5909ee7ca3c59a7192085b328cc0c68c6fd1f6d1553db01a689a589ae510f3966e languageName: node linkType: hard -"array.prototype.flat@npm:^1.2.5": - version: 1.2.5 - resolution: "array.prototype.flat@npm:1.2.5" +"array.prototype.flat@npm:^1.2.3, array.prototype.flat@npm:^1.3.2": + version: 1.3.2 + resolution: "array.prototype.flat@npm:1.3.2" dependencies: call-bind: ^1.0.2 - define-properties: ^1.1.3 - es-abstract: ^1.19.0 - checksum: 9cc6414b111abfc7717e39546e4887b1e5ec74df8f1618d83425deaa95752bf05d475d1d241253b4d88d4a01f8e1bc84845ad5b7cc2047f8db2f614512acd40e + define-properties: ^1.2.0 + es-abstract: ^1.22.1 + es-shim-unscopables: ^1.0.0 + checksum: 5d6b4bf102065fb3f43764bfff6feb3295d372ce89591e6005df3d0ce388527a9f03c909af6f2a973969a4d178ab232ffc9236654149173e0e187ec3a1a6b87b + languageName: node + linkType: hard + +"array.prototype.flatmap@npm:^1.3.2": + version: 1.3.2 + resolution: "array.prototype.flatmap@npm:1.3.2" + dependencies: + call-bind: ^1.0.2 + define-properties: ^1.2.0 + es-abstract: ^1.22.1 + es-shim-unscopables: ^1.0.0 + checksum: ce09fe21dc0bcd4f30271f8144083aa8c13d4639074d6c8dc82054b847c7fc9a0c97f857491f4da19d4003e507172a78f4bcd12903098adac8b9cd374f734be3 + languageName: node + linkType: hard + +"arraybuffer.prototype.slice@npm:^1.0.2": + version: 1.0.2 + resolution: "arraybuffer.prototype.slice@npm:1.0.2" + dependencies: + array-buffer-byte-length: ^1.0.0 + call-bind: ^1.0.2 + define-properties: ^1.2.0 + es-abstract: ^1.22.1 + get-intrinsic: ^1.2.1 + is-array-buffer: ^3.0.2 + is-shared-array-buffer: ^1.0.2 + checksum: c200faf437786f5b2c80d4564ff5481c886a16dee642ef02abdc7306c7edd523d1f01d1dd12b769c7eb42ac9bc53874510db19a92a2c035c0f6696172aafa5d3 languageName: node linkType: hard @@ -3050,11 +3309,11 @@ __metadata: linkType: hard "async@npm:^2.4.0": - version: 2.6.3 - resolution: "async@npm:2.6.3" + version: 2.6.4 + resolution: "async@npm:2.6.4" dependencies: lodash: ^4.17.14 - checksum: 5e5561ff8fca807e88738533d620488ac03a5c43fce6c937451f7e35f943d33ad06c24af3f681a48cca3d2b0002b3118faff0a128dc89438a9bf0226f712c499 + checksum: a52083fb32e1ebe1d63e5c5624038bb30be68ff07a6c8d7dfe35e47c93fc144bd8652cbec869e0ac07d57dde387aa5f1386be3559cdee799cb1f789678d88e19 languageName: node linkType: hard @@ -3087,9 +3346,20 @@ __metadata: linkType: hard "aws4@npm:^1.8.0": - version: 1.11.0 - resolution: "aws4@npm:1.11.0" - checksum: 5a00d045fd0385926d20ebebcfba5ec79d4482fe706f63c27b324d489a04c68edb0db99ed991e19eda09cb8c97dc2452059a34d97545cebf591d7a2b5a10999f + version: 1.12.0 + resolution: "aws4@npm:1.12.0" + checksum: 68f79708ac7c335992730bf638286a3ee0a645cf12575d557860100767c500c08b30e24726b9f03265d74116417f628af78509e1333575e9f8d52a80edfe8cbc + languageName: node + linkType: hard + +"axios@npm:^1.5.1": + version: 1.6.2 + resolution: "axios@npm:1.6.2" + dependencies: + follow-redirects: ^1.15.0 + form-data: ^4.0.0 + proxy-from-env: ^1.1.0 + checksum: 4a7429e2b784be0f2902ca2680964391eae7236faa3967715f30ea45464b98ae3f1c6f631303b13dfe721b17126b01f486c7644b9ef276bfc63112db9fd379f8 languageName: node linkType: hard @@ -3142,25 +3412,16 @@ __metadata: linkType: hard "bigint-crypto-utils@npm:^3.0.23": - version: 3.1.8 - resolution: "bigint-crypto-utils@npm:3.1.8" - dependencies: - bigint-mod-arith: ^3.1.0 - checksum: deb004aacf0ac6150b3cebe472c8166a7a315c411260d6c20e43c8c9b1e48831879e5a2e8e7af1ef1aefc542ad7d842a1de4bef12b98e50c825d9243321efe52 - languageName: node - linkType: hard - -"bigint-mod-arith@npm:^3.1.0": - version: 3.1.2 - resolution: "bigint-mod-arith@npm:3.1.2" - checksum: badddd745f6e6c45674b22335d26a9ea83250e749abde20c5f84b24afbc747e259bc36798530953332349ed898f38ec39125b326cae8b8ee2dddfaea7ddf8448 + version: 3.3.0 + resolution: "bigint-crypto-utils@npm:3.3.0" + checksum: 9598ce57b23f776c8936d44114c9f051e62b5fa654915b664784cbcbacc5aa0485f4479571c51ff58008abb1210c0d6a234853742f07cf84bda890f2a1e01000 languageName: node linkType: hard "bignumber.js@npm:^9.0.0, bignumber.js@npm:^9.0.1": - version: 9.0.2 - resolution: "bignumber.js@npm:9.0.2" - checksum: 8637b71d0a99104b20413c47578953970006fec6b4df796b9dcfd9835ea9c402ea0e727eba9a5ca9f9a393c1d88b6168c5bbe0887598b708d4f8b4870ad62e1f + version: 9.1.2 + resolution: "bignumber.js@npm:9.1.2" + checksum: 582c03af77ec9cb0ebd682a373ee6c66475db94a4325f92299621d544aa4bd45cb45fd60001610e94aef8ae98a0905fa538241d9638d4422d57abbeeac6fadaf languageName: node linkType: hard @@ -3240,55 +3501,50 @@ __metadata: languageName: node linkType: hard -"bn.js@npm:^5.0.0, bn.js@npm:^5.1.2, bn.js@npm:^5.1.3, bn.js@npm:^5.2.0": - version: 5.2.0 - resolution: "bn.js@npm:5.2.0" - checksum: 6117170393200f68b35a061ecbf55d01dd989302e7b3c798a3012354fa638d124f0b2f79e63f77be5556be80322a09c40339eda6413ba7468524c0b6d4b4cb7a - languageName: node - linkType: hard - -"bn.js@npm:^5.2.1": +"bn.js@npm:^5.0.0, bn.js@npm:^5.1.2, bn.js@npm:^5.1.3, bn.js@npm:^5.2.0, bn.js@npm:^5.2.1": version: 5.2.1 resolution: "bn.js@npm:5.2.1" checksum: 3dd8c8d38055fedfa95c1d5fc3c99f8dd547b36287b37768db0abab3c239711f88ff58d18d155dd8ad902b0b0cee973747b7ae20ea12a09473272b0201c9edd3 languageName: node linkType: hard -"body-parser@npm:1.19.2": - version: 1.19.2 - resolution: "body-parser@npm:1.19.2" +"body-parser@npm:1.20.1": + version: 1.20.1 + resolution: "body-parser@npm:1.20.1" dependencies: bytes: 3.1.2 content-type: ~1.0.4 debug: 2.6.9 - depd: ~1.1.2 - http-errors: 1.8.1 + depd: 2.0.0 + destroy: 1.2.0 + http-errors: 2.0.0 iconv-lite: 0.4.24 - on-finished: ~2.3.0 - qs: 6.9.7 - raw-body: 2.4.3 + on-finished: 2.4.1 + qs: 6.11.0 + raw-body: 2.5.1 type-is: ~1.6.18 - checksum: 7f777ea65670e2622ca4a785b5dcb2a68451b3bb8d4d0f41091d307d56b640dba588a9ae04d85dda2cdd5e42788266a783528d5417e5643720fd611fd52522e7 + unpipe: 1.0.0 + checksum: f1050dbac3bede6a78f0b87947a8d548ce43f91ccc718a50dd774f3c81f2d8b04693e52acf62659fad23101827dd318da1fb1363444ff9a8482b886a3e4a5266 languageName: node linkType: hard "body-parser@npm:^1.16.0": - version: 1.20.0 - resolution: "body-parser@npm:1.20.0" + version: 1.20.2 + resolution: "body-parser@npm:1.20.2" dependencies: bytes: 3.1.2 - content-type: ~1.0.4 + content-type: ~1.0.5 debug: 2.6.9 depd: 2.0.0 destroy: 1.2.0 http-errors: 2.0.0 iconv-lite: 0.4.24 on-finished: 2.4.1 - qs: 6.10.3 - raw-body: 2.5.1 + qs: 6.11.0 + raw-body: 2.5.2 type-is: ~1.6.18 unpipe: 1.0.0 - checksum: 12fffdeac82fe20dddcab7074215d5156e7d02a69ae90cbe9fee1ca3efa2f28ef52097cbea76685ee0a1509c71d85abd0056a08e612c09077cad6277a644cf88 + checksum: 14d37ec638ab5c93f6099ecaed7f28f890d222c650c69306872e00b9efa081ff6c596cd9afb9930656aae4d6c4e1c17537bea12bb73c87a217cb3cfea8896737 languageName: node linkType: hard @@ -3321,11 +3577,11 @@ __metadata: linkType: hard "breakword@npm:^1.0.5": - version: 1.0.5 - resolution: "breakword@npm:1.0.5" + version: 1.0.6 + resolution: "breakword@npm:1.0.6" dependencies: wcwidth: ^1.0.1 - checksum: 8ca7b10bbbbfe1c45c12c9119c4bc1e585452ddd58c5da93020a0c1deac3cf6bb335632675c9c705ba7b644065ae1d6623a25e79b7a48e0ee0ff42cb6e94b357 + checksum: e8a3f308c0214986e1b768ca4460a798ffe4bbe08c375576de526431a01a9738318710cc05e309486ac5809d77d9f33d957f80939a890e07be5e89baad9816f8 languageName: node linkType: hard @@ -3500,21 +3756,12 @@ __metadata: linkType: hard "bufferutil@npm:^4.0.1": - version: 4.0.6 - resolution: "bufferutil@npm:4.0.6" + version: 4.0.8 + resolution: "bufferutil@npm:4.0.8" dependencies: node-gyp: latest node-gyp-build: ^4.3.0 - checksum: dd107560947445280af7820c3d0534127b911577d85d537e1d7e0aa30fd634853cef8a994d6e8aed3d81388ab1a20257de776164afe6a6af8e78f5f17968ebd6 - languageName: node - linkType: hard - -"busboy@npm:^1.6.0": - version: 1.6.0 - resolution: "busboy@npm:1.6.0" - dependencies: - streamsearch: ^1.1.0 - checksum: 32801e2c0164e12106bf236291a00795c3c4e4b709ae02132883fe8478ba2ae23743b11c5735a0aae8afe65ac4b6ca4568b91f0d9fed1fdbc32ede824a73746e + checksum: 7e9a46f1867dca72fda350966eb468eca77f4d623407b0650913fadf73d5750d883147d6e5e21c56f9d3b0bdc35d5474e80a600b9f31ec781315b4d2469ef087 languageName: node linkType: hard @@ -3525,29 +3772,37 @@ __metadata: languageName: node linkType: hard -"cacache@npm:^16.0.2": - version: 16.0.4 - resolution: "cacache@npm:16.0.4" +"cacache@npm:^18.0.0": + version: 18.0.1 + resolution: "cacache@npm:18.0.1" dependencies: - "@npmcli/fs": ^2.1.0 - "@npmcli/move-file": ^2.0.0 - chownr: ^2.0.0 - fs-minipass: ^2.1.0 - glob: ^7.2.0 - infer-owner: ^1.0.4 - lru-cache: ^7.7.1 - minipass: ^3.1.6 - minipass-collect: ^1.0.2 + "@npmcli/fs": ^3.1.0 + fs-minipass: ^3.0.0 + glob: ^10.2.2 + lru-cache: ^10.0.1 + minipass: ^7.0.3 + minipass-collect: ^2.0.1 minipass-flush: ^1.0.5 minipass-pipeline: ^1.2.4 - mkdirp: ^1.0.4 p-map: ^4.0.0 - promise-inflight: ^1.0.1 - rimraf: ^3.0.2 - ssri: ^9.0.0 + ssri: ^10.0.0 tar: ^6.1.11 - unique-filename: ^1.1.1 - checksum: f5ddd45e5b1ff5001f9d1fcbc95f1dc210e6b04fbaf92782dd16a514e9a8082efba6eac43dac3d881e2ab5829f5ad857d7deda58cbef235e93d075e8f378214a + unique-filename: ^3.0.0 + checksum: 5a0b3b2ea451a0379814dc1d3c81af48c7c6db15cd8f7d72e028501ae0036a599a99bbac9687bfec307afb2760808d1c7708e9477c8c70d2b166e7d80b162a23 + languageName: node + linkType: hard + +"cacheable-lookup@npm:^5.0.3": + version: 5.0.4 + resolution: "cacheable-lookup@npm:5.0.4" + checksum: 763e02cf9196bc9afccacd8c418d942fc2677f22261969a4c2c2e760fa44a2351a81557bd908291c3921fe9beb10b976ba8fa50c5ca837c5a0dd945f16468f2d + languageName: node + linkType: hard + +"cacheable-lookup@npm:^6.0.4": + version: 6.1.0 + resolution: "cacheable-lookup@npm:6.1.0" + checksum: 4e37afe897219b1035335b0765106a2c970ffa930497b43cac5000b860f3b17f48d004187279fae97e2e4cbf6a3693709b6d64af65279c7d6c8453321d36d118 languageName: node linkType: hard @@ -3566,13 +3821,29 @@ __metadata: languageName: node linkType: hard -"call-bind@npm:^1.0.0, call-bind@npm:^1.0.2": - version: 1.0.2 - resolution: "call-bind@npm:1.0.2" +"cacheable-request@npm:^7.0.2": + version: 7.0.4 + resolution: "cacheable-request@npm:7.0.4" dependencies: - function-bind: ^1.1.1 - get-intrinsic: ^1.0.2 - checksum: f8e31de9d19988a4b80f3e704788c4a2d6b6f3d17cfec4f57dc29ced450c53a49270dc66bf0fbd693329ee948dd33e6c90a329519aef17474a4d961e8d6426b0 + clone-response: ^1.0.2 + get-stream: ^5.1.0 + http-cache-semantics: ^4.0.0 + keyv: ^4.0.0 + lowercase-keys: ^2.0.0 + normalize-url: ^6.0.1 + responselike: ^2.0.0 + checksum: 0de9df773fd4e7dd9bd118959878f8f2163867e2e1ab3575ffbecbe6e75e80513dd0c68ba30005e5e5a7b377cc6162bbc00ab1db019bb4e9cb3c2f3f7a6f1ee4 + languageName: node + linkType: hard + +"call-bind@npm:^1.0.0, call-bind@npm:^1.0.2, call-bind@npm:^1.0.4, call-bind@npm:^1.0.5": + version: 1.0.5 + resolution: "call-bind@npm:1.0.5" + dependencies: + function-bind: ^1.1.2 + get-intrinsic: ^1.2.1 + set-function-length: ^1.1.1 + checksum: 449e83ecbd4ba48e7eaac5af26fea3b50f8f6072202c2dd7c5a6e7a6308f2421abe5e13a3bbd55221087f76320c5e09f25a8fdad1bab2b77c68ae74d92234ea5 languageName: node linkType: hard @@ -3633,21 +3904,21 @@ __metadata: linkType: hard "chai@npm:^4.3.6": - version: 4.3.6 - resolution: "chai@npm:4.3.6" + version: 4.3.10 + resolution: "chai@npm:4.3.10" dependencies: assertion-error: ^1.1.0 - check-error: ^1.0.2 - deep-eql: ^3.0.1 - get-func-name: ^2.0.0 - loupe: ^2.3.1 + check-error: ^1.0.3 + deep-eql: ^4.1.3 + get-func-name: ^2.0.2 + loupe: ^2.3.6 pathval: ^1.1.1 - type-detect: ^4.0.5 - checksum: acff93fd537f96d4a4d62dd83810285dffcfccb5089e1bf2a1205b28ec82d93dff551368722893cf85004282df10ee68802737c33c90c5493957ed449ed7ce71 + type-detect: ^4.0.8 + checksum: 536668c60a0d985a0fbd94418028e388d243a925d7c5e858c7443e334753511614a3b6a124bac9ca077dfc4c37acc367d62f8c294960f440749536dc181dfc6d languageName: node linkType: hard -"chalk@npm:^2.0.0, chalk@npm:^2.1.0, chalk@npm:^2.4.2": +"chalk@npm:^2.1.0, chalk@npm:^2.4.2": version: 2.4.2 resolution: "chalk@npm:2.4.2" dependencies: @@ -3682,29 +3953,12 @@ __metadata: languageName: node linkType: hard -"check-error@npm:^1.0.2": - version: 1.0.2 - resolution: "check-error@npm:1.0.2" - checksum: d9d106504404b8addd1ee3f63f8c0eaa7cd962a1a28eb9c519b1c4a1dc7098be38007fc0060f045ee00f075fbb7a2a4f42abcf61d68323677e11ab98dc16042e - languageName: node - linkType: hard - -"chokidar@npm:3.3.0": - version: 3.3.0 - resolution: "chokidar@npm:3.3.0" +"check-error@npm:^1.0.3": + version: 1.0.3 + resolution: "check-error@npm:1.0.3" dependencies: - anymatch: ~3.1.1 - braces: ~3.0.2 - fsevents: ~2.1.1 - glob-parent: ~5.1.0 - is-binary-path: ~2.1.0 - is-glob: ~4.0.1 - normalize-path: ~3.0.0 - readdirp: ~3.2.0 - dependenciesMeta: - fsevents: - optional: true - checksum: e9863256ebb29dbc5e58a7e2637439814beb63b772686cb9e94478312c24dcaf3d0570220c5e75ea29029f43b664f9956d87b716120d38cf755f32124f047e8e + get-func-name: ^2.0.2 + checksum: e2131025cf059b21080f4813e55b3c480419256914601750b0fee3bd9b2b8315b531e551ef12560419b8b6d92a3636511322752b1ce905703239e7cc451b6399 languageName: node linkType: hard @@ -3748,10 +4002,10 @@ __metadata: languageName: node linkType: hard -"ci-info@npm:^3.1.0, ci-info@npm:^3.2.0": - version: 3.3.2 - resolution: "ci-info@npm:3.3.2" - checksum: fd81f1edd2d3b0f6cb077b2e84365136d87b9db8c055928c1ad69da8a76c2c2f19cba8ea51b90238302157ca927f91f92b653e933f2398dde4867500f08d6e62 +"ci-info@npm:^3.7.0": + version: 3.9.0 + resolution: "ci-info@npm:3.9.0" + checksum: 6b19dc9b2966d1f8c2041a838217299718f15d6c4b63ae36e4674edd2bee48f780e94761286a56aa59eb305a85fbea4ddffb7630ec063e7ec7e7e5ad42549a87 languageName: node linkType: hard @@ -3786,16 +4040,16 @@ __metadata: linkType: hard "classic-level@npm:^1.2.0": - version: 1.2.0 - resolution: "classic-level@npm:1.2.0" + version: 1.3.0 + resolution: "classic-level@npm:1.3.0" dependencies: abstract-level: ^1.0.2 catering: ^2.1.0 module-error: ^1.0.1 - napi-macros: ~2.0.0 + napi-macros: ^2.2.2 node-gyp: latest node-gyp-build: ^4.3.0 - checksum: 88ddd12f2192c2775107d5e462998ac01095cb0222ca01dc2be77d8dcbbf9883c4c0a0248529cceee40a2f1232c68027b1aca731da9f767ad8e9483cbd61dd37 + checksum: 773da48aef52a041115d413fee8340b357a4da2eb505764f327183b155edd7cc9d24819eb4f707c83dbdae8588024f5dddeb322125567c59d5d1f6f16334cdb9 languageName: node linkType: hard @@ -3816,9 +4070,9 @@ __metadata: linkType: hard "cli-spinners@npm:^2.5.0": - version: 2.6.1 - resolution: "cli-spinners@npm:2.6.1" - checksum: 423409baaa7a58e5104b46ca1745fbfc5888bbd0b0c5a626e052ae1387060839c8efd512fb127e25769b3dc9562db1dc1b5add6e0b93b7ef64f477feb6416a45 + version: 2.9.2 + resolution: "cli-spinners@npm:2.9.2" + checksum: 1bd588289b28432e4676cb5d40505cfe3e53f2e4e10fbe05c8a710a154d6fe0ce7836844b00d6858f740f2ffe67cdc36e0fce9c7b6a8430e80e6388d5aa4956c languageName: node linkType: hard @@ -3843,17 +4097,6 @@ __metadata: languageName: node linkType: hard -"cliui@npm:^5.0.0": - version: 5.0.0 - resolution: "cliui@npm:5.0.0" - dependencies: - string-width: ^3.1.0 - strip-ansi: ^5.2.0 - wrap-ansi: ^5.1.0 - checksum: 0bb8779efe299b8f3002a73619eaa8add4081eb8d1c17bc4fedc6240557fb4eacdc08fe87c39b002eacb6cfc117ce736b362dbfd8bf28d90da800e010ee97df4 - languageName: node - linkType: hard - "cliui@npm:^6.0.0": version: 6.0.0 resolution: "cliui@npm:6.0.0" @@ -3876,12 +4119,23 @@ __metadata: languageName: node linkType: hard +"cliui@npm:^8.0.1": + version: 8.0.1 + resolution: "cliui@npm:8.0.1" + dependencies: + string-width: ^4.2.0 + strip-ansi: ^6.0.1 + wrap-ansi: ^7.0.0 + checksum: 79648b3b0045f2e285b76fb2e24e207c6db44323581e421c3acbd0e86454cba1b37aea976ab50195a49e7384b871e6dfb2247ad7dec53c02454ac6497394cb56 + languageName: node + linkType: hard + "clone-response@npm:^1.0.2": - version: 1.0.2 - resolution: "clone-response@npm:1.0.2" + version: 1.0.3 + resolution: "clone-response@npm:1.0.3" dependencies: mimic-response: ^1.0.0 - checksum: 2d0e61547fc66276e0903be9654ada422515f5a15741691352000d47e8c00c226061221074ce2c0064d12e975e84a8687cfd35d8b405750cb4e772f87b256eda + checksum: 4e671cac39b11c60aa8ba0a450657194a5d6504df51bca3fac5b3bd0145c4f8e8464898f87c8406b83232e3bc5cca555f51c1f9c8ac023969ebfbf7f6bdabb2e languageName: node linkType: hard @@ -3924,15 +4178,6 @@ __metadata: languageName: node linkType: hard -"color-support@npm:^1.1.3": - version: 1.1.3 - resolution: "color-support@npm:1.1.3" - bin: - color-support: bin.js - checksum: 9b7356817670b9a13a26ca5af1c21615463b500783b739b7634a0c2047c16cef4b2865d7576875c31c3cddf9dd621fa19285e628f20198b233a5cfdda6d0793b - languageName: node - linkType: hard - "colors@npm:1.4.0, colors@npm:^1.1.2": version: 1.4.0 resolution: "colors@npm:1.4.0" @@ -3969,14 +4214,14 @@ __metadata: linkType: hard "command-line-usage@npm:^6.1.0": - version: 6.1.2 - resolution: "command-line-usage@npm:6.1.2" + version: 6.1.3 + resolution: "command-line-usage@npm:6.1.3" dependencies: - array-back: ^4.0.1 + array-back: ^4.0.2 chalk: ^2.4.2 - table-layout: ^1.0.1 + table-layout: ^1.0.2 typical: ^5.2.0 - checksum: 2491ec14efff47f0edefa99720cf77c6400666a63a592aba851f25659525387e8ca970ebdfcc89270b1f6490109972d473de58d21932aa27f5dc4eb7420473b4 + checksum: 8261d4e5536eb0bcddee0ec5e89c05bb2abd18e5760785c8078ede5020bc1c612cbe28eb6586f5ed4a3660689748e5aaad4a72f21566f4ef39393694e2fa1a0b languageName: node linkType: hard @@ -4013,13 +4258,6 @@ __metadata: languageName: node linkType: hard -"console-control-strings@npm:^1.1.0": - version: 1.1.0 - resolution: "console-control-strings@npm:1.1.0" - checksum: 8755d76787f94e6cf79ce4666f0c5519906d7f5b02d4b884cf41e11dcd759ed69c57da0670afd9236d229a46e0f9cf519db0cd829c6dca820bb5a5c3def584ed - languageName: node - linkType: hard - "content-disposition@npm:0.5.4": version: 0.5.4 resolution: "content-disposition@npm:0.5.4" @@ -4040,10 +4278,10 @@ __metadata: languageName: node linkType: hard -"content-type@npm:~1.0.4": - version: 1.0.4 - resolution: "content-type@npm:1.0.4" - checksum: 3d93585fda985d1554eca5ebd251994327608d2e200978fdbfba21c0c679914d5faf266d17027de44b34a72c7b0745b18584ecccaa7e1fdfb6a68ac7114f12e0 +"content-type@npm:~1.0.4, content-type@npm:~1.0.5": + version: 1.0.5 + resolution: "content-type@npm:1.0.5" + checksum: 566271e0a251642254cde0f845f9dd4f9856e52d988f4eb0d0dcffbb7a1f8ec98de7a5215fc628f3bce30fe2fb6fd2bc064b562d721658c59b544e2d34ea2766 languageName: node linkType: hard @@ -4054,7 +4292,14 @@ __metadata: languageName: node linkType: hard -"cookie@npm:0.4.2, cookie@npm:^0.4.1": +"cookie@npm:0.5.0": + version: 0.5.0 + resolution: "cookie@npm:0.5.0" + checksum: 1f4bd2ca5765f8c9689a7e8954183f5332139eb72b6ff783d8947032ec1fdf43109852c178e21a953a30c0dd42257828185be01b49d1eb1a67fd054ca588a180 + languageName: node + linkType: hard + +"cookie@npm:^0.4.1": version: 0.4.2 resolution: "cookie@npm:0.4.2" checksum: a00833c998bedf8e787b4c342defe5fa419abd96b32f4464f718b91022586b8f1bafbddd499288e75c037642493c83083da426c6a9080d309e3bd90fd11baa9b @@ -4062,16 +4307,16 @@ __metadata: linkType: hard "cookiejar@npm:^2.1.1": - version: 2.1.3 - resolution: "cookiejar@npm:2.1.3" - checksum: 88259983ebc52ceb23cdacfa48762b6a518a57872eff1c7ed01d214fff5cf492e2660d7d5c04700a28f1787a76811df39e8639f8e17670b3cf94ecd86e161f07 + version: 2.1.4 + resolution: "cookiejar@npm:2.1.4" + checksum: c4442111963077dc0e5672359956d6556a195d31cbb35b528356ce5f184922b99ac48245ac05ed86cf993f7df157c56da10ab3efdadfed79778a0d9b1b092d5b languageName: node linkType: hard "core-js-pure@npm:^3.0.1": - version: 3.21.1 - resolution: "core-js-pure@npm:3.21.1" - checksum: 00a5dff599b7fb0b30746a638b9d0edbdc0df24ed1580ca56be595fbe3c78c375d37fc4e1bff23627109229702c9ee8ea2587a66b8280eb33b85160aa4e401e9 + version: 3.34.0 + resolution: "core-js-pure@npm:3.34.0" + checksum: 4c44ac4beff42e07f41eef3c9ecefc8ee3f9e91e1b9f278bf8520cc1fb37afb663cff77c182541dc42d58737f93ab0f30a33a5fe661fb161fdd8aa7fe78a5edf languageName: node linkType: hard @@ -4152,6 +4397,15 @@ __metadata: languageName: node linkType: hard +"cross-fetch@npm:^3.1.4": + version: 3.1.8 + resolution: "cross-fetch@npm:3.1.8" + dependencies: + node-fetch: ^2.6.12 + checksum: 78f993fa099eaaa041122ab037fe9503ecbbcb9daef234d1d2e0b9230a983f64d645d088c464e21a247b825a08dc444a6e7064adfa93536d3a9454b4745b3632 + languageName: node + linkType: hard + "cross-spawn@npm:^5.1.0": version: 5.1.0 resolution: "cross-spawn@npm:5.1.0" @@ -4163,7 +4417,7 @@ __metadata: languageName: node linkType: hard -"cross-spawn@npm:^7.0.2": +"cross-spawn@npm:^7.0.0, cross-spawn@npm:^7.0.2": version: 7.0.3 resolution: "cross-spawn@npm:7.0.3" dependencies: @@ -4221,7 +4475,7 @@ __metadata: languageName: node linkType: hard -"csv@npm:^5.5.0": +"csv@npm:^5.5.3": version: 5.5.3 resolution: "csv@npm:5.5.3" dependencies: @@ -4259,7 +4513,7 @@ __metadata: languageName: node linkType: hard -"debug@npm:2.6.9, debug@npm:^2.2.0, debug@npm:^2.6.0, debug@npm:^2.6.9": +"debug@npm:2.6.9, debug@npm:^2.2.0": version: 2.6.9 resolution: "debug@npm:2.6.9" dependencies: @@ -4268,16 +4522,7 @@ __metadata: languageName: node linkType: hard -"debug@npm:3.2.6": - version: 3.2.6 - resolution: "debug@npm:3.2.6" - dependencies: - ms: ^2.1.1 - checksum: 07bc8b3a13ef3cfa6c06baf7871dfb174c291e5f85dbf566f086620c16b9c1a0e93bb8f1935ebbd07a683249e7e30286f2966e2ef461e8fd17b1b60732062d6b - languageName: node - linkType: hard - -"debug@npm:4, debug@npm:4.3.4, debug@npm:^4.1.0, debug@npm:^4.1.1, debug@npm:^4.3.1, debug@npm:^4.3.2, debug@npm:^4.3.3, debug@npm:^4.3.4": +"debug@npm:4, debug@npm:4.3.4, debug@npm:^4.1.1, debug@npm:^4.3.1, debug@npm:^4.3.2, debug@npm:^4.3.3, debug@npm:^4.3.4": version: 4.3.4 resolution: "debug@npm:4.3.4" dependencies: @@ -4299,12 +4544,12 @@ __metadata: linkType: hard "decamelize-keys@npm:^1.1.0": - version: 1.1.0 - resolution: "decamelize-keys@npm:1.1.0" + version: 1.1.1 + resolution: "decamelize-keys@npm:1.1.1" dependencies: decamelize: ^1.1.0 map-obj: ^1.0.0 - checksum: 8bc5d32e035a072f5dffc1f1f3d26ca7ab1fb44a9cade34c97ab6cd1e62c81a87e718101e96de07d78cecda20a3fdb955df958e46671ccad01bb8dcf0de2e298 + checksum: fc645fe20b7bda2680bbf9481a3477257a7f9304b1691036092b97ab04c0ab53e3bf9fcc2d2ae382536568e402ec41fb11e1d4c3836a9abe2d813dd9ef4311e0 languageName: node linkType: hard @@ -4329,7 +4574,7 @@ __metadata: languageName: node linkType: hard -"decompress-response@npm:^3.2.0, decompress-response@npm:^3.3.0": +"decompress-response@npm:^3.3.0": version: 3.3.0 resolution: "decompress-response@npm:3.3.0" dependencies: @@ -4338,12 +4583,21 @@ __metadata: languageName: node linkType: hard -"deep-eql@npm:^3.0.1": - version: 3.0.1 - resolution: "deep-eql@npm:3.0.1" +"decompress-response@npm:^6.0.0": + version: 6.0.0 + resolution: "decompress-response@npm:6.0.0" + dependencies: + mimic-response: ^3.1.0 + checksum: d377cf47e02d805e283866c3f50d3d21578b779731e8c5072d6ce8c13cc31493db1c2f6784da9d1d5250822120cefa44f1deab112d5981015f2e17444b763812 + languageName: node + linkType: hard + +"deep-eql@npm:^4.1.3": + version: 4.1.3 + resolution: "deep-eql@npm:4.1.3" dependencies: type-detect: ^4.0.0 - checksum: 4f4c9fb79eb994fb6e81d4aa8b063adc40c00f831588aa65e20857d5d52f15fb23034a6576ecf886f7ff6222d5ae42e71e9b7d57113e0715b1df7ea1e812b125 + checksum: 7f6d30cb41c713973dc07eaadded848b2ab0b835e518a88b91bea72f34e08c4c71d167a722a6f302d3a6108f05afd8e6d7650689a84d5d29ec7fe6220420397f languageName: node linkType: hard @@ -4362,11 +4616,11 @@ __metadata: linkType: hard "defaults@npm:^1.0.3": - version: 1.0.3 - resolution: "defaults@npm:1.0.3" + version: 1.0.4 + resolution: "defaults@npm:1.0.4" dependencies: clone: ^1.0.2 - checksum: 96e2112da6553d376afd5265ea7cbdb2a3b45535965d71ab8bb1da10c8126d168fdd5268799625324b368356d21ba2a7b3d4ec50961f11a47b7feb9de3d4413e + checksum: 3a88b7a587fc076b84e60affad8b85245c01f60f38fc1d259e7ac1d89eb9ce6abb19e27215de46b98568dd5bc48471730b327637e6f20b0f1bc85cf00440c80a languageName: node linkType: hard @@ -4377,6 +4631,13 @@ __metadata: languageName: node linkType: hard +"defer-to-connect@npm:^2.0.0, defer-to-connect@npm:^2.0.1": + version: 2.0.1 + resolution: "defer-to-connect@npm:2.0.1" + checksum: 8a9b50d2f25446c0bfefb55a48e90afd58f85b21bcf78e9207cd7b804354f6409032a1705c2491686e202e64fc05f147aa5aa45f9aa82627563f045937f5791b + languageName: node + linkType: hard + "deferred-leveldown@npm:~5.3.0": version: 5.3.0 resolution: "deferred-leveldown@npm:5.3.0" @@ -4387,22 +4648,25 @@ __metadata: languageName: node linkType: hard -"define-properties@npm:^1.1.2, define-properties@npm:^1.1.3": - version: 1.1.3 - resolution: "define-properties@npm:1.1.3" +"define-data-property@npm:^1.0.1, define-data-property@npm:^1.1.1": + version: 1.1.1 + resolution: "define-data-property@npm:1.1.1" dependencies: - object-keys: ^1.0.12 - checksum: da80dba55d0cd76a5a7ab71ef6ea0ebcb7b941f803793e4e0257b384cb772038faa0c31659d244e82c4342edef841c1a1212580006a05a5068ee48223d787317 + get-intrinsic: ^1.2.1 + gopd: ^1.0.1 + has-property-descriptors: ^1.0.0 + checksum: a29855ad3f0630ea82e3c5012c812efa6ca3078d5c2aa8df06b5f597c1cde6f7254692df41945851d903e05a1668607b6d34e778f402b9ff9ffb38111f1a3f0d languageName: node linkType: hard -"define-properties@npm:^1.1.4": - version: 1.1.4 - resolution: "define-properties@npm:1.1.4" +"define-properties@npm:^1.1.3, define-properties@npm:^1.2.0, define-properties@npm:^1.2.1": + version: 1.2.1 + resolution: "define-properties@npm:1.2.1" dependencies: + define-data-property: ^1.0.1 has-property-descriptors: ^1.0.0 object-keys: ^1.1.1 - checksum: ce0aef3f9eb193562b5cfb79b2d2c86b6a109dfc9fdcb5f45d680631a1a908c06824ddcdb72b7573b54e26ace07f0a23420aaba0d5c627b34d2c1de8ef527e2b + checksum: b4ccd00597dd46cb2d4a379398f5b19fca84a16f3374e2249201992f36b30f6835949a9429669ee6b41b6e837205a163eadd745e472069e70dfc10f03e5fcc12 languageName: node linkType: hard @@ -4413,13 +4677,6 @@ __metadata: languageName: node linkType: hard -"delegates@npm:^1.0.0": - version: 1.0.0 - resolution: "delegates@npm:1.0.0" - checksum: a51744d9b53c164ba9c0492471a1a2ffa0b6727451bdc89e31627fdf4adda9d51277cfcbfb20f0a6f08ccb3c436f341df3e92631a3440226d93a8971724771fd - languageName: node - linkType: hard - "depd@npm:2.0.0": version: 2.0.0 resolution: "depd@npm:2.0.0" @@ -4427,20 +4684,13 @@ __metadata: languageName: node linkType: hard -"depd@npm:^1.1.2, depd@npm:~1.1.2": - version: 1.1.2 - resolution: "depd@npm:1.1.2" - checksum: 6b406620d269619852885ce15965272b829df6f409724415e0002c8632ab6a8c0a08ec1f0bd2add05dc7bd7507606f7e2cc034fa24224ab829580040b835ecd9 - languageName: node - linkType: hard - "des.js@npm:^1.0.0": - version: 1.0.1 - resolution: "des.js@npm:1.0.1" + version: 1.1.0 + resolution: "des.js@npm:1.1.0" dependencies: inherits: ^2.0.1 minimalistic-assert: ^1.0.0 - checksum: 1ec2eedd7ed6bd61dd5e0519fd4c96124e93bb22de8a9d211b02d63e5dd152824853d919bb2090f965cc0e3eb9c515950a9836b332020d810f9c71feb0fd7df4 + checksum: 0e9c1584b70d31e20f20a613fc9ef60fbc6a147dfec9e448a168794a4b97ac04d8dc47ea008f1fa93b0f8aaf7c1ead632a5e59ce1913a6079d2d244c9f5ebe33 languageName: node linkType: hard @@ -4451,13 +4701,6 @@ __metadata: languageName: node linkType: hard -"destroy@npm:~1.0.4": - version: 1.0.4 - resolution: "destroy@npm:1.0.4" - checksum: da9ab4961dc61677c709da0c25ef01733042614453924d65636a7db37308fef8a24cd1e07172e61173d471ca175371295fbc984b0af5b2b4ff47cd57bd784c03 - languageName: node - linkType: hard - "detect-indent@npm:^6.0.0": version: 6.1.0 resolution: "detect-indent@npm:6.1.0" @@ -4466,32 +4709,32 @@ __metadata: linkType: hard "detect-port@npm:^1.3.0": - version: 1.3.0 - resolution: "detect-port@npm:1.3.0" + version: 1.5.1 + resolution: "detect-port@npm:1.5.1" dependencies: address: ^1.0.1 - debug: ^2.6.0 + debug: 4 bin: - detect: ./bin/detect-port - detect-port: ./bin/detect-port - checksum: 93c40febe714f56711d1fedc2b7a9cc4cbaa0fcddec0509876c46b9dd6099ed6bfd6662a4f35e5fa0301660f48ed516829253ab0fc90b9e79b823dd77786b379 + detect: bin/detect-port.js + detect-port: bin/detect-port.js + checksum: b48da9340481742547263d5d985e65d078592557863402ecf538511735e83575867e94f91fe74405ea19b61351feb99efccae7e55de9a151d5654e3417cea05b languageName: node linkType: hard -"diff@npm:3.5.0, diff@npm:^3.1.0": - version: 3.5.0 - resolution: "diff@npm:3.5.0" - checksum: 00842950a6551e26ce495bdbce11047e31667deea546527902661f25cc2e73358967ebc78cf86b1a9736ec3e14286433225f9970678155753a6291c3bca5227b - languageName: node - linkType: hard - -"diff@npm:5.0.0, diff@npm:^5.0.0": +"diff@npm:5.0.0": version: 5.0.0 resolution: "diff@npm:5.0.0" checksum: f19fe29284b633afdb2725c2a8bb7d25761ea54d321d8e67987ac851c5294be4afeab532bd84531e02583a3fe7f4014aa314a3eda84f5590e7a9e6b371ef3b46 languageName: node linkType: hard +"diff@npm:^3.1.0": + version: 3.5.0 + resolution: "diff@npm:3.5.0" + checksum: 00842950a6551e26ce495bdbce11047e31667deea546527902661f25cc2e73358967ebc78cf86b1a9736ec3e14286433225f9970678155753a6291c3bca5227b + languageName: node + linkType: hard + "diff@npm:^4.0.1": version: 4.0.2 resolution: "diff@npm:4.0.2" @@ -4499,6 +4742,13 @@ __metadata: languageName: node linkType: hard +"diff@npm:^5.0.0": + version: 5.1.0 + resolution: "diff@npm:5.1.0" + checksum: c7bf0df7c9bfbe1cf8a678fd1b2137c4fb11be117a67bc18a0e03ae75105e8533dbfb1cda6b46beb3586ef5aed22143ef9d70713977d5fb1f9114e21455fba90 + languageName: node + linkType: hard + "diffie-hellman@npm:^5.0.0": version: 5.0.3 resolution: "diffie-hellman@npm:5.0.3" @@ -4544,14 +4794,7 @@ __metadata: languageName: node linkType: hard -"dotenv@npm:^16.0.0": - version: 16.0.0 - resolution: "dotenv@npm:16.0.0" - checksum: 664cebb51f0a9a1d1b930f51f0271e72e26d62feaecc9dc03df39453dd494b4e724809ca480fb3ec3213382b1ed3f791aaeb83569a137f9329ce58efd4853dbf - languageName: node - linkType: hard - -"dotenv@npm:^16.1.4": +"dotenv@npm:^16.0.0, dotenv@npm:^16.1.4": version: 16.3.1 resolution: "dotenv@npm:16.3.1" checksum: 15d75e7279018f4bafd0ee9706593dd14455ddb71b3bcba9c52574460b7ccaf67d5cf8b2c08a5af1a9da6db36c956a04a1192b101ee102a3e0cf8817bbcf3dfd @@ -4570,9 +4813,16 @@ __metadata: linkType: hard "duplexer3@npm:^0.1.4": - version: 0.1.4 - resolution: "duplexer3@npm:0.1.4" - checksum: c2fd6969314607d23439c583699aaa43c4100d66b3e161df55dccd731acc57d5c81a64bb4f250805fbe434ddb1d2623fee2386fb890f5886ca1298690ec53415 + version: 0.1.5 + resolution: "duplexer3@npm:0.1.5" + checksum: e677cb4c48f031ca728601d6a20bf6aed4c629d69ef9643cb89c67583d673c4ec9317cc6427501f38bd8c368d3a18f173987cc02bd99d8cf8fe3d94259a22a20 + languageName: node + linkType: hard + +"eastasianwidth@npm:^0.2.0": + version: 0.2.0 + resolution: "eastasianwidth@npm:0.2.0" + checksum: 7d00d7cd8e49b9afa762a813faac332dee781932d6f2c848dc348939c4253f1d4564341b7af1d041853bc3f32c2ef141b58e0a4d9862c17a7f08f68df1e0f1ed languageName: node linkType: hard @@ -4615,13 +4865,6 @@ __metadata: languageName: node linkType: hard -"emoji-regex@npm:^7.0.1": - version: 7.0.3 - resolution: "emoji-regex@npm:7.0.3" - checksum: 9159b2228b1511f2870ac5920f394c7e041715429a68459ebe531601555f11ea782a8e1718f969df2711d38c66268174407cbca57ce36485544f695c2dfdc96e - languageName: node - linkType: hard - "emoji-regex@npm:^8.0.0": version: 8.0.0 resolution: "emoji-regex@npm:8.0.0" @@ -4629,6 +4872,13 @@ __metadata: languageName: node linkType: hard +"emoji-regex@npm:^9.2.2": + version: 9.2.2 + resolution: "emoji-regex@npm:9.2.2" + checksum: 8487182da74aabd810ac6d6f1994111dfc0e331b01271ae01ec1eb0ad7b5ecc2bbbbd2f053c05cb55a1ac30449527d819bbfbf0e3de1023db308cbcb47f86601 + languageName: node + linkType: hard + "encodeurl@npm:~1.0.2": version: 1.0.2 resolution: "encodeurl@npm:1.0.2" @@ -4667,11 +4917,12 @@ __metadata: linkType: hard "enquirer@npm:^2.3.0": - version: 2.3.6 - resolution: "enquirer@npm:2.3.6" + version: 2.4.1 + resolution: "enquirer@npm:2.4.1" dependencies: ansi-colors: ^4.1.1 - checksum: 1c0911e14a6f8d26721c91e01db06092a5f7675159f0261d69c403396a385afd13dd76825e7678f66daffa930cfaa8d45f506fb35f818a2788463d022af1b884 + strip-ansi: ^6.0.1 + checksum: f080f11a74209647dbf347a7c6a83c8a47ae1ebf1e75073a808bc1088eb780aa54075bfecd1bcdb3e3c724520edb8e6ee05da031529436b421b71066fcc48cb5 languageName: node linkType: hard @@ -4709,71 +4960,70 @@ __metadata: languageName: node linkType: hard -"es-abstract@npm:^1.18.5, es-abstract@npm:^1.19.0, es-abstract@npm:^1.19.1": - version: 1.19.2 - resolution: "es-abstract@npm:1.19.2" +"es-abstract@npm:^1.22.1": + version: 1.22.3 + resolution: "es-abstract@npm:1.22.3" dependencies: - call-bind: ^1.0.2 + array-buffer-byte-length: ^1.0.0 + arraybuffer.prototype.slice: ^1.0.2 + available-typed-arrays: ^1.0.5 + call-bind: ^1.0.5 + es-set-tostringtag: ^2.0.1 es-to-primitive: ^1.2.1 - function-bind: ^1.1.1 - get-intrinsic: ^1.1.1 + function.prototype.name: ^1.1.6 + get-intrinsic: ^1.2.2 get-symbol-description: ^1.0.0 - has: ^1.0.3 + globalthis: ^1.0.3 + gopd: ^1.0.1 + has-property-descriptors: ^1.0.0 + has-proto: ^1.0.1 has-symbols: ^1.0.3 - internal-slot: ^1.0.3 - is-callable: ^1.2.4 + hasown: ^2.0.0 + internal-slot: ^1.0.5 + is-array-buffer: ^3.0.2 + is-callable: ^1.2.7 is-negative-zero: ^2.0.2 is-regex: ^1.1.4 - is-shared-array-buffer: ^1.0.1 + is-shared-array-buffer: ^1.0.2 is-string: ^1.0.7 + is-typed-array: ^1.1.12 is-weakref: ^1.0.2 - object-inspect: ^1.12.0 + object-inspect: ^1.13.1 object-keys: ^1.1.1 - object.assign: ^4.1.2 - string.prototype.trimend: ^1.0.4 - string.prototype.trimstart: ^1.0.4 - unbox-primitive: ^1.0.1 - checksum: 4724811fd54b2cea959a8b08e49cd41cc65c77363c37bf5b42dc64a7c730e16a0dca80edc73e46ebf90a8de311622009a5a8dbe47e9f4e129c35f52c5020fe4e + object.assign: ^4.1.4 + regexp.prototype.flags: ^1.5.1 + safe-array-concat: ^1.0.1 + safe-regex-test: ^1.0.0 + string.prototype.trim: ^1.2.8 + string.prototype.trimend: ^1.0.7 + string.prototype.trimstart: ^1.0.7 + typed-array-buffer: ^1.0.0 + typed-array-byte-length: ^1.0.0 + typed-array-byte-offset: ^1.0.0 + typed-array-length: ^1.0.4 + unbox-primitive: ^1.0.2 + which-typed-array: ^1.1.13 + checksum: b1bdc962856836f6e72be10b58dc128282bdf33771c7a38ae90419d920fc3b36cc5d2b70a222ad8016e3fc322c367bf4e9e89fc2bc79b7e933c05b218e83d79a languageName: node linkType: hard -"es-abstract@npm:^1.19.2, es-abstract@npm:^1.19.5": - version: 1.20.1 - resolution: "es-abstract@npm:1.20.1" +"es-set-tostringtag@npm:^2.0.1": + version: 2.0.2 + resolution: "es-set-tostringtag@npm:2.0.2" dependencies: - call-bind: ^1.0.2 - es-to-primitive: ^1.2.1 - function-bind: ^1.1.1 - function.prototype.name: ^1.1.5 - get-intrinsic: ^1.1.1 - get-symbol-description: ^1.0.0 - has: ^1.0.3 - has-property-descriptors: ^1.0.0 - has-symbols: ^1.0.3 - internal-slot: ^1.0.3 - is-callable: ^1.2.4 - is-negative-zero: ^2.0.2 - is-regex: ^1.1.4 - is-shared-array-buffer: ^1.0.2 - is-string: ^1.0.7 - is-weakref: ^1.0.2 - object-inspect: ^1.12.0 - object-keys: ^1.1.1 - object.assign: ^4.1.2 - regexp.prototype.flags: ^1.4.3 - string.prototype.trimend: ^1.0.5 - string.prototype.trimstart: ^1.0.5 - unbox-primitive: ^1.0.2 - checksum: 28da27ae0ed9c76df7ee8ef5c278df79dcfdb554415faf7068bb7c58f8ba8e2a16bfb59e586844be6429ab4c302ca7748979d48442224cb1140b051866d74b7f + get-intrinsic: ^1.2.2 + has-tostringtag: ^1.0.0 + hasown: ^2.0.0 + checksum: afcec3a4c9890ae14d7ec606204858441c801ff84f312538e1d1ccf1e5493c8b17bd672235df785f803756472cb4f2d49b87bde5237aef33411e74c22f194e07 languageName: node linkType: hard "es-shim-unscopables@npm:^1.0.0": - version: 1.0.0 - resolution: "es-shim-unscopables@npm:1.0.0" + version: 1.0.2 + resolution: "es-shim-unscopables@npm:1.0.2" dependencies: - has: ^1.0.3 - checksum: 83e95cadbb6ee44d3644dfad60dcad7929edbc42c85e66c3e99aefd68a3a5c5665f2686885cddb47dfeabfd77bd5ea5a7060f2092a955a729bbd8834f0d86fa1 + hasown: ^2.0.0 + checksum: 432bd527c62065da09ed1d37a3f8e623c423683285e6188108286f4a1e8e164a5bcbfbc0051557c7d14633cd2a41ce24c7048e6bbb66a985413fd32f1be72626 languageName: node linkType: hard @@ -4789,13 +5039,13 @@ __metadata: linkType: hard "es5-ext@npm:^0.10.35, es5-ext@npm:^0.10.50": - version: 0.10.60 - resolution: "es5-ext@npm:0.10.60" + version: 0.10.62 + resolution: "es5-ext@npm:0.10.62" dependencies: es6-iterator: ^2.0.3 es6-symbol: ^3.1.3 next-tick: ^1.1.0 - checksum: 382e7532ef480fbceb6f315bd394fab65aa5b00fbbc4f9adc2144eb1fd27cade6ba4c544289f10c74cf07f4e724a70e5dc374ac1504e667b72495bd244847763 + checksum: 25f42f6068cfc6e393cf670bc5bba249132c5f5ec2dd0ed6e200e6274aca2fed8e9aec8a31c76031744c78ca283c57f0b41c7e737804c6328c7b8d3fbcba7983 languageName: node linkType: hard @@ -4810,6 +5060,13 @@ __metadata: languageName: node linkType: hard +"es6-promise@npm:^4.2.8": + version: 4.2.8 + resolution: "es6-promise@npm:4.2.8" + checksum: 95614a88873611cb9165a85d36afa7268af5c03a378b35ca7bda9508e1d4f1f6f19a788d4bc755b3fd37c8ebba40782018e02034564ff24c9d6fa37e959ad57d + languageName: node + linkType: hard + "es6-symbol@npm:^3.1.1, es6-symbol@npm:^3.1.3": version: 3.1.3 resolution: "es6-symbol@npm:3.1.3" @@ -4834,13 +5091,6 @@ __metadata: languageName: node linkType: hard -"escape-string-regexp@npm:1.0.5, escape-string-regexp@npm:^1.0.5": - version: 1.0.5 - resolution: "escape-string-regexp@npm:1.0.5" - checksum: 6092fda75c63b110c706b6a9bfde8a612ad595b628f0bd2147eea1d3406723020810e591effc7db1da91d80a71a737a313567c5abb3813e8d9c71f4aa595b410 - languageName: node - linkType: hard - "escape-string-regexp@npm:4.0.0, escape-string-regexp@npm:^4.0.0": version: 4.0.0 resolution: "escape-string-regexp@npm:4.0.0" @@ -4848,6 +5098,13 @@ __metadata: languageName: node linkType: hard +"escape-string-regexp@npm:^1.0.5": + version: 1.0.5 + resolution: "escape-string-regexp@npm:1.0.5" + checksum: 6092fda75c63b110c706b6a9bfde8a612ad595b628f0bd2147eea1d3406723020810e591effc7db1da91d80a71a737a313567c5abb3813e8d9c71f4aa595b410 + languageName: node + linkType: hard + "escodegen@npm:1.8.x": version: 1.8.1 resolution: "escodegen@npm:1.8.1" @@ -4868,35 +5125,36 @@ __metadata: linkType: hard "eslint-config-prettier@npm:^8.5.0": - version: 8.5.0 - resolution: "eslint-config-prettier@npm:8.5.0" + version: 8.10.0 + resolution: "eslint-config-prettier@npm:8.10.0" peerDependencies: eslint: ">=7.0.0" bin: eslint-config-prettier: bin/cli.js - checksum: 0d0f5c32e7a0ad91249467ce71ca92394ccd343178277d318baf32063b79ea90216f4c81d1065d60f96366fdc60f151d4d68ae7811a58bd37228b84c2083f893 + checksum: 153266badd477e49b0759816246b2132f1dbdb6c7f313ca60a9af5822fd1071c2bc5684a3720d78b725452bbac04bb130878b2513aea5e72b1b792de5a69fec8 languageName: node linkType: hard "eslint-config-standard@npm:^17.0.0": - version: 17.0.0 - resolution: "eslint-config-standard@npm:17.0.0" + version: 17.1.0 + resolution: "eslint-config-standard@npm:17.1.0" peerDependencies: eslint: ^8.0.1 eslint-plugin-import: ^2.25.2 - eslint-plugin-n: ^15.0.0 + eslint-plugin-n: "^15.0.0 || ^16.0.0 " eslint-plugin-promise: ^6.0.0 - checksum: dc0ed51e186fd963ff2c0819d33ef580afce11b11036cbcf5e74427e26e514c2b1be96b8ffe74fd2fd00263554a0d49cc873fcf76f17c3dfdba614b45d7fd7da + checksum: 8ed14ffe424b8a7e67b85e44f75c46dc4c6954f7c474c871c56fb0daf40b6b2a7af2db55102b12a440158b2be898e1fb8333b05e3dbeaeaef066fdbc863eaa88 languageName: node linkType: hard -"eslint-import-resolver-node@npm:^0.3.6": - version: 0.3.6 - resolution: "eslint-import-resolver-node@npm:0.3.6" +"eslint-import-resolver-node@npm:^0.3.9": + version: 0.3.9 + resolution: "eslint-import-resolver-node@npm:0.3.9" dependencies: debug: ^3.2.7 - resolve: ^1.20.0 - checksum: 6266733af1e112970e855a5bcc2d2058fb5ae16ad2a6d400705a86b29552b36131ffc5581b744c23d550de844206fb55e9193691619ee4dbf225c4bde526b1c8 + is-core-module: ^2.13.0 + resolve: ^1.22.4 + checksum: 439b91271236b452d478d0522a44482e8c8540bf9df9bd744062ebb89ab45727a3acd03366a6ba2bdbcde8f9f718bab7fe8db64688aca75acf37e04eafd25e22 languageName: node linkType: hard @@ -4916,13 +5174,15 @@ __metadata: languageName: node linkType: hard -"eslint-module-utils@npm:^2.7.3": - version: 2.7.3 - resolution: "eslint-module-utils@npm:2.7.3" +"eslint-module-utils@npm:^2.8.0": + version: 2.8.0 + resolution: "eslint-module-utils@npm:2.8.0" dependencies: debug: ^3.2.7 - find-up: ^2.1.0 - checksum: 77048263f309167a1e6a1e1b896bfb5ddd1d3859b2e2abbd9c32c432aee13d610d46e6820b1ca81b37fba437cf423a404bc6649be64ace9148a3062d1886a678 + peerDependenciesMeta: + eslint: + optional: true + checksum: 74c6dfea7641ebcfe174be61168541a11a14aa8d72e515f5f09af55cd0d0862686104b0524aa4b8e0ce66418a44aa38a94d2588743db5fd07a6b49ffd16921d2 languageName: node linkType: hard @@ -4939,25 +5199,29 @@ __metadata: linkType: hard "eslint-plugin-import@npm:^2.26.0": - version: 2.26.0 - resolution: "eslint-plugin-import@npm:2.26.0" + version: 2.29.0 + resolution: "eslint-plugin-import@npm:2.29.0" dependencies: - array-includes: ^3.1.4 - array.prototype.flat: ^1.2.5 - debug: ^2.6.9 + array-includes: ^3.1.7 + array.prototype.findlastindex: ^1.2.3 + array.prototype.flat: ^1.3.2 + array.prototype.flatmap: ^1.3.2 + debug: ^3.2.7 doctrine: ^2.1.0 - eslint-import-resolver-node: ^0.3.6 - eslint-module-utils: ^2.7.3 - has: ^1.0.3 - is-core-module: ^2.8.1 + eslint-import-resolver-node: ^0.3.9 + eslint-module-utils: ^2.8.0 + hasown: ^2.0.0 + is-core-module: ^2.13.1 is-glob: ^4.0.3 minimatch: ^3.1.2 - object.values: ^1.1.5 - resolve: ^1.22.0 - tsconfig-paths: ^3.14.1 + object.fromentries: ^2.0.7 + object.groupby: ^1.0.1 + object.values: ^1.1.7 + semver: ^6.3.1 + tsconfig-paths: ^3.14.2 peerDependencies: eslint: ^2 || ^3 || ^4 || ^5 || ^6 || ^7.2.0 || ^8 - checksum: 0bf77ad80339554481eafa2b1967449e1f816b94c7a6f9614ce33fb4083c4e6c050f10d241dd50b4975d47922880a34de1e42ea9d8e6fd663ebb768baa67e655 + checksum: 19ee541fb95eb7a796f3daebe42387b8d8262bbbcc4fd8a6e92f63a12035f3d2c6cb8bc0b6a70864fa14b1b50ed6b8e6eed5833e625e16cb6bb98b665beff269 languageName: node linkType: hard @@ -4978,8 +5242,8 @@ __metadata: linkType: hard "eslint-plugin-prettier@npm:^4.0.0": - version: 4.0.0 - resolution: "eslint-plugin-prettier@npm:4.0.0" + version: 4.2.1 + resolution: "eslint-plugin-prettier@npm:4.2.1" dependencies: prettier-linter-helpers: ^1.0.0 peerDependencies: @@ -4988,16 +5252,16 @@ __metadata: peerDependenciesMeta: eslint-config-prettier: optional: true - checksum: 03d69177a3c21fa2229c7e427ce604429f0b20ab7f411e2e824912f572a207c7f5a41fd1f0a95b9b8afe121e291c1b1f1dc1d44c7aad4b0837487f9c19f5210d + checksum: b9e839d2334ad8ec7a5589c5cb0f219bded260839a857d7a486997f9870e95106aa59b8756ff3f37202085ebab658de382b0267cae44c3a7f0eb0bcc03a4f6d6 languageName: node linkType: hard "eslint-plugin-promise@npm:^6.0.0": - version: 6.0.0 - resolution: "eslint-plugin-promise@npm:6.0.0" + version: 6.1.1 + resolution: "eslint-plugin-promise@npm:6.1.1" peerDependencies: eslint: ^7.0.0 || ^8.0.0 - checksum: 7e761507c51267b77e4ad710e7c8938aa4f8f69b975886034e57497a1816e9527eda364e25aac03d1b4e0df2e738ba98e49ad075d028824fcfea533a1419751c + checksum: 46b9a4f79dae5539987922afc27cc17cbccdecf4f0ba19c0ccbf911b0e31853e9f39d9959eefb9637461b52772afa1a482f1f87ff16c1ba38bdb6fcf21897e9a languageName: node linkType: hard @@ -5047,13 +5311,13 @@ __metadata: languageName: node linkType: hard -"eslint-scope@npm:^7.1.1": - version: 7.1.1 - resolution: "eslint-scope@npm:7.1.1" +"eslint-scope@npm:^7.2.2": + version: 7.2.2 + resolution: "eslint-scope@npm:7.2.2" dependencies: esrecurse: ^4.3.0 estraverse: ^5.2.0 - checksum: 9f6e974ab2db641ca8ab13508c405b7b859e72afe9f254e8131ff154d2f40c99ad4545ce326fd9fde3212ff29707102562a4834f1c48617b35d98c71a97fbf3e + checksum: ec97dbf5fb04b94e8f4c5a91a7f0a6dd3c55e46bfc7bbcd0e3138c3a76977570e02ed89a1810c778dcd72072ff0e9621ba1379b4babe53921d71e2e4486fda3e languageName: node linkType: hard @@ -5066,17 +5330,6 @@ __metadata: languageName: node linkType: hard -"eslint-utils@npm:^3.0.0": - version: 3.0.0 - resolution: "eslint-utils@npm:3.0.0" - dependencies: - eslint-visitor-keys: ^2.0.0 - peerDependencies: - eslint: ">=5" - checksum: 0668fe02f5adab2e5a367eee5089f4c39033af20499df88fe4e6aba2015c20720404d8c3d6349b6f716b08fdf91b9da4e5d5481f265049278099c4c836ccb619 - languageName: node - linkType: hard - "eslint-visitor-keys@npm:^1.1.0": version: 1.3.0 resolution: "eslint-visitor-keys@npm:1.3.0" @@ -5084,62 +5337,58 @@ __metadata: languageName: node linkType: hard -"eslint-visitor-keys@npm:^2.0.0": - version: 2.1.0 - resolution: "eslint-visitor-keys@npm:2.1.0" - checksum: e3081d7dd2611a35f0388bbdc2f5da60b3a3c5b8b6e928daffff7391146b434d691577aa95064c8b7faad0b8a680266bcda0a42439c18c717b80e6718d7e267d - languageName: node - linkType: hard - -"eslint-visitor-keys@npm:^3.0.0, eslint-visitor-keys@npm:^3.3.0": - version: 3.3.0 - resolution: "eslint-visitor-keys@npm:3.3.0" - checksum: d59e68a7c5a6d0146526b0eec16ce87fbf97fe46b8281e0d41384224375c4e52f5ffb9e16d48f4ea50785cde93f766b0c898e31ab89978d88b0e1720fbfb7808 +"eslint-visitor-keys@npm:^3.3.0, eslint-visitor-keys@npm:^3.4.1, eslint-visitor-keys@npm:^3.4.3": + version: 3.4.3 + resolution: "eslint-visitor-keys@npm:3.4.3" + checksum: 36e9ef87fca698b6fd7ca5ca35d7b2b6eeaaf106572e2f7fd31c12d3bfdaccdb587bba6d3621067e5aece31c8c3a348b93922ab8f7b2cbc6aaab5e1d89040c60 languageName: node linkType: hard "eslint@npm:^8.13.0": - version: 8.13.0 - resolution: "eslint@npm:8.13.0" - dependencies: - "@eslint/eslintrc": ^1.2.1 - "@humanwhocodes/config-array": ^0.9.2 - ajv: ^6.10.0 + version: 8.55.0 + resolution: "eslint@npm:8.55.0" + dependencies: + "@eslint-community/eslint-utils": ^4.2.0 + "@eslint-community/regexpp": ^4.6.1 + "@eslint/eslintrc": ^2.1.4 + "@eslint/js": 8.55.0 + "@humanwhocodes/config-array": ^0.11.13 + "@humanwhocodes/module-importer": ^1.0.1 + "@nodelib/fs.walk": ^1.2.8 + "@ungap/structured-clone": ^1.2.0 + ajv: ^6.12.4 chalk: ^4.0.0 cross-spawn: ^7.0.2 debug: ^4.3.2 doctrine: ^3.0.0 escape-string-regexp: ^4.0.0 - eslint-scope: ^7.1.1 - eslint-utils: ^3.0.0 - eslint-visitor-keys: ^3.3.0 - espree: ^9.3.1 - esquery: ^1.4.0 + eslint-scope: ^7.2.2 + eslint-visitor-keys: ^3.4.3 + espree: ^9.6.1 + esquery: ^1.4.2 esutils: ^2.0.2 fast-deep-equal: ^3.1.3 file-entry-cache: ^6.0.1 - functional-red-black-tree: ^1.0.1 - glob-parent: ^6.0.1 - globals: ^13.6.0 + find-up: ^5.0.0 + glob-parent: ^6.0.2 + globals: ^13.19.0 + graphemer: ^1.4.0 ignore: ^5.2.0 - import-fresh: ^3.0.0 imurmurhash: ^0.1.4 is-glob: ^4.0.0 + is-path-inside: ^3.0.3 js-yaml: ^4.1.0 json-stable-stringify-without-jsonify: ^1.0.1 levn: ^0.4.1 lodash.merge: ^4.6.2 - minimatch: ^3.0.4 + minimatch: ^3.1.2 natural-compare: ^1.4.0 - optionator: ^0.9.1 - regexpp: ^3.2.0 + optionator: ^0.9.3 strip-ansi: ^6.0.1 - strip-json-comments: ^3.1.0 text-table: ^0.2.0 - v8-compile-cache: ^2.0.3 bin: eslint: bin/eslint.js - checksum: bc7d2fc9a046d42cb2c8987573ecaf534c1fae14747c4695e32388e179c5f21b83eefdb3e4f35924bf76152e226d7cc9dfb21f12348baf12c803109005b17439 + checksum: 83f82a604559dc1faae79d28fdf3dfc9e592ca221052e2ea516e1b379b37e77e4597705a16880e2f5ece4f79087c1dd13fd7f6e9746f794a401175519db18b41 languageName: node linkType: hard @@ -5154,14 +5403,14 @@ __metadata: languageName: node linkType: hard -"espree@npm:^9.3.1": - version: 9.3.1 - resolution: "espree@npm:9.3.1" +"espree@npm:^9.6.0, espree@npm:^9.6.1": + version: 9.6.1 + resolution: "espree@npm:9.6.1" dependencies: - acorn: ^8.7.0 - acorn-jsx: ^5.3.1 - eslint-visitor-keys: ^3.3.0 - checksum: d7161db30b65427e0799383699ac4c441533a38faee005153694b68b933ba7a24666680edfc490fa77e3a84a22dbd955768034a6f811af5049774eead83063a5 + acorn: ^8.9.0 + acorn-jsx: ^5.3.2 + eslint-visitor-keys: ^3.4.1 + checksum: eb8c149c7a2a77b3f33a5af80c10875c3abd65450f60b8af6db1bfcfa8f101e21c1e56a561c6dc13b848e18148d43469e7cd208506238554fb5395a9ea5a1ab9 languageName: node linkType: hard @@ -5185,12 +5434,12 @@ __metadata: languageName: node linkType: hard -"esquery@npm:^1.4.0": - version: 1.4.0 - resolution: "esquery@npm:1.4.0" +"esquery@npm:^1.4.2": + version: 1.5.0 + resolution: "esquery@npm:1.5.0" dependencies: estraverse: ^5.1.0 - checksum: a0807e17abd7fbe5fbd4fab673038d6d8a50675cdae6b04fbaa520c34581be0c5fa24582990e8acd8854f671dd291c78bb2efb9e0ed5b62f33bac4f9cf820210 + checksum: aefb0d2596c230118656cd4ec7532d447333a410a48834d80ea648b1e7b5c9bc9ed8b5e33a89cb04e487b60d622f44cf5713bf4abed7c97343edefdc84a35900 languageName: node linkType: hard @@ -5248,23 +5497,21 @@ __metadata: languageName: node linkType: hard -"eth-gas-reporter@npm:^0.2.24": - version: 0.2.25 - resolution: "eth-gas-reporter@npm:0.2.25" +"eth-gas-reporter@npm:^0.2.25": + version: 0.2.27 + resolution: "eth-gas-reporter@npm:0.2.27" dependencies: - "@ethersproject/abi": ^5.0.0-beta.146 "@solidity-parser/parser": ^0.14.0 + axios: ^1.5.1 cli-table3: ^0.5.0 colors: 1.4.0 ethereum-cryptography: ^1.0.3 - ethers: ^4.0.40 + ethers: ^5.7.2 fs-readdir-recursive: ^1.1.0 lodash: ^4.17.14 markdown-table: ^1.1.3 - mocha: ^7.1.1 + mocha: ^10.2.0 req-cwd: ^2.0.0 - request: ^2.88.0 - request-promise-native: ^1.0.5 sha1: ^1.1.1 sync-request: ^6.0.0 peerDependencies: @@ -5272,7 +5519,7 @@ __metadata: peerDependenciesMeta: "@codechecks/client": optional: true - checksum: 3bfa81e554b069bb817f2a073a601a0429e6b582c56ad99db0727dc2a102ab00fc27888820b8a042a194a8fb7d40954d10cd7b011ede6b8170285d2d5a88666c + checksum: 9a26a4936693de6dbe633a9e6f9d69eb93c9d45c61ecbc20702a72f15ade424785e29ae8e62ea3a2afc49ea22a4777a71914dc8da1b8587e9d47d085a3246784 languageName: node linkType: hard @@ -5334,24 +5581,36 @@ __metadata: linkType: hard "ethereum-cryptography@npm:^1.0.3": - version: 1.0.3 - resolution: "ethereum-cryptography@npm:1.0.3" + version: 1.2.0 + resolution: "ethereum-cryptography@npm:1.2.0" + dependencies: + "@noble/hashes": 1.2.0 + "@noble/secp256k1": 1.7.1 + "@scure/bip32": 1.1.5 + "@scure/bip39": 1.1.1 + checksum: 97e8e8253cb9f5a9271bd0201c37609c451c890eb85883b9c564f14743c3d7c673287406c93bf5604307593ee298ad9a03983388b85c11ca61461b9fc1a4f2c7 + languageName: node + linkType: hard + +"ethereum-cryptography@npm:^2.0.0, ethereum-cryptography@npm:^2.1.2": + version: 2.1.2 + resolution: "ethereum-cryptography@npm:2.1.2" dependencies: - "@noble/hashes": 1.0.0 - "@noble/secp256k1": 1.5.5 - "@scure/bip32": 1.0.1 - "@scure/bip39": 1.0.0 - checksum: a461a50975626a3061a3775046713ebf48f37b6a61fbaec46d8a070e3fd6e982edba754bd2f9f58b11f46ad4d7fad9b18ae614cfc42e619c00cc6e3d31cee10d + "@noble/curves": 1.1.0 + "@noble/hashes": 1.3.1 + "@scure/bip32": 1.3.1 + "@scure/bip39": 1.2.1 + checksum: 2e8f7b8cc90232ae838ab6a8167708e8362621404d26e79b5d9e762c7b53d699f7520aff358d9254de658fcd54d2d0af168ff909943259ed27dc4cef2736410c languageName: node linkType: hard "ethereum-waffle@npm:^4.0.9": - version: 4.0.9 - resolution: "ethereum-waffle@npm:4.0.9" + version: 4.0.10 + resolution: "ethereum-waffle@npm:4.0.10" dependencies: - "@ethereum-waffle/chai": 4.0.9 + "@ethereum-waffle/chai": 4.0.10 "@ethereum-waffle/compiler": 4.0.3 - "@ethereum-waffle/mock-contract": 4.0.3 + "@ethereum-waffle/mock-contract": 4.0.4 "@ethereum-waffle/provider": 4.0.5 solc: 0.8.15 typechain: ^8.0.0 @@ -5359,7 +5618,7 @@ __metadata: ethers: "*" bin: waffle: bin/waffle - checksum: a61a03f444eea75c4f1d1d9a98a7d0059b498da96c52639e1445c591a8fc67e48b07166d6f7523160c19485c6b03350521119c47648c6b46b8368ac75c24450b + checksum: 680df4f5cf61f2f64b740d7724323e0872b1b1462e7ee2f1de6a1c9732155b28c4ac25c669ba557f72e1bb20204f81696a1fd543aece03654d71a9d9ebe1fc53 languageName: node linkType: hard @@ -5401,20 +5660,7 @@ __metadata: languageName: node linkType: hard -"ethereumjs-util@npm:^7.0.10, ethereumjs-util@npm:^7.1.0, ethereumjs-util@npm:^7.1.1, ethereumjs-util@npm:^7.1.4": - version: 7.1.4 - resolution: "ethereumjs-util@npm:7.1.4" - dependencies: - "@types/bn.js": ^5.1.0 - bn.js: ^5.1.2 - create-hash: ^1.1.2 - ethereum-cryptography: ^0.1.3 - rlp: ^2.2.4 - checksum: ccfd9208bfe9205af124a9138c5a90db46cd2fcacf4b80f17f67915381c03253aa2fb90ead9e0b53d9a6fcfeed4310e5dfa8dc516ca2846d16baf81d605cd8c2 - languageName: node - linkType: hard - -"ethereumjs-util@npm:^7.1.3, ethereumjs-util@npm:^7.1.5": +"ethereumjs-util@npm:^7.0.10, ethereumjs-util@npm:^7.1.0, ethereumjs-util@npm:^7.1.1, ethereumjs-util@npm:^7.1.2, ethereumjs-util@npm:^7.1.3, ethereumjs-util@npm:^7.1.4, ethereumjs-util@npm:^7.1.5": version: 7.1.5 resolution: "ethereumjs-util@npm:7.1.5" dependencies: @@ -5480,7 +5726,7 @@ __metadata: languageName: node linkType: hard -"ethers@npm:^4.0.32, ethers@npm:^4.0.40": +"ethers@npm:^4.0.32": version: 4.0.49 resolution: "ethers@npm:4.0.49" dependencies: @@ -5497,6 +5743,44 @@ __metadata: languageName: node linkType: hard +"ethers@npm:^5.7.2": + version: 5.7.2 + resolution: "ethers@npm:5.7.2" + dependencies: + "@ethersproject/abi": 5.7.0 + "@ethersproject/abstract-provider": 5.7.0 + "@ethersproject/abstract-signer": 5.7.0 + "@ethersproject/address": 5.7.0 + "@ethersproject/base64": 5.7.0 + "@ethersproject/basex": 5.7.0 + "@ethersproject/bignumber": 5.7.0 + "@ethersproject/bytes": 5.7.0 + "@ethersproject/constants": 5.7.0 + "@ethersproject/contracts": 5.7.0 + "@ethersproject/hash": 5.7.0 + "@ethersproject/hdnode": 5.7.0 + "@ethersproject/json-wallets": 5.7.0 + "@ethersproject/keccak256": 5.7.0 + "@ethersproject/logger": 5.7.0 + "@ethersproject/networks": 5.7.1 + "@ethersproject/pbkdf2": 5.7.0 + "@ethersproject/properties": 5.7.0 + "@ethersproject/providers": 5.7.2 + "@ethersproject/random": 5.7.0 + "@ethersproject/rlp": 5.7.0 + "@ethersproject/sha2": 5.7.0 + "@ethersproject/signing-key": 5.7.0 + "@ethersproject/solidity": 5.7.0 + "@ethersproject/strings": 5.7.0 + "@ethersproject/transactions": 5.7.0 + "@ethersproject/units": 5.7.0 + "@ethersproject/wallet": 5.7.0 + "@ethersproject/web": 5.7.1 + "@ethersproject/wordlists": 5.7.0 + checksum: b7c08cf3e257185a7946117dbbf764433b7ba0e77c27298dec6088b3bc871aff711462b0621930c56880ff0a7ceb8b1d3a361ffa259f93377b48e34107f62553 + languageName: node + linkType: hard + "ethjs-unit@npm:0.1.6": version: 0.1.6 resolution: "ethjs-unit@npm:0.1.6" @@ -5542,50 +5826,58 @@ __metadata: languageName: node linkType: hard +"exponential-backoff@npm:^3.1.1": + version: 3.1.1 + resolution: "exponential-backoff@npm:3.1.1" + checksum: 3d21519a4f8207c99f7457287291316306255a328770d320b401114ec8481986e4e467e854cb9914dd965e0a1ca810a23ccb559c642c88f4c7f55c55778a9b48 + languageName: node + linkType: hard + "express@npm:^4.14.0": - version: 4.17.3 - resolution: "express@npm:4.17.3" + version: 4.18.2 + resolution: "express@npm:4.18.2" dependencies: accepts: ~1.3.8 array-flatten: 1.1.1 - body-parser: 1.19.2 + body-parser: 1.20.1 content-disposition: 0.5.4 content-type: ~1.0.4 - cookie: 0.4.2 + cookie: 0.5.0 cookie-signature: 1.0.6 debug: 2.6.9 - depd: ~1.1.2 + depd: 2.0.0 encodeurl: ~1.0.2 escape-html: ~1.0.3 etag: ~1.8.1 - finalhandler: ~1.1.2 + finalhandler: 1.2.0 fresh: 0.5.2 + http-errors: 2.0.0 merge-descriptors: 1.0.1 methods: ~1.1.2 - on-finished: ~2.3.0 + on-finished: 2.4.1 parseurl: ~1.3.3 path-to-regexp: 0.1.7 proxy-addr: ~2.0.7 - qs: 6.9.7 + qs: 6.11.0 range-parser: ~1.2.1 safe-buffer: 5.2.1 - send: 0.17.2 - serve-static: 1.14.2 + send: 0.18.0 + serve-static: 1.15.0 setprototypeof: 1.2.0 - statuses: ~1.5.0 + statuses: 2.0.1 type-is: ~1.6.18 utils-merge: 1.0.1 vary: ~1.1.2 - checksum: 967e53b74a37eafdf9789b9938c8df86102928b4985b1ad5e385c709deeab405a364de95ca744bc2cc5d05b5d9cc1efc69ae2ae17688a462038648d5a924bfad + checksum: 3c4b9b076879442f6b968fe53d85d9f1eeacbb4f4c41e5f16cc36d77ce39a2b0d81b3f250514982110d815b2f7173f5561367f9110fcc541f9371948e8c8b037 languageName: node linkType: hard "ext@npm:^1.1.2": - version: 1.6.0 - resolution: "ext@npm:1.6.0" + version: 1.7.0 + resolution: "ext@npm:1.7.0" dependencies: - type: ^2.5.0 - checksum: ca3ef4619e838f441a92238a98b77ac873da2175ace746c64303ffe2c3208e79a3acf3bf7004e40b720f3c2a83bf0143e6dd4a7cdfae6e73f54a3bfc7a14b5c2 + type: ^2.7.2 + checksum: ef481f9ef45434d8c867cfd09d0393b60945b7c8a1798bedc4514cb35aac342ccb8d8ecb66a513e6a2b4ec1e294a338e3124c49b29736f8e7c735721af352c31 languageName: node linkType: hard @@ -5636,22 +5928,22 @@ __metadata: linkType: hard "fast-diff@npm:^1.1.2": - version: 1.2.0 - resolution: "fast-diff@npm:1.2.0" - checksum: 1b5306eaa9e826564d9e5ffcd6ebd881eb5f770b3f977fcbf38f05c824e42172b53c79920e8429c54eb742ce15a0caf268b0fdd5b38f6de52234c4a8368131ae + version: 1.3.0 + resolution: "fast-diff@npm:1.3.0" + checksum: d22d371b994fdc8cce9ff510d7b8dc4da70ac327bcba20df607dd5b9cae9f908f4d1028f5fe467650f058d1e7270235ae0b8230809a262b4df587a3b3aa216c3 languageName: node linkType: hard "fast-glob@npm:^3.0.3, fast-glob@npm:^3.2.9": - version: 3.2.11 - resolution: "fast-glob@npm:3.2.11" + version: 3.3.2 + resolution: "fast-glob@npm:3.3.2" dependencies: "@nodelib/fs.stat": ^2.0.2 "@nodelib/fs.walk": ^1.2.3 glob-parent: ^5.1.2 merge2: ^1.3.0 micromatch: ^4.0.4 - checksum: f473105324a7780a20c06de842e15ddbb41d3cb7e71d1e4fe6e8373204f22245d54f5ab9e2061e6a1c613047345954d29b022e0e76f5c28b1df9858179a0e6d7 + checksum: 900e4979f4dbc3313840078419245621259f349950411ca2fa445a2f9a1a6d98c3b5e7e0660c5ccd563aa61abe133a21765c6c0dec8e57da1ba71d8000b05ec1 languageName: node linkType: hard @@ -5670,11 +5962,11 @@ __metadata: linkType: hard "fastq@npm:^1.6.0": - version: 1.13.0 - resolution: "fastq@npm:1.13.0" + version: 1.15.0 + resolution: "fastq@npm:1.15.0" dependencies: reusify: ^1.0.4 - checksum: 32cf15c29afe622af187d12fc9cd93e160a0cb7c31a3bb6ace86b7dea3b28e7b72acde89c882663f307b2184e14782c6c664fa315973c03626c7d4bff070bb0b + checksum: 0170e6bfcd5d57a70412440b8ef600da6de3b2a6c5966aeaf0a852d542daff506a0ee92d6de7679d1de82e644bce69d7a574a6c93f0b03964b5337eed75ada1a languageName: node linkType: hard @@ -5712,18 +6004,18 @@ __metadata: languageName: node linkType: hard -"finalhandler@npm:~1.1.2": - version: 1.1.2 - resolution: "finalhandler@npm:1.1.2" +"finalhandler@npm:1.2.0": + version: 1.2.0 + resolution: "finalhandler@npm:1.2.0" dependencies: debug: 2.6.9 encodeurl: ~1.0.2 escape-html: ~1.0.3 - on-finished: ~2.3.0 + on-finished: 2.4.1 parseurl: ~1.3.3 - statuses: ~1.5.0 + statuses: 2.0.1 unpipe: ~1.0.0 - checksum: 617880460c5138dd7ccfd555cb5dde4d8f170f4b31b8bd51e4b646bb2946c30f7db716428a1f2882d730d2b72afb47d1f67cc487b874cb15426f95753a88965e + checksum: 92effbfd32e22a7dff2994acedbd9bcc3aa646a3e919ea6a53238090e87097f8ef07cced90aa2cc421abdf993aefbdd5b00104d55c7c5479a8d00ed105b45716 languageName: node linkType: hard @@ -5736,15 +6028,6 @@ __metadata: languageName: node linkType: hard -"find-up@npm:3.0.0, find-up@npm:^3.0.0": - version: 3.0.0 - resolution: "find-up@npm:3.0.0" - dependencies: - locate-path: ^3.0.0 - checksum: 38eba3fe7a66e4bc7f0f5a1366dc25508b7cfc349f852640e3678d26ad9a6d7e2c43eff0a472287de4a9753ef58f066a0ea892a256fa3636ad51b3fe1e17fae9 - languageName: node - linkType: hard - "find-up@npm:5.0.0, find-up@npm:^5.0.0": version: 5.0.0 resolution: "find-up@npm:5.0.0" @@ -5785,23 +6068,13 @@ __metadata: linkType: hard "flat-cache@npm:^3.0.4": - version: 3.0.4 - resolution: "flat-cache@npm:3.0.4" + version: 3.2.0 + resolution: "flat-cache@npm:3.2.0" dependencies: - flatted: ^3.1.0 + flatted: ^3.2.9 + keyv: ^4.5.3 rimraf: ^3.0.2 - checksum: 4fdd10ecbcbf7d520f9040dd1340eb5dfe951e6f0ecf2252edeec03ee68d989ec8b9a20f4434270e71bcfd57800dc09b3344fca3966b2eb8f613072c7d9a2365 - languageName: node - linkType: hard - -"flat@npm:^4.1.0": - version: 4.1.1 - resolution: "flat@npm:4.1.1" - dependencies: - is-buffer: ~2.0.3 - bin: - flat: cli.js - checksum: 398be12185eb0f3c59797c3670a8c35d07020b673363175676afbaf53d6b213660e060488554cf82c25504986e1a6059bdbcc5d562e87ca3e972e8a33148e3ae + checksum: e7e0f59801e288b54bee5cb9681e9ee21ee28ef309f886b312c9d08415b79fc0f24ac842f84356ce80f47d6a53de62197ce0e6e148dc42d5db005992e2a756ec languageName: node linkType: hard @@ -5814,27 +6087,39 @@ __metadata: languageName: node linkType: hard -"flatted@npm:^3.1.0": - version: 3.2.5 - resolution: "flatted@npm:3.2.5" - checksum: 3c436e9695ccca29620b4be5671dd72e5dd0a7500e0856611b7ca9bd8169f177f408c3b9abfa78dfe1493ee2d873e2c119080a8a9bee4e1a186a9e60ca6c89f1 +"flatted@npm:^3.2.9": + version: 3.2.9 + resolution: "flatted@npm:3.2.9" + checksum: f14167fbe26a9d20f6fca8d998e8f1f41df72c8e81f9f2c9d61ed2bea058248f5e1cbd05e7f88c0e5087a6a0b822a1e5e2b446e879f3cfbe0b07ba2d7f80b026 languageName: node linkType: hard -"follow-redirects@npm:^1.12.1": - version: 1.14.9 - resolution: "follow-redirects@npm:1.14.9" +"follow-redirects@npm:^1.12.1, follow-redirects@npm:^1.15.0": + version: 1.15.3 + resolution: "follow-redirects@npm:1.15.3" peerDependenciesMeta: debug: optional: true - checksum: f5982e0eb481818642492d3ca35a86989c98af1128b8e1a62911a3410621bc15d2b079e8170b35b19d3bdee770b73ed431a257ed86195af773771145baa57845 + checksum: 584da22ec5420c837bd096559ebfb8fe69d82512d5585004e36a3b4a6ef6d5905780e0c74508c7b72f907d1fa2b7bd339e613859e9c304d0dc96af2027fd0231 languageName: node linkType: hard -"foreach@npm:^2.0.5": - version: 2.0.5 - resolution: "foreach@npm:2.0.5" - checksum: dab4fbfef0b40b69ee5eab81bcb9626b8fa8b3469c8cfa26480f3e5e1ee08c40eae07048c9a967c65aeda26e774511ccc70b3f10a604c01753c6ef24361f0fc8 +"for-each@npm:^0.3.3": + version: 0.3.3 + resolution: "for-each@npm:0.3.3" + dependencies: + is-callable: ^1.1.3 + checksum: 6c48ff2bc63362319c65e2edca4a8e1e3483a2fabc72fbe7feaf8c73db94fc7861bd53bc02c8a66a0c1dd709da6b04eec42e0abdd6b40ce47305ae92a25e5d28 + languageName: node + linkType: hard + +"foreground-child@npm:^3.1.0": + version: 3.1.1 + resolution: "foreground-child@npm:3.1.1" + dependencies: + cross-spawn: ^7.0.0 + signal-exit: ^4.0.1 + checksum: 139d270bc82dc9e6f8bc045fe2aae4001dc2472157044fdfad376d0a3457f77857fa883c1c8b21b491c6caade9a926a4bed3d3d2e8d3c9202b151a4cbbd0bcd5 languageName: node linkType: hard @@ -5845,6 +6130,13 @@ __metadata: languageName: node linkType: hard +"form-data-encoder@npm:1.7.1": + version: 1.7.1 + resolution: "form-data-encoder@npm:1.7.1" + checksum: a2a360d5588a70d323c12a140c3db23a503a38f0a5d141af1efad579dde9f9fff2e49e5f31f378cb4631518c1ab4a826452c92f0d2869e954b6b2d77b05613e1 + languageName: node + linkType: hard + "form-data@npm:^2.2.0": version: 2.5.1 resolution: "form-data@npm:2.5.1" @@ -5856,14 +6148,14 @@ __metadata: languageName: node linkType: hard -"form-data@npm:^3.0.0": - version: 3.0.1 - resolution: "form-data@npm:3.0.1" +"form-data@npm:^4.0.0": + version: 4.0.0 + resolution: "form-data@npm:4.0.0" dependencies: asynckit: ^0.4.0 combined-stream: ^1.0.8 mime-types: ^2.1.12 - checksum: b019e8d35c8afc14a2bd8a7a92fa4f525a4726b6d5a9740e8d2623c30e308fbb58dc8469f90415a856698933c8479b01646a9dff33c87cc4e76d72aedbbf860d + checksum: 01135bf8675f9d5c61ff18e2e2932f719ca4de964e3be90ef4c36aacfc7b9cb2fceb5eca0b7e0190e3383fe51c5b37f4cb80b62ca06a99aaabfcfd6ac7c9328c languageName: node linkType: hard @@ -5973,7 +6265,7 @@ __metadata: languageName: node linkType: hard -"fs-minipass@npm:^2.0.0, fs-minipass@npm:^2.1.0": +"fs-minipass@npm:^2.0.0": version: 2.1.0 resolution: "fs-minipass@npm:2.1.0" dependencies: @@ -5982,6 +6274,15 @@ __metadata: languageName: node linkType: hard +"fs-minipass@npm:^3.0.0": + version: 3.0.3 + resolution: "fs-minipass@npm:3.0.3" + dependencies: + minipass: ^7.0.3 + checksum: 8722a41109130851d979222d3ec88aabaceeaaf8f57b2a8f744ef8bd2d1ce95453b04a61daa0078822bc5cd21e008814f06fe6586f56fef511e71b8d2394d802 + languageName: node + linkType: hard + "fs-readdir-recursive@npm:^1.1.0": version: 1.1.0 resolution: "fs-readdir-recursive@npm:1.1.0" @@ -5996,60 +6297,41 @@ __metadata: languageName: node linkType: hard -"fsevents@npm:~2.1.1": - version: 2.1.3 - resolution: "fsevents@npm:2.1.3" - dependencies: - node-gyp: latest - checksum: b5ec0516b44d75b60af5c01ff80a80cd995d175e4640d2a92fbabd02991dd664d76b241b65feef0775c23d531c3c74742c0fbacd6205af812a9c3cef59f04292 - conditions: os=darwin - languageName: node - linkType: hard - "fsevents@npm:~2.3.2": - version: 2.3.2 - resolution: "fsevents@npm:2.3.2" - dependencies: - node-gyp: latest - checksum: 97ade64e75091afee5265e6956cb72ba34db7819b4c3e94c431d4be2b19b8bb7a2d4116da417950c3425f17c8fe693d25e20212cac583ac1521ad066b77ae31f - conditions: os=darwin - languageName: node - linkType: hard - -"fsevents@patch:fsevents@~2.1.1#~builtin": - version: 2.1.3 - resolution: "fsevents@patch:fsevents@npm%3A2.1.3#~builtin::version=2.1.3&hash=18f3a7" + version: 2.3.3 + resolution: "fsevents@npm:2.3.3" dependencies: node-gyp: latest + checksum: 11e6ea6fea15e42461fc55b4b0e4a0a3c654faa567f1877dbd353f39156f69def97a69936d1746619d656c4b93de2238bf731f6085a03a50cabf287c9d024317 conditions: os=darwin languageName: node linkType: hard "fsevents@patch:fsevents@~2.3.2#~builtin": - version: 2.3.2 - resolution: "fsevents@patch:fsevents@npm%3A2.3.2#~builtin::version=2.3.2&hash=18f3a7" + version: 2.3.3 + resolution: "fsevents@patch:fsevents@npm%3A2.3.3#~builtin::version=2.3.3&hash=18f3a7" dependencies: node-gyp: latest conditions: os=darwin languageName: node linkType: hard -"function-bind@npm:^1.1.1": - version: 1.1.1 - resolution: "function-bind@npm:1.1.1" - checksum: b32fbaebb3f8ec4969f033073b43f5c8befbb58f1a79e12f1d7490358150359ebd92f49e72ff0144f65f2c48ea2a605bff2d07965f548f6474fd8efd95bf361a +"function-bind@npm:^1.1.2": + version: 1.1.2 + resolution: "function-bind@npm:1.1.2" + checksum: 2b0ff4ce708d99715ad14a6d1f894e2a83242e4a52ccfcefaee5e40050562e5f6dafc1adbb4ce2d4ab47279a45dc736ab91ea5042d843c3c092820dfe032efb1 languageName: node linkType: hard -"function.prototype.name@npm:^1.1.5": - version: 1.1.5 - resolution: "function.prototype.name@npm:1.1.5" +"function.prototype.name@npm:^1.1.6": + version: 1.1.6 + resolution: "function.prototype.name@npm:1.1.6" dependencies: call-bind: ^1.0.2 - define-properties: ^1.1.3 - es-abstract: ^1.19.0 - functions-have-names: ^1.2.2 - checksum: acd21d733a9b649c2c442f067567743214af5fa248dbeee69d8278ce7df3329ea5abac572be9f7470b4ec1cd4d8f1040e3c5caccf98ebf2bf861a0deab735c27 + define-properties: ^1.2.0 + es-abstract: ^1.22.1 + functions-have-names: ^1.2.3 + checksum: 7a3f9bd98adab09a07f6e1f03da03d3f7c26abbdeaeee15223f6c04a9fb5674792bdf5e689dac19b97ac71de6aad2027ba3048a9b883aa1b3173eed6ab07f479 languageName: node linkType: hard @@ -6060,7 +6342,7 @@ __metadata: languageName: node linkType: hard -"functions-have-names@npm:^1.2.2": +"functions-have-names@npm:^1.2.3": version: 1.2.3 resolution: "functions-have-names@npm:1.2.3" checksum: c3f1f5ba20f4e962efb71344ce0a40722163e85bee2101ce25f88214e78182d2d2476aa85ef37950c579eb6cf6ee811c17b3101bb84004bb75655f3e33f3fdb5 @@ -6093,22 +6375,6 @@ __metadata: languageName: node linkType: hard -"gauge@npm:^4.0.0": - version: 4.0.4 - resolution: "gauge@npm:4.0.4" - dependencies: - aproba: ^1.0.3 || ^2.0.0 - color-support: ^1.1.3 - console-control-strings: ^1.1.0 - has-unicode: ^2.0.1 - signal-exit: ^3.0.7 - string-width: ^4.2.3 - strip-ansi: ^6.0.1 - wide-align: ^1.1.5 - checksum: 788b6bfe52f1dd8e263cda800c26ac0ca2ff6de0b6eee2fe0d9e3abf15e149b651bd27bf5226be10e6e3edb5c4e5d5985a5a1a98137e7a892f75eff76467ad2d - languageName: node - linkType: hard - "get-caller-file@npm:^2.0.1, get-caller-file@npm:^2.0.5": version: 2.0.5 resolution: "get-caller-file@npm:2.0.5" @@ -6116,21 +6382,22 @@ __metadata: languageName: node linkType: hard -"get-func-name@npm:^2.0.0": +"get-func-name@npm:^2.0.1, get-func-name@npm:^2.0.2": version: 2.0.2 resolution: "get-func-name@npm:2.0.2" checksum: 3f62f4c23647de9d46e6f76d2b3eafe58933a9b3830c60669e4180d6c601ce1b4aa310ba8366143f55e52b139f992087a9f0647274e8745621fa2af7e0acf13b languageName: node linkType: hard -"get-intrinsic@npm:^1.0.2, get-intrinsic@npm:^1.1.0, get-intrinsic@npm:^1.1.1": - version: 1.1.1 - resolution: "get-intrinsic@npm:1.1.1" +"get-intrinsic@npm:^1.0.2, get-intrinsic@npm:^1.1.1, get-intrinsic@npm:^1.1.3, get-intrinsic@npm:^1.2.0, get-intrinsic@npm:^1.2.1, get-intrinsic@npm:^1.2.2": + version: 1.2.2 + resolution: "get-intrinsic@npm:1.2.2" dependencies: - function-bind: ^1.1.1 - has: ^1.0.3 - has-symbols: ^1.0.1 - checksum: a9fe2ca8fa3f07f9b0d30fb202bcd01f3d9b9b6b732452e79c48e79f7d6d8d003af3f9e38514250e3553fdc83c61650851cb6870832ac89deaaceb08e3721a17 + function-bind: ^1.1.2 + has-proto: ^1.0.1 + has-symbols: ^1.0.3 + hasown: ^2.0.0 + checksum: 447ff0724df26829908dc033b62732359596fcf66027bc131ab37984afb33842d9cd458fd6cecadfe7eac22fd8a54b349799ed334cf2726025c921c7250e7417 languageName: node linkType: hard @@ -6141,13 +6408,6 @@ __metadata: languageName: node linkType: hard -"get-stream@npm:^3.0.0": - version: 3.0.0 - resolution: "get-stream@npm:3.0.0" - checksum: 36142f46005ed74ce3a45c55545ec4e7da8e243554179e345a786baf144e5c4a35fb7bdc49fadfa9f18bd08000589b6fe364abdadfc4e1eb0e1b9914a6bb9c56 - languageName: node - linkType: hard - "get-stream@npm:^4.1.0": version: 4.1.0 resolution: "get-stream@npm:4.1.0" @@ -6166,6 +6426,13 @@ __metadata: languageName: node linkType: hard +"get-stream@npm:^6.0.1": + version: 6.0.1 + resolution: "get-stream@npm:6.0.1" + checksum: e04ecece32c92eebf5b8c940f51468cd53554dcbb0ea725b2748be583c9523d00128137966afce410b9b051eb2ef16d657cd2b120ca8edafcf5a65e81af63cad + languageName: node + linkType: hard + "get-symbol-description@npm:^1.0.0": version: 1.0.0 resolution: "get-symbol-description@npm:1.0.0" @@ -6197,7 +6464,7 @@ __metadata: languageName: node linkType: hard -"glob-parent@npm:^5.1.2, glob-parent@npm:~5.1.0, glob-parent@npm:~5.1.2": +"glob-parent@npm:^5.1.2, glob-parent@npm:~5.1.2": version: 5.1.2 resolution: "glob-parent@npm:5.1.2" dependencies: @@ -6206,7 +6473,7 @@ __metadata: languageName: node linkType: hard -"glob-parent@npm:^6.0.1": +"glob-parent@npm:^6.0.2": version: 6.0.2 resolution: "glob-parent@npm:6.0.2" dependencies: @@ -6215,20 +6482,6 @@ __metadata: languageName: node linkType: hard -"glob@npm:7.1.3": - version: 7.1.3 - resolution: "glob@npm:7.1.3" - dependencies: - fs.realpath: ^1.0.0 - inflight: ^1.0.4 - inherits: 2 - minimatch: ^3.0.4 - once: ^1.3.0 - path-is-absolute: ^1.0.0 - checksum: d72a834a393948d6c4a5cacc6a29fe5fe190e1cd134e55dfba09aee0be6fe15be343e96d8ec43558ab67ff8af28e4420c7f63a4d4db1c779e515015e9c318616 - languageName: node - linkType: hard - "glob@npm:7.1.7": version: 7.1.7 resolution: "glob@npm:7.1.7" @@ -6243,7 +6496,7 @@ __metadata: languageName: node linkType: hard -"glob@npm:7.2.0, glob@npm:^7.0.0, glob@npm:^7.1.3, glob@npm:^7.1.4, glob@npm:^7.2.0": +"glob@npm:7.2.0": version: 7.2.0 resolution: "glob@npm:7.2.0" dependencies: @@ -6257,6 +6510,21 @@ __metadata: languageName: node linkType: hard +"glob@npm:^10.2.2, glob@npm:^10.3.10": + version: 10.3.10 + resolution: "glob@npm:10.3.10" + dependencies: + foreground-child: ^3.1.0 + jackspeak: ^2.3.5 + minimatch: ^9.0.1 + minipass: ^5.0.0 || ^6.0.2 || ^7.0.0 + path-scurry: ^1.10.1 + bin: + glob: dist/esm/bin.mjs + checksum: 4f2fe2511e157b5a3f525a54092169a5f92405f24d2aed3142f4411df328baca13059f4182f1db1bf933e2c69c0bd89e57ae87edd8950cba8c7ccbe84f721cf3 + languageName: node + linkType: hard + "glob@npm:^5.0.15": version: 5.0.15 resolution: "glob@npm:5.0.15" @@ -6270,6 +6538,20 @@ __metadata: languageName: node linkType: hard +"glob@npm:^7.0.0, glob@npm:^7.1.3, glob@npm:^7.2.0": + version: 7.2.3 + resolution: "glob@npm:7.2.3" + dependencies: + fs.realpath: ^1.0.0 + inflight: ^1.0.4 + inherits: 2 + minimatch: ^3.1.1 + once: ^1.3.0 + path-is-absolute: ^1.0.0 + checksum: 29452e97b38fa704dabb1d1045350fb2467cf0277e155aa9ff7077e90ad81d1ea9d53d3ee63bd37c05b09a065e90f16aec4a65f5b8de401d1dac40bc5605d133 + languageName: node + linkType: hard + "global-modules@npm:^2.0.0": version: 2.0.0 resolution: "global-modules@npm:2.0.0" @@ -6300,12 +6582,21 @@ __metadata: languageName: node linkType: hard -"globals@npm:^13.6.0, globals@npm:^13.9.0": - version: 13.13.0 - resolution: "globals@npm:13.13.0" +"globals@npm:^13.19.0": + version: 13.23.0 + resolution: "globals@npm:13.23.0" dependencies: type-fest: ^0.20.2 - checksum: c55ea8fd3afecb72567bac41605577e19e68476993dfb0ca4c49b86075af5f0ae3f0f5502525f69010f7c5ea5db6a1c540a80a4f80ebdfb2f686d87b0f05d7e9 + checksum: 194c97cf8d1ef6ba59417234c2386549c4103b6e5f24b1ff1952de61a4753e5d2069435ba629de711a6480b1b1d114a98e2ab27f85e966d5a10c319c3bbd3dc3 + languageName: node + linkType: hard + +"globalthis@npm:^1.0.3": + version: 1.0.3 + resolution: "globalthis@npm:1.0.3" + dependencies: + define-properties: ^1.1.3 + checksum: fbd7d760dc464c886d0196166d92e5ffb4c84d0730846d6621a39fbbc068aeeb9c8d1421ad330e94b7bca4bb4ea092f5f21f3d36077812af5d098b4dc006c998 languageName: node linkType: hard @@ -6325,7 +6616,7 @@ __metadata: languageName: node linkType: hard -"globby@npm:^11.0.0, globby@npm:^11.0.4, globby@npm:^11.1.0": +"globby@npm:^11.0.0, globby@npm:^11.1.0": version: 11.1.0 resolution: "globby@npm:11.1.0" dependencies: @@ -6339,6 +6630,36 @@ __metadata: languageName: node linkType: hard +"gopd@npm:^1.0.1": + version: 1.0.1 + resolution: "gopd@npm:1.0.1" + dependencies: + get-intrinsic: ^1.1.3 + checksum: a5ccfb8806e0917a94e0b3de2af2ea4979c1da920bc381667c260e00e7cafdbe844e2cb9c5bcfef4e5412e8bf73bab837285bc35c7ba73aaaf0134d4583393a6 + languageName: node + linkType: hard + +"got@npm:12.1.0": + version: 12.1.0 + resolution: "got@npm:12.1.0" + dependencies: + "@sindresorhus/is": ^4.6.0 + "@szmarczak/http-timer": ^5.0.1 + "@types/cacheable-request": ^6.0.2 + "@types/responselike": ^1.0.0 + cacheable-lookup: ^6.0.4 + cacheable-request: ^7.0.2 + decompress-response: ^6.0.0 + form-data-encoder: 1.7.1 + get-stream: ^6.0.1 + http2-wrapper: ^2.1.10 + lowercase-keys: ^3.0.0 + p-cancelable: ^3.0.0 + responselike: ^2.0.0 + checksum: 1cc9af6ca511338a7f1bbb0943999e6ac324ea3c7d826066c02e530b4ac41147b1a4cadad21b28c3938de82185ac99c33d64a3a4560c6e0b0b125191ba6ee619 + languageName: node + linkType: hard + "got@npm:9.6.0": version: 9.6.0 resolution: "got@npm:9.6.0" @@ -6358,32 +6679,29 @@ __metadata: languageName: node linkType: hard -"got@npm:^7.1.0": - version: 7.1.0 - resolution: "got@npm:7.1.0" +"got@npm:^11.8.5": + version: 11.8.6 + resolution: "got@npm:11.8.6" dependencies: - decompress-response: ^3.2.0 - duplexer3: ^0.1.4 - get-stream: ^3.0.0 - is-plain-obj: ^1.1.0 - is-retry-allowed: ^1.0.0 - is-stream: ^1.0.0 - isurl: ^1.0.0-alpha5 - lowercase-keys: ^1.0.0 - p-cancelable: ^0.3.0 - p-timeout: ^1.1.1 - safe-buffer: ^5.0.1 - timed-out: ^4.0.0 - url-parse-lax: ^1.0.0 - url-to-options: ^1.0.1 - checksum: 0270472a389bdca67e60d36cccd014e502d1797d925c06ea2ef372fb41ae99c9e25ac4f187cc422760b4a66abb5478f8821b8134b4eaefe0bf5183daeded5e2f + "@sindresorhus/is": ^4.0.0 + "@szmarczak/http-timer": ^4.0.5 + "@types/cacheable-request": ^6.0.1 + "@types/responselike": ^1.0.0 + cacheable-lookup: ^5.0.3 + cacheable-request: ^7.0.2 + decompress-response: ^6.0.0 + http2-wrapper: ^1.0.0-beta.5.2 + lowercase-keys: ^2.0.0 + p-cancelable: ^2.0.0 + responselike: ^2.0.0 + checksum: bbc783578a8d5030c8164ef7f57ce41b5ad7db2ed13371e1944bef157eeca5a7475530e07c0aaa71610d7085474d0d96222c9f4268d41db333a17e39b463f45d languageName: node linkType: hard "graceful-fs@npm:^4.1.2, graceful-fs@npm:^4.1.5, graceful-fs@npm:^4.1.6, graceful-fs@npm:^4.1.9, graceful-fs@npm:^4.2.0, graceful-fs@npm:^4.2.6": - version: 4.2.10 - resolution: "graceful-fs@npm:4.2.10" - checksum: 3f109d70ae123951905d85032ebeae3c2a5a7a997430df00ea30df0e3a6c60cf6689b109654d6fdacd28810a053348c4d14642da1d075049e6be1ba5216218da + version: 4.2.11 + resolution: "graceful-fs@npm:4.2.11" + checksum: ac85f94da92d8eb6b7f5a8b20ce65e43d66761c55ce85ac96df6865308390da45a8d3f0296dd3a663de65d30ba497bd46c696cc1e248c72b13d6d567138a4fc7 languageName: node linkType: hard @@ -6394,19 +6712,19 @@ __metadata: languageName: node linkType: hard -"growl@npm:1.10.5": - version: 1.10.5 - resolution: "growl@npm:1.10.5" - checksum: 4b86685de6831cebcbb19f93870bea624afee61124b0a20c49017013987cd129e73a8c4baeca295728f41d21265e1f859d25ef36731b142ca59c655fea94bb1a +"graphemer@npm:^1.4.0": + version: 1.4.0 + resolution: "graphemer@npm:1.4.0" + checksum: bab8f0be9b568857c7bec9fda95a89f87b783546d02951c40c33f84d05bb7da3fd10f863a9beb901463669b6583173a8c8cc6d6b306ea2b9b9d5d3d943c3a673 languageName: node linkType: hard "handlebars@npm:^4.0.1": - version: 4.7.7 - resolution: "handlebars@npm:4.7.7" + version: 4.7.8 + resolution: "handlebars@npm:4.7.8" dependencies: minimist: ^1.2.5 - neo-async: ^2.6.0 + neo-async: ^2.6.2 source-map: ^0.6.1 uglify-js: ^3.1.4 wordwrap: ^1.0.0 @@ -6415,7 +6733,7 @@ __metadata: optional: true bin: handlebars: bin/handlebars - checksum: 1e79a43f5e18d15742977cb987923eab3e2a8f44f2d9d340982bcb69e1735ed049226e534d7c1074eaddaf37e4fb4f471a8adb71cddd5bc8cf3f894241df5cee + checksum: 00e68bb5c183fd7b8b63322e6234b5ac8fbb960d712cb3f25587d559c2951d9642df83c04a1172c918c41bcfc81bfbd7a7718bbce93b893e0135fc99edea93ff languageName: node linkType: hard @@ -6444,15 +6762,15 @@ __metadata: linkType: hard "hardhat-gas-reporter@npm:^1.0.8": - version: 1.0.8 - resolution: "hardhat-gas-reporter@npm:1.0.8" + version: 1.0.9 + resolution: "hardhat-gas-reporter@npm:1.0.9" dependencies: array-uniq: 1.0.3 - eth-gas-reporter: ^0.2.24 + eth-gas-reporter: ^0.2.25 sha1: ^1.1.1 peerDependencies: hardhat: ^2.0.2 - checksum: bf18aacd08e0bdef81b180f3c97f76fcab885de3e92ed2dc014712e671c83ee7f77755c0e6c0f923a95f8372714cfcb7cdaa019afc42984c159603f8a8d724cf + checksum: 77f8f8d085ff3d9d7787f0227e5355e1800f7d6707bc70171e0567bf69706703ae7f6f53dce1be1d409e7e71e3629a434c94b546bdbbc1e4c1af47cd5d0c6776 languageName: node linkType: hard @@ -6520,18 +6838,11 @@ __metadata: optional: true bin: hardhat: internal/cli/cli.js - checksum: c97c5ed2336541e8b0a3034dc5c94319cffbf93fa1b6385091858f8eefb392129c6109cbaca0837fd4dff4d627b3e3ccb931706257a5d0bee71fc7f7fe90a536 - languageName: node - linkType: hard - -"has-bigints@npm:^1.0.1": - version: 1.0.1 - resolution: "has-bigints@npm:1.0.1" - checksum: 44ab55868174470065d2e0f8f6def1c990d12b82162a8803c679699fa8a39f966e336f2a33c185092fe8aea7e8bf2e85f1c26add5f29d98f2318bd270096b183 + checksum: c97c5ed2336541e8b0a3034dc5c94319cffbf93fa1b6385091858f8eefb392129c6109cbaca0837fd4dff4d627b3e3ccb931706257a5d0bee71fc7f7fe90a536 languageName: node linkType: hard -"has-bigints@npm:^1.0.2": +"has-bigints@npm:^1.0.1, has-bigints@npm:^1.0.2": version: 1.0.2 resolution: "has-bigints@npm:1.0.2" checksum: 390e31e7be7e5c6fe68b81babb73dfc35d413604d7ee5f56da101417027a4b4ce6a27e46eff97ad040c835b5d228676eae99a9b5c3bc0e23c8e81a49241ff45b @@ -6560,37 +6871,28 @@ __metadata: linkType: hard "has-property-descriptors@npm:^1.0.0": - version: 1.0.0 - resolution: "has-property-descriptors@npm:1.0.0" + version: 1.0.1 + resolution: "has-property-descriptors@npm:1.0.1" dependencies: - get-intrinsic: ^1.1.1 - checksum: a6d3f0a266d0294d972e354782e872e2fe1b6495b321e6ef678c9b7a06a40408a6891817350c62e752adced73a94ac903c54734fee05bf65b1905ee1368194bb + get-intrinsic: ^1.2.2 + checksum: 2bcc6bf6ec6af375add4e4b4ef586e43674850a91ad4d46666d0b28ba8e1fd69e424c7677d24d60f69470ad0afaa2f3197f508b20b0bb7dd99a8ab77ffc4b7c4 languageName: node linkType: hard -"has-symbol-support-x@npm:^1.4.1": - version: 1.4.2 - resolution: "has-symbol-support-x@npm:1.4.2" - checksum: ff06631d556d897424c00e8e79c10093ad34c93e88bb0563932d7837f148a4c90a4377abc5d8da000cb6637c0ecdb4acc9ae836c7cfd0ffc919986db32097609 +"has-proto@npm:^1.0.1": + version: 1.0.1 + resolution: "has-proto@npm:1.0.1" + checksum: febc5b5b531de8022806ad7407935e2135f1cc9e64636c3916c6842bd7995994ca3b29871ecd7954bd35f9e2986c17b3b227880484d22259e2f8e6ce63fd383e languageName: node linkType: hard -"has-symbols@npm:^1.0.0, has-symbols@npm:^1.0.1, has-symbols@npm:^1.0.2, has-symbols@npm:^1.0.3": +"has-symbols@npm:^1.0.2, has-symbols@npm:^1.0.3": version: 1.0.3 resolution: "has-symbols@npm:1.0.3" checksum: a054c40c631c0d5741a8285010a0777ea0c068f99ed43e5d6eb12972da223f8af553a455132fdb0801bdcfa0e0f443c0c03a68d8555aa529b3144b446c3f2410 languageName: node linkType: hard -"has-to-string-tag-x@npm:^1.2.0": - version: 1.4.1 - resolution: "has-to-string-tag-x@npm:1.4.1" - dependencies: - has-symbol-support-x: ^1.4.1 - checksum: 804c4505727be7770f8b2f5e727ce31c9affc5b83df4ce12344f44b68d557fefb31f77751dbd739de900653126bcd71f8842fac06f97a3fae5422685ab0ce6f0 - languageName: node - linkType: hard - "has-tostringtag@npm:^1.0.0": version: 1.0.0 resolution: "has-tostringtag@npm:1.0.0" @@ -6600,22 +6902,6 @@ __metadata: languageName: node linkType: hard -"has-unicode@npm:^2.0.1": - version: 2.0.1 - resolution: "has-unicode@npm:2.0.1" - checksum: 1eab07a7436512db0be40a710b29b5dc21fa04880b7f63c9980b706683127e3c1b57cb80ea96d47991bdae2dfe479604f6a1ba410106ee1046a41d1bd0814400 - languageName: node - linkType: hard - -"has@npm:^1.0.3": - version: 1.0.3 - resolution: "has@npm:1.0.3" - dependencies: - function-bind: ^1.1.1 - checksum: b9ad53d53be4af90ce5d1c38331e712522417d017d5ef1ebd0507e07c2fbad8686fffb8e12ddecd4c39ca9b9b47431afbb975b8abf7f3c3b82c98e9aad052792 - languageName: node - linkType: hard - "hash-base@npm:^3.0.0": version: 3.1.0 resolution: "hash-base@npm:3.1.0" @@ -6647,6 +6933,15 @@ __metadata: languageName: node linkType: hard +"hasown@npm:^2.0.0": + version: 2.0.0 + resolution: "hasown@npm:2.0.0" + dependencies: + function-bind: ^1.1.2 + checksum: 6151c75ca12554565098641c98a40f4cc86b85b0fd5b6fe92360967e4605a4f9610f7757260b4e8098dd1c2ce7f4b095f2006fe72a570e3b6d2d28de0298c176 + languageName: node + linkType: hard + "he@npm:1.2.0": version: 1.2.0 resolution: "he@npm:1.2.0" @@ -6686,26 +6981,13 @@ __metadata: languageName: node linkType: hard -"http-cache-semantics@npm:^4.0.0, http-cache-semantics@npm:^4.1.0": +"http-cache-semantics@npm:^4.0.0, http-cache-semantics@npm:^4.1.1": version: 4.1.1 resolution: "http-cache-semantics@npm:4.1.1" checksum: 83ac0bc60b17a3a36f9953e7be55e5c8f41acc61b22583060e8dedc9dd5e3607c823a88d0926f9150e571f90946835c7fe150732801010845c72cd8bbff1a236 languageName: node linkType: hard -"http-errors@npm:1.8.1": - version: 1.8.1 - resolution: "http-errors@npm:1.8.1" - dependencies: - depd: ~1.1.2 - inherits: 2.0.4 - setprototypeof: 1.2.0 - statuses: ">= 1.5.0 < 2" - toidentifier: 1.0.1 - checksum: d3c7e7e776fd51c0a812baff570bdf06fe49a5dc448b700ab6171b1250e4cf7db8b8f4c0b133e4bfe2451022a5790c1ca6c2cae4094dedd6ac8304a1267f91d2 - languageName: node - linkType: hard - "http-errors@npm:2.0.0": version: 2.0.0 resolution: "http-errors@npm:2.0.0" @@ -6726,14 +7008,13 @@ __metadata: languageName: node linkType: hard -"http-proxy-agent@npm:^5.0.0": - version: 5.0.0 - resolution: "http-proxy-agent@npm:5.0.0" +"http-proxy-agent@npm:^7.0.0": + version: 7.0.0 + resolution: "http-proxy-agent@npm:7.0.0" dependencies: - "@tootallnate/once": 2 - agent-base: 6 - debug: 4 - checksum: e2ee1ff1656a131953839b2a19cd1f3a52d97c25ba87bd2559af6ae87114abf60971e498021f9b73f9fd78aea8876d1fb0d4656aac8a03c6caa9fc175f22b786 + agent-base: ^7.1.0 + debug: ^4.3.4 + checksum: 48d4fac997917e15f45094852b63b62a46d0c8a4f0b9c6c23ca26d27b8df8d178bed88389e604745e748bd9a01f5023e25093722777f0593c3f052009ff438b6 languageName: node linkType: hard @@ -6757,13 +7038,43 @@ __metadata: languageName: node linkType: hard +"http2-wrapper@npm:^1.0.0-beta.5.2": + version: 1.0.3 + resolution: "http2-wrapper@npm:1.0.3" + dependencies: + quick-lru: ^5.1.1 + resolve-alpn: ^1.0.0 + checksum: 74160b862ec699e3f859739101ff592d52ce1cb207b7950295bf7962e4aa1597ef709b4292c673bece9c9b300efad0559fc86c71b1409c7a1e02b7229456003e + languageName: node + linkType: hard + +"http2-wrapper@npm:^2.1.10": + version: 2.2.1 + resolution: "http2-wrapper@npm:2.2.1" + dependencies: + quick-lru: ^5.1.1 + resolve-alpn: ^1.2.0 + checksum: e95e55e22c6fd61182ce81fecb9b7da3af680d479febe8ad870d05f7ebbc9f076e455193766f4e7934e50913bf1d8da3ba121fb5cd2928892390b58cf9d5c509 + languageName: node + linkType: hard + "https-proxy-agent@npm:^5.0.0": - version: 5.0.0 - resolution: "https-proxy-agent@npm:5.0.0" + version: 5.0.1 + resolution: "https-proxy-agent@npm:5.0.1" dependencies: agent-base: 6 debug: 4 - checksum: 165bfb090bd26d47693597661298006841ab733d0c7383a8cb2f17373387a94c903a3ac687090aa739de05e379ab6f868bae84ab4eac288ad85c328cd1ec9e53 + checksum: 571fccdf38184f05943e12d37d6ce38197becdd69e58d03f43637f7fa1269cf303a7d228aa27e5b27bbd3af8f09fd938e1c91dcfefff2df7ba77c20ed8dfc765 + languageName: node + linkType: hard + +"https-proxy-agent@npm:^7.0.1": + version: 7.0.2 + resolution: "https-proxy-agent@npm:7.0.2" + dependencies: + agent-base: ^7.0.2 + debug: 4 + checksum: 088969a0dd476ea7a0ed0a2cf1283013682b08f874c3bc6696c83fa061d2c157d29ef0ad3eb70a2046010bb7665573b2388d10fdcb3e410a66995e5248444292 languageName: node linkType: hard @@ -6774,15 +7085,6 @@ __metadata: languageName: node linkType: hard -"humanize-ms@npm:^1.2.1": - version: 1.2.1 - resolution: "humanize-ms@npm:1.2.1" - dependencies: - ms: ^2.0.0 - checksum: 9c7a74a2827f9294c009266c82031030eae811ca87b0da3dceb8d6071b9bde22c9f3daef0469c3c533cc67a97d8a167cd9fc0389350e5f415f61a79b171ded16 - languageName: node - linkType: hard - "iconv-lite@npm:0.4.24, iconv-lite@npm:^0.4.24": version: 0.4.24 resolution: "iconv-lite@npm:0.4.24" @@ -6817,10 +7119,10 @@ __metadata: languageName: node linkType: hard -"ignore@npm:^5.1.1, ignore@npm:^5.1.8, ignore@npm:^5.2.0": - version: 5.2.0 - resolution: "ignore@npm:5.2.0" - checksum: 6b1f926792d614f64c6c83da3a1f9c83f6196c2839aa41e1e32dd7b8d174cef2e329d75caabb62cb61ce9dc432f75e67d07d122a037312db7caa73166a1bdb77 +"ignore@npm:^5.1.1, ignore@npm:^5.2.0": + version: 5.3.0 + resolution: "ignore@npm:5.3.0" + checksum: 2736da6621f14ced652785cb05d86301a66d70248597537176612bd0c8630893564bd5f6421f8806b09e8472e75c591ef01672ab8059c07c6eb2c09cefe04bf9 languageName: node linkType: hard @@ -6839,13 +7141,13 @@ __metadata: linkType: hard "immutable@npm:^4.0.0-rc.12": - version: 4.0.0 - resolution: "immutable@npm:4.0.0" - checksum: 4b5e9181e4d5fa06728a481835ec09c86367e5d03268666c95b522b7644ab891098022e4479a43c4c81a68f2ed82f10751ce5d33e208d7b873b6e7f9dfaf4d87 + version: 4.3.4 + resolution: "immutable@npm:4.3.4" + checksum: de3edd964c394bab83432429d3fb0b4816b42f56050f2ca913ba520bd3068ec3e504230d0800332d3abc478616e8f55d3787424a90d0952e6aba864524f1afc3 languageName: node linkType: hard -"import-fresh@npm:^3.0.0, import-fresh@npm:^3.2.1": +"import-fresh@npm:^3.2.1": version: 3.3.0 resolution: "import-fresh@npm:3.3.0" dependencies: @@ -6869,13 +7171,6 @@ __metadata: languageName: node linkType: hard -"infer-owner@npm:^1.0.4": - version: 1.0.4 - resolution: "infer-owner@npm:1.0.4" - checksum: 181e732764e4a0611576466b4b87dac338972b839920b2a8cde43642e4ed6bd54dc1fb0b40874728f2a2df9a1b097b8ff83b56d5f8f8e3927f837fdcb47d8a89 - languageName: node - linkType: hard - "inflight@npm:^1.0.4": version: 1.0.6 resolution: "inflight@npm:1.0.6" @@ -6901,8 +7196,8 @@ __metadata: linkType: hard "inquirer@npm:^8.2.4": - version: 8.2.4 - resolution: "inquirer@npm:8.2.4" + version: 8.2.6 + resolution: "inquirer@npm:8.2.6" dependencies: ansi-escapes: ^4.2.1 chalk: ^4.1.1 @@ -6918,19 +7213,19 @@ __metadata: string-width: ^4.1.0 strip-ansi: ^6.0.0 through: ^2.3.6 - wrap-ansi: ^7.0.0 - checksum: dfcb6529d3af443dfea2241cb471508091b51f5121a088fdb8728b23ec9b349ef0a5e13a0ef2c8e19457b0bed22f7cbbcd561f7a4529d084c562a58c605e2655 + wrap-ansi: ^6.0.1 + checksum: 387ffb0a513559cc7414eb42c57556a60e302f820d6960e89d376d092e257a919961cd485a1b4de693dbb5c0de8bc58320bfd6247dfd827a873aa82a4215a240 languageName: node linkType: hard -"internal-slot@npm:^1.0.3": - version: 1.0.3 - resolution: "internal-slot@npm:1.0.3" +"internal-slot@npm:^1.0.5": + version: 1.0.6 + resolution: "internal-slot@npm:1.0.6" dependencies: - get-intrinsic: ^1.1.0 - has: ^1.0.3 + get-intrinsic: ^1.2.2 + hasown: ^2.0.0 side-channel: ^1.0.4 - checksum: 1944f92e981e47aebc98a88ff0db579fd90543d937806104d0b96557b10c1f170c51fb777b97740a8b6ddeec585fca8c39ae99fd08a8e058dfc8ab70937238bf + checksum: 7872454888047553ce97a3fa1da7cc054a28ec5400a9c2e9f4dbe4fe7c1d041cb8e8301467614b80d4246d50377aad2fb58860b294ed74d6700cc346b6f89549 languageName: node linkType: hard @@ -6950,10 +7245,10 @@ __metadata: languageName: node linkType: hard -"ip@npm:^1.1.5": - version: 1.1.5 - resolution: "ip@npm:1.1.5" - checksum: 30133981f082a060a32644f6a7746e9ba7ac9e2bc07ecc8bbdda3ee8ca9bec1190724c390e45a1ee7695e7edfd2a8f7dda2c104ec5f7ac5068c00648504c7e5a +"ip@npm:^2.0.0": + version: 2.0.0 + resolution: "ip@npm:2.0.0" + checksum: cfcfac6b873b701996d71ec82a7dd27ba92450afdb421e356f44044ed688df04567344c36cbacea7d01b1c39a4c732dc012570ebe9bebfb06f27314bca625349 languageName: node linkType: hard @@ -6974,6 +7269,17 @@ __metadata: languageName: node linkType: hard +"is-array-buffer@npm:^3.0.1, is-array-buffer@npm:^3.0.2": + version: 3.0.2 + resolution: "is-array-buffer@npm:3.0.2" + dependencies: + call-bind: ^1.0.2 + get-intrinsic: ^1.2.0 + is-typed-array: ^1.1.10 + checksum: dcac9dda66ff17df9cabdc58214172bf41082f956eab30bb0d86bc0fab1e44b690fc8e1f855cf2481245caf4e8a5a006a982a71ddccec84032ed41f9d8da8c14 + languageName: node + linkType: hard + "is-arrayish@npm:^0.2.1": version: 0.2.1 resolution: "is-arrayish@npm:0.2.1" @@ -7009,37 +7315,26 @@ __metadata: languageName: node linkType: hard -"is-buffer@npm:^2.0.5, is-buffer@npm:~2.0.3": +"is-buffer@npm:^2.0.5": version: 2.0.5 resolution: "is-buffer@npm:2.0.5" checksum: 764c9ad8b523a9f5a32af29bdf772b08eb48c04d2ad0a7240916ac2688c983bf5f8504bf25b35e66240edeb9d9085461f9b5dae1f3d2861c6b06a65fe983de42 languageName: node linkType: hard -"is-callable@npm:^1.1.4, is-callable@npm:^1.2.4": - version: 1.2.4 - resolution: "is-callable@npm:1.2.4" - checksum: 1a28d57dc435797dae04b173b65d6d1e77d4f16276e9eff973f994eadcfdc30a017e6a597f092752a083c1103cceb56c91e3dadc6692fedb9898dfaba701575f - languageName: node - linkType: hard - -"is-ci@npm:^3.0.1": - version: 3.0.1 - resolution: "is-ci@npm:3.0.1" - dependencies: - ci-info: ^3.2.0 - bin: - is-ci: bin.js - checksum: 192c66dc7826d58f803ecae624860dccf1899fc1f3ac5505284c0a5cf5f889046ffeb958fa651e5725d5705c5bcb14f055b79150ea5fcad7456a9569de60260e +"is-callable@npm:^1.1.3, is-callable@npm:^1.1.4, is-callable@npm:^1.2.7": + version: 1.2.7 + resolution: "is-callable@npm:1.2.7" + checksum: 61fd57d03b0d984e2ed3720fb1c7a897827ea174bd44402878e059542ea8c4aeedee0ea0985998aa5cc2736b2fa6e271c08587addb5b3959ac52cf665173d1ac languageName: node linkType: hard -"is-core-module@npm:^2.8.1": - version: 2.8.1 - resolution: "is-core-module@npm:2.8.1" +"is-core-module@npm:^2.13.0, is-core-module@npm:^2.13.1": + version: 2.13.1 + resolution: "is-core-module@npm:2.13.1" dependencies: - has: ^1.0.3 - checksum: 418b7bc10768a73c41c7ef497e293719604007f88934a6ffc5f7c78702791b8528102fb4c9e56d006d69361549b3d9519440214a74aefc7e0b79e5e4411d377f + hasown: ^2.0.0 + checksum: 256559ee8a9488af90e4bad16f5583c6d59e92f0742e9e8bb4331e758521ee86b810b93bae44f390766ffbc518a0488b18d9dab7da9a5ff997d499efc9403f7c languageName: node linkType: hard @@ -7142,10 +7437,10 @@ __metadata: languageName: node linkType: hard -"is-object@npm:^1.0.1": - version: 1.0.2 - resolution: "is-object@npm:1.0.2" - checksum: 971219c4b1985b9751f65e4c8296d3104f0457b0e8a70849e848a4a2208bc47317d73b3b85d4a369619cb2df8284dc22584cb2695a7d99aca5e8d0aa64fc075a +"is-path-inside@npm:^3.0.3": + version: 3.0.3 + resolution: "is-path-inside@npm:3.0.3" + checksum: abd50f06186a052b349c15e55b182326f1936c89a78bf6c8f2b707412517c097ce04bc49a0ca221787bc44e1049f51f09a2ffb63d22899051988d3a618ba13e9 languageName: node linkType: hard @@ -7173,14 +7468,7 @@ __metadata: languageName: node linkType: hard -"is-retry-allowed@npm:^1.0.0": - version: 1.2.0 - resolution: "is-retry-allowed@npm:1.2.0" - checksum: 50d700a89ae31926b1c91b3eb0104dbceeac8790d8b80d02f5c76d9a75c2056f1bb24b5268a8a018dead606bddf116b2262e5ac07401eb8b8783b266ed22558d - languageName: node - linkType: hard - -"is-shared-array-buffer@npm:^1.0.1, is-shared-array-buffer@npm:^1.0.2": +"is-shared-array-buffer@npm:^1.0.2": version: 1.0.2 resolution: "is-shared-array-buffer@npm:1.0.2" dependencies: @@ -7189,13 +7477,6 @@ __metadata: languageName: node linkType: hard -"is-stream@npm:^1.0.0": - version: 1.1.0 - resolution: "is-stream@npm:1.1.0" - checksum: 063c6bec9d5647aa6d42108d4c59723d2bd4ae42135a2d4db6eadbd49b7ea05b750fd69d279e5c7c45cf9da753ad2c00d8978be354d65aa9f6bb434969c6a2ae - languageName: node - linkType: hard - "is-string@npm:^1.0.5, is-string@npm:^1.0.7": version: 1.0.7 resolution: "is-string@npm:1.0.7" @@ -7223,16 +7504,12 @@ __metadata: languageName: node linkType: hard -"is-typed-array@npm:^1.1.3, is-typed-array@npm:^1.1.7": - version: 1.1.8 - resolution: "is-typed-array@npm:1.1.8" +"is-typed-array@npm:^1.1.10, is-typed-array@npm:^1.1.12, is-typed-array@npm:^1.1.3, is-typed-array@npm:^1.1.9": + version: 1.1.12 + resolution: "is-typed-array@npm:1.1.12" dependencies: - available-typed-arrays: ^1.0.5 - call-bind: ^1.0.2 - es-abstract: ^1.18.5 - foreach: ^2.0.5 - has-tostringtag: ^1.0.0 - checksum: aa0f9f0716e19e2fb8aef69e69e4205479d25ace778e2339fc910948115cde4b0d9aff9d5d1e8b80f09a5664998278e05e54ad3dc9cb12cefcf86db71084ed00 + which-typed-array: ^1.1.11 + checksum: 4c89c4a3be07186caddadf92197b17fda663a9d259ea0d44a85f171558270d36059d1c386d34a12cba22dfade5aba497ce22778e866adc9406098c8fc4771796 languageName: node linkType: hard @@ -7273,6 +7550,13 @@ __metadata: languageName: node linkType: hard +"isarray@npm:^2.0.5": + version: 2.0.5 + resolution: "isarray@npm:2.0.5" + checksum: bd5bbe4104438c4196ba58a54650116007fa0262eccef13a4c55b2e09a5b36b59f1e75b9fcc49883dd9d4953892e6fc007eef9e9155648ceea036e184b0f930a + languageName: node + linkType: hard + "isarray@npm:~1.0.0": version: 1.0.0 resolution: "isarray@npm:1.0.0" @@ -7287,6 +7571,13 @@ __metadata: languageName: node linkType: hard +"isexe@npm:^3.1.1": + version: 3.1.1 + resolution: "isexe@npm:3.1.1" + checksum: 7fe1931ee4e88eb5aa524cd3ceb8c882537bc3a81b02e438b240e47012eef49c86904d0f0e593ea7c3a9996d18d0f1f3be8d3eaa92333977b0c3a9d353d5563e + languageName: node + linkType: hard + "isstream@npm:~0.1.2": version: 0.1.2 resolution: "isstream@npm:0.1.2" @@ -7294,13 +7585,16 @@ __metadata: languageName: node linkType: hard -"isurl@npm:^1.0.0-alpha5": - version: 1.0.0 - resolution: "isurl@npm:1.0.0" +"jackspeak@npm:^2.3.5": + version: 2.3.6 + resolution: "jackspeak@npm:2.3.6" dependencies: - has-to-string-tag-x: ^1.2.0 - is-object: ^1.0.1 - checksum: 28a96e019269d57015fa5869f19dda5a3ed1f7b21e3e0c4ff695419bd0541547db352aa32ee4a3659e811a177b0e37a5bc1a036731e71939dd16b59808ab92bd + "@isaacs/cliui": ^8.0.2 + "@pkgjs/parseargs": ^0.11.0 + dependenciesMeta: + "@pkgjs/parseargs": + optional: true + checksum: 57d43ad11eadc98cdfe7496612f6bbb5255ea69fe51ea431162db302c2a11011642f50cfad57288bd0aea78384a0612b16e131944ad8ecd09d619041c8531b54 languageName: node linkType: hard @@ -7325,18 +7619,6 @@ __metadata: languageName: node linkType: hard -"js-yaml@npm:3.13.1": - version: 3.13.1 - resolution: "js-yaml@npm:3.13.1" - dependencies: - argparse: ^1.0.7 - esprima: ^4.0.0 - bin: - js-yaml: bin/js-yaml.js - checksum: 7511b764abb66d8aa963379f7d2a404f078457d106552d05a7b556d204f7932384e8477513c124749fa2de52eb328961834562bd09924902c6432e40daa408bc - languageName: node - linkType: hard - "js-yaml@npm:3.x, js-yaml@npm:^3.13.0, js-yaml@npm:^3.13.1, js-yaml@npm:^3.6.1": version: 3.14.1 resolution: "js-yaml@npm:3.14.1" @@ -7383,6 +7665,13 @@ __metadata: languageName: node linkType: hard +"json-buffer@npm:3.0.1": + version: 3.0.1 + resolution: "json-buffer@npm:3.0.1" + checksum: 9026b03edc2847eefa2e37646c579300a1f3a4586cfb62bf857832b60c852042d0d6ae55d1afb8926163fa54c2b01d83ae24705f34990348bdac6273a29d4581 + languageName: node + linkType: hard + "json-parse-even-better-errors@npm:^2.3.0": version: 2.3.1 resolution: "json-parse-even-better-errors@npm:2.3.1" @@ -7418,14 +7707,14 @@ __metadata: languageName: node linkType: hard -"json5@npm:^1.0.1": - version: 1.0.1 - resolution: "json5@npm:1.0.1" +"json5@npm:^1.0.2": + version: 1.0.2 + resolution: "json5@npm:1.0.2" dependencies: minimist: ^1.2.0 bin: json5: lib/cli.js - checksum: e76ea23dbb8fc1348c143da628134a98adf4c5a4e8ea2adaa74a80c455fc2cdf0e2e13e6398ef819bfe92306b610ebb2002668ed9fc1af386d593691ef346fc3 + checksum: 866458a8c58a95a49bef3adba929c625e82532bcff1fe93f01d29cb02cac7c3fe1f4b79951b7792c2da9de0b32871a8401a6e3c5b36778ad852bf5b8a61165d7 languageName: node linkType: hard @@ -7467,9 +7756,9 @@ __metadata: linkType: hard "jsonschema@npm:^1.2.4": - version: 1.4.0 - resolution: "jsonschema@npm:1.4.0" - checksum: a2f96b5154658f5567b064d6f25fa4cb7e38b923d5dce9dad8d2566a07dd94abc4acedf234333a91f31bc9934e9dd57c270dcc51e5656b4c104408196c768580 + version: 1.4.1 + resolution: "jsonschema@npm:1.4.1" + checksum: 1ef02a6cd9bc32241ec86bbf1300bdbc3b5f2d8df6eb795517cf7d1cd9909e7beba1e54fdf73990fd66be98a182bda9add9607296b0cb00b1348212988e424b2 languageName: node linkType: hard @@ -7496,7 +7785,7 @@ __metadata: languageName: node linkType: hard -"keccak@npm:3.0.2, keccak@npm:^3.0.0": +"keccak@npm:3.0.2": version: 3.0.2 resolution: "keccak@npm:3.0.2" dependencies: @@ -7521,15 +7810,15 @@ __metadata: languageName: node linkType: hard -"keccak@npm:^3.0.2": - version: 3.0.3 - resolution: "keccak@npm:3.0.3" +"keccak@npm:^3.0.0, keccak@npm:^3.0.2": + version: 3.0.4 + resolution: "keccak@npm:3.0.4" dependencies: node-addon-api: ^2.0.0 node-gyp: latest node-gyp-build: ^4.2.0 readable-stream: ^3.6.0 - checksum: f08f04f5cc87013a3fc9e87262f761daff38945c86dd09c01a7f7930a15ae3e14f93b310ef821dcc83675a7b814eb1c983222399a2f263ad980251201d1b9a99 + checksum: 2bf27b97b2f24225b1b44027de62be547f5c7326d87d249605665abd0c8c599d774671c35504c62c9b922cae02758504c6f76a73a84234d23af8a2211afaaa11 languageName: node linkType: hard @@ -7542,6 +7831,15 @@ __metadata: languageName: node linkType: hard +"keyv@npm:^4.0.0, keyv@npm:^4.5.3": + version: 4.5.4 + resolution: "keyv@npm:4.5.4" + dependencies: + json-buffer: 3.0.1 + checksum: 74a24395b1c34bd44ad5cb2b49140d087553e170625240b86755a6604cd65aa16efdbdeae5cdb17ba1284a0fbb25ad06263755dbc71b8d8b06f74232ce3cdd72 + languageName: node + linkType: hard + "kind-of@npm:^6.0.2, kind-of@npm:^6.0.3": version: 6.0.3 resolution: "kind-of@npm:6.0.3" @@ -7561,7 +7859,7 @@ __metadata: languageName: node linkType: hard -"kleur@npm:^4.1.4": +"kleur@npm:^4.1.5": version: 4.1.5 resolution: "kleur@npm:4.1.5" checksum: 1dc476e32741acf0b1b5b0627ffd0d722e342c1b0da14de3e8ae97821327ca08f9fb944542fb3c126d90ac5f27f9d804edbe7c585bf7d12ef495d115e0f22c12 @@ -7761,16 +8059,6 @@ __metadata: languageName: node linkType: hard -"locate-path@npm:^3.0.0": - version: 3.0.0 - resolution: "locate-path@npm:3.0.0" - dependencies: - p-locate: ^3.0.0 - path-exists: ^3.0.0 - checksum: 53db3996672f21f8b0bf2a2c645ae2c13ffdae1eeecfcd399a583bce8516c0b88dcb4222ca6efbbbeb6949df7e46860895be2c02e8d3219abd373ace3bfb4e11 - languageName: node - linkType: hard - "locate-path@npm:^5.0.0": version: 5.0.0 resolution: "locate-path@npm:5.0.0" @@ -7824,22 +8112,13 @@ __metadata: languageName: node linkType: hard -"lodash@npm:^4.17.11, lodash@npm:^4.17.14, lodash@npm:^4.17.15, lodash@npm:^4.17.19, lodash@npm:^4.17.21": +"lodash@npm:^4.17.11, lodash@npm:^4.17.14, lodash@npm:^4.17.15, lodash@npm:^4.17.21": version: 4.17.21 resolution: "lodash@npm:4.17.21" checksum: eb835a2e51d381e561e508ce932ea50a8e5a68f4ebdd771ea240d3048244a8d13658acbd502cd4829768c56f2e16bdd4340b9ea141297d472517b83868e677f7 languageName: node linkType: hard -"log-symbols@npm:3.0.0": - version: 3.0.0 - resolution: "log-symbols@npm:3.0.0" - dependencies: - chalk: ^2.4.2 - checksum: f2322e1452d819050b11aad247660e1494f8b2219d40a964af91d5f9af1a90636f1b3d93f2952090e42af07cc5550aecabf6c1d8ec1181207e95cb66ba112361 - languageName: node - linkType: hard - "log-symbols@npm:4.1.0, log-symbols@npm:^4.1.0": version: 4.1.0 resolution: "log-symbols@npm:4.1.0" @@ -7850,12 +8129,12 @@ __metadata: languageName: node linkType: hard -"loupe@npm:^2.3.1": - version: 2.3.4 - resolution: "loupe@npm:2.3.4" +"loupe@npm:^2.3.6": + version: 2.3.7 + resolution: "loupe@npm:2.3.7" dependencies: - get-func-name: ^2.0.0 - checksum: 5af91db61aa18530f1749a64735ee194ac263e65e9f4d1562bf3036c591f1baa948289c193e0e34c7b5e2c1b75d3c1dc4fce87f5edb3cee10b0c0df46bc9ffb3 + get-func-name: ^2.0.1 + checksum: 96c058ec7167598e238bb7fb9def2f9339215e97d6685d9c1e3e4bdb33d14600e11fe7a812cf0c003dfb73ca2df374f146280b2287cae9e8d989e9d7a69a203b languageName: node linkType: hard @@ -7873,6 +8152,20 @@ __metadata: languageName: node linkType: hard +"lowercase-keys@npm:^3.0.0": + version: 3.0.0 + resolution: "lowercase-keys@npm:3.0.0" + checksum: 67a3f81409af969bc0c4ca0e76cd7d16adb1e25aa1c197229587eaf8671275c8c067cd421795dbca4c81be0098e4c426a086a05e30de8a9c587b7a13c0c7ccc5 + languageName: node + linkType: hard + +"lru-cache@npm:^10.0.1, lru-cache@npm:^9.1.1 || ^10.0.0": + version: 10.1.0 + resolution: "lru-cache@npm:10.1.0" + checksum: 58056d33e2500fbedce92f8c542e7c11b50d7d086578f14b7074d8c241422004af0718e08a6eaae8705cee09c77e39a61c1c79e9370ba689b7010c152e6a76ab + languageName: node + linkType: hard + "lru-cache@npm:^4.0.1": version: 4.1.5 resolution: "lru-cache@npm:4.1.5" @@ -7901,13 +8194,6 @@ __metadata: languageName: node linkType: hard -"lru-cache@npm:^7.4.0, lru-cache@npm:^7.7.1": - version: 7.8.1 - resolution: "lru-cache@npm:7.8.1" - checksum: 31ea67388c9774300331d70f4affd5a433869bcf0fae5405f967d19d7b447930b713b0566a2e95362c9082034a8b496f3671ccf8f0c061d8e8048412663f9432 - languageName: node - linkType: hard - "lru_map@npm:^0.3.3": version: 0.3.3 resolution: "lru_map@npm:0.3.3" @@ -7929,27 +8215,22 @@ __metadata: languageName: node linkType: hard -"make-fetch-happen@npm:^10.0.3": - version: 10.1.2 - resolution: "make-fetch-happen@npm:10.1.2" +"make-fetch-happen@npm:^13.0.0": + version: 13.0.0 + resolution: "make-fetch-happen@npm:13.0.0" dependencies: - agentkeepalive: ^4.2.1 - cacache: ^16.0.2 - http-cache-semantics: ^4.1.0 - http-proxy-agent: ^5.0.0 - https-proxy-agent: ^5.0.0 + "@npmcli/agent": ^2.0.0 + cacache: ^18.0.0 + http-cache-semantics: ^4.1.1 is-lambda: ^1.0.1 - lru-cache: ^7.7.1 - minipass: ^3.1.6 - minipass-collect: ^1.0.2 - minipass-fetch: ^2.0.3 + minipass: ^7.0.2 + minipass-fetch: ^3.0.0 minipass-flush: ^1.0.5 minipass-pipeline: ^1.2.4 negotiator: ^0.6.3 promise-retry: ^2.0.1 - socks-proxy-agent: ^6.1.1 - ssri: ^9.0.0 - checksum: 42825d119a7e4f5b1a8e7048a86d328cd36bb1ff875d155ce7079d9a0afdd310c198fb310096af358cfa9ecdf643cecf960380686792457dccb36e17efe89eb0 + ssri: ^10.0.0 + checksum: 7c7a6d381ce919dd83af398b66459a10e2fe8f4504f340d1d090d3fa3d1b0c93750220e1d898114c64467223504bd258612ba83efbc16f31b075cd56de24b4af languageName: node linkType: hard @@ -8085,6 +8366,13 @@ __metadata: languageName: node linkType: hard +"micro-ftch@npm:^0.3.1": + version: 0.3.1 + resolution: "micro-ftch@npm:0.3.1" + checksum: 0e496547253a36e98a83fb00c628c53c3fb540fa5aaeaf718438873785afd193244988c09d219bb1802984ff227d04938d9571ef90fe82b48bd282262586aaff + languageName: node + linkType: hard + "micromatch@npm:^4.0.2, micromatch@npm:^4.0.4": version: 4.0.5 resolution: "micromatch@npm:4.0.5" @@ -8146,6 +8434,13 @@ __metadata: languageName: node linkType: hard +"mimic-response@npm:^3.1.0": + version: 3.1.0 + resolution: "mimic-response@npm:3.1.0" + checksum: 25739fee32c17f433626bf19f016df9036b75b3d84a3046c7d156e72ec963dd29d7fc8a302f55a3d6c5a4ff24259676b15d915aad6480815a969ff2ec0836867 + languageName: node + linkType: hard + "min-document@npm:^2.19.0": version: 2.19.0 resolution: "min-document@npm:2.19.0" @@ -8176,7 +8471,7 @@ __metadata: languageName: node linkType: hard -"minimatch@npm:2 || 3, minimatch@npm:^3.0.4, minimatch@npm:^3.1.2": +"minimatch@npm:2 || 3, minimatch@npm:^3.0.4, minimatch@npm:^3.0.5, minimatch@npm:^3.1.1, minimatch@npm:^3.1.2": version: 3.1.2 resolution: "minimatch@npm:3.1.2" dependencies: @@ -8185,15 +8480,6 @@ __metadata: languageName: node linkType: hard -"minimatch@npm:3.0.4": - version: 3.0.4 - resolution: "minimatch@npm:3.0.4" - dependencies: - brace-expansion: ^1.1.7 - checksum: 66ac295f8a7b59788000ea3749938b0970344c841750abd96694f80269b926ebcafad3deeb3f1da2522978b119e6ae3a5869b63b13a7859a456b3408bd18a078 - languageName: node - linkType: hard - "minimatch@npm:5.0.1": version: 5.0.1 resolution: "minimatch@npm:5.0.1" @@ -8203,6 +8489,15 @@ __metadata: languageName: node linkType: hard +"minimatch@npm:^9.0.1": + version: 9.0.3 + resolution: "minimatch@npm:9.0.3" + dependencies: + brace-expansion: ^2.0.1 + checksum: 253487976bf485b612f16bf57463520a14f512662e592e95c571afdab1442a6a6864b6c88f248ce6fc4ff0b6de04ac7aa6c8bb51e868e99d1d65eb0658a708b5 + languageName: node + linkType: hard + "minimist-options@npm:^4.0.2": version: 4.1.0 resolution: "minimist-options@npm:4.1.0" @@ -8215,33 +8510,33 @@ __metadata: linkType: hard "minimist@npm:^1.2.0, minimist@npm:^1.2.5, minimist@npm:^1.2.6": - version: 1.2.6 - resolution: "minimist@npm:1.2.6" - checksum: d15428cd1e11eb14e1233bcfb88ae07ed7a147de251441d61158619dfb32c4d7e9061d09cab4825fdee18ecd6fce323228c8c47b5ba7cd20af378ca4048fb3fb + version: 1.2.8 + resolution: "minimist@npm:1.2.8" + checksum: 75a6d645fb122dad29c06a7597bddea977258957ed88d7a6df59b5cd3fe4a527e253e9bbf2e783e4b73657f9098b96a5fe96ab8a113655d4109108577ecf85b0 languageName: node linkType: hard -"minipass-collect@npm:^1.0.2": - version: 1.0.2 - resolution: "minipass-collect@npm:1.0.2" +"minipass-collect@npm:^2.0.1": + version: 2.0.1 + resolution: "minipass-collect@npm:2.0.1" dependencies: - minipass: ^3.0.0 - checksum: 14df761028f3e47293aee72888f2657695ec66bd7d09cae7ad558da30415fdc4752bbfee66287dcc6fd5e6a2fa3466d6c484dc1cbd986525d9393b9523d97f10 + minipass: ^7.0.3 + checksum: b251bceea62090f67a6cced7a446a36f4cd61ee2d5cea9aee7fff79ba8030e416327a1c5aa2908dc22629d06214b46d88fdab8c51ac76bacbf5703851b5ad342 languageName: node linkType: hard -"minipass-fetch@npm:^2.0.3": - version: 2.1.0 - resolution: "minipass-fetch@npm:2.1.0" +"minipass-fetch@npm:^3.0.0": + version: 3.0.4 + resolution: "minipass-fetch@npm:3.0.4" dependencies: encoding: ^0.1.13 - minipass: ^3.1.6 + minipass: ^7.0.3 minipass-sized: ^1.0.3 minizlib: ^2.1.2 dependenciesMeta: encoding: optional: true - checksum: 1334732859a3f7959ed22589bafd9c40384b885aebb5932328071c33f86b3eb181d54c86919675d1825ab5f1c8e4f328878c863873258d113c29d79a4b0c9c9f + checksum: af7aad15d5c128ab1ebe52e043bdf7d62c3c6f0cecb9285b40d7b395e1375b45dcdfd40e63e93d26a0e8249c9efd5c325c65575aceee192883970ff8cb11364a languageName: node linkType: hard @@ -8282,12 +8577,26 @@ __metadata: languageName: node linkType: hard -"minipass@npm:^3.0.0, minipass@npm:^3.1.1, minipass@npm:^3.1.6": - version: 3.1.6 - resolution: "minipass@npm:3.1.6" +"minipass@npm:^3.0.0": + version: 3.3.6 + resolution: "minipass@npm:3.3.6" dependencies: yallist: ^4.0.0 - checksum: 57a04041413a3531a65062452cb5175f93383ef245d6f4a2961d34386eb9aa8ac11ac7f16f791f5e8bbaf1dfb1ef01596870c88e8822215db57aa591a5bb0a77 + checksum: a30d083c8054cee83cdcdc97f97e4641a3f58ae743970457b1489ce38ee1167b3aaf7d815cd39ec7a99b9c40397fd4f686e83750e73e652b21cb516f6d845e48 + languageName: node + linkType: hard + +"minipass@npm:^5.0.0": + version: 5.0.0 + resolution: "minipass@npm:5.0.0" + checksum: 425dab288738853fded43da3314a0b5c035844d6f3097a8e3b5b29b328da8f3c1af6fc70618b32c29ff906284cf6406b6841376f21caaadd0793c1d5a6a620ea + languageName: node + linkType: hard + +"minipass@npm:^5.0.0 || ^6.0.2 || ^7.0.0, minipass@npm:^7.0.2, minipass@npm:^7.0.3": + version: 7.0.4 + resolution: "minipass@npm:7.0.4" + checksum: 87585e258b9488caf2e7acea242fd7856bbe9a2c84a7807643513a338d66f368c7d518200ad7b70a508664d408aa000517647b2930c259a8b1f9f0984f344a21 languageName: node linkType: hard @@ -8311,9 +8620,9 @@ __metadata: linkType: hard "mixme@npm:^0.5.1": - version: 0.5.4 - resolution: "mixme@npm:0.5.4" - checksum: cec5f6127c92455bc86d592f0a0628e188c7ccf3909bd106703a1d939f0e2f451ddaac6da0d77c5f14d53dd2d58f64f5b2f8ff55a68ec68be95a73d290e4d430 + version: 0.5.10 + resolution: "mixme@npm:0.5.10" + checksum: 51885f19847b98859645a592917f3939d6f262ba3cc1843a3d7858ac894704b054e7a94737a53163bc1e870e3ea23316ba97d3ba20e1dfd292fe74d5a318be98 languageName: node linkType: hard @@ -8326,23 +8635,12 @@ __metadata: languageName: node linkType: hard -"mkdirp@npm:*, mkdirp@npm:^1.0.3, mkdirp@npm:^1.0.4": - version: 1.0.4 - resolution: "mkdirp@npm:1.0.4" - bin: - mkdirp: bin/cmd.js - checksum: a96865108c6c3b1b8e1d5e9f11843de1e077e57737602de1b82030815f311be11f96f09cce59bd5b903d0b29834733e5313f9301e3ed6d6f6fba2eae0df4298f - languageName: node - linkType: hard - -"mkdirp@npm:0.5.5": - version: 0.5.5 - resolution: "mkdirp@npm:0.5.5" - dependencies: - minimist: ^1.2.5 +"mkdirp@npm:*": + version: 3.0.1 + resolution: "mkdirp@npm:3.0.1" bin: - mkdirp: bin/cmd.js - checksum: 3bce20ea525f9477befe458ab85284b0b66c8dc3812f94155af07c827175948cdd8114852ac6c6d82009b13c1048c37f6d98743eb019651ee25c39acc8aabe7d + mkdirp: dist/cjs/src/bin.js + checksum: 972deb188e8fb55547f1e58d66bd6b4a3623bf0c7137802582602d73e6480c1c2268dcbafbfb1be466e00cc7e56ac514d7fd9334b7cf33e3e2ab547c16f83a8d languageName: node linkType: hard @@ -8357,6 +8655,15 @@ __metadata: languageName: node linkType: hard +"mkdirp@npm:^1.0.3, mkdirp@npm:^1.0.4": + version: 1.0.4 + resolution: "mkdirp@npm:1.0.4" + bin: + mkdirp: bin/cmd.js + checksum: a96865108c6c3b1b8e1d5e9f11843de1e077e57737602de1b82030815f311be11f96f09cce59bd5b903d0b29834733e5313f9301e3ed6d6f6fba2eae0df4298f + languageName: node + linkType: hard + "mnemonist@npm:^0.38.0": version: 0.38.5 resolution: "mnemonist@npm:0.38.5" @@ -8398,41 +8705,6 @@ __metadata: languageName: node linkType: hard -"mocha@npm:^7.1.1": - version: 7.2.0 - resolution: "mocha@npm:7.2.0" - dependencies: - ansi-colors: 3.2.3 - browser-stdout: 1.3.1 - chokidar: 3.3.0 - debug: 3.2.6 - diff: 3.5.0 - escape-string-regexp: 1.0.5 - find-up: 3.0.0 - glob: 7.1.3 - growl: 1.10.5 - he: 1.2.0 - js-yaml: 3.13.1 - log-symbols: 3.0.0 - minimatch: 3.0.4 - mkdirp: 0.5.5 - ms: 2.1.1 - node-environment-flags: 1.0.6 - object.assign: 4.1.0 - strip-json-comments: 2.0.1 - supports-color: 6.0.0 - which: 1.3.1 - wide-align: 1.1.3 - yargs: 13.3.2 - yargs-parser: 13.1.2 - yargs-unparser: 1.6.0 - bin: - _mocha: bin/_mocha - mocha: bin/mocha - checksum: d098484fe1b165bb964fdbf6b88b256c71fead47575ca7c5bcf8ed07db0dcff41905f6d2f0a05111a0441efaef9d09241a8cc1ddf7961056b28984ec63ba2874 - languageName: node - linkType: hard - "mock-fs@npm:^4.1.0": version: 4.14.0 resolution: "mock-fs@npm:4.14.0" @@ -8454,13 +8726,6 @@ __metadata: languageName: node linkType: hard -"ms@npm:2.1.1": - version: 2.1.1 - resolution: "ms@npm:2.1.1" - checksum: 0078a23cd916a9a7435c413caa14c57d4b4f6e2470e0ab554b6964163c8a4436448ac7ae020e883685475da6b6796cc396b670f579cb275db288a21e3e57721e - languageName: node - linkType: hard - "ms@npm:2.1.2": version: 2.1.2 resolution: "ms@npm:2.1.2" @@ -8468,7 +8733,7 @@ __metadata: languageName: node linkType: hard -"ms@npm:2.1.3, ms@npm:^2.0.0, ms@npm:^2.1.1": +"ms@npm:2.1.3, ms@npm:^2.1.1": version: 2.1.3 resolution: "ms@npm:2.1.3" checksum: aa92de608021b242401676e35cfa5aa42dd70cbdc082b916da7fb925c542173e36bce97ea3e804923fe92c0ad991434e4a38327e15a1b5b5f945d66df615ae6d @@ -8533,11 +8798,11 @@ __metadata: linkType: hard "nan@npm:^2.14.0, nan@npm:^2.2.1": - version: 2.15.0 - resolution: "nan@npm:2.15.0" + version: 2.18.0 + resolution: "nan@npm:2.18.0" dependencies: node-gyp: latest - checksum: 33e1bb4dfca447fe37d4bb5889be55de154828632c8d38646db67293a21afd61ed9909cdf1b886214a64707d935926c4e60e2b09de9edfc2ad58de31d6ce8f39 + checksum: 4fe42f58456504eab3105c04a5cffb72066b5f22bd45decf33523cb17e7d6abc33cca2a19829407b9000539c5cb25f410312d4dc5b30220167a3594896ea6a0a languageName: node linkType: hard @@ -8557,6 +8822,13 @@ __metadata: languageName: node linkType: hard +"napi-macros@npm:^2.2.2": + version: 2.2.2 + resolution: "napi-macros@npm:2.2.2" + checksum: c6f9bd71cdbbc37ddc3535aa5be481238641d89585b8a3f4d301cb89abf459e2d294810432bb7d12056d1f9350b1a0899a5afcf460237a3da6c398cf0fec7629 + languageName: node + linkType: hard + "napi-macros@npm:~2.0.0": version: 2.0.0 resolution: "napi-macros@npm:2.0.0" @@ -8585,7 +8857,7 @@ __metadata: languageName: node linkType: hard -"neo-async@npm:^2.6.0": +"neo-async@npm:^2.6.2": version: 2.6.2 resolution: "neo-async@npm:2.6.2" checksum: deac9f8d00eda7b2e5cd1b2549e26e10a0faa70adaa6fdadca701cc55f49ee9018e427f424bac0c790b7c7e2d3068db97f3093f1093975f2acb8f8818b936ed9 @@ -8617,19 +8889,9 @@ __metadata: languageName: node linkType: hard -"node-environment-flags@npm:1.0.6": - version: 1.0.6 - resolution: "node-environment-flags@npm:1.0.6" - dependencies: - object.getownpropertydescriptors: ^2.0.3 - semver: ^5.7.0 - checksum: 268139ed0f7fabdca346dcb26931300ec7a1dc54a58085a849e5c78a82b94967f55df40177a69d4e819da278d98686d5c4fd49ab0d7bcff16fda25b6fffc4ca3 - languageName: node - linkType: hard - -"node-fetch@npm:^2.6.7": - version: 2.6.7 - resolution: "node-fetch@npm:2.6.7" +"node-fetch@npm:^2.6.12, node-fetch@npm:^2.6.7": + version: 2.7.0 + resolution: "node-fetch@npm:2.7.0" dependencies: whatwg-url: ^5.0.0 peerDependencies: @@ -8637,7 +8899,7 @@ __metadata: peerDependenciesMeta: encoding: optional: true - checksum: 8d816ffd1ee22cab8301c7756ef04f3437f18dace86a1dae22cf81db8ef29c0bf6655f3215cb0cdb22b420b6fe141e64b26905e7f33f9377a7fa59135ea3e10b + checksum: d76d2f5edb451a3f05b15115ec89fc6be39de37c6089f1b6368df03b91e1633fd379a7e01b7ab05089a25034b2023d959b47e59759cb38d88341b2459e89d6e5 languageName: node linkType: hard @@ -8652,7 +8914,7 @@ __metadata: languageName: node linkType: hard -"node-gyp-build@npm:4.4.0, node-gyp-build@npm:^4.2.0, node-gyp-build@npm:^4.3.0": +"node-gyp-build@npm:4.4.0": version: 4.4.0 resolution: "node-gyp-build@npm:4.4.0" bin: @@ -8663,23 +8925,34 @@ __metadata: languageName: node linkType: hard +"node-gyp-build@npm:^4.2.0, node-gyp-build@npm:^4.3.0": + version: 4.7.1 + resolution: "node-gyp-build@npm:4.7.1" + bin: + node-gyp-build: bin.js + node-gyp-build-optional: optional.js + node-gyp-build-test: build-test.js + checksum: 2ef8248021489db03be3e8098977cdc797b80a9b12b77c6dcb89b0dc89b8c62e6a482672ee298f61021740ae7f080fb33154cfec8fb158cec620f57b0fae87c0 + languageName: node + linkType: hard + "node-gyp@npm:latest": - version: 9.0.0 - resolution: "node-gyp@npm:9.0.0" + version: 10.0.1 + resolution: "node-gyp@npm:10.0.1" dependencies: env-paths: ^2.2.0 - glob: ^7.1.4 + exponential-backoff: ^3.1.1 + glob: ^10.3.10 graceful-fs: ^4.2.6 - make-fetch-happen: ^10.0.3 - nopt: ^5.0.0 - npmlog: ^6.0.0 - rimraf: ^3.0.2 + make-fetch-happen: ^13.0.0 + nopt: ^7.0.0 + proc-log: ^3.0.0 semver: ^7.3.5 tar: ^6.1.2 - which: ^2.0.2 + which: ^4.0.0 bin: node-gyp: bin/node-gyp.js - checksum: 4d8ef8860f7e4f4d86c91db3f519d26ed5cc23b48fe54543e2afd86162b4acbd14f21de42a5db344525efb69a991e021b96a68c70c6e2d5f4a5cb770793da6d3 + checksum: 60a74e66d364903ce02049966303a57f898521d139860ac82744a5fdd9f7b7b3b61f75f284f3bfe6e6add3b8f1871ce305a1d41f775c7482de837b50c792223f languageName: node linkType: hard @@ -8701,14 +8974,14 @@ __metadata: languageName: node linkType: hard -"nopt@npm:^5.0.0": - version: 5.0.0 - resolution: "nopt@npm:5.0.0" +"nopt@npm:^7.0.0": + version: 7.2.0 + resolution: "nopt@npm:7.2.0" dependencies: - abbrev: 1 + abbrev: ^2.0.0 bin: nopt: bin/nopt.js - checksum: d35fdec187269503843924e0114c0c6533fb54bbf1620d0f28b4b60ba01712d6687f62565c55cc20a504eff0fbe5c63e22340c3fad549ad40469ffb611b04f2f + checksum: a9c0f57fb8cb9cc82ae47192ca2b7ef00e199b9480eed202482c962d61b59a7fbe7541920b2a5839a97b42ee39e288c0aed770e38057a608d7f579389dfde410 languageName: node linkType: hard @@ -8738,15 +9011,10 @@ __metadata: languageName: node linkType: hard -"npmlog@npm:^6.0.0": - version: 6.0.1 - resolution: "npmlog@npm:6.0.1" - dependencies: - are-we-there-yet: ^3.0.0 - console-control-strings: ^1.1.0 - gauge: ^4.0.0 - set-blocking: ^2.0.0 - checksum: f1a4078a73ebc89896a832bbf869f491c32ecb12e0434b9a7499878ce8f29f22e72befe3c53cd8cdc9dbf4b4057297e783ab0b6746a8b067734de6205af4d538 +"normalize-url@npm:^6.0.1": + version: 6.1.0 + resolution: "normalize-url@npm:6.1.0" + checksum: 4a4944631173e7d521d6b80e4c85ccaeceb2870f315584fa30121f505a6dfd86439c5e3fdd8cd9e0e291290c41d0c3599f0cb12ab356722ed242584c30348e50 languageName: node linkType: hard @@ -8774,70 +9042,70 @@ __metadata: languageName: node linkType: hard -"object-inspect@npm:^1.12.0, object-inspect@npm:^1.9.0": - version: 1.12.0 - resolution: "object-inspect@npm:1.12.0" - checksum: 2b36d4001a9c921c6b342e2965734519c9c58c355822243c3207fbf0aac271f8d44d30d2d570d450b2cc6f0f00b72bcdba515c37827d2560e5f22b1899a31cf4 +"object-inspect@npm:^1.13.1, object-inspect@npm:^1.9.0": + version: 1.13.1 + resolution: "object-inspect@npm:1.13.1" + checksum: 7d9fa9221de3311dcb5c7c307ee5dc011cdd31dc43624b7c184b3840514e118e05ef0002be5388304c416c0eb592feb46e983db12577fc47e47d5752fbbfb61f languageName: node linkType: hard -"object-keys@npm:^1.0.11, object-keys@npm:^1.0.12, object-keys@npm:^1.1.1": +"object-keys@npm:^1.1.1": version: 1.1.1 resolution: "object-keys@npm:1.1.1" checksum: b363c5e7644b1e1b04aa507e88dcb8e3a2f52b6ffd0ea801e4c7a62d5aa559affe21c55a07fd4b1fd55fc03a33c610d73426664b20032405d7b92a1414c34d6a languageName: node linkType: hard -"object.assign@npm:4.1.0": - version: 4.1.0 - resolution: "object.assign@npm:4.1.0" +"object.assign@npm:^4.1.4": + version: 4.1.5 + resolution: "object.assign@npm:4.1.5" dependencies: - define-properties: ^1.1.2 - function-bind: ^1.1.1 - has-symbols: ^1.0.0 - object-keys: ^1.0.11 - checksum: 648a9a463580bf48332d9a49a76fede2660ab1ee7104d9459b8a240562246da790b4151c3c073f28fda31c1fdc555d25a1d871e72be403e997e4468c91f4801f + call-bind: ^1.0.5 + define-properties: ^1.2.1 + has-symbols: ^1.0.3 + object-keys: ^1.1.1 + checksum: f9aeac0541661370a1fc86e6a8065eb1668d3e771f7dbb33ee54578201336c057b21ee61207a186dd42db0c62201d91aac703d20d12a79fc79c353eed44d4e25 languageName: node linkType: hard -"object.assign@npm:^4.1.2": - version: 4.1.2 - resolution: "object.assign@npm:4.1.2" +"object.fromentries@npm:^2.0.7": + version: 2.0.7 + resolution: "object.fromentries@npm:2.0.7" dependencies: - call-bind: ^1.0.0 - define-properties: ^1.1.3 - has-symbols: ^1.0.1 - object-keys: ^1.1.1 - checksum: d621d832ed7b16ac74027adb87196804a500d80d9aca536fccb7ba48d33a7e9306a75f94c1d29cbfa324bc091bfc530bc24789568efdaee6a47fcfa298993814 + call-bind: ^1.0.2 + define-properties: ^1.2.0 + es-abstract: ^1.22.1 + checksum: 7341ce246e248b39a431b87a9ddd331ff52a454deb79afebc95609f94b1f8238966cf21f52188f2a353f0fdf83294f32f1ebf1f7826aae915ebad21fd0678065 languageName: node linkType: hard -"object.getownpropertydescriptors@npm:^2.0.3": - version: 2.1.3 - resolution: "object.getownpropertydescriptors@npm:2.1.3" +"object.groupby@npm:^1.0.1": + version: 1.0.1 + resolution: "object.groupby@npm:1.0.1" dependencies: call-bind: ^1.0.2 - define-properties: ^1.1.3 - es-abstract: ^1.19.1 - checksum: 1467873456fd367a0eb91350caff359a8f05ceb069b4535a1846aa1f74f477a49ae704f6c89c0c14cc0ae1518ee3a0aa57c7f733a8e7b2b06b34a818e9593d2f + define-properties: ^1.2.0 + es-abstract: ^1.22.1 + get-intrinsic: ^1.2.1 + checksum: d7959d6eaaba358b1608066fc67ac97f23ce6f573dc8fc661f68c52be165266fcb02937076aedb0e42722fdda0bdc0bbf74778196ac04868178888e9fd3b78b5 languageName: node linkType: hard -"object.values@npm:^1.1.5": - version: 1.1.5 - resolution: "object.values@npm:1.1.5" +"object.values@npm:^1.1.7": + version: 1.1.7 + resolution: "object.values@npm:1.1.7" dependencies: call-bind: ^1.0.2 - define-properties: ^1.1.3 - es-abstract: ^1.19.1 - checksum: 0f17e99741ebfbd0fa55ce942f6184743d3070c61bd39221afc929c8422c4907618c8da694c6915bc04a83ab3224260c779ba37fc07bb668bdc5f33b66a902a4 + define-properties: ^1.2.0 + es-abstract: ^1.22.1 + checksum: f3e4ae4f21eb1cc7cebb6ce036d4c67b36e1c750428d7b7623c56a0db90edced63d08af8a316d81dfb7c41a3a5fa81b05b7cc9426e98d7da986b1682460f0777 languageName: node linkType: hard "obliterator@npm:^2.0.0": - version: 2.0.2 - resolution: "obliterator@npm:2.0.2" - checksum: 0aea7665bb200c17f782845d55e2a0cb10865f5c4d1a5808e778349147c025b811505ca317947b9dc4cace54a716ef74e988a91ffd05fea850c8ddcdd7b6a143 + version: 2.0.4 + resolution: "obliterator@npm:2.0.4" + checksum: f28ad35b6d812089315f375dc3e6e5f9bebf958ebe4b10ccd471c7115cbcf595e74bdac4783ae758e5b1f47e3096427fdb37cfa7bed566b132df92ff317b9a7c languageName: node linkType: hard @@ -8859,15 +9127,6 @@ __metadata: languageName: node linkType: hard -"on-finished@npm:~2.3.0": - version: 2.3.0 - resolution: "on-finished@npm:2.3.0" - dependencies: - ee-first: 1.1.1 - checksum: 1db595bd963b0124d6fa261d18320422407b8f01dc65863840f3ddaaf7bcad5b28ff6847286703ca53f4ec19595bd67a2f1253db79fc4094911ec6aa8df1671b - languageName: node - linkType: hard - "once@npm:1.x, once@npm:^1.3.0, once@npm:^1.3.1, once@npm:^1.4.0": version: 1.4.0 resolution: "once@npm:1.4.0" @@ -8900,17 +9159,17 @@ __metadata: languageName: node linkType: hard -"optionator@npm:^0.9.1": - version: 0.9.1 - resolution: "optionator@npm:0.9.1" +"optionator@npm:^0.9.3": + version: 0.9.3 + resolution: "optionator@npm:0.9.3" dependencies: + "@aashutoshrathi/word-wrap": ^1.2.3 deep-is: ^0.1.3 fast-levenshtein: ^2.0.6 levn: ^0.4.1 prelude-ls: ^1.2.1 type-check: ^0.4.0 - word-wrap: ^1.2.3 - checksum: dbc6fa065604b24ea57d734261914e697bd73b69eff7f18e967e8912aa2a40a19a9f599a507fa805be6c13c24c4eae8c71306c239d517d42d4c041c942f508a0 + checksum: 09281999441f2fe9c33a5eeab76700795365a061563d66b098923eb719251a42bdbe432790d35064d0816ead9296dbeb1ad51a733edf4167c96bd5d0882e428a languageName: node linkType: hard @@ -8945,13 +9204,6 @@ __metadata: languageName: node linkType: hard -"p-cancelable@npm:^0.3.0": - version: 0.3.0 - resolution: "p-cancelable@npm:0.3.0" - checksum: 2b27639be8f7f8718f2854c1711f713c296db00acc4675975b1531ecb6253da197304b4a211a330a8e54e754d28d4b3f7feecb48f0566dd265e3ba6745cd4148 - languageName: node - linkType: hard - "p-cancelable@npm:^1.0.0": version: 1.1.0 resolution: "p-cancelable@npm:1.1.0" @@ -8959,6 +9211,20 @@ __metadata: languageName: node linkType: hard +"p-cancelable@npm:^2.0.0": + version: 2.1.1 + resolution: "p-cancelable@npm:2.1.1" + checksum: 3dba12b4fb4a1e3e34524535c7858fc82381bbbd0f247cc32dedc4018592a3950ce66b106d0880b4ec4c2d8d6576f98ca885dc1d7d0f274d1370be20e9523ddf + languageName: node + linkType: hard + +"p-cancelable@npm:^3.0.0": + version: 3.0.0 + resolution: "p-cancelable@npm:3.0.0" + checksum: 2b5ae34218f9c2cf7a7c18e5d9a726ef9b165ef07e6c959f6738371509e747334b5f78f3bcdeb03d8a12dcb978faf641fd87eb21486ed7d36fb823b8ddef3219 + languageName: node + linkType: hard + "p-filter@npm:^2.1.0": version: 2.1.0 resolution: "p-filter@npm:2.1.0" @@ -8968,13 +9234,6 @@ __metadata: languageName: node linkType: hard -"p-finally@npm:^1.0.0": - version: 1.0.0 - resolution: "p-finally@npm:1.0.0" - checksum: 93a654c53dc805dd5b5891bab16eb0ea46db8f66c4bfd99336ae929323b1af2b70a8b0654f8f1eae924b2b73d037031366d645f1fd18b3d30cbd15950cc4b1d4 - languageName: node - linkType: hard - "p-limit@npm:^1.1.0": version: 1.3.0 resolution: "p-limit@npm:1.3.0" @@ -8984,7 +9243,7 @@ __metadata: languageName: node linkType: hard -"p-limit@npm:^2.0.0, p-limit@npm:^2.2.0": +"p-limit@npm:^2.2.0": version: 2.3.0 resolution: "p-limit@npm:2.3.0" dependencies: @@ -9011,15 +9270,6 @@ __metadata: languageName: node linkType: hard -"p-locate@npm:^3.0.0": - version: 3.0.0 - resolution: "p-locate@npm:3.0.0" - dependencies: - p-limit: ^2.0.0 - checksum: 83991734a9854a05fe9dbb29f707ea8a0599391f52daac32b86f08e21415e857ffa60f0e120bfe7ce0cc4faf9274a50239c7895fc0d0579d08411e513b83a4ae - languageName: node - linkType: hard - "p-locate@npm:^4.1.0": version: 4.1.0 resolution: "p-locate@npm:4.1.0" @@ -9054,15 +9304,6 @@ __metadata: languageName: node linkType: hard -"p-timeout@npm:^1.1.1": - version: 1.2.1 - resolution: "p-timeout@npm:1.2.1" - dependencies: - p-finally: ^1.0.0 - checksum: 65a456f49cca1328774a6bfba61aac98d854b36df9153c2887f82f078d4399e9a30463be8a479871c22ed350a23b34a66ff303ca652b9d81ed4ff5260ac660d2 - languageName: node - linkType: hard - "p-try@npm:^1.0.0": version: 1.0.0 resolution: "p-try@npm:1.0.0" @@ -9174,6 +9415,16 @@ __metadata: languageName: node linkType: hard +"path-scurry@npm:^1.10.1": + version: 1.10.1 + resolution: "path-scurry@npm:1.10.1" + dependencies: + lru-cache: ^9.1.1 || ^10.0.0 + minipass: ^5.0.0 || ^6.0.2 || ^7.0.0 + checksum: e2557cff3a8fb8bc07afdd6ab163a92587884f9969b05bbbaf6fe7379348bfb09af9ed292af12ed32398b15fb443e81692047b786d1eeb6d898a51eb17ed7d90 + languageName: node + linkType: hard + "path-to-regexp@npm:0.1.7": version: 0.1.7 resolution: "path-to-regexp@npm:0.1.7" @@ -9239,14 +9490,14 @@ __metadata: linkType: hard "preferred-pm@npm:^3.0.0": - version: 3.0.3 - resolution: "preferred-pm@npm:3.0.3" + version: 3.1.2 + resolution: "preferred-pm@npm:3.1.2" dependencies: find-up: ^5.0.0 find-yarn-workspace-root2: 1.2.16 path-exists: ^4.0.0 which-pm: 2.0.0 - checksum: 0de0948cb6ae22213f2ad7868032d89f1e1443d9caabc22ceeb9d284f19d359d65b67fab178f4db5c8c6ca6ae34642bdc72730b70ab1899ea158e2677a88a6d0 + checksum: d66019f36765c4e241197cd34e2718c03d7eff953b94dacb278df9326767ccc2744d4e0bcab265fd9bb036f704ed5f3909d02594cd5663bd640a160fe4c1446c languageName: node linkType: hard @@ -9264,13 +9515,6 @@ __metadata: languageName: node linkType: hard -"prepend-http@npm:^1.0.1": - version: 1.0.4 - resolution: "prepend-http@npm:1.0.4" - checksum: 01e7baf4ad38af02257b99098543469332fc42ae50df33d97a124bf8172295907352fa6138c9b1610c10c6dd0847ca736e53fda736387cc5cf8fcffe96b47f29 - languageName: node - linkType: hard - "prepend-http@npm:^2.0.0": version: 2.0.0 resolution: "prepend-http@npm:2.0.0" @@ -9287,21 +9531,19 @@ __metadata: languageName: node linkType: hard -"prettier@npm:^1.19.1": - version: 1.19.1 - resolution: "prettier@npm:1.19.1" +"prettier@npm:^2.3.1, prettier@npm:^2.7.1": + version: 2.8.8 + resolution: "prettier@npm:2.8.8" bin: - prettier: ./bin-prettier.js - checksum: bc78219e0f8173a808f4c6c8e0a137dd8ebd4fbe013e63fe1a37a82b48612f17b8ae8e18a992adf802ee2cf7428f14f084e7c2846ca5759cf4013c6e54810e1f + prettier: bin-prettier.js + checksum: b49e409431bf129dd89238d64299ba80717b57ff5a6d1c1a8b1a28b590d998a34e083fa13573bc732bb8d2305becb4c9a4407f8486c81fa7d55100eb08263cf8 languageName: node linkType: hard -"prettier@npm:^2.3.1": - version: 2.6.2 - resolution: "prettier@npm:2.6.2" - bin: - prettier: bin-prettier.js - checksum: 48d08dde8e9fb1f5bccdd205baa7f192e9fc8bc98f86e1b97d919de804e28c806b0e6cc685e4a88211aa7987fa9668f30baae19580d87ced3ed0f2ec6572106f +"proc-log@npm:^3.0.0": + version: 3.0.0 + resolution: "proc-log@npm:3.0.0" + checksum: 02b64e1b3919e63df06f836b98d3af002b5cd92655cab18b5746e37374bfb73e03b84fe305454614b34c25b485cc687a9eebdccf0242cda8fda2475dd2c97e02 languageName: node linkType: hard @@ -9319,13 +9561,6 @@ __metadata: languageName: node linkType: hard -"promise-inflight@npm:^1.0.1": - version: 1.0.1 - resolution: "promise-inflight@npm:1.0.1" - checksum: 22749483091d2c594261517f4f80e05226d4d5ecc1fc917e1886929da56e22b5718b7f2a75f3807e7a7d471bc3be2907fe92e6e8f373ddf5c64bae35b5af3981 - languageName: node - linkType: hard - "promise-retry@npm:^2.0.1": version: 2.0.1 resolution: "promise-retry@npm:2.0.1" @@ -9337,11 +9572,11 @@ __metadata: linkType: hard "promise@npm:^8.0.0": - version: 8.1.0 - resolution: "promise@npm:8.1.0" + version: 8.3.0 + resolution: "promise@npm:8.3.0" dependencies: asap: ~2.0.6 - checksum: 89b71a56154ed7d66a73236d8e8351a9c59adddba3929ecc845f75421ff37fc08ea0c67ad76cd5c0b0d81812c7d07a32bed27e7df5fcc960c6d68b0c1cd771f7 + checksum: a69f0ddbddf78ffc529cffee7ad950d307347615970564b17988ce43fbe767af5c738a9439660b24a9a8cbea106c0dcbb6c2b20e23b7e96a8e89e5c2679e94d5 languageName: node linkType: hard @@ -9355,6 +9590,13 @@ __metadata: languageName: node linkType: hard +"proxy-from-env@npm:^1.1.0": + version: 1.1.0 + resolution: "proxy-from-env@npm:1.1.0" + checksum: ed7fcc2ba0a33404958e34d95d18638249a68c430e30fcb6c478497d72739ba64ce9810a24f53a7d921d0c065e5b78e3822759800698167256b04659366ca4d4 + languageName: node + linkType: hard + "prr@npm:~1.0.1": version: 1.0.1 resolution: "prr@npm:1.0.1" @@ -9370,9 +9612,9 @@ __metadata: linkType: hard "psl@npm:^1.1.28": - version: 1.8.0 - resolution: "psl@npm:1.8.0" - checksum: 6150048ed2da3f919478bee8a82f3828303bc0fc730fb015a48f83c9977682c7b28c60ab01425a72d82a2891a1681627aa530a991d50c086b48a3be27744bde7 + version: 1.9.0 + resolution: "psl@npm:1.9.0" + checksum: 20c4277f640c93d393130673f392618e9a8044c6c7bf61c53917a0fddb4952790f5f362c6c730a9c32b124813e173733f9895add8d26f566ed0ea0654b2e711d languageName: node linkType: hard @@ -9400,13 +9642,6 @@ __metadata: languageName: node linkType: hard -"punycode@npm:1.3.2": - version: 1.3.2 - resolution: "punycode@npm:1.3.2" - checksum: b8807fd594b1db33335692d1f03e8beeddde6fda7fbb4a2e32925d88d20a3aa4cd8dcc0c109ccaccbd2ba761c208dfaaada83007087ea8bfb0129c9ef1b99ed6 - languageName: node - linkType: hard - "punycode@npm:2.1.0": version: 2.1.0 resolution: "punycode@npm:2.1.0" @@ -9414,26 +9649,35 @@ __metadata: languageName: node linkType: hard +"punycode@npm:^1.4.1": + version: 1.4.1 + resolution: "punycode@npm:1.4.1" + checksum: fa6e698cb53db45e4628559e557ddaf554103d2a96a1d62892c8f4032cd3bc8871796cae9eabc1bc700e2b6677611521ce5bb1d9a27700086039965d0cf34518 + languageName: node + linkType: hard + "punycode@npm:^2.1.0, punycode@npm:^2.1.1": - version: 2.1.1 - resolution: "punycode@npm:2.1.1" - checksum: 823bf443c6dd14f669984dea25757b37993f67e8d94698996064035edd43bed8a5a17a9f12e439c2b35df1078c6bec05a6c86e336209eb1061e8025c481168e8 + version: 2.3.1 + resolution: "punycode@npm:2.3.1" + checksum: bb0a0ceedca4c3c57a9b981b90601579058903c62be23c5e8e843d2c2d4148a3ecf029d5133486fb0e1822b098ba8bba09e89d6b21742d02fa26bda6441a6fb2 languageName: node linkType: hard -"qs@npm:6.10.3, qs@npm:^6.4.0, qs@npm:^6.7.0": - version: 6.10.3 - resolution: "qs@npm:6.10.3" +"qs@npm:6.11.0": + version: 6.11.0 + resolution: "qs@npm:6.11.0" dependencies: side-channel: ^1.0.4 - checksum: 0fac5e6c7191d0295a96d0e83c851aeb015df7e990e4d3b093897d3ac6c94e555dbd0a599739c84d7fa46d7fee282d94ba76943983935cf33bba6769539b8019 + checksum: 6e1f29dd5385f7488ec74ac7b6c92f4d09a90408882d0c208414a34dd33badc1a621019d4c799a3df15ab9b1d0292f97c1dd71dc7c045e69f81a8064e5af7297 languageName: node linkType: hard -"qs@npm:6.9.7": - version: 6.9.7 - resolution: "qs@npm:6.9.7" - checksum: 5bbd263332ccf320a1f36d04a2019a5834dc20bcb736431eaccde2a39dcba03fb26d2fd00174f5d7bc26aaad1cad86124b18440883ac042ea2a0fca6170c1bf1 +"qs@npm:^6.11.2, qs@npm:^6.4.0, qs@npm:^6.7.0": + version: 6.11.2 + resolution: "qs@npm:6.11.2" + dependencies: + side-channel: ^1.0.4 + checksum: e812f3c590b2262548647d62f1637b6989cc56656dc960b893fe2098d96e1bd633f36576f4cd7564dfbff9db42e17775884db96d846bebe4f37420d073ecdc0b languageName: node linkType: hard @@ -9455,13 +9699,6 @@ __metadata: languageName: node linkType: hard -"querystring@npm:0.2.0": - version: 0.2.0 - resolution: "querystring@npm:0.2.0" - checksum: 8258d6734f19be27e93f601758858c299bdebe71147909e367101ba459b95446fbe5b975bf9beb76390156a592b6f4ac3a68b6087cea165c259705b8b4e56a69 - languageName: node - linkType: hard - "queue-microtask@npm:^1.2.2, queue-microtask@npm:^1.2.3": version: 1.2.3 resolution: "queue-microtask@npm:1.2.3" @@ -9476,6 +9713,13 @@ __metadata: languageName: node linkType: hard +"quick-lru@npm:^5.1.1": + version: 5.1.1 + resolution: "quick-lru@npm:5.1.1" + checksum: a516faa25574be7947969883e6068dbe4aa19e8ef8e8e0fd96cddd6d36485e9106d85c0041a27153286b0770b381328f4072aa40d3b18a19f5f7d2b78b94b5ed + languageName: node + linkType: hard + "randombytes@npm:^2.0.0, randombytes@npm:^2.0.1, randombytes@npm:^2.0.5, randombytes@npm:^2.1.0": version: 2.1.0 resolution: "randombytes@npm:2.1.0" @@ -9502,27 +9746,27 @@ __metadata: languageName: node linkType: hard -"raw-body@npm:2.4.3": - version: 2.4.3 - resolution: "raw-body@npm:2.4.3" +"raw-body@npm:2.5.1": + version: 2.5.1 + resolution: "raw-body@npm:2.5.1" dependencies: bytes: 3.1.2 - http-errors: 1.8.1 + http-errors: 2.0.0 iconv-lite: 0.4.24 unpipe: 1.0.0 - checksum: d2961fa3c71c9c22dc2c3fd60ff377bf36dfed7d7a748f2b25d585934a3e9df565bb9aa5bc2e3a716ea941f4bc2a6ddc795c8b0cf7219fb071029b59b1985394 + checksum: 5362adff1575d691bb3f75998803a0ffed8c64eabeaa06e54b4ada25a0cd1b2ae7f4f5ec46565d1bec337e08b5ac90c76eaa0758de6f72a633f025d754dec29e languageName: node linkType: hard -"raw-body@npm:2.5.1, raw-body@npm:^2.4.1": - version: 2.5.1 - resolution: "raw-body@npm:2.5.1" +"raw-body@npm:2.5.2, raw-body@npm:^2.4.1": + version: 2.5.2 + resolution: "raw-body@npm:2.5.2" dependencies: bytes: 3.1.2 http-errors: 2.0.0 iconv-lite: 0.4.24 unpipe: 1.0.0 - checksum: 5362adff1575d691bb3f75998803a0ffed8c64eabeaa06e54b4ada25a0cd1b2ae7f4f5ec46565d1bec337e08b5ac90c76eaa0758de6f72a633f025d754dec29e + checksum: ba1583c8d8a48e8fbb7a873fdbb2df66ea4ff83775421bfe21ee120140949ab048200668c47d9ae3880012f6e217052690628cf679ddfbd82c9fc9358d574676 languageName: node linkType: hard @@ -9562,8 +9806,8 @@ __metadata: linkType: hard "readable-stream@npm:^2.2.2": - version: 2.3.7 - resolution: "readable-stream@npm:2.3.7" + version: 2.3.8 + resolution: "readable-stream@npm:2.3.8" dependencies: core-util-is: ~1.0.0 inherits: ~2.0.3 @@ -9572,22 +9816,11 @@ __metadata: safe-buffer: ~5.1.1 string_decoder: ~1.1.1 util-deprecate: ~1.0.1 - checksum: e4920cf7549a60f8aaf694d483a0e61b2a878b969d224f89b3bc788b8d920075132c4b55a7494ee944c7b6a9a0eada28a7f6220d80b0312ece70bbf08eeca755 - languageName: node - linkType: hard - -"readable-stream@npm:^3.1.0, readable-stream@npm:^3.4.0, readable-stream@npm:^3.6.0": - version: 3.6.0 - resolution: "readable-stream@npm:3.6.0" - dependencies: - inherits: ^2.0.3 - string_decoder: ^1.1.1 - util-deprecate: ^1.0.1 - checksum: d4ea81502d3799439bb955a3a5d1d808592cf3133350ed352aeaa499647858b27b1c4013984900238b0873ec8d0d8defce72469fb7a83e61d53f5ad61cb80dc8 + checksum: 65645467038704f0c8aaf026a72fbb588a9e2ef7a75cd57a01702ee9db1c4a1e4b03aaad36861a6a0926546a74d174149c8c207527963e0c2d3eee2f37678a42 languageName: node linkType: hard -"readable-stream@npm:^3.6.2": +"readable-stream@npm:^3.1.0, readable-stream@npm:^3.4.0, readable-stream@npm:^3.6.0, readable-stream@npm:^3.6.2": version: 3.6.2 resolution: "readable-stream@npm:3.6.2" dependencies: @@ -9598,15 +9831,6 @@ __metadata: languageName: node linkType: hard -"readdirp@npm:~3.2.0": - version: 3.2.0 - resolution: "readdirp@npm:3.2.0" - dependencies: - picomatch: ^2.0.4 - checksum: 0456a4465a13eb5eaf40f0e0836b1bc6b9ebe479b48ba6f63a738b127a1990fb7b38f3ec4b4b6052f9230f976bc0558f12812347dc6b42ce4d548cfe82a9b6f3 - languageName: node - linkType: hard - "readdirp@npm:~3.6.0": version: 3.6.0 resolution: "readdirp@npm:3.6.0" @@ -9626,11 +9850,11 @@ __metadata: linkType: hard "recursive-readdir@npm:^2.2.2": - version: 2.2.2 - resolution: "recursive-readdir@npm:2.2.2" + version: 2.2.3 + resolution: "recursive-readdir@npm:2.2.3" dependencies: - minimatch: 3.0.4 - checksum: a6b22994d76458443d4a27f5fd7147ac63ad31bba972666a291d511d4d819ee40ff71ba7524c14f6a565b8cfaf7f48b318f971804b913cf538d58f04e25d1fee + minimatch: ^3.0.5 + checksum: 88ec96e276237290607edc0872b4f9842837b95cfde0cdbb1e00ba9623dfdf3514d44cdd14496ab60a0c2dd180a6ef8a3f1c34599e6cf2273afac9b72a6fb2b5 languageName: node linkType: hard @@ -9651,25 +9875,25 @@ __metadata: languageName: node linkType: hard -"regenerator-runtime@npm:^0.13.4": - version: 0.13.9 - resolution: "regenerator-runtime@npm:0.13.9" - checksum: 65ed455fe5afd799e2897baf691ca21c2772e1a969d19bb0c4695757c2d96249eb74ee3553ea34a91062b2a676beedf630b4c1551cc6299afb937be1426ec55e +"regenerator-runtime@npm:^0.14.0": + version: 0.14.0 + resolution: "regenerator-runtime@npm:0.14.0" + checksum: 1c977ad82a82a4412e4f639d65d22be376d3ebdd30da2c003eeafdaaacd03fc00c2320f18120007ee700900979284fc78a9f00da7fb593f6e6eeebc673fba9a3 languageName: node linkType: hard -"regexp.prototype.flags@npm:^1.4.3": - version: 1.4.3 - resolution: "regexp.prototype.flags@npm:1.4.3" +"regexp.prototype.flags@npm:^1.5.1": + version: 1.5.1 + resolution: "regexp.prototype.flags@npm:1.5.1" dependencies: call-bind: ^1.0.2 - define-properties: ^1.1.3 - functions-have-names: ^1.2.2 - checksum: 51228bae732592adb3ededd5e15426be25f289e9c4ef15212f4da73f4ec3919b6140806374b8894036a86020d054a8d2657d3fee6bb9b4d35d8939c20030b7a6 + define-properties: ^1.2.0 + set-function-name: ^2.0.0 + checksum: 869edff00288442f8d7fa4c9327f91d85f3b3acf8cbbef9ea7a220345cf23e9241b6def9263d2c1ebcf3a316b0aa52ad26a43a84aa02baca3381717b3e307f47 languageName: node linkType: hard -"regexpp@npm:^3.0.0, regexpp@npm:^3.2.0": +"regexpp@npm:^3.0.0": version: 3.2.0 resolution: "regexpp@npm:3.2.0" checksum: a78dc5c7158ad9ddcfe01aa9144f46e192ddbfa7b263895a70a5c6c73edd9ce85faf7c0430e59ac38839e1734e275b9c3de5c57ee3ab6edc0e0b1bdebefccef8 @@ -9694,31 +9918,7 @@ __metadata: languageName: node linkType: hard -"request-promise-core@npm:1.1.4": - version: 1.1.4 - resolution: "request-promise-core@npm:1.1.4" - dependencies: - lodash: ^4.17.19 - peerDependencies: - request: ^2.34 - checksum: c798bafd552961e36fbf5023b1d081e81c3995ab390f1bc8ef38a711ba3fe4312eb94dbd61887073d7356c3499b9380947d7f62faa805797c0dc50f039425699 - languageName: node - linkType: hard - -"request-promise-native@npm:^1.0.5": - version: 1.0.9 - resolution: "request-promise-native@npm:1.0.9" - dependencies: - request-promise-core: 1.1.4 - stealthy-require: ^1.1.1 - tough-cookie: ^2.3.3 - peerDependencies: - request: ^2.34 - checksum: 3e2c694eefac88cb20beef8911ad57a275ab3ccbae0c4ca6c679fffb09d5fd502458aab08791f0814ca914b157adab2d4e472597c97a73be702918e41725ed69 - languageName: node - linkType: hard - -"request@npm:^2.79.0, request@npm:^2.85.0, request@npm:^2.88.0": +"request@npm:^2.79.0, request@npm:^2.85.0": version: 2.88.2 resolution: "request@npm:2.88.2" dependencies: @@ -9774,6 +9974,13 @@ __metadata: languageName: node linkType: hard +"resolve-alpn@npm:^1.0.0, resolve-alpn@npm:^1.2.0": + version: 1.2.1 + resolution: "resolve-alpn@npm:1.2.1" + checksum: f558071fcb2c60b04054c99aebd572a2af97ef64128d59bef7ab73bd50d896a222a056de40ffc545b633d99b304c259ea9d0c06830d5c867c34f0bfa60b8eae0 + languageName: node + linkType: hard + "resolve-from@npm:^3.0.0": version: 3.0.0 resolution: "resolve-from@npm:3.0.0" @@ -9811,16 +10018,16 @@ __metadata: languageName: node linkType: hard -"resolve@npm:^1.1.6, resolve@npm:^1.10.0, resolve@npm:^1.10.1, resolve@npm:^1.20.0, resolve@npm:^1.22.0": - version: 1.22.0 - resolution: "resolve@npm:1.22.0" +"resolve@npm:^1.1.6, resolve@npm:^1.10.0, resolve@npm:^1.10.1, resolve@npm:^1.22.0, resolve@npm:^1.22.4": + version: 1.22.8 + resolution: "resolve@npm:1.22.8" dependencies: - is-core-module: ^2.8.1 + is-core-module: ^2.13.0 path-parse: ^1.0.7 supports-preserve-symlinks-flag: ^1.0.0 bin: resolve: bin/resolve - checksum: a2d14cc437b3a23996f8c7367eee5c7cf8149c586b07ca2ae00e96581ce59455555a1190be9aa92154785cf9f2042646c200d0e00e0bbd2b8a995a93a0ed3e4e + checksum: f8a26958aa572c9b064562750b52131a37c29d072478ea32e129063e2da7f83e31f7f11e7087a18225a8561cfe8d2f0df9dbea7c9d331a897571c0a2527dbb4c languageName: node linkType: hard @@ -9840,16 +10047,16 @@ __metadata: languageName: node linkType: hard -"resolve@patch:resolve@^1.1.6#~builtin, resolve@patch:resolve@^1.10.0#~builtin, resolve@patch:resolve@^1.10.1#~builtin, resolve@patch:resolve@^1.20.0#~builtin, resolve@patch:resolve@^1.22.0#~builtin": - version: 1.22.0 - resolution: "resolve@patch:resolve@npm%3A1.22.0#~builtin::version=1.22.0&hash=07638b" +"resolve@patch:resolve@^1.1.6#~builtin, resolve@patch:resolve@^1.10.0#~builtin, resolve@patch:resolve@^1.10.1#~builtin, resolve@patch:resolve@^1.22.0#~builtin, resolve@patch:resolve@^1.22.4#~builtin": + version: 1.22.8 + resolution: "resolve@patch:resolve@npm%3A1.22.8#~builtin::version=1.22.8&hash=07638b" dependencies: - is-core-module: ^2.8.1 + is-core-module: ^2.13.0 path-parse: ^1.0.7 supports-preserve-symlinks-flag: ^1.0.0 bin: resolve: bin/resolve - checksum: c79ecaea36c872ee4a79e3db0d3d4160b593f2ca16e031d8283735acd01715a203607e9ded3f91f68899c2937fa0d49390cddbe0fb2852629212f3cda283f4a7 + checksum: 5479b7d431cacd5185f8db64bfcb7286ae5e31eb299f4c4f404ad8aa6098b77599563ac4257cb2c37a42f59dfc06a1bec2bcf283bb448f319e37f0feb9a09847 languageName: node linkType: hard @@ -9862,6 +10069,15 @@ __metadata: languageName: node linkType: hard +"responselike@npm:^2.0.0": + version: 2.0.1 + resolution: "responselike@npm:2.0.1" + dependencies: + lowercase-keys: ^2.0.0 + checksum: b122535466e9c97b55e69c7f18e2be0ce3823c5d47ee8de0d9c0b114aa55741c6db8bfbfce3766a94d1272e61bfb1ebf0a15e9310ac5629fbb7446a861b4fd3a + languageName: node + linkType: hard + "restore-cursor@npm:^3.1.0": version: 3.1.0 resolution: "restore-cursor@npm:3.1.0" @@ -9973,11 +10189,23 @@ __metadata: linkType: hard "rxjs@npm:^7.2.0, rxjs@npm:^7.5.5": - version: 7.5.5 - resolution: "rxjs@npm:7.5.5" + version: 7.8.1 + resolution: "rxjs@npm:7.8.1" dependencies: tslib: ^2.1.0 - checksum: e034f60805210cce756dd2f49664a8108780b117cf5d0e2281506e9e6387f7b4f1532d974a8c8b09314fa7a16dd2f6cff3462072a5789672b5dcb45c4173f3c6 + checksum: de4b53db1063e618ec2eca0f7965d9137cabe98cf6be9272efe6c86b47c17b987383df8574861bcced18ebd590764125a901d5506082be84a8b8e364bf05f119 + languageName: node + linkType: hard + +"safe-array-concat@npm:^1.0.1": + version: 1.0.1 + resolution: "safe-array-concat@npm:1.0.1" + dependencies: + call-bind: ^1.0.2 + get-intrinsic: ^1.2.1 + has-symbols: ^1.0.3 + isarray: ^2.0.5 + checksum: 001ecf1d8af398251cbfabaf30ed66e3855127fbceee178179524b24160b49d15442f94ed6c0db0b2e796da76bb05b73bf3cc241490ec9c2b741b41d33058581 languageName: node linkType: hard @@ -9995,6 +10223,17 @@ __metadata: languageName: node linkType: hard +"safe-regex-test@npm:^1.0.0": + version: 1.0.0 + resolution: "safe-regex-test@npm:1.0.0" + dependencies: + call-bind: ^1.0.2 + get-intrinsic: ^1.1.3 + is-regex: ^1.1.4 + checksum: bc566d8beb8b43c01b94e67de3f070fd2781685e835959bbbaaec91cc53381145ca91f69bd837ce6ec244817afa0a5e974fc4e40a2957f0aca68ac3add1ddd34 + languageName: node + linkType: hard + "safer-buffer@npm:>= 2.1.2 < 3, safer-buffer@npm:>= 2.1.2 < 3.0.0, safer-buffer@npm:^2.0.2, safer-buffer@npm:^2.1.0, safer-buffer@npm:~2.1.0": version: 2.1.2 resolution: "safer-buffer@npm:2.1.2" @@ -10083,64 +10322,53 @@ __metadata: languageName: node linkType: hard -"semver@npm:2 || 3 || 4 || 5, semver@npm:^5.4.1, semver@npm:^5.5.0, semver@npm:^5.7.0": - version: 5.7.1 - resolution: "semver@npm:5.7.1" - bin: - semver: ./bin/semver - checksum: 57fd0acfd0bac382ee87cd52cd0aaa5af086a7dc8d60379dfe65fea491fb2489b6016400813930ecd61fd0952dae75c115287a1b16c234b1550887117744dfaf - languageName: node - linkType: hard - -"semver@npm:^6.1.0, semver@npm:^6.3.0": - version: 6.3.0 - resolution: "semver@npm:6.3.0" +"semver@npm:2 || 3 || 4 || 5, semver@npm:^5.5.0": + version: 5.7.2 + resolution: "semver@npm:5.7.2" bin: - semver: ./bin/semver.js - checksum: 1b26ecf6db9e8292dd90df4e781d91875c0dcc1b1909e70f5d12959a23c7eebb8f01ea581c00783bbee72ceeaad9505797c381756326073850dc36ed284b21b9 + semver: bin/semver + checksum: fb4ab5e0dd1c22ce0c937ea390b4a822147a9c53dbd2a9a0132f12fe382902beef4fbf12cf51bb955248d8d15874ce8cd89532569756384f994309825f10b686 languageName: node linkType: hard -"semver@npm:^7.3.4, semver@npm:^7.3.5": - version: 7.3.6 - resolution: "semver@npm:7.3.6" - dependencies: - lru-cache: ^7.4.0 +"semver@npm:^6.1.0, semver@npm:^6.3.0, semver@npm:^6.3.1": + version: 6.3.1 + resolution: "semver@npm:6.3.1" bin: semver: bin/semver.js - checksum: 9845f96b22268190b30025e02feca391451f2bd49b2c51920c27cc56744f64cbe397df089018fdb347d4b4fd800eabbd85661870eb63eb28055d2b72e457f759 + checksum: ae47d06de28836adb9d3e25f22a92943477371292d9b665fb023fae278d345d508ca1958232af086d85e0155aee22e313e100971898bbb8d5d89b8b1d4054ca2 languageName: node linkType: hard -"semver@npm:^7.3.7": - version: 7.3.7 - resolution: "semver@npm:7.3.7" +"semver@npm:^7.3.4, semver@npm:^7.3.5, semver@npm:^7.3.7, semver@npm:^7.5.3": + version: 7.5.4 + resolution: "semver@npm:7.5.4" dependencies: lru-cache: ^6.0.0 bin: semver: bin/semver.js - checksum: 2fa3e877568cd6ce769c75c211beaed1f9fce80b28338cadd9d0b6c40f2e2862bafd62c19a6cff42f3d54292b7c623277bcab8816a2b5521cf15210d43e75232 + checksum: 12d8ad952fa353b0995bf180cdac205a4068b759a140e5d3c608317098b3575ac2f1e09182206bf2eb26120e1c0ed8fb92c48c592f6099680de56bb071423ca3 languageName: node linkType: hard -"send@npm:0.17.2": - version: 0.17.2 - resolution: "send@npm:0.17.2" +"send@npm:0.18.0": + version: 0.18.0 + resolution: "send@npm:0.18.0" dependencies: debug: 2.6.9 - depd: ~1.1.2 - destroy: ~1.0.4 + depd: 2.0.0 + destroy: 1.2.0 encodeurl: ~1.0.2 escape-html: ~1.0.3 etag: ~1.8.1 fresh: 0.5.2 - http-errors: 1.8.1 + http-errors: 2.0.0 mime: 1.6.0 ms: 2.1.3 - on-finished: ~2.3.0 + on-finished: 2.4.1 range-parser: ~1.2.1 - statuses: ~1.5.0 - checksum: c28f36deb4ccba9b8d6e6a1e472b8e7c40a1f51575bdf8f67303568cc9e71131faa3adc36fdb72611616ccad1584358bbe4c3ebf419e663ecc5de868ad3d3f03 + statuses: 2.0.1 + checksum: 74fc07ebb58566b87b078ec63e5a3e41ecd987e4272ba67b7467e86c6ad51bc6b0b0154133b6d8b08a2ddda360464f71382f7ef864700f34844a76c8027817a8 languageName: node linkType: hard @@ -10153,15 +10381,15 @@ __metadata: languageName: node linkType: hard -"serve-static@npm:1.14.2": - version: 1.14.2 - resolution: "serve-static@npm:1.14.2" +"serve-static@npm:1.15.0": + version: 1.15.0 + resolution: "serve-static@npm:1.15.0" dependencies: encodeurl: ~1.0.2 escape-html: ~1.0.3 parseurl: ~1.3.3 - send: 0.17.2 - checksum: d97f3183b1dfcd8ce9c0e37e18e87fd31147ed6c8ee0b2c3a089d795e44ee851ca5061db01574f806d54f4e4b70bc694d9ca64578653514e04a28cbc97a1de05 + send: 0.18.0 + checksum: af57fc13be40d90a12562e98c0b7855cf6e8bd4c107fe9a45c212bf023058d54a1871b1c89511c3958f70626fff47faeb795f5d83f8cf88514dbaeb2b724464d languageName: node linkType: hard @@ -10185,6 +10413,29 @@ __metadata: languageName: node linkType: hard +"set-function-length@npm:^1.1.1": + version: 1.1.1 + resolution: "set-function-length@npm:1.1.1" + dependencies: + define-data-property: ^1.1.1 + get-intrinsic: ^1.2.1 + gopd: ^1.0.1 + has-property-descriptors: ^1.0.0 + checksum: c131d7569cd7e110cafdfbfbb0557249b538477624dfac4fc18c376d879672fa52563b74029ca01f8f4583a8acb35bb1e873d573a24edb80d978a7ee607c6e06 + languageName: node + linkType: hard + +"set-function-name@npm:^2.0.0": + version: 2.0.1 + resolution: "set-function-name@npm:2.0.1" + dependencies: + define-data-property: ^1.0.1 + functions-have-names: ^1.2.3 + has-property-descriptors: ^1.0.0 + checksum: 4975d17d90c40168eee2c7c9c59d023429f0a1690a89d75656306481ece0c3c1fb1ebcc0150ea546d1913e35fbd037bace91372c69e543e51fc5d1f31a9fa126 + languageName: node + linkType: hard + "setimmediate@npm:1.0.4": version: 1.0.4 resolution: "setimmediate@npm:1.0.4" @@ -10284,13 +10535,20 @@ __metadata: languageName: node linkType: hard -"signal-exit@npm:^3.0.2, signal-exit@npm:^3.0.7": +"signal-exit@npm:^3.0.2": version: 3.0.7 resolution: "signal-exit@npm:3.0.7" checksum: a2f098f247adc367dffc27845853e9959b9e88b01cb301658cfe4194352d8d2bb32e18467c786a7fe15f1d44b233ea35633d076d5e737870b7139949d1ab6318 languageName: node linkType: hard +"signal-exit@npm:^4.0.1": + version: 4.1.0 + resolution: "signal-exit@npm:4.1.0" + checksum: 64c757b498cb8629ffa5f75485340594d2f8189e9b08700e69199069c8e3070fb3e255f7ab873c05dc0b3cec412aea7402e10a5990cb6a050bd33ba062a6c549 + languageName: node + linkType: hard + "simple-concat@npm:^1.0.0": version: 1.0.1 resolution: "simple-concat@npm:1.0.1" @@ -10339,24 +10597,24 @@ __metadata: languageName: node linkType: hard -"socks-proxy-agent@npm:^6.1.1": - version: 6.1.1 - resolution: "socks-proxy-agent@npm:6.1.1" +"socks-proxy-agent@npm:^8.0.1": + version: 8.0.2 + resolution: "socks-proxy-agent@npm:8.0.2" dependencies: - agent-base: ^6.0.2 - debug: ^4.3.1 - socks: ^2.6.1 - checksum: 9a8a4f791bba0060315cf7291ca6f9db37d6fc280fd0860d73d8887d3efe4c22e823aa25a8d5375f6079279f8dc91b50c075345179bf832bfe3c7c26d3582e3c + agent-base: ^7.0.2 + debug: ^4.3.4 + socks: ^2.7.1 + checksum: 4fb165df08f1f380881dcd887b3cdfdc1aba3797c76c1e9f51d29048be6e494c5b06d68e7aea2e23df4572428f27a3ec22b3d7c75c570c5346507433899a4b6d languageName: node linkType: hard -"socks@npm:^2.6.1": - version: 2.6.2 - resolution: "socks@npm:2.6.2" +"socks@npm:^2.7.1": + version: 2.7.1 + resolution: "socks@npm:2.7.1" dependencies: - ip: ^1.1.5 + ip: ^2.0.0 smart-buffer: ^4.2.0 - checksum: dd9194293059d737759d5c69273850ad4149f448426249325c4bea0e340d1cf3d266c3b022694b0dcf5d31f759de23657244c481fc1e8322add80b7985c36b5e + checksum: 259d9e3e8e1c9809a7f5c32238c3d4d2a36b39b83851d0f573bfde5f21c4b1288417ce1af06af1452569cd1eb0841169afd4998f0e04ba04656f6b7f0e46d748 languageName: node linkType: hard @@ -10416,8 +10674,8 @@ __metadata: linkType: hard "solidity-coverage@npm:^0.7.20": - version: 0.7.20 - resolution: "solidity-coverage@npm:0.7.20" + version: 0.7.22 + resolution: "solidity-coverage@npm:0.7.22" dependencies: "@solidity-parser/parser": ^0.14.0 "@truffle/provider": ^0.2.24 @@ -10439,11 +10697,11 @@ __metadata: web3-utils: ^1.3.0 bin: solidity-coverage: plugins/bin.js - checksum: b7edad0add5ef761609a116915979cc6d52ea41a041ed6b45796eb2a9c2fc726c2e300c8a1d6b5e48402e9fd0526c7ee38ecdd01b50e52ac32b8e4084d603d27 + checksum: 875415450979068ed559011d13e6d52eb41b8239f650960e5f24fcd61f2509e60955de647663fba3df56a2321e6a6bbad32525cf868aaf37f0eff4774eeb4c32 languageName: node linkType: hard -"source-map-support@npm:^0.5.13, source-map-support@npm:^0.5.6": +"source-map-support@npm:^0.5.13, source-map-support@npm:^0.5.16, source-map-support@npm:^0.5.6": version: 0.5.21 resolution: "source-map-support@npm:0.5.21" dependencies: @@ -10480,12 +10738,12 @@ __metadata: linkType: hard "spdx-correct@npm:^3.0.0": - version: 3.1.1 - resolution: "spdx-correct@npm:3.1.1" + version: 3.2.0 + resolution: "spdx-correct@npm:3.2.0" dependencies: spdx-expression-parse: ^3.0.0 spdx-license-ids: ^3.0.0 - checksum: 77ce438344a34f9930feffa61be0eddcda5b55fc592906ef75621d4b52c07400a97084d8701557b13f7d2aae0cb64f808431f469e566ef3fe0a3a131dcb775a6 + checksum: e9ae98d22f69c88e7aff5b8778dc01c361ef635580e82d29e5c60a6533cc8f4d820803e67d7432581af0cc4fb49973125076ee3b90df191d153e223c004193b2 languageName: node linkType: hard @@ -10507,9 +10765,9 @@ __metadata: linkType: hard "spdx-license-ids@npm:^3.0.0": - version: 3.0.11 - resolution: "spdx-license-ids@npm:3.0.11" - checksum: 1da1acb090257773e60b022094050e810ae9fec874dc1461f65dc0400cd42dd830ab2df6e64fb49c2db3dce386dd0362110780e1b154db7c0bb413488836aaeb + version: 3.0.16 + resolution: "spdx-license-ids@npm:3.0.16" + checksum: 5cdaa85aaa24bd02f9353a2e357b4df0a4f205cb35655f3fd0a5674a4fb77081f28ffd425379214bc3be2c2b7593ce1215df6bcc75884aeee0a9811207feabe2 languageName: node linkType: hard @@ -10521,8 +10779,8 @@ __metadata: linkType: hard "sshpk@npm:^1.7.0": - version: 1.17.0 - resolution: "sshpk@npm:1.17.0" + version: 1.18.0 + resolution: "sshpk@npm:1.18.0" dependencies: asn1: ~0.2.3 assert-plus: ^1.0.0 @@ -10537,16 +10795,16 @@ __metadata: sshpk-conv: bin/sshpk-conv sshpk-sign: bin/sshpk-sign sshpk-verify: bin/sshpk-verify - checksum: ba109f65c8e6c35133b8e6ed5576abeff8aa8d614824b7275ec3ca308f081fef483607c28d97780c1e235818b0f93ed8c8b56d0a5968d5a23fd6af57718c7597 + checksum: 01d43374eee3a7e37b3b82fdbecd5518cbb2e47ccbed27d2ae30f9753f22bd6ffad31225cb8ef013bc3fb7785e686cea619203ee1439a228f965558c367c3cfa languageName: node linkType: hard -"ssri@npm:^9.0.0": - version: 9.0.0 - resolution: "ssri@npm:9.0.0" +"ssri@npm:^10.0.0": + version: 10.0.5 + resolution: "ssri@npm:10.0.5" dependencies: - minipass: ^3.1.1 - checksum: bf33174232d07cc64e77ab1c51b55d28352273380c503d35642a19627e88a2c5f160039bb0a28608a353485075dda084dbf0390c7070f9f284559eb71d01b84b + minipass: ^7.0.3 + checksum: 0a31b65f21872dea1ed3f7c200d7bc1c1b91c15e419deca14f282508ba917cbb342c08a6814c7f68ca4ca4116dd1a85da2bbf39227480e50125a1ceffeecb750 languageName: node linkType: hard @@ -10566,20 +10824,6 @@ __metadata: languageName: node linkType: hard -"statuses@npm:>= 1.5.0 < 2, statuses@npm:~1.5.0": - version: 1.5.0 - resolution: "statuses@npm:1.5.0" - checksum: c469b9519de16a4bb19600205cffb39ee471a5f17b82589757ca7bd40a8d92ebb6ed9f98b5a540c5d302ccbc78f15dc03cc0280dd6e00df1335568a5d5758a5c - languageName: node - linkType: hard - -"stealthy-require@npm:^1.1.1": - version: 1.1.1 - resolution: "stealthy-require@npm:1.1.1" - checksum: 6805b857a9f3a6a1079fc6652278038b81011f2a5b22cbd559f71a6c02087e6f1df941eb10163e3fdc5391ab5807aa46758d4258547c1f5ede31e6d9bfda8dd3 - languageName: node - linkType: hard - "stream-transform@npm:^2.1.3": version: 2.1.3 resolution: "stream-transform@npm:2.1.3" @@ -10589,13 +10833,6 @@ __metadata: languageName: node linkType: hard -"streamsearch@npm:^1.1.0": - version: 1.1.0 - resolution: "streamsearch@npm:1.1.0" - checksum: 1cce16cea8405d7a233d32ca5e00a00169cc0e19fbc02aa839959985f267335d435c07f96e5e0edd0eadc6d39c98d5435fb5bbbdefc62c41834eadc5622ad942 - languageName: node - linkType: hard - "strict-uri-encode@npm:^1.0.0": version: 1.1.0 resolution: "strict-uri-encode@npm:1.1.0" @@ -10610,7 +10847,7 @@ __metadata: languageName: node linkType: hard -"string-width@npm:^1.0.2 || 2 || 3 || 4, string-width@npm:^4.1.0, string-width@npm:^4.2.0, string-width@npm:^4.2.3": +"string-width-cjs@npm:string-width@^4.2.0, string-width@npm:^4.1.0, string-width@npm:^4.2.0, string-width@npm:^4.2.3": version: 4.2.3 resolution: "string-width@npm:4.2.3" dependencies: @@ -10621,7 +10858,7 @@ __metadata: languageName: node linkType: hard -"string-width@npm:^1.0.2 || 2, string-width@npm:^2.1.1": +"string-width@npm:^2.1.1": version: 2.1.1 resolution: "string-width@npm:2.1.1" dependencies: @@ -10631,56 +10868,47 @@ __metadata: languageName: node linkType: hard -"string-width@npm:^3.0.0, string-width@npm:^3.1.0": - version: 3.1.0 - resolution: "string-width@npm:3.1.0" - dependencies: - emoji-regex: ^7.0.1 - is-fullwidth-code-point: ^2.0.0 - strip-ansi: ^5.1.0 - checksum: 57f7ca73d201682816d573dc68bd4bb8e1dff8dc9fcf10470fdfc3474135c97175fec12ea6a159e67339b41e86963112355b64529489af6e7e70f94a7caf08b2 - languageName: node - linkType: hard - -"string.prototype.trimend@npm:^1.0.4": - version: 1.0.4 - resolution: "string.prototype.trimend@npm:1.0.4" +"string-width@npm:^5.0.1, string-width@npm:^5.1.2": + version: 5.1.2 + resolution: "string-width@npm:5.1.2" dependencies: - call-bind: ^1.0.2 - define-properties: ^1.1.3 - checksum: 17e5aa45c3983f582693161f972c1c1fa4bbbdf22e70e582b00c91b6575f01680dc34e83005b98e31abe4d5d29e0b21fcc24690239c106c7b2315aade6a898ac + eastasianwidth: ^0.2.0 + emoji-regex: ^9.2.2 + strip-ansi: ^7.0.1 + checksum: 7369deaa29f21dda9a438686154b62c2c5f661f8dda60449088f9f980196f7908fc39fdd1803e3e01541970287cf5deae336798337e9319a7055af89dafa7193 languageName: node linkType: hard -"string.prototype.trimend@npm:^1.0.5": - version: 1.0.5 - resolution: "string.prototype.trimend@npm:1.0.5" +"string.prototype.trim@npm:^1.2.8": + version: 1.2.8 + resolution: "string.prototype.trim@npm:1.2.8" dependencies: call-bind: ^1.0.2 - define-properties: ^1.1.4 - es-abstract: ^1.19.5 - checksum: d44f543833112f57224e79182debadc9f4f3bf9d48a0414d6f0cbd2a86f2b3e8c0ca1f95c3f8e5b32ae83e91554d79d932fc746b411895f03f93d89ed3dfb6bc + define-properties: ^1.2.0 + es-abstract: ^1.22.1 + checksum: 49eb1a862a53aba73c3fb6c2a53f5463173cb1f4512374b623bcd6b43ad49dd559a06fb5789bdec771a40fc4d2a564411c0a75d35fb27e76bbe738c211ecff07 languageName: node linkType: hard -"string.prototype.trimstart@npm:^1.0.4": - version: 1.0.4 - resolution: "string.prototype.trimstart@npm:1.0.4" +"string.prototype.trimend@npm:^1.0.7": + version: 1.0.7 + resolution: "string.prototype.trimend@npm:1.0.7" dependencies: call-bind: ^1.0.2 - define-properties: ^1.1.3 - checksum: 3fb06818d3cccac5fa3f5f9873d984794ca0e9f6616fae6fcc745885d9efed4e17fe15f832515d9af5e16c279857fdbffdfc489ca4ed577811b017721b30302f + define-properties: ^1.2.0 + es-abstract: ^1.22.1 + checksum: 2375516272fd1ba75992f4c4aa88a7b5f3c7a9ca308d963bcd5645adf689eba6f8a04ebab80c33e30ec0aefc6554181a3a8416015c38da0aa118e60ec896310c languageName: node linkType: hard -"string.prototype.trimstart@npm:^1.0.5": - version: 1.0.5 - resolution: "string.prototype.trimstart@npm:1.0.5" +"string.prototype.trimstart@npm:^1.0.7": + version: 1.0.7 + resolution: "string.prototype.trimstart@npm:1.0.7" dependencies: call-bind: ^1.0.2 - define-properties: ^1.1.4 - es-abstract: ^1.19.5 - checksum: a4857c5399ad709d159a77371eeaa8f9cc284469a0b5e1bfe405de16f1fd4166a8ea6f4180e55032f348d1b679b1599fd4301fbc7a8b72bdb3e795e43f7b1048 + define-properties: ^1.2.0 + es-abstract: ^1.22.1 + checksum: 13d0c2cb0d5ff9e926fa0bec559158b062eed2b68cd5be777ffba782c96b2b492944e47057274e064549b94dd27cf81f48b27a31fee8af5b574cff253e7eb613 languageName: node linkType: hard @@ -10702,6 +10930,15 @@ __metadata: languageName: node linkType: hard +"strip-ansi-cjs@npm:strip-ansi@^6.0.1, strip-ansi@npm:^6.0.0, strip-ansi@npm:^6.0.1": + version: 6.0.1 + resolution: "strip-ansi@npm:6.0.1" + dependencies: + ansi-regex: ^5.0.1 + checksum: f3cd25890aef3ba6e1a74e20896c21a46f482e93df4a06567cebf2b57edabb15133f1f94e57434e0a958d61186087b1008e89c94875d019910a213181a14fc8c + languageName: node + linkType: hard + "strip-ansi@npm:^4.0.0": version: 4.0.0 resolution: "strip-ansi@npm:4.0.0" @@ -10711,21 +10948,12 @@ __metadata: languageName: node linkType: hard -"strip-ansi@npm:^5.0.0, strip-ansi@npm:^5.1.0, strip-ansi@npm:^5.2.0": - version: 5.2.0 - resolution: "strip-ansi@npm:5.2.0" - dependencies: - ansi-regex: ^4.1.0 - checksum: bdb5f76ade97062bd88e7723aa019adbfacdcba42223b19ccb528ffb9fb0b89a5be442c663c4a3fb25268eaa3f6ea19c7c3fbae830bd1562d55adccae1fcec46 - languageName: node - linkType: hard - -"strip-ansi@npm:^6.0.0, strip-ansi@npm:^6.0.1": - version: 6.0.1 - resolution: "strip-ansi@npm:6.0.1" +"strip-ansi@npm:^7.0.1": + version: 7.1.0 + resolution: "strip-ansi@npm:7.1.0" dependencies: - ansi-regex: ^5.0.1 - checksum: f3cd25890aef3ba6e1a74e20896c21a46f482e93df4a06567cebf2b57edabb15133f1f94e57434e0a958d61186087b1008e89c94875d019910a213181a14fc8c + ansi-regex: ^6.0.1 + checksum: 859c73fcf27869c22a4e4d8c6acfe690064659e84bef9458aa6d13719d09ca88dcfd40cbf31fd0be63518ea1a643fe070b4827d353e09533a5b0b9fd4553d64d languageName: node linkType: hard @@ -10754,29 +10982,13 @@ __metadata: languageName: node linkType: hard -"strip-json-comments@npm:2.0.1": - version: 2.0.1 - resolution: "strip-json-comments@npm:2.0.1" - checksum: 1074ccb63270d32ca28edfb0a281c96b94dc679077828135141f27d52a5a398ef5e78bcf22809d23cadc2b81dfbe345eb5fd8699b385c8b1128907dec4a7d1e1 - languageName: node - linkType: hard - -"strip-json-comments@npm:3.1.1, strip-json-comments@npm:^3.1.0, strip-json-comments@npm:^3.1.1": +"strip-json-comments@npm:3.1.1, strip-json-comments@npm:^3.1.1": version: 3.1.1 resolution: "strip-json-comments@npm:3.1.1" checksum: 492f73e27268f9b1c122733f28ecb0e7e8d8a531a6662efbd08e22cccb3f9475e90a1b82cab06a392f6afae6d2de636f977e231296400d0ec5304ba70f166443 languageName: node linkType: hard -"supports-color@npm:6.0.0": - version: 6.0.0 - resolution: "supports-color@npm:6.0.0" - dependencies: - has-flag: ^3.0.0 - checksum: 005b4a7e5d78a9a703454f5b7da34336b82825747724d1f3eefea6c3956afcb33b79b31854a93cef0fc1f2449919ae952f79abbfd09a5b5b43ecd26407d3a3a1 - languageName: node - linkType: hard - "supports-color@npm:8.1.1": version: 8.1.1 resolution: "supports-color@npm:8.1.1" @@ -10821,21 +11033,21 @@ __metadata: linkType: hard "swarm-js@npm:^0.1.40": - version: 0.1.40 - resolution: "swarm-js@npm:0.1.40" + version: 0.1.42 + resolution: "swarm-js@npm:0.1.42" dependencies: bluebird: ^3.5.0 buffer: ^5.0.5 eth-lib: ^0.1.26 fs-extra: ^4.0.2 - got: ^7.1.0 + got: ^11.8.5 mime-types: ^2.1.16 mkdirp-promise: ^5.0.1 mock-fs: ^4.1.0 setimmediate: ^1.0.5 tar: ^4.0.2 xhr-request: ^1.0.1 - checksum: 1de56e0cb02c1c80e041efb2bd2cc7250c5451c3016967266c16d5c1e8c74fe5c3aae45dc46065b1f4d77667a8453b967961ec58b3975469522f566aa840a914 + checksum: bbb54b84232ef113ee106cf8158d1c827fbf84b309799576f61603f63d7653fde7e71df981d07f9e4c41781bbbbd72be77e5a47e6b694d6a83b96a6a20641475 languageName: node linkType: hard @@ -10859,7 +11071,7 @@ __metadata: languageName: node linkType: hard -"table-layout@npm:^1.0.1": +"table-layout@npm:^1.0.2": version: 1.0.2 resolution: "table-layout@npm:1.0.2" dependencies: @@ -10887,16 +11099,16 @@ __metadata: linkType: hard "tar@npm:^6.1.11, tar@npm:^6.1.2": - version: 6.1.11 - resolution: "tar@npm:6.1.11" + version: 6.2.0 + resolution: "tar@npm:6.2.0" dependencies: chownr: ^2.0.0 fs-minipass: ^2.0.0 - minipass: ^3.0.0 + minipass: ^5.0.0 minizlib: ^2.1.1 mkdirp: ^1.0.3 yallist: ^4.0.0 - checksum: a04c07bb9e2d8f46776517d4618f2406fb977a74d914ad98b264fc3db0fe8224da5bec11e5f8902c5b9bcb8ace22d95fbe3c7b36b8593b7dfc8391a25898f32f + checksum: db4d9fe74a2082c3a5016630092c54c8375ff3b280186938cfd104f2e089c4fd9bad58688ef6be9cf186a889671bf355c7cda38f09bbf60604b281715ca57f5c languageName: node linkType: hard @@ -10940,7 +11152,7 @@ __metadata: languageName: node linkType: hard -"timed-out@npm:^4.0.0, timed-out@npm:^4.0.1": +"timed-out@npm:^4.0.1": version: 4.0.1 resolution: "timed-out@npm:4.0.1" checksum: 98efc5d6fc0d2a329277bd4d34f65c1bf44d9ca2b14fd267495df92898f522e6f563c5e9e467c418e0836f5ca1f47a84ca3ee1de79b1cc6fe433834b7f02ec54 @@ -10979,7 +11191,7 @@ __metadata: languageName: node linkType: hard -"tough-cookie@npm:^2.3.3, tough-cookie@npm:~2.5.0": +"tough-cookie@npm:~2.5.0": version: 2.5.0 resolution: "tough-cookie@npm:2.5.0" dependencies: @@ -11004,8 +11216,8 @@ __metadata: linkType: hard "ts-command-line-args@npm:^2.2.0": - version: 2.2.1 - resolution: "ts-command-line-args@npm:2.2.1" + version: 2.5.1 + resolution: "ts-command-line-args@npm:2.5.1" dependencies: chalk: ^4.1.0 command-line-args: ^5.1.1 @@ -11013,7 +11225,7 @@ __metadata: string-format: ^2.0.0 bin: write-markdown: dist/write-markdown.js - checksum: a8f963911ab748c8aeedb4b4e6e8008fa0d8781df34dc5b02a81cb7caa201124f24e048dfdab6f4cd1e06b45383dc983336d617200b7d772905708fb9b9d6d6b + checksum: 7c0a7582e94f1d2160e3dd379851ec4f1758bc673ccd71bae07f839f83051b6b83e0ae14325c2d04ea728e5bde7b7eacfd2ab060b8fd4b8ab29e0bbf77f6c51e languageName: node linkType: hard @@ -11099,15 +11311,15 @@ __metadata: languageName: node linkType: hard -"tsconfig-paths@npm:^3.14.1, tsconfig-paths@npm:^3.5.0": - version: 3.14.1 - resolution: "tsconfig-paths@npm:3.14.1" +"tsconfig-paths@npm:^3.14.1, tsconfig-paths@npm:^3.14.2, tsconfig-paths@npm:^3.5.0": + version: 3.14.2 + resolution: "tsconfig-paths@npm:3.14.2" dependencies: "@types/json5": ^0.0.29 - json5: ^1.0.1 + json5: ^1.0.2 minimist: ^1.2.6 strip-bom: ^3.0.0 - checksum: 8afa01c673ebb4782ba53d3a12df97fa837ce524f8ad38ee4e2b2fd57f5ac79abc21c574e9e9eb014d93efe7fe8214001b96233b5c6ea75bd1ea82afe17a4c6d + checksum: a6162eaa1aed680537f93621b82399c7856afd10ec299867b13a0675e981acac4e0ec00896860480efc59fc10fd0b16fdc928c0b885865b52be62cadac692447 languageName: node linkType: hard @@ -11119,9 +11331,9 @@ __metadata: linkType: hard "tslib@npm:^2.1.0": - version: 2.3.1 - resolution: "tslib@npm:2.3.1" - checksum: de17a98d4614481f7fcb5cd53ffc1aaf8654313be0291e1bfaee4b4bb31a20494b7d218ff2e15017883e8ea9626599b3b0e0229c18383ba9dce89da2adf15cb9 + version: 2.6.2 + resolution: "tslib@npm:2.6.2" + checksum: 329ea56123005922f39642318e3d1f0f8265d1e7fcb92c633e0809521da75eeaca28d2cf96d7248229deb40e5c19adf408259f4b9640afd20d13aecc1430f3ad languageName: node linkType: hard @@ -11144,19 +11356,19 @@ __metadata: linkType: hard "tty-table@npm:^4.1.5": - version: 4.1.6 - resolution: "tty-table@npm:4.1.6" + version: 4.2.3 + resolution: "tty-table@npm:4.2.3" dependencies: chalk: ^4.1.2 - csv: ^5.5.0 - kleur: ^4.1.4 + csv: ^5.5.3 + kleur: ^4.1.5 smartwrap: ^2.0.2 - strip-ansi: ^6.0.0 + strip-ansi: ^6.0.1 wcwidth: ^1.0.1 - yargs: ^17.1.1 + yargs: ^17.7.1 bin: tty-table: adapters/terminal-adapter.js - checksum: 0f689b7d79ad6b9e608299e667a493309901fe802f1c4d66627a90cacb6fe11e0521e1a2dc5a75f793750ecdd849e98292d4874e5e6e988edd928b67045eb847 + checksum: 2d6c429dc91c308cd1c8d0f2e102e08bcc10af21bc99b89179fb414dd0edd6a686026ff53111dfd3a814841bbbb44c55cd827e5a7748f35182c62f13fef5a169 languageName: node linkType: hard @@ -11208,7 +11420,7 @@ __metadata: languageName: node linkType: hard -"type-detect@npm:^4.0.0, type-detect@npm:^4.0.5": +"type-detect@npm:^4.0.0, type-detect@npm:^4.0.8": version: 4.0.8 resolution: "type-detect@npm:4.0.8" checksum: 62b5628bff67c0eb0b66afa371bd73e230399a8d2ad30d852716efcc4656a7516904570cd8631a49a3ce57c10225adf5d0cbdcb47f6b0255fe6557c453925a15 @@ -11274,16 +11486,16 @@ __metadata: languageName: node linkType: hard -"type@npm:^2.5.0": - version: 2.6.0 - resolution: "type@npm:2.6.0" - checksum: 80da01fcc0f6ed5a253dc326530e134000a8f66ea44b6d9687cde2f894f0d0b2486595b0cd040a64f7f79dc3120784236f8c9ef667a8aef03984e049b447cfb4 +"type@npm:^2.7.2": + version: 2.7.2 + resolution: "type@npm:2.7.2" + checksum: 0f42379a8adb67fe529add238a3e3d16699d95b42d01adfe7b9a7c5da297f5c1ba93de39265ba30ffeb37dfd0afb3fb66ae09f58d6515da442219c086219f6f4 languageName: node linkType: hard "typechain@npm:^8.0.0": - version: 8.0.0 - resolution: "typechain@npm:8.0.0" + version: 8.3.2 + resolution: "typechain@npm:8.3.2" dependencies: "@types/prettier": ^2.1.1 debug: ^4.3.1 @@ -11299,7 +11511,54 @@ __metadata: typescript: ">=4.3.0" bin: typechain: dist/cli/cli.js - checksum: c049cc84ac3cf3a5ed8374db750b7b9adcfc523bb1940e1b8bafef063297aed081a5378560c3fbccd1f5d130d32c9ba9678654dfe00d97fb1dfa17d04a933450 + checksum: 146a1896fa93403404be78757790b0f95b5457efebcca16b61622e09c374d555ef4f837c1c4eedf77e03abc50276d96a2f33064ec09bb802f62d8cc2b13fce70 + languageName: node + linkType: hard + +"typed-array-buffer@npm:^1.0.0": + version: 1.0.0 + resolution: "typed-array-buffer@npm:1.0.0" + dependencies: + call-bind: ^1.0.2 + get-intrinsic: ^1.2.1 + is-typed-array: ^1.1.10 + checksum: 3e0281c79b2a40cd97fe715db803884301993f4e8c18e8d79d75fd18f796e8cd203310fec8c7fdb5e6c09bedf0af4f6ab8b75eb3d3a85da69328f28a80456bd3 + languageName: node + linkType: hard + +"typed-array-byte-length@npm:^1.0.0": + version: 1.0.0 + resolution: "typed-array-byte-length@npm:1.0.0" + dependencies: + call-bind: ^1.0.2 + for-each: ^0.3.3 + has-proto: ^1.0.1 + is-typed-array: ^1.1.10 + checksum: b03db16458322b263d87a702ff25388293f1356326c8a678d7515767ef563ef80e1e67ce648b821ec13178dd628eb2afdc19f97001ceae7a31acf674c849af94 + languageName: node + linkType: hard + +"typed-array-byte-offset@npm:^1.0.0": + version: 1.0.0 + resolution: "typed-array-byte-offset@npm:1.0.0" + dependencies: + available-typed-arrays: ^1.0.5 + call-bind: ^1.0.2 + for-each: ^0.3.3 + has-proto: ^1.0.1 + is-typed-array: ^1.1.10 + checksum: 04f6f02d0e9a948a95fbfe0d5a70b002191fae0b8fe0fe3130a9b2336f043daf7a3dda56a31333c35a067a97e13f539949ab261ca0f3692c41603a46a94e960b + languageName: node + linkType: hard + +"typed-array-length@npm:^1.0.4": + version: 1.0.4 + resolution: "typed-array-length@npm:1.0.4" + dependencies: + call-bind: ^1.0.2 + for-each: ^0.3.3 + is-typed-array: ^1.1.9 + checksum: 2228febc93c7feff142b8c96a58d4a0d7623ecde6c7a24b2b98eb3170e99f7c7eff8c114f9b283085cd59dcd2bd43aadf20e25bba4b034a53c5bb292f71f8956 languageName: node linkType: hard @@ -11320,22 +11579,22 @@ __metadata: linkType: hard "typescript@npm:^4.6.3": - version: 4.6.3 - resolution: "typescript@npm:4.6.3" + version: 4.9.5 + resolution: "typescript@npm:4.9.5" bin: tsc: bin/tsc tsserver: bin/tsserver - checksum: 255bb26c8cb846ca689dd1c3a56587af4f69055907aa2c154796ea28ee0dea871535b1c78f85a6212c77f2657843a269c3a742d09d81495b97b914bf7920415b + checksum: ee000bc26848147ad423b581bd250075662a354d84f0e06eb76d3b892328d8d4440b7487b5a83e851b12b255f55d71835b008a66cbf8f255a11e4400159237db languageName: node linkType: hard "typescript@patch:typescript@^4.6.3#~builtin": - version: 4.6.3 - resolution: "typescript@patch:typescript@npm%3A4.6.3#~builtin::version=4.6.3&hash=bda367" + version: 4.9.5 + resolution: "typescript@patch:typescript@npm%3A4.9.5#~builtin::version=4.9.5&hash=bda367" bin: tsc: bin/tsc tsserver: bin/tsserver - checksum: 6bf45caf847062420592e711bc9c28bf5f9a9a7fa8245343b81493e4ededae33f1774009d1234d911422d1646a2c839f44e1a23ecb111b40a60ac2ea4c1482a8 + checksum: 2eee5c37cad4390385db5db5a8e81470e42e8f1401b0358d7390095d6f681b410f2c4a0c496c6ff9ebd775423c7785cdace7bcdad76c7bee283df3d9718c0f20 languageName: node linkType: hard @@ -11354,11 +11613,11 @@ __metadata: linkType: hard "uglify-js@npm:^3.1.4": - version: 3.15.4 - resolution: "uglify-js@npm:3.15.4" + version: 3.17.4 + resolution: "uglify-js@npm:3.17.4" bin: uglifyjs: bin/uglifyjs - checksum: 5f673c5dd7f3b3dd15d1d26aebfe29bccbb1b896c4b5423ec70a2e8b9506c70b6fb6a53dec83df5ad65a717ec9a850adf08e0aedf9b1711eac5eb080216615fa + checksum: 7b3897df38b6fc7d7d9f4dcd658599d81aa2b1fb0d074829dd4e5290f7318dbca1f4af2f45acb833b95b1fe0ed4698662ab61b87e94328eb4c0a0d3435baf924 languageName: node linkType: hard @@ -11369,18 +11628,6 @@ __metadata: languageName: node linkType: hard -"unbox-primitive@npm:^1.0.1": - version: 1.0.1 - resolution: "unbox-primitive@npm:1.0.1" - dependencies: - function-bind: ^1.1.1 - has-bigints: ^1.0.1 - has-symbols: ^1.0.2 - which-boxed-primitive: ^1.0.2 - checksum: 89d950e18fb45672bc6b3c961f1e72c07beb9640c7ceed847b571ba6f7d2af570ae1a2584cfee268b9d9ea1e3293f7e33e0bc29eaeb9f8e8a0bab057ff9e6bba - languageName: node - linkType: hard - "unbox-primitive@npm:^1.0.2": version: 1.0.2 resolution: "unbox-primitive@npm:1.0.2" @@ -11393,6 +11640,13 @@ __metadata: languageName: node linkType: hard +"undici-types@npm:~5.26.4": + version: 5.26.5 + resolution: "undici-types@npm:5.26.5" + checksum: 3192ef6f3fd5df652f2dc1cd782b49d6ff14dc98e5dced492aa8a8c65425227da5da6aafe22523c67f035a272c599bb89cfe803c1db6311e44bed3042fc25487 + languageName: node + linkType: hard + "undici@npm:^4.14.1": version: 4.16.0 resolution: "undici@npm:4.16.0" @@ -11401,29 +11655,29 @@ __metadata: linkType: hard "undici@npm:^5.14.0": - version: 5.16.0 - resolution: "undici@npm:5.16.0" + version: 5.28.2 + resolution: "undici@npm:5.28.2" dependencies: - busboy: ^1.6.0 - checksum: bc22e797cbf469351713c88af33e65e21952a75f431b78b0e75fb2411426ab38b888ec0761d4b81eadf8f6e8872ed23fb75641cc7319c6a7f08bd083899fa1cc + "@fastify/busboy": ^2.0.0 + checksum: f9e9335803f962fff07c3c11c6d50bbc76248bacf97035047155adb29c3622a65bd6bff23a22218189740133149d22e63b68131d8c40e78ac6cb4b6d686a6dfa languageName: node linkType: hard -"unique-filename@npm:^1.1.1": - version: 1.1.1 - resolution: "unique-filename@npm:1.1.1" +"unique-filename@npm:^3.0.0": + version: 3.0.0 + resolution: "unique-filename@npm:3.0.0" dependencies: - unique-slug: ^2.0.0 - checksum: cf4998c9228cc7647ba7814e255dec51be43673903897b1786eff2ac2d670f54d4d733357eb08dea969aa5e6875d0e1bd391d668fbdb5a179744e7c7551a6f80 + unique-slug: ^4.0.0 + checksum: 8e2f59b356cb2e54aab14ff98a51ac6c45781d15ceaab6d4f1c2228b780193dc70fae4463ce9e1df4479cb9d3304d7c2043a3fb905bdeca71cc7e8ce27e063df languageName: node linkType: hard -"unique-slug@npm:^2.0.0": - version: 2.0.2 - resolution: "unique-slug@npm:2.0.2" +"unique-slug@npm:^4.0.0": + version: 4.0.0 + resolution: "unique-slug@npm:4.0.0" dependencies: imurmurhash: ^0.1.4 - checksum: 5b6876a645da08d505dedb970d1571f6cebdf87044cb6b740c8dbb24f0d6e1dc8bdbf46825fd09f994d7cf50760e6f6e063cfa197d51c5902c00a861702eb75a + checksum: 0884b58365af59f89739e6f71e3feacb5b1b41f2df2d842d0757933620e6de08eff347d27e9d499b43c40476cbaf7988638d3acb2ffbcb9d35fd035591adfd15 languageName: node linkType: hard @@ -11435,9 +11689,9 @@ __metadata: linkType: hard "universalify@npm:^2.0.0": - version: 2.0.0 - resolution: "universalify@npm:2.0.0" - checksum: 2406a4edf4a8830aa6813278bab1f953a8e40f2f63a37873ffa9a3bc8f9745d06cc8e88f3572cb899b7e509013f7f6fcc3e37e8a6d914167a5381d8440518c44 + version: 2.0.1 + resolution: "universalify@npm:2.0.1" + checksum: ecd8469fe0db28e7de9e5289d32bd1b6ba8f7183db34f3bfc4ca53c49891c2d6aa05f3fb3936a81285a905cc509fb641a0c3fc131ec786167eff41236ae32e60 languageName: node linkType: hard @@ -11457,15 +11711,6 @@ __metadata: languageName: node linkType: hard -"url-parse-lax@npm:^1.0.0": - version: 1.0.0 - resolution: "url-parse-lax@npm:1.0.0" - dependencies: - prepend-http: ^1.0.1 - checksum: 03316acff753845329652258c16d1688765ee34f7d242a94dadf9ff6e43ea567ec062cec7aa27c37f76f2c57f95e0660695afff32fb97b527591c7340a3090fa - languageName: node - linkType: hard - "url-parse-lax@npm:^3.0.0": version: 3.0.0 resolution: "url-parse-lax@npm:3.0.0" @@ -11482,20 +11727,13 @@ __metadata: languageName: node linkType: hard -"url-to-options@npm:^1.0.1": - version: 1.0.1 - resolution: "url-to-options@npm:1.0.1" - checksum: 20e59f4578525fb0d30ffc22b13b5aa60bc9e57cefd4f5842720f5b57211b6dec54abeae2d675381ac4486fd1a2e987f1318725dea996e503ff89f8c8ce2c17e - languageName: node - linkType: hard - "url@npm:^0.11.0": - version: 0.11.0 - resolution: "url@npm:0.11.0" + version: 0.11.3 + resolution: "url@npm:0.11.3" dependencies: - punycode: 1.3.2 - querystring: 0.2.0 - checksum: 50d100d3dd2d98b9fe3ada48cadb0b08aa6be6d3ac64112b867b56b19be4bfcba03c2a9a0d7922bfd7ac17d4834e88537749fe182430dfd9b68e520175900d90 + punycode: ^1.4.1 + qs: ^6.11.2 + checksum: f9e7886f46a16f96d2e42fbcc5d682c231c55ef5442c1ff66150c0f6556f6e3a97d094a84f51be15ec2432711d212eb60426659ce418f5fcadeaa3f601532c4e languageName: node linkType: hard @@ -11510,12 +11748,12 @@ __metadata: linkType: hard "utf-8-validate@npm:^5.0.2": - version: 5.0.9 - resolution: "utf-8-validate@npm:5.0.9" + version: 5.0.10 + resolution: "utf-8-validate@npm:5.0.10" dependencies: node-gyp: latest node-gyp-build: ^4.3.0 - checksum: 90117f1b65e0a1256c83dfad529983617263b622f2379745311d0438c7ea31db0d134ebd0dca84c3f5847a3560a3d249644e478a9109c616f63c7ea19cac53dc + checksum: 5579350a023c66a2326752b6c8804cc7b39dcd251bb088241da38db994b8d78352e388dcc24ad398ab98385ba3c5ffcadb6b5b14b2637e43f767869055e46ba6 languageName: node linkType: hard @@ -11533,17 +11771,16 @@ __metadata: languageName: node linkType: hard -"util@npm:^0.12.0": - version: 0.12.4 - resolution: "util@npm:0.12.4" +"util@npm:^0.12.0, util@npm:^0.12.5": + version: 0.12.5 + resolution: "util@npm:0.12.5" dependencies: inherits: ^2.0.3 is-arguments: ^1.0.4 is-generator-function: ^1.0.7 is-typed-array: ^1.1.3 - safe-buffer: ^5.1.2 which-typed-array: ^1.1.2 - checksum: 8eac7a6e6b341c0f1b3eb73bbe5dfcae31a7e9699c8fc3266789f3e95f7637946a7700dcf1904dbd3749a58a36760ebf7acf4bb5b717f7468532a8a79f44eff0 + checksum: 705e51f0de5b446f4edec10739752ac25856541e0254ea1e7e45e5b9f9b0cb105bc4bd415736a6210edc68245a7f903bf085ffb08dd7deb8a0e847f60538a38a languageName: node linkType: hard @@ -11588,6 +11825,15 @@ __metadata: languageName: node linkType: hard +"uuid@npm:^9.0.0": + version: 9.0.1 + resolution: "uuid@npm:9.0.1" + bin: + uuid: dist/bin/uuid + checksum: 39931f6da74e307f51c0fb463dc2462807531dc80760a9bff1e35af4316131b4fc3203d16da60ae33f07fdca5b56f3f1dd662da0c99fea9aaeab2004780cc5f4 + languageName: node + linkType: hard + "v8-compile-cache-lib@npm:^3.0.1": version: 3.0.1 resolution: "v8-compile-cache-lib@npm:3.0.1" @@ -11595,13 +11841,6 @@ __metadata: languageName: node linkType: hard -"v8-compile-cache@npm:^2.0.3": - version: 2.3.0 - resolution: "v8-compile-cache@npm:2.3.0" - checksum: adb0a271eaa2297f2f4c536acbfee872d0dd26ec2d76f66921aa7fc437319132773483344207bdbeee169225f4739016d8d2dbf0553913a52bb34da6d0334f8e - languageName: node - linkType: hard - "validate-npm-package-license@npm:^3.0.1": version: 3.0.4 resolution: "validate-npm-package-license@npm:3.0.4" @@ -11646,289 +11885,560 @@ __metadata: languageName: node linkType: hard -"web3-bzz@npm:1.5.3": - version: 1.5.3 - resolution: "web3-bzz@npm:1.5.3" +"web3-bzz@npm:1.10.0": + version: 1.10.0 + resolution: "web3-bzz@npm:1.10.0" + dependencies: + "@types/node": ^12.12.6 + got: 12.1.0 + swarm-js: ^0.1.40 + checksum: a4b6766e23ca4b2d37b0390aaf0c7f8a1246e90be843dc7183a04a1960d60998fc9267234aba9989e7e87db837dac58d4dee027071ecce29344611e20f3b9ffc + languageName: node + linkType: hard + +"web3-bzz@npm:1.7.4": + version: 1.7.4 + resolution: "web3-bzz@npm:1.7.4" dependencies: "@types/node": ^12.12.6 got: 9.6.0 swarm-js: ^0.1.40 - checksum: 19588b430af9d35d8428255dbc03b86228679b98274e964de1b1404f2e348aa2c989d662903d8d3b0b83cd70658be99126515804745ce27e145beb817ac2b60c + checksum: 196a06ca913f093a53f1d78a77e702b8e227efbf6759be50d8ec1eb4161952902ebf9dd73a57c30ad7774cb4536c0cf3ec7c41c261f56e5813aa585a714d8dfc + languageName: node + linkType: hard + +"web3-core-helpers@npm:1.10.0": + version: 1.10.0 + resolution: "web3-core-helpers@npm:1.10.0" + dependencies: + web3-eth-iban: 1.10.0 + web3-utils: 1.10.0 + checksum: 3f8b8ed5e3f56c5760452e5d8850d77607cd7046392c7df78a0903611dcbf875acc9bff04bbc397cd967ce27d45b61de19dcf47fada0c958f54a5d69181a40a6 + languageName: node + linkType: hard + +"web3-core-helpers@npm:1.7.4": + version: 1.7.4 + resolution: "web3-core-helpers@npm:1.7.4" + dependencies: + web3-eth-iban: 1.7.4 + web3-utils: 1.7.4 + checksum: 706b3617395a4cba1955e6d56f32cb65f645e0df854dd373263d61fd291fefaa6a490aeec94a4bebb45ed0aac3f044b783dfd35b77c74bb55eddc30f7c59b6a3 + languageName: node + linkType: hard + +"web3-core-method@npm:1.10.0": + version: 1.10.0 + resolution: "web3-core-method@npm:1.10.0" + dependencies: + "@ethersproject/transactions": ^5.6.2 + web3-core-helpers: 1.10.0 + web3-core-promievent: 1.10.0 + web3-core-subscriptions: 1.10.0 + web3-utils: 1.10.0 + checksum: 29c42c92f0f6d895245c6d3dba4adffd822787b09bee0d9953a5d50365ae1ab0559085e9d6104e2dfb00b372fbf02ff1d6292c9a9e565ada1a5c531754d654cd languageName: node linkType: hard -"web3-core-helpers@npm:1.5.3": - version: 1.5.3 - resolution: "web3-core-helpers@npm:1.5.3" +"web3-core-method@npm:1.7.4": + version: 1.7.4 + resolution: "web3-core-method@npm:1.7.4" dependencies: - web3-eth-iban: 1.5.3 - web3-utils: 1.5.3 - checksum: 562e6d2f5a8d1e13244a2a85f1a98ff2e8f7340cd94534379b9cc6a4476bed1a899b778a2e4b537f962811e618448a8096833638ec31893fcb03770c4143bd54 + "@ethersproject/transactions": ^5.6.2 + web3-core-helpers: 1.7.4 + web3-core-promievent: 1.7.4 + web3-core-subscriptions: 1.7.4 + web3-utils: 1.7.4 + checksum: 48b0dd9bfc936154228b6abbe9c795136c4a8350af281bb7b0f576fd8e5150a9fca79776b4bf4f53e3b2508f6df41f3230df97428894030f2e7bf5953cce93ce languageName: node linkType: hard -"web3-core-method@npm:1.5.3": - version: 1.5.3 - resolution: "web3-core-method@npm:1.5.3" +"web3-core-promievent@npm:1.10.0": + version: 1.10.0 + resolution: "web3-core-promievent@npm:1.10.0" dependencies: - "@ethereumjs/common": ^2.4.0 - "@ethersproject/transactions": ^5.0.0-beta.135 - web3-core-helpers: 1.5.3 - web3-core-promievent: 1.5.3 - web3-core-subscriptions: 1.5.3 - web3-utils: 1.5.3 - checksum: 7ff2eea36096e57f15da8ee65ab7cb0bd9e41ab0605af7826178d8b1e796af45495d28cd8301e14e0c3ee5ce05aa1bdc610b793ae7fbdc763dc3afafcf937135 + eventemitter3: 4.0.4 + checksum: 68e9f40f78d92ce1ee9808d04a28a89d20ab4dc36af5ba8405f132044cbb01825f76f35249a9599f9568a95d5e7c9e4a09ada6d4dc2e27e0c1b32c9232c8c973 languageName: node linkType: hard -"web3-core-promievent@npm:1.5.3": - version: 1.5.3 - resolution: "web3-core-promievent@npm:1.5.3" +"web3-core-promievent@npm:1.7.4": + version: 1.7.4 + resolution: "web3-core-promievent@npm:1.7.4" dependencies: eventemitter3: 4.0.4 - checksum: b31a8ba6ff1d9d3cfdcef26396e1a9dfc3e0c95d4679e8cd69b6892094f21e2ce5ffc916c2d9776f5b28f0a617a814ee80be91bd3a8b17128cc01a390f9056eb + checksum: 1d3b10f9ba51759548ff1d6988f663368a7ef1a207134651b9ee268d042d891b6307e7f6153230a122ad7533f3c8562298a46fe9479b74aac08bfaaf7ff2ec2f + languageName: node + linkType: hard + +"web3-core-requestmanager@npm:1.10.0": + version: 1.10.0 + resolution: "web3-core-requestmanager@npm:1.10.0" + dependencies: + util: ^0.12.5 + web3-core-helpers: 1.10.0 + web3-providers-http: 1.10.0 + web3-providers-ipc: 1.10.0 + web3-providers-ws: 1.10.0 + checksum: ce63b521b70b4e159510abf9d70e09d0c704b924a83951b350bb1d8f56b03dae21d3ea709a118019d272f754940ad6f6772002e7a8692bf733126fee80c84226 languageName: node linkType: hard -"web3-core-requestmanager@npm:1.5.3": - version: 1.5.3 - resolution: "web3-core-requestmanager@npm:1.5.3" +"web3-core-requestmanager@npm:1.7.4": + version: 1.7.4 + resolution: "web3-core-requestmanager@npm:1.7.4" dependencies: util: ^0.12.0 - web3-core-helpers: 1.5.3 - web3-providers-http: 1.5.3 - web3-providers-ipc: 1.5.3 - web3-providers-ws: 1.5.3 - checksum: 7258bb7373198078fce027ede2a508e1f4f86c75e9647c4b1438dc376a58ccb8a077f6e6647b26bf0d25382602eb12bcd7f9fc691177d0d3a1b692b55d1234e8 + web3-core-helpers: 1.7.4 + web3-providers-http: 1.7.4 + web3-providers-ipc: 1.7.4 + web3-providers-ws: 1.7.4 + checksum: 4e1decb11af99c46f1b73efc6a9204a9344444a5afe85f002c404e08522d4ab1dce9327a570e6e47911f257453c0a7663048b799875173d6f9f0eb3bcb782e30 + languageName: node + linkType: hard + +"web3-core-subscriptions@npm:1.10.0": + version: 1.10.0 + resolution: "web3-core-subscriptions@npm:1.10.0" + dependencies: + eventemitter3: 4.0.4 + web3-core-helpers: 1.10.0 + checksum: baca40f4d34da03bf4e6d64a13d9498a3ebfa37544869921671340d83581c87efbe3830998ae99db776fa22f0cdb529f9bb1fe7d516de1f9ce7b9da1c3a63859 languageName: node linkType: hard -"web3-core-subscriptions@npm:1.5.3": - version: 1.5.3 - resolution: "web3-core-subscriptions@npm:1.5.3" +"web3-core-subscriptions@npm:1.7.4": + version: 1.7.4 + resolution: "web3-core-subscriptions@npm:1.7.4" dependencies: eventemitter3: 4.0.4 - web3-core-helpers: 1.5.3 - checksum: 87c08b4ad9160e18fcfc05cf832c58616150ce69cb4e396f58fc64ef8ce43b5731dc7fc19bd8b4e5c40cfccd69bafec3b17f9b80f3a36ffad86fa50f83d55fb7 + web3-core-helpers: 1.7.4 + checksum: ff2cb87f676e9624fc92174193a073928029962816ba83282731e524e9a51d834fd55a27a3e94001a089486d09c9f9c23ac7d3c04b6da42c902017d53ba0bc4b + languageName: node + linkType: hard + +"web3-core@npm:1.10.0": + version: 1.10.0 + resolution: "web3-core@npm:1.10.0" + dependencies: + "@types/bn.js": ^5.1.1 + "@types/node": ^12.12.6 + bignumber.js: ^9.0.0 + web3-core-helpers: 1.10.0 + web3-core-method: 1.10.0 + web3-core-requestmanager: 1.10.0 + web3-utils: 1.10.0 + checksum: 075b6dbf743e8cfad2aa1b9d603a45f0f30998c778af22cd0090d455a027e0658c398721a2a270c218dc2a561cbfd5cdbfe5ca14a6c2f5cd4afc8743e05a2e60 languageName: node linkType: hard -"web3-core@npm:1.5.3": - version: 1.5.3 - resolution: "web3-core@npm:1.5.3" +"web3-core@npm:1.7.4": + version: 1.7.4 + resolution: "web3-core@npm:1.7.4" dependencies: - "@types/bn.js": ^4.11.5 + "@types/bn.js": ^5.1.0 "@types/node": ^12.12.6 bignumber.js: ^9.0.0 - web3-core-helpers: 1.5.3 - web3-core-method: 1.5.3 - web3-core-requestmanager: 1.5.3 - web3-utils: 1.5.3 - checksum: 0a0ba056fd96d754aacc410c58458365745de1b055c3e3051599dbbb7c3ced0a8db87ac90b98e8ee7fc0b26a8c1500860dad24f8303fa0f6206a71456692ea59 + web3-core-helpers: 1.7.4 + web3-core-method: 1.7.4 + web3-core-requestmanager: 1.7.4 + web3-utils: 1.7.4 + checksum: 9e797df444e782ccdc2230ec79ff8adbcfeabc27346c23cd034b43aa23435b005739dac0c4282db4f79271a03d5572e37490c888ca8d23cb5106b3e30d0c85c0 + languageName: node + linkType: hard + +"web3-eth-abi@npm:1.10.0": + version: 1.10.0 + resolution: "web3-eth-abi@npm:1.10.0" + dependencies: + "@ethersproject/abi": ^5.6.3 + web3-utils: 1.10.0 + checksum: 465a4c19d6d8b41592871cb82e64fc0847093614d9f377939a731a691262a7e01398d8fe9e37f63e8d654707841a532c1161582ddaf87c52a66412a0285805c5 languageName: node linkType: hard -"web3-eth-abi@npm:1.5.3": - version: 1.5.3 - resolution: "web3-eth-abi@npm:1.5.3" +"web3-eth-abi@npm:1.7.4": + version: 1.7.4 + resolution: "web3-eth-abi@npm:1.7.4" dependencies: - "@ethersproject/abi": 5.0.7 - web3-utils: 1.5.3 - checksum: ce327542202c97b47e40ec3369e9847c38894b6f436cf4c2ee6450a9ed4869faa765f69bc3432f28b28f1300e04802cbe0fba2c74bb09d563c8ed9f539816c4b + "@ethersproject/abi": ^5.6.3 + web3-utils: 1.7.4 + checksum: f0ce4149dccf681349338d2ed5162d9f0fc4dcaf91639a4278cdec02e08858d969e56678cfc10f63668b7ddf41c53ff3d79d17fa92d158f96f94db3f31efb6f5 + languageName: node + linkType: hard + +"web3-eth-accounts@npm:1.10.0": + version: 1.10.0 + resolution: "web3-eth-accounts@npm:1.10.0" + dependencies: + "@ethereumjs/common": 2.5.0 + "@ethereumjs/tx": 3.3.2 + eth-lib: 0.2.8 + ethereumjs-util: ^7.1.5 + scrypt-js: ^3.0.1 + uuid: ^9.0.0 + web3-core: 1.10.0 + web3-core-helpers: 1.10.0 + web3-core-method: 1.10.0 + web3-utils: 1.10.0 + checksum: 93821129133a30596e3008af31beb2f26d74157f56e5a669e22565dc991f13747d3d9150202860f93709a8a2a6ec80eaf12bee78f4e03d5ab60e28d7ee68d888 languageName: node linkType: hard -"web3-eth-accounts@npm:1.5.3": - version: 1.5.3 - resolution: "web3-eth-accounts@npm:1.5.3" +"web3-eth-accounts@npm:1.7.4": + version: 1.7.4 + resolution: "web3-eth-accounts@npm:1.7.4" dependencies: - "@ethereumjs/common": ^2.3.0 - "@ethereumjs/tx": ^3.2.1 + "@ethereumjs/common": ^2.5.0 + "@ethereumjs/tx": ^3.3.2 crypto-browserify: 3.12.0 eth-lib: 0.2.8 ethereumjs-util: ^7.0.10 scrypt-js: ^3.0.1 uuid: 3.3.2 - web3-core: 1.5.3 - web3-core-helpers: 1.5.3 - web3-core-method: 1.5.3 - web3-utils: 1.5.3 - checksum: 6a412691b7f4521dd8688fbaf7f0f4a068e1c58715391d59135142b987fc73cb771a42c0a40b633a9a66e0b3166b38fa8c40d81100942f387fc8db07b3658597 + web3-core: 1.7.4 + web3-core-helpers: 1.7.4 + web3-core-method: 1.7.4 + web3-utils: 1.7.4 + checksum: 565d57fc07ed057ab6ae94539ca57bd99fc1e95c5026d4cda561b73a7a77eb96a5f8b52683ffd351e7adba8b669c4988eb56f0f1f2f35ca1666f19dc83a7ed8b + languageName: node + linkType: hard + +"web3-eth-contract@npm:1.10.0": + version: 1.10.0 + resolution: "web3-eth-contract@npm:1.10.0" + dependencies: + "@types/bn.js": ^5.1.1 + web3-core: 1.10.0 + web3-core-helpers: 1.10.0 + web3-core-method: 1.10.0 + web3-core-promievent: 1.10.0 + web3-core-subscriptions: 1.10.0 + web3-eth-abi: 1.10.0 + web3-utils: 1.10.0 + checksum: 7a0c24686a128dc08e4d532866feaab28f4d59d95c89a00779e37e956116e90fac27efca0d4911b845739f2fd54cfa1f455c5cdf7e88c27d6e553d5bff86f381 + languageName: node + linkType: hard + +"web3-eth-contract@npm:1.7.4": + version: 1.7.4 + resolution: "web3-eth-contract@npm:1.7.4" + dependencies: + "@types/bn.js": ^5.1.0 + web3-core: 1.7.4 + web3-core-helpers: 1.7.4 + web3-core-method: 1.7.4 + web3-core-promievent: 1.7.4 + web3-core-subscriptions: 1.7.4 + web3-eth-abi: 1.7.4 + web3-utils: 1.7.4 + checksum: bc420fd3e3fc571118774dbf2da82ca374be70595e85e3b515d8943a18bbd18ec1e945b2c872b1064ed593e8cc608e9168f227a25deb2dbf14779c93f6cf6329 languageName: node linkType: hard -"web3-eth-contract@npm:1.5.3": - version: 1.5.3 - resolution: "web3-eth-contract@npm:1.5.3" +"web3-eth-ens@npm:1.10.0": + version: 1.10.0 + resolution: "web3-eth-ens@npm:1.10.0" dependencies: - "@types/bn.js": ^4.11.5 - web3-core: 1.5.3 - web3-core-helpers: 1.5.3 - web3-core-method: 1.5.3 - web3-core-promievent: 1.5.3 - web3-core-subscriptions: 1.5.3 - web3-eth-abi: 1.5.3 - web3-utils: 1.5.3 - checksum: 66403f6f8d31dcb1a7c254f8ad59643cc9706761639a5c03118a7dcecb57df34ce01fd097130130ff73de45aa6918fb9033fb286217311a87d1e9b6c082525f7 + content-hash: ^2.5.2 + eth-ens-namehash: 2.0.8 + web3-core: 1.10.0 + web3-core-helpers: 1.10.0 + web3-core-promievent: 1.10.0 + web3-eth-abi: 1.10.0 + web3-eth-contract: 1.10.0 + web3-utils: 1.10.0 + checksum: 31c1c6c4303ab6a0036362d5bbc5c55c173cc12823a9ccea8df6609e11ae49374944a15c7810f4f425b65ab2f5062960ebb8efe55cdc22aa3232eca2607a0922 languageName: node linkType: hard -"web3-eth-ens@npm:1.5.3": - version: 1.5.3 - resolution: "web3-eth-ens@npm:1.5.3" +"web3-eth-ens@npm:1.7.4": + version: 1.7.4 + resolution: "web3-eth-ens@npm:1.7.4" dependencies: content-hash: ^2.5.2 eth-ens-namehash: 2.0.8 - web3-core: 1.5.3 - web3-core-helpers: 1.5.3 - web3-core-promievent: 1.5.3 - web3-eth-abi: 1.5.3 - web3-eth-contract: 1.5.3 - web3-utils: 1.5.3 - checksum: a54e973efff6e3bcd5d035c1f73301d09afa2df57ae756ca4025995f31d6b9815df900c879a195f47647545f8c28b878dfb455c90e0058e5172ceee492124c66 + web3-core: 1.7.4 + web3-core-helpers: 1.7.4 + web3-core-promievent: 1.7.4 + web3-eth-abi: 1.7.4 + web3-eth-contract: 1.7.4 + web3-utils: 1.7.4 + checksum: d4352098ceb2ab6fda24789dc8377fcb13973fbcbc597b40365d6e3d3b8a2b74512cca6aa3710fa959af654fd989f40467ea6fa16e0d8c07421bba8bf090513b languageName: node linkType: hard -"web3-eth-iban@npm:1.5.3": - version: 1.5.3 - resolution: "web3-eth-iban@npm:1.5.3" +"web3-eth-iban@npm:1.10.0": + version: 1.10.0 + resolution: "web3-eth-iban@npm:1.10.0" dependencies: - bn.js: ^4.11.9 - web3-utils: 1.5.3 - checksum: ce14813b4cf0330a870e4339f92f11a8456dfdc222c983cc9bbc7a5363c2ce8e8f453f553664e97d55e73c63e51e067e324ba31f900d008df5ef4735951975b9 + bn.js: ^5.2.1 + web3-utils: 1.10.0 + checksum: ca0921f0a232a343a538f6376e55ef3e29e952fba613ecda09dde82149e8088581d8f93da2ed2d8b7e008abdf6610eecc0f4f25efba0ecf412156fd70e9869c0 + languageName: node + linkType: hard + +"web3-eth-iban@npm:1.7.4": + version: 1.7.4 + resolution: "web3-eth-iban@npm:1.7.4" + dependencies: + bn.js: ^5.2.1 + web3-utils: 1.7.4 + checksum: 81a3c39baed3ff6efa034fe4f2a2f2932213cffa69084c45eb9b7ea2e4c7b902577f9c220ef4d1bbaa2907a5a436f3d723363af13edac62ac5312ba8c7c123b1 + languageName: node + linkType: hard + +"web3-eth-personal@npm:1.10.0": + version: 1.10.0 + resolution: "web3-eth-personal@npm:1.10.0" + dependencies: + "@types/node": ^12.12.6 + web3-core: 1.10.0 + web3-core-helpers: 1.10.0 + web3-core-method: 1.10.0 + web3-net: 1.10.0 + web3-utils: 1.10.0 + checksum: e6c1f540d763e691d81042ec4d0a27b95345bd3ae338b8dffa36bb1a34ae34ec0193c3f0a9ff324fca2918de0d66b022750ee007cf2c3a65241028e852195356 languageName: node linkType: hard -"web3-eth-personal@npm:1.5.3": - version: 1.5.3 - resolution: "web3-eth-personal@npm:1.5.3" +"web3-eth-personal@npm:1.7.4": + version: 1.7.4 + resolution: "web3-eth-personal@npm:1.7.4" dependencies: "@types/node": ^12.12.6 - web3-core: 1.5.3 - web3-core-helpers: 1.5.3 - web3-core-method: 1.5.3 - web3-net: 1.5.3 - web3-utils: 1.5.3 - checksum: 0d3fb453f43251478949ac253c3ecf6c7d145e5310ee790e4e2b7ae5a69e63cc4cbb34be39ddd9a05d2b7d47b1e41c6b9809ea585eb00deec905dd6f1b13b996 + web3-core: 1.7.4 + web3-core-helpers: 1.7.4 + web3-core-method: 1.7.4 + web3-net: 1.7.4 + web3-utils: 1.7.4 + checksum: 9e57f5e7d878d6d7c9ff671062d7dd18ac8fe91467d1880b842e257d9578888daa831dcdc5b798eed3299eb50c3bc6c24db2f630d40e63eed05382370d3f6933 + languageName: node + linkType: hard + +"web3-eth@npm:1.10.0": + version: 1.10.0 + resolution: "web3-eth@npm:1.10.0" + dependencies: + web3-core: 1.10.0 + web3-core-helpers: 1.10.0 + web3-core-method: 1.10.0 + web3-core-subscriptions: 1.10.0 + web3-eth-abi: 1.10.0 + web3-eth-accounts: 1.10.0 + web3-eth-contract: 1.10.0 + web3-eth-ens: 1.10.0 + web3-eth-iban: 1.10.0 + web3-eth-personal: 1.10.0 + web3-net: 1.10.0 + web3-utils: 1.10.0 + checksum: d82332a20508667cf69d216530baa541c69fc44046bb7c57f0f85ba09c0eeaab753146388c66d0313673d0ea93be9325817e34cc69d7f4ddf9e01c43a130a2fe + languageName: node + linkType: hard + +"web3-eth@npm:1.7.4": + version: 1.7.4 + resolution: "web3-eth@npm:1.7.4" + dependencies: + web3-core: 1.7.4 + web3-core-helpers: 1.7.4 + web3-core-method: 1.7.4 + web3-core-subscriptions: 1.7.4 + web3-eth-abi: 1.7.4 + web3-eth-accounts: 1.7.4 + web3-eth-contract: 1.7.4 + web3-eth-ens: 1.7.4 + web3-eth-iban: 1.7.4 + web3-eth-personal: 1.7.4 + web3-net: 1.7.4 + web3-utils: 1.7.4 + checksum: 09a016cd76b87edd45f4f3c1e31589da6a9753383f366d205078ba7c5455bf520daf6905e701f66c69afc145ded59af4e388d72b41a9679085963d625adf85ae + languageName: node + linkType: hard + +"web3-net@npm:1.10.0": + version: 1.10.0 + resolution: "web3-net@npm:1.10.0" + dependencies: + web3-core: 1.10.0 + web3-core-method: 1.10.0 + web3-utils: 1.10.0 + checksum: 5183d897ccf539adafa60e8372871f8d8ecf4c46a0943aeee1d5f78a54c8faddfcb2406269ab422e57ef871c29496dba1bffbe044693b559a3bcd7957af87363 languageName: node linkType: hard -"web3-eth@npm:1.5.3": - version: 1.5.3 - resolution: "web3-eth@npm:1.5.3" +"web3-net@npm:1.7.4": + version: 1.7.4 + resolution: "web3-net@npm:1.7.4" dependencies: - web3-core: 1.5.3 - web3-core-helpers: 1.5.3 - web3-core-method: 1.5.3 - web3-core-subscriptions: 1.5.3 - web3-eth-abi: 1.5.3 - web3-eth-accounts: 1.5.3 - web3-eth-contract: 1.5.3 - web3-eth-ens: 1.5.3 - web3-eth-iban: 1.5.3 - web3-eth-personal: 1.5.3 - web3-net: 1.5.3 - web3-utils: 1.5.3 - checksum: 2cbf70b2147d37fa3cb2c5802065c56cfacbf537808ab07e698280c8f977613329fc6ae08f351ae2cd9664e89360e4ace6a63f3cf36437226f06ac122427f19c + web3-core: 1.7.4 + web3-core-method: 1.7.4 + web3-utils: 1.7.4 + checksum: 284af4860ad533bf791768ca273b5ab4dd1003d5808e4ead3c5b8e98f1ea7018ee2256032fd16ac2a5b3cabd64a6b361c6a6824949aafdb4ed25571fc7a48327 languageName: node linkType: hard -"web3-net@npm:1.5.3": - version: 1.5.3 - resolution: "web3-net@npm:1.5.3" +"web3-providers-http@npm:1.10.0": + version: 1.10.0 + resolution: "web3-providers-http@npm:1.10.0" dependencies: - web3-core: 1.5.3 - web3-core-method: 1.5.3 - web3-utils: 1.5.3 - checksum: 4075ef714dca534ebdf3f8766fbdc6951d22a0b5d4b70f48ab014cec38970646bb4a953d95387ece33e772f3384a1a3da64ceb683607d2560a14fc6fa4efec6d + abortcontroller-polyfill: ^1.7.3 + cross-fetch: ^3.1.4 + es6-promise: ^4.2.8 + web3-core-helpers: 1.10.0 + checksum: 2fe7c3485626e5e7cb3dd54d05e74f35aec306afe25ae35047e4db1ad75a01a4490d8abf8caa2648400c597d8a252d8cca9950977af2dc242b0ba1f95ab2d2c2 languageName: node linkType: hard -"web3-providers-http@npm:1.5.3": - version: 1.5.3 - resolution: "web3-providers-http@npm:1.5.3" +"web3-providers-http@npm:1.7.4": + version: 1.7.4 + resolution: "web3-providers-http@npm:1.7.4" dependencies: - web3-core-helpers: 1.5.3 + web3-core-helpers: 1.7.4 xhr2-cookies: 1.1.0 - checksum: 0ab32c5b53ad9dbc68dbc09f12a04809da160c93054ed357cb59b905343e3a29172c9112b1600854c6f971c913c5e6dd715560aaced9639c4b51f5d3178b3a9b + checksum: 1235247870e0ad3326ac03cbb8b05730fa864e8aae74b37d9ed96dbfc4b328db57144bc697b33f5551ef8e42a37828f7b61680a863316bcaed09b677afab6b05 + languageName: node + linkType: hard + +"web3-providers-ipc@npm:1.10.0": + version: 1.10.0 + resolution: "web3-providers-ipc@npm:1.10.0" + dependencies: + oboe: 2.1.5 + web3-core-helpers: 1.10.0 + checksum: 103cb6b26ced5c79f76178ae4339e867f09128a8bf5041553966dbc23fb63a4de638a619cadf1f4c4fdff4f352cd63bce54f1fe2eb582fc18cea11ea64067a71 languageName: node linkType: hard -"web3-providers-ipc@npm:1.5.3": - version: 1.5.3 - resolution: "web3-providers-ipc@npm:1.5.3" +"web3-providers-ipc@npm:1.7.4": + version: 1.7.4 + resolution: "web3-providers-ipc@npm:1.7.4" dependencies: oboe: 2.1.5 - web3-core-helpers: 1.5.3 - checksum: 82103eab46cdc3071a30c3c2e564b3c44ceaf70f1780fb048c1156528cdc1d013070163a02bf2b50287b6cfcbe73f3db031fbce537d2fbc50cb8304f9e013117 + web3-core-helpers: 1.7.4 + checksum: e421d788e942cd834e56ecd1face56b987a5d0454602ed78fd94fdb618608d0338f17b23b908d6f4aa3c03032d7807180fd99a07cbf081a5498f7363f95f843f languageName: node linkType: hard -"web3-providers-ws@npm:1.5.3": - version: 1.5.3 - resolution: "web3-providers-ws@npm:1.5.3" +"web3-providers-ws@npm:1.10.0": + version: 1.10.0 + resolution: "web3-providers-ws@npm:1.10.0" dependencies: eventemitter3: 4.0.4 - web3-core-helpers: 1.5.3 + web3-core-helpers: 1.10.0 websocket: ^1.0.32 - checksum: 8bc5b650ded0dc716baaee8c5eebdcdbc63b4630c4be3125f0523310cc547f3809735864a2f5a1584f5c3335ffb3e202da3a4ef554c24b98519a1eafb4fd688e + checksum: 0784334a9ad61c209468335bfed4f656e23b4aab8bddf834de29895fde79309bffe90bfbc65b975c6ea4870ef4521b90469aabeb3124b99d905d1a52ca7bcbe3 languageName: node linkType: hard -"web3-shh@npm:1.5.3": - version: 1.5.3 - resolution: "web3-shh@npm:1.5.3" +"web3-providers-ws@npm:1.7.4": + version: 1.7.4 + resolution: "web3-providers-ws@npm:1.7.4" dependencies: - web3-core: 1.5.3 - web3-core-method: 1.5.3 - web3-core-subscriptions: 1.5.3 - web3-net: 1.5.3 - checksum: 5bfdf787a55fa8c2b53f95ed1bc3f91191ebac06d99b2171d4695e83a7fde2afb4b7020bbfd59b27f3dbe44b6a2c54033fa1e62e56c3f567ea5c4c2b9ef7d75f + eventemitter3: 4.0.4 + web3-core-helpers: 1.7.4 + websocket: ^1.0.32 + checksum: 3be6fe08853d1370644bae18a55fec702ef4d66089f09ea59206ed923599e365ccbff58d8e1e04743f623c49e259fe45d2862064166b2bcd6ca2943686a90010 languageName: node linkType: hard -"web3-utils@npm:1.5.3": - version: 1.5.3 - resolution: "web3-utils@npm:1.5.3" +"web3-shh@npm:1.10.0": + version: 1.10.0 + resolution: "web3-shh@npm:1.10.0" dependencies: - bn.js: ^4.11.9 - eth-lib: 0.2.8 + web3-core: 1.10.0 + web3-core-method: 1.10.0 + web3-core-subscriptions: 1.10.0 + web3-net: 1.10.0 + checksum: 7f4b39ba4b4f6107cb21d00d11821eb68af40d7e59e8fedf385c318954f9d9288bd075014322752e27a1d663a4c40d28bbd46ddb4e336519db9e96c9b0d3821d + languageName: node + linkType: hard + +"web3-shh@npm:1.7.4": + version: 1.7.4 + resolution: "web3-shh@npm:1.7.4" + dependencies: + web3-core: 1.7.4 + web3-core-method: 1.7.4 + web3-core-subscriptions: 1.7.4 + web3-net: 1.7.4 + checksum: debdd0f8fae5ca82c14ed9cc59872a2fa63a800804ac4b355f4f9b1a030e0b1cc298b6fc6367e7d6312f5702bc1b42f419e541beed4289d4d0ff411bde6154cb + languageName: node + linkType: hard + +"web3-utils@npm:1.10.0": + version: 1.10.0 + resolution: "web3-utils@npm:1.10.0" + dependencies: + bn.js: ^5.2.1 ethereum-bloom-filters: ^1.0.6 + ethereumjs-util: ^7.1.0 ethjs-unit: 0.1.6 number-to-bn: 1.7.0 randombytes: ^2.1.0 utf8: 3.0.0 - checksum: 18398478065c8517568fedd68be977ee59d0d39a16c1e0a7746243cf22ff20333b3eaeb644cd6784a629cc7b5c50c3f76ebe8416b36801c052bef36f5ae1d76c + checksum: c6b7662359c0513b5cbfe02cdcb312ce9152778bb19d94d413d44f74cfaa93b7de97190ab6ba11af25a40855c949d2427dcb751929c6d0f257da268c55a3ba2a languageName: node linkType: hard -"web3-utils@npm:^1.3.0": - version: 1.7.3 - resolution: "web3-utils@npm:1.7.3" +"web3-utils@npm:1.7.4": + version: 1.7.4 + resolution: "web3-utils@npm:1.7.4" dependencies: - bn.js: ^4.11.9 + bn.js: ^5.2.1 ethereum-bloom-filters: ^1.0.6 ethereumjs-util: ^7.1.0 ethjs-unit: 0.1.6 number-to-bn: 1.7.0 randombytes: ^2.1.0 utf8: 3.0.0 - checksum: 96fd1d7310f4674ddccbd1f2f8e1ff1817b8869a67a1562ef3ce1130ae50dfec8e64fc4ce9f80855d87fa63fb6dd71b4561e5e1925be5b26f3787b0d4e5f89e7 + checksum: 5d9256366904e5c24c7198a8791aa76217100aa068650ccc18264ff670d1e8d42d40fcc5ddc66e3c05fac3b480753ccf7e519709e60aefd73d71dd4c4d2adcbb + languageName: node + linkType: hard + +"web3-utils@npm:^1.3.0": + version: 1.10.3 + resolution: "web3-utils@npm:1.10.3" + dependencies: + "@ethereumjs/util": ^8.1.0 + bn.js: ^5.2.1 + ethereum-bloom-filters: ^1.0.6 + ethereum-cryptography: ^2.1.2 + ethjs-unit: 0.1.6 + number-to-bn: 1.7.0 + randombytes: ^2.1.0 + utf8: 3.0.0 + checksum: 353226710b2089a8e84f2b97cc765093e3018b850d3a6d60c92fe012829fa15a54ad15d432f1927bc185c6ef5100397a32fd4a896da5f514817c3f53583df134 languageName: node linkType: hard -"web3@npm:1.5.3": - version: 1.5.3 - resolution: "web3@npm:1.5.3" +"web3@npm:1.10.0": + version: 1.10.0 + resolution: "web3@npm:1.10.0" + dependencies: + web3-bzz: 1.10.0 + web3-core: 1.10.0 + web3-eth: 1.10.0 + web3-eth-personal: 1.10.0 + web3-net: 1.10.0 + web3-shh: 1.10.0 + web3-utils: 1.10.0 + checksum: 21cce929b71b8de6844eadd6bcf611dfb91f16f2e8b89bec3f3d18b2e2548b4a2a629886962935cc15fac0ce74c9a00d9ca6b53f4be6a81bd68d17689eb134a9 + languageName: node + linkType: hard + +"web3@npm:1.7.4": + version: 1.7.4 + resolution: "web3@npm:1.7.4" dependencies: - web3-bzz: 1.5.3 - web3-core: 1.5.3 - web3-eth: 1.5.3 - web3-eth-personal: 1.5.3 - web3-net: 1.5.3 - web3-shh: 1.5.3 - web3-utils: 1.5.3 - checksum: ec5380536e85aedcc90be5a0bfb3293885d9c7f1684a92fd0c0a9a863002581ac26630e9c015a7b2c79406b44e82d87ee920a27694192ca7c53d95be58ac6e7b + web3-bzz: 1.7.4 + web3-core: 1.7.4 + web3-eth: 1.7.4 + web3-eth-personal: 1.7.4 + web3-net: 1.7.4 + web3-shh: 1.7.4 + web3-utils: 1.7.4 + checksum: 1597b099e1694a96cc7683e954800049fa109499eae45bd6f44f48dd868dcc92213d1fd6f651c6af13331b77e00f2a8d21ff6a113b703728c45eb42b99541d7c languageName: node linkType: hard @@ -11977,9 +12487,9 @@ __metadata: linkType: hard "which-module@npm:^2.0.0": - version: 2.0.0 - resolution: "which-module@npm:2.0.0" - checksum: 809f7fd3dfcb2cdbe0180b60d68100c88785084f8f9492b0998c051d7a8efe56784492609d3f09ac161635b78ea29219eb1418a98c15ce87d085bce905705c9c + version: 2.0.1 + resolution: "which-module@npm:2.0.1" + checksum: 1967b7ce17a2485544a4fdd9063599f0f773959cca24176dbe8f405e55472d748b7c549cd7920ff6abb8f1ab7db0b0f1b36de1a21c57a8ff741f4f1e792c52be languageName: node linkType: hard @@ -11993,21 +12503,20 @@ __metadata: languageName: node linkType: hard -"which-typed-array@npm:^1.1.2": - version: 1.1.7 - resolution: "which-typed-array@npm:1.1.7" +"which-typed-array@npm:^1.1.11, which-typed-array@npm:^1.1.13, which-typed-array@npm:^1.1.2": + version: 1.1.13 + resolution: "which-typed-array@npm:1.1.13" dependencies: available-typed-arrays: ^1.0.5 - call-bind: ^1.0.2 - es-abstract: ^1.18.5 - foreach: ^2.0.5 + call-bind: ^1.0.4 + for-each: ^0.3.3 + gopd: ^1.0.1 has-tostringtag: ^1.0.0 - is-typed-array: ^1.1.7 - checksum: 147837cf5866e36b6b2e427731709e02f79f1578477cbde68ed773a5307520a6cb6836c73c79c30690a473266ee59010b83b6d9b25d8d677a40ff77fb37a8a84 + checksum: 3828a0d5d72c800e369d447e54c7620742a4cc0c9baf1b5e8c17e9b6ff90d8d861a3a6dd4800f1953dbf80e5e5cec954a289e5b4a223e3bee4aeb1f8c5f33309 languageName: node linkType: hard -"which@npm:1.3.1, which@npm:^1.1.1, which@npm:^1.2.9, which@npm:^1.3.1": +"which@npm:^1.1.1, which@npm:^1.2.9, which@npm:^1.3.1": version: 1.3.1 resolution: "which@npm:1.3.1" dependencies: @@ -12018,7 +12527,7 @@ __metadata: languageName: node linkType: hard -"which@npm:^2.0.1, which@npm:^2.0.2": +"which@npm:^2.0.1": version: 2.0.2 resolution: "which@npm:2.0.2" dependencies: @@ -12029,28 +12538,21 @@ __metadata: languageName: node linkType: hard -"wide-align@npm:1.1.3": - version: 1.1.3 - resolution: "wide-align@npm:1.1.3" - dependencies: - string-width: ^1.0.2 || 2 - checksum: d09c8012652a9e6cab3e82338d1874a4d7db2ad1bd19ab43eb744acf0b9b5632ec406bdbbbb970a8f4771a7d5ef49824d038ba70aa884e7723f5b090ab87134d - languageName: node - linkType: hard - -"wide-align@npm:^1.1.5": - version: 1.1.5 - resolution: "wide-align@npm:1.1.5" +"which@npm:^4.0.0": + version: 4.0.0 + resolution: "which@npm:4.0.0" dependencies: - string-width: ^1.0.2 || 2 || 3 || 4 - checksum: d5fc37cd561f9daee3c80e03b92ed3e84d80dde3365a8767263d03dacfc8fa06b065ffe1df00d8c2a09f731482fcacae745abfbb478d4af36d0a891fad4834d3 + isexe: ^3.1.1 + bin: + node-which: bin/which.js + checksum: f17e84c042592c21e23c8195108cff18c64050b9efb8459589116999ea9da6dd1509e6a1bac3aeebefd137be00fabbb61b5c2bc0aa0f8526f32b58ee2f545651 languageName: node linkType: hard -"word-wrap@npm:^1.2.3, word-wrap@npm:~1.2.3": - version: 1.2.4 - resolution: "word-wrap@npm:1.2.4" - checksum: 8f1f2e0a397c0e074ca225ba9f67baa23f99293bc064e31355d426ae91b8b3f6b5f6c1fc9ae5e9141178bb362d563f55e62fd8d5c31f2a77e3ade56cb3e35bd1 +"word-wrap@npm:~1.2.3": + version: 1.2.5 + resolution: "word-wrap@npm:1.2.5" + checksum: f93ba3586fc181f94afdaff3a6fef27920b4b6d9eaefed0f428f8e07adea2a7f54a5f2830ce59406c8416f033f86902b91eb824072354645eea687dff3691ccb languageName: node linkType: hard @@ -12078,18 +12580,18 @@ __metadata: languageName: node linkType: hard -"wrap-ansi@npm:^5.1.0": - version: 5.1.0 - resolution: "wrap-ansi@npm:5.1.0" +"wrap-ansi-cjs@npm:wrap-ansi@^7.0.0, wrap-ansi@npm:^7.0.0": + version: 7.0.0 + resolution: "wrap-ansi@npm:7.0.0" dependencies: - ansi-styles: ^3.2.0 - string-width: ^3.0.0 - strip-ansi: ^5.0.0 - checksum: 9b48c862220e541eb0daa22661b38b947973fc57054e91be5b0f2dcc77741a6875ccab4ebe970a394b4682c8dfc17e888266a105fb8b0a9b23c19245e781ceae + ansi-styles: ^4.0.0 + string-width: ^4.1.0 + strip-ansi: ^6.0.0 + checksum: a790b846fd4505de962ba728a21aaeda189b8ee1c7568ca5e817d85930e06ef8d1689d49dbf0e881e8ef84436af3a88bc49115c2e2788d841ff1b8b5b51a608b languageName: node linkType: hard -"wrap-ansi@npm:^6.2.0": +"wrap-ansi@npm:^6.0.1, wrap-ansi@npm:^6.2.0": version: 6.2.0 resolution: "wrap-ansi@npm:6.2.0" dependencies: @@ -12100,14 +12602,14 @@ __metadata: languageName: node linkType: hard -"wrap-ansi@npm:^7.0.0": - version: 7.0.0 - resolution: "wrap-ansi@npm:7.0.0" +"wrap-ansi@npm:^8.1.0": + version: 8.1.0 + resolution: "wrap-ansi@npm:8.1.0" dependencies: - ansi-styles: ^4.0.0 - string-width: ^4.1.0 - strip-ansi: ^6.0.0 - checksum: a790b846fd4505de962ba728a21aaeda189b8ee1c7568ca5e817d85930e06ef8d1689d49dbf0e881e8ef84436af3a88bc49115c2e2788d841ff1b8b5b51a608b + ansi-styles: ^6.1.0 + string-width: ^5.0.1 + strip-ansi: ^7.0.1 + checksum: 371733296dc2d616900ce15a0049dca0ef67597d6394c57347ba334393599e800bab03c41d4d45221b6bc967b8c453ec3ae4749eff3894202d16800fdfe0e238 languageName: node linkType: hard @@ -12145,8 +12647,8 @@ __metadata: linkType: hard "ws@npm:^7.4.6": - version: 7.5.7 - resolution: "ws@npm:7.5.7" + version: 7.5.9 + resolution: "ws@npm:7.5.9" peerDependencies: bufferutil: ^4.0.1 utf-8-validate: ^5.0.2 @@ -12155,7 +12657,7 @@ __metadata: optional: true utf-8-validate: optional: true - checksum: 5c1f669a166fb57560b4e07f201375137fa31d9186afde78b1508926345ce546332f109081574ddc4e38cc474c5406b5fc71c18d71eb75f6e2d2245576976cba + checksum: c3c100a181b731f40b7f2fddf004aa023f79d64f489706a28bc23ff88e87f6a64b3c6651fbec3a84a53960b75159574d7a7385709847a62ddb7ad6af76f49138 languageName: node linkType: hard @@ -12260,16 +12762,6 @@ __metadata: languageName: node linkType: hard -"yargs-parser@npm:13.1.2, yargs-parser@npm:^13.1.2": - version: 13.1.2 - resolution: "yargs-parser@npm:13.1.2" - dependencies: - camelcase: ^5.0.0 - decamelize: ^1.2.0 - checksum: c8bb6f44d39a4acd94462e96d4e85469df865de6f4326e0ab1ac23ae4a835e5dd2ddfe588317ebf80c3a7e37e741bd5cb0dc8d92bcc5812baefb7df7c885e86b - languageName: node - linkType: hard - "yargs-parser@npm:20.2.4": version: 20.2.4 resolution: "yargs-parser@npm:20.2.4" @@ -12294,21 +12786,10 @@ __metadata: languageName: node linkType: hard -"yargs-parser@npm:^21.0.0": - version: 21.0.1 - resolution: "yargs-parser@npm:21.0.1" - checksum: c3ea2ed12cad0377ce3096b3f138df8267edf7b1aa7d710cd502fe16af417bafe4443dd71b28158c22fcd1be5dfd0e86319597e47badf42ff83815485887323a - languageName: node - linkType: hard - -"yargs-unparser@npm:1.6.0": - version: 1.6.0 - resolution: "yargs-unparser@npm:1.6.0" - dependencies: - flat: ^4.1.0 - lodash: ^4.17.15 - yargs: ^13.3.0 - checksum: ca662bb94af53d816d47f2162f0a1d135783f09de9fd47645a5cb18dd25532b0b710432b680d2c065ff45de122ba4a96433c41595fa7bfcc08eb12e889db95c1 +"yargs-parser@npm:^21.1.1": + version: 21.1.1 + resolution: "yargs-parser@npm:21.1.1" + checksum: ed2d96a616a9e3e1cc7d204c62ecc61f7aaab633dcbfab2c6df50f7f87b393993fe6640d017759fe112d0cb1e0119f2b4150a87305cc873fd90831c6a58ccf1c languageName: node linkType: hard @@ -12324,24 +12805,6 @@ __metadata: languageName: node linkType: hard -"yargs@npm:13.3.2, yargs@npm:^13.3.0": - version: 13.3.2 - resolution: "yargs@npm:13.3.2" - dependencies: - cliui: ^5.0.0 - find-up: ^3.0.0 - get-caller-file: ^2.0.1 - require-directory: ^2.1.1 - require-main-filename: ^2.0.0 - set-blocking: ^2.0.0 - string-width: ^3.0.0 - which-module: ^2.0.0 - y18n: ^4.0.0 - yargs-parser: ^13.1.2 - checksum: 75c13e837eb2bb25717957ba58d277e864efc0cca7f945c98bdf6477e6ec2f9be6afa9ed8a876b251a21423500c148d7b91e88dee7adea6029bdec97af1ef3e8 - languageName: node - linkType: hard - "yargs@npm:16.2.0": version: 16.2.0 resolution: "yargs@npm:16.2.0" @@ -12376,18 +12839,18 @@ __metadata: languageName: node linkType: hard -"yargs@npm:^17.1.1": - version: 17.5.1 - resolution: "yargs@npm:17.5.1" +"yargs@npm:^17.7.1": + version: 17.7.2 + resolution: "yargs@npm:17.7.2" dependencies: - cliui: ^7.0.2 + cliui: ^8.0.1 escalade: ^3.1.1 get-caller-file: ^2.0.5 require-directory: ^2.1.1 string-width: ^4.2.3 y18n: ^5.0.5 - yargs-parser: ^21.0.0 - checksum: 00d58a2c052937fa044834313f07910fd0a115dec5ee35919e857eeee3736b21a4eafa8264535800ba8bac312991ce785ecb8a51f4d2cc8c4676d865af1cfbde + yargs-parser: ^21.1.1 + checksum: 73b572e863aa4a8cbef323dd911d79d193b772defd5a51aab0aca2d446655216f5002c42c5306033968193bdbf892a7a4c110b0d77954a7fdf563e653967b56a languageName: node linkType: hard From 48f03989d2c18ac500b90678f29126780b0f5f21 Mon Sep 17 00:00:00 2001 From: Andres Martin Aiello <50411235+andresaiello@users.noreply.github.com> Date: Fri, 15 Dec 2023 11:38:10 -0300 Subject: [PATCH 107/115] feat: Run slither and coverage (#138) * feat: Run slither and coverage * remove unused code * lint * update readme * remove coverage files --- .gitignore | 4 +- README.md | 20 +++ .../test/ZetaConnectorMock.sol | 20 ++- .../contracts/shared/ZetaEthMock.sol | 4 + .../test/MultiChainValue.spec.ts | 41 +++++- .../contracts/disperse/Disperse.sol | 23 +++- .../RewardDistributor.sol | 25 ++-- .../Synthetixio/StakingRewards.sol | 4 +- .../contracts/shared/MockSystemContract.sol | 9 +- .../zevm-app-contracts/test/Disperse.spec.ts | 99 ++++++++++++++ .../test/LiquidityIncentives.spec.ts | 129 ++++++++++++++++++ .../zevm-app-contracts/test/Owned.spec.ts | 40 ++++++ 12 files changed, 392 insertions(+), 26 deletions(-) create mode 100644 packages/zevm-app-contracts/test/Disperse.spec.ts create mode 100644 packages/zevm-app-contracts/test/Owned.spec.ts diff --git a/.gitignore b/.gitignore index c5c75a79..f5e75401 100644 --- a/.gitignore +++ b/.gitignore @@ -28,5 +28,5 @@ tsconfig.tsbuildinfo scripts/slither-results/* !scripts/slither-results/.gitkeep - - +**/coverage/* +**/coverage.json diff --git a/README.md b/README.md index eadfb67a..532de0a8 100644 --- a/README.md +++ b/README.md @@ -66,6 +66,26 @@ yarn lint yarn lint:fix ``` +## Coverage +To check the test coverage run the follow command on the desire package + +```bash +npx hardhat coverage +``` + +## Static test +We run slither on our packages. If you want to run it should install slither + +```bash +brew install slither-analyzer +``` +and execute it + +```bash +slither . --filter-paths "contracts/test/|node_modules/" --exclude naming-convention +``` + ## Contributing We welcome (and appreciate) everyone's contributions. If you wanna contribute, read [CONTRIBUTING.md](CONTRIBUTING.md) for next steps. + diff --git a/packages/zeta-app-contracts/contracts/multi-chain-value/test/ZetaConnectorMock.sol b/packages/zeta-app-contracts/contracts/multi-chain-value/test/ZetaConnectorMock.sol index e1fedcd9..31e0a356 100644 --- a/packages/zeta-app-contracts/contracts/multi-chain-value/test/ZetaConnectorMock.sol +++ b/packages/zeta-app-contracts/contracts/multi-chain-value/test/ZetaConnectorMock.sol @@ -4,7 +4,25 @@ pragma solidity 0.8.7; import "@zetachain/protocol-contracts/contracts/evm/interfaces/ZetaInterfaces.sol"; contract ZetaConnectorMockValue is ZetaConnector { - function send(ZetaInterfaces.SendInput calldata input) external override {} + event Send( + uint256 destinationChainId, + bytes destinationAddress, + uint256 destinationGasLimit, + bytes message, + uint256 zetaValueAndGas, + bytes zetaParams + ); + + function send(ZetaInterfaces.SendInput calldata input) external override { + emit Send( + input.destinationChainId, + input.destinationAddress, + input.destinationGasLimit, + input.message, + input.zetaValueAndGas, + input.zetaParams + ); + } function onRevert( address zetaTxSenderAddress, diff --git a/packages/zeta-app-contracts/contracts/shared/ZetaEthMock.sol b/packages/zeta-app-contracts/contracts/shared/ZetaEthMock.sol index 7840a5ea..9b2e23a3 100644 --- a/packages/zeta-app-contracts/contracts/shared/ZetaEthMock.sol +++ b/packages/zeta-app-contracts/contracts/shared/ZetaEthMock.sol @@ -9,4 +9,8 @@ contract ZetaEthMock is ERC20("Zeta", "ZETA") { constructor(address creator, uint256 initialSupply) { _mint(creator, initialSupply * (10 ** uint256(decimals()))); } + + function deposit() external payable { + _mint(_msgSender(), msg.value); + } } diff --git a/packages/zeta-app-contracts/test/MultiChainValue.spec.ts b/packages/zeta-app-contracts/test/MultiChainValue.spec.ts index 2e4c3c5c..42ae0072 100644 --- a/packages/zeta-app-contracts/test/MultiChainValue.spec.ts +++ b/packages/zeta-app-contracts/test/MultiChainValue.spec.ts @@ -1,7 +1,7 @@ import { SignerWithAddress } from "@nomiclabs/hardhat-ethers/signers"; import { ZetaEth } from "@zetachain/protocol-contracts/dist/typechain-types"; import { expect } from "chai"; -import { parseEther } from "ethers/lib/utils"; +import { defaultAbiCoder, parseEther } from "ethers/lib/utils"; import { ethers } from "hardhat"; import { @@ -72,16 +72,45 @@ describe("MultiChainValue tests", () => { }); describe("send", () => { + it("Should send msg", async () => { + await zetaEthMockContract.approve(multiChainValueContractA.address, parseEther("1000")); + const tx = multiChainValueContractA.send(chainBId, account1Address, 10); + + await expect(tx) + .to.be.emit(zetaConnectorMockContract, "Send") + .withArgs( + chainBId, + account1Address.toLowerCase(), + 300000, + defaultAbiCoder.encode(["address"], [deployer.address]), + 10, + defaultAbiCoder.encode(["string"], [""]) + ); + }); + + it("Should send native token", async () => { + const tx = multiChainValueContractA.sendZeta(chainBId, account1Address, { value: 10 }); + await expect(tx) + .to.be.emit(zetaConnectorMockContract, "Send") + .withArgs( + chainBId, + account1Address.toLowerCase(), + 300000, + defaultAbiCoder.encode(["address"], [deployer.address]), + 10, + defaultAbiCoder.encode(["string"], [""]) + ); + }); + it("Should prevent sending value to a disabled chainId", async () => { - await expect(multiChainValueContractA.send(1, account1Address, 100_000)).to.be.revertedWith( - "InvalidDestinationChainId" - ); + const tx = multiChainValueContractA.send(1, account1Address, 100_000); + await expect(tx).to.be.revertedWith("InvalidDestinationChainId"); }); it("Should prevent sending 0 value", async () => { await (await multiChainValueContractA.addAvailableChainId(1)).wait(); - - await expect(multiChainValueContractA.send(1, account1Address, 0)).to.be.revertedWith("InvalidZetaValueAndGas"); + const tx = multiChainValueContractA.send(1, account1Address, 0); + await expect(tx).to.be.revertedWith("InvalidZetaValueAndGas"); }); it("Should prevent sending if the account has no Zeta balance", async () => { diff --git a/packages/zevm-app-contracts/contracts/disperse/Disperse.sol b/packages/zevm-app-contracts/contracts/disperse/Disperse.sol index c3afe2ae..2f1ae711 100644 --- a/packages/zevm-app-contracts/contracts/disperse/Disperse.sol +++ b/packages/zevm-app-contracts/contracts/disperse/Disperse.sol @@ -4,7 +4,16 @@ pragma solidity 0.8.7; import "@openzeppelin/contracts/interfaces/IERC20.sol"; contract Disperse { - function disperseEther(address[] calldata recipients, uint256[] calldata values) external payable { + bool private locked; + + modifier noReentrancy() { + require(!locked, "No reentrancy"); + locked = true; + _; + locked = false; + } + + function disperseEther(address[] calldata recipients, uint256[] calldata values) external payable noReentrancy { require(recipients.length == values.length, "Recipients and values length mismatch"); for (uint256 i = 0; i < recipients.length; i++) { @@ -19,14 +28,22 @@ contract Disperse { } } - function disperseToken(IERC20 token, address[] calldata recipients, uint256[] calldata values) external { + function disperseToken( + IERC20 token, + address[] calldata recipients, + uint256[] calldata values + ) external noReentrancy { uint256 total = 0; for (uint256 i = 0; i < recipients.length; i++) total += values[i]; require(token.transferFrom(msg.sender, address(this), total)); for (uint256 i = 0; i < recipients.length; i++) require(token.transfer(recipients[i], values[i])); } - function disperseTokenSimple(IERC20 token, address[] calldata recipients, uint256[] calldata values) external { + function disperseTokenSimple( + IERC20 token, + address[] calldata recipients, + uint256[] calldata values + ) external noReentrancy { for (uint256 i = 0; i < recipients.length; i++) require(token.transferFrom(msg.sender, recipients[i], values[i])); } diff --git a/packages/zevm-app-contracts/contracts/liquidity-incentives/RewardDistributor.sol b/packages/zevm-app-contracts/contracts/liquidity-incentives/RewardDistributor.sol index 4c30b8a1..d971843e 100644 --- a/packages/zevm-app-contracts/contracts/liquidity-incentives/RewardDistributor.sol +++ b/packages/zevm-app-contracts/contracts/liquidity-incentives/RewardDistributor.sol @@ -13,9 +13,9 @@ import "./Synthetixio/StakingRewards.sol"; contract RewardDistributor is StakingRewards { uint16 internal constant MAX_DEADLINE = 200; - IERC20 public stakingTokenA; - IERC20 public stakingTokenB; - SystemContract private systemContract; + IERC20 public immutable stakingTokenA; + IERC20 public immutable stakingTokenB; + SystemContract private immutable systemContract; uint256 public minCoolDown; uint256 public minStakingPeriod; mapping(address => uint256) public lastDeposit; @@ -24,6 +24,8 @@ contract RewardDistributor is StakingRewards { error ZeroStakeAmount(); error InvalidTokenAddress(); error MinimumStakingPeriodNotMet(); + error ApproveFailed(); + error TransferFailed(); event MinCoolDownUpdated(address callerAddress, uint256 minCoolDown); event MinStakingPeriodUpdated(address callerAddress, uint256 minStakingPeriod); @@ -43,12 +45,17 @@ contract RewardDistributor is StakingRewards { } function _addLiquidity(uint256 tokenAmountA, uint256 tokenAmountB) internal returns (uint256) { - stakingTokenA.transferFrom(msg.sender, address(this), tokenAmountA); - stakingTokenA.approve(systemContract.uniswapv2Router02Address(), 0); - stakingTokenA.approve(systemContract.uniswapv2Router02Address(), tokenAmountA); - - stakingTokenB.transferFrom(msg.sender, address(this), tokenAmountB); - stakingTokenB.approve(systemContract.uniswapv2Router02Address(), tokenAmountB); + bool transfer = stakingTokenA.transferFrom(msg.sender, address(this), tokenAmountA); + if (!transfer) revert TransferFailed(); + bool approve = stakingTokenA.approve(systemContract.uniswapv2Router02Address(), 0); + if (!approve) revert ApproveFailed(); + approve = stakingTokenA.approve(systemContract.uniswapv2Router02Address(), tokenAmountA); + if (!approve) revert ApproveFailed(); + + transfer = stakingTokenB.transferFrom(msg.sender, address(this), tokenAmountB); + if (!transfer) revert TransferFailed(); + approve = stakingTokenB.approve(systemContract.uniswapv2Router02Address(), tokenAmountB); + if (!approve) revert ApproveFailed(); (, , uint LPTokenAmount) = IUniswapV2Router02(systemContract.uniswapv2Router02Address()).addLiquidity( address(stakingTokenA), diff --git a/packages/zevm-app-contracts/contracts/liquidity-incentives/Synthetixio/StakingRewards.sol b/packages/zevm-app-contracts/contracts/liquidity-incentives/Synthetixio/StakingRewards.sol index d2e39461..38c57867 100644 --- a/packages/zevm-app-contracts/contracts/liquidity-incentives/Synthetixio/StakingRewards.sol +++ b/packages/zevm-app-contracts/contracts/liquidity-incentives/Synthetixio/StakingRewards.sol @@ -17,8 +17,8 @@ contract StakingRewards is RewardsDistributionRecipient, ReentrancyGuard, Pausab /* ========== STATE VARIABLES ========== */ - IERC20 public rewardsToken; - IERC20 public stakingToken; + IERC20 public immutable rewardsToken; + IERC20 public immutable stakingToken; uint256 public periodFinish = 0; uint256 public rewardRate = 0; uint256 public rewardsDuration = 7 days; diff --git a/packages/zevm-app-contracts/contracts/shared/MockSystemContract.sol b/packages/zevm-app-contracts/contracts/shared/MockSystemContract.sol index 43dff81c..679e064b 100644 --- a/packages/zevm-app-contracts/contracts/shared/MockSystemContract.sol +++ b/packages/zevm-app-contracts/contracts/shared/MockSystemContract.sol @@ -15,13 +15,15 @@ interface SystemContractErrors { } contract MockSystemContract is SystemContractErrors { + error TransferFailed(); + mapping(uint256 => uint256) public gasPriceByChainId; mapping(uint256 => address) public gasCoinZRC20ByChainId; mapping(uint256 => address) public gasZetaPoolByChainId; address public wZetaContractAddress; - address public uniswapv2FactoryAddress; - address public uniswapv2Router02Address; + address public immutable uniswapv2FactoryAddress; + address public immutable uniswapv2Router02Address; event SystemContractDeployed(); event SetGasPrice(uint256, uint256); @@ -79,7 +81,8 @@ contract MockSystemContract is SystemContractErrors { function onCrossChainCall(address target, address zrc20, uint256 amount, bytes calldata message) external { zContext memory context = zContext({sender: msg.sender, origin: "", chainID: block.chainid}); - IZRC20(zrc20).transfer(target, amount); + bool transfer = IZRC20(zrc20).transfer(target, amount); + if (!transfer) revert TransferFailed(); zContract(target).onCrossChainCall(context, zrc20, amount, message); } } diff --git a/packages/zevm-app-contracts/test/Disperse.spec.ts b/packages/zevm-app-contracts/test/Disperse.spec.ts new file mode 100644 index 00000000..20b7ca2c --- /dev/null +++ b/packages/zevm-app-contracts/test/Disperse.spec.ts @@ -0,0 +1,99 @@ +import { parseUnits } from "@ethersproject/units"; +import { SignerWithAddress } from "@nomiclabs/hardhat-ethers/signers"; +import { expect } from "chai"; +import { ethers, network } from "hardhat"; + +import { Disperse, Disperse__factory, MockZRC20, MockZRC20__factory } from "../typechain-types"; + +describe("Disperse tests", () => { + let disperseContract: Disperse; + + let accounts: SignerWithAddress[]; + let deployer: SignerWithAddress; + + beforeEach(async () => { + [deployer, ...accounts] = await ethers.getSigners(); + + await network.provider.send("hardhat_setBalance", [deployer.address, parseUnits("1000000").toHexString()]); + + const DisperseFactory = (await ethers.getContractFactory("Disperse")) as Disperse__factory; + disperseContract = (await DisperseFactory.deploy()) as Disperse; + await disperseContract.deployed(); + }); + + describe("Disperse", () => { + it("Should disperse ETH", async () => { + const amount = parseUnits("10"); + const balance0 = await ethers.provider.getBalance(accounts[0].address); + const balance1 = await ethers.provider.getBalance(accounts[1].address); + await disperseContract.disperseEther([accounts[0].address, accounts[1].address], [amount, amount.mul(2)], { + value: amount.mul(3), + }); + + const balance0After = await ethers.provider.getBalance(accounts[0].address); + const balance1After = await ethers.provider.getBalance(accounts[1].address); + + expect(balance0After.sub(balance0)).to.be.eq(amount); + expect(balance1After.sub(balance1)).to.be.eq(amount.mul(2)); + }); + + it("Should disperse ETH with surplus", async () => { + const amount = parseUnits("10"); + const balance0 = await ethers.provider.getBalance(accounts[0].address); + const balance1 = await ethers.provider.getBalance(accounts[1].address); + await disperseContract.disperseEther([accounts[0].address, accounts[1].address], [amount, amount.mul(2)], { + value: amount.mul(4), + }); + + const balance0After = await ethers.provider.getBalance(accounts[0].address); + const balance1After = await ethers.provider.getBalance(accounts[1].address); + + expect(balance0After.sub(balance0)).to.be.eq(amount); + expect(balance1After.sub(balance1)).to.be.eq(amount.mul(2)); + }); + + it("Should disperse token", async () => { + const MockTokenFactory = (await ethers.getContractFactory("MockZRC20")) as MockZRC20__factory; + const mockTokenContract = (await MockTokenFactory.deploy(1_000_000, "MOCK", "MOCK")) as MockZRC20; + await mockTokenContract.deployed(); + await mockTokenContract.approve(disperseContract.address, parseUnits("1000000")); + + const amount = parseUnits("10"); + const balance0 = await mockTokenContract.balanceOf(accounts[0].address); + const balance1 = await mockTokenContract.balanceOf(accounts[1].address); + await disperseContract.disperseToken( + mockTokenContract.address, + [accounts[0].address, accounts[1].address], + [amount, amount.mul(2)] + ); + + const balance0After = await mockTokenContract.balanceOf(accounts[0].address); + const balance1After = await mockTokenContract.balanceOf(accounts[1].address); + + expect(balance0After.sub(balance0)).to.be.eq(amount); + expect(balance1After.sub(balance1)).to.be.eq(amount.mul(2)); + }); + + it("Should disperse token simple", async () => { + const MockTokenFactory = (await ethers.getContractFactory("MockZRC20")) as MockZRC20__factory; + const mockTokenContract = (await MockTokenFactory.deploy(1_000_000, "MOCK", "MOCK")) as MockZRC20; + await mockTokenContract.deployed(); + await mockTokenContract.approve(disperseContract.address, parseUnits("1000000")); + + const amount = parseUnits("10"); + const balance0 = await mockTokenContract.balanceOf(accounts[0].address); + const balance1 = await mockTokenContract.balanceOf(accounts[1].address); + await disperseContract.disperseTokenSimple( + mockTokenContract.address, + [accounts[0].address, accounts[1].address], + [amount, amount.mul(2)] + ); + + const balance0After = await mockTokenContract.balanceOf(accounts[0].address); + const balance1After = await mockTokenContract.balanceOf(accounts[1].address); + + expect(balance0After.sub(balance0)).to.be.eq(amount); + expect(balance1After.sub(balance1)).to.be.eq(amount.mul(2)); + }); + }); +}); diff --git a/packages/zevm-app-contracts/test/LiquidityIncentives.spec.ts b/packages/zevm-app-contracts/test/LiquidityIncentives.spec.ts index 580ad199..e4922b71 100644 --- a/packages/zevm-app-contracts/test/LiquidityIncentives.spec.ts +++ b/packages/zevm-app-contracts/test/LiquidityIncentives.spec.ts @@ -46,6 +46,17 @@ describe("LiquidityIncentives tests", () => { return await rewardDistributorContract.connect(signer).addLiquidityAndStake(ZRC20Contract.address, amount); }; + const stakeZETA = async (signer: SignerWithAddress, amount: BigNumber) => { + const zetaNeeded = await rewardDistributorContract.otherTokenByAmount(ZRC20Contract.address, amount); + await ZRC20Contract.transfer(signer.address, amount); + await ZETA_ERC20.transfer(signer.address, zetaNeeded); + + await ZRC20Contract.connect(signer).approve(rewardDistributorContract.address, amount); + await ZETA_ERC20.connect(signer).approve(rewardDistributorContract.address, zetaNeeded); + + return await rewardDistributorContract.connect(signer).addLiquidityAndStake(ZETA_ERC20.address, zetaNeeded); + }; + beforeEach(async () => { accounts = await ethers.getSigners(); [deployer] = accounts; @@ -179,6 +190,72 @@ describe("LiquidityIncentives tests", () => { expect(earned).to.be.closeTo(REWARDS_AMOUNT.div(2), ERROR_TOLERANCE); }); + it("Should create an incentive and should be able to use it reverse tokens", async () => { + await ZETA.transfer(rewardDistributorContract.address, REWARDS_AMOUNT); + await rewardDistributorContract.setRewardsDuration(REWARD_DURATION); + await rewardDistributorContract.notifyRewardAmount(REWARDS_AMOUNT); + + const sampleAccount = accounts[0]; + const stakedAmount = parseEther("100"); + + await stakeZETA(sampleAccount, stakedAmount); + + await network.provider.send("evm_increaseTime", [REWARD_DURATION.div(2).toNumber()]); + await network.provider.send("evm_mine"); + + const earned = await rewardDistributorContract.earned(sampleAccount.address); + expect(earned).to.be.closeTo(REWARDS_AMOUNT.div(2), ERROR_TOLERANCE); + }); + + it("Should create an incentive and should be able to use it using stake", async () => { + await ZETA.transfer(rewardDistributorContract.address, REWARDS_AMOUNT); + await rewardDistributorContract.setRewardsDuration(REWARD_DURATION); + await rewardDistributorContract.notifyRewardAmount(REWARDS_AMOUNT); + + const sampleAccount = accounts[0]; + const stakedAmount = parseEther("100"); + + // await stakeToken(sampleAccount, stakedAmount); + const uniswapRouterAddr = getNonZetaAddress("uniswapV2Router02", "eth_mainnet"); + const zetaNeeded = await rewardDistributorContract.otherTokenByAmount(ZRC20Contract.address, stakedAmount); + await ZRC20Contract.transfer(sampleAccount.address, stakedAmount); + await ZETA_ERC20.transfer(sampleAccount.address, zetaNeeded); + + await ZRC20Contract.connect(sampleAccount).approve(uniswapRouterAddr, stakedAmount); + await ZETA_ERC20.connect(sampleAccount).approve(uniswapRouterAddr, zetaNeeded); + + const uniswapRouter = (await ethers.getContractAt("IUniswapV2Router02", uniswapRouterAddr)) as any; + const deadline = (await ethers.provider.getBlock("latest")).timestamp + 1000000; + await uniswapRouter.addLiquidity( + ZRC20Contract.address, + ZETA.address, + stakedAmount, + zetaNeeded, + 0, + 0, + sampleAccount.address, + deadline + ); + + const LPTokenAddress = await systemContract.uniswapv2PairFor( + await systemContract.uniswapv2FactoryAddress(), + ZRC20Contract.address, + ZETA.address + ); + + const ERC20Contract = (await ethers.getContractAt("ERC20", LPTokenAddress)) as any; + const LPBalance = await ERC20Contract.balanceOf(sampleAccount.address); + + await ERC20Contract.connect(sampleAccount).approve(rewardDistributorContract.address, LPBalance); + await rewardDistributorContract.connect(sampleAccount).stake(LPBalance); + + await network.provider.send("evm_increaseTime", [REWARD_DURATION.div(2).toNumber()]); + await network.provider.send("evm_mine"); + + const earned = await rewardDistributorContract.earned(sampleAccount.address); + expect(earned).to.be.closeTo(REWARDS_AMOUNT.div(2), ERROR_TOLERANCE); + }); + it("Should distribute rewards between two users", async () => { await ZETA.transfer(rewardDistributorContract.address, REWARDS_AMOUNT); await rewardDistributorContract.setRewardsDuration(REWARD_DURATION); @@ -512,4 +589,56 @@ describe("LiquidityIncentives tests", () => { const getReward = rewardDistributorContract.connect(sampleAccount1).getReward(true); await expect(getReward).to.be.revertedWith("Reward is not a wrapped asset"); }); + + it("Should return incentive contracts", async () => { + const rewardToken = ZRC20Contracts[1]; + const tx = await rewardDistributorFactory.createTokenIncentive( + deployer.address, + deployer.address, + rewardToken.address, + ZRC20Contract.address, + AddressZero + ); + const receipt = await tx.wait(); + const event = receipt.events?.find((e) => e.event === "RewardDistributorCreated"); + expect(event).to.not.be.undefined; + + const { rewardDistributorContract: rewardDistributorContractAddress1 } = event?.args as any; + + const tx2 = await rewardDistributorFactory.createTokenIncentive( + deployer.address, + deployer.address, + rewardToken.address, + ZRC20Contract.address, + AddressZero + ); + const receipt2 = await tx2.wait(); + const event2 = receipt2.events?.find((e) => e.event === "RewardDistributorCreated"); + expect(event2).to.not.be.undefined; + + const { rewardDistributorContract: rewardDistributorContractAddress2 } = event2?.args as any; + + // @dev: on setup is already deployed a rewardDistributorContract + const incentiveContracts = await rewardDistributorFactory.getIncentiveContracts(); + expect(incentiveContracts[1]).to.be.eq(rewardDistributorContractAddress1); + expect(incentiveContracts[2]).to.be.eq(rewardDistributorContractAddress2); + }); + + it("Should be pausable", async () => { + const paused1 = await rewardDistributorContract.paused(); + expect(paused1).to.be.false; + + await rewardDistributorContract.setPaused(true); + const paused2 = await rewardDistributorContract.paused(); + expect(paused2).to.be.true; + }); + + it("Should be pausable even the same value", async () => { + const paused1 = await rewardDistributorContract.paused(); + expect(paused1).to.be.false; + + await rewardDistributorContract.setPaused(false); + const paused2 = await rewardDistributorContract.paused(); + expect(paused2).to.be.false; + }); }); diff --git a/packages/zevm-app-contracts/test/Owned.spec.ts b/packages/zevm-app-contracts/test/Owned.spec.ts new file mode 100644 index 00000000..8ae9c094 --- /dev/null +++ b/packages/zevm-app-contracts/test/Owned.spec.ts @@ -0,0 +1,40 @@ +import { BigNumber } from "@ethersproject/bignumber"; +import { parseUnits } from "@ethersproject/units"; +import { SignerWithAddress } from "@nomiclabs/hardhat-ethers/signers"; +import { expect } from "chai"; +import { ethers, network } from "hardhat"; + +import { Owned, Owned__factory } from "../typechain-types"; + +describe("Disperse tests", () => { + let ownedContract: Owned; + + let accounts: SignerWithAddress[]; + let deployer: SignerWithAddress; + + beforeEach(async () => { + [deployer, ...accounts] = await ethers.getSigners(); + + await network.provider.send("hardhat_setBalance", [deployer.address, parseUnits("1000000").toHexString()]); + + const OwnedFactory = (await ethers.getContractFactory("Owned")) as Owned__factory; + ownedContract = (await OwnedFactory.deploy(deployer.address)) as Owned; + await ownedContract.deployed(); + }); + + describe("Owned", () => { + it("Should nominate and transfer", async () => { + let owner = await ownedContract.owner(); + expect(owner).to.be.eq(deployer.address); + + await ownedContract.nominateNewOwner(accounts[1].address); + owner = await ownedContract.owner(); + expect(owner).to.be.eq(deployer.address); + + await ownedContract.connect(accounts[1]).acceptOwnership(); + + owner = await ownedContract.owner(); + expect(owner).to.be.eq(accounts[1].address); + }); + }); +}); From ce47d94d4e2ce53a93582e766a6537c3e711d235 Mon Sep 17 00:00:00 2001 From: Andres Martin Aiello <50411235+andresaiello@users.noreply.github.com> Date: Wed, 3 Jan 2024 14:41:36 -0300 Subject: [PATCH 108/115] feat: Iimprove token incentive scripts (#139) * feat: Iimprove token incentive scripts * lint --- .../liquidity-incentives/add-reward.ts | 118 ++---------------- .../deploy-default-rewards.ts | 61 +++++++++ .../deploy-token-reward.ts | 39 ++++++ .../deploy-zrc20-reward.ts | 39 ++++++ .../scripts/liquidity-incentives/helpers.ts | 84 +++++++++++++ 5 files changed, 235 insertions(+), 106 deletions(-) create mode 100644 packages/zevm-app-contracts/scripts/liquidity-incentives/deploy-default-rewards.ts create mode 100644 packages/zevm-app-contracts/scripts/liquidity-incentives/deploy-token-reward.ts create mode 100644 packages/zevm-app-contracts/scripts/liquidity-incentives/deploy-zrc20-reward.ts create mode 100644 packages/zevm-app-contracts/scripts/liquidity-incentives/helpers.ts diff --git a/packages/zevm-app-contracts/scripts/liquidity-incentives/add-reward.ts b/packages/zevm-app-contracts/scripts/liquidity-incentives/add-reward.ts index f00c455a..aee56866 100644 --- a/packages/zevm-app-contracts/scripts/liquidity-incentives/add-reward.ts +++ b/packages/zevm-app-contracts/scripts/liquidity-incentives/add-reward.ts @@ -1,121 +1,27 @@ import { BigNumber } from "@ethersproject/bignumber"; -import { SignerWithAddress } from "@nomiclabs/hardhat-ethers/signers"; -import { isProtocolNetworkName, ZetaProtocolNetwork } from "@zetachain/protocol-contracts"; +import { isProtocolNetworkName } from "@zetachain/protocol-contracts"; import { parseEther } from "ethers/lib/utils"; import { ethers, network } from "hardhat"; -import { - ERC20__factory, - RewardDistributor__factory, - RewardDistributorFactory, - RewardDistributorFactory__factory, - SystemContract, - SystemContract__factory, -} from "../../typechain-types"; -import { getChainId, getSystemContractAddress, getZEVMAppAddress } from "../address.helpers"; +import { SystemContract__factory } from "../../typechain-types"; +import { getSystemContractAddress } from "../address.helpers"; +import { addReward } from "./helpers"; -const SYSTEM_CONTRACT = getSystemContractAddress(); - -const networkName = network.name; const REWARD_DURATION = BigNumber.from("604800").mul(8); // 1 week * 8 const REWARDS_AMOUNT = parseEther("500"); +const REWARD_CONTRACT_ADDRESS = "0x0dee8b6e2d2035a798b67c68d47f941718a62263"; //@dev: change this to the address of the reward contract -const getZRC20Address = async (systemContract: SystemContract, network: ZetaProtocolNetwork) => { - const tokenAddress = await systemContract.gasCoinZRC20ByChainId(getChainId(network)); - return tokenAddress; -}; - -const deployRewardByNetwork = async ( - deployer: SignerWithAddress, - systemContract: SystemContract, - networkName: ZetaProtocolNetwork, - rewardDistributorFactory: RewardDistributorFactory -) => { - const tokenAddress = await getZRC20Address(systemContract, networkName); - const zetaTokenAddress = await systemContract.wZetaContractAddress(); - - const tx = await rewardDistributorFactory.createTokenIncentive( - deployer.address, - deployer.address, - zetaTokenAddress, - // @dev: now we send both tokens so contract calculate internaly LP address - zetaTokenAddress, - tokenAddress - ); - - const receipt = await tx.wait(); - - const event = receipt.events?.find((e) => e.event === "RewardDistributorCreated"); - - const { rewardDistributorContract: rewardDistributorContractAddress } = event?.args as any; - - console.log("RewardDistributor deployed to:", rewardDistributorContractAddress); - - return rewardDistributorContractAddress; -}; - -const addReward = async ( - deployer: SignerWithAddress, - systemContract: SystemContract, - rewardDistributorContractAddress: string -) => { - const zetaTokenAddress = await systemContract.wZetaContractAddress(); - - const rewardDistributorContract = await RewardDistributor__factory.connect( - rewardDistributorContractAddress, - deployer - ); - - const ZETA = ERC20__factory.connect(zetaTokenAddress, deployer); - const tx = await ZETA.transfer(rewardDistributorContract.address, REWARDS_AMOUNT.mul(1)); - await tx.wait(); - await rewardDistributorContract.setRewardsDuration(REWARD_DURATION); - await rewardDistributorContract.notifyRewardAmount(REWARDS_AMOUNT); - - console.log("Reward added to:", rewardDistributorContract.address); -}; - -async function main() { +const main = async () => { const [deployer] = await ethers.getSigners(); - if (!isProtocolNetworkName(networkName)) throw new Error("Invalid network name"); - const systemContract = await SystemContract__factory.connect(SYSTEM_CONTRACT, deployer); + const networkName = network.name; - const factoryContractAddress = getZEVMAppAddress("rewardDistributorFactory"); + if (!isProtocolNetworkName(networkName)) throw new Error("Invalid network name"); - const rewardDistributorFactory = RewardDistributorFactory__factory.connect(factoryContractAddress, deployer); - let rewardContractAddress = ""; - // @dev: you can write your own address here to add reward to an existing contract - // rewardContractAddress = "0x0dee8b6e2d2035a798b67c68d47f941718a62263"; - rewardContractAddress = await deployRewardByNetwork( - deployer, - systemContract, - "goerli_testnet", - rewardDistributorFactory - ); - await addReward(deployer, systemContract, rewardContractAddress); + const systemContractAddress = getSystemContractAddress(); + const systemContract = await SystemContract__factory.connect(systemContractAddress, deployer); - rewardContractAddress = await deployRewardByNetwork( - deployer, - systemContract, - "bsc_testnet", - rewardDistributorFactory - ); - await addReward(deployer, systemContract, rewardContractAddress); - rewardContractAddress = await deployRewardByNetwork( - deployer, - systemContract, - "btc_testnet", - rewardDistributorFactory - ); - await addReward(deployer, systemContract, rewardContractAddress); - rewardContractAddress = await deployRewardByNetwork( - deployer, - systemContract, - "mumbai_testnet", - rewardDistributorFactory - ); - await addReward(deployer, systemContract, rewardContractAddress); -} + await addReward(deployer, systemContract, REWARD_CONTRACT_ADDRESS, REWARD_DURATION, REWARDS_AMOUNT); +}; main().catch((error) => { console.error(error); diff --git a/packages/zevm-app-contracts/scripts/liquidity-incentives/deploy-default-rewards.ts b/packages/zevm-app-contracts/scripts/liquidity-incentives/deploy-default-rewards.ts new file mode 100644 index 00000000..2b4feb22 --- /dev/null +++ b/packages/zevm-app-contracts/scripts/liquidity-incentives/deploy-default-rewards.ts @@ -0,0 +1,61 @@ +import { BigNumber } from "@ethersproject/bignumber"; +import { isProtocolNetworkName } from "@zetachain/protocol-contracts"; +import { parseEther } from "ethers/lib/utils"; +import { ethers, network } from "hardhat"; + +import { RewardDistributorFactory__factory, SystemContract__factory } from "../../typechain-types"; +import { getSystemContractAddress, getZEVMAppAddress } from "../address.helpers"; +import { addReward, deployRewardByNetwork } from "./helpers"; + +const REWARD_DURATION = BigNumber.from("604800").mul(8); // 1 week * 8 +const REWARDS_AMOUNT = parseEther("500"); + +const main = async () => { + const [deployer] = await ethers.getSigners(); + const networkName = network.name; + + if (!isProtocolNetworkName(networkName)) throw new Error("Invalid network name"); + const systemContractAddress = getSystemContractAddress(); + const systemContract = await SystemContract__factory.connect(systemContractAddress, deployer); + + const factoryContractAddress = getZEVMAppAddress("rewardDistributorFactory"); + + const rewardDistributorFactory = RewardDistributorFactory__factory.connect(factoryContractAddress, deployer); + let rewardContractAddress = ""; + // @dev: you can write your own address here to add reward to an existing contract + // rewardContractAddress = "0x0dee8b6e2d2035a798b67c68d47f941718a62263"; + rewardContractAddress = await deployRewardByNetwork( + deployer, + systemContract, + "goerli_testnet", + rewardDistributorFactory + ); + await addReward(deployer, systemContract, rewardContractAddress, REWARD_DURATION, REWARDS_AMOUNT); + + rewardContractAddress = await deployRewardByNetwork( + deployer, + systemContract, + "bsc_testnet", + rewardDistributorFactory + ); + await addReward(deployer, systemContract, rewardContractAddress, REWARD_DURATION, REWARDS_AMOUNT); + rewardContractAddress = await deployRewardByNetwork( + deployer, + systemContract, + "btc_testnet", + rewardDistributorFactory + ); + await addReward(deployer, systemContract, rewardContractAddress, REWARD_DURATION, REWARDS_AMOUNT); + rewardContractAddress = await deployRewardByNetwork( + deployer, + systemContract, + "mumbai_testnet", + rewardDistributorFactory + ); + await addReward(deployer, systemContract, rewardContractAddress, REWARD_DURATION, REWARDS_AMOUNT); +}; + +main().catch((error) => { + console.error(error); + process.exit(1); +}); diff --git a/packages/zevm-app-contracts/scripts/liquidity-incentives/deploy-token-reward.ts b/packages/zevm-app-contracts/scripts/liquidity-incentives/deploy-token-reward.ts new file mode 100644 index 00000000..2c777db4 --- /dev/null +++ b/packages/zevm-app-contracts/scripts/liquidity-incentives/deploy-token-reward.ts @@ -0,0 +1,39 @@ +import { BigNumber } from "@ethersproject/bignumber"; +import { isProtocolNetworkName } from "@zetachain/protocol-contracts"; +import { parseEther } from "ethers/lib/utils"; +import { ethers, network } from "hardhat"; + +import { RewardDistributorFactory__factory, SystemContract__factory } from "../../typechain-types"; +import { getSystemContractAddress, getZEVMAppAddress } from "../address.helpers"; +import { addReward, deployRewardByToken } from "./helpers"; + +const REWARD_DURATION = BigNumber.from("604800").mul(8); // 1 week * 8 +const REWARDS_AMOUNT = parseEther("500"); +const TOKEN_ADDRESS = "0x0dee8b6e2d2035a798b67c68d47f941718a62263"; + +const main = async () => { + const [deployer] = await ethers.getSigners(); + const networkName = network.name; + + if (!isProtocolNetworkName(networkName)) throw new Error("Invalid network name"); + + const systemContractAddress = getSystemContractAddress(); + const systemContract = await SystemContract__factory.connect(systemContractAddress, deployer); + + const factoryContractAddress = getZEVMAppAddress("rewardDistributorFactory"); + + const rewardDistributorFactory = RewardDistributorFactory__factory.connect(factoryContractAddress, deployer); + + const rewardContractAddress = await deployRewardByToken( + deployer, + systemContract, + TOKEN_ADDRESS, + rewardDistributorFactory + ); + await addReward(deployer, systemContract, rewardContractAddress, REWARD_DURATION, REWARDS_AMOUNT); +}; + +main().catch((error) => { + console.error(error); + process.exit(1); +}); diff --git a/packages/zevm-app-contracts/scripts/liquidity-incentives/deploy-zrc20-reward.ts b/packages/zevm-app-contracts/scripts/liquidity-incentives/deploy-zrc20-reward.ts new file mode 100644 index 00000000..ef8ff3db --- /dev/null +++ b/packages/zevm-app-contracts/scripts/liquidity-incentives/deploy-zrc20-reward.ts @@ -0,0 +1,39 @@ +import { BigNumber } from "@ethersproject/bignumber"; +import { isProtocolNetworkName } from "@zetachain/protocol-contracts"; +import { parseEther } from "ethers/lib/utils"; +import { ethers, network } from "hardhat"; + +import { RewardDistributorFactory__factory, SystemContract__factory } from "../../typechain-types"; +import { getSystemContractAddress, getZEVMAppAddress } from "../address.helpers"; +import { addReward, deployRewardByNetwork } from "./helpers"; + +const REWARD_DURATION = BigNumber.from("604800").mul(8); // 1 week * 8 +const REWARDS_AMOUNT = parseEther("500"); +const NETWORK_NAME = "goerli_testnet"; // @dev: change to your network name + +const main = async () => { + const [deployer] = await ethers.getSigners(); + const networkName = network.name; + + if (!isProtocolNetworkName(networkName)) throw new Error("Invalid network name"); + + const systemContractAddress = getSystemContractAddress(); + const systemContract = await SystemContract__factory.connect(systemContractAddress, deployer); + + const factoryContractAddress = getZEVMAppAddress("rewardDistributorFactory"); + + const rewardDistributorFactory = RewardDistributorFactory__factory.connect(factoryContractAddress, deployer); + + const rewardContractAddress = await deployRewardByNetwork( + deployer, + systemContract, + NETWORK_NAME, + rewardDistributorFactory + ); + await addReward(deployer, systemContract, rewardContractAddress, REWARD_DURATION, REWARDS_AMOUNT); +}; + +main().catch((error) => { + console.error(error); + process.exit(1); +}); diff --git a/packages/zevm-app-contracts/scripts/liquidity-incentives/helpers.ts b/packages/zevm-app-contracts/scripts/liquidity-incentives/helpers.ts new file mode 100644 index 00000000..29c0748f --- /dev/null +++ b/packages/zevm-app-contracts/scripts/liquidity-incentives/helpers.ts @@ -0,0 +1,84 @@ +import { BigNumber } from "@ethersproject/bignumber"; +import { SignerWithAddress } from "@nomiclabs/hardhat-ethers/signers"; +import { ZetaProtocolNetwork } from "@zetachain/protocol-contracts"; +import { parseEther } from "ethers/lib/utils"; + +import { + ERC20__factory, + RewardDistributor__factory, + RewardDistributorFactory, + SystemContract, +} from "../../typechain-types"; +import { getChainId } from "../address.helpers"; + +export const deployRewardByToken = async ( + deployer: SignerWithAddress, + systemContract: SystemContract, + tokenAddress: string, + rewardDistributorFactory: RewardDistributorFactory +) => { + const zetaTokenAddress = await systemContract.wZetaContractAddress(); + + const tx = await rewardDistributorFactory.createTokenIncentive( + deployer.address, + deployer.address, + zetaTokenAddress, + // @dev: now we send both tokens so contract calculate internaly LP address + zetaTokenAddress, + tokenAddress + ); + + const receipt = await tx.wait(); + + const event = receipt.events?.find((e) => e.event === "RewardDistributorCreated"); + + const { rewardDistributorContract: rewardDistributorContractAddress } = event?.args as any; + + console.log("RewardDistributor deployed to:", rewardDistributorContractAddress); + + return rewardDistributorContractAddress; +}; + +const getZRC20Address = async (systemContract: SystemContract, network: ZetaProtocolNetwork) => { + const tokenAddress = await systemContract.gasCoinZRC20ByChainId(getChainId(network)); + return tokenAddress; +}; + +export const deployRewardByNetwork = async ( + deployer: SignerWithAddress, + systemContract: SystemContract, + networkName: ZetaProtocolNetwork, + rewardDistributorFactory: RewardDistributorFactory +) => { + const tokenAddress = await getZRC20Address(systemContract, networkName); + const rewardContractAddress = await deployRewardByToken( + deployer, + systemContract, + tokenAddress, + rewardDistributorFactory + ); + return rewardContractAddress; +}; + +export const addReward = async ( + deployer: SignerWithAddress, + systemContract: SystemContract, + rewardDistributorContractAddress: string, + rewardAmount: BigNumber = parseEther("500"), + rewardDuration: BigNumber = BigNumber.from("604800").mul(8) // 1 week * 8 +) => { + const zetaTokenAddress = await systemContract.wZetaContractAddress(); + + const rewardDistributorContract = await RewardDistributor__factory.connect( + rewardDistributorContractAddress, + deployer + ); + + const ZETA = ERC20__factory.connect(zetaTokenAddress, deployer); + const tx = await ZETA.transfer(rewardDistributorContract.address, rewardAmount.mul(1)); + await tx.wait(); + await rewardDistributorContract.setRewardsDuration(rewardDuration); + await rewardDistributorContract.notifyRewardAmount(rewardAmount); + + console.log("Reward added to:", rewardDistributorContract.address); +}; From dd137706c0cf04d2e43b5dbe98bc9c9fd22ee6f8 Mon Sep 17 00:00:00 2001 From: Andres Martin Aiello <50411235+andresaiello@users.noreply.github.com> Date: Mon, 8 Jan 2024 12:33:34 -0300 Subject: [PATCH 109/115] feat: Npm Pkg for app contract addresses (#141) Npm Pkg for app contract addresses --- .github/workflows/publish-npm.yaml | 62 ++++++++++++++++++++++++++++++ 1 file changed, 62 insertions(+) create mode 100644 .github/workflows/publish-npm.yaml diff --git a/.github/workflows/publish-npm.yaml b/.github/workflows/publish-npm.yaml new file mode 100644 index 00000000..51ae33c4 --- /dev/null +++ b/.github/workflows/publish-npm.yaml @@ -0,0 +1,62 @@ +name: Publish to NPM + +on: + release: + types: [published] + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - name: Checkout Repository + uses: actions/checkout@v3 + + - name: Setup Node.js + uses: actions/setup-node@v3 + with: + node-version: "16" + registry-url: "https://registry.npmjs.org" + + - name: Install Dependencies + run: yarn install + + - name: Determine NPM Tag zeta app contracts + id: determine-npm-tag-zeta-app-contracts + working-directory: packages/zeta-app-contracts + run: | + VERSION_TAG=${GITHUB_REF#refs/tags/v} + if [[ $VERSION_TAG == *"-"* ]]; then + echo ::set-output name=NPM_TAG::${VERSION_TAG#*-} + else + echo ::set-output name=NPM_TAG::latest + fi + env: + GITHUB_REF: ${{ github.ref }} + + - name: Publish to NPM zeta app contracts + working-directory: packages/zeta-app-contracts + run: yarn publish --new-version ${GITHUB_REF#refs/tags/v} --tag ${{ steps.determine-npm-tag.outputs.NPM_TAG }} --no-git-tag-version + env: + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} + GITHUB_REF: ${{ github.ref }} + + - name: Determine NPM Tag zevm app contracts + id: determine-npm-tag-zevm-app-contracts + working-directory: packages/zevm-app-contracts + run: | + VERSION_TAG=${GITHUB_REF#refs/tags/v} + if [[ $VERSION_TAG == *"-"* ]]; then + echo ::set-output name=NPM_TAG::${VERSION_TAG#*-} + else + echo ::set-output name=NPM_TAG::latest + fi + env: + GITHUB_REF: ${{ github.ref }} + + - name: Publish to NPM zevm app contracts + working-directory: packages/zevm-app-contracts + run: yarn publish --new-version ${GITHUB_REF#refs/tags/v} --tag ${{ steps.determine-npm-tag.outputs.NPM_TAG }} --no-git-tag-version + env: + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} + GITHUB_REF: ${{ github.ref }} From 66e4465360875e44b3f91dade9d12970a05436f1 Mon Sep 17 00:00:00 2001 From: Andres Martin Aiello <50411235+andresaiello@users.noreply.github.com> Date: Mon, 8 Jan 2024 15:03:49 -0300 Subject: [PATCH 110/115] feat: npm pkg app contract addresses (#142) * Npm Pkg for app contract addresses * update publish to yarn 3 --- .github/workflows/publish-npm.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/publish-npm.yaml b/.github/workflows/publish-npm.yaml index 51ae33c4..79d143f9 100644 --- a/.github/workflows/publish-npm.yaml +++ b/.github/workflows/publish-npm.yaml @@ -36,7 +36,7 @@ jobs: - name: Publish to NPM zeta app contracts working-directory: packages/zeta-app-contracts - run: yarn publish --new-version ${GITHUB_REF#refs/tags/v} --tag ${{ steps.determine-npm-tag.outputs.NPM_TAG }} --no-git-tag-version + run: yarn npm publish --tag ${{ steps.determine-npm-tag-zeta-app-contracts.outputs.NPM_TAG }} env: NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} GITHUB_REF: ${{ github.ref }} @@ -56,7 +56,7 @@ jobs: - name: Publish to NPM zevm app contracts working-directory: packages/zevm-app-contracts - run: yarn publish --new-version ${GITHUB_REF#refs/tags/v} --tag ${{ steps.determine-npm-tag.outputs.NPM_TAG }} --no-git-tag-version + run: yarn npm publish --tag ${{ steps.determine-npm-tag-zevm-app-contracts.outputs.NPM_TAG }} env: NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} GITHUB_REF: ${{ github.ref }} From 95c5ec9ed67fb0d8582cd7923291ff3caa62fe35 Mon Sep 17 00:00:00 2001 From: Andres Martin Aiello <50411235+andresaiello@users.noreply.github.com> Date: Mon, 8 Jan 2024 15:37:58 -0300 Subject: [PATCH 111/115] feat: npm pkg app contract addresses 2 (#143) * feat: npm pkg app contract addresses * select files --- package.json | 4 ++-- packages/zeta-app-contracts/package.json | 13 ++++++++++--- packages/zevm-app-contracts/package.json | 12 +++++++++--- 3 files changed, 21 insertions(+), 8 deletions(-) diff --git a/package.json b/package.json index 30842c69..e7a00b32 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "zetachain", "license": "MIT", "version": "0.1.0", - "private": true, + "private": false, "workspaces": { "packages": [ "packages/*" @@ -68,4 +68,4 @@ "dependencies": { "solc": "0.8.7" } -} +} \ No newline at end of file diff --git a/packages/zeta-app-contracts/package.json b/packages/zeta-app-contracts/package.json index f91d752f..139faf17 100644 --- a/packages/zeta-app-contracts/package.json +++ b/packages/zeta-app-contracts/package.json @@ -1,13 +1,20 @@ { "name": "@zetachain/zeta-app-contracts", - "version": "0.0.1", + "version": "0.0.2", "license": "MIT", - "private": true, + "private": false, "author": "zetachain", "publishConfig": { "access": "public", "registry": "https://registry.npmjs.org/" }, + "files": [ + "contracts", + "data", + "lib", + "scripts", + "typechain-types" + ], "scripts": { "clean": "npx hardhat clean", "compile": "npx hardhat compile", @@ -34,4 +41,4 @@ "@zetachain/protocol-contracts": "^3.0.1", "ethers": "5.6.8" } -} +} \ No newline at end of file diff --git a/packages/zevm-app-contracts/package.json b/packages/zevm-app-contracts/package.json index 7503aaf4..b9e78330 100644 --- a/packages/zevm-app-contracts/package.json +++ b/packages/zevm-app-contracts/package.json @@ -1,13 +1,19 @@ { "name": "@zetachain/zevm-app-contracts", - "version": "0.0.1", + "version": "0.0.2", "license": "MIT", - "private": true, + "private": false, "author": "zetachain", "publishConfig": { "access": "public", "registry": "https://registry.npmjs.org/" }, + "files": [ + "contracts", + "data", + "scripts", + "typechain-types" + ], "scripts": { "clean": "npx hardhat clean", "compile": "npx hardhat compile", @@ -35,4 +41,4 @@ "@zetachain/protocol-contracts": "^3.0.1", "ethers": "5.6.8" } -} +} \ No newline at end of file From fc42ff890c7ccc0cf6b6abbba91554c149ebc57f Mon Sep 17 00:00:00 2001 From: Andres Martin Aiello <50411235+andresaiello@users.noreply.github.com> Date: Tue, 9 Jan 2024 11:24:16 -0300 Subject: [PATCH 112/115] feat: npm pkg app contract addresses 3 (#144) --- .github/workflows/publish-npm.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/publish-npm.yaml b/.github/workflows/publish-npm.yaml index 79d143f9..8aceae0f 100644 --- a/.github/workflows/publish-npm.yaml +++ b/.github/workflows/publish-npm.yaml @@ -36,7 +36,7 @@ jobs: - name: Publish to NPM zeta app contracts working-directory: packages/zeta-app-contracts - run: yarn npm publish --tag ${{ steps.determine-npm-tag-zeta-app-contracts.outputs.NPM_TAG }} + run: npm publish --tag ${{ steps.determine-npm-tag-zeta-app-contracts.outputs.NPM_TAG }} env: NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} GITHUB_REF: ${{ github.ref }} @@ -56,7 +56,7 @@ jobs: - name: Publish to NPM zevm app contracts working-directory: packages/zevm-app-contracts - run: yarn npm publish --tag ${{ steps.determine-npm-tag-zevm-app-contracts.outputs.NPM_TAG }} + run: npm publish --tag ${{ steps.determine-npm-tag-zevm-app-contracts.outputs.NPM_TAG }} env: NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} GITHUB_REF: ${{ github.ref }} From d7f76a5e001126004eafe0ebbe116245e997d0cc Mon Sep 17 00:00:00 2001 From: Andres Martin Aiello <50411235+andresaiello@users.noreply.github.com> Date: Sun, 28 Jan 2024 18:16:04 -0300 Subject: [PATCH 113/115] feat: Add events to disperse (#146) * feat: Add events to disperse * rename * deploy * add from to event --- .../contracts/disperse/Disperse.sol | 12 ++++++++++-- packages/zevm-app-contracts/data/addresses.json | 2 +- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/packages/zevm-app-contracts/contracts/disperse/Disperse.sol b/packages/zevm-app-contracts/contracts/disperse/Disperse.sol index 2f1ae711..21efac64 100644 --- a/packages/zevm-app-contracts/contracts/disperse/Disperse.sol +++ b/packages/zevm-app-contracts/contracts/disperse/Disperse.sol @@ -6,6 +6,8 @@ import "@openzeppelin/contracts/interfaces/IERC20.sol"; contract Disperse { bool private locked; + event FundsDispersed(address indexed token, address indexed from, address indexed recipient, uint256 value); + modifier noReentrancy() { require(!locked, "No reentrancy"); locked = true; @@ -19,6 +21,7 @@ contract Disperse { for (uint256 i = 0; i < recipients.length; i++) { (bool sent, ) = payable(recipients[i]).call{value: values[i]}(""); require(sent, "Failed to send Ether"); + emit FundsDispersed(address(0), msg.sender, recipients[i], values[i]); } uint256 balance = address(this).balance; @@ -36,7 +39,10 @@ contract Disperse { uint256 total = 0; for (uint256 i = 0; i < recipients.length; i++) total += values[i]; require(token.transferFrom(msg.sender, address(this), total)); - for (uint256 i = 0; i < recipients.length; i++) require(token.transfer(recipients[i], values[i])); + for (uint256 i = 0; i < recipients.length; i++) { + require(token.transfer(recipients[i], values[i])); + emit FundsDispersed(address(token), msg.sender, recipients[i], values[i]); + } } function disperseTokenSimple( @@ -44,7 +50,9 @@ contract Disperse { address[] calldata recipients, uint256[] calldata values ) external noReentrancy { - for (uint256 i = 0; i < recipients.length; i++) + for (uint256 i = 0; i < recipients.length; i++) { require(token.transferFrom(msg.sender, recipients[i], values[i])); + emit FundsDispersed(address(token), msg.sender, recipients[i], values[i]); + } } } diff --git a/packages/zevm-app-contracts/data/addresses.json b/packages/zevm-app-contracts/data/addresses.json index 08869c18..e040ed8f 100644 --- a/packages/zevm-app-contracts/data/addresses.json +++ b/packages/zevm-app-contracts/data/addresses.json @@ -1,7 +1,7 @@ { "zevm": { "zeta_testnet": { - "disperse": "0x1E0F767F48Fb10FcF820703f116E9B0F87319d63", + "disperse": "0xf394dc01879E39f19eDA533EFD10C82eEee5B2b1", "rewardDistributorFactory": "0x667e4C493d40015256BDC89E3ba750B2F90359E1", "zetaSwap": "0x44D1F1f9289DBA1Cf5824bd667184cEBE020aA1c", "zetaSwapBtcInbound": "0x008b393933D5CA2457Df570CA5D628380FFf6da4", From f79723be4073c60b25c92906c8a626d22c2b133a Mon Sep 17 00:00:00 2001 From: Andres Martin Aiello <50411235+andresaiello@users.noreply.github.com> Date: Fri, 2 Feb 2024 13:22:18 -0300 Subject: [PATCH 114/115] feat: implement feature to disable invitation (#148) * feat: implement feature to disable invitation * audit recommendation * add expiration * typo * update addresses * add pk --- package.json | 2 +- .../zeta-app-contracts/data/addresses.json | 6 +- packages/zeta-app-contracts/hardhat.config.ts | 5 +- .../contracts/disperse/Disperse.sol | 9 +- .../zeta-points/InvitationManager.sol | 46 ++++-- .../zevm-app-contracts/data/addresses.json | 10 +- packages/zevm-app-contracts/hardhat.config.ts | 2 +- .../zevm-app-contracts/test/Disperse.spec.ts | 16 ++- .../test/zeta-points/InvitationManager.ts | 62 ++++++-- .../test/zeta-points/test.helpers.ts | 8 +- yarn.lock | 132 +++++++++++++----- 11 files changed, 214 insertions(+), 84 deletions(-) diff --git a/package.json b/package.json index e7a00b32..569e7040 100644 --- a/package.json +++ b/package.json @@ -29,8 +29,8 @@ }, "devDependencies": { "@changesets/cli": "^2.23.1", + "@nomicfoundation/hardhat-verify": "2.0.3", "@nomiclabs/hardhat-ethers": "^2.0.5", - "@nomiclabs/hardhat-etherscan": "3.0.3", "@nomiclabs/hardhat-waffle": "^2.0.3", "@typechain/ethers-v5": "^10.0.0", "@typechain/hardhat": "^6.0.0", diff --git a/packages/zeta-app-contracts/data/addresses.json b/packages/zeta-app-contracts/data/addresses.json index 27c51e4a..eba55858 100644 --- a/packages/zeta-app-contracts/data/addresses.json +++ b/packages/zeta-app-contracts/data/addresses.json @@ -8,7 +8,7 @@ }, "bsc_mainnet": { "multiChainSwap": "", - "multiChainValue": "", + "multiChainValue": "0x33e5fCFfe910B99DB46c259804fCA1317EA0Aa89", "zetaTokenConsumerUniV2": "", "zetaTokenConsumerUniV3": "" }, @@ -26,7 +26,7 @@ }, "eth_mainnet": { "multiChainSwap": "", - "multiChainValue": "", + "multiChainValue": "0x910966E1C0Bc9FD74f499723c19Ff9799fE258a5", "zetaTokenConsumerUniV2": "", "zetaTokenConsumerUniV3": "" }, @@ -44,7 +44,7 @@ }, "zeta_testnet": { "multiChainSwap": "", - "multiChainValue": "0x82aC45D07dEe4DBDe050e838beF345347DEd99a8", + "multiChainValue": "0x36Cfb6dCd6926dFb749dc8E4b28efc73f3e6FAe3", "zetaTokenConsumerUniV2": "", "zetaTokenConsumerUniV3": "" } diff --git a/packages/zeta-app-contracts/hardhat.config.ts b/packages/zeta-app-contracts/hardhat.config.ts index 8d3851c6..fe201701 100644 --- a/packages/zeta-app-contracts/hardhat.config.ts +++ b/packages/zeta-app-contracts/hardhat.config.ts @@ -1,4 +1,4 @@ -import "@nomiclabs/hardhat-etherscan"; +import "@nomicfoundation/hardhat-verify"; import "@nomiclabs/hardhat-waffle"; import "@typechain/hardhat"; import "hardhat-gas-reporter"; @@ -11,11 +11,14 @@ import type { HardhatUserConfig } from "hardhat/types"; dotenv.config(); +const PRIVATE_KEYS = process.env.PRIVATE_KEY !== undefined ? [`0x${process.env.PRIVATE_KEY}`] : []; + const config: HardhatUserConfig = { //@ts-ignore etherscan: { apiKey: { // BSC + bsc: process.env.BSCSCAN_API_KEY || "", bscTestnet: process.env.BSCSCAN_API_KEY || "", // ETH goerli: process.env.ETHERSCAN_API_KEY || "", diff --git a/packages/zevm-app-contracts/contracts/disperse/Disperse.sol b/packages/zevm-app-contracts/contracts/disperse/Disperse.sol index 21efac64..943ce30c 100644 --- a/packages/zevm-app-contracts/contracts/disperse/Disperse.sol +++ b/packages/zevm-app-contracts/contracts/disperse/Disperse.sol @@ -2,8 +2,11 @@ pragma solidity 0.8.7; import "@openzeppelin/contracts/interfaces/IERC20.sol"; +import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol"; contract Disperse { + using SafeERC20 for IERC20; + bool private locked; event FundsDispersed(address indexed token, address indexed from, address indexed recipient, uint256 value); @@ -38,9 +41,9 @@ contract Disperse { ) external noReentrancy { uint256 total = 0; for (uint256 i = 0; i < recipients.length; i++) total += values[i]; - require(token.transferFrom(msg.sender, address(this), total)); + token.safeTransferFrom(msg.sender, address(this), total); for (uint256 i = 0; i < recipients.length; i++) { - require(token.transfer(recipients[i], values[i])); + token.safeTransfer(recipients[i], values[i]); emit FundsDispersed(address(token), msg.sender, recipients[i], values[i]); } } @@ -51,7 +54,7 @@ contract Disperse { uint256[] calldata values ) external noReentrancy { for (uint256 i = 0; i < recipients.length; i++) { - require(token.transferFrom(msg.sender, recipients[i], values[i])); + token.safeTransferFrom(msg.sender, recipients[i], values[i]); emit FundsDispersed(address(token), msg.sender, recipients[i], values[i]); } } diff --git a/packages/zevm-app-contracts/contracts/zeta-points/InvitationManager.sol b/packages/zevm-app-contracts/contracts/zeta-points/InvitationManager.sol index 50f43173..aad0d270 100644 --- a/packages/zevm-app-contracts/contracts/zeta-points/InvitationManager.sol +++ b/packages/zevm-app-contracts/contracts/zeta-points/InvitationManager.sol @@ -8,6 +8,10 @@ contract InvitationManager { bytes32 r; bytes32 s; } + + // Indicate if invitation is still available. The default value is true. + mapping(address => bool) public invitationEnabled; + // Records the timestamp when a particular user gets verified. mapping(address => uint256) public userVerificationTimestamps; @@ -24,23 +28,37 @@ contract InvitationManager { mapping(address => mapping(uint256 => uint256)) public totalInvitesByInviterByDay; error UserAlreadyVerified(); + error UserNotVerified(); error UnrecognizedInvitation(); error IndexOutOfBounds(); error CanNotInviteYourself(); - event UserVerified(address indexed userAddress, uint256 verifiedAt); - event InvitationAccepted(address indexed inviter, address indexed invitee, uint256 index, uint256 acceptedAt); + event UserVerified(address indexed userAddress, uint256 verifiedAt, uint256 unix_timestamp); + event InvitationAccepted( + address indexed inviter, + address indexed invitee, + uint256 index, + uint256 expiration, + uint256 acceptedAt, + uint256 unix_timestamp + ); function _markAsVerified(address user) internal { // Check if the user is already verified if (userVerificationTimestamps[user] > 0) revert UserAlreadyVerified(); userVerificationTimestamps[user] = block.timestamp; - emit UserVerified(user, block.timestamp); + emit UserVerified(user, block.timestamp, block.timestamp); } function markAsVerified() external { _markAsVerified(msg.sender); + invitationEnabled[msg.sender] = true; + } + + function updateInvitationStatus(bool value) external { + if (userVerificationTimestamps[msg.sender] == 0) revert UserNotVerified(); + invitationEnabled[msg.sender] = value; } function hasBeenVerified(address userAddress) external view returns (bool) { @@ -51,18 +69,21 @@ contract InvitationManager { return userVerificationTimestamps[userAddress]; } - function _verifySignature(address inviter, Signature calldata signature) private pure { - bytes32 payloadHash = keccak256(abi.encode(inviter)); + function _verifySignature(address inviter, uint256 expiration, Signature calldata signature) private pure { + bytes32 payloadHash = keccak256(abi.encode(inviter, expiration)); bytes32 messageHash = keccak256(abi.encodePacked("\x19Ethereum Signed Message:\n32", payloadHash)); address messageSigner = ecrecover(messageHash, signature.v, signature.r, signature.s); if (inviter != messageSigner) revert UnrecognizedInvitation(); } - function confirmAndAcceptInvitation(address inviter, Signature calldata signature) external { + function confirmAndAcceptInvitation(address inviter, uint256 expiration, Signature calldata signature) external { if (inviter == msg.sender) revert CanNotInviteYourself(); - if (userVerificationTimestamps[inviter] == 0) revert UnrecognizedInvitation(); - _verifySignature(inviter, signature); + if (!invitationEnabled[inviter]) revert UnrecognizedInvitation(); + + _verifySignature(inviter, expiration, signature); + + if (expiration < block.timestamp) revert UnrecognizedInvitation(); acceptedInvitationsTimestamp[inviter][msg.sender] = block.timestamp; _markAsVerified(msg.sender); @@ -75,7 +96,14 @@ contract InvitationManager { totalInvitesByDay[dayStartTimestamp]++; totalInvitesByInviterByDay[inviter][dayStartTimestamp]++; - emit InvitationAccepted(inviter, msg.sender, inviteeLists[inviter].length - 1, block.timestamp); + emit InvitationAccepted( + inviter, + msg.sender, + inviteeLists[inviter].length - 1, + expiration, + block.timestamp, + block.timestamp + ); } function getInviteeCount(address inviter) external view returns (uint256) { diff --git a/packages/zevm-app-contracts/data/addresses.json b/packages/zevm-app-contracts/data/addresses.json index e040ed8f..bd53a842 100644 --- a/packages/zevm-app-contracts/data/addresses.json +++ b/packages/zevm-app-contracts/data/addresses.json @@ -1,11 +1,11 @@ { "zevm": { "zeta_testnet": { - "disperse": "0xf394dc01879E39f19eDA533EFD10C82eEee5B2b1", - "rewardDistributorFactory": "0x667e4C493d40015256BDC89E3ba750B2F90359E1", - "zetaSwap": "0x44D1F1f9289DBA1Cf5824bd667184cEBE020aA1c", - "zetaSwapBtcInbound": "0x008b393933D5CA2457Df570CA5D628380FFf6da4", - "invitationManager": "0xF4cF881A3d23936e3710ef2Cbbe93f71C4389918" + "disperse": "0x23ce409Ea60c3d75827d04D9db3d52F3af62e44d", + "rewardDistributorFactory": "0xB9dc665610CF5109cE23aBBdaAc315B41FA094c1", + "zetaSwap": "0xA8168Dc495Ed61E70f5c1941e2860050AB902cEF", + "zetaSwapBtcInbound": "0x358E2cfC0E16444Ba7D3164Bbeeb6bEA7472c559", + "invitationManager": "0x3649C03C472B698213926543456E9c21081e529d" } } } \ No newline at end of file diff --git a/packages/zevm-app-contracts/hardhat.config.ts b/packages/zevm-app-contracts/hardhat.config.ts index d495af66..3ac46d5e 100644 --- a/packages/zevm-app-contracts/hardhat.config.ts +++ b/packages/zevm-app-contracts/hardhat.config.ts @@ -1,4 +1,4 @@ -import "@nomiclabs/hardhat-etherscan"; +import "@nomicfoundation/hardhat-verify"; import "@nomiclabs/hardhat-waffle"; import "@typechain/hardhat"; import "hardhat-gas-reporter"; diff --git a/packages/zevm-app-contracts/test/Disperse.spec.ts b/packages/zevm-app-contracts/test/Disperse.spec.ts index 20b7ca2c..3002619b 100644 --- a/packages/zevm-app-contracts/test/Disperse.spec.ts +++ b/packages/zevm-app-contracts/test/Disperse.spec.ts @@ -1,6 +1,7 @@ import { parseUnits } from "@ethersproject/units"; import { SignerWithAddress } from "@nomiclabs/hardhat-ethers/signers"; import { expect } from "chai"; +import { parseEther } from "ethers/lib/utils"; import { ethers, network } from "hardhat"; import { Disperse, Disperse__factory, MockZRC20, MockZRC20__factory } from "../typechain-types"; @@ -23,18 +24,23 @@ describe("Disperse tests", () => { describe("Disperse", () => { it("Should disperse ETH", async () => { - const amount = parseUnits("10"); + const count = 500; + const amount = parseEther("0.01"); const balance0 = await ethers.provider.getBalance(accounts[0].address); const balance1 = await ethers.provider.getBalance(accounts[1].address); - await disperseContract.disperseEther([accounts[0].address, accounts[1].address], [amount, amount.mul(2)], { - value: amount.mul(3), + + const bigArrayAddress = new Array(count).fill(accounts[0].address); + const bigArrayAmount = new Array(count).fill(amount); + + await disperseContract.disperseEther(bigArrayAddress, bigArrayAmount, { + value: amount.mul(count), }); const balance0After = await ethers.provider.getBalance(accounts[0].address); const balance1After = await ethers.provider.getBalance(accounts[1].address); - expect(balance0After.sub(balance0)).to.be.eq(amount); - expect(balance1After.sub(balance1)).to.be.eq(amount.mul(2)); + expect(balance0After.sub(balance0)).to.be.eq(amount.mul(count)); + expect(balance1After.sub(balance1)).to.be.eq(0); }); it("Should disperse ETH with surplus", async () => { diff --git a/packages/zevm-app-contracts/test/zeta-points/InvitationManager.ts b/packages/zevm-app-contracts/test/zeta-points/InvitationManager.ts index 2c9d5279..0eb30a06 100644 --- a/packages/zevm-app-contracts/test/zeta-points/InvitationManager.ts +++ b/packages/zevm-app-contracts/test/zeta-points/InvitationManager.ts @@ -21,6 +21,13 @@ describe("InvitationManager Contract test", () => { await invitationManager.markAsVerified(); }); + const getTomorrowTimestamp = async () => { + const block = await ethers.provider.getBlock("latest"); + const now = block.timestamp; + const tomorrow = now + 24 * 60 * 60; + return tomorrow; + }; + describe("True", () => { it("Should be true", async () => { expect(true).to.equal(true); @@ -29,12 +36,16 @@ describe("InvitationManager Contract test", () => { describe("Invitations test", () => { it("Should verify an invitation and store it", async () => { - const sig = await getInvitationSig(inviter); + const expirationDate = await getTomorrowTimestamp(); + + const sig = await getInvitationSig(inviter, expirationDate); const hasBeenVerifiedBefore = await invitationManager.hasBeenVerified(invitee.address); await expect(hasBeenVerifiedBefore).to.be.eq(false); - const tx = await invitationManager.connect(invitee).confirmAndAcceptInvitation(inviter.address, sig); + const tx = await invitationManager + .connect(invitee) + .confirmAndAcceptInvitation(inviter.address, expirationDate, sig); const rec = await tx.wait(); const block = await ethers.provider.getBlock(rec.blockNumber); @@ -50,30 +61,47 @@ describe("InvitationManager Contract test", () => { }); it("Should revert if invitation is invalid", async () => { - const sig = await getInvitationSig(inviter); - const tx = invitationManager.connect(invitee).confirmAndAcceptInvitation(addrs[0].address, sig); + const expirationDate = await getTomorrowTimestamp(); + const sig = await getInvitationSig(inviter, expirationDate); + const tx = invitationManager.connect(invitee).confirmAndAcceptInvitation(addrs[0].address, expirationDate, sig); + await expect(tx).to.be.revertedWith("UnrecognizedInvitation"); + }); + + it("Should revert if invitation is expired", async () => { + const expirationDate = await getTomorrowTimestamp(); + const yesterdayTimestamp = expirationDate - 24 * 60 * 60; + const sig = await getInvitationSig(inviter, expirationDate); + const tx = invitationManager + .connect(invitee) + .confirmAndAcceptInvitation(inviter.address, yesterdayTimestamp, sig); await expect(tx).to.be.revertedWith("UnrecognizedInvitation"); }); it("Should revert if inviter has not been verified", async () => { - const sig = await getInvitationSig(addrs[0]); - const tx = invitationManager.connect(invitee).confirmAndAcceptInvitation(addrs[0].address, sig); + const expirationDate = await getTomorrowTimestamp(); + const sig = await getInvitationSig(addrs[0], expirationDate); + const tx = invitationManager.connect(invitee).confirmAndAcceptInvitation(addrs[0].address, expirationDate, sig); await expect(tx).to.be.revertedWith("UnrecognizedInvitation"); }); it("Should revert if invitation is already accepted", async () => { - const sig = await getInvitationSig(inviter); - await invitationManager.connect(invitee).confirmAndAcceptInvitation(inviter.address, sig); - const tx = invitationManager.connect(invitee).confirmAndAcceptInvitation(inviter.address, sig); + const expirationDate = await getTomorrowTimestamp(); + const sig = await getInvitationSig(inviter, expirationDate); + await invitationManager.connect(invitee).confirmAndAcceptInvitation(inviter.address, expirationDate, sig); + const tx = invitationManager.connect(invitee).confirmAndAcceptInvitation(inviter.address, expirationDate, sig); await expect(tx).to.be.revertedWith("UserAlreadyVerified"); }); it("Should count only for today if I just accepted", async () => { - const sig = await getInvitationSig(inviter); - const tx = await invitationManager.connect(invitee).confirmAndAcceptInvitation(inviter.address, sig); + const expirationDate = await getTomorrowTimestamp(); + const sig = await getInvitationSig(inviter, expirationDate); + const tx = await invitationManager + .connect(invitee) + .confirmAndAcceptInvitation(inviter.address, expirationDate, sig); const rec = await tx.wait(); const block = await ethers.provider.getBlock(rec.blockNumber); + const now = block.timestamp; const invitation = await invitationManager.acceptedInvitationsTimestamp(inviter.address, invitee.address); await expect(invitation).to.be.eq(block.timestamp); @@ -81,7 +109,6 @@ describe("InvitationManager Contract test", () => { const invitationCount = await invitationManager.getInviteeCount(inviter.address); await expect(invitationCount).to.be.eq(1); - const now = block.timestamp; const todayTimestamp = Math.floor(now / 86400) * 86400; const invitationCountToday = await invitationManager.getTotalInvitesOnDay(todayTimestamp); await expect(invitationCountToday).to.be.eq(1); @@ -104,12 +131,15 @@ describe("InvitationManager Contract test", () => { }); it("Should emit the right event when invitation is accepted", async () => { - const sig = await getInvitationSig(inviter); + const expirationDate = await getTomorrowTimestamp(); + const sig = await getInvitationSig(inviter, expirationDate); const hasBeenVerifiedBefore = await invitationManager.hasBeenVerified(invitee.address); await expect(hasBeenVerifiedBefore).to.be.eq(false); - const tx = await invitationManager.connect(invitee).confirmAndAcceptInvitation(inviter.address, sig); + const tx = await invitationManager + .connect(invitee) + .confirmAndAcceptInvitation(inviter.address, expirationDate, sig); const rec = await tx.wait(); const event = rec.events?.find((e) => e.event === "InvitationAccepted"); const block = await ethers.provider.getBlock(rec.blockNumber); @@ -121,7 +151,9 @@ describe("InvitationManager Contract test", () => { const inviteeByIndex = await invitationManager.getInviteeAtIndex(inviter.address, event?.args?.index); expect(inviteeByIndex).to.be.eq(invitee.address); - const tx2 = await invitationManager.connect(addrs[0]).confirmAndAcceptInvitation(inviter.address, sig); + const tx2 = await invitationManager + .connect(addrs[0]) + .confirmAndAcceptInvitation(inviter.address, expirationDate, sig); const rec2 = await tx2.wait(); const event2 = rec2.events?.find((e) => e.event === "InvitationAccepted"); const block2 = await ethers.provider.getBlock(rec2.blockNumber); diff --git a/packages/zevm-app-contracts/test/zeta-points/test.helpers.ts b/packages/zevm-app-contracts/test/zeta-points/test.helpers.ts index cb758210..f60e9a5f 100644 --- a/packages/zevm-app-contracts/test/zeta-points/test.helpers.ts +++ b/packages/zevm-app-contracts/test/zeta-points/test.helpers.ts @@ -1,12 +1,12 @@ import { SignerWithAddress } from "@nomiclabs/hardhat-ethers/signers"; import { ethers } from "hardhat"; -export const getInvitationSig = async (signer: SignerWithAddress) => { - let payload = ethers.utils.defaultAbiCoder.encode(["address"], [signer.address]); +export const getInvitationSig = async (signer: SignerWithAddress, expirationDate: number) => { + const payload = ethers.utils.defaultAbiCoder.encode(["address", "uint256"], [signer.address, expirationDate]); - let payloadHash = ethers.utils.keccak256(payload); + const payloadHash = ethers.utils.keccak256(payload); // This adds the message prefix - let signature = await signer.signMessage(ethers.utils.arrayify(payloadHash)); + const signature = await signer.signMessage(ethers.utils.arrayify(payloadHash)); return ethers.utils.splitSignature(signature); }; diff --git a/yarn.lock b/yarn.lock index d0be129f..9f6ae3ab 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1773,6 +1773,25 @@ __metadata: languageName: node linkType: hard +"@nomicfoundation/hardhat-verify@npm:2.0.3": + version: 2.0.3 + resolution: "@nomicfoundation/hardhat-verify@npm:2.0.3" + dependencies: + "@ethersproject/abi": ^5.1.2 + "@ethersproject/address": ^5.0.2 + cbor: ^8.1.0 + chalk: ^2.4.2 + debug: ^4.1.1 + lodash.clonedeep: ^4.5.0 + semver: ^6.3.0 + table: ^6.8.0 + undici: ^5.14.0 + peerDependencies: + hardhat: ^2.0.4 + checksum: 5cc3513d3385eb45c19081e79b1b2a67b13376f0d2c5dc2da07ee41886f82110b0af5b46e7fae6204db8a9d4dcda7e568a630a254bd5567779068bc29c22c86f + languageName: node + linkType: hard + "@nomicfoundation/solidity-analyzer-darwin-arm64@npm:0.1.1": version: 0.1.1 resolution: "@nomicfoundation/solidity-analyzer-darwin-arm64@npm:0.1.1" @@ -1892,23 +1911,6 @@ __metadata: languageName: node linkType: hard -"@nomiclabs/hardhat-etherscan@npm:3.0.3": - version: 3.0.3 - resolution: "@nomiclabs/hardhat-etherscan@npm:3.0.3" - dependencies: - "@ethersproject/abi": ^5.1.2 - "@ethersproject/address": ^5.0.2 - cbor: ^5.0.2 - debug: ^4.1.1 - fs-extra: ^7.0.1 - semver: ^6.3.0 - undici: ^4.14.1 - peerDependencies: - hardhat: ^2.0.4 - checksum: 6ce0856ad989c4cff5c90f7673d80fb7778ac1941db2bdf0998afca31c2439ed2e840fbad123a6f5958768243179af33a56f7b45919a598c8361b9a7cfdbaea6 - languageName: node - linkType: hard - "@nomiclabs/hardhat-waffle@npm:^2.0.3": version: 2.0.6 resolution: "@nomiclabs/hardhat-waffle@npm:2.0.6" @@ -3008,6 +3010,18 @@ __metadata: languageName: node linkType: hard +"ajv@npm:^8.0.1": + version: 8.12.0 + resolution: "ajv@npm:8.12.0" + dependencies: + fast-deep-equal: ^3.1.1 + json-schema-traverse: ^1.0.0 + require-from-string: ^2.0.2 + uri-js: ^4.2.2 + checksum: 4dc13714e316e67537c8b31bc063f99a1d9d9a497eb4bbd55191ac0dcd5e4985bbb71570352ad6f1e76684fb6d790928f96ba3b2d4fd6e10024be9612fe3f001 + languageName: node + linkType: hard + "amdefine@npm:>=0.0.4": version: 1.0.1 resolution: "amdefine@npm:1.0.1" @@ -3285,6 +3299,13 @@ __metadata: languageName: node linkType: hard +"astral-regex@npm:^2.0.0": + version: 2.0.0 + resolution: "astral-regex@npm:2.0.0" + checksum: 876231688c66400473ba505731df37ea436e574dd524520294cc3bbc54ea40334865e01fa0d074d74d036ee874ee7e62f486ea38bc421ee8e6a871c06f011766 + languageName: node + linkType: hard + "async-eventemitter@npm:^0.2.4": version: 0.2.4 resolution: "async-eventemitter@npm:0.2.4" @@ -3418,7 +3439,7 @@ __metadata: languageName: node linkType: hard -"bignumber.js@npm:^9.0.0, bignumber.js@npm:^9.0.1": +"bignumber.js@npm:^9.0.0": version: 9.1.2 resolution: "bignumber.js@npm:9.1.2" checksum: 582c03af77ec9cb0ebd682a373ee6c66475db94a4325f92299621d544aa4bd45cb45fd60001610e94aef8ae98a0905fa538241d9638d4422d57abbeeac6fadaf @@ -3893,13 +3914,12 @@ __metadata: languageName: node linkType: hard -"cbor@npm:^5.0.2": - version: 5.2.0 - resolution: "cbor@npm:5.2.0" +"cbor@npm:^8.1.0": + version: 8.1.0 + resolution: "cbor@npm:8.1.0" dependencies: - bignumber.js: ^9.0.1 - nofilter: ^1.0.4 - checksum: b3c39dae64370f361526dbec88f51d0f1b47027224cdd21dbd64c228f0fe7eaa945932d349ec5324068a6c6dcdbb1e3b46242852524fd53c526d14cb60514bdc + nofilter: ^3.1.0 + checksum: a90338435dc7b45cc01461af979e3bb6ddd4f2a08584c437586039cd5f2235014c06e49d664295debbfb3514d87b2f06728092ab6aa6175e2e85e9cd7dc0c1fd languageName: node linkType: hard @@ -7686,6 +7706,13 @@ __metadata: languageName: node linkType: hard +"json-schema-traverse@npm:^1.0.0": + version: 1.0.0 + resolution: "json-schema-traverse@npm:1.0.0" + checksum: 02f2f466cdb0362558b2f1fd5e15cce82ef55d60cd7f8fa828cf35ba74330f8d767fcae5c5c2adb7851fa811766c694b9405810879bc4e1ddd78a7c0e03658ad + languageName: node + linkType: hard + "json-schema@npm:0.4.0, json-schema@npm:^0.4.0": version: 0.4.0 resolution: "json-schema@npm:0.4.0" @@ -8084,6 +8111,13 @@ __metadata: languageName: node linkType: hard +"lodash.clonedeep@npm:^4.5.0": + version: 4.5.0 + resolution: "lodash.clonedeep@npm:4.5.0" + checksum: 92c46f094b064e876a23c97f57f81fbffd5d760bf2d8a1c61d85db6d1e488c66b0384c943abee4f6af7debf5ad4e4282e74ff83177c9e63d8ff081a4837c3489 + languageName: node + linkType: hard + "lodash.isequal@npm:^4.5.0": version: 4.5.0 resolution: "lodash.isequal@npm:4.5.0" @@ -8112,6 +8146,13 @@ __metadata: languageName: node linkType: hard +"lodash.truncate@npm:^4.4.2": + version: 4.4.2 + resolution: "lodash.truncate@npm:4.4.2" + checksum: b463d8a382cfb5f0e71c504dcb6f807a7bd379ff1ea216669aa42c52fc28c54e404bfbd96791aa09e6df0de2c1d7b8f1b7f4b1a61f324d38fe98bc535aeee4f5 + languageName: node + linkType: hard + "lodash@npm:^4.17.11, lodash@npm:^4.17.14, lodash@npm:^4.17.15, lodash@npm:^4.17.21": version: 4.17.21 resolution: "lodash@npm:4.17.21" @@ -8956,10 +8997,10 @@ __metadata: languageName: node linkType: hard -"nofilter@npm:^1.0.4": - version: 1.0.4 - resolution: "nofilter@npm:1.0.4" - checksum: 54d864f745de5c3312994e880cf2d4f55e34830d6adc8275dce3731507ca380d21040336e4a277a4901551c07f04c452fbeffd57fad1dc8f68a2943eaf894a04 +"nofilter@npm:^3.1.0": + version: 3.1.0 + resolution: "nofilter@npm:3.1.0" + checksum: 58aa85a5b4b35cbb6e42de8a8591c5e338061edc9f3e7286f2c335e9e9b9b8fa7c335ae45daa8a1f3433164dc0b9a3d187fa96f9516e04a17a1f9ce722becc4f languageName: node linkType: hard @@ -9953,7 +9994,7 @@ __metadata: languageName: node linkType: hard -"require-from-string@npm:^2.0.0": +"require-from-string@npm:^2.0.0, require-from-string@npm:^2.0.2": version: 2.0.2 resolution: "require-from-string@npm:2.0.2" checksum: a03ef6895445f33a4015300c426699bc66b2b044ba7b670aa238610381b56d3f07c686251740d575e22f4c87531ba662d06937508f0f3c0f1ddc04db3130560b @@ -10574,6 +10615,17 @@ __metadata: languageName: node linkType: hard +"slice-ansi@npm:^4.0.0": + version: 4.0.0 + resolution: "slice-ansi@npm:4.0.0" + dependencies: + ansi-styles: ^4.0.0 + astral-regex: ^2.0.0 + is-fullwidth-code-point: ^3.0.0 + checksum: 4a82d7f085b0e1b070e004941ada3c40d3818563ac44766cca4ceadd2080427d337554f9f99a13aaeb3b4a94d9964d9466c807b3d7b7541d1ec37ee32d308756 + languageName: node + linkType: hard + "smart-buffer@npm:^4.2.0": version: 4.2.0 resolution: "smart-buffer@npm:4.2.0" @@ -11083,6 +11135,19 @@ __metadata: languageName: node linkType: hard +"table@npm:^6.8.0": + version: 6.8.1 + resolution: "table@npm:6.8.1" + dependencies: + ajv: ^8.0.1 + lodash.truncate: ^4.4.2 + slice-ansi: ^4.0.0 + string-width: ^4.2.3 + strip-ansi: ^6.0.1 + checksum: 08249c7046125d9d0a944a6e96cfe9ec66908d6b8a9db125531be6eb05fa0de047fd5542e9d43b4f987057f00a093b276b8d3e19af162a9c40db2681058fd306 + languageName: node + linkType: hard + "tar@npm:^4.0.2": version: 4.4.19 resolution: "tar@npm:4.4.19" @@ -11647,13 +11712,6 @@ __metadata: languageName: node linkType: hard -"undici@npm:^4.14.1": - version: 4.16.0 - resolution: "undici@npm:4.16.0" - checksum: 5e88c2b3381085e25ed1d1a308610ac7ee985f478ac705af7a8e03213536e10f73ef8dd8d85e6ed38948d1883fa0ae935e04357c317b0f5d3d3c0211d0c8c393 - languageName: node - linkType: hard - "undici@npm:^5.14.0": version: 5.28.2 resolution: "undici@npm:5.28.2" @@ -12880,8 +12938,8 @@ __metadata: resolution: "zetachain@workspace:." dependencies: "@changesets/cli": ^2.23.1 + "@nomicfoundation/hardhat-verify": 2.0.3 "@nomiclabs/hardhat-ethers": ^2.0.5 - "@nomiclabs/hardhat-etherscan": 3.0.3 "@nomiclabs/hardhat-waffle": ^2.0.3 "@typechain/ethers-v5": ^10.0.0 "@typechain/hardhat": ^6.0.0 From 45930f07b5c5ec2e4d1edc6ec2f2ac83bae1ad23 Mon Sep 17 00:00:00 2001 From: Andres Martin Aiello <50411235+andresaiello@users.noreply.github.com> Date: Tue, 20 Feb 2024 11:54:51 -0300 Subject: [PATCH 115/115] feat: update zetachain multichainvalue (#150) * Initial commit * update network pkg and imports * update deploy script * remove unused * update to @zetachain/networks 4.0.0 * update test * fix sendZeta * add gas limit * remove old deployments * update addresses * Update packages/zeta-app-contracts/contracts/multi-chain-value/MultiChainValue.sol Co-authored-by: Lucas * Update packages/zeta-app-contracts/contracts/multi-chain-value/MultiChainValue.sol Co-authored-by: Lucas --------- Co-authored-by: Lucas --- .../multi-chain-value/MultiChainValue.sol | 31 ++++---- .../zeta-app-contracts/data/addresses.json | 21 ++++-- packages/zeta-app-contracts/package.json | 4 +- .../scripts/multi-chain-value/deploy.ts | 30 ++++---- .../multi-chain-value/search-reverted-tx.ts | 75 +++++++++++++++++++ .../test/MultiChainValue.spec.ts | 28 ++----- packages/zevm-app-contracts/package.json | 4 +- yarn.lock | 24 +++--- 8 files changed, 144 insertions(+), 73 deletions(-) create mode 100644 packages/zeta-app-contracts/scripts/multi-chain-value/search-reverted-tx.ts diff --git a/packages/zeta-app-contracts/contracts/multi-chain-value/MultiChainValue.sol b/packages/zeta-app-contracts/contracts/multi-chain-value/MultiChainValue.sol index d2f319f7..29a94042 100644 --- a/packages/zeta-app-contracts/contracts/multi-chain-value/MultiChainValue.sol +++ b/packages/zeta-app-contracts/contracts/multi-chain-value/MultiChainValue.sol @@ -21,8 +21,8 @@ interface MultiChainValueErrors { } /** - * @dev MultiChainValue goal is to send Zeta token across all supported chains - * Extends the logic defined in ZetaInteractor to handle multichain standards + * @dev MultiChainValue goal is to send Zeta token from ZEVM to other chains. + * This contract cannot handle 'onRevert' events, so it should only be used in ZEVM and not on other chains. */ contract MultiChainValue is ZetaInteractor, MultiChainValueErrors { address public zetaToken; @@ -56,7 +56,11 @@ contract MultiChainValue is ZetaInteractor, MultiChainValueErrors { /** * @dev If the destination chain is a valid chain, send the Zeta tokens to that chain */ - function sendZeta(uint256 destinationChainId, bytes calldata destinationAddress) public payable { + function sendZeta( + uint256 destinationChainId, + bytes calldata destinationAddress, + uint256 destinationGasLimit + ) public payable { uint256 zetaValueAndGas = msg.value; if (!availableChainIds[destinationChainId]) revert InvalidDestinationChainId(); @@ -70,8 +74,8 @@ contract MultiChainValue is ZetaInteractor, MultiChainValueErrors { ZetaInterfaces.SendInput({ destinationChainId: destinationChainId, destinationAddress: destinationAddress, - destinationGasLimit: 300000, - message: abi.encode(msg.sender), + destinationGasLimit: destinationGasLimit, + message: abi.encode(), zetaValueAndGas: zetaValueAndGas, zetaParams: abi.encode("") }) @@ -81,7 +85,12 @@ contract MultiChainValue is ZetaInteractor, MultiChainValueErrors { /** * @dev If the destination chain is a valid chain, send the Zeta tokens to that chain */ - function send(uint256 destinationChainId, bytes calldata destinationAddress, uint256 zetaValueAndGas) external { + function send( + uint256 destinationChainId, + bytes calldata destinationAddress, + uint256 zetaValueAndGas, + uint256 destinationGasLimit + ) external { if (!availableChainIds[destinationChainId]) revert InvalidDestinationChainId(); if (zetaValueAndGas == 0) revert InvalidZetaValueAndGas(); @@ -93,8 +102,8 @@ contract MultiChainValue is ZetaInteractor, MultiChainValueErrors { ZetaInterfaces.SendInput({ destinationChainId: destinationChainId, destinationAddress: destinationAddress, - destinationGasLimit: 300000, - message: abi.encode(msg.sender), + destinationGasLimit: destinationGasLimit, + message: abi.encode(), zetaValueAndGas: zetaValueAndGas, zetaParams: abi.encode("") }) @@ -102,10 +111,6 @@ contract MultiChainValue is ZetaInteractor, MultiChainValueErrors { } function onZetaRevert(ZetaInterfaces.ZetaRevert calldata zetaRevert) external isValidRevertCall(zetaRevert) { - address messageFrom = abi.decode(zetaRevert.message, (address)); - - bool success1 = ZetaEth(zetaToken).approve(address(this), zetaRevert.remainingZetaValue); - bool success2 = ZetaEth(zetaToken).transferFrom(address(this), messageFrom, zetaRevert.remainingZetaValue); - if (!(success1 && success2)) revert ErrorTransferringZeta(); + //@dev this version do not handle revert } } diff --git a/packages/zeta-app-contracts/data/addresses.json b/packages/zeta-app-contracts/data/addresses.json index eba55858..079270d2 100644 --- a/packages/zeta-app-contracts/data/addresses.json +++ b/packages/zeta-app-contracts/data/addresses.json @@ -8,13 +8,13 @@ }, "bsc_mainnet": { "multiChainSwap": "", - "multiChainValue": "0x33e5fCFfe910B99DB46c259804fCA1317EA0Aa89", + "multiChainValue": "", "zetaTokenConsumerUniV2": "", "zetaTokenConsumerUniV3": "" }, "bsc_testnet": { "multiChainSwap": "0x8BD7144Ddb59c9Fa3Dcf809998521E9cAD946fa1", - "multiChainValue": "0x064516547ECd3b2D1709e1b2798Aae92b1C8a84C", + "multiChainValue": "", "zetaTokenConsumerUniV2": "", "zetaTokenConsumerUniV3": "" }, @@ -26,30 +26,37 @@ }, "eth_mainnet": { "multiChainSwap": "", - "multiChainValue": "0x910966E1C0Bc9FD74f499723c19Ff9799fE258a5", + "multiChainValue": "", "zetaTokenConsumerUniV2": "", "zetaTokenConsumerUniV3": "" }, "goerli_testnet": { "multiChainSwap": "0x323745f16C93e56a98012970c28788498d8B3a14", - "multiChainValue": "0x14BeC0E4A8e7bF7A02Af54Ad81a57a9fcA4D37Fd", + "multiChainValue": "", "zetaTokenConsumerUniV2": "", "zetaTokenConsumerUniV3": "" }, "mumbai_testnet": { "multiChainSwap": "0xb1b812b664c28E1bA1d35De925Ae88b7Bc7cdCF5", - "multiChainValue": "0x14BeC0E4A8e7bF7A02Af54Ad81a57a9fcA4D37Fd", + "multiChainValue": "", "zetaTokenConsumerUniV2": "", "zetaTokenConsumerUniV3": "" }, "zeta_testnet": { "multiChainSwap": "", - "multiChainValue": "0x36Cfb6dCd6926dFb749dc8E4b28efc73f3e6FAe3", + "multiChainValue": "0x73B37B8BAbAC0e846bB2C4c581e60bFF2BFBE76e", + "zetaTokenConsumerUniV2": "", + "zetaTokenConsumerUniV3": "" + }, + "zeta_mainnet": { + "multiChainSwap": "", + "multiChainValue": "0xF0a3F93Ed1B126142E61423F9546bf1323Ff82DF", "zetaTokenConsumerUniV2": "", "zetaTokenConsumerUniV3": "" } }, "zevm": { - "zeta_testnet": {} + "zeta_testnet": {}, + "zeta_mainnet": {} } } \ No newline at end of file diff --git a/packages/zeta-app-contracts/package.json b/packages/zeta-app-contracts/package.json index 139faf17..234f534b 100644 --- a/packages/zeta-app-contracts/package.json +++ b/packages/zeta-app-contracts/package.json @@ -37,8 +37,8 @@ }, "dependencies": { "@openzeppelin/contracts": "^4.9.3", - "@zetachain/networks": "^2.4.3", - "@zetachain/protocol-contracts": "^3.0.1", + "@zetachain/networks": "^4.0.0", + "@zetachain/protocol-contracts": "^4.0.1", "ethers": "5.6.8" } } \ No newline at end of file diff --git a/packages/zeta-app-contracts/scripts/multi-chain-value/deploy.ts b/packages/zeta-app-contracts/scripts/multi-chain-value/deploy.ts index ae9e3736..907ac328 100644 --- a/packages/zeta-app-contracts/scripts/multi-chain-value/deploy.ts +++ b/packages/zeta-app-contracts/scripts/multi-chain-value/deploy.ts @@ -1,4 +1,4 @@ -import { getAddress, isProtocolNetworkName } from "@zetachain/protocol-contracts/dist/lib"; +import { getAddress, isProtocolNetworkName, isTestnetNetwork } from "@zetachain/protocol-contracts/dist/lib"; import { ethers, network } from "hardhat"; import { MultiChainValue, MultiChainValue__factory } from "../../typechain-types"; @@ -21,21 +21,19 @@ async function main() { console.log("MultiChainValue post rutine..."); - networkName !== "goerli_testnet" && - (await (await contract.addAvailableChainId(getChainId("goerli_testnet"))) - .wait() - .catch((e: any) => console.error(e))); - - networkName !== "mumbai_testnet" && - (await (await contract.addAvailableChainId(getChainId("mumbai_testnet"))) - .wait() - .catch((e: any) => console.error(e))); - - networkName !== "bsc_testnet" && - (await (await contract.addAvailableChainId(getChainId("bsc_testnet"))).wait().catch((e: any) => console.error(e))); - - networkName !== "zeta_testnet" && - (await (await contract.addAvailableChainId(getChainId("zeta_testnet"))).wait().catch((e: any) => console.error(e))); + //@ts-ignore + const isTestnet = isTestnetNetwork(networkName); + + if (isTestnet) { + await (await contract.addAvailableChainId(getChainId("goerli_testnet"))).wait().catch((e: any) => console.error(e)); + await (await contract.addAvailableChainId(getChainId("bsc_testnet"))).wait().catch((e: any) => console.error(e)); + await (await contract.addAvailableChainId(getChainId("zeta_testnet"))).wait().catch((e: any) => console.error(e)); + await (await contract.addAvailableChainId(getChainId("mumbai_testnet"))).wait().catch((e: any) => console.error(e)); + } else { + await (await contract.addAvailableChainId(getChainId("bsc_mainnet"))).wait().catch((e: any) => console.error(e)); + await (await contract.addAvailableChainId(getChainId("zeta_mainnet"))).wait().catch((e: any) => console.error(e)); + await (await contract.addAvailableChainId(getChainId("eth_mainnet"))).wait().catch((e: any) => console.error(e)); + } console.log("MultiChainValue post rutine finish"); } diff --git a/packages/zeta-app-contracts/scripts/multi-chain-value/search-reverted-tx.ts b/packages/zeta-app-contracts/scripts/multi-chain-value/search-reverted-tx.ts new file mode 100644 index 00000000..21faa5f2 --- /dev/null +++ b/packages/zeta-app-contracts/scripts/multi-chain-value/search-reverted-tx.ts @@ -0,0 +1,75 @@ +import { ContractReceipt, ContractTransaction, Transaction } from "ethers"; +import { ethers, network } from "hardhat"; + +// Specify the address you're interested in +const ADDRESS = "0x70e967acFcC17c3941E87562161406d41676FD83"; +let API_KEY = ""; +let API_ENDPOINT = ""; +let START_BLOCK = 0; +let END_BLOCK = 0; + +if (network.name === "bsc_mainnet") { + API_KEY = process.env.BSCSCAN_API_KEY || ""; + API_ENDPOINT = "api.bscscan.com"; + START_BLOCK = 35741686; + END_BLOCK = 35844713; +} else if (network.name === "eth_mainnet") { + API_KEY = process.env.ETHERSCAN_API_KEY || ""; + API_ENDPOINT = "api.etherscan.io"; + START_BLOCK = 19080591; + END_BLOCK = 19157698; +} else { + throw new Error("Unsupported network"); +} + +// Function to check if a transaction involves the specified address +const isTransactionOfInterest = (tx: any, address: string) => { + return tx.from.toLowerCase() === address.toLowerCase() || tx.to.toLowerCase() === address.toLowerCase(); +}; + +// Main function to iterate over the block range and find transactions +const findTransactionsInRange = async () => { + let totalTx = 0; + let totalErrorTx = 0; + for (let i = START_BLOCK; i < END_BLOCK; i++) { + // console.log(`Fetching block ${i} to ${END_BLOCK}...`); + const API_URL = `https://${API_ENDPOINT}/api?module=account&action=txlist&address=${ADDRESS}&startblock=${i}&endblock=${END_BLOCK}&sort=asc&apikey=${API_KEY}`; + + try { + const call = await fetch(API_URL); + const response = await call.json(); + const result = response.result; + const firstBlock = result[0].blockNumber; + const lastBlock = result[result.length - 1].blockNumber; + console.log(`Fetched block ${firstBlock} to ${lastBlock}...`); + + const filteredTx = result.filter((tx: any) => isTransactionOfInterest(tx, ADDRESS)); + const nonSuccesssfulTx = filteredTx.filter((tx: any) => tx.isError === "1" || tx.txreceipt_status !== "1"); + + totalTx += filteredTx.length; + totalErrorTx += nonSuccesssfulTx.length; + for (const tx of nonSuccesssfulTx) { + console.log(tx.hash); + } + if (result.length > 9000) { + i = parseInt(result[result.length - 1].blockNumber) - 1; + } + if (lastBlock >= END_BLOCK) { + break; + } + } catch (e) { + console.log(`Error fetching block ${i}`, e); + } + } + console.log(`total tx: ${totalTx} / Errors: ${totalErrorTx}`); +}; + +// Call the main function +const main = async () => { + await findTransactionsInRange(); +}; + +main().catch((error) => { + console.error(error); + process.exit(1); +}); diff --git a/packages/zeta-app-contracts/test/MultiChainValue.spec.ts b/packages/zeta-app-contracts/test/MultiChainValue.spec.ts index 42ae0072..2df4f5d8 100644 --- a/packages/zeta-app-contracts/test/MultiChainValue.spec.ts +++ b/packages/zeta-app-contracts/test/MultiChainValue.spec.ts @@ -74,42 +74,28 @@ describe("MultiChainValue tests", () => { describe("send", () => { it("Should send msg", async () => { await zetaEthMockContract.approve(multiChainValueContractA.address, parseEther("1000")); - const tx = multiChainValueContractA.send(chainBId, account1Address, 10); + const tx = multiChainValueContractA.send(chainBId, account1Address, 10, 300000); await expect(tx) .to.be.emit(zetaConnectorMockContract, "Send") - .withArgs( - chainBId, - account1Address.toLowerCase(), - 300000, - defaultAbiCoder.encode(["address"], [deployer.address]), - 10, - defaultAbiCoder.encode(["string"], [""]) - ); + .withArgs(chainBId, account1Address.toLowerCase(), 300000, "0x", 10, defaultAbiCoder.encode(["string"], [""])); }); it("Should send native token", async () => { - const tx = multiChainValueContractA.sendZeta(chainBId, account1Address, { value: 10 }); + const tx = multiChainValueContractA.sendZeta(chainBId, account1Address, 100000, { value: 10 }); await expect(tx) .to.be.emit(zetaConnectorMockContract, "Send") - .withArgs( - chainBId, - account1Address.toLowerCase(), - 300000, - defaultAbiCoder.encode(["address"], [deployer.address]), - 10, - defaultAbiCoder.encode(["string"], [""]) - ); + .withArgs(chainBId, account1Address.toLowerCase(), 100000, "0x", 10, defaultAbiCoder.encode(["string"], [""])); }); it("Should prevent sending value to a disabled chainId", async () => { - const tx = multiChainValueContractA.send(1, account1Address, 100_000); + const tx = multiChainValueContractA.send(1, account1Address, 100_000, 300000); await expect(tx).to.be.revertedWith("InvalidDestinationChainId"); }); it("Should prevent sending 0 value", async () => { await (await multiChainValueContractA.addAvailableChainId(1)).wait(); - const tx = multiChainValueContractA.send(1, account1Address, 0); + const tx = multiChainValueContractA.send(1, account1Address, 0, 300000); await expect(tx).to.be.revertedWith("InvalidZetaValueAndGas"); }); @@ -138,7 +124,7 @@ describe("MultiChainValue tests", () => { ethers.utils.hexZeroPad("0x0", 32) ); - const balance = await zetaEthMockContract.balanceOf(account1.address); + const balance = await zetaEthMockContract.balanceOf(multiChainValueContractA.address); await expect(balance).to.be.eq(remainingZetaValue); }); diff --git a/packages/zevm-app-contracts/package.json b/packages/zevm-app-contracts/package.json index b9e78330..53114bea 100644 --- a/packages/zevm-app-contracts/package.json +++ b/packages/zevm-app-contracts/package.json @@ -37,8 +37,8 @@ "dependencies": { "@openzeppelin/contracts": "4.9.3", "@uniswap/v2-periphery": "1.1.0-beta.0", - "@zetachain/networks": "^2.4.3", - "@zetachain/protocol-contracts": "^3.0.1", + "@zetachain/networks": "^4.0.0", + "@zetachain/protocol-contracts": "^4.0.1", "ethers": "5.6.8" } } \ No newline at end of file diff --git a/yarn.lock b/yarn.lock index 9f6ae3ab..773526e9 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2767,19 +2767,19 @@ __metadata: languageName: node linkType: hard -"@zetachain/networks@npm:^2.4.3": - version: 2.5.0 - resolution: "@zetachain/networks@npm:2.5.0" +"@zetachain/networks@npm:^4.0.0": + version: 4.0.0 + resolution: "@zetachain/networks@npm:4.0.0" dependencies: dotenv: ^16.1.4 - checksum: f208dbaa2b38e71069f8eb6ddd2b0a6d11f6f987579fcf4242b4398befa61eea381162984f14f339cee61f3a34e9463df20bfd53f3e670bb721b76c09d9840ac + checksum: 2013304de6959e9b33a2e4a23f49dd13ce9747bf4084332fda700ca32f719931998985a65e6e7c017c0919ff9167899a0529dbfaec274917aa8c28e6ac4faa0a languageName: node linkType: hard -"@zetachain/protocol-contracts@npm:^3.0.1": - version: 3.0.1 - resolution: "@zetachain/protocol-contracts@npm:3.0.1" - checksum: 5a833dc9f59b69b83654754f4587aad57f4c9859908bc3fd9b5f3f6329cf803bf68e66aff4f355a99fb7e23726526196610e43987d15ec60208cc5564bc94259 +"@zetachain/protocol-contracts@npm:^4.0.1": + version: 4.0.1 + resolution: "@zetachain/protocol-contracts@npm:4.0.1" + checksum: 8d21c901001a735a4a43c4dd9eb90bc8121822bec1d51f0267061f771431691b4bcd7fcdaedb0e7b8bbd0d318937c86972076bf846e5c67506dbab389f9407ff languageName: node linkType: hard @@ -2789,8 +2789,8 @@ __metadata: dependencies: "@defi-wonderland/smock": ^2.3.4 "@openzeppelin/contracts": ^4.9.3 - "@zetachain/networks": ^2.4.3 - "@zetachain/protocol-contracts": ^3.0.1 + "@zetachain/networks": ^4.0.0 + "@zetachain/protocol-contracts": ^4.0.1 ethers: 5.6.8 hardhat-gas-reporter: ^1.0.8 solidity-coverage: ^0.7.20 @@ -2804,8 +2804,8 @@ __metadata: dependencies: "@openzeppelin/contracts": 4.9.3 "@uniswap/v2-periphery": 1.1.0-beta.0 - "@zetachain/networks": ^2.4.3 - "@zetachain/protocol-contracts": ^3.0.1 + "@zetachain/networks": ^4.0.0 + "@zetachain/protocol-contracts": ^4.0.1 ethers: 5.6.8 hardhat-gas-reporter: ^1.0.8 solidity-coverage: ^0.7.20